azure-maps-control 2.1.11 → 2.1.12

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.
@@ -1,55 +0,0 @@
1
- /*!
2
- MICROSOFT SOFTWARE LICENSE TERMS
3
- MICROSOFT AZURE MAPS WEB SDK
4
- These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
5
- 1. INSTALLATION AND USE RIGHTS.
6
- a) General. You may install and use any number of copies of the software to develop and test your applications.
7
- b) User Region Parameters. The software will allow you to select from a View list to set the map view within your application for a given customer. By default the View parameter (also referred to as “user region parameter” is set to “Unified”. Countries/Regions that are not on the View list will default to the “Unified” View. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via the software is made available.
8
- c) Third Party Software. The software may include third party applications that Microsoft, not the third party, licenses to you under this agreement. Any included notices for third party applications are for your information only.
9
- d) Microsoft Online Subscription Agreement. Some features of the software provide access to, or rely on, Microsoft Azure Services. The use of those services (but not the software) is governed by the separate terms and privacy policies associated with your Microsoft Azure subscription. The services may not be available in all regions. For more information see https://go.microsoft.com/fwLink/?LinkID=522330&clcid=0x9.
10
- 2. DISTRIBUTABLE CODE. The software is comprised of “Distributable Code”. “Distributable Code” is code that you are permitted to distribute in applications you develop if you comply with the terms below and otherwise set forth in these license terms.
11
- a) Distribution Rights.
12
- i. You may copy and distribute the object code form of the software.
13
- i. Third Party Distribution. You may permit distributors of your applications to copy and distribute any of this distributable code you elect to distribute with your applications.
14
- b) Distribution Requirements. For any code you distribute, you must:
15
- i. add significant primary functionality to it in your applications;
16
- ii. require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and
17
- iii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code.
18
- c) Distribution Restrictions. You may not:
19
- i. use Microsoft’s trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or
20
- ii. modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft’s other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it.
21
- 3. DATA COLLECTION. The software may collect information about you and your use of the software and send that to Microsoft. Microsoft may use this information to provide services and improve Microsoft’s products and services. Your opt-out rights, if any, are described in the product documentation. Some features in the software may enable collection of data from users of your applications that access or use the software. If you use these features to enable data collection in your applications, you must comply with applicable law, including getting any required user consent, and maintain a prominent privacy policy that accurately informs users about how you use, collect, and share their data. You can learn more about Microsoft’s data collection and use in the product documentation and the Microsoft Privacy Statement at https://go.microsoft.com/fwlink/?LinkId=512132. You agree to comply with all applicable provisions of the Microsoft Privacy Statement.
22
- 4. SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):
23
- a) work around any technical limitations in the software that only allow you to use it in certain ways;
24
- b) reverse engineer, decompile, or disassemble the software, or attempt to do so, except and only to the extent permitted by licensing terms governing the use of open-source components that may be included with the software;
25
- c) remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;
26
- d) use the software in any way that is against the law or to create or propagate malware; or
27
- e) share, publish, distribute, or lend the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone hosted solution for others to use, or transfer the software or this agreement to any third party.
28
- 5. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit http://aka.ms/exporting.
29
- 6. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
30
- 7. UPDATES. The software may periodically check for updates, and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices.
31
- 8. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software.
32
- 9. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired the software in any other country, its laws apply. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court. If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court.
33
- 10. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
34
- a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
35
- b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
36
- c) Germany and Austria.
37
- i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
38
- ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
39
- Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
40
- 11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
41
- 12. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES.
42
- This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
43
- It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
44
- Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French.
45
- Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
46
- EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
47
- LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
48
- Cette limitation concerne:
49
- • tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et
50
- • les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
51
- Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
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
- */
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,o){"use strict";var h="default"in o?o.default:o,t="atlas.microsoft.com",e="atlas.microsoft.com",n="styling",r="2021-02-01",i="https://login.microsoftonline.com/",l="api-version",s="Authorization",a="Bearer ",c="{{azMapsDomain}}",p="{azMapsDomain}",d="{{azMapsView}}",f="view",_="{{azMapsLanguage}}",m="{{azMapsStylingPath}}",g="{{azMapsStylePath}}",y="styling",v="styles",b="2.0",w="Map-Agent",S="x-ms-client-id",x="Ms-Am-Request-Origin",E="MapControl",T="https://atlas.microsoft.com/",C="Session-Id",O=function(t,e){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function k(t,e){function n(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var I=function(){return(I=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function L(t,s,a,l){return new(a=a||Promise)(function(n,e){function o(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?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(o,r)}i((l=l.apply(t,s||[])).next())})}function A(n,o){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=o.call(n,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 P(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&o>=t.length?void 0:t)&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)s.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s}function N(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}var M=(D.prototype.merge=function(){for(var e,t,n,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];try{for(var i=P(o),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 D?this[l].merge(a[l]):this[l]=a[l]:(n=n||new(Object.getPrototypeOf(this).constructor),this[l]=n[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},D);function D(){}var z,B=(k(j,z=M),j);function j(){var t=null!==z&&z.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var F=(U.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)})},U.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){t=R(t,2);return t[0]+"="+t[1]}).join("&"),n=[],o=t.options.path||"";return U.protoRegEx.test(o)?n.push(o):(t.options.domain&&(U.protoRegEx.test(t.options.domain)||(n.push(t.options.protocol+"://"),n.push(t.options.subdomain?t.options.subdomain+".":"")),n.push(t.options.domain)),n.push(t.options.path?"/"+o:"")),n.push(e?"?"+e:""),n.join("")},U.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),U);function U(t){this.options=(new B).merge(t)}var q="2.1.11",G=(Z.getFullVersion=function(){return q},Z.getEndpointVersion=function(){var t=q.indexOf(".");return-1===(t=q.indexOf(".",t+1))?q:q.substring(0,t)},Z);function Z(){}function H(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 n=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 n.addEventListener?n.addEventListener("change",t):"function"==typeof n.addListener&&n.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 K(r,i,s){function t(t){var e=i.getBoundingClientRect(),n=r.getBoundingClientRect(),o=e.x+n.width>window.innerWidth?window.innerWidth-n.width:e.x,n=e.y+e.height+n.height+4>window.innerHeight?e.y-n.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",o-=e.x,n-=e.y),r.style.transform="translate("+o+"px, "+n+"px)"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t)}(Lt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",Lt.TopRight="top-right",Lt.BottomLeft="bottom-left",Lt.BottomRight="bottom-right",Lt.NonFixed="non-fixed";var W,V=(k(Y,W=M),Y);function Y(){var t=null!==W&&W.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}var Q=(J.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],n=0;n<t.length;n++){var o=t[n]/255;e[n]=o<=.03928?o/12.92:Math.pow((.055+o)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},J.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]]},J);function J(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])))}(Rt=u.ControlStyle||(u.ControlStyle={})).light="light",Rt.dark="dark",Rt.auto="auto";var X=Map,$=(tt.prototype._addEventListener=function(t,e,n){this.listeners.has(t)||this.listeners.set(t,new X),this.listeners.get(t).set(e,n)},tt.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},tt.prototype._invokeEvent=function(n,o){var r=this;this.listeners.has(n)&&this.listeners.get(n).forEach(function(t,e){t&&r._removeEventListener(n,e);try{e(o)}catch(t){console.error(t)}})},tt);function tt(){this.listeners=new X}var et,nt=Object.freeze({__proto__:null,EventEmitter:$}),ot=(k(rt,et=$),rt.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("styledata",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},rt.prototype.buildContainer=function(t,e,n,o){var r=this;return this._map=t,this._container=document.createElement(o||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof n&&this._container.setAttribute("aria-label",n),e.toLowerCase()===u.ControlStyle.auto?this._map.styles.definitions().then(function(t){r._map&&r._map.events.add("styledata",r._onStyleChange)}):this._container.classList.add(e),this._container},rt.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},rt.activateClickDelay=100,rt);function rt(){var e=null!==et&&et.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 Q(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}var it,st=(k(at,it=M),at);function at(){var t=null!==it&&it.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}var lt,ct=(k(ut,lt=ot),ut.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),t=H("Reset to Default Rotation");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),e&&ut.InvertOrderPositions.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(t),K(t,r)):(o.appendChild(r),o.appendChild(t),K(t,r),o.appendChild(i)),o},ut.prototype.constructRotationGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element");var o=this.constructRightRotationButton(t),r=this.constructLeftRotationButton(t),i=H("Rotate Left"),t=H("Rotate Right");return e&&ut.InvertOrderPositions.includes(e.position)?(n.appendChild(o),n.appendChild(t),K(t,o),n.appendChild(r),n.appendChild(i),K(i,r)):(n.appendChild(r),n.appendChild(i),K(i,r),n.appendChild(o),n.appendChild(t),K(t,o)),n},ut.prototype.constructRotationButton=function(e){var n=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 o=document.createElement("div");return t.appendChild(o),t.addEventListener("click",function(t){t.timeStamp-n.lastActiveTime>ot.activateClickDelay&&e.setCamera({bearing:ut.DefaultRotation},!0)}),e.events.add("rotate",function(t){o.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"}),t},ut.prototype.constructRightRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-right"),n.setAttribute("aria-label","Rotate Right"),n.setAttribute("alt","Rotate Right"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ut.RotationDuration,type:"ease"},!0)}),n},ut.prototype.constructLeftRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-left"),n.setAttribute("aria-label","Rotate Left"),n.setAttribute("alt","Rotate Left"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ut.RotationDuration,type:"ease"},!0)}),n},ut.DefaultRotation=0,ut.RotationDuration=100,ut.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],ut);function ut(t){var e=lt.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new st).merge(t),e}var ht,pt=(k(dt,ht=M),dt);function dt(){var t=null!==ht&&ht.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}var ft,mt=(k(gt,ft=ot),gt.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=H("Reset to Default Pitch");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),e&&gt.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(s),K(s,o)):(o.appendChild(r),o.appendChild(s),K(s,o),o.appendChild(i)),this.map=t,this.container=o,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),o},gt.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null),this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},gt.prototype.constructPitchGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t);var o=H("Increase Pitch"),t=H("Decrease Pitch");return e&&gt.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(this.pitchDecrementButton),n.appendChild(t),K(t,this.pitchDecrementButton),n.appendChild(this.pitchIncrementButton),n.appendChild(o),K(o,this.pitchIncrementButton)):(n.appendChild(this.pitchIncrementButton),n.appendChild(o),K(o,this.pitchIncrementButton),n.appendChild(this.pitchDecrementButton),n.appendChild(t),K(t,this.pitchDecrementButton)),n},gt.prototype.constructPitchButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch"),n.setAttribute("aria-label","Reset to Default Pitch"),n.setAttribute("alt","Reset to Default Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>ot.activateClickDelay&&t.setCamera({pitch:gt.DEFAULT_PITCH},!0)}),n},gt.prototype.constructPitchDecrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-down"),n.setAttribute("aria-label","Decrease Pitch"),n.setAttribute("alt","Decrease Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:gt.PITCH_DURATION_MS,type:"ease"},!0)}),n},gt.prototype.constructPitchIncrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-up"),n.setAttribute("aria-label","Increase Pitch"),n.setAttribute("alt","Increase Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:gt.PITCH_DURATION_MS,type:"ease"},!0)}),n},gt.PITCH_DURATION_MS=100,gt.DEFAULT_PITCH=0,gt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],gt);function gt(t){var n=ft.call(this)||this;return n.container=null,n.map=null,n.pitchIncrementButton=null,n.pitchDecrementButton=null,n.hasMouse=!1,n.hasFocus=!1,n.pitchChanged=function(t){return n.updatePitchButtonsState()},n.updatePitchButtonsState=function(){var t=n.map.getCamera().pitch<=0,e=60<=n.map.getCamera().pitch;n.options.inverted?(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=t&&(n.pitchIncrementButton.disabled=t),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=e&&(n.pitchDecrementButton.disabled=e)):(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=e&&(n.pitchIncrementButton.disabled=e),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=t&&(n.pitchDecrementButton.disabled=t))},n.options=(new pt).merge(t),n}var yt=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1},_t=Array.prototype.splice;var bt=function(t){var e=this.__data__;return!((t=vt(e,t))<0)&&(t==e.length-1?e.pop():_t.call(e,t,1),--this.size,!0)};var wt=function(t){var e=this.__data__;return(t=vt(e,t))<0?void 0:e[t][1]};var St=function(t){return-1<vt(this.__data__,t)};var xt=function(t,e){var n=this.__data__,o=vt(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Et(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=bt,Et.prototype.get=wt,Et.prototype.has=St,Et.prototype.set=xt;var Tt=Et;var Ct=function(){this.__data__=new Tt,this.size=0};var Ot=function(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t};var kt=function(t){return this.__data__.get(t)};var It=function(t){return this.__data__.has(t)},Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function At(t,e){return t(e={exports:{}},e.exports),e.exports}var Pt="object"==typeof Lt&&Lt&&Lt.Object===Object&&Lt,Rt="object"==typeof self&&self&&self.Object===Object&&self,Nt=Pt||Rt||Function("return this")(),bt=Nt.Symbol,wt=Object.prototype,Mt=wt.hasOwnProperty,Dt=wt.toString,zt=bt?bt.toStringTag:void 0;var Bt=function(t){var e=Mt.call(t,zt),n=t[zt];try{var o=!(t[zt]=void 0)}catch(t){}var r=Dt.call(t);return o&&(e?t[zt]=n:delete t[zt]),r},jt=Object.prototype.toString;var Ft=function(t){return jt.call(t)},Ut=bt?bt.toStringTag:void 0;var qt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(Ut&&Ut in Object(t)?Bt:Ft)(t)};var Gt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Zt=function(t){return!!Gt(t)&&("[object Function]"==(t=qt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},St=Nt["__core-js_shared__"],Ht=(xt=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+xt:"";var Kt=function(t){return!!Ht&&Ht in t},Wt=Function.prototype.toString;var Vt=function(t){if(null!=t){try{return Wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Yt=/^\[object .+?Constructor\]$/,Lt=Function.prototype,Rt=Object.prototype,wt=Lt.toString,St=Rt.hasOwnProperty,Qt=RegExp("^"+wt.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Jt=function(t){return!(!Gt(t)||Kt(t))&&(Zt(t)?Qt:Yt).test(Vt(t))};var Xt=function(t,e){return null==t?void 0:t[e]};var $t=function(t,e){return e=Xt(t,e),Jt(e)?e:void 0},te=$t(Nt,"Map"),ee=$t(Object,"create");var xt=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},ne=Object.prototype.hasOwnProperty;var Lt=function(t){var e=this.__data__;if(ee){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ne.call(e,t)?e[t]:void 0},oe=Object.prototype.hasOwnProperty;Rt=function(t){var e=this.__data__;return ee?void 0!==e[t]:oe.call(e,t)};wt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ee&&void 0===e?"__lodash_hash_undefined__":e,this};function re(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}re.prototype.clear=function(){this.__data__=ee?ee(null):{},this.size=0},re.prototype.delete=xt,re.prototype.get=Lt,re.prototype.has=Rt,re.prototype.set=wt;var ie=re;St=function(){this.size=0,this.__data__={hash:new ie,map:new(te||Tt),string:new ie}};var se=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ae=function(t,e){return t=t.__data__,se(e)?t["string"==typeof e?"string":"hash"]:t.map};xt=function(t){return t=ae(this,t).delete(t),this.size-=t?1:0,t};Lt=function(t){return ae(this,t).get(t)};Rt=function(t){return ae(this,t).has(t)};wt=function(t,e){var n=ae(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}le.prototype.clear=St,le.prototype.delete=xt,le.prototype.get=Lt,le.prototype.has=Rt,le.prototype.set=wt;var ce=le;Lt=function(t,e){var n=this.__data__;if(n instanceof Tt){var o=n.__data__;if(!te||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ce(o)}return n.set(t,e),this.size=n.size,this};function ue(t){t=this.__data__=new Tt(t);this.size=t.size}ue.prototype.clear=Ct,ue.prototype.delete=Ot,ue.prototype.get=kt,ue.prototype.has=It,ue.prototype.set=Lt;var he=ue;var pe=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t},de=function(){try{var t=$t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var fe=function(t,e,n){"__proto__"==e&&de?de(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},me=Object.prototype.hasOwnProperty;var ge=function(t,e,n){var o=t[e];me.call(t,e)&&yt(o,n)&&(void 0!==n||e in t)||fe(t,e,n)};var ye=function(t,e,n,o){var r=!n;n=n||{};for(var i=-1,s=e.length;++i<s;){var a=e[i],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),(r?fe:ge)(n,a,l)}return n};var ve=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o};var _e=function(t){return null!=t&&"object"==typeof t};var Rt=function(t){return _e(t)&&"[object Arguments]"==qt(t)},wt=Object.prototype,be=wt.hasOwnProperty,we=wt.propertyIsEnumerable,Se=Rt(function(){return arguments}())?Rt:function(t){return _e(t)&&be.call(t,"callee")&&!we.call(t,"callee")},xe=Array.isArray;function Ee(){return!1}var Te=At(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Nt.Buffer:void 0,n=n?n.isBuffer:void 0;t.exports=n||Ee}),Ce=/^(?:0|[1-9]\d*)$/;var Oe=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ce.test(t))&&-1<t&&t%1==0&&t<e};var ke=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},Ie={};Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Arguments]"]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object Boolean]"]=Ie["[object DataView]"]=Ie["[object Date]"]=Ie["[object Error]"]=Ie["[object Function]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie["[object Object]"]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object WeakMap]"]=!1;Ct=function(t){return _e(t)&&ke(t.length)&&!!Ie[qt(t)]};var Ot=function(e){return function(t){return e(t)}},kt=At(function(t,e){var e=e&&!e.nodeType&&e,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&Pt.process,e=function(){try{var t=n&&n.require&&n.require("util").types;return t?t:o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=e}),It=kt&&kt.isTypedArray,Le=It?Ot(It):Ct,Ae=Object.prototype.hasOwnProperty;var Pe=function(t,e){var n,o=xe(t),r=!o&&Se(t),i=!o&&!r&&Te(t),s=!o&&!r&&!i&&Le(t),a=o||r||i||s,l=a?ve(t.length,String):[],c=l.length;for(n in t)!e&&!Ae.call(t,n)||a&&("length"==n||i&&("offset"==n||"parent"==n)||s&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||Oe(n,c))||l.push(n);return l},Re=Object.prototype;var Ne=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Re)};var Lt=function(e,n){return function(t){return e(n(t))}},Me=Lt(Object.keys,Object),De=Object.prototype.hasOwnProperty;var ze=function(t){if(!Ne(t))return Me(t);var e,n=[];for(e in Object(t))De.call(t,e)&&"constructor"!=e&&n.push(e);return n};var Be=function(t){return null!=t&&ke(t.length)&&!Zt(t)};var je=function(t){return(Be(t)?Pe:ze)(t)};var Fe=function(t,e){return t&&ye(e,je(e),t)};var Ue=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},qe=Object.prototype.hasOwnProperty;var Ge=function(t){if(!Gt(t))return Ue(t);var e,n=Ne(t),o=[];for(e in t)("constructor"!=e||!n&&qe.call(t,e))&&o.push(e);return o};var Ze=function(t){return Be(t)?Pe(t,!0):Ge(t)};var He=function(t,e){return t&&ye(e,Ze(e),t)},Ke=At(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Nt.Buffer:void 0,o=n?n.allocUnsafe:void 0;t.exports=function(t,e){return e?t.slice():(e=t.length,e=o?o(e):new t.constructor(e),t.copy(e),e)}});var We=function(t,e){var n=-1,o=t.length;for(e=e||Array(o);++n<o;)e[n]=t[n];return e};var Ve=function(t,e){for(var n=-1,o=null==t?0:t.length,r=0,i=[];++n<o;){var s=t[n];e(s,n,t)&&(i[r++]=s)}return i};var wt=function(){return[]},Ye=Object.prototype.propertyIsEnumerable,Qe=Object.getOwnPropertySymbols,Je=Qe?function(e){return null==e?[]:(e=Object(e),Ve(Qe(e),function(t){return Ye.call(e,t)}))}:wt;var Xe=function(t,e){return ye(t,Je(t),e)};var $e=function(t,e){for(var n=-1,o=e.length,r=t.length;++n<o;)t[r+n]=e[n];return t},tn=Lt(Object.getPrototypeOf,Object),en=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)$e(e,Je(t)),t=tn(t);return e}:wt;var nn=function(t,e){return ye(t,en(t),e)};var on=function(t,e,n){return e=e(t),xe(t)?e:$e(e,n(t))};var rn=function(t){return on(t,je,Je)};function sn(t){return on(t,Ze,en)}var Rt=$t(Nt,"DataView"),It=$t(Nt,"Promise"),Ct=$t(Nt,"Set"),Lt=$t(Nt,"WeakMap"),an="[object Map]",ln="[object Promise]",cn="[object Set]",un="[object WeakMap]",hn="[object DataView]",pn=Vt(Rt),dn=Vt(te),fn=Vt(It),mn=Vt(Ct),gn=Vt(Lt),wt=qt,yn=wt=Rt&&wt(new Rt(new ArrayBuffer(1)))!=hn||te&&wt(new te)!=an||It&&wt(It.resolve())!=ln||Ct&&wt(new Ct)!=cn||Lt&&wt(new Lt)!=un?function(t){var e=qt(t),t="[object Object]"==e?t.constructor:void 0,t=t?Vt(t):"";if(t)switch(t){case pn:return hn;case dn:return an;case fn:return ln;case mn:return cn;case gn:return un}return e}:wt,vn=Object.prototype.hasOwnProperty;var _n=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&vn.call(t,"index")&&(n.index=t.index,n.input=t.input),n},bn=Nt.Uint8Array;var wn=function(t){var e=new t.constructor(t.byteLength);return new bn(e).set(new bn(t)),e};var Sn=function(t,e){return e=e?wn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},xn=/\w*$/;var En=function(t){var e=new t.constructor(t.source,xn.exec(t));return e.lastIndex=t.lastIndex,e},Rt=bt?bt.prototype:void 0,Tn=Rt?Rt.valueOf:void 0;var Cn=function(t){return Tn?Object(Tn.call(t)):{}};var On=function(t,e){return e=e?wn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)};var kn=function(t,e,n){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return wn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return Sn(t,n);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 On(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return En(t);case"[object Set]":return new o;case"[object Symbol]":return Cn(t)}},In=Object.create;function Ln(){}var An=function(t){if(!Gt(t))return{};if(In)return In(t);Ln.prototype=t;t=new Ln;return Ln.prototype=void 0,t};var Pn=function(t){return"function"!=typeof t.constructor||Ne(t)?{}:An(tn(t))};var It=function(t){return _e(t)&&"[object Map]"==yn(t)},Ct=kt&&kt.isMap,Rn=Ct?Ot(Ct):It;var Lt=function(t){return _e(t)&&"[object Set]"==yn(t)},wt=kt&&kt.isSet,Nn=wt?Ot(wt):Lt,Mn="[object Arguments]",Dn="[object Function]",zn="[object Object]",Bn={};Bn[Mn]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn[zn]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=!0,Bn["[object Error]"]=Bn[Dn]=Bn["[object WeakMap]"]=!1;var jn=function n(o,r,i,t,e,s){var a,l=1&r,c=2&r,u=4&r;if(void 0!==(a=i?e?i(o,t,e,s):i(o):a))return a;if(!Gt(o))return o;var h=xe(o);if(h){if(a=_n(o),!l)return We(o,a)}else{var p=yn(o),t=p==Dn||"[object GeneratorFunction]"==p;if(Te(o))return Ke(o,l);if(p==zn||p==Mn||t&&!e){if(a=c||t?{}:Pn(o),!l)return c?nn(o,He(a,o)):Xe(o,Fe(a,o))}else{if(!Bn[p])return e?o:{};a=kn(o,p,l)}}l=(s=s||new he).get(o);if(l)return l;s.set(o,a),Nn(o)?o.forEach(function(t){a.add(n(t,r,i,t,o,s))}):Rn(o)&&o.forEach(function(t,e){a.set(e,n(t,r,i,e,o,s))});var c=u?c?sn:rn:c?keysIn:je,d=h?void 0:c(o);return pe(d||o,function(t,e){d&&(t=o[e=t]),ge(a,e,n(t,r,i,e,o,s))}),a};var Fn=function(t){return jn(t,5)};var Un=function(t,e,n){(void 0===n||yt(t[e],n))&&(void 0!==n||e in t)||fe(t,e,n)};var qn=function(l){return function(t,e,n){for(var o=-1,r=Object(t),i=n(t),s=i.length;s--;){var a=i[l?s:++o];if(!1===e(r[a],a,r))break}return t}}();var Gn=function(t){return _e(t)&&Be(t)},Rt=Function.prototype,Ct=Object.prototype,Zn=Rt.toString,Hn=Ct.hasOwnProperty,Kn=Zn.call(Object);var Wn=function(t){return!(!_e(t)||"[object Object]"!=qt(t))&&(null===(t=tn(t))||"function"==typeof(t=Hn.call(t,"constructor")&&t.constructor)&&t instanceof t&&Zn.call(t)==Kn)};var Vn=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Yn=function(t){return ye(t,Ze(t))};var Qn=function(t,e,n,o,r,i,s){var a,l,c,u=Vn(t,n),h=Vn(e,n),p=s.get(h);p?Un(t,n,p):((a=void 0===(c=i?i(u,h,n+"",t,e,s):void 0))&&(p=!(l=xe(h))&&Te(h),e=!l&&!p&&Le(h),c=h,l||p||e?c=xe(u)?u:Gn(u)?We(u):p?Ke(h,!(a=!1)):e?On(h,!(a=!1)):[]:Wn(h)||Se(h)?Se(c=u)?c=Yn(u):Gt(u)&&!Zt(u)||(c=Pn(h)):a=!1),a&&(s.set(h,c),r(c,h,o,i,s),s.delete(h)),Un(t,n,c))};var Jn=function o(r,i,s,a,l){r!==i&&qn(i,function(t,e){var n;l=l||new he,Gt(t)?Qn(r,i,e,s,o,a,l):(n=a?a(Vn(r,e),t,e+"",r,i,l):void 0,Un(r,e,n=void 0===n?t:n))},Ze)};function Xn(t){return t}var $n=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},to=Math.max;var eo=function(i,s,a){return s=to(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,n=to(t.length-s,0),o=Array(n);++e<n;)o[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(o),$n(i,this,r)}};var no=function(t){return function(){return t}},oo=Date.now;var ro=function(n){var o=0,r=0;return function(){var t=oo(),e=16-(t-r);if(r=t,0<e){if(800<=++o)return arguments[0]}else o=0;return n.apply(void 0,arguments)}}(de?function(t,e){return de(t,"toString",{configurable:!0,enumerable:!1,value:no(e),writable:!0})}:Xn);var io=function(t,e){return ro(eo(t,e,Xn),t+"")};var so=function(t,e,n){if(!Gt(n))return!1;var o=typeof e;return!!("number"==o?Be(n)&&Oe(e,n.length):"string"==o&&e in n)&&yt(n[e],t)};var ao,lo=function(a){return io(function(t,e){var n=-1,o=e.length,r=1<o?e[o-1]:void 0,i=2<o?e[2]:void 0,r=3<a.length&&"function"==typeof r?(o--,r):void 0;for(i&&so(e[0],e[1],i)&&(r=o<3?void 0:r,o=1),t=Object(t);++n<o;){var s=e[n];s&&a(t,s,n,r)}return t})}(function(t,e,n){Jn(t,e,n)}),co=(k(uo,ao=M),uo);function uo(){var t=null!==ao&&ao.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.theme=void 0,t}var ho,It=(k(po,ho=ot),po.prototype.onAdd=function(t,e){var n=this;this.map=t;var o=this.buildContainer(t,this.options.style,"Map Style Control"),r=this.buildStyleOpsGrid();this.styleOpsGrid=r;var i=this.buildCurrStyleBtn(),t=H("Select Style");return r.classList.add(e&&e.position||"top-right"),o.addEventListener("mouseover",function(){n.hasMouse=!0,o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(){n.hasFocus=!0,o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),o.classList.contains(po.Css.inUse)&&(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")))}),i.addEventListener("click",function(t){o.classList.contains(po.Css.inUse)?(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")):(o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&po.InvertOrderPositions.includes(e.position)?(o.appendChild(r),o.appendChild(i),o.appendChild(t),K(t,i)):(o.appendChild(i),o.appendChild(t),K(t,i),o.appendChild(r)),o},po.prototype.onRemove=function(){ho.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.map.events.remove("styledata",this.onStyleChange),this.map.events.remove("stylesetchanged",this.onStylesetChange)},po.prototype.setSelectedStyle=function(e){var n,t,o=this;this.styleIcons.has(e)&&(n=this.currStyleImage,t=this.styleIcons.get(e),n.src!==t&&(n.src=t),this.map.styles.definitions().then(function(t){t=o.mapToFriendlyStyleName(e,t);n.alt!==t&&(n.alt=t),n.parentElement.lastChild instanceof Text&&(n.parentElement.lastChild.textContent=t)}))},po.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},po.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},po.prototype.buildSelectStyleBtn=function(n,t,e){var o=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(n,t);r.setAttribute("alt",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,n===o.map.getStyle().style&&(o.currStyleImage.src=t,o.currStyleImage.alt=i,o.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?o.currStyleImage.parentElement.lastChild.textContent=i:o.currStyleImage.parentElement.appendChild(document.createTextNode(i))),o.styleIcons.set(n,t)}),"icons"===this.options.layout&&(s.alt=i),r.appendChild(s),"icons"===this.options.layout?r.classList.add(po.Css.button):(r.classList.add(po.Css.listButton),r.classList.add(po.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){o.hasMouse=!1,o.hasFocus=!1;var t=o.styleButtons[n];t&&!t.hasAttribute("disabled")&&(o._invokeEvent("styleselected",n),o.options.autoSelectionMode&&o.map.setStyle({style:n}),Object.entries(o.styleButtons).forEach(function(t){var e=R(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}))});e=document.createElement("div");return e.classList.add("selected-icon"),r.appendChild(e),r},po.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button");"icons"==this.options.layout?t.classList.add(po.Css.button):t.classList.add(po.Css.listButton),t.classList.add(po.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("alt","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},po.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(po.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(po.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return L(t,void 0,void 0,function(){return A(this,function(t){return this.onStylesetChange(e),this.map.events.add("styledata",this.onStyleChange),[2]})})}),this.map.events.add("stylesetchanged",this.onStylesetChange),e},po.prototype.populateOpsGridFromDefinitions=function(o){var t,r=this;this.styleOpsGrid&&(t=o.styles,Array.isArray(this.options.mapStyles)&&(t=t.filter(function(t){return r.options.mapStyles.includes(t.name.split("_indoor")[0])})),(t=this.options.theme?t.filter(function(t){return t.theme===r.options.theme}):t).forEach(function(t){var e={url:t.thumbnail};t.thumbnail&&r.map.styles._transformStyleRequest(t.thumbnail,e);var n=r.map.getServiceOptions();n.transformRequest&&lo(e,n.transformRequest(e.url,"Thumbnail"));e=fetch(e.url,{headers:e.headers}),e=r.buildSelectStyleBtn(t.name,o,e);r.styleOpsGrid.appendChild(e),r.styleButtons[t.name]=e,"icons"===r.options.layout&&(t=H(r.mapToFriendlyStyleName(t.name,o)),r.styleOpsGrid.appendChild(t),K(t,e))}),Object.entries(this.styleButtons).forEach(function(t){var e=R(t,2),t=e[0];return e[1].setAttribute("aria-current",t===r.map.getStyle().style?"true":"false")}))},po.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],po.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"},po);function po(t){var e=ho.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new X,e.styleIcons=new X,e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onStylesetChange=function(t){e.styleOpsGrid&&(Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.styles.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new co).merge(Fn(t)),e}var fo,mo=(k(go,fo=M),go);function go(){var t=null!==fo&&fo.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var yo,vo=(k(_o,yo=mo),_o);function _o(){var t=null!==yo&&yo.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}var bo,wo=(k(So,bo=ot),Object.defineProperty(So.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}),So.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=H("Toggle Traffic Display");return this.container.appendChild(t),K(t,e),this.container},So.prototype.onRemove=function(){this.map=null},So.prototype.getOptions=function(){return(new vo).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},So.prototype.updateButtonState=function(){this.isActive?this.container.classList.add("in-use"):this.container.classList.remove("in-use"),this.trafficButton&&this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false")},So.prototype.constructTrafficButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("traffic"),n.setAttribute("aria-label","Toggle Traffic Display"),n.setAttribute("alt","Toggle Traffic Display"),n.setAttribute("type","button"),this.trafficButton=n,this.updateButtonState(),n.addEventListener("click",function(){e.isActive=!e.isActive}),n},So);function So(t){var e=bo.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new mo).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 xo,kt=(k(Eo,xo=ot),Eo.prototype.onAdd=function(t){var e=this.buildContainer(t,u.ControlStyle.auto,"Traffic Legend"),t=this.buildTrafficLegendDiv(t);return e.appendChild(t),e},Eo.prototype.buildTrafficLegendDiv=function(e){var n,t,o,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=H("Traffic");l.classList.add("traffic-legend-title"),l.colSpan=6,a.appendChild(l),a.appendChild(c),K(c,l),s.appendChild(a);var u=document.createElement("tr");try{for(var h=P(this.table),p=h.next();!p.done;p=h.next()){var d=p.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=(o=void 0,P(d)),g=m.next();!g.done;g=m.next()){var y=g.value,v=document.createElement("div");v.classList.add(y),f.appendChild(v)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(o)throw o.error}}}u.appendChild(f);var _=H(d instanceof Array?"Traffic Legend":d);u.appendChild(_),K(_,f)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(t=h.return)&&t.call(h)}finally{if(n)throw n.error}}return s.appendChild(u),i.appendChild(s),e.events.add("styledata",function(t){"style"===t.dataType&&((t=e.getTraffic()).flow&&"none"!==t.flow?i.classList.remove("hidden"):i.classList.add("hidden"))}),i},Eo);function Eo(){var t=xo.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t}Ot=function(t){return this.__data__.has(t)};function To(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ce;++e<n;)this.add(t[e])}To.prototype.add=To.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},To.prototype.has=Ot;var Co=To;var Oo=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1};var ko=function(t,e){return t.has(e)};var Io=function(t,e,n,o,r,i){var s=1&n,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,h=2&n?new Co:void 0;for(i.set(t,e),i.set(e,t);++c<a;){var p,d=t[c],f=e[c];if(void 0!==(p=o?s?o(f,d,c,e,t,i):o(d,f,c,t,e,i):p)){if(p)continue;u=!1;break}if(h){if(!Oo(e,function(t,e){if(!ko(h,e)&&(d===t||r(d,t,n,o,i)))return h.push(e)})){u=!1;break}}else if(d!==f&&!r(d,f,n,o,i)){u=!1;break}}return i.delete(t),i.delete(e),u};function Lo(t){var n=-1,o=Array(t.size);return t.forEach(function(t,e){o[++n]=[e,t]}),o}function Ao(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var wt=bt?bt.prototype:void 0,Po=wt?wt.valueOf:void 0;var Ro=function(t,e,n,o,r,i,s){switch(n){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 bn(t),new bn(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return yt(+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=Lo;case"[object Set]":a=a||Ao;if(t.size!=e.size&&!(1&o))return!1;var l=s.get(t);if(l)return l==e;o|=2,s.set(t,e);a=Io(a(t),a(e),o,r,i,s);return s.delete(t),a;case"[object Symbol]":if(Po)return Po.call(t)==Po.call(e)}return!1},No=Object.prototype.hasOwnProperty;var Mo=function(t,e,n,o,r,i){var s=1&n,a=rn(t),l=a.length;if(l!=rn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:No.call(e,u)))return!1}var h=i.get(t);if(h&&i.get(e))return h==e;var p=!0;i.set(t,e),i.set(e,t);for(var d,f=s;++c<l;){var m,g=t[u=a[c]],y=e[u];if(!(void 0===(m=o?s?o(y,g,u,e,t,i):o(g,y,u,t,e,i):m)?g===y||r(g,y,n,o,i):m)){p=!1;break}f=f||"constructor"==u}return!p||f||(d=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof h&&h instanceof h)&&(p=!1),i.delete(t),i.delete(e),p},Do="[object Arguments]",zo="[object Array]",Bo="[object Object]",jo=Object.prototype.hasOwnProperty;var Fo=function(t,e,n,o,r,i){var s=xe(t),a=xe(e),l=s?zo:yn(t),c=a?zo:yn(e),u=(l=l==Do?Bo:l)==Bo,a=(c=c==Do?Bo:c)==Bo;if((c=l==c)&&Te(t)){if(!Te(e))return!1;u=!(s=!0)}if(c&&!u)return i=i||new he,s||Le(t)?Io(t,e,n,o,r,i):Ro(t,e,l,n,o,r,i);if(!(1&n)){u=u&&jo.call(t,"__wrapped__"),a=a&&jo.call(e,"__wrapped__");if(u||a)return r(u?t.value():t,a?e.value():e,n,o,i=i||new he)}return!!c&&(i=i||new he,Mo(t,e,n,o,r,i))};var Uo=function t(e,n,o,r,i){return e===n||(null==e||null==n||!_e(e)&&!_e(n)?e!=e&&n!=n:Fo(e,n,o,r,t,i))};var qo,Go=function(t,e){return Uo(t,e)},Zo=(qo=Object.freeze({__proto__:null,default:{}}))&&qo.default||qo,Ho=At(function(a){!function(){for(var e,n,o=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<o+t)&&(o=0,e=s.randomBytes(s.BUFFER_SIZE)),e.slice(o,o+=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,o=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?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||Zo,(a.exports=s).randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return n.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return n.getRandomValues(t),t}}return function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(256*Math.random()));return e}}()}()}),Ko=(Wo.TYPE="Feature",Wo);function Wo(t,e,n,o){this.type="Feature",this.type=Wo.TYPE,this.properties=e||{},this.id=n,this.geometry=t,this.bbox=o}var Vo,Yo=(k(Qo,Vo=Array),Qo.fromData=function(n){var o=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(n).forEach(function(t){var e=t.toLowerCase();isNaN(o)&&i.has(e)&&"number"==typeof n[t]?o=n[t]:isNaN(r)&&s.has(e)&&"number"==typeof n[t]&&(r=n[t])}),isNaN(o)||isNaN(r)?null:new Qo(o,r)},Qo.getX=function(t){return 0<t.length?t[0]:NaN},Qo.getY=function(t){return 1<t.length?t[1]:NaN},Qo.getDestination=function(t,e,n){return new Qo(Qo.getX(t)+n*Math.cos((e+270)*Math.PI/180),Qo.getY(t)+n*Math.sin((e+270)*Math.PI/180))},Qo.getDistance=function(t,e){var n=Qo.getX(t)-Qo.getX(e),e=Qo.getY(t)-Qo.getY(e);return Math.sqrt(n*n+e*e)},Qo.getHeading=function(t,e){var n=Qo.getX(e)-Qo.getX(t),e=Qo.getY(t)-Qo.getY(e);return 180*(2.5*Math.PI-Math.atan2(e,n))/Math.PI%360},Qo);function Qo(t,e){return Vo.call(this,t,e)||this}var Jo=(Xo.TYPE="Point",Xo);function Xo(t){this.type="Point",this.type=Xo.TYPE,this.coordinates=t}var $o,tr,er,nr,or,rr=6378137,ir=Math.PI/180,sr=180/Math.PI,ar=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],lr=85.0511;function cr(t){return t*ir}function ur(t){return t*sr}function hr(t,e,n){return Math.min(Math.max(t,e),n)}function pr(t,e){var n=cr(e[1]-t[1]),o=cr(e[0]-t[0]),o=Math.pow(Math.sin(n/2),2)+Math.cos(cr(t[1]))*Math.cos(cr(e[1]))*Math.pow(Math.sin(o/2),2),o=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return Math.round(rr*o*100)/100}function dr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return tr.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return tr.kilometers;case"miles":case"mile":case"mi":return tr.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return tr.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return tr.yards;default:return tr.meters}return tr.meters}function fr(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return or.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return or.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return or.knotsPerSecond;case"standardgravity":case"g":return or.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return or.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return or.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return or.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return or.kilometersPerHourSecond;default:return or.metersPerSecondSquared}return or.metersPerSecondSquared}function mr(t){if(t)switch(t){case"acres":case"ac":return $o.acres;case"hectares":case"ha":return $o.hectares;case"squareFeet":case"ft^2":case"ft2":return $o.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return $o.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return $o.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return $o.squareMiles;default:return $o.squareMeters}return $o.squareMeters}function gr(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return nr.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return nr.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return nr.knots;case"mach":case"m":return nr.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return nr.kilometersPerHour;default:return nr.metersPerSecond}return nr.metersPerSecond}function yr(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return er.ms;case"minutes":case"minute":case"mins":case"min":return er.minutes;case"hours":case"hour":case"hr":case"h":return er.hours;case"days":case"day":case"d":return er.days;default:return er.seconds}return er.seconds}function vr(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(_r(t[0])),n=1,o=t.length;n<o;n++)e-=Math.abs(_r(t[n]));return e}function _r(t){var e=0;if(3<=t.length){for(var n=void 0,o=void 0,r=0,i=t.length;r<i;r++)e+=(cr(t[r===i-2?(n=i-2,o=i-1,0):r===i-1?(n=i-1,o=0,1):(o=(n=r)+1,r+2)][0])-cr(t[n][0]))*Math.sin(cr(t[o][1]));e=e*rr*rr/2}return e}function br(t,e,n){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function wr(t,e,n){if(2<=n.length){for(var o,r,i=1/0,s=null,a=Fr(n,22),l=0,c=a.length-1;l<c;l++)r=function(t,e,n){if(e[0]===n[0]&&e[1]===n[1])return e;var o=t[0]-e[0],r=t[1]-e[1],i=n[0]-e[0],t=n[1]-e[1],r=(i*o+t*r)/(i*i+t*t);return r<0?e:1<r?n:[e[0]+i*r,e[1]+t*r]}(e,a[l],a[l+1]),(o=Yo.getDistance(e,r))<i&&(i=o,s=r);if(s){var u=jr([s],22)[0];return new Ko(new Jo(u),{distance:Tr(t,u)})}}else if(1===n.length)return new Ko(new Jo(n[0]),{distance:Tr(t,n[0])});return null}function Sr(t,e){var n;return!isNaN(t)&&"number"==typeof e&&0<=e&&(n=void 0,n=e<ar.length?ar[e]:Math.pow(10,e),t=Math.round(t*n)/n),t}function xr(t,e,n,o){switch(dr(e)){case tr.meters:t/=1e3;break;case tr.feet:t/=3280.8399;break;case tr.miles:t/=.62137119;break;case tr.yards:t/=1093.6133;break;case tr.nauticalMiles:t/=.5399568;break;case tr.kilometers:}switch(dr(n)){case tr.meters:t*=1e3;break;case tr.feet:t*=3280.8399;break;case tr.miles:t*=.62137119;break;case tr.yards:t*=1093.6133;break;case tr.nauticalMiles:t*=.5399568;break;case tr.kilometers:}return"number"==typeof o&&0<=o&&(o=Math.pow(10,o),t=Math.round(t*o)/o),t}function Er(t,e,n,o){o=o||"meters",t=Qr(t);var r=Cr(o),o=cr(t[1]),t=cr(t[0]),e=e*ir,n=n/r,r=Math.asin(Math.sin(o)*Math.cos(n)+Math.cos(o)*Math.sin(n)*Math.cos(e)),o=t+Math.atan2(Math.sin(e)*Math.sin(n)*Math.cos(o),Math.cos(n)-Math.sin(o)*Math.sin(r)),r=hr(Dr(r*sr),-85,85);return[zr(o*sr),r]}function Tr(t,e,n){e=pr(t=Qr(t),e=Qr(e));return"meters"===n?e:xr(e,"meters",n||"meters")}function Cr(t){t=dr(t);return xr(rr,tr.meters,t)}function Or(t,e,n){for(var o=[],r=cr(t[1]),i=cr(t[0]),s=cr(e[1]),a=cr(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<=n;c++){var u=c/n,h=Math.sin((1-u)*l)/Math.sin(l),p=Math.sin(u*l)/Math.sin(l),d=h*Math.cos(r)*Math.cos(i)+p*Math.cos(s)*Math.cos(a),u=h*Math.cos(r)*Math.sin(i)+p*Math.cos(s)*Math.sin(a),p=h*Math.sin(r)+p*Math.sin(s),p=Math.atan2(p,Math.sqrt(Math.pow(d,2)+Math.pow(u,2))),d=Math.atan2(u,d),p=hr(p*sr,-85,85);d*=sr,o.push([d,p])}return o}function kr(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var n=0<t.length?t[t.length-1]:null;return n&&180<Math.abs(e[0]-n[0])?(n=n[0]<0?e[0]-360:e[0]+360,t.push([n,e[1]])):t.push(e),t},[])}function Ir(t){for(var e,n,o,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=(o=R(s[c],2))[0],n=o[1],i=(r=R(s[c+1],2))[0],o=r[1],180<Math.abs(i-e)&&(r=0<e?180:-180,i=Math.abs((0<e?i+360:i-360)-e),i=n+(o-n)*(Math.abs(r-e)/i),a.push([r,i]),l.push(a),a=[[-r,i]]));return l.push(a),l}function Lr(t,e){if(t=Qr(t),e=Qr(e),t&&2<=t.length&&e&&2<=e.length){var n=cr(t[1]),o=cr(e[1]),e=cr(e[0]-t[0]),t=Math.sin(e)*Math.cos(o),e=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(e);return(ur(Math.atan2(t,e))+360)%360}return NaN}function Ar(t,e){var n,o=0;Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var r=0,i=n.length-1;r<i;r++)o+=pr(n[r],n[r+1]);return xr(o,"meters",e||"meters")}function Pr(t,e,n){n=n||"meters";var o,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+(o=Tr(r[a-1],r[a],n))){var l=Lr(r[a-1],r[a]);return Er(r[a-1],l,e-i,n)}i+=o}return i<=e?r[s-1]:r[0]}return null}function Rr(t,e,n,o,r){o=o||"meters",r=r||0,t=Qr(t);for(var i=[],s=360/n,a=0;a<=n;a++)i.push(Er(t,(a*s+r)%360,e,o));return i}function Nr(t,e,n,o,r){return kr(Rr(t,e,n,o,r))}function Mr(t,e,n){n=void 0===n?.5:n;var o=Tr(t=Qr(t),e=Qr(e),"kilometers");return Er(t,Lr(t,e),o*n,"kilometers")}function Dr(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 zr(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Br(t,e,n){if(0===n)return Object.assign({},t);e=Qr(e);for(var o,r,i=[],s=0,a=t.length;s<a;s++)o=Tr(e,t[s]),r=Lr(e,t[s]),i.push(Er(e,r+n,o));return i}function jr(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=t[s][0]/r-.5,o=.5-t[s][1]/r,i.push([360*n,90-360*Math.atan(Math.exp(2*-o*Math.PI))/Math.PI]);return i}function Fr(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=Math.sin(t[s][1]*Math.PI/180),n=(t[s][0]+180)/360,o=.5-Math.log((1+o)/(1-o))/(4*Math.PI),i.push([Math.round(n*r),Math.round(o*r)]);return i}function Ur(t,e,n,o){switch(fr(e)){case or.kilometersPerHourSecond:t/=3.6;break;case or.milesPerHourSecond:t/=2.236936292054;break;case or.knotsPerSecond:t/=1.943844492441;break;case or.standardGravity:t/=.1019716212978;break;case or.kilometersPerSecondSquared:t/=.001;break;case or.milesPerSecondSquared:t/=.000621371192;break;case or.feetPerSecondSquared:t/=3.280839895012;break;case or.yardsPerSecondSquared:t/=1.093613298338;break;case or.metersPerSecondSquared:}switch(fr(n)){case or.kilometersPerHourSecond:t*=3.6;break;case or.milesPerHourSecond:t*=2.236936292054;break;case or.knotsPerSecond:t*=1.943844492441;break;case or.standardGravity:t*=.1019716212978;break;case or.kilometersPerSecondSquared:t*=.001;break;case or.milesPerSecondSquared:t*=.000621371192;break;case or.feetPerSecondSquared:t*=3.280839895012;break;case or.yardsPerSecondSquared:t*=1.093613298338;break;case or.metersPerSecondSquared:}return Sr(t,o)}function qr(t,e,n,o){switch(mr(e)){case $o.acres:t*=4046.8564224;break;case $o.hectares:t*=1e4;break;case $o.squareFeet:t*=.09290304;break;case $o.squareKilometers:t*=1e6;break;case $o.squareMiles:t*=259e4;break;case $o.squareYards:t*=.83612736;break;case $o.squareMeters:}switch(mr(n)){case $o.acres:t/=4046.8564224;break;case $o.hectares:t/=1e4;break;case $o.squareFeet:t/=.09290304;break;case $o.squareKilometers:t/=1e6;break;case $o.squareMiles:t/=259e4;break;case $o.squareYards:t/=.83612736;break;case $o.squareMeters:}return Sr(t,o)}function Gr(t,e,n,o){switch(gr(e)){case nr.feetPerSecond:t*=1.09728;break;case nr.milesPerHour:t*=1.6093;break;case nr.knots:t*=1.852;break;case nr.metersPerSecond:t*=3.6;break;case nr.mach:t*=1234.8;break;case nr.kilometersPerHour:}switch(gr(n)){case nr.feetPerSecond:t/=1.09728;break;case nr.milesPerHour:t/=1.6093;break;case nr.knots:t/=1.852;break;case nr.metersPerSecond:t/=3.6;break;case nr.mach:t/=1234.8;break;case nr.kilometersPerHour:}return Sr(t,o)}function Zr(t,e,n,o){switch(yr(e)){case er.ms:t/=1e3;break;case er.hours:t*=3600;break;case er.minutes:t*=60;break;case er.days:t*=86400;break;case er.seconds:}switch(yr(n)){case er.ms:t*=1e3;break;case er.hours:t/=3600;break;case er.minutes:t/=60;break;case er.days:t/=86400;break;case er.seconds:}return Sr(t,o)}function Hr(t,e,n,o,r,i,s,a){r=xr(e,r,tr.meters),i=Zr(n,i,er.seconds);return Ur(2*(r-Gr(t,o,nr.metersPerSecond)*i)/(i*i),or.metersPerSecondSquared,s,a)}function Kr(t,e,n,o,r,i,s){t=Gr(t,o,nr.metersPerSecond);return Ur((Gr(e,o,nr.metersPerSecond)-t)/Zr(n,r,er.seconds),or.metersPerSecondSquared,i,s)}function Wr(t,e,n,o){t=Vr(t),e=Vr(e);return null!=t&&null!=e?Zr(e.getTime()-t.getTime(),er.ms,n,o):NaN}function Vr(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 Yr(t){var e=[],n=null,o=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(Yr(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":n=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":n=t.coordinates;break;case"MultiPolygon":o=t.coordinates;break;case"Feature":var s=t,e=ii._isCircle(s)?ii._getCirclePositions(s):Yr(s.geometry);break;case"FeatureCollection":e=Yr(t.features);break;case"GeometryCollection":e=Yr(t.geometries)}else if(t instanceof ii)return Yr(t.toJson());if(n)for(r=n.length,i=0;i<r;i++)e=e.concat(n[i]);else if(o)for(var a=o.length,i=0;i<a;i++)for(var l=o[i].length,c=0;c<l;c++)e=e.concat(o[i][c]);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 ii&&"Point"===t.getType())return t.getCoordinates();return null}function Jr(t,e,n){n=n||"meters";var o,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+(o=Tr(r[a-1],r[a],n))){var l=Lr(r[a-1],r[a]),c=Er(r[a-1],l,e-i,n);return new Ko(new Jo(c),{heading:l})}i+=o}return i<=e?new Ko(new Jo(r[s-1]),{heading:Lr(r[s-2],r[s-1])}):new Ko(new Jo(r[0]),{heading:Lr(r[0],r[1])})}return null}function Xr(t,e,n,o){var r=Qr(t),i=Fr([r],22)[0],s=null,a=1/0;switch((e=e instanceof ii?e.toJson():e).type){case"Feature":return Xr(t,e.geometry,n);case"Point":d=[[e.coordinates]];break;case"MultiPoint":for(var l,c=e.coordinates,u=0,h=c.length;u<h;u++)(l=Tr(r,c[u]))<a&&(a=l,s=new Ko(new Jo(c[u]),{distance:l}));break;case"LineString":d=[e.coordinates];break;case"Polygon":case"MultiLineString":d=e.coordinates;break;case"MultiPolygon":var p=e.coordinates;if(0<p.length)for(var d=p[0],u=1,h=p.length;u<h;u++)d=d.concat(p[u])}if(d)for(var f,u=0,h=d.length;u<h;u++)(f=wr(r,i,d[u]))&&f.properties.distance<a&&(a=f.properties.distance,s=f);return s&&(s.properties.distance=xr(s.properties.distance,"meters",n,o)),s}(Lt=$o=$o||{}).squareMeters="squareMeters",Lt.acres="acres",Lt.hectares="hectares",Lt.squareFeet="squareFeet",Lt.squareKilometers="squareKilometers",Lt.squareMiles="squareMiles",Lt.squareYards="squareYards",(Rt=tr=tr||{}).meters="meters",Rt.kilometers="kilometers",Rt.feet="feet",Rt.miles="miles",Rt.nauticalMiles="nauticalMiles",Rt.yards="yards",(Ct=er=er||{}).seconds="seconds",Ct.hours="hours",Ct.ms="ms",Ct.minutes="minutes",Ct.days="days",(Ot=nr=nr||{}).metersPerSecond="metersPerSecond",Ot.kilometersPerHour="kilometersPerHour",Ot.feetPerSecond="feetPerSecond",Ot.milesPerHour="milesPerHour",Ot.knots="knots",Ot.mach="mach",(bt=or=or||{}).milesPerSecondSquared="milesPerSecondSquared",bt.kilometersPerSecondSquared="kilometersPerSecondSquared",bt.knotsPerSecond="knotsPerSecond",bt.standardGravity="standardGravity",bt.feetPerSecondSquared="feetPerSecondSquared",bt.yardsPerSecondSquared="yardsPerSecondSquared",bt.milesPerHourSecond="milesPerHourSecond",bt.kilometersPerHourSecond="kilometersPerHourSecond",bt.metersPerSecondSquared="metersPerSecondSquared";var $r,ti=(k(ei,$r=Array),ei.fromPosition=function(t){return 2===t.length?new ei(t[0],t[1]):2<t.length?new ei(t[0],t[1],t[2]):null},ei.areEqual=function(t,e,n){if(void 0===n&&(n=6),t&&2<=t.length&&e&&2<=e.length){var o=Math.pow(10,n),r=Dr(t[1]),n=Dr(e[1]),t=zr(t[0]),e=zr(e[0]);if(0!=Math.round((r-n)*o)/o)return!1;o=Math.round((t-e)*o)/o;return 0!=o&&360!=o?!1:!0}return!1},ei.fromLatLng=function(r,t,e){var i,s,a,l,c,u,n=[];return"number"==typeof r?(n.push(r),"number"==typeof t&&n.push(t),"number"==typeof e&&n.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?n.push(r[0],r[1],r[2]):n.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,n){var o=t.toLowerCase();isNaN(l)&&0<=i.indexOf(o)&&"number"==typeof r[t]?l=r[t]:isNaN(c)&&0<=s.indexOf(o)&&"number"==typeof r[t]?c=r[t]:isNaN(u)&&0<=a.indexOf(o)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(l)||isNaN(c)||(n.push(c,l),isNaN(u)||n.push(u))),2<=n.length?n:null},ei.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var n=0,o=t.length;n<o;n++){var r=ei.fromLatLng(t[n]);r&&e.push(r)}return e},ei._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},ei);function ei(t,e,n){return n?$r.call(this,t,e,n)||this:$r.call(this,t,e)||this}var ni=(oi.TYPE="Polygon",oi);function oi(t,e){this.type="Polygon",this.type=oi.TYPE,1===ti._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var ri,ii=(k(si,ri=$),si.prototype.addProperty=function(t,e){Go(this.data.properties[t],e)||(this.data.properties[t]=Fn(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.getBounds=function(){var e,t,n,o,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,li.fromPositions(a[0])):new li(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=li.fromPositions(a)}else if("Polygon"===s){a=i;r=li.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var l=P(a),c=l.next();!c.done;c=l.next()){var u=c.value;r=li.merge(r,li.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 h=P(a),p=h.next();!p.done;p=h.next()){var d=p.value;r=li.merge(r,li.fromPositions(d[0]))}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}return r},si.prototype.getCoordinates=function(){return Fn(this.data.geometry.coordinates)},si.prototype.getCircleCoordinates=function(){return this.circlePolygon?Fn(this.circlePolygon.geometry.coordinates[0]):null},si.prototype.getId=function(){return this.data.id},si.prototype.getProperties=function(){return Fn(this.data.properties)},si.prototype.getType=function(){return this.data.geometry.type},si.prototype.isCircle=function(){return si._isCircle(this.data)},si.prototype.isRectangle=function(){return si._isRectangle(this.data)},si.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===ti._getDimensions(t)?[t]:t;Go(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=Fn(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.setProperties=function(t){t[si._shapeIdPropName]=this.data.id,Go(this.data.properties,t)||(this.data.properties=Fn(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},si.prototype._toJson=function(){return this.circlePolygon||this.data},si.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},si.prototype._handleCircle=function(){var t;this.isCircle()?(t=si._getCirclePositions(this.data),this.circlePolygon=new Ko(new ni([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},si._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},si._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},si._getCirclePositions=function(t){return Nr(t.geometry.coordinates,t.properties.radius,72,"meters")},si._shapeIdPropName="_azureMapsShapeId",si);function si(t,e,n){var o,r,i=ri.call(this)||this;return"Feature"===t.type?(r=Fn((o=t).geometry),n=o.properties?Fn(o.properties):{},e=null==o.id||""===o.id?Ho():o.id):(r=Fn(t),e=null==e||""===e?Ho():e,n=n?Fn(n):{}),n[si._shapeIdPropName]=e,i.data=new Ko(r,n,e),i._handleCircle(),i}var ai,li=(k(ci,ai=Array),ci.fromBoundingBox=function(t){var e=ci.getWest(t),n=ci.getSouth(t),o=ci.getEast(t),t=ci.getNorth(t);return new ci([e,n,o,t])},ci.fromDimensions=function(t,e,n){var o=t[0],r=t[1],t=Math.min(Math.max(r+n/2,-85.5),85.5),r=Math.min(Math.max(r-n/2,-85.5),85.5),n=zr(o+e/2);return new ci([zr(o-e/2),r,n,t])},ci.fromEdges=function(t,e,n,o){return new ci([t,e,n,o])},ci.containsPosition=function(t,e){var n=ci.getCenter(t),o=Math.abs(n[1]-e[1]),n=Math.abs(n[0]-e[0]);180<n&&(n=360-n);e=ci.getHeight(t),t=ci.getWidth(t);return o<=e/2+1e-8&&n<=t/2+1e-8},ci.containsBoundingBox=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;return!(!n||!o)&&(ci.getWest(t)<ci.getWest(e)&&ci.getWest(e)<ci.getEast(t)&&ci.getWest(t)<ci.getEast(e)&&ci.getEast(e)<ci.getEast(t)&&ci.getSouth(t)<ci.getSouth(e)&&ci.getSouth(e)<ci.getNorth(t)&&ci.getSouth(t)<ci.getNorth(e)&&ci.getNorth(e)<ci.getNorth(t))},ci.crossesAntimeridian=function(t){return zr(ci.getEast(t))-zr(ci.getWest(t))<0||ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},ci.getCenter=function(t){var e=zr(ci.getEast(t)),n=zr(ci.getWest(t));e<n&&(e+=360);n=zr((n+e)/2),e=Dr(ci.getSouth(t)),t=Dr(ci.getNorth(t));return[n,Dr((e+t)/2)]},ci.getHeight=function(t){t=Dr(ci.getNorth(t))-Dr(ci.getSouth(t));return isNaN(t)?0:t},ci.getWidth=function(t){t=zr(ci.getEast(t))-zr(ci.getWest(t));return isNaN(t)?0:t<0?t+360:t},ci.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},ci.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},ci.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},ci.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},ci.intersect=function(t,e){var n=ci.getCenter(t),o=ci.getCenter(e),r=Math.abs(n[1]-o[1]),i=Math.abs(n[0]-o[0]);180<i&&(i=360-i);n=ci.getHeight(t),o=ci.getWidth(t),t=ci.getHeight(e),e=ci.getWidth(e);return r<=n/2+t/2&&i<=o/2+e/2},ci.merge=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;if(n&&!o)return t;if(o&&!n)return e;if(!n&&!o)return null;for(var n=Math.max(Dr(ci.getNorth(t)),Dr(ci.getNorth(e))),o=Math.min(Dr(ci.getSouth(t)),Dr(ci.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],l=zr(ci.getWest(a)),c=zr(ci.getEast(a));ci.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=[],h=i[0];for(s=1;s<i.length;){var p=i[s];h[1]>=p[0]?h[1]=Math.max(h[1],p[1]):(u.push(h),h=p),s++}u.push(h);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 g=u[s][0]-u[s-1][1];f<g&&(f=g,m=[u[s-1][1],u[s][0]])}return new ci([m[1],o],[m[0],n])},ci.fromPositions=function(t){for(var e,n,o=NaN,r=NaN,i=NaN,s=NaN,a=t.length,l=new Array(a),c=0;a--;)(n=t[a])&&2<=n.length&&(e=Dr(n[1]),o=isNaN(o)?e:Math.max(o,e),r=isNaN(r)?e:Math.min(r,e),l[c++]=zr(n[0]));if(c){l.length=c,l.sort(function(t,e){return t-e});for(var u=l[0]+360-l[c-1],h=0,a=1;a<c;a++){var p=l[a]-l[a-1];u<p&&(u=p,h=a)}i=l[h],s=l[(h||c)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(o)?null:new ci([i,r,s,o])},ci.fromLatLngs=function(t){return ci.fromPositions(ti.fromLatLngs(t))},ci.fromData=function(t){var e,n,o=null;if(Array.isArray(t)&&0<t.length){try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=ci.fromData(a))&&(o=null===o?s:ci.merge(o,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o}if(t instanceof ii)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 ci.fromData(l.features);case"Feature":return ii._isCircle(l)?ci.fromPositions(ii._getCirclePositions(l)):ci.fromData(l.geometry);case"GeometryCollection":return ci.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 ci.fromPositions(l.coordinates);case"Polygon":case"MultiLineString":var u=l.coordinates;if(u&&0<u.length){for(var h=0,p=u.length;h<p;h++)null!=(s=ci.fromPositions(u[h]))&&(o=null===o?s:ci.merge(o,s));if(null!=o)return o}break;case"MultiPolygon":var d=l.coordinates;if(d&&0<d.length){for(h=0,p=d.length;h<p;h++)for(var f=0,m=d[h].length;f<m;f++)null!=(s=ci.fromPositions(d[h][f]))&&(o=null===o?s:ci.merge(o,s));return o}}}return null},ci.splitOnAntimeridian=function(t){var e,n,o,r,i,s,a=[];return ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(ci.crossesAntimeridian(t)?(s=e=void 0,n=zr(ci.getWest(t)),o=zr(ci.getEast(t)),r=Dr(ci.getNorth(t)),i=Dr(ci.getSouth(t)),s=6<=t.length?(e=[n,i,t[2],180,r,t[5]],[-180,i,t[2],o,r,t[5]]):(e=[n,i,180,r],[-180,i,o,r]),a.push(e,s)):a.push(t),a)},ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},ci);function ci(t,e){var n,o=this;return t&&e?o=(n=t)[2]&&e[2]?ai.call(this,n[0],n[1],n[2]||0,e[0],e[1],e[2]||0)||this:ai.call(this,n[0],n[1],e[0],e[1])||this:!t||(t=t)&&(4===t.length?o=ai.call(this,t[0],t[1],t[2],t[3])||this:6<=t.length&&(o=ai.call(this,t[0],t[1],t[2],t[3],t[4],t[5])||this)),o}var ui=(hi.TYPE="FeatureCollection",hi);function hi(t,e){this.type="FeatureCollection",this.type=hi.TYPE,this.features=t,this.bbox=e}pi.TYPE="GeometryCollection",wt=pi;function pi(t){this.type="GeometryCollection",this.type=pi.TYPE,this.geometries=t}di.TYPE="LineString",Lt=di;function di(t,e){this.type="LineString",this.type=di.TYPE,this.coordinates=t,this.bbox=e}fi.TYPE="MultiLineString",Rt=fi;function fi(t,e){this.type="MultiLineString",this.type=fi.TYPE,this.coordinates=t,this.bbox=e}mi.TYPE="MultiPoint",Ct=mi;function mi(t,e){this.type="MultiPoint",this.type=mi.TYPE,this.coordinates=t,this.bbox=e}gi.TYPE="MultiPolygon",Ot=gi;function gi(t,e){this.type="MultiPolygon",this.type=gi.TYPE,this.coordinates=t,this.bbox=e}var yi,bt=Object.freeze({__proto__:null,Feature:Ko,FeatureCollection:ui,LineString:Lt,Point:Jo,Polygon:ni,Position:ti,BoundingBox:li,MultiLineString:Rt,MultiPoint:Ct,MultiPolygon:Ot,GeometryCollection:wt}),vi=At(function(t,e){function m(t,e){return t*t+e*e}function i(t,e){for(var n,o,r,i=t[0],s=[i],a=1,l=t.length;a<l;a++)n=t[a],r=i,m((o=n)[0]-r[0],o[1]-r[1])>e&&(s.push(n),i=n);return i!==n&&s.push(n),s}function g(t,e,n,o,r){for(var i,s,a,l,c,u,h,p=o,d=e+1;d<n;d++){var f=(s=t[d],a=t[e],l=t[n],h=u=f=c=void 0,c=a[0],f=a[1],u=l[0]-c,h=l[1]-f,0==u&&0==h||(1<(a=((s[0]-c)*u+(s[1]-f)*h)/m(u,h))?(c=l[0],f=l[1]):0<a&&(c+=u*a,f+=h*a)),m(s[0]-c,s[1]-f));p<f&&(i=d,p=f)}o<p&&(1<i-e&&g(t,e,i,o,r),r.push(t[i]),1<n-i&&g(t,i,n,o,r))}e.__esModule=!0,e.SimplifyAP=function(t,e,n){if(t.length<=2)return t;var o,r=(e=void 0===e?1:e)*e;return t=(n=void 0===n?!1:n)?t:i(t,r),e=(o=t).length-1,n=[o[0]],g(o,0,e,r,n),n.push(o[e]),t=n}});(yi=vi)&&yi.__esModule&&Object.prototype.hasOwnProperty.call(yi,"default")&&yi.default;var _i=vi.SimplifyAP;var bi=(wi.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},wi.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},wi.prototype.transformArray=function(t,e,n){var o,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=P(t),a=s.next();!a.done;a=s.next()){var l=a.value;i.push(this.transform(l,e,n))}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}return null},wi.prototype.transform=function(t,e,n){var o=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 n&&0<=n?[Sr(o,n),Sr(e,n)]:[Sr(o,6),Sr(e,6)]},wi._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 n=Math.min(t[0].length,e[0].length),o=n+1;if(t.length<n)throw new Error("Erorr: At least "+n+" reference points required.");for(var r=[],i=[],s=0;s<o;s++){i[s]=[];for(var a=0;a<o;a++){a<n&&(r[a]=0);for(var l=i[s][a]=0;l<t.length;l++)a<n&&(r[a]+=s<n?t[l][s]*e[l][a]:e[l][a]),i[s][a]+=n<=s&&n<=a?1:n<=s?t[l][a]:n<=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},wi._gaussJordanElimination=function(t){for(var e,n=t.length,o=2*n-1,r=0;r<n;r++){for(var i=r,s=r+1;s<n;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<n;a++)for(var l=t[a][r]/t[r][r],c=r;c<o;c++)t[a][c]-=t[r][c]*l}for(r=n-1;-1<r;r--){l=t[r][r];for(s=0;s<r;s++)for(var u=o-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/l;t[r][r]/=l;for(var h=n;h<o;h++)t[r][h]/=l}return!0},wi);function wi(t,e){this.M=wi._calculateAffineTransform(t,e),this.inverseM=wi._calculateAffineTransform(e,t)}var Si,Lt=Object.freeze({__proto__:null,AffineTransform:bi,WEBMERCATOR_MAXLAT:lr,_precision:Sr,get AreaUnits(){return $o},get DistanceUnits(){return tr},get TimeUnits(){return er},get SpeedUnits(){return nr},get AccelerationUnits(){return or},boundingBoxToPolygon:function(t){var e=zr(li.getWest(t)),n=zr(li.getEast(t)),o=Dr(li.getNorth(t)),r=Dr(li.getSouth(t)),t=li.getCenter(t),o=[[e,o],[e,r],[t[0],r],[n,r],[n,o],[t[0],o],[e,o]];return new ni([o])},convertDistance:xr,getCardinalSpline:function(t,e,n,o){if(!t||t.length<=2)return i;"number"!=typeof e&&(e=.5),("number"!=typeof n||n<=0)&&(n=15);var r=t.length,i=t.slice(0);o?(ti.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<n-1;u++)c.push([2*(l=(s=u/n)*(a=s*s))-3*a+1,-2*l+3*a,l-2*a+s,l-a]);c.push([0,1,0,0]);for(var h,p,d,f,m,g,y=[],u=1;u<r;u++)for(h=e*(i[u+1][0]-i[u-1][0]),p=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<n;s++)g=(m=c[s])[0]*i[u][0]+m[1]*i[u+1][0]+m[2]*h+m[3]*d,m=hr(m[0]*i[u][1]+m[1]*i[u+1][1]+m[2]*p+m[3]*f,-85,85),y.push([g,m]);return y},getDestination:Er,getDistanceTo:Tr,getEarthRadius:Cr,getPathDenormalizedAtAntimerian:kr,getPathSplitByAntimeridian:Ir,getGeodesicPath:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=0;i<o;i++)r=r.concat(Or(n[i],n[i+1],e));return kr(r)},getGeodesicPaths:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=[],s=0;s<o;s++)for(var a,l,c,u,h,p=Or(n[s],n[s+1],e),d=0;d<p.length;d++)r.push(p[d]),d+1>=p.length||(a=(c=R(p[d],2))[0],l=c[1],h=(u=R(p[d+1],2))[0],c=u[1],180<Math.abs(h-a)&&(u=0<a?180:-180,h=Math.abs((0<a?h+360:h-360)-a),h=l+(c-l)*(Math.abs(u-a)/h),r.push([u,h]),i.push(r),r=[[-u,h]]));return i.push(r),i},getHeading:Lr,getLengthOfPath:Ar,getPositionAlongPath:Pr,getRegularPolygonPath:Nr,getRegularPolygonPaths:function(t,e,n,o,r){return Ir(Rr(t,e,n,o,r))},interpolate:Mr,normalizeLatitude:Dr,normalizeLongitude:zr,rotatePositions:Br,getPixelHeading:function(t,e){var t=(n=R(Fr([t=Qr(t),e=Qr(e)],21),2))[0],n=(e=n[1])[0]-t[0],e=t[1]-e[1];return(2.5*Math.PI-Math.atan2(e,n))*sr%360},mercatorPixelsToPositions:jr,mercatorPositionsToPixels:Fr,convertAcceleration:Ur,convertArea:qr,convertSpeed:Gr,convertTimespan:Zr,getAcceleration:Hr,getAccelerationFromSpeeds:Kr,getAccelerationFromFeatures:function(t,e,n,o,r,i,s){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var a=Wr(t.properties[n],e.properties[n],er.seconds);if(!isNaN(a)){var l=0;if(o&&"string"==typeof o){n=t.properties[o],o=e.properties[o];if("number"==typeof n&&(l=n,"number"==typeof o))return Kr(n,o,a,r,er.seconds,i,s)}return Hr(l,Tr(t.geometry.coordinates,e.geometry.coordinates,tr.meters),a,r,tr.meters,er.seconds,i,s)}}return NaN},getArea:function t(e,n,o){if(e){var r=0;switch((e=e instanceof ii?e.toJson():e).type){case"Feature":var i=e;if(e.geometry)return t(i.geometry,n,o);break;case"Polygon":(i=e).coordinates&&(r=vr(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,l=s.coordinates.length;a<l;a++)r+=vr(s.coordinates[a])}return qr(r,$o.squareMeters,n,o)}return 0},getSpeed:function(t,e,n,o,r,i){if(t=Qr(t),e=Qr(e),t&&e){o=Zr(n,o,er.seconds);return Gr(Tr(t,e,tr.meters)/o,nr.metersPerSecond,r,i)}return 0},getSpeedFromFeatures:function(t,e,n,o,r){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){n=this.getTimespan(t.properties[n],e.properties[n],er.seconds);if(!isNaN(n)){e=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,tr.meters);return this.convertSpeed(e/n,nr.metersPerSecond,o,r)}}return NaN},getTimespan:Wr,getTravelDistance:function(t,e,n,o,r,i,s,a){return e=this.convertTimespan(e,r,er.seconds),n=(n=this.convertSpeed(n,i,nr.metersPerSecond))*e,"number"==typeof o&&(n+=.5*this.convertAcceleration(o,s,or.metersPerSecondSquared)*e*e),this.convertDistance(n,tr.meters,t,a)},parseTimestamp:Vr,getConvexHull:function(t){var e,n,o=Yr(t).map(function(t){return[zr(t[0]),Dr(t[1])]});o.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var r=[];try{for(var i=P(o),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&br(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&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}for(var l=[],c=o.length-1;0<=c;c--){for(;2<=l.length&&br(l[l.length-2],l[l.length-1],o[c])<=0;)l.pop();l.push(o[c])}return new ni([r.concat(l)])},getPositions:Yr,getPosition:Qr,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var n=[],o=Ar(t,tr.meters)/(e-1),r=0;r<e;r++){var i=Pr(t,o*r,tr.meters);null!=i&&n.push(i)}return n},getPointWithHeadingAlongPath:Jr,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var n=[],o=Ar(t,tr.meters)/(e-1),r=0;r<e;r++){var i=Jr(t,o*r,tr.meters);null!=i&&n.push(i)}return n},getClosestPointOnGeometry:Xr,simplify:function(t,e){return _i(t,e,!0)}}),xi=(k(Ei,Si=M),Ei);function Ei(){var t=null!==Si&&Si.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}var Ti,Rt=(k(Ci,Ti=ot),Ci.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=H("Zoom In"),n=H("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(n),K(e,this.zoomInButton),K(n,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},Ci.prototype.onRemove=function(){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)},Ci.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=li.getSouth(this.map.getCamera().bounds)<=-lr&&li.getNorth(this.map.getCamera().bounds)>=lr,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"))},Ci.prototype.constructZoomInButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-in"),n.setAttribute("aria-label","Zoom In"),n.setAttribute("alt","Zoom In"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:Ci.ZOOM_DURATION_MS,type:"ease"},!0)}),n},Ci.prototype.constructZoomOutButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-out"),n.setAttribute("aria-label","Zoom Out"),n.setAttribute("alt","Zoom Out"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:Ci.ZOOM_DURATION_MS,type:"ease"},!0)}),n},Ci.ZOOM_DURATION_MS=200,Ci);function Ci(t){var e=Ti.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 xi).merge(t),e}Ct=Object.freeze({__proto__:null,ControlBase:ot,PitchControl:mt,CompassControl:ct,ZoomControl:Rt,StyleControl:It,TrafficControl:wo,TrafficLegendControl:kt});var Oi,ki=function(t,e){return jn(t,5,e="function"==typeof e?e:void 0)},Ii=(k(Li,Oi=M),Li);function Li(){var t=null!==Oi&&Oi.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 Ai,Pi=(k(Ri,Ai=$),Ri.prototype.getId=function(){return this.id},Ri.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))},Ri);function Ri(t){var e=Ai.call(this)||this;return e.id=t||Ho(),e}var Ni,Mi=(k(Di,Ni=Pi),Di.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},Di.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},Di.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},Di.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?o(t):"number"==typeof e&&n(e)}):o("The DataSource hasn't been added to a map.")})},Di.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?o(t):e&&n(r.map.sources._mapFeaturesToShapes(e,!1,r))}):o("The DataSource hasn't been added to a map.")})},Di.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(n,o){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?o(t):e&&n(s.map.sources._mapFeaturesToShapes(e,!1,s))}):o("The DataSource hasn't been added to a map.")})},Di.prototype.getOptions=function(){return Fn(this.options)},Di.prototype.getShapes=function(){return Array.from(this.shapes)},Di.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)})},Di.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},Di.prototype.remove=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},Di.prototype.removeById=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},Di.prototype.setOptions=function(t){t=(new Ii).merge(this.options,Fn(t));Go(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},Di.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},Di.prototype.toJson=function(){return new ui(this.shapes.map(function(t){return t.toJson()}))},Di.prototype._toJson=function(){return new ui(this.shapes.map(function(t){return t._toJson()}))},Di.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},Di.prototype._addNoUpdate=function(t,e){var n;t instanceof ii?(this._addToSources(t,e),n=[t]):Array.isArray(t)?(n=t.map(function(t){return t instanceof ii?t:new ii(t)}),this._addToSources(n,e)):"FeatureCollection"===t.type?(n=t.features.map(function(t){return new ii(t)}),this._addToSources(n,e)):"GeometryCollection"===t.type?(n=t.geometries.map(function(t){return new ii(t)}),this._addToSources(n,e)):(t=new ii(t),this._addToSources(t,e),n=[t]),this._invokeEvent("dataadded",n)},Di.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new X,t&&0<t.length&&this._invokeEvent("dataremoved",t)},Di.prototype._updateSource=function(){var t=this;void 0!==this.requestId||(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},Di.prototype._addToSources=function(t,e){var n,o,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=P(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){n={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.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=P(t),h=u.next();!h.done;h=u.next())(l=h.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},Di.prototype._removeById=function(t){var e=t instanceof ii?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]))},Di.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])},Di.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},Di.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&((t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson()))},Di);function Di(t,e){t=Ni.call(this,t)||this;return t.requestId=void 0,t.options=(new Ii).merge(Fn(e)),t.shapes=[],t.shapesMap=new X,t}var zi,Bi=(k(ji,zi=M),ji);function ji(){var t=null!==zi&&zi.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 Fi,Ui=(k(qi,Fi=Pi),qi.prototype.getOptions=function(){return Fn(this.options)},qi.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},qi.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},qi);function qi(t,e){t=Fi.call(this,t)||this;return t.options=(new Bi).merge(Fn(e)),t}var Gi,Ot=Object.freeze({__proto__:null,Source:Pi,DataSource:Mi,VectorTileSource:Ui}),Zi=(k(Hi,Gi=$),Hi.prototype.getId=function(){return this.id},Hi.prototype.getMap=function(){return this.map||null},Hi.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},Hi.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},Hi._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},Hi.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")},Hi.prototype._updateFilter=function(t,e){Go(t,e)||this.map._getMap().setFilter(this.id,t)},Hi.prototype._updatePaintProperty=function(t,e,n,o){Go(e,n)||this.map._getMap().setPaintProperty(this.id,t,o||e)},Hi.prototype._updateLayoutProperty=function(t,e,n,o){Go(e,n)||this.map._getMap().setLayoutProperty(this.id,t,o||e)},Hi.prototype._updateZoomRange=function(t,e,n,o){t===e&&o===n||this.map._getMap().setLayerZoomRange(this.id,t,n)},Hi.LayerEvents={layeradded:void 0,layerremoved:void 0},Hi);function Hi(t){var e=Gi.call(this)||this;return e.id=t||Ho(),e}var Ki,wt=(k(Wi,Ki=M),Wi._cloneCustomizer=function(t){if(t instanceof Pi)return t},Wi);function Wi(){var t=null!==Ki&&Ki.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var Vi,Yi=(k(Qi,Vi=wt),Qi);function Qi(){var t=null!==Vi&&Vi.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 Ji,Xi=(k($i,Ji=Zi),$i.prototype.getOptions=function(){return ki(this.options,Yi._cloneCustomizer)},$i.prototype.getSource=function(){return this.options.source},$i.prototype.setOptions=function(t){t=(new Yi).merge(this.options,ki(t,Yi._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},$i.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Pi?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]},$i.prototype._getLayerIds=function(){return[this.id]},$i.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},$i);function $i(t,e,n){e=Ji.call(this,e)||this;return e.options=(new Yi).merge(ki(n,Yi._cloneCustomizer)),e.options.source=t||e.options.source,e}var ts,es=(k(ns,ts=wt),ns._cloneCustomizer=function(t){if(t instanceof Pi)return t},ns);function ns(){var t=null!==ts&&ts.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 os,mt=(k(rs,os=Zi),rs.prototype.getOptions=function(){return ki(this.options,es._cloneCustomizer)},rs.prototype.getSource=function(){return this.options.source},rs.prototype.setOptions=function(t){t=(new es).merge(this.options,ki(t,es._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},rs.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Pi?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]},rs.prototype._getLayerIds=function(){return[this.id]},rs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},rs);function rs(t,e,n){e=os.call(this,e)||this;return e.options=(new es).merge(ki(n,es._cloneCustomizer)),e.options.source=t||e.options.source,e}var is,Rt=(k(ss,is=wt),ss);function ss(){var t=null!==is&&is.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 as,ls=(k(cs,as=Rt),cs._cloneCustomizer=function(t){if(t instanceof Pi)return t},cs);function cs(){var t=null!==as&&as.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var us,hs=(k(ps,us=Zi),ps.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},ps);function ps(){return null!==us&&us.apply(this,arguments)||this}var ds,It=(k(fs,ds=hs),fs.prototype.getOptions=function(){return ki(this.options,ls._cloneCustomizer)},fs.prototype.setOptions=function(t){var e=(new ls).merge(this.options,ki(t,ls._cloneCustomizer)),n="string"==typeof t.url&&t.url!==this.getOptions().url,o=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,n?this.reloadImage():o&&this.updateTransform()},fs.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},fs.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},fs.getCoordinatesFromRefPoints=function(t,e,n,o){return new bi(n,o).toTarget([[0,0],[t,0],[t,e],[0,e]])},fs.getCoordinatesFromEdges=function(t,e,n,o,r){"number"!=typeof r&&(r=0);n=[Math.min(o,n),e,Math.max(o,n),t],t=li.getCenter(n);return Br([li.getNorthWest(n),li.getNorthEast(n),li.getSouthEast(n),li.getSouthWest(n)],t,r)},fs.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]},fs.prototype._getLayerIds=function(){return[this.id]},fs.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},fs.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},fs.prototype.reloadImage=function(){var n=this;this.options.url&&(this.transform=new Promise(function(e,t){n.img.onload=function(){var t=[[0,0],[n.img.width,0],[n.img.width,n.img.height],[0,n.img.height]];e(new bi(t,n.options.coordinates)),n.isLoading=!1},n.img.onerror=n.img.onabort=function(){t("Failed to load image")},n.isLoading=!0,n.img.src=n.options.url}))},fs.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 bi(t,this.options.coordinates)))},fs);function fs(t,e){e=ds.call(this,e)||this;return e.isLoading=!1,e.options=(new ls).merge(ki(t,ls._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}var ms,gs=(k(ys,ms=wt),ys);function ys(){var t=null!==ms&&ms.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 Yo(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var vs,_s=(k(bs,vs=Zi),bs.prototype.getOptions=function(){return ki(this.options,gs._cloneCustomizer)},bs.prototype.getSource=function(){return this.options.source},bs.prototype.setOptions=function(t){t=(new gs).merge(this.options,ki(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},bs.prototype._buildLayers=function(){return[I(I(I(I({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Pi?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:I(I(I({"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})]},bs.prototype._getLayerIds=function(){return[this.id]},bs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},bs);function bs(t,e,n){e=vs.call(this,e)||this;return e.options=(new gs).merge(ki(n,gs._cloneCustomizer)),e.options.source=t||e.options.source,e}var ws,Ss=(k(xs,ws=wt),xs);function xs(){var t=null!==ws&&ws.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 Yo(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var Es,kt=(k(Ts,Es=Zi),Ts.prototype.getOptions=function(){return ki(this.options,Ss._cloneCustomizer)},Ts.prototype.getSource=function(){return this.options.source},Ts.prototype.setOptions=function(t){t=(new Ss).merge(this.options,ki(t,Ss._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},Ts.prototype._buildLayers=function(){return[I(I(I(I({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Pi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:I(I({"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})]},Ts.prototype._getLayerIds=function(){return[this.id]},Ts.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},Ts);function Ts(t,e,n){e=Es.call(this,e)||this;return e.options=(new Ss).merge(ki(n,Ss._cloneCustomizer)),e.options.source=t||e.options.source,e}var Cs,Os=(k(ks,Cs=wt),ks.prototype.merge=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=!1,r=!1;try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(o=!0):a.hasOwnProperty("fillPattern")&&(o=!(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=Cs.prototype.merge.apply(this,N(e));return o?l.fillPattern=void 0:r&&(l.fillColor=void 0),l},ks);function ks(){var t=null!==Cs&&Cs.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 Is,Ls=(k(As,Is=Zi),As.prototype.getOptions=function(){return ki(this.options,Os._cloneCustomizer)},As.prototype.getSource=function(){return this.options.source},As.prototype.setOptions=function(t){t=(new Os).merge(this.options,ki(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("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},As.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Pi?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]},As.prototype._getLayerIds=function(){return[this.id]},As.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},As);function As(t,e,n){e=Is.call(this,e)||this;return e.options=(new Os).merge(ki(n,Os._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ps,Rs=(k(Ns,Ps=M),Ns);function Ns(){var t=null!==Ps&&Ps.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Yo(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 Ms,Ds=(k(zs,Ms=M),zs);function zs(){var t=null!==Ms&&Ms.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 Yo(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 Bs,js=(k(Fs,Bs=wt),Fs);function Fs(){var t=null!==Bs&&Bs.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new Rs,t.textOptions=new Ds,t.placement="point",t.zOrder="auto",t.lineSpacing=250,t}var Us,qs=(k(Gs,Us=Zi),Gs.prototype.getOptions=function(){return ki(this.options,js._cloneCustomizer)},Gs.prototype.getSource=function(){return this.options.source},Gs.prototype.setOptions=function(t){var e=(new js).merge(this.options,ki(t,js._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 n=this.options,o=e.iconOptions,r=n.iconOptions,i=e.textOptions,t=n.textOptions;this._updateBaseProperties(e,n),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,n.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,n.placement),this._updateLayoutProperty("symbol-sort-key",e.sortKey,n.sortKey),this._updateLayoutProperty("symbol-z-order",e.zOrder,n.zOrder),this._updateLayoutProperty("icon-allow-overlap",o.allowOverlap,r.allowOverlap),this._updateLayoutProperty("icon-anchor",o.anchor,r.anchor),this._updateLayoutProperty("icon-ignore-placement",o.ignorePlacement,r.ignorePlacement),this._updateLayoutProperty("icon-image",o.image,r.image),this._updateLayoutProperty("icon-offset",o.offset,r.offset),this._updatePaintProperty("icon-opacity",o.opacity,r.opacity),this._updateLayoutProperty("icon-optional",o.optional,r.optional),this._updateLayoutProperty("icon-padding",o.padding,r.padding),this._updateLayoutProperty("icon-pitch-alignment",o.pitchAlignment,r.pitchAlignment),this._updateLayoutProperty("icon-rotate",o.rotation,r.rotation),this._updateLayoutProperty("icon-rotation-alignment",o.rotationAlignment,r.rotationAlignment),this._updateLayoutProperty("icon-size",o.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},Gs.prototype._buildLayers=function(){var t=I(I(I(I({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Pi?this.options.source.getId():this.options.source,layout:I(I({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]},Gs.prototype._getLayerIds=function(){return[this.id]},Gs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Pi?t.add(this.options.source.getId()):t.add(this.options.source),t},Gs);function Gs(t,e,n){e=Us.call(this,e)||this;return e.options=(new js).merge(ki(n,js._cloneCustomizer)),e.options.source=t||e.options.source,e}var Zs,Hs=(k(Ks,Zs=Rt),Ks);function Ks(){var t=null!==Zs&&Zs.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 Ws,Vs=(k(Ys,Ws=hs),Ys.prototype.getOptions=function(){return ki(this.options,Hs._cloneCustomizer)},Ys.prototype.setOptions=function(t){t=(new Hs).merge(this.options,ki(t,Hs._cloneCustomizer));if(this.map){if(!Go(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Go(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},Ys.prototype._setOptionsNoUpdate=function(t){this.options=(new Hs).merge(this.options,ki(t,Hs._cloneCustomizer))},Ys.prototype._buildLayers=function(){return[I(I({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})]},Ys.prototype._getLayerIds=function(){return[this.id]},Ys.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 n=[];try{for(var o=P(this.options.subdomains),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}e=n}else e=[this.options.tileUrl]}return I({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})},Ys.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},Ys);function Ys(t,e){e=Ws.call(this,e)||this;return t&&e.setOptions(t),e}var mt=Object.freeze({__proto__:null,BubbleLayer:Xi,Layer:Zi,LineLayer:_s,PolygonExtrusionLayer:kt,PolygonLayer:Ls,SymbolLayer:qs,TileLayer:Vs,HeatMapLayer:mt,ImageLayer:It}),Qs=(Js.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},Js.parseWithFilter=function(t,e,n,o){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===n&&(n=function(t){return t}),void 0===o&&(o=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return n(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=o(),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,n)}),e(i)?n(i):(i.parentNode&&i.parentNode.removeChild(i),null)},Js);function Js(){}var Xs,$s=function(t){return _e(t)&&1===t.nodeType&&!Wn(t)},ta=(k(ea,Xs=M),ea._cloneCustomizer=function(t){if($s(t))return t},ea);function ea(){var t=null!==Xs&&Xs.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 Yo(0,0),t.position=new ti(0,0),t.showPointer=!0,t}var na,oa=(k(ra,na=$),ra.prototype.setPopupOptions=function(t){this.setOptions(t)},ra.prototype.setOptions=function(t){var e=(new ta).merge(this.options,ki(t,ta._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=H("close"),this.contentDiv.appendChild(t),K(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)):(Go(e.position,this.options.position)||this.marker.setLngLat(e.position),Go(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},ra.prototype.getPopupOptions=function(){return this.getOptions()},ra.prototype.getOptions=function(){return ki(this.options,ta._cloneCustomizer)},ra.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=R(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},ra.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},ra.prototype._createContainerDiv=function(t){var e=this,n=document.createElement("div");n.classList.add(ra.Css.container),n.classList.add(ra.Css.hidden),n.style.borderColor=t.fillColor,n.setAttribute("role","dialog"),n.setAttribute("aria-label","Map Information Window");var o=!1;return n.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!0)}),n.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!1)}),n.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())}),n.addEventListener("focusout",function(t){o&&t.relatedTarget instanceof Node&&!n.contains(t.relatedTarget)&&(o=!1,e.isOpen()&&e.close())}),n},ra.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(ra.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},ra.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(ra.Css.arrow),t},ra.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(ra.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="&times;",t},ra.prototype._createHtmlContent=function(t){var e=Qs.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},ra.prototype._createMarker=function(t,e){var n=this.marker?this.marker.getLngLat():t.position,n="none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new o.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n)):(this.containerDiv.classList.add(t.anchor),new o.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n));return n},ra.prototype._getAutoAnchor=function(t,e){var n,o,r,i=this.containerDiv.offsetWidth,s=this.containerDiv.offsetHeight,a=[];return(r=this.marker?(o=(n=t._getMap().project(this.marker.getLngLat())).x,n.y):(r=R(t.positionsToPixels([e.position]),1),o=(r=R(r[0],2))[0],r[1]))<s?a.push("top"):r>t.getCanvas().offsetHeight-s&&a.push("bottom"),o<i/2?a.push("left"):o>t.getCanvas().offsetWidth-i/2&&a.push("right"),0<a.length?a.join("-"):"bottom"},ra.prototype._replaceMarker=function(t,e,n){var o=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,n),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,o||null)},ra.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))},ra.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},ra);function ra(t){var n=na.call(this)||this;return n.attach=function(t){n.map!==t&&(n.map&&n.remove(),n.map=t,n.marker=n._createMarker(n.options),n.marker.addTo(n.map._getMap()),n.map.popups._getCollectionDiv().appendChild(n.containerDiv),n.map.popups.add(n))},n.open=function(t){if(!t&&!n.map)throw new Error("Must specify a map to open on or attach to a map in advance");n.attach(t||n.map),n.containerDiv.classList.remove(ra.Css.hidden),n.map.events.add("move",n._onMove),n._onMove(),n._invokeEvent("open",{target:n,type:"open"})},n.close=function(){n.map&&n.map.events.remove("move",n._onMove),n.containerDiv.classList.add(ra.Css.hidden),n._invokeEvent("close",{target:n,type:"close"})},n.remove=function(){n.map&&(n.marker.remove(),n.containerDiv.classList.remove(n.autoAnchor||n.options.anchor),n.map.events.remove("move",n._onMove),n.map.popups.remove(n),delete n.map,delete n.marker,delete n.autoAnchor)},n.isOpen=function(){return n.map&&!n.containerDiv.classList.contains(ra.Css.hidden)},n._onMove=function(){var t=n._getAutoAnchor(n.map,n.options);t!==n.autoAnchor&&(n._replaceMarker(n.map,n.options,t),n.map.events.add("move",n._onMove))},n._onDown=function(t){n.map.popups._addDraggedPopup(n);var e=R(n.map.positionsToPixels([n.options.position]),1)[0];"mousedown"===t.type?n.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(n.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},n._onDragStart=function(t){t.preventDefault()},n.options=(new ta).merge(ki(t,ta._cloneCustomizer)),n.containerDiv=n._createContainerDiv(n.options),n.contentDiv=n._createContentDiv(n.options),n.containerDiv.appendChild(n.contentDiv),n.options.showPointer&&(n.arrowDiv=n._createArrowDiv(),n.containerDiv.appendChild(n.arrowDiv)),n.options.closeButton&&(n.closeBtn=n._createCloseButton(),n.contentDiv.appendChild(n.closeBtn),t=H("close"),n.contentDiv.appendChild(t),K(t,n.closeBtn,!0)),n}var ia,sa=(k(aa,ia=M),aa._cloneCustomizer=function(t){if(t instanceof oa||$s(t))return t},aa);function aa(){var t=null!==ia&&ia.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_'+Ho()+'" 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 Yo(0,0),t.position=new ti(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var la,ca=(k(ua,la=$),ua.prototype.getOptions=function(){return ki(this.options,sa._cloneCustomizer)},ua.prototype.getElement=function(){return this.marker.getElement()},ua.prototype.setOptions=function(t){t=(new sa).merge(this.options,ki(t,sa._cloneCustomizer));Go(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)),Go(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Go(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(ua.hiddenClass):this.element.classList.add(ua.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},ua.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)}},ua.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=Fn(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},ua.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},ua.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},ua.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=Qs.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(ua.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(ua.hiddenClass),this.marker=new o.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)},ua.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},ua.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+ua.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(ua.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},ua.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},ua.collectionContainerClass="marker-collection-container",ua.hiddenClass="hidden-accessible-element",ua.containerClass="marker-container",ua);function ua(t){var e=la.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new ti(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 sa).merge(ki(t,sa._cloneCustomizer)),e._buildMarker(e.options),e}var ha=(pa.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}},pa);function pa(){}var da={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"}}}},fa=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"},ma=(ga.getCode=function(t){var e=ha.parse(t);return-1===da.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},ga.getStrings=function(t){t=this.getLocaleData(t);return da.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new fa)}):new F({domain:e,path:da.localizationsPath+"/"+t.strings}).get().then(function(t){return t},function(){return new fa})},ga.getLocaleData=function(t){if("string"==typeof t&&(t=ha.parse(t)),da.locales[t.code])return da.locales[t.code].defaultRegion;var e;if(da.locales[t.language])e=da.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=da.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},ga);function ga(){}var ya=(va.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 n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}n=t.indexOf("Edge/");return 0<n?parseInt(t.substring(n+5,t.indexOf(".",n)),10):-1},va.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},va.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},va);function va(){}(It=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",It.aad="aad",It.anonymous="anonymous";var _a,ba,wa=(k(Sa,_a=M),Sa.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},Sa.prototype.setAadProperties=function(t,e,n,o,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=o||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=n},Sa.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},Sa.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=_a.prototype.merge.apply(this,N(t));return n.authType===u.AuthenticationType.subscriptionKey?n.authContext=n.aadAppId=n.getToken=void 0:n.authType===u.AuthenticationType.aad?n.subscriptionKey=n.getToken=void 0:n.authType===u.AuthenticationType.anonymous&&(n.subscriptionKey=n.authContext=n.aadAppId=void 0),n},Sa);function Sa(){var t=null!==_a&&_a.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.authContext=void 0,t}var xa="NGT",Ea=Ho(),Ta=t,Ca=e,Oa=n,ka=r,Ia=b,La=new wa,Aa=!1,Pa=!1,Ra=!1,Na=!1,Ma=!1,Da=!1,za=!1,Ba=!1,ja=!1;function Fa(){return Object.assign({},La)}function Ua(){return Ca}function qa(){return Ta}function Ga(){return Oa}function Za(){return ka}function Ha(){return Ia}function Ka(){return h.workerCount}function Wa(){return h.maxParallelImageRequests}function Va(){return xa}function Ya(){return Ea}function Qa(){return La.authType===u.AuthenticationType.subscriptionKey?La.subscriptionKey:void 0}function Ja(){return ba}function Xa(t){return!ya.isIE()&&h.supported({failIfMajorPerformanceCaveat:t})}function $a(t){La=(new wa).merge(La,t),ja=!0}function tl(t){Ta=t,Pa=!0}function el(t){Oa=t,Ra=!0}function nl(t){0<t&&(h.workerCount=t,Ma=!0)}function ol(t){0<t&&(h.maxParallelImageRequests=t,Da=!0)}function rl(t){xa=ma.getCode(t),za=!0}function il(t){Ea=t,Ba=!0}function sl(t){La.setSubscriptionKey(t),ja=!0}function al(t){ba=t,Aa=!0}function ll(t,e){if(e=Math.abs(e||1),"string"==typeof t&&yl[t.toLowerCase()]){for(var n=yl[t.toLowerCase()],o=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=n,i=o.exec(n);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=o.exec(n);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function cl(){return ja}function ul(){return Pa}function hl(){return Ra}function pl(){return Ma}function dl(){return Da}function fl(){return za}function ml(){return Ba}function gl(){return Aa}var yl={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>'},vl=(_l.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},_l);function _l(){}var bl,wl=(k(Sl,bl=M),Sl);function Sl(){var t=null!==bl&&bl.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 xl,El=(k(Tl,xl=ot),Tl.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},Tl.prototype.onRemove=function(){xl.prototype.onRemove.call(this),delete this.container},Tl.prototype.setOptions=function(t){var e=this,n=(new wl).merge(this.options,t);n.copyrightMessage===this.options.copyrightMessage&&n.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(n)),n.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(n.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(n.copyrightContent),this.options.copyrightContent=n.copyrightContent),!n.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):n.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!n.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):n.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=n},Tl.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©"+t+" TomTom"];return this.options.showLogo||e.push("©"+t+" Microsoft"),e},Tl.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Tl.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},Tl.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=H("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),K(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Tl.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=H("Visit microsoft.com"),this.container.appendChild(this.logoTooltip),K(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)},Tl);function Tl(t){var e=xl.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new wl).merge(t),e}var Cl=(Ol.throwOnError=function(t,e){function n(t){throw o.off("error",n),t.error}var o=t instanceof Mu?t._getMap():t;o.on("error",n);e=e();return o.off("error",n),e},Ol.tryCatch=function(t,e,n,o){try{return this.throwOnError(t,e)}catch(t){return n(t)}finally{"function"==typeof o&&o()}},Ol.tryFinally=function(t,e,n){try{return this.throwOnError(t,e)}finally{n()}},Ol);function Ol(){}var kl=(Il.prototype.request=function(t){var e={domain:this.map.getServiceOptions().domain,path:"search/address/reverse/json",queryParams:I({"api-version":"1.0",language:t.style.language,limit:1,query:Dr(t.position[1])+","+zr(t.position[0])},t.style.view&&{view:t.style.view})};return new F(null===(t=this.map.authentication)||void 0===t?void 0:t.signRequest(e)).get()},Il);function Il(t){this.map=t}var Ll=(Al.prototype.cache=function(t,e,n,o){o=t+"_"+n[0]+"_"+n[1]+"_"+o;this._labelIdx[e.labelType]||(this._labelIdx[e.labelType]=[],this._labelCache[e.labelType]=[]),-1===this._labelIdx[e.labelType].indexOf(o)&&(this._labelCache[e.labelType].push({name:t,radius:e.radius,minZoom:e.minZoom,maxZoom:e.maxZoom||24,position:n}),this._labelIdx[e.labelType].push(o))},Al.prototype.getNearestLabel=function(t,e,n){var o=null,r=this._labelCache[t];if(r)for(var i,s=1/0,a=0,l=r.length;a<l;a++)n>=r[a].minZoom&&n<=r[a].maxZoom&&((i=Tr(r[a].position,e))<=r[a].radius&&i<=s&&(s=i,o=r[a]));return o},Al.prototype._preloadCache=function(t){if(!this._preloadedCache.has(t)){this._preloadedCache.add(t);var e={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},n=t,o=n.indexOf("-");switch(n=-1!==o?n.substr(0,o):n){case"fr":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océan Atlantique",e,[-40,32],t),this.cache("Océan Atlantique",e,[-17,-29],t);break;case"es":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océano Atlántico",e,[-40,32],t),this.cache("Océano Atlántico",e,[-17,-29],t);break;case"pt":this.cache("Oceano Pacífico",e,[-170,32],t),this.cache("Oceano Pacífico",e,[-138,-27],t),this.cache("Oceano Atlântico",e,[-40,32],t),this.cache("Oceano Atlântico",e,[-17,-29],t);break;case"ja":this.cache("太平洋",e,[-170,32],t),this.cache("太平洋",e,[-138,-27],t);break;case"en":this.cache("Pacific Ocean",e,[-170,32],t),this.cache("Pacific Ocean",e,[-138,-27],t),this.cache("Atlantic Ocean",e,[-40,32],t),this.cache("Atlantic Ocean",e,[-17,-29],t),this.cache("Indian Ocean",e,[77,-26],t)}}},Al);function Al(){this._labelCache={},this._labelIdx={},this._preloadedCache=new Set}var Pl=(Rl.prototype.dispose=function(){this._disposed=!0;var t=this._map._getMap();t.off("move",this._onMove),t.off("moveend",this._onMoveEnd),t.off("styledata",this._onStyleData),t.off("rotate",this._onRotate);t=this._map.getCanvas();t.removeEventListener("mousedown",this._onPointerDown),t.removeEventListener("touchstart",this._onPointerDown),this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},Rl.prototype._getEventPos=function(t){if("touches"in t){var e=t.touches[0],n=t.target.getBoundingClientRect();return[e.pageX-n.left,e.pageY-n.top]}return[t.offsetX,t.offsetY]},Rl.prototype._checkThresholds=function(t,e){return this._checkZoomThreshold(t.zoom,e.zoom)||this._checkPitchThreshold(t.pitch,e.pitch)||this._checkLocThreshold(t.center,e.center)||this._checkHeadingThreshold(t.bearing,e.bearing)},Rl.prototype._checkZoomThreshold=function(t,e){return this._round(t)!==this._round(e)},Rl.prototype._checkPitchThreshold=function(t,e){return Math.abs(t-e)>=this._pitchThreshold},Rl.prototype._checkLocThreshold=function(t,e){e=R(this._map.positionsToPixels([e,t]),2),t=e[0],e=e[1];return Yo.getDistance(t,e)>=this._moveThreshold},Rl.prototype._checkHeadingThreshold=function(t,e){t<0&&(t+=360),e<0&&(e+=360);e=Math.abs(t-e);return(e=180<e?360-e:e)>=this._headingThreshold},Rl.prototype._getLocDesc=function(h,p,d){return L(this,void 0,void 0,function(){var e,n,o,r,i,s,a,l,c,u=this;return A(this,function(t){switch(t.label){case 0:return"blank"===d?[3,3]:this._map._getMap().loaded()?[3,2]:[4,new Promise(function(t){return u._map._getMap().once("idle",t)})];case 1:t.sent(),t.label=2;case 2:for(e={},n=this._map.positionsToPixels([h.center])[0],Cl.tryCatch(this._map,function(){o=u._map._getMap().queryRenderedFeatures(n,{layers:u._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})},function(){}),r=null,o&&0<o.length&&(r=o[0]),i=null,s=0,a=this._lableConfig.length;s<a;s++)l=this._lableConfig[s],h.zoom>=l.minZoom?l.polygonSources?r&&-1!==l.polygonSources.indexOf(r.layer["source-layer"])?(i=l.labelType,this._getClosestLabel(l,h,p,e,!1)):this._getClosestLabel(l,h,p,e,!0):this._getClosestLabel(l,h,p,e,!1):this._getClosestLabel(l,h,p,e,!0);return 8<=h.zoom&&this._processRoads(e,h,p),this._labelCache.forEach(function(t){e[t]||(c=null,(c="water"!==t&&"majorPoi"!==t||t===i?Rl._labelCache.getNearestLabel(t,h.center,h.zoom):c)&&(e[t]=c.name))}),[2,this._processLocInfo(h,i,e,!0,this._restFallback)];case 3:return[2,this._processLocInfo(h,null,null,!1,!1)]}})})},Rl.prototype._getHeadingDesc=function(t){var e=t.bearing;switch(e<0&&(e+=360),e=this._round(e,this._headingThreshold)){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return e+" degrees"}},Rl.prototype._getClosestLabel=function(t,e,n,o,r){for(var i=t.radius,s=0,a=t.source.length;s<a;s++){var l={sourceLayer:t.source[s]},c=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,l),u=null,h=1/0,p=this._labelCache.has(t.labelType);if(!r||p)for(var d=0,f=c.length;d<f;d++){var m,g="Point"===c[d].geometry.type?c[d]:Xr(e.center,c[d].geometry);r||(m="Point"===c[d].geometry.type?Tr(e.center,g.geometry.coordinates):g.properties.distance)<h&&(h=m,u=c[d]),p&&Rl._labelCache.cache(c[d].properties.name,t,g.geometry.coordinates,n)}r||(l=t.labelType+"Dis",u&&h<=i&&("number"!=typeof o[l]||h<=o[l])&&(o[t.labelType]=u.properties.name,o[l]=h))}},Rl.prototype._processRoads=function(t,e,n,o){var r=this._map._getMap().queryRenderedFeatures(o,{filter:["==",["geometry-type"],"LineString"]});if(r){for(var i,s=void 0,a=void 0,l=void 0,c=void 0,u=0,h=r.length;u<h;u++)this._roadLayers.has(r[u].layer["source-layer"])&&r[u].properties.name&&""!==r[u].properties.name&&(i=Xr(e.center,r[u]),(!l||i.properties.distance<l.properties.distance)&&(s&&r[u].properties.name===s.properties.name?l=i:s&&r[u].properties.name===s.properties.name?(!c||i.properties.distance<c.properties.distance)&&(c=i,a=r[u]):(c=l,a=s,l=i,s=r[u])));s&&(t.country||(t.country=s.properties.country_code,t.countryDis=0,Rl._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},l.geometry.coordinates,n)),t.state||(t.state=s.properties.country_subdivision,t.stateDis=0,Rl._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},l.geometry.coordinates,n)),15<=e.zoom&&(o=this._map.positionsToPixels([e.center,l.geometry.coordinates]),(Yo.getDistance(o[0],o[1])<this._roadPixelRadius||l.properties.distance<this._minRoadDistance)&&(t.road=s.properties.name),a&&(n=this._map.positionsToPixels([c.geometry.coordinates]),(Yo.getDistance(o[0],n[0])<this._minIntersectionPixelDistance||c.properties.distance<this._minRoadDistance)&&(t.secondRoad=a.properties.name,t.secondRoadDis=c.properties.distance))))}},Rl.prototype._getActionDesc=function(t){if(this._lastCam){var e,n,o=[];return this._checkLocThreshold(t.center,this._lastCam.center)&&(n=["panned"],0===(e=Math.round(Lr(this._lastCam.center,t.center)))||360===e?n.push("north"):e<90?n.push("north east"):90===e?n.push("east"):e<180?n.push("south east"):180===e?n.push("south"):e<270?n.push("south west"):270===e?n.push("west"):e<360&&n.push("north west"),e=Tr(this._lastCam.center,t.center,tr.meters),n.push(1e3<e?Sr(e/1e3,2)+" kilometers":Sr(e,2)+" meters"),o.push(n.join(" "))),this._checkZoomThreshold(t.zoom,this._lastCam.zoom)&&((n=["zoomed"]).push(this._lastCam.zoom<t.zoom?"in":"out"),1<=(e=Math.abs(this._lastCam.zoom-t.zoom))&&(e=Math.ceil(e),n.push(1<e?e+" levels":e+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(t.zoom)&&n.push("to "+this._getCanonicalZoom(t.zoom)+" level"),t.zoom>=t.maxZoom&&n.push("Zoom In button disabled, maximum zoom level reached"),e=li.getSouth(t.bounds)<=-lr&&li.getNorth(t.bounds)>=lr,(t.zoom<=t.minZoom||e)&&n.push("Zoom Out button disabled, minimum zoom level reached"),o.push(n.join(" "))),this._checkPitchThreshold(t.pitch,this._lastCam.pitch)&&(n=this._round(t.pitch,this._pitchThreshold),o.push("pitched to "+n+" degrees"),60!==t.pitch&&0!==t.pitch||(n=60===t.pitch?"maximum":"minimum",o.push("reached "+n+" of "+t.pitch+" degrees"))),this._checkHeadingThreshold(this._lastCam.bearing,t.bearing)&&o.push("rotated to "+this._getHeadingDesc(t)),o.join(" and ")||null}return null},Rl.prototype._getCanonicalZoom=function(t){return(t=this._round(t))<2?"world":t<5?"country":t<11?"state province":t<15?"city":"street"},Rl.prototype._processLocInfo=function(r,i,s,a,l){var c=this;return new Promise(function(e,t){var n=[];if(a){var o=[];if(s&&(i&&("water"===i&&s.water?o.push(s.water):"majorPoi"===i&&s.majorPoi&&o.push(s.majorPoi)),0===o.length&&(s.majorPoi&&8<=r.zoom?o.push(s.majorPoi):(s.poi&&14<=r.zoom?o.push(s.poi):s.road&&15<=r.zoom&&(s.secondRoad?o.push(s.road+" & "+s.secondRoad):o.push(s.road)),s.neighbourhood&&12<=r.zoom&&o.push(s.neighbourhood),s.city&&6<=r.zoom&&o.push(s.city)),s.state&&4<=r.zoom&&o.push(s.state),0===o.length?s.water?o.push(s.water):s.country&&o.push(s.country):1===o.length&&s.state&&4<=r.zoom&&s.country&&o.push(s.country))),0<o.length)n.push("<p>Location: ",o.join(", "),".</p>");else if(l&&"water"!==i)return void c._reverseGeocodeDescription(r).then(function(t){e(t)},function(){t("<p>Location: unknown</p>")})}c._returnDetailedDescriptions&&(n.push("<p>Zoom: ",Sr(r.zoom,2),".</p>"),n.push("<p>Latitude: ",Sr(r.center[1],5),".</p>"),n.push("<p>Longitude: ",Sr(r.center[0],5),".</p>")),e(n.join(""))})},Rl.prototype._reverseGeocodeDescription=function(r){var i=this;return new Promise(function(n){var o=i._map.getStyle();i._reverseSearch.request({position:r.center,style:o}).then(function(t){var e={};t&&t.addresses&&0<t.addresses.length&&t.addresses[0].address&&((t=t.addresses[0].address).country&&(e.country=t.country,Rl._labelCache.cache(e.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},r.center,o.language)),t.countrySubdivision&&(e.state=t.countrySubdivision,Rl._labelCache.cache(e.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},r.center,o.language)),t.municipality&&(e.city=t.municipality,Rl._labelCache.cache(e.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},r.center,o.language)),t.streetNameAndNumber?e.road=t.streetNameAndNumber:t.street&&(e.road=t.street)),i._processLocInfo(r,null,e,!0,!1).then(function(t){n(t)})},function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})}).catch(function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})})})},Rl.prototype._round=function(t,e){return void 0===e&&(e=1),Math.round(t/e)*e},Rl);function Rl(t,e){var i=this;this._disposed=!1,this._lastHeadingTime=0,this._actionQueue=[],this._pointerUpdateDelay=3e3,this._camUpdateDelay=1e3,this._headUpdateLimit=1e3,this._controlEventDelay=500,this._moveThreshold=25,this._headingThreshold=5,this._pitchThreshold=5,this._roadPixelRadius=120,this._minRoadDistance=25,this._minIntersectionPixelDistance=50,this._baseVectorTileSourceId="microsoft.base",this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}],this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"],this._labelCache=new Set(["city","state","country","water","majorPoi"]),this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]),this._returnDetailedDescriptions=!1,this._shortcutListener=function(r){return L(i,void 0,void 0,function(){var e,n,o;return A(this,function(t){switch(t.label){case 0:return r.altKey&&r.ctrlKey&&68===r.keyCode?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),[4,this._getLocDesc(e,n,o)]):[3,2];case 1:o=t.sent(),this._descCallback(o),t.label=2;case 2:return[2]}})})},this._onRotate=function(){i._rotateTimeout||(Date.now()-i._lastHeadingTime>=i._headUpdateLimit?i._rotateTimeout=setTimeout(i._updateHeading,ct.RotationDuration+25):i._rotateTimeout=setTimeout(i._updateHeading,i._headUpdateLimit-(Date.now()-i._lastHeadingTime)))},this._onMove=function(){i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._controlTimeout&&(clearTimeout(i._controlTimeout),delete i._controlTimeout)},this._onMoveEnd=function(t){t.fromControl?i._controlTimeout=setTimeout(i._updateCam,i._controlEventDelay):i._updateCam()},this._onStyleData=function(){setTimeout(i._updateStyle)},this._onPointerDown=function(t){i._lastPointerPos=i._getEventPos(t),i._pointerTimeout=setTimeout(function(){return L(i,void 0,void 0,function(){var e,n,o;return A(this,function(t){switch(t.label){case 0:return n=this._map.getStyle(),e=n.language.toLowerCase(),o=n.style.toLowerCase(),(n=this._map.getCamera()).center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(n,e,o)];case 1:return o=t.sent(),this._descCallback(o),this._onPointerUp(),[2]}})})},i._pointerUpdateDelay),i._map.getCanvas().addEventListener("mousemove",i._onPointerMove),i._map.getCanvas().addEventListener("touchmove",i._onPointerMove),i._map.getCanvas().addEventListener("mouseup",i._onPointerUp),i._map.getCanvas().addEventListener("touchend",i._onPointerUp)},this._onPointerMove=function(t){var e=i._getEventPos(t),t=i._lastPointerPos[0]-e[0],e=i._lastPointerPos[1]-e[1];Math.sqrt(t*t+e*e)>i._moveThreshold&&i._onPointerUp()},this._onPointerUp=function(){clearTimeout(i._pointerTimeout),delete i._pointerTimeout,i._map.getCanvas().removeEventListener("mousemove",i._onPointerMove),i._map.getCanvas().removeEventListener("touchmove",i._onPointerMove),i._map.getCanvas().removeEventListener("mouseup",i._onPointerUp),i._map.getCanvas().removeEventListener("touchend",i._onPointerUp)},this._updateHeading=function(){var t,e=i._map.getCamera();i._lastHead&&!i._checkHeadingThreshold(e.bearing,i._lastHead)||(t=i._getHeadingDesc(e),i._lastHead=e.bearing,i._descCallback("<p>Map heading "+t+".</p>"),i._lastHeadingTime=Date.now()),delete i._rotateTimeout},this._updateStyle=function(){return L(i,void 0,void 0,function(){var e,n,o,r;return A(this,function(t){switch(t.label){case 0:return(e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),this._lastLang===n)?[3,2]:(Rl._labelCache._preloadCache(n),[4,this._getLocDesc(e,n,o)]);case 1:return r=t.sent(),[3,4];case 2:return this._lastStyle===o||"blank"!==this._lastStyle?[3,4]:[4,this._getLocDesc(e,n,o)];case 3:r=t.sent(),t.label=4;case 4:return this._lastLang=n,this._lastStyle=o,r&&this._descCallback(r),[2]}})})},this._updateCam=function(t){void 0===t&&(t=!1);var n,o,e,r=i._map.getCamera();(!i._lastCam||0<i._actionQueue.length||i._checkThresholds(r,i._lastCam))&&(e=i._map.getStyle(),n=e.language.toLowerCase(),o=e.style.toLowerCase(),(e=i._getActionDesc(r))&&i._actionQueue.push(e),i._lastCam=r,i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._moveTimeout=setTimeout(function(){return L(i,void 0,void 0,function(){var e;return A(this,function(t){switch(t.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(r,n,o)];case 1:return e=t.sent(),0<this._actionQueue.length?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".</p>"+e),this._actionQueue=[]):this._descCallback(e),[2]}})})},t?0:i._camUpdateDelay))},this._map=t,this._restFallback=t.getServiceOptions().enableAccessibilityLocationFallback,this._descCallback=e,this._reverseSearch=new kl(t),Rl._labelCache||(Rl._labelCache=new Ll),this._lastLang=this._map.getStyle().language.toLowerCase(),Rl._labelCache._preloadCache(this._lastLang),this._map.events.addOnce("idle",function(){var t;i._disposed||(i._updateCam(!0),(t=i._map._getMap()).on("move",i._onMove),t.on("moveend",i._onMoveEnd),t.on("styledata",i._onStyleData),t.on("rotate",i._onRotate),(t=i._map.getCanvas()).addEventListener("mousedown",i._onPointerDown),t.addEventListener("touchstart",i._onPointerDown))}),this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}var Nl,Ml,Dl=function(t){var n=this;this.addToMap=function(){n.initializeMapLiveStateInfo(),n.initializeMapStyleInfo(),n.createMapKeyBindingInfo(),n.map.getMapContainer().setAttribute("role","application"),n.map.getMapContainer().setAttribute("aria-label","Map Application"),n.map.getCanvas().setAttribute("aria-label","Interactive Map"),n.map.getCanvas().setAttribute("aria-describedby","atlas-map-state atlas-map-style atlas-map-shortcuts"),n.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=n.mapViewDesc&&n.mapViewDesc.dispose(),delete n.mapViewDesc,null!=n.atlasMapKeyBindings&&n.map.getCanvasContainer().removeChild(n.atlasMapKeyBindings),delete n.atlasMapKeyBindings,null!=n.atlasMapLiveStateInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapLiveStateInfo),delete n.atlasMapLiveStateInfo,null!=n.atlasMapStyleInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapStyleInfo),delete n.atlasMapStyleInfo,n.map.getMapContainer().removeAttribute("role"),n.map.getMapContainer().removeAttribute("aria-label"),n.map.getCanvas().removeAttribute("aria-label"),n.map.getCanvas().removeAttribute("aria-describedby"),n.map.getCanvas().removeAttribute("alt"),n.map.events.remove("styledata",n.updateMapStyle)},this.createMapKeyBindingInfo=function(){n.atlasMapKeyBindings=document.createElement("div"),n.atlasMapKeyBindings.setAttribute("tabindex","-1"),n.atlasMapKeyBindings.setAttribute("aria-hidden","true"),n.atlasMapKeyBindings.id="atlas-map-shortcuts",n.atlasMapKeyBindings.classList.add("hidden-accessible-element"),n.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"),n.map.getCanvasContainer().appendChild(n.atlasMapKeyBindings),n.atlasMapKeyBindings.setAttribute("aria-live","polite");var t=[189,187,38,37,39,40],e=n.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(n.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){n.mapViewDesc=new Pl(n.map,n.updateMapState),n.atlasMapLiveStateInfo=document.createElement("div"),n.atlasMapLiveStateInfo.setAttribute("tabindex","-1"),n.atlasMapLiveStateInfo.setAttribute("aria-hidden","true"),n.atlasMapLiveStateInfo.id="atlas-map-state",n.atlasMapLiveStateInfo.classList.add("hidden-accessible-element"),n.map.getCanvasContainer().appendChild(n.atlasMapLiveStateInfo),n.atlasMapLiveStateInfo.setAttribute("aria-live","assertive")},this.initializeMapStyleInfo=function(){n.atlasMapStyleInfo=document.createElement("div"),n.atlasMapStyleInfo.setAttribute("tabindex","-1"),n.atlasMapStyleInfo.setAttribute("aria-hidden","true"),n.atlasMapStyleInfo.id="atlas-map-style",n.atlasMapStyleInfo.classList.add("hidden-accessible-element"),n.updateMapStyle(),n.map.events.add("styledata",n.updateMapStyle),n.map.getCanvasContainer().appendChild(n.atlasMapStyleInfo),n.atlasMapStyleInfo.setAttribute("aria-live","polite")},this.updateMapStyle=function(){n.atlasMapStyleInfo.innerHTML="<p>Map style: "+n.map.getStyle().style+".</p>"},this.updateMapState=function(t){n.atlasMapLiveStateInfo.innerHTML=t},this.map=t},zl=function(t){var n=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!n.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.");n.listenerEnabled||(n.map.events.add("styledata",n.addToMap),n.listenerEnabled=!0);var t,e=n.map.getTraffic();"none"===e.flow||(t=n.map.layers.getLayerById("traffic_"+e.flow))&&(n.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;n.map.getTraffic();"none"!=n.lastFlowMode&&((t=n.map.layers.getLayerById("traffic_"+n.lastFlowMode))&&t._updateLayoutProperty("visibility","none","visible"),n.lastFlowMode="none"),n.listenerEnabled&&(n.map.events.remove("styledata",n.addToMap),n.listenerEnabled=!1)},this.map=t},Bl=(k(jl,Nl=Ko),jl.getIncidentTypeName=function(t,e){switch(t){case 0:return e.Unknown;case 1:return e.Accident;case 2:return e.Fog;case 3:return e.Danger;case 4:return e.Rain;case 5:return e.Ice;case 6:return e.Jam;case 7:return e.LaneClosed;case 8:return e.RoadClosed;case 9:return e.RoadWorks;case 10:return e.Wind;case 11:return e.Flood;case 12:return e.Detour;default:return e.Unknown}},jl.getIncidentTypeIconName=function(t){switch(t){case 0:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour";default:return"unknown"}},jl.getSeverityColorName=function(t){switch(t){case 0:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red";default:return"grey"}},jl.getSeverityColorHexCode=function(t){switch(t){case 0:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E";default:return"#B5B6B7"}},jl);function jl(t,e,n){var o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=t.icon_category_12)&&void 0!==r?r:t.icon_category_11)&&void 0!==o?o:t.icon_category_10)&&void 0!==r?r:t.icon_category_9)&&void 0!==o?o:t.icon_category_8)&&void 0!==r?r:t.icon_category_7)&&void 0!==o?o:t.icon_category_6)&&void 0!==r?r:t.icon_category_5)&&void 0!==o?o:t.icon_category_4)&&void 0!==r?r:t.icon_category_3)&&void 0!==o?o:t.icon_category_2)&&void 0!==r?r:t.icon_category_1)&&void 0!==o?o:t.icon_category_0)&&void 0!==r?r:t.icon_category,r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=t.description_12)&&void 0!==r?r:t.description_11)&&void 0!==r?r:t.description_10)&&void 0!==r?r:t.description_9)&&void 0!==r?r:t.description_8)&&void 0!==r?r:t.description_7)&&void 0!==r?r:t.description_6)&&void 0!==r?r:t.description_5)&&void 0!==r?r:t.description_4)&&void 0!==r?r:t.description_3)&&void 0!==r?r:t.description_2)&&void 0!==r?r:t.description_1)&&void 0!==r?r:t.description_0)&&void 0!==r?r:t.description,t={icon:jl.getSeverityColorName(t.magnitude)+"-"+jl.getIncidentTypeIconName(o),incidentType:jl.getIncidentTypeName(o,n),description:r,delay:t.delay,color:jl.getSeverityColorHexCode(t.magnitude),id:t.id};return Nl.call(this,e,t)||this}(b=Ml=Ml||{}).DELAY="delay",b.LENGTH="length",b.FROM="from",b.TO="to";var Fl=(Ul.build=function(t,e){void 0===e&&(e="en-US");var n=document.createElement("div");n.classList.add("incident-popup-title"),n.classList.add("font-segoeui-b"),n.innerText=t.properties.incidentType,n.setAttribute("aria-label","Incident Type "+t.properties.incidentType);var o=document.createElement("div");o.classList.add("incident-popup-subtitle"),o.classList.add("font-segoeui-b"),o.setAttribute("aria-label","Incident Description "+t.properties.description),o.innerText=t.properties.description;var r=document.createElement("div");r.classList.add("incident-popup-header"),r.style.backgroundColor=t.properties.color,r.appendChild(n),r.appendChild(o);var i,s,a,o=document.createElement("div");o.classList.add("incident-popup-body"),t.properties.delay&&(i=Math.floor(t.properties.delay/60)+" min",i=this.createInfoSection(i,Ml.DELAY),o.appendChild(i)),t.properties.length&&(i=new Intl.NumberFormat([e,"en-US"],{maximumFractionDigits:2}),a=void 0,a="en-US"===e?(s=xr(t.properties.length,"meters","miles"),i.format(s)+" miles"):(s=xr(t.properties.length,"meters","kilometers"),i.format(s)+" km"),a=this.createInfoSection(a,Ml.LENGTH),o.appendChild(a)),t.properties.from&&(a=this.createInfoSection(t.properties.from,Ml.FROM),o.appendChild(a)),t.properties.to&&(l=this.createInfoSection(t.properties.to,Ml.TO),o.appendChild(l));var l=document.createElement("div");return l.classList.add("incident-popup-content"),l.appendChild(r),l.appendChild(o),new oa({content:l,position:t.geometry.coordinates})},Ul.createInfoSection=function(t,e){var n=document.createElement("div");n.classList.add("incident-popup-info");var o=document.createElement("div");o.classList.add("icon"),o.classList.add(e);var r=document.createElement("span");return r.classList.add("message"),r.classList.add("font-segoeui"),r.setAttribute("aria-label","Incident "+e+" "+t),r.innerText=t,n.appendChild(o),n.appendChild(r),n},Ul);function Ul(){}var ql=(Gl.prototype.getIncidentIconImageExpression=function(){return["concat",["let","magnitude",["get","magnitude"],["case",["==",["var","magnitude"],0],"grey",["==",["var","magnitude"],1],"yellow",["==",["var","magnitude"],2],"orange",["==",["var","magnitude"],3],"red",["==",["var","magnitude"],4],"grey","grey"]],"-",["let","category",["coalesce",["get","icon_category_12"],["get","icon_category_11"],["get","icon_category_10"],["get","icon_category_9"],["get","icon_category_8"],["get","icon_category_7"],["get","icon_category_6"],["get","icon_category_5"],["get","icon_category_4"],["get","icon_category_3"],["get","icon_category_2"],["get","icon_category_0"],["get","icon_category"],0],["case",["==",["var","category"],0],"unknown",["==",["var","category"],1],"accident",["==",["var","category"],2],"fog",["==",["var","category"],3],"danger",["==",["var","category"],4],"rain",["==",["var","category"],5],"ice",["==",["var","category"],6],"jam",["==",["var","category"],7],"lane-closed",["==",["var","category"],8],"road-closed",["==",["var","category"],9],"road-work",["==",["var","category"],10],"wind",["==",["var","category"],11],"flood",["==",["var","category"],12],"detour","unknown"]]]},Gl);function Gl(t){var r=this;this.incidentLayerName="incidents",this.incidentSourceName="mapcontrol_traffic_incident",this.addToMap=function(){r.map.sources.getById(r.incidentSourceName)||r.map.sources.add(r.vectorTileSource),r.map.layers.getLayerById(r.incidentLayerName)||r.map.layers.add(r.incidentLayer,"labels"),r.popup=new oa({position:[0,0],pixelOffset:[0,-18]}),r.map.addEventListener("mouseover",r.incidentLayerName,r.cursorToPointer),r.map.addEventListener("mouseleave",r.incidentLayerName,r.cursorToDefault),r.map.addEventListener("click",r.incidentLayerName,r.openIncidentPopup)},this.removeFromMap=function(){null!=r.map.layers.getLayerById(r.incidentLayerName)&&r.map.layers.remove(r.incidentLayerName),null!=r.map.sources.getById(r.incidentSourceName)&&r.map.sources.remove(r.incidentSourceName)},this.cursorToPointer=function(t){r.map.getCanvas().style.cursor="pointer"},this.cursorToDefault=function(t){r.map.getCanvas().style.cursor=""},this.openIncidentPopup=function(t){r.popup.remove();var n=t.position,o=t.features[0];r.map._getLocalizedStrings().then(function(t){var e=new Jo(new ti(n[0],n[1])),t=new Bl(o.properties,e,t);r.popup=Fl.build(t,r.incidentLanguage),r.popup.open(r.map)})},this.map=t,this.vectorTileSource=new Ui(this.incidentSourceName,{maxZoom:22,tiles:["https://"+c+"/traffic/incident/tile/pbf?api-version=1.0&zoom={z}&x={x}&y={y}"]});t=this.getIncidentIconImageExpression();this.incidentLayer=new qs(this.incidentSourceName,this.incidentLayerName,{sourceLayer:"Traffic incident POI",iconOptions:{ignorePlacement:!0,allowOverlap:!0,image:t,size:.75}})}var Zl,Hl=(k(Kl,Zl=M),Kl);function Kl(){var t=null!==Zl&&Zl.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 Wl=(Vl.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Vl.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},Vl);function Vl(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var Yl=(Ql.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)},Ql.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)},Ql);function Ql(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 Jl=(Xl.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},Xl.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},Xl.prototype.setOptions=function(t){this.options=(new Hl).merge(this.options,t),this.added&&this._setInteractions(this.options)},Xl.prototype.getOptions=function(){return Object.assign({},this.options)},Xl.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())},Xl);function Xl(t,e){this.added=!1,this.map=t,this.focusShortcut=new Wl(t),this.pinchZoom=new Yl(t),this.options=(new Hl).merge(e)}function $l(t,e,n){var o={type:"Feature"};return 0!==(n=void 0===n?{}:n).id&&!n.id||(o.id=n.id),n.bbox&&(o.bbox=n.bbox),o.properties=e||{},o.geometry=t,o}function tc(t){return"Feature"===t.type?t.geometry:t}var ec=At(function(t,e){t.exports=function(){function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false;o.configurable=true;if("value"in o)o.writable=true;Object.defineProperty(t,o.key,o)}}function s(t,e,n){if(e)o(t.prototype,e);if(n)o(t,n);return t}var u=function(){function t(t,e){this.next=null;this.key=t;this.data=e;this.left=null;this.right=null}return t}();function e(t,e){return t>e?1:t<e?-1:0}function a(t,e,n){var o=new u(null,null);var r=o;var i=o;while(true){var s=n(t,e.key);if(s<0){if(e.left===null)break;if(n(t,e.left.key)<0){var a=e.left;e.left=a.right;a.right=e;e=a;if(e.left===null)break}i.left=e;i=e;e=e.left}else if(s>0){if(e.right===null)break;if(n(t,e.right.key)>0){var a=e.right;e.right=a.left;a.left=e;e=a;if(e.right===null)break}r.right=e;r=e;e=e.right}else break}r.right=e.left;i.left=e.right;e.left=o.right;e.right=o.left;return e}function l(t,e,n,o){var r=new u(t,e);if(n===null){r.left=r.right=null;return r}n=a(t,n,o);var i=o(t,n.key);if(i<0){r.left=n.left;r.right=n;n.left=null}else if(i>=0){r.right=n.right;r.left=n;n.right=null}return r}function h(t,e,n){var o=null;var r=null;if(e){e=a(t,e,n);var i=n(e.key,t);if(i===0){o=e.left;r=e.right}else if(i<0){r=e.right;e.right=null;o=e}else{o=e.left;e.left=null;r=e}}return{left:o,right:r}}function p(t,e,n){if(e===null)return t;if(t===null)return e;e=a(t.key,e,n);e.left=t;return e}function d(t,e,n,o,r){if(t){o(""+e+(n?"└── ":"├── ")+r(t)+"\n");var i=e+(n?" ":"│ ");if(t.left)d(t.left,i,false,o,r);if(t.right)d(t.right,i,true,o,r)}}var A=function(){function t(t){if(t===void 0)t=e;this._root=null;this._size=0;this._comparator=t}t.prototype.insert=function(t,e){this._size++;return this._root=l(t,e,this._root,this._comparator)};t.prototype.add=function(t,e){var n=new u(t,e);if(this._root===null){n.left=n.right=null;this._size++;this._root=n}var o=this._comparator;var r=a(t,this._root,o);var i=o(t,r.key);if(i===0)this._root=r;else{if(i<0){n.left=r.left;n.right=r;r.left=null}else if(i>0){n.right=r.right;n.left=r;r.right=null}this._size++;this._root=n}return this._root};t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)};t.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=a(t,e,n);var r=n(t,e.key);if(r===0){if(e.left===null)o=e.right;else{o=a(t,e.left,n);o.right=e.right}this._size--;return o}return e};t.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;this._root=a(t.key,this._root,this._comparator);this._root=this._remove(t.key,this._root,this._comparator);return{key:t.key,data:t.data}}return null};t.prototype.findStatic=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return e;else if(o<0)e=e.left;else e=e.right}return null};t.prototype.find=function(t){if(this._root){this._root=a(t,this._root,this._comparator);if(this._comparator(t,this._root.key)!==0)return null}return this._root};t.prototype.contains=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return true;else if(o<0)e=e.left;else e=e.right}return false};t.prototype.forEach=function(t,e){var n=this._root;var o=[];var r=false;while(!r)if(n!==null){o.push(n);n=n.left}else if(o.length!==0){n=o.pop();t.call(e,n);n=n.right}else r=true;return this};t.prototype.range=function(t,e,n,o){var r=[];var i=this._comparator;var s=this._root;var a;while(r.length!==0||s)if(s){r.push(s);s=s.left}else{s=r.pop();a=i(s.key,e);if(a>0)break;else if(i(s.key,t)>=0)if(n.call(o,s))return this;s=s.right}return this};t.prototype.keys=function(){var n=[];this.forEach(function(t){var e=t.key;return n.push(e)});return n};t.prototype.values=function(){var n=[];this.forEach(function(t){var e=t.data;return n.push(e)});return n};t.prototype.min=function(){if(this._root)return this.minNode(this._root).key;return null};t.prototype.max=function(){if(this._root)return this.maxNode(this._root).key;return null};t.prototype.minNode=function(t){if(t===void 0)t=this._root;if(t)while(t.left)t=t.left;return t};t.prototype.maxNode=function(t){if(t===void 0)t=this._root;if(t)while(t.right)t=t.right;return t};t.prototype.at=function(t){var e=this._root;var n=false;var o=0;var r=[];while(!n)if(e){r.push(e);e=e.left}else if(r.length>0){e=r.pop();if(o===t)return e;o++;e=e.right}else n=true;return null};t.prototype.next=function(t){var e=this._root;var n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0){n=e;e=e.left}else e=e.right}return n};t.prototype.prev=function(t){var e=this._root;var n=null;if(t.left!==null){n=t.left;while(n.right)n=n.right;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0)e=e.left;else{n=e;e=e.right}}return n};t.prototype.clear=function(){this._root=null;this._size=0;return this};t.prototype.toList=function(){return n(this._root)};t.prototype.load=function(t,e,n){if(e===void 0)e=[];if(n===void 0)n=false;var o=t.length;var r=this._comparator;if(n)v(t,e,0,o-1,r);if(this._root===null){this._root=f(t,e,0,o);this._size=o}else{var i=y(this.toList(),m(t,e),r);o=this._size+o;this._root=g({head:i},0,o)}return this};t.prototype.isEmpty=function(){return this._root===null};Object.defineProperty(t.prototype,"size",{get:function t(){return this._size},enumerable:true,configurable:true});Object.defineProperty(t.prototype,"root",{get:function t(){return this._root},enumerable:true,configurable:true});t.prototype.toString=function(t){if(t===void 0)t=function t(e){return String(e.key)};var e=[];d(this._root,"",true,function(t){return e.push(t)},t);return e.join("")};t.prototype.update=function(t,e,n){var o=this._comparator;var r=h(t,this._root,o),i=r.left,s=r.right;if(o(t,e)<0)s=l(e,n,s,o);else i=l(e,n,i,o);this._root=p(i,s,o)};t.prototype.split=function(t){return h(t,this._root,this._comparator)};return t}();function f(t,e,n,o){var r=o-n;if(r>0){var i=n+Math.floor(r/2);var s=t[i];var a=e[i];var l=new u(s,a);l.left=f(t,e,n,i);l.right=f(t,e,i+1,o);return l}return null}function m(t,e){var n=new u(null,null);var o=n;for(var r=0;r<t.length;r++)o=o.next=new u(t[r],e[r]);o.next=null;return n.next}function n(t){var e=t;var n=[];var o=false;var r=new u(null,null);var i=r;while(!o)if(e){n.push(e);e=e.left}else if(n.length>0){e=i=i.next=n.pop();e=e.right}else o=true;i.next=null;return r.next}function g(t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2);var i=g(t,e,r);var s=t.head;s.left=i;t.head=t.head.next;s.right=g(t,r+1,n);return s}return null}function y(t,e,n){var o=new u(null,null);var r=o;var i=t;var s=e;while(i!==null&&s!==null){if(n(i.key,s.key)<0){r.next=i;i=i.next}else{r.next=s;s=s.next}r=r.next}if(i!==null)r.next=i;else if(s!==null)r.next=s;return o.next}function v(t,e,n,o,r){if(n>=o)return;var i=t[n+o>>1];var s=n-1;var a=o+1;while(true){do{s++}while(r(t[s],i)<0);do{a--}while(r(t[a],i)>0);if(s>=a)break;var l=t[s];t[s]=t[a];t[a]=l;l=e[s];e[s]=e[a];e[a]=l}v(t,e,n,a,r);v(t,e,a+1,o,r)}var _=function t(e,n){return e.ll.x<=n.x&&n.x<=e.ur.x&&e.ll.y<=n.y&&n.y<=e.ur.y},P=function t(e,n){if(n.ur.x<e.ll.x||e.ur.x<n.ll.x||n.ur.y<e.ll.y||e.ur.y<n.ll.y)return null;var o=e.ll.x<n.ll.x?n.ll.x:e.ll.x;var r=e.ur.x<n.ur.x?e.ur.x:n.ur.x;var i=e.ll.y<n.ll.y?n.ll.y:e.ll.y;var s=e.ur.y<n.ur.y?e.ur.y:n.ur.y;return{ll:{x:o,y:i},ur:{x:r,y:s}}},r=Number.EPSILON;if(r===undefined)r=Math.pow(2,-52);var i=r*r,b=function t(e,n){if(-r<e&&e<r)if(-r<n&&n<r)return 0;var o=e-n;if(o*o<i*e*n)return 0;return e<n?-1:1},t=function(){function t(){c(this,t);this.reset()}s(t,[{key:"reset",value:function t(){this.xRounder=new w;this.yRounder=new w}},{key:"round",value:function t(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]);return t}(),w=function(){function t(){c(this,t);this.tree=new A;this.round(0)}s(t,[{key:"round",value:function t(e){var n=this.tree.add(e);var o=this.tree.prev(n);if(o!==null&&b(n.key,o.key)===0){this.tree.remove(e);return o.key}var r=this.tree.next(n);if(r!==null&&b(n.key,r.key)===0){this.tree.remove(e);return r.key}return e}}]);return t}(),R=new t,S=function t(e,n){return e.x*n.y-e.y*n.x},x=function t(e,n){return e.x*n.x+e.y*n.y},E=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};var s=S(r,i);return b(s,0)},T=function t(e){return Math.sqrt(x(e,e))},C=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return S(i,r)/T(i)/T(r)},O=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return x(i,r)/T(i)/T(r)},k=function t(e,n,o){if(n.y===0)return null;return{x:e.x+n.x/n.y*(o-e.y),y:o}},I=function t(e,n,o){if(n.x===0)return null;return{x:o,y:e.y+n.y/n.x*(o-e.x)}},L=function t(e,n,o,r){if(n.x===0)return I(o,r,e.x);if(r.x===0)return I(e,n,o.x);if(n.y===0)return k(o,r,e.y);if(r.y===0)return k(e,n,o.y);var i=S(n,r);if(i==0)return null;var s={x:o.x-e.x,y:o.y-e.y};var a=S(s,n)/i;var l=S(s,r)/i;var c=e.x+l*n.x,u=o.x+a*r.x;var h=e.y+l*n.y,p=o.y+a*r.y;var d=(c+u)/2;var f=(h+p)/2;return{x:d,y:f}},N=function(){s(r,null,[{key:"compare",value:function t(e,n){var o=r.comparePoints(e.point,n.point);if(o!==0)return o;if(e.point!==n.point)e.link(n);if(e.isLeft!==n.isLeft)return e.isLeft?1:-1;return D.compare(e.segment,n.segment)}},{key:"comparePoints",value:function t(e,n){if(e.x<n.x)return-1;if(e.x>n.x)return 1;if(e.y<n.y)return-1;if(e.y>n.y)return 1;return 0}}]);function r(t,e){c(this,r);if(t.events===undefined)t.events=[this];else t.events.push(this);this.point=t;this.isLeft=e}s(r,[{key:"link",value:function t(e){if(e.point===this.point)throw new Error("Tried to link already linked events");var n=e.point.events;for(var o=0,r=n.length;o<r;o++){var i=n[o];this.point.events.push(i);i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function t(){var e=this.point.events.length;for(var n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy!==undefined)continue;for(var r=n+1;r<e;r++){var i=this.point.events[r];if(i.consumedBy!==undefined)continue;if(o.otherSE.point.events!==i.otherSE.point.events)continue;o.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function t(){var e=[];for(var n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];if(r!==this&&!r.segment.ringOut&&r.segment.isInResult())e.push(r)}return e}},{key:"getLeftmostComparator",value:function t(o){var r=this;var l=new Map;var c=function t(e){var n=e.otherSE;l.set(e,{sine:C(r.point,o.point,n.point),cosine:O(r.point,o.point,n.point)})};return function(t,e){if(!l.has(t))c(t);if(!l.has(e))c(e);var n=l.get(t),o=n.sine,r=n.cosine;var i=l.get(e),s=i.sine,a=i.cosine;if(o>=0&&s>=0){if(r<a)return 1;if(r>a)return-1;return 0}if(o<0&&s<0){if(r<a)return-1;if(r>a)return 1;return 0}if(s<o)return-1;if(s>o)return 1;return 0}}}]);return r}(),M=0,D=function(){s(p,null,[{key:"compare",value:function t(e,n){var o=e.leftSE.point.x;var r=n.leftSE.point.x;var i=e.rightSE.point.x;var s=n.rightSE.point.x;if(s<o)return 1;if(i<r)return-1;var a=e.leftSE.point.y;var l=n.leftSE.point.y;var c=e.rightSE.point.y;var u=n.rightSE.point.y;if(o<r){if(l<a&&l<c)return 1;if(l>a&&l>c)return-1;var h=e.comparePoint(n.leftSE.point);if(h<0)return 1;if(h>0)return-1;var p=n.comparePoint(e.rightSE.point);if(p!==0)return p;return-1}if(o>r){if(a<l&&a<u)return-1;if(a>l&&a>u)return 1;var d=n.comparePoint(e.leftSE.point);if(d!==0)return d;var f=e.comparePoint(n.rightSE.point);if(f<0)return 1;if(f>0)return-1;return 1}if(a<l)return-1;if(a>l)return 1;if(i<s){var m=n.comparePoint(e.rightSE.point);if(m!==0)return m}if(i>s){var g=e.comparePoint(n.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==s){var y=c-a;var v=i-o;var _=u-l;var b=s-r;if(y>v&&_<b)return 1;if(y<v&&_>b)return-1}if(i>s)return 1;if(i<s)return-1;if(c<u)return-1;if(c>u)return 1;if(e.id<n.id)return-1;if(e.id>n.id)return 1;return 0}}]);function p(t,e,n,o){c(this,p);this.id=++M;this.leftSE=t;t.segment=this;t.otherSE=e;this.rightSE=e;e.segment=this;e.otherSE=t;this.rings=n;this.windings=o}s(p,[{key:"replaceRightSE",value:function t(e){this.rightSE=e;this.rightSE.segment=this;this.rightSE.otherSE=this.leftSE;this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function t(){var e=this.leftSE.point.y;var n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function t(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function t(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function t(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point;var o=this.rightSE.point;var r=this.vector();if(n.x===o.x){if(e.x===n.x)return 0;return e.x<n.x?1:-1}var i=(e.y-n.y)/r.y;var s=n.x+i*r.x;if(e.x===s)return 0;var a=(e.x-n.x)/r.x;var l=n.y+a*r.y;if(e.y===l)return 0;return e.y<l?-1:1}},{key:"getIntersection",value:function t(e){var n=this.bbox();var o=e.bbox();var r=P(n,o);if(r===null)return null;var i=this.leftSE.point;var s=this.rightSE.point;var a=e.leftSE.point;var l=e.rightSE.point;var c=_(n,a)&&this.comparePoint(a)===0;var u=_(o,i)&&e.comparePoint(i)===0;var h=_(n,l)&&this.comparePoint(l)===0;var p=_(o,s)&&e.comparePoint(s)===0;if(u&&c){if(p&&!h)return s;if(!p&&h)return l;return null}if(u){if(h)if(i.x===l.x&&i.y===l.y)return null;return i}if(c){if(p)if(s.x===a.x&&s.y===a.y)return null;return a}if(p&&h)return null;if(p)return s;if(h)return l;var d=L(i,this.vector(),a,e.vector());if(d===null)return null;if(!_(r,d))return null;return R.round(d.x,d.y)}},{key:"split",value:function t(e){var n=[];var o=e.events!==undefined;var r=new N(e,true);var i=new N(e,false);var s=this.rightSE;this.replaceRightSE(i);n.push(i);n.push(r);var a=new p(r,s,this.rings.slice(),this.windings.slice());if(N.comparePoints(a.leftSE.point,a.rightSE.point)>0)a.swapEvents();if(N.comparePoints(this.leftSE.point,this.rightSE.point)>0)this.swapEvents();if(o){r.checkForConsuming();i.checkForConsuming()}return n}},{key:"swapEvents",value:function t(){var e=this.rightSE;this.rightSE=this.leftSE;this.leftSE=e;this.leftSE.isLeft=true;this.rightSE.isLeft=false;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function t(e){var n=this;var o=e;while(n.consumedBy)n=n.consumedBy;while(o.consumedBy)o=o.consumedBy;var r=p.compare(n,o);if(r===0)return;if(r>0){var i=n;n=o;o=i}if(n.prev===o){var s=n;n=o;o=s}for(var a=0,l=o.rings.length;a<l;a++){var c=o.rings[a];var u=o.windings[a];var h=n.rings.indexOf(c);if(h===-1){n.rings.push(c);n.windings.push(u)}else n.windings[h]+=u}o.rings=null;o.windings=null;o.consumedBy=n;o.leftSE.consumedBy=n.leftSE;o.rightSE.consumedBy=n.rightSE}},{key:"prevInResult",value:function t(){if(this._prevInResult!==undefined)return this._prevInResult;if(!this.prev)this._prevInResult=null;else if(this.prev.isInResult())this._prevInResult=this.prev;else this._prevInResult=this.prev.prevInResult();return this._prevInResult}},{key:"beforeState",value:function t(){if(this._beforeState!==undefined)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function t(){if(this._afterState!==undefined)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};var n=this._afterState.rings;var o=this._afterState.windings;var r=this._afterState.multiPolys;for(var i=0,s=this.rings.length;i<s;i++){var a=this.rings[i];var l=this.windings[i];var c=n.indexOf(a);if(c===-1){n.push(a);o.push(l)}else o[c]+=l}var u=[];var h=[];for(var p=0,d=n.length;p<d;p++){if(o[p]===0)continue;var f=n[p];var m=f.poly;if(h.indexOf(m)!==-1)continue;if(f.isExterior)u.push(m);else{if(h.indexOf(m)===-1)h.push(m);var g=u.indexOf(f.poly);if(g!==-1)u.splice(g,1)}}for(var y=0,v=u.length;y<v;y++){var _=u[y].multiPoly;if(r.indexOf(_)===-1)r.push(_)}return this._afterState}},{key:"isInResult",value:function t(){if(this.consumedBy)return false;if(this._isInResult!==undefined)return this._isInResult;var e=this.beforeState().multiPolys;var n=this.afterState().multiPolys;switch(W.type){case"union":{var o=e.length===0;var r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var i;var s;if(e.length<n.length){i=e.length;s=n.length}else{i=n.length;s=e.length}this._isInResult=s===W.numMultiPolys&&i<s;break}case"xor":{var a=Math.abs(e.length-n.length);this._isInResult=a%2===1;break}case"difference":{var l=function t(e){return e.length===1&&e[0].isSubject};this._isInResult=l(e)!==l(n);break}default:throw new Error("Unrecognized operation type found ".concat(W.type))}return this._isInResult}}],[{key:"fromRing",value:function t(e,n,o){var r,i,s;var a=N.comparePoints(e,n);if(a<0){r=e;i=n;s=1}else if(a>0){r=n;i=e;s=-1}else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var l=new N(r,true);var c=new N(i,false);return new p(l,c,[o],[s])}}]);return p}(),z=function(){function l(t,e,n){c(this,l);if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.poly=e;this.isExterior=n;this.segments=[];if(typeof t[0][0]!=="number"||typeof t[0][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=R.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};var r=o;for(var i=1,s=t.length;i<s;i++){if(typeof t[i][0]!=="number"||typeof t[i][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var a=R.round(t[i][0],t[i][1]);if(a.x===r.x&&a.y===r.y)continue;this.segments.push(D.fromRing(r,a,this));if(a.x<this.bbox.ll.x)this.bbox.ll.x=a.x;if(a.y<this.bbox.ll.y)this.bbox.ll.y=a.y;if(a.x>this.bbox.ur.x)this.bbox.ur.x=a.x;if(a.y>this.bbox.ur.y)this.bbox.ur.y=a.y;r=a}if(o.x!==r.x||o.y!==r.y)this.segments.push(D.fromRing(r,o,this))}s(l,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE);e.push(r.rightSE)}return e}}]);return l}(),B=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new z(t[0],this,true);this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}};this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new z(t[n],this,false);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.interiorRings.push(r)}this.multiPoly=e}s(i,[{key:"getSweepEvents",value:function t(){var e=this.exteriorRing.getSweepEvents();for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),j=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{if(typeof t[0][0][0]==="number")t=[t]}catch(t){}this.polys=[];this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new B(t[n],this);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.polys.push(r)}this.isSubject=e}s(i,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),F=function(){s(w,null,[{key:"factory",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(!i.isInResult()||i.ringOut)continue;var s=null;var a=i.leftSE;var l=i.rightSE;var c=[a];var u=a.point;var h=[];while(true){s=a;a=l;c.push(a);if(a.point===u)break;while(true){var p=a.getAvailableLinkedEvents();if(p.length===0){var d=c[0].point;var f=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(f.x,", ").concat(f.y,"]."))}if(p.length===1){l=p[0].otherSE;break}var m=null;for(var g=0,y=h.length;g<y;g++)if(h[g].point===a.point){m=g;break}if(m!==null){var v=h.splice(m)[0];var _=c.splice(v.index);_.unshift(_[0].otherSE);n.push(new w(_.reverse()));continue}h.push({index:c.length,point:a.point});var b=a.getLeftmostComparator(s);l=p.sort(b)[0].otherSE;break}}n.push(new w(c))}return n}}]);function w(t){c(this,w);this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}s(w,[{key:"getGeom",value:function t(){var e=this.events[0].point;var n=[e];for(var o=1,r=this.events.length-1;o<r;o++){var i=this.events[o].point;var s=this.events[o+1].point;if(E(i,e,s)===0)continue;n.push(i);e=i}if(n.length===1)return null;var a=n[0];var l=n[1];if(E(a,e,l)===0)n.shift();n.push(n[0]);var c=this.isExteriorRing()?1:-1;var u=this.isExteriorRing()?0:n.length-1;var h=this.isExteriorRing()?n.length:-1;var p=[];for(var d=u;d!=h;d+=c)p.push([n[d].x,n[d].y]);return p}},{key:"isExteriorRing",value:function t(){if(this._isExteriorRing===undefined){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():true}return this._isExteriorRing}},{key:"enclosingRing",value:function t(){if(this._enclosingRing===undefined)this._enclosingRing=this._calcEnclosingRing();return this._enclosingRing}},{key:"_calcEnclosingRing",value:function t(){var e=this.events[0];for(var n=1,o=this.events.length;n<o;n++){var r=this.events[n];if(N.compare(e,r)>0)e=r}var i=e.segment.prevInResult();var s=i?i.prevInResult():null;while(true){if(!i)return null;if(!s)return i.ringOut;if(s.ringOut!==i.ringOut)if(s.ringOut.enclosingRing()!==i.ringOut)return i.ringOut;else return i.ringOut.enclosingRing();i=s.prevInResult();s=i?i.prevInResult():null}}}]);return w}(),U=function(){function e(t){c(this,e);this.exteriorRing=t;t.poly=this;this.interiorRings=[]}s(e,[{key:"addInterior",value:function t(e){this.interiorRings.push(e);e.poly=this}},{key:"getGeom",value:function t(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();if(r===null)continue;e.push(r)}return e}}]);return e}(),q=function(){function e(t){c(this,e);this.rings=t;this.polys=this._composePolys(t)}s(e,[{key:"getGeom",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();if(r===null)continue;e.push(r)}return e}},{key:"_composePolys",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(i.poly)continue;if(i.isExteriorRing())n.push(new U(i));else{var s=i.enclosingRing();if(!s.poly)n.push(new U(s));s.poly.addInterior(i)}}return n}}]);return e}(),G=function(){function n(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:D.compare;c(this,n);this.queue=t;this.tree=new A(e);this.segments=[]}s(n,[{key:"process",value:function t(e){var n=e.segment;var o=[];if(e.consumedBy){if(e.isLeft)this.queue.remove(e.otherSE);else this.tree.remove(n);return o}var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");var i=r;var s=r;var a=undefined;var l=undefined;while(a===undefined){i=this.tree.prev(i);if(i===null)a=null;else if(i.key.consumedBy===undefined)a=i.key}while(l===undefined){s=this.tree.next(s);if(s===null)l=null;else if(s.key.consumedBy===undefined)l=s.key}if(e.isLeft){var c=null;if(a){var u=a.getIntersection(n);if(u!==null){if(!n.isAnEndpoint(u))c=u;if(!a.isAnEndpoint(u)){var h=this._splitSafely(a,u);for(var p=0,d=h.length;p<d;p++)o.push(h[p])}}}var f=null;if(l){var m=l.getIntersection(n);if(m!==null){if(!n.isAnEndpoint(m))f=m;if(!l.isAnEndpoint(m)){var g=this._splitSafely(l,m);for(var y=0,v=g.length;y<v;y++)o.push(g[y])}}}if(c!==null||f!==null){var _=null;if(c===null)_=f;else if(f===null)_=c;else{var b=N.comparePoints(c,f);_=b<=0?c:f}this.queue.remove(n.rightSE);o.push(n.rightSE);var w=n.split(_);for(var S=0,x=w.length;S<x;S++)o.push(w[S])}if(o.length>0){this.tree.remove(n);o.push(e)}else{this.segments.push(n);n.prev=a}}else{if(a&&l){var E=a.getIntersection(l);if(E!==null){if(!a.isAnEndpoint(E)){var T=this._splitSafely(a,E);for(var C=0,O=T.length;C<O;C++)o.push(T[C])}if(!l.isAnEndpoint(E)){var k=this._splitSafely(l,E);for(var I=0,L=k.length;I<L;I++)o.push(k[I])}}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function t(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);r.push(o);if(e.consumedBy===undefined)this.tree.insert(e);return r}}]);return n}(),Z=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,H=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,K,W=new(function(){function t(){c(this,t)}s(t,[{key:"run",value:function t(e,n,o){W.type=e;R.reset();var r=[new j(n,true)];for(var i=0,s=o.length;i<s;i++)r.push(new j(o[i],false));W.numMultiPolys=r.length;if(W.type==="difference"){var a=r[0];var l=1;while(l<r.length)if(P(r[l].bbox,a.bbox)!==null)l++;else r.splice(l,1)}if(W.type==="intersection")for(var c=0,u=r.length;c<u;c++){var h=r[c];for(var p=c+1,d=r.length;p<d;p++)if(P(h.bbox,r[p].bbox)===null)return[]}var f=new A(N.compare);for(var m=0,g=r.length;m<g;m++){var y=r[m].getSweepEvents();for(var v=0,_=y.length;v<_;v++){f.insert(y[v]);if(f.size>Z)throw new Error("Infinite loop when putting segment endpoints in a priority queue "+"(queue size too big). Please file a bug report.")}}var b=new G(f);var w=f.size;var S=f.pop();while(S){var x=S.key;if(f.size===w){var E=x.segment;throw new Error("Unable to pop() ".concat(x.isLeft?"left":"right"," SweepEvent ")+"[".concat(x.point.x,", ").concat(x.point.y,"] from segment #").concat(E.id," ")+"[".concat(E.leftSE.point.x,", ").concat(E.leftSE.point.y,"] -> ")+"[".concat(E.rightSE.point.x,", ").concat(E.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(f.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints "+"(queue size too big). Please file a bug report.");if(b.segments.length>H)throw new Error("Infinite loop when passing sweep line over endpoints "+"(too many sweep line segments). Please file a bug report.");var T=b.process(x);for(var C=0,O=T.length;C<O;C++){var k=T[C];if(k.consumedBy===undefined)f.insert(k)}w=f.size;S=f.pop()}R.reset();var I=F.factory(b.segments);var L=new q(I);return L.getGeom()}}]);return t}()),V,Y,Q,J,X;return{union:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("union",e,o)},intersection:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("intersection",e,o)},xor:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("xor",e,o)},difference:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("difference",e,o)}}}()});function nc(t,e,n){void 0===n&&(n={});var o,t=tc(t),e=tc(e),e=ec.intersection(t.coordinates,e.coordinates);return 0===e.length?null:1===e.length?function(t,e,n){void 0===n&&(n={});for(var o=0,r=t;o<r.length;o++){var i=r[o];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<i[i.length-1].length;s++)if(i[i.length-1][s]!==i[0][s])throw new Error("First and last Position are not equivalent.")}return $l({type:"Polygon",coordinates:t},e,n)}(e[0],n.properties):(n=n.properties,$l({type:"MultiPolygon",coordinates:e},n,o=void 0===o?{}:o))}var oc,rc=["DIV","SPAN","A"],ic=["data-azure-maps-attribution-minzoom","data-azure-maps-attribution-maxzoom","data-azure-maps-attribution-geometry","data-azure-maps-attribution-tileset","data-azure-maps-attribution-order","data-azure-maps-attribution-dynamic"],sc=N(["href"],ic),ac=(lc.prototype.equals=function(t){return this.stringRepresentation===t.stringRepresentation},Object.defineProperty(lc.prototype,"stringRepresentation",{get:function(){return[void 0!==this.minZoom?"minzoom="+this.minZoom:"",void 0!==this.maxZoom?"maxzoom="+this.maxZoom:"",void 0!==this.geometry?this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry").value:"",void 0!==this.tilesetId?"tilesetId="+this.tilesetId:"",this.dynamic?"dynamic":""].filter(function(t){return 0<t.length}).join(";")},enumerable:!1,configurable:!0}),lc.applicable=function(t){return Array.from(t.attributes).map(function(t){return ic.includes(t.name)}).reduce(function(t,e){return t||e},!1)},Object.defineProperty(lc.prototype,"minZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-minzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"maxZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-maxzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"geometry",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry");if(t&&t.value)try{return JSON.parse(t.value)}catch(t){return}},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"tilesetId",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-tileset");return t&&t.value?t.value:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"order",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-order");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"dynamic",{get:function(){return null!==this.element.attributes.getNamedItem("data-azure-maps-attribution-dynamic")},enumerable:!1,configurable:!0}),Object.defineProperty(lc.prototype,"hidesElement",{get:function(){return"none"==this.element.style.display},enumerable:!1,configurable:!0}),lc.prototype.forceHide=function(){this.element.style.display="none"},lc.prototype.satisfied=function(t){var e=!this.minZoom||!t.zoom||t.zoom>=this.minZoom,n=!this.maxZoom||!t.zoom||t.zoom<=this.maxZoom,o=!0;return this.geometry&&t.bounds&&(o=null!==nc({type:"Feature",geometry:this.geometry,properties:{}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[li.getNorthWest(t.bounds),li.getNorthEast(t.bounds),li.getSouthEast(t.bounds),li.getSouthWest(t.bounds),li.getNorthWest(t.bounds)]]},properties:{}})),e&&n&&o},lc.prototype.apply=function(e,t){var n=this;void 0===t&&(t=null);var o=this.satisfied(e.getCamera()),r=this.dynamic&&this.tilesetId,i=this.hidesElement,t=t&&["dragend","zoomend","pitchend"].includes(t.type);return o||i?o&&(i||r)&&(o&&i&&this.element.style.removeProperty("display"),r&&(t?e.events.addOnce("idle",function(t){return n.fetchAndApplyDynamicAttribution(e)}):this.fetchAndApplyDynamicAttribution(e))):this.element.style.display="none",o===i},lc.prototype.fetchAndApplyDynamicAttribution=function(o){var e,n,t,r=this,i=o.getCamera();this.lastFetchState&&li.containsBoundingBox(this.lastFetchState.bounds,i.bounds)&&Math.floor(this.lastFetchState.zoom)==Math.floor(i.zoom)||(e=Mr(i.center,li.getSouthWest(i.bounds),lc.viewportBufferExpansionRatio),t=((n=Mr(i.center,li.getNorthEast(i.bounds),lc.viewportBufferExpansionRatio))[0]<e[0]?[[e[0],e[1],180,n[1]],[-180,e[1],n[0],n[1]]]:[[e[0],e[1],n[0],n[1]]]).map(function(t){var e=new URLSearchParams({"api-version":"2.1",tilesetId:r.tilesetId,zoom:void 0!==i.zoom?""+Math.floor(i.zoom):void 0,bounds:t.join(",")}),n="https://{{azMapsDomain}}/map/attribution",t={url:n,headers:{}};o._substituteDomainLanguageViewAndSignInRequest(n,t);e=t.url+(t.url.includes("?")?"&":"?")+e.toString();return o._sendRequest(e,"Attribution",t.headers).then(function(t){return t.json()})}),Promise.all(t).then(function(t){r.applyAttributionResponse(t),r.lastFetchState={bounds:new li([e[0],e[1],n[0],n[1]]),zoom:i.zoom}}).catch(function(t){return console.error(t)}))},lc.prototype.applyAttributionResponse=function(t){var e,n,o=this,r=t.map(function(t){return t.copyrights||[]}).reduce(function(t,e){return N(t,e)},[]);0!=r.length&&(null!==(t=Qs.parseWithFilter(r.join(""),function(t){return!0},function(t){return t},function(){return o.element.innerHTML="",o.element}))?(t="string"==typeof t?((r=document.createElement("span")).innerHTML=t,r):t,n=t===this.element?(e=document.createElement("span"),Array.from(this.element.childNodes).forEach(function(t){return e.appendChild(t)}),e):t,Array.from(this.element.attributes).filter(function(t){return ic.includes(t.name)}).forEach(function(t){return n.attributes.setNamedItem(t.cloneNode())}),n.style.display=this.element.style.display,t=this.element.parentElement,this.element.remove(),t.append(n),this.element=n,this.attributionChangeCallback(this)):console.warn("Dynamic attribution is empty after filtering"))},lc.viewportBufferExpansionRatio=2,function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(i<3?r(s):3<i?r(e,n,s):r(e,n))||s);3<i&&s&&Object.defineProperty(e,n,s)}([(oc=1e3,function(t,e,n){var o=n.value,r=new Map;return n.value=function(){var t=this,e=arguments;r.get(t)||!1||(o.apply(t,e),r.set(t,!0),setTimeout(function(){return r.delete(t)},oc))},n})],lc.prototype,"fetchAndApplyDynamicAttribution",null),lc);function lc(t,e){var n=this;this.lastFetchState={bounds:null,zoom:null},this.getElement=function(){return n.element},this.element=t,this.attributionChangeCallback=e}var cc=[/all rights reserved/gi],uc=(hc.prototype.addToMap=function(){this.map.events.add("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.add("dragend",this.applyRules),this.map.events.add("zoomend",this.applyRules),this.map.events.add("pitchend",this.applyRules)},hc.prototype.removeFromMap=function(){this.map.events.remove("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.remove("dragend",this.applyRules),this.map.events.remove("zoomend",this.applyRules),this.map.events.remove("pitchend",this.applyRules)},hc.prototype.getDefaultAttribution=function(){return this.copyrightControl.getDefaultAttributions().map(function(t){return e=t,(t=document.createElement("a")).textContent=e,t;var e})},hc);function hc(t,e,n){var o,a=this;this.rules=[],this.virtualContext=((o=document.createElement("span")).className="azure-map-copyright-context",o),this.renderContext=this.virtualContext.cloneNode(!1),this.addAttributionFromSource=function(t){},this.removeAttributionFromSource=function(t){},this.getMapStyleVisibleSources=function(){var e=a.map._getMap(),n=e.getStyle();return Object.entries(n.sources).filter(function(t){var e=R(t,1)[0];return n.layers.filter(function(t){return t&&t.source==e}).reduce(function(t,e){return!(e.layout&&"none"===e.layout.visibility||e.paint&&0===e.paint["icon-opacity"]&&0===e.paint["text-opacity"])||t},!1)}).map(function(t){t=R(t,1)[0];return e.getSource(t)})},this.loadAttributionOnceSourcesLoaded=function(){var t=a.getMapStyleVisibleSources();Promise.all(t.map(function(r){return new Promise(function(n,o){"tiles"in r?n(r):(r.load(),r.on("data",function t(e){"metadata"==e.sourceDataType&&(r.off("data",t),n(r))}),r.on("error",function t(e){r.off("error",t),o(e)}))}).then(function(t){return{status:"fulfilled",value:t}}).catch(function(t){return{status:"rejected",reason:t}})})).then(function(t){a.reloadAttribution()})},this.reloadAttribution=function(){var t=a.getMapStyleVisibleSources(),o=new Set,r={},e=Object.values(t).filter(function(t){return"attribution"in t&&t.attribution&&"tiles"in t&&0<t.tiles.length}).map(function(t){return t}).map(function(t){t=t.attribution;return Qs.parseWithFilter(t,function(t){return rc.includes(t.tagName)&&Array.from(t.attributes).map(function(t){return sc.includes(t.name)}).reduce(function(t,e){return t&&e},!0)},function(t){var e,n=null;return t instanceof HTMLElement&&ac.applicable(t)&&(n=new ac(t,function(){return a.renderAttribution()}),o.add(n),void 0!==n.order&&(t.style.order=""+n.order)),n&&t instanceof HTMLElement&&((!((e=n.stringRepresentation)in r)||void 0!==n.order&&void 0!==r[e].order&&n.order<r[e].order||void 0!==n.order&&void 0===r[e].order)&&(r[e]=n)),t},function(){return document.createElement("span")})}),n=new Set(Object.values(r)),t=new Set(N(o).filter(function(t){return!n.has(t)})),i=new Set(N(t).map(function(t){return t.getElement()}));N(i).filter(function(t){return null!==t.parentElement}).forEach(function(t){return t.parentElement.removeChild(t)}),a.rules=Object.values(r);var e=e.filter(function(t){return"string"==typeof t||!i.has(t)}).map(function(t){return"string"==typeof t?new Text(t):t}),s=document.createElement("span");0<e.length?e.forEach(function(t){return s.appendChild(t)}):a.getDefaultAttribution().forEach(function(t){return s.appendChild(t)}),a.virtualContext=s,a.copyrightControl.setOptions({copyrightContent:a.renderContext}),a.applyRules(),a.renderAttribution()},this.applyRules=function(n){void 0===n&&(n=null),a.rules.reduce(function(t,e){e=e.apply(a.map,n);return t||e},!1)&&a.renderAttribution()},this.renderAttribution=function(){var e=function(t){return Array.from("none"!=t.style.display?t.children:[]).map(function(t){return e(t)}).reduce(function(t,e){return N(t,e)},Array.from("none"!=t.style.display?t.childNodes:[]).filter(function(t){return t.nodeType==t.TEXT_NODE}))},t=a.virtualContext.cloneNode(!0),n=e(t);n.forEach(function(t){return t.textContent=N(cc).reduce(function(t,e){return t.replace(e,"").trim()},t.textContent)}),n.reduce(function(t,e){return t.has(e.textContent)?(e.textContent="",e.parentElement&&e.parentElement.removeChild(e)):t.add(e.textContent),t},new Set),a.renderContext.innerHTML="",Array.from(t.childNodes).forEach(function(t){return a.renderContext.appendChild(t)})},this.map=t,this.copyrightControl=e,this.options=n}var pc=At(function(t){var e=(e=function(t){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},e.prototype._singletonInstance)return e.prototype._singletonInstance;if((e.prototype._singletonInstance=this).instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,t.displayCall&&"function"!=typeof t.displayCall)throw new Error("displayCall is not a function");if(!t.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(t),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(t){}}),e.prototype.login=function(){var t,e;this._loginInProgress?this.info("Login in progress"):(this._loginInProgress=!0,t=this._guid(),this.config.state=t,this._idTokenNonce=this._guid(),(e=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST))&&""!==e?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):e=window.location.href,this.verbose("Expected state: "+t+" startPage:"+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,t,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),e=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce),this.config.displayCall?this.config.displayCall(e):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(t),this.registerCallback(t,this.config.clientId,this.callback),this._loginPopup(e)):this.promptUser(e))},e.prototype._openPopup=function(t,e,n,o){try{var r=window.screenLeft||window.screenX,i=window.screenTop||window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=s/2-n/2+r,c=a/2-o/2+i,u=window.open(t,e,"width="+n+", height="+o+", top="+c+", left="+l);return u.focus&&u.focus(),u}catch(t){return this.warn("Error opening popup, "+t.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},e.prototype._handlePopupError=function(t,e,n,o,r){this.warn(o),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,o),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,r),e&&this._activeRenewals[e]&&(this._activeRenewals[e]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,t&&t(o,null,n)},e.prototype._loginPopup=function(t,o,e){var r,i,s,a=this._openPopup(t,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),l=e||this.callback;null!=a?(this._openedWindows.push(a),r=-1!=this.config.redirectUri.indexOf("#")?this.config.redirectUri.split("#")[0]:this.config.redirectUri,i=this,s=window.setInterval(function(){if(!a||a.closed||void 0===a.closed){var t="Popup Window closed",e="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return i.isAngular&&i._broadcast("adal:popUpClosed",e+i.CONSTANTS.RESOURCE_DELIMETER+t),i._handlePopupError(l,o,t,e,e),void window.clearInterval(s)}try{var n=a.location;if(-1!=encodeURI(n.href).indexOf(encodeURI(r)))return i.isAngular?i._broadcast("adal:popUpHashChanged",n.hash):i.handleWindowCallback(n.hash),window.clearInterval(s),i._loginInProgress=!1,i._acquireTokenInProgress=!1,i.info("Closing popup window"),i._openedWindows=[],void a.close()}catch(t){}},1)):this._handlePopupError(l,o,"Error opening popup",e="Popup Window is null. This can happen if you are using IE",e)},e.prototype._broadcast=function(t,e){function n(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"function"!=typeof window.CustomEvent&&(n.prototype=window.Event.prototype,window.CustomEvent=n);e=new CustomEvent(t,{detail:e});window.dispatchEvent(e)},e.prototype.loginInProgress=function(){return this._loginInProgress},e.prototype._hasResource=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return e&&!this._isEmpty(e)&&-1<e.indexOf(t+this.CONSTANTS.RESOURCE_DELIMETER)},e.prototype.getCachedToken=function(t){if(!this._hasResource(t))return null;var e=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t),o=this.config.expireOffsetSeconds||300;return n&&n>this._now()+o?e:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0),null)},e.prototype.getCachedUser=function(){if(this._user)return this._user;var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(t),this._user},e.prototype.registerCallback=function(i,s,t){this._activeRenewals[s]=i,this._callBacksMappedToRenewStates[i]||(this._callBacksMappedToRenewStates[i]=[]);var a=this;this._callBacksMappedToRenewStates[i].push(t),this._callBackMappedToRenewStates[i]||(this._callBackMappedToRenewStates[i]=function(t,e,n,o){a._activeRenewals[s]=null;for(var r=0;r<a._callBacksMappedToRenewStates[i].length;++r)try{a._callBacksMappedToRenewStates[i][r](t,e,n,o)}catch(n){a.warn(n)}a._callBacksMappedToRenewStates[i]=null,a._callBackMappedToRenewStates[i]=null})},e.prototype._renewToken=function(t,e,n){this.info("renewToken is called for resource:"+t);var o=this._addAdalFrame("adalRenewFrame"+t),r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(n=n||"token",t),"prompt");n===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),i+="&nonce="+encodeURIComponent(this._idTokenNonce)),i=this._addHintParameters(i+="&prompt=none"),this.registerCallback(r,t,e),this.verbosePii("Navigate to:"+i),o.src="about:blank",this._loadFrameTimeout(i,"adalRenewFrame"+t,t)},e.prototype._renewIdToken=function(t,e){this.info("renewIdToken is called");var n=this._addAdalFrame("adalIdTokenFrame"),o=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=o,this._renewStates.push(o),this.verbose("Renew Idtoken Expected state: "+o);var r=null==e?null:this.config.clientId,e=e||"id_token",r=this._urlRemoveQueryStringParameter(this._getNavigateUrl(e,r),"prompt"),r=this._addHintParameters(r+="&prompt=none");r+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(o,this.config.clientId,t),this.verbosePii("Navigate to:"+r),n.src="about:blank",this._loadFrameTimeout(r,"adalIdTokenFrame",this.config.clientId)},e.prototype._urlContainsQueryStringParameter=function(t,e){return new RegExp("[\\?&]"+t+"=").test(e)},e.prototype._urlRemoveQueryStringParameter=function(t,e){var n=new RegExp("(\\&"+e+"=)[^&]+");return t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+&"),t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+"),t=t.replace(n,"")},e.prototype._loadFrameTimeout=function(t,e,n){this.verbose("Set loading state to pending for: "+n),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(t,e);var o=this;setTimeout(function(){var t;o._getItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n)===o.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS&&(o.verbose("Loading frame has timed out after: "+o.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+n),(t=o._activeRenewals[n])&&o._callBackMappedToRenewStates[t]&&o._callBackMappedToRenewStates[t]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),o._saveItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n,o.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED))},o.CONSTANTS.LOADFRAME_TIMEOUT)},e.prototype._loadFrame=function(e,t){var n=this;n.info("LoadFrame: "+t);var o=t;setTimeout(function(){var t=n._addAdalFrame(o);""!==t.src&&"about:blank"!==t.src||(t.src=e,n._loadFrame(e,o))},500)},e.prototype.acquireToken=function(t,e){if(this._isEmpty(t))return this.warn("resource is required"),void e("resource is required",null,"resource is required");var n=this.getCachedToken(t);return n?(this.info("Token is already in cache for resource:"+t),void e(null,n,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[t]?this.registerCallback(this._activeRenewals[t],t,e):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,t===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(e)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(t,e)):(this.verbose("renewing idtoken and access_token"),this._renewToken(t,e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void e("User login is required",null,"login required"))},e.prototype.acquireTokenPopup=function(t,e,n,o){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(i+="&prompt=select_account",e&&(i+=e),n&&-1===i.indexOf("&claims"))i+="&claims="+encodeURIComponent(n);else if(n&&-1!==i.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");i=this._addHintParameters(i),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this.registerCallback(r,t,o),this._loginPopup(i,t,o)},e.prototype.acquireTokenRedirect=function(t,e,n){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");var o=this.callback;if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this.verbose("Renew token Expected state: "+r);o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),n&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(n);else if(n&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,r,!0),this.promptUser(o)},e.prototype.promptUser=function(t){t?(this.infoPii("Navigate to:"+t),window.location.replace(t)):this.info("Navigate url is empty")},e.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(t))for(var t=t.split(this.CONSTANTS.RESOURCE_DELIMETER),e=0;e<t.length&&""!==t[e];e++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t[e],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t[e],0);this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},e.prototype.clearCacheForResource=function(t){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(t)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0))},e.prototype.logOut=function(){var t,e;this.clearCache(),this._user=null,e=this.config.logOutUri||(t="common",e="",this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(e="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),this.instance+t+"/oauth2/logout?"+e),this.infoPii("Logout navigate to: "+e),this.promptUser(e)},e.prototype._isEmpty=function(t){return void 0===t||!t||0===t.length},e.prototype.getUser=function(t){if("function"!=typeof t)throw new Error("callback is not a function");var e;this._user?t(null,this._user):(e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN),this._isEmpty(e)?(this.warn("User information is not available"),t("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(e),t(null,this._user)))},e.prototype._addHintParameters=function(t){var e;return this._user&&this._user.profile&&(this._user.profile.sid&&-1!==t.indexOf("&prompt=none")?this._urlContainsQueryStringParameter("sid",t)||(t+="&sid="+encodeURIComponent(this._user.profile.sid)):this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",t)||(t+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",t)&&-1<this._user.profile.upn.indexOf("@")&&(e=this._user.profile.upn.split("@"),t+="&domain_hint="+encodeURIComponent(e[e.length-1])))),t},e.prototype._createUser=function(t){var e=null,t=this._extractIdToken(t);return t&&t.hasOwnProperty("aud")&&(t.aud.toLowerCase()===this.config.clientId.toLowerCase()?(e={userName:"",profile:t},t.hasOwnProperty("upn")?e.userName=t.upn:t.hasOwnProperty("email")&&(e.userName=t.email)):this.warn("IdToken has invalid aud field")),e},e.prototype._getHash=function(t){return-1<t.indexOf("#/")?t=t.substring(t.indexOf("#/")+2):-1<t.indexOf("#")&&(t=t.substring(1)),t},e.prototype.isCallback=function(t){t=this._getHash(t);t=this._deserialize(t);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},e.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},e.prototype.getRequestInfo=function(t){t=this._getHash(t);var e=this._deserialize(t),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(e&&((n.parameters=e).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;t="";if(!e.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+e.state),t=e.state,n.stateResponse=t,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var o=this._renewStates,r=0;r<o.length;r++)if(o[r]===n.stateResponse){n.stateMatch=!0;break}}}return n},e.prototype._matchNonce=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.profile.nonce)return!0;return!1},e.prototype._matchState=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.LOGIN,t.stateMatch=!0;if(o=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW))for(var o=o.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<o.length;n++)if(o[n]&&o[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.RENEW_TOKEN,t.stateMatch=!0;return!1},e.prototype._getResourceFromState=function(t){if(t){var e=t.indexOf("|");if(-1<e&&e+1<t.length)return t.substring(e+1)}return""},e.prototype.saveTokenFromHash=function(t){this.info("State status:"+t.stateMatch+"; Request type:"+t.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var e,n=this._getResourceFromState(t.stateResponse);t.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+t.parameters.error+"; Error description:"+t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,t.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),t.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,t.parameters.error_description))):t.stateMatch?(this.info("State is right"),t.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,t.parameters[this.CONSTANTS.SESSION_STATE]),t.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._expiresIn(t.parameters[this.CONSTANTS.EXPIRES_IN]))),t.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(t.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,t.parameters[this.CONSTANTS.ID_TOKEN]),n=this.config.loginResource||this.config.clientId,this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(t.parameters.error="invalid id_token",t.parameters.error_description="Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN])))):(t.parameters.error="Invalid_state",t.parameters.error_description="Invalid_state. state: "+t.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+t.stateResponse)),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},e.prototype.getResourceForEndpoint=function(t){if(this.config&&this.config.anonymousEndpoints)for(var e=0;e<this.config.anonymousEndpoints.length;e++)if(-1<t.indexOf(this.config.anonymousEndpoints[e]))return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(-1<t.indexOf(n))return this.config.endpoints[n];return!(-1<t.indexOf("http://")||-1<t.indexOf("https://"))||this._getHostFromUri(t)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null},e.prototype._getHostFromUri=function(t){return String(t).replace(/^(https?:)\/\//,"").split("/")[0]},e.prototype.handleWindowCallback=function(t){if(null==t&&(t=window.location.hash),this.isCallback(t)){var e=null,n=!1;0<this._openedWindows.length&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(e=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(e=window.parent._adalInstance);var o,r=e.getRequestInfo(t),i=null,s=n||window.parent!==window?e._callBackMappedToRenewStates[r.stateResponse]:e.callback;e.info("Returned from redirect url"),e.saveTokenFromHash(r),r.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?e.verbose("Window is in iframe, acquiring token silently"):e.verbose("acquiring token interactive in progress"),o=r.parameters[e.CONSTANTS.ACCESS_TOKEN]||r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ACCESS_TOKEN):r.requestType===this.REQUEST_TYPE.LOGIN&&(o=r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ID_TOKEN);t=r.parameters[e.CONSTANTS.ERROR_DESCRIPTION],r=r.parameters[e.CONSTANTS.ERROR];try{s&&s(t,o,r,i)}catch(t){e.error("Error occurred in user defined callback function: "+t)}window.parent!==window||n||(e.config.navigateToLoginRequestUrl?window.location.href=e._getItem(e.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},e.prototype._getNavigateUrl=function(t,e){var n="common";this.config.tenant&&(n=this.config.tenant);e=this.instance+n+"/oauth2/authorize"+this._serialize(t,this.config,e)+this._addLibMetadata();return this.info("Navigate url:"+e),e},e.prototype._extractIdToken=function(t){t=this._decodeJwt(t);if(!t)return null;try{var e=t.JWSPayload,n=this._base64DecodeStringUrlSafe(e);return n?JSON.parse(n):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(t){this.error("The returned id_token could not be decoded",t)}return null},e.prototype._base64DecodeStringUrlSafe=function(t){return t=t.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(t))):decodeURIComponent(escape(this._decode(t)))},e.prototype._decode=function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(t=String(t).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var o,r,i,s,a,l,c,u="",h=0;h<n;h+=4){if(o=e.indexOf(t.charAt(h)),r=e.indexOf(t.charAt(h+1)),i=e.indexOf(t.charAt(h+2)),s=e.indexOf(t.charAt(h+3)),h+2===n-1){l=(a=o<<18|r<<12|i<<6)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c);break}if(h+1===n-1){l=(a=o<<18|r<<12)>>16&255,u+=String.fromCharCode(l);break}l=(a=o<<18|r<<12|i<<6|s)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c,255&a)}return u},e.prototype._decodeJwt=function(t){if(this._isEmpty(t))return null;t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},e.prototype._convertUrlSafeToRegularBase64EncodedString=function(t){return t.replace("-","+").replace("_","/")},e.prototype._serialize=function(t,e,n){var o=[];return null!==e&&(o.push("?response_type="+t),o.push("client_id="+encodeURIComponent(e.clientId)),n&&o.push("resource="+encodeURIComponent(n)),o.push("redirect_uri="+encodeURIComponent(e.redirectUri)),o.push("state="+encodeURIComponent(e.state)),e.hasOwnProperty("slice")&&o.push("slice="+encodeURIComponent(e.slice)),e.hasOwnProperty("extraQueryParameter")&&o.push(e.extraQueryParameter),e=e.correlationId||this._guid(),o.push("client-request-id="+encodeURIComponent(e))),o.join("&")},e.prototype._deserialize=function(t){for(var e=/\+/g,n=/([^&=]+)=([^&]*)/g,o=function(t){return decodeURIComponent(t.replace(e," "))},r={},i=n.exec(t);i;)r[o(i[1])]=o(i[2]),i=n.exec(t);return r},e.prototype._decimalToHex=function(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e},e.prototype._guid=function(){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues){var e=new Uint8Array(16);return t.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,this._decimalToHex(e[0])+this._decimalToHex(e[1])+this._decimalToHex(e[2])+this._decimalToHex(e[3])+"-"+this._decimalToHex(e[4])+this._decimalToHex(e[5])+"-"+this._decimalToHex(e[6])+this._decimalToHex(e[7])+"-"+this._decimalToHex(e[8])+this._decimalToHex(e[9])+"-"+this._decimalToHex(e[10])+this._decimalToHex(e[11])+this._decimalToHex(e[12])+this._decimalToHex(e[13])+this._decimalToHex(e[14])+this._decimalToHex(e[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(r=16*Math.random()|0),"x"===n[s]?i+=o[r]:"y"===n[s]?(r&=3,i+=o[r|=8]):i+=n[s];return i},e.prototype._expiresIn=function(t){return t=t||3599,this._now()+parseInt(t,10)},e.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},e.prototype._addAdalFrame=function(t){if(void 0!==t){this.info("Add adal frame to document:"+t);var e,n=document.getElementById(t);return n||(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))?((e=document.createElement("iframe")).setAttribute("id",t),e.setAttribute("aria-hidden","true"),e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height=e.borderWidth="0px",n=document.getElementsByTagName("body")[0].appendChild(e)):document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+t+'" id="'+t+'" style="display:none"></iframe>'),window.frames&&window.frames[t]&&(n=window.frames[t])),n}},e.prototype._saveItem=function(t,e,n){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?(n?(n=this._getItem(t)||"",localStorage.setItem(t,n+e+this.CONSTANTS.CACHE_DELIMETER)):localStorage.setItem(t,e),!0):(this.info("Local storage is not supported"),!1):this._supportsSessionStorage()?(sessionStorage.setItem(t,e),!0):(this.info("Session storage is not supported"),!1)},e.prototype._getItem=function(t){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(t):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(t):(this.info("Session storage is not supported"),null)},e.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._cloneConfig=function(t){if(null===t||"object"!=typeof t)return t;var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},e.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},e.prototype.log=function(t,e,n,o){var r;t<=Logging.level&&(!Logging.piiLoggingEnabled&&o||(r=(new Date).toUTCString(),o="",o=this.config.correlationId?r+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e:r+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e,n&&(o+="\nstack:\n"+n.stack),Logging.log(o)))},e.prototype.error=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e)},e.prototype.warn=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null)},e.prototype.info=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null)},e.prototype.verbose=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null)},e.prototype.errorPii=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e,!0)},e.prototype.warnPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null,!0)},e.prototype.infoPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null,!0)},e.prototype.verbosePii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null,!0)},e.prototype._libVersion=function(){return"1.0.18"},t.exports&&(t.exports=e,t.exports.inject=function(t){return new e(t)}),e)});pc.inject;function dc(t){this.message=t}(dc.prototype=new Error).name="InvalidCharacterError";var fc="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new dc("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,s="";o=e.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)&&(s+=String.fromCharCode(255&n>>(-2*r&6))))o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};function mc(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(fc(e).replace(/(.)/g,function(t,e){e=e.charCodeAt(0).toString(16).toUpperCase();return"%"+(e=e.length<2?"0"+e:e)}))}catch(t){return fc(e)}}function gc(t){this.message=t}(gc.prototype=new Error).name="InvalidTokenError";function yc(t,e){if("string"!=typeof t)throw new gc("Invalid token specified");e=!0===(e=e||{}).header?0:1;try{return JSON.parse(mc(t.split(".")[e]))}catch(t){throw new gc("Invalid token specified: "+t.message)}}yc.InvalidTokenError=gc;var vc=(_c.prototype.initialize=function(){var n=this;return this.initPromise||(this.initPromise=new Promise(function(t,e){n.options.authType===u.AuthenticationType.subscriptionKey?t():n.options.authType===u.AuthenticationType.aad?(n.options.authContext=n.options.authContext||_c.getDefaultAuthContext(n.options),n.options.authContext.handleWindowCallback(),n.options.authContext.getLoginError()?e(new Error("Error logging in the AAD users: "+n.options.authContext.getLoginError())):n.options.authContext.isCallback(window.location.hash)?n.map.dispose():setTimeout(function(){return n._loginAndAcquire(t,e)})):n.options.authType===u.AuthenticationType.anonymous?t(n._triggerTokenFetch()):e(new Error("An invalid authentication type was specified."))})),this.initPromise},_c.getDefaultAuthContext=function(t){if(!t.aadAppId)throw new Error("No AAD app ID was specified.");if(!t.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new pc({instance:t.aadInstance||i,tenant:t.aadTenant,clientId:t.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},_c.prototype._loginAndAcquire=function(e,n){function t(){r.options.authContext.acquireToken(T,function(t){t?n(new Error(t)):(t={map:r.map,type:_c.constants.events.tokenAcquired},r.map.events.invoke(_c.constants.events.tokenAcquired,t),e())})}var o,r=this,i=this.options.authContext.getCachedToken(this.options.aadAppId),s=this.options.authContext.getCachedUser();i&&s?t():(this.options.authContext.loginInProgress()||this.options.authContext.login(),o=setInterval(function(){r.options.authContext.loginInProgress()||(clearInterval(o),r.options.authContext.getCachedToken(r.options.aadAppId)?t():n(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.options.aadAppId)))},25))},_c.prototype.getAuthType=function(){return this.options.authType},_c.prototype.getClientId=function(){return this.options.clientId},_c.prototype.getToken=function(){var n=this;if(this.options.authType===u.AuthenticationType.aad){var o=this.options.authContext.getCachedToken(T);return o||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(T,function(t,e){t||(o=e,e={map:n.map,type:_c.constants.events.tokenAcquired},n.map.events.invoke(_c.constants.events.tokenAcquired,e))})),o}if(this.options.authType===u.AuthenticationType.anonymous){var t=this._getItem(_c.constants.storage.accessTokenKey);if(t){var e=this._getTokenExpiry(t);if(e<300&&0<e)this._triggerTokenFetch();else if(e<=0)throw this._saveItem(_c.constants.storage.accessTokenKey,""),new Error(_c.constants.errors.tokenExpired)}else this._triggerTokenFetch();return t}if(this.options.authType===u.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},_c.prototype._getTokenExpiry=function(t){var e=yc(t).exp,t=this._getCurrentTime();return 0<e-t?e-t:-1},_c.prototype._storeAccessToken=function(t){this._saveItem(_c.constants.storage.accessTokenKey,t);t={map:this.map,type:_c.constants.events.tokenAcquired};this.map.events.invoke(_c.constants.events.tokenAcquired,t)},_c.prototype._saveItem=function(t,e){return this._supportsLocalStorage()?localStorage.setItem(t,e):this._supportsSessionStorage()?sessionStorage.setItem(t,e):this.fallbackStorage[t]=e,!0},_c.prototype._getItem=function(t){return this._supportsLocalStorage()?localStorage.getItem(t):this._supportsSessionStorage()?sessionStorage.getItem(t):t in this.fallbackStorage?this.fallbackStorage[t]:null},_c.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem(_c.constants.storage.testStorageKey,"A"),"A"===window.localStorage.getItem(_c.constants.storage.testStorageKey)&&(window.localStorage.removeItem(_c.constants.storage.testStorageKey),!window.localStorage.getItem(_c.constants.storage.testStorageKey))):!1}catch(t){return!1}},_c.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem(_c.constants.storage.testStorageKey,"A"),"A"===window.sessionStorage.getItem(_c.constants.storage.testStorageKey)&&(window.sessionStorage.removeItem(_c.constants.storage.testStorageKey),!window.sessionStorage.getItem(_c.constants.storage.testStorageKey))):!1}catch(t){return!1}},_c.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},_c.prototype.signRequest=function(t){t.headers=t.headers||{},t.headers[C]=this.sessionId,t.headers[x]=E,t.headers[w]="MapControl/"+q+" (Web)";var e=this.getToken();switch(this.options.authType){case u.AuthenticationType.aad:case u.AuthenticationType.anonymous:t.headers[S]=this.options.clientId,t.headers[s]=a+e;break;case u.AuthenticationType.subscriptionKey:t.headers["subscription-key"]=e;break;default:throw new Error("An invalid authentication type was specified")}return t},_c.constants={preferredCacheLocation:"localStorage",storage:{accessTokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},_c);function _c(t){var r=this;this.fallbackStorage={},this._triggerTokenFetch=function(){return new Promise(function(n,o){r.options.getToken(function(t){try{var e=r._getTokenExpiry(t)-_c.constants.tokenRefreshClockSkew;r._storeAccessToken(t),clearTimeout(r.tokenTimeOutHandle),r.tokenTimeOutHandle=setTimeout(r._triggerTokenFetch,1e3*e),n()}catch(t){o(new Error("Invalid token returned by getToken function"))}},function(t){o(t)},r.map)})};var e=t.getServiceOptions();this.options=e.authOptions,this.sessionId=e.sessionId,this.map=t}var bc=(wc.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._add(t,e)},wc.prototype.getControls=function(){return Array.from(this.controls)},wc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._remove(t)},wc.prototype._add=function(t,e){this.controls.add(t);var n=(new V).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(n.position);if(!(0<e.length))throw new Error("Control position "+n.position+" does not exist.");e.item(0).appendChild(t)},wc.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},wc);function wc(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var n;u.ControlPosition.hasOwnProperty(e)&&((n=document.createElement("div")).classList.add(u.ControlPosition[e]),n.classList.add("subcontrol-container"),this.controlContainer.appendChild(n))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var Sc=(xc.prototype.addCallback=function(s,a,l,t,c){var e,u,h=this;if(t)e=function(t){var e=t.lngLat?new ti(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?[t.point.x,t.point.y]:void 0,o=t.features?t.features.map(function(t){return new Ko(t.geometry,t.properties,t.id)}):[],o={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:n,features:o};l(o)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=I(I({dataType:t.dataType},"source"===t.dataType&&I(I(I({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:h.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:h.map,type:t.type});c&&h.map.events._removeListener(s,a,l),l(t)};break;case"error":e=function(t){t={error:t.error,map:h.map,type:t.type};c&&h.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 Yo(t.point.x,t.point.y):void 0,n=t.points?t.points.map(function(t){return new Yo(t.x,t.y)}):[],o=t.lngLat?new ti(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new ti(t.lng,t.lat)}):[],i=o?h.map.layers.getRenderedShapes(new Jo(o),a?[a]:void 0):[],i={map:h.map,originalEvent:t.originalEvent,pixel:e,pixels:n,position:o,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.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 ti(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?new Yo(t.point.x,t.point.y):void 0,o=e?h.map.layers.getRenderedShapes(new Jo(e),a?[a]:void 0):[],o={map:h.map,originalEvent:t.originalEvent,position:e,pixel:n,preventDefault:function(){return t.preventDefault()},shapes:o,layerId:a||void 0,type:t.type};c&&h.map.events._removeListener(s,a,l),l(o)};break;case"styleimagemissing":e=function(t){c&&h.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:h.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.map.events._removeListener(s,a,l),l(e)};break;case"resize":e=function(t){var e,n={map:h.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(n[e]=t[e]);c&&h.map.events._removeListener(s,a,l),l(n)};break;default:e=function(t){var e={map:h.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),c&&h.map.events._removeListener(s,a,l),l(e)}}this.callbacks.has(a)||this.callbacks.set(a,new X),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(l,[e,c])},xc.prototype.removeCallback=function(t,e,n){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n)&&this.callbacks.get(e).get(t).delete(n)},xc.prototype.getModifiedCallback=function(t,e,n){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n))return this.callbacks.get(e).get(t).get(n)[0]},xc.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},xc.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},xc);function xc(t){this.callbacks=new X,this.map=t}var Ec=(Tc.prototype.add=function(t,e,n){var o,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Zi&&Zi._isMBoxEvent(t)?this._addLayerListener(t,a,n,!1,!1):a._addEventListener(t,n,!1)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Tc.prototype.addOnce=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof Zi&&Zi._isMBoxEvent(t)?this._addLayerListener(t,e,n,!1,!0):e._addEventListener(t,n,!0)},Tc.prototype._addLegacy=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,n,!0,!1)},Tc.prototype._addLayerListener=function(t,e,n,o,r){var i,s,a,l,c=e instanceof Zi?e.getId():e,e=this.map.layers.getLayerById(c),u=this.mapCallbackHandler.getModifiedCallback(t,c,n);if(u&&e)try{for(var h=P(e._getLayerIds()),p=h.next();!p.done;p=h.next()){var d=p.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,c,n,o,r),e){u=this.mapCallbackHandler.getModifiedCallback(t,c,n);try{for(var f=P(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}}}},Tc.prototype._addGlobalListener=function(t,e,n,o){var r=this.mapCallbackHandler.getModifiedCallback(t,"",e);this.mapCallbackHandler.addCallback(t,"",e,n,o);var i,s,a=this.mapCallbackHandler.getModifiedCallback(t,"",e);"load"===t&&this.map._isLoaded()?(i={type:"load",map:this.map},setTimeout(function(){return a(i)})):"ready"===t?this.map._isReady()&&(s={type:"ready",map:this.map},setTimeout(function(){return a(s)})):["minzoomchanged","maxzoomchanged","stylesetchanged"].includes(t)?this.map._addEventListener(t,e,o):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,a))},Tc.prototype.invoke=function(t,e,n){if(void 0===n)this._invokeListeners(t,"",e);else if(e instanceof Zi&&Zi._isMBoxEvent(t))this._invokeListeners(t,e.getId(),n);else{if(!(e instanceof $))throw new Error("The invoke target is invalid.");e._invokeEvent(t,n)}},Tc.prototype._invokeListeners=function(n,o,r){var i=this,t=new X(this.mapCallbackHandler.getEventCallbacks(n,o));t?t.forEach(function(t,e){t=R(t,2),t[0];t[1]&&i._removeListener(n,o,e),e(r)}):"error"===n&&console.error("error"in r?r.error:r)},Tc.prototype.remove=function(t,e,n){var o,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Zi&&Zi._isMBoxEvent(t)?this._removeListener(t,a,n):a._removeEventListener(t,n)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Tc.prototype._removeLegacy=function(t,e,n){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,n)},Tc.prototype._removeListener=function(t,e,n){var o,r,i=e instanceof Zi?e.getId():e,s=this.mapCallbackHandler.getModifiedCallback(t,i,n);if(s)if(i){e=this.map.layers.getLayerById(i);if(e)try{for(var a=P(e._getLayerIds()),l=a.next();!l.done;l=a.next()){var c=l.value;this.map._getMap().off(t,c,s)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}}else this.map._getMap().off(t,s);this.mapCallbackHandler.removeCallback(t,i,n)},Tc.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,n,o=R(t,1)[0];try{for(var r=P(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().on(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Tc.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,n,o=R(t,1)[0];try{for(var r=P(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().off(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Tc);function Tc(t){this.map=t,this.mapCallbackHandler=new Sc(this.map)}var Cc=(Oc.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addMarker(t,e)},Oc.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Oc.prototype.getMarkers=function(){return Array.from(this.markers)},Oc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeMarker(t)},Oc.prototype._removeMarker=function(e){var n=this;e instanceof ca?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),n.markers.delete(t))})},Oc.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},Oc);function Oc(t){this.markers=new Set,this.map=t}var kc=(Ic.prototype.add=function(s,e,a){var l=this;return new Promise(function(n,o){var r,t,i;l.userImages.has(s)?n():e instanceof HTMLImageElement||e instanceof ImageData?(l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),n()):"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}),n()},e.onerror=e.onabort=function(){o("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),o("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,o("Failed to load image within specified timeout: "+l.imageLoadTimeout+" ms.")},l.imageLoadTimeout))})},Ic.prototype.clear=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().removeImage(e)}),this.userImages.clear()},Ic.prototype.getImageIds=function(){var n=[];return this.userImages.forEach(function(t,e){n.push(e)}),n},Ic.prototype.createFromTemplate=function(t,e,n,o,r){n=n||"#1A73AA",o=o||"#fff";r=(r=ll(e,r)).replace(/{color}/g,n).replace(/{secondaryColor}/g,o).replace(/{text}/g,"");return this.add(t,r)},Ic.prototype.hasImage=function(t){return this.userImages.has(t)},Ic.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},Ic.prototype._restoreImages=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().hasImage(e)||n.map._getMap().addImage(e,t.image,t.meta)})},Ic);function Ic(t){this.userImages=new X,this.imageLoadTimeout=5e3,this.map=t}var Lc,Ac=(k(Pc,Lc=Zi),Pc.prototype._buildLayers=function(){return this.layers},Pc.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},Pc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=P(this.layers),r=o.next();!r.done;r=o.next()){var i=r.value;"string"==typeof i.source?n.add(i.source):i.source&&n.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Pc.prototype._updateLayoutProperty=function(e,n,o,r){var i=this;this.layers.forEach(function(t){Go(n,o)||i.map._getMap().setLayoutProperty(t.id,e,r||n)})},Pc);function Pc(t,e){e=Lc.call(this,e)||this;return e.layers=t,e}var Rc=(Nc.prototype.add=function(t,e){var n,o,r=e instanceof Zi?e.getId():e;if(Array.isArray(t))try{for(var i=P(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}else this._addLayer(t,r)},Nc.prototype._addLayer=function(e,n){if(!(this.map._isReady()||e instanceof Ac))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,o,r;n!==e.getId()&&this.layerIndex.find(function(t){return n===t.getId()})?this._getMapboxLayerExists(e)?(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.layerIndex[o],this._removeMapboxLayers(e),this._addMapboxLayers(e,n),this.map.events._disableLayerEvents(r),this.map.events._enableLayerEvents(e),this.layerIndex.splice(o,1),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Ac||this.userLayers.push({layer:e,before:n}),r.onRemove()):(this._addMapboxLayers(e,n),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Ac||this.userLayers.push({layer:e,before:n})):0<=(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}))?(r=this.layerIndex[o],this._removeMapboxLayers(r),this._addMapboxLayers(e,o+1),this.map.events._disableLayerEvents(r),this.map.events._enableLayerEvents(e),this.layerIndex[o]=e,r.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof Ac||this.userLayers.push({layer:e,before:n})),e.onAdd(this.map)},Nc.prototype._addMapboxLayers=function(t,e){var n,o;if(!(t instanceof Vs)||t.getOptions().tileUrl)if(t instanceof Ac)this.map.events._enableLayerEvents(t);else{t instanceof hs&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());var r=this._getMapboxBefore(e);try{for(var i=P(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}this.map.events._enableLayerEvents(t)}},Nc.prototype._removeMapboxLayers=function(t,e){var n,o;if(t instanceof Ac&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=P(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){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this.map.events._disableLayerEvents(t),t instanceof hs&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},Nc.prototype._getMapboxLayerExists=function(e){var n=this,o=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){n.map._getMap().getLayer(t)&&(o=!0)}),o)},Nc.prototype._getMapboxBefore=function(e){var n,t,o,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=P(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.map._getMap().getLayer(l))return l}}catch(t){n={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(n)throw n.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=(o=void 0,P(this.layerIndex[c]._getLayerIds())),h=u.next();!h.done;h=u.next()){l=h.value;if(this.map._getMap().getLayer(l))return l}}catch(t){o={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}},Nc.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=[]},Nc.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},Nc.prototype.getLayers=function(){return this.layerIndex.slice(0)},Nc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=P(this.layerIndex),r=o.next();!r.done;r=o.next())r.value._getSourceIds().forEach(function(t){return n.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Nc.prototype._getUserLayers=function(){return Array.from(this.userLayers)},Nc.prototype.move=function(t,e){var n=t instanceof Zi?t.getId():t,o=e instanceof Zi?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===n}))throw new Error("The layer '"+n+"' has not been added to the map and cannot be moved.");e=this.layerIndex.findIndex(function(t){return t.getId()===n});this._moveMapboxLayers(this.layerIndex[e],o),t=this.layerIndex[e],this.layerIndex.splice(e,1);e=this.layerIndex.findIndex(function(t){return t.getId()===o});-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t)},Nc.prototype._moveMapboxLayers=function(t,e){var n,o,r=this._getMapboxBefore(e);try{for(var i=P(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Nc.prototype.getRenderedShapes=function(t,e,n){var o,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([li.getSouthWest(t),li.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=P(e),u=c.next();!u.done;u=c.next())!function(t){var e=t instanceof Zi?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,N(l.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})))}(u.value)}catch(t){o={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}}n=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:n});return this.map.sources._mapFeaturesToShapes(n)},Nc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeLayer(t)},Nc.prototype._removeLayer=function(t){var e=t instanceof Zi?t.getId():t;if(!this.layerIndex.find(function(t){return t.getId()===e}))throw new Error("The layer '"+e+"' has not been added to the map and cannot be removed.");var t=this.layerIndex.findIndex(function(t){return t.getId()===e}),n=this.layerIndex[t];this._removeMapboxLayers(n),this.layerIndex.splice(t,1);t=this.userLayers.findIndex(function(t){return t.layer.getId()===n.getId()});0<=t&&this.userLayers.splice(t,1),n.onRemove()},Nc);function Nc(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Mc=(Dc.prototype.add=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Dc.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Dc.prototype.remove=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Dc.prototype.getPopups=function(){return Array.from(this.popups)},Dc.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Dc.Css.collection);return t||((t=document.createElement("div")).classList.add(Dc.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Dc.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)},Dc.Css={collection:"popup-collection-container"},Dc);function Dc(t){var o=this;this._onDrag=function(t){var e,n;"mousemove"===t.type?(e=t.clientX,n=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,n=t.touches[0].clientY),o.draggedPopups.forEach(function(t){t._dragToPixel([e,n])})},this._onUp=function(){o.map.getMapContainer().removeEventListener("mousemove",o._onDrag),o.map.getMapContainer().removeEventListener("touchmove",o._onDrag),o.map.getMapContainer().removeEventListener("mouseup",o._onUp),o.map.getMapContainer().removeEventListener("touchend",o._onUp),o.draggedPopups.forEach(function(t){o.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var zc,Bc=(k(jc,zc=Pi),jc.prototype._buildSource=function(){return this.source},jc.prototype._modifySource=function(t,e){if(t.tiles){var n=t.tiles.map(function(t){return"string"==typeof t?t:new F({domain:c,path:t.path,queryParams:I(I({},e),t.queryParams)}).toString()});t.tiles=n}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 F({domain:c,path:t.url.path,queryParams:I(I({},e),t.url.queryParams)}).toString()}return t},jc);function jc(t,e,n){t=zc.call(this,t)||this;return t.source=t._modifySource(e,n),t}var Fc=(Uc.prototype.add=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addSource(t,e)},Uc.prototype.getRenderedShapes=function(t,e,n){t="string"==typeof t?t:t.getId(),e=this.map._getMap().querySourceFeatures(t,{sourceLayer:n,filter:e});return this.map.sources._mapFeaturesToShapes(e,!0,this.sources.get(t))},Uc.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},Uc.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},Uc.prototype.getById=function(t){return this.sources.get(t)},Uc.prototype.getSources=function(){return Array.from(this.sources.values())},Uc.prototype.isSourceLoaded=function(t){t=t instanceof Pi?t.getId():t;return this.map._getMap().isSourceLoaded(t)},Uc.prototype.remove=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._removeSource(t,e)},Uc.prototype._removeSource=function(t,e){t=t instanceof Pi?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")},Uc.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)},Uc.prototype._mapFeaturesToShapes=function(t,e,n){var o,r,i=[];try{for(var s=P(t),a=s.next();!a.done;a=s.next()){var l=a.value;if((n||"string"==typeof l.source)&&"string"==typeof l.properties[ii._shapeIdPropName]){var c=n||this.sources.get(l.source);if(c instanceof Mi){var u=c.getShapeById(l.properties[ii._shapeIdPropName]);if(u instanceof ii){i.push(u);continue}}}e||i.push(l)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i},Uc.prototype._syncSources=function(o){var r=this;o&&(Object.keys(o).forEach(function(t){if(!r.sources.has(t)){var e=o[t];if("vector"===e.type){var n=new Bc(t,{name:t,tiles:e.tiles,type:"vector",url:e.url});r.sources.set(t,n),n._setMap(r.map)}else{if("raster"!==e.type)throw new Error("Unable to construct source with ID "+t+".");n=new Bc(t,{name:t,tiles:e.tiles,type:"raster",url:e.url});r.sources.set(t,n),n._setMap(r.map)}}}),Object.keys(this.sources).forEach(function(t){o.hasOwnProperty(t)||(r.sources.get(t)._setMap(null),r.sources.delete(t))}))},Uc);function Uc(t){this.map=t,this.sources=new X}var qc,Gc=(k(Zc,qc=M),Zc);function Zc(){var t=null!==qc&&qc.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var Hc,Kc=(k(Wc,Hc=M),Wc);function Wc(){var t=null!==Hc&&Hc.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var Vc,Yc=(k(Qc,Vc=M),Qc.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=P(n),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 Vc.prototype.merge.apply(this,N(n))},Qc);function Qc(){var t=null!==Vc&&Vc.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Yo(0,0),t.padding=new Kc,t}var Jc,Xc=(k($c,Jc=M),$c);function $c(){var t=null!==Jc&&Jc.apply(this,arguments)||this;return t.zoom=1,t.center=new ti(0,0),t.centerOffset=new Yo(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var tu,b=(k(eu,tu=M),eu);function eu(){var t=null!==tu&&tu.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 nu,ou=(k(ru,nu=b),ru);function ru(){var t=null!==nu&&nu.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 iu,su=(k(au,iu=b),au);function au(){var t=null!==iu&&iu.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var lu,cu=(k(uu,lu=b),uu);function uu(){var t=null!==lu&&lu.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 hu,pu=(k(du,hu=b),du);function du(){var t=null!==hu&&hu.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var fu,mu=(k(gu,fu=b),gu);function gu(){var t=null!==fu&&fu.apply(this,arguments)||this;return t.name="default-raster",t}var yu,vu=(k(_u,yu=M),_u);function _u(){var t=null!==yu&&yu.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var bu,wu=(k(Su,bu=M),Su.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=P(n),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=ma.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 bu.prototype.merge.apply(this,N(n))},Su);function Su(){var t=null!==bu&&bu.apply(this,arguments)||this;return t.autoResize=!0,t.language=xa,t.light=new vu,t.preserveDrawingBuffer=!1,t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.customAttribution=void 0,t.showTileBoundaries=!1,t.style=void 0,t.view=ba,t.userRegion=t.view,t}function xu(t){return 0==t.length?void 0:t.slice(1).reduce(function(n,o){return function(t,e){t=n(t,e);return I(I({},t),o(t.url,e))}},t[0])}var Eu,Tu=(k(Cu,Eu=M),Cu.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{for(var n=P(t),o=n.next();!o.done;o=n.next()){var r=o.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{o&&!o.done&&(s=n.return)&&s.call(n)}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 N(t,e._transformers||[])},[]):[],a=Eu.prototype.merge.apply(this,N(t));return a.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),this._transformers=N(i||[],s.filter(function(t){return!i.includes(t)})),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=xu(this._transformers),a},Cu.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=xu(this._transformers)},Cu.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=xu(this._transformers))},Cu._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Cu);function Cu(){var t=null!==Eu&&Eu.apply(this,arguments)||this;return t.authOptions=Fa(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=Ta,t.staticAssetsDomain=Ca,t.styleDefinitionsPath=Oa,t.styleDefinitionsVersion=ka,t.styleAPIVersion=Ia,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=Wa(),t.refreshExpiredTiles=!0,t.subscriptionKey=Qa(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Ea,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=Ka(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!0,t}var Ou=(ku.getLayerGroup=function(t){var e;if(null!=t&&t.metadata&&t.metadata["microsoft.maps:layerGroup"])return t.metadata["microsoft.maps:layerGroup"];t=null!==(e=null==t?void 0:t.id)&&void 0!==e?e:t;if(t.startsWith("microsoft.")){t=t.split(".");return 4<=t.length?t[3]:void 0}},ku);function ku(){}var Iu=(Lu.resolve=function(t){return new Lu(Promise.resolve(t))},Lu.reject=function(t){return new Lu(Promise.reject(t))},Lu.prototype.then=function(t,e){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).then(t,e)},Lu.prototype.catch=function(t){var n=this;return new Promise(function(t,e){n._reject=e,n._catchResolver(e)}).then(t)},Lu.prototype.finally=function(t){return this.origin.finally(t)},Lu.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Lu.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Lu.prototype.switchWith=function(t){this.origin=t,this._resolve&&this._reject?this._thenResolver(this._resolve,this._reject):this._reject&&this._catchResolver(this._reject)},Lu);function Lu(t){var r=this;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,n){var o;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?n(r._hijackedToReject):(o=r.origin,r.origin.then(function(t){o===r.origin&&(r._hijackedToResolve||(r._toResolve=t,e(t)))}).catch(function(t){r._hijackedToReject||(r._toReject=t,n(t))}))},this._catchResolver=function(e){var n;r._hijackedToReject?e(r._hijackedToReject):(n=r.origin,r.origin.catch(function(t){n===r.origin&&(r._hijackedToReject||(r._toReject=t,e(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Au={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)"},Pu=(Ru.prototype.updateIndoorState=function(t,e){var n,o=this,r=this.map.styles.getStyleSet();r?(this.preservedPreindoorStyleset=r,n=this.map.getStyle().style+"_indoor"+("dark"===t?"_dark":"")+"_tileset_"+e,this.map.styles.setStyleSet("defaultIndoor_"+e,"microsoft-maps:default"===r?n:void 0)):(this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=o.map.getStyle().style+"_indoor"+("dark"==o.indoorState.theme?"_dark":"");o.map.setStyle({style:e})}))},Ru.prototype.unsetIndoorState=function(){var n=this,t=this.preservedPreindoorStyleset;t?this.map.styles.setStyleSet(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=n.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?n.map.setStyle({style:e.split("_indoor")[0]}):n.map.setStyle({style:void 0})}))},Ru.prototype.initStyleset=function(){var e=this,t=this.serviceOptions.styleSet?"string"==typeof this.serviceOptions.styleSet?new Iu(this._request(this.serviceOptions.domain,v+"/mapconfigurations/metadata/"+this.serviceOptions.styleSet,"StyleDefinitions")):Iu.resolve(this.serviceOptions.styleSet):new Iu(this._request(this.serviceOptions.staticAssetsDomain,y+"/"+v,"StyleDefinitions").then(function(t){return{version:isNaN(t.version)?0:parseFloat(t.version),defaultStyle:t.defaultStyle,styles:t.styles.filter(function(t){return e.indoorState?t.name.includes("indoor")&&t.name.endsWith("dark"==e.indoorState.theme?"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 Au?Au[t]:t}(t.name),theme:t.theme,thumbnail:new F({domain:e.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new F({domain:e.serviceOptions.staticAssetsDomain,path:y+"/"+v+"/"+t.name,queryParams:{},protocol:"https"}).toString()}})}}));return this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return e.map._invokeEvent("stylesetchanged",t)}),this.initPromise},Ru.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.")},Ru.prototype.setStyle=function(t){try{this.map._getMap().setStyle(this.getStyle(t),{diff:!0,stylePatch:this._stylePatch.bind(this),validate:this.serviceOptions.validateStyle})}catch(t){throw t}},Ru.prototype.getTheme=function(t){t=this._lookUp(t);if(!t)throw Error("Theme is not available.");return t.theme.toLowerCase()},Ru.prototype.getThemeAsync=function(e){return L(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},Ru.prototype.setStyleSet=function(t,n){var o=this;"string"==typeof(this.serviceOptions.styleSet=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Iu.resolve(t),this.definitions().then(function(t){var e=t.defaultStyle;t.styles.find(function(t){return t.name===n})&&(e=n),o.map.setStyle({style:e})})},Ru.prototype.getStyleSet=function(){return this.serviceOptions.styleSet},Ru.prototype._stylePatch=function(t,e,o,n,r,i){var s=this,a=this.map.getStyle(),l=this.map.getTraffic();e.sources=Object.entries(e.sources).reduce(function(t,e){var n=R(e,2),e=n[0],n=n[1],n=I({},n);return"url"in n&&"string"==typeof n.url&&n.url.includes(_)&&(n.url=n.url.replace(_,a.language)),t[e]=n,t},{});function c(t){h.push(s._buildFundamentalLayerFrom(d,p)),p=t,d=[]}var u=this.map.layers.getLayers(),h=[],p="",d=[];e.layers.forEach(function(t){var e,n,o=Ou.getLayerGroup(t);p=p||o,a.showBuildingModels||"fill-extrusion"!==t.type?"fill-extrusion"===t.type&&(r(t.id,"visibility","visible"),t.layout=null!==(e=t.layout)&&void 0!==e?e:{},t.layout.visibility="visible"):(r(t.id,"visibility","none"),t.layout=null!==(n=t.layout)&&void 0!==n?n:{},t.layout.visibility="none"),"none"!==l.flow&&o&&o==="traffic_"+l.flow&&"line"==t.type&&(r(t.id,"visibility","visible"),t.layout=null!==(n=t.layout)&&void 0!==n?n:{},t.layout.visibility="visible"),o?(0<d.length&&o!=p&&c(o),d.push(t)):0<d.length&&c(o)}),0<d.length&&c("");var f=this.map.layers._getUserLayers(),m=f[0],g=u.filter(function(e){return h.findIndex(function(t){return e.getId()===t.getId()})<0&&f.findIndex(function(t){return e.getId()===t.layer.getId()})<0}),y=h.filter(function(e){return u.find(function(t){return t.getId()===e.getId()})}).entries(),v=y.next();h.forEach(function(e){var t;v.value&&v.value[1].getId()===e.getId()?(t=u.findIndex(function(t){return t.getId()===e.getId()}),s.map.layers.remove(e.getId()),s.map.layers.add(e,u[t].getId()),v=y.next()):v.value?s.map.layers.add(e,v.value[1]):s.map.layers.add(e,null==m?void 0:m.layer)}),g.forEach(function(t){s.map.layers.remove(t)}),f.forEach(function(t){var e,n=void 0;s.map.layers.getLayerById(t.before)&&(n=0<(e=s.map.layers.getLayerById(t.before)._buildLayers()).length?e[0]:void 0),o(t.layer.getId(),null==n?void 0:n.id)}),this.map.sources._syncSources(e.sources),this.map.events.remove("styledata",this._onStyleData),this.map.events.addOnce("styledata",this._onStyleData)},Ru.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length){t=new Ac(t,e);return t.onAdd(this.map),t}throw new Error("Unable to construct fundamental map layer for ID: "+e+".")},Ru.prototype._transformStyleRequest=function(t,e){t.includes(c)&&(e.url=e.url.replace(c,this.serviceOptions.domain)),t.includes(m)&&(e.url=e.url.replace(m,y)),t.includes(g)&&(e.url=e.url.replace(g,v)),e.url=e.url+((t.includes("?")?"&":"?")+l+"="+this.serviceOptions.styleAPIVersion),null!==(t=this.map.authentication)&&void 0!==t&&t.signRequest(e)},Ru.prototype._request=function(o,r,i,s){var a;return void 0===s&&(s={}),L(this,void 0,void 0,function(){var e,n;return A(this,function(t){switch(t.label){case 0:return e={url:new F({protocol:"https",domain:o,path:r,queryParams:I(((n={})[l]=this.serviceOptions.styleAPIVersion,n),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),n={method:"GET",mode:"cors"},e.credentials&&(n.credentials=e.credentials),e.headers&&(n.headers=e.headers),[4,fetch(e.url,n).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText+" ")})];case 1:return[2,t.sent()]}})})},Ru);function Ru(t,e){var o=this;this.definitions=function(){return o.initPromise||o.initStyleset()},this.indoorState=void 0,this.preservedPreindoorStyleset=void 0,this._onStyleData=function(){o._lookUpAsync(o.map.getStyle()).then(function(t){o.map.events.invoke("stylechanged",{style:t.name,map:o.map,type:"stylechanged"})})},this._lookUp=function(e){var t=o.definitions().errorIfRejected(),n=o.definitions().resultIfResolved();return t||void 0===n?null:n.styles.find(function(t){return t.name===(e.style||n.defaultStyle)})||n.styles.find(function(t){return t.name===n.defaultStyle})||n.styles[0]},this._lookUpAsync=function(n){return L(o,void 0,void 0,function(){var e;return A(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.styles.find(function(t){return t.name===(n.style||e.defaultStyle)})||e.styles.find(function(t){return t.name===e.defaultStyle})||e.styles[0]]}})})},this.map=t,this.serviceOptions=e}var Nu,Mu=(k(Du,Nu=$),Du.prototype.getCanvas=function(){return this.map.getCanvas()},Du.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},Du.prototype.getMapContainer=function(){return this.map.getContainer()},Du.prototype.getServiceOptions=function(){return ki(this.serviceOptions,Tu._cloneCustomizer)},Du.prototype.setServiceOptions=function(t){this.serviceOptions=(new Tu).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},Du.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},Du.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},Du.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var n,o=(new Yc).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(o.bounds);if(!(n=this.map.cameraForBounds(r,{padding:o.padding,offset:o.offset,maxZoom:o.maxZoom})))throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");this.map.setMaxZoom(o.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),s=this._generateSafeBounds(o.maxBounds)}else{var i=(new Xc).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(r=i.centerOffset,(o=Fr([i.center],i.zoom))[0][0]+=r[0],o[0][1]+=r[1],i.center=jr(o,i.zoom)[0]),n={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()),s=this._generateSafeBounds(i.maxBounds)}s?this.map.setMaxBounds(s):this.map.setMaxBounds(null);var s=(new Gc).merge(t),t={duration:s.duration,easing:function(t){return t},offset:[0,0],animate:!0},e={fromControl:e};"jump"===s.type?this.map.jumpTo(n,e):"ease"===s.type?this.map.easeTo(I(I({},n),t),e):"fly"===s.type&&this.map.flyTo(I(I({},n),t),e)},Du.prototype.setCameraBounds=function(t){this.setCamera(t)},Du.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 li(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},Du.prototype.setStyle=function(t){delete t.preserveDrawingBuffer;t=(new wu).merge(this.styleOptions,t);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=ma.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)},Du.prototype.getStyle=function(){return Fn(this.styleOptions)},Du.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},Du.prototype.addPins=function(t,e){var n,o=(new cu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new qs(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,iconOptions:{anchor:"center",size:o.iconSize,image:["case",["has","icon"],["get","icon"],o.icon],ignorePlacement:!o.cluster,opacity:o.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],o.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[o.textFont]]],size:["case",["has","point_count"],20,o.fontSize],ignorePlacement:!o.cluster,opacity:o.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[o.textOffset[0]/16,o.textOffset[1]/16]]],color:o.fontColor}})),!(r instanceof qs))throw new Error("A layer with name '"+o.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Mi(n,{cluster:o.cluster})),!(s instanceof Mi))throw new Error("The source with name '"+n+"' 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,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Du.prototype.addCircles=function(t,e){var n,o=(new ou).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new Xi(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,opacity:o.opacity,radius:["case",["has","radius"],["get","radius"],o.radius],color:["case",["has","color"],["get","color"],o.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],o.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],o.outlineWidth]})),!(r instanceof Xi))throw new Error("A layer with name '"+o.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Mi(n)),!(s instanceof Mi))throw new Error("The source with name '"+n+"' 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,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Du.prototype.addLinestrings=function(t,e){var n,o=(new su).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new _s(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,lineCap:o.cap,lineJoin:o.join,strokeOpacity:o.opacity,strokeColor:["case",["has","color"],["get","color"],o.color],strokeWidth:["case",["has","width"],["get","width"],o.width]})),!(r instanceof _s))throw new Error("A layer with name '"+o.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Mi(n)),!(s instanceof Mi))throw new Error("The source with name '"+n+"' 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,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Du.prototype.addPolygons=function(t,e){var n,o=(new pu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new Ls(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,fillOpacity:o.opacity,fillColor:["case",["has","color"],["get","color"],o.color]})),!(r instanceof Ls))throw new Error("A layer with name '"+o.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Mi(n)),!(s instanceof Mi))throw new Error("The source with name '"+n+"' 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,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Du.prototype.addRaster=function(t,e){var n=(new mu).merge(e),o=this.layers.getLayerById(n.name);if(!((o=o||new Vs({maxZoom:n.maxZoom,minZoom:n.minZoom,opacity:n.opacity,tileSize:256,tileUrl:"{subdomain}"},n.name))instanceof Vs))throw new Error("A layer with name '"+n.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==o.getOptions().tileUrl)throw new Error("A TileLayer with name '"+n.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(e=!n.overwrite&&o.getOptions().subdomains||[]).push.apply(e,N(t)),o._setOptionsNoUpdate({subdomains:e}),this.layers.add(o,n.before)},Du.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},Du.prototype.removeLayers=function(t){var e,n;try{for(var o=P(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Du.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+Ho());var n=new ca({htmlContent:t});return this.markers.add(n,e),t.id},Du.prototype.removeHtml=function(t){this.markers.remove(t)},Du.prototype.addEventListener=function(t,e,n){this.events._addLegacy(t,e,n)},Du.prototype.removeEventListener=function(t,e,n){this.events._removeLegacy(t,e,n)},Du.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},Du.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},Du.prototype.addControl=function(t,e){this.controls.add(t,e)},Du.prototype.removeControl=function(t){this.controls.remove(t)},Du.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,n=this.trafficOptions.flow;if(this.trafficOptions=(new mo).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof wo}).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!==n&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=n,t}else this.flowDelegate.removeFromMap()},Du.prototype.getTraffic=function(){return Fn(this.trafficOptions)},Du.prototype.remove=function(){this.dispose()},Du.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},Du.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},Du.prototype.resize=function(t,e,n){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?n=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(n),this.getMapContainer().style.overflow=e},Du.prototype.pixelsToPositions=function(t){var e,n,o=[];try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);o.push(new ti(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},Du.prototype.positionsToPixels=function(t){var e,n,o=[];try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);o.push(new Yo(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},Du.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},Du.prototype.stop=function(){this.map.stop()},Du.prototype._getMap=function(){return this.map},Du.prototype._rebuildStyle=function(){return L(this,void 0,void 0,function(){return A(this,function(t){return this.styles.setStyle(this.styleOptions),this.imageSprite._restoreImages(),[2]})})},Du.prototype._isLoaded=function(){return this.loaded},Du.prototype._isReady=function(){return this.ready},Du.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},Du.prototype._sendRequest=function(t,e,n){var o;return(o="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):o)?fetch(o.url||t,{credentials:o.credentials,headers:I(I({},n),o.headers),method:"GET",mode:"cors"}):fetch(t,{headers:n,method:"GET",mode:"cors"})},Du.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var n,o;(t.includes(p)||t.includes(c))&&(n=new RegExp("[^{]"+p+"[^}]"),t.match(n)&&(e.url=e.url.replace(p,c)),F.protoRegEx.test(this.serviceOptions.domain)?(o=e.url.indexOf(c),e.url=this.serviceOptions.domain+e.url.substring(o+c.length)):e.url=e.url.replace(c,this.serviceOptions.domain)),null!==(o=this.authentication)&&void 0!==o&&o.signRequest(e),t.includes(_)&&(e.url=e.url.replace(_,this.styleOptions.language)),t.includes(d)&&(e.url=this.styleOptions.view?e.url.replace(d,this.styleOptions.view):e.url.replace(d,"").replace("&"+f+"=",""))},Du.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},Du.prototype._setStyleComponents=function(e){var n=this;this.removed||this.styles.definitions().then(function(t){n.styleOptions.style&&t.styles.map(function(t){return t.name}).includes(n.styleOptions.style)||(n.styleOptions.style=t.defaultStyle),n.styleOptions=e,n._rebuildStyle()})},Du.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!ja&&$a(t.authOptions),t.domain&&!Pa&&tl(t.domain),t.styleDefinitionsPath&&!Ra&&el(t.styleDefinitionsPath),t.workerCount&&!Ma&&nl(t.workerCount),t.maxParallelImageRequests&&!Da&&ol(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||ja||sl(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Ba||il(t.sessionId||t["session-id"]),t.language&&!za&&rl(t.language),!t.userRegion&&!t.view||Aa||al(t.userRegion||t.view))},Du.prototype._generateSafeBounds=function(t){if(t){var e=li.getSouth(t),n=li.getWest(t),o=li.getNorth(t),r=li.getEast(t);if(isNaN(e)||isNaN(n)||isNaN(o)||isNaN(r))throw new Error("The bounds specified are invalid: ["+t+"]");for(;r<n;)r+=360;return new li([n,e,r,o])}return t},Du.prototype._detectHighContrast=function(){var t,e;switch(vl.getHighContrastMode()){case"invert":case"light":t=Du.Css.hcLight,e="high_contrast_light";break;case"dark":t=Du.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},Du.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},Du);function Du(t,e){var o=Nu.call(this)||this;o.removed=!1,o.loaded=!1,o.ready=!1,o._windowResizeCallback=function(){return o.resize()};var n,r,i=!0;o._updateGlobalDefaults(e),o.serviceOptions=(new Tu).merge(e),o.styleOptions=(new wu).merge(e),o.trafficOptions=new mo,o.styles=new Pu(o,o.serviceOptions),o.serviceOptions.authOptions.subscriptionKey&&(o.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(o.serviceOptions.authOptions.subscriptionKey)),n=o.serviceOptions.authOptions.clientId||(o.serviceOptions.authOptions.subscriptionKey?o.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),o.insights&&o.insights.setAuthenticatedUserContext(o.serviceOptions.sessionId,n),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(r=arguments[2],o.ready=!0,o.loaded=!0):(t={attributionControl:!1,container:t,fadeDuration:o.serviceOptions.fadeDuration,localIdeographFontFamily:o.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:o.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:o.serviceOptions.refreshExpiredTiles,renderWorldCopies:o.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var n={url:t};return"Tile"===e||"Source"===e?(t.includes(p)&&o.insights&&o.insights.trackEvent({name:"TileLoad"}),o._substituteDomainLanguageViewAndSignInRequest(t,n)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||o.styles._transformStyleRequest(t,n),o.serviceOptions.transformRequest&&lo(n,o.serviceOptions.transformRequest(n.url,e)),n}},r=new h.Map(t));try{o.map=r,o.authentication=new vc(o),o.controls=new bc(o),o.events=new Ec(o),o.imageSprite=new kc(o),o.layers=new Rc(o),o.markers=new Cc(o),o.sources=new Fc(o),o.popups=new Mc(o),o.map.getContainer().classList.add(Du.Css.container),o.map.getCanvasContainer().classList.add(Du.Css.canvasContainer),o.map.getCanvas().classList.add(Du.Css.canvas),o._detectHighContrast(),o.copyrightControl=new El({showFeedbackLink:o.styleOptions.showFeedbackLink,showLogo:o.styleOptions.showLogo,customAttribution:o.styleOptions.customAttribution}),o.controls.add(o.copyrightControl,{position:u.ControlPosition.NonFixed});var s=o.authentication?o.authentication.initialize():Promise.resolve();if(o.removed)return o;var a=function(){o.loaded=!0,o.map.off("load",a)};o.map.on("load",a);var l=function(){o.ready=!0,o.map.off("styledata",l),o.events.invoke("ready",{map:o,type:"ready"})};o.map.on("styledata",l),o._setAutoResize(o.styleOptions.autoResize),o.map.showTileBoundaries=o.styleOptions.showTileBoundaries,o.localizedStringsPromise=ma.getStrings(o.styleOptions.language);var c=o.styles.initStyleset();Promise.all([s,c]).then(function(t){t=R(t,2),t[0],t[1];if(!o.removed){if(o.authentication&&!o.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");o.serviceOptions["enable-accessibility"]&&o.accessibleMapDelegate.addToMap(),o._setStyleComponents(o.styleOptions),o.copyrightDelegate&&o.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);o.insights&&o.insights.trackException({error:t}),o.events.invoke("error",{map:o,type:"error",error:t})}),o.setCamera(I(I({},e),{type:"jump",duration:0})),o.incidentDelegate=new ql(o),o.flowDelegate=new zl(o),o.accessibleMapDelegate=new Dl(o),o.userInteractionDelegate=new Jl(o,e),o.userInteractionDelegate.addToMap(),o.copyrightDelegate=new uc(o,o.copyrightControl,o.styleOptions)}catch(t){throw i=!1,o.insights&&o.insights.trackException({error:t instanceof Error?t:new Error(t)}),t}finally{o.insights&&(o.insights.trackEvent({name:"MapLoad"},{success:i,supported:Xa(!1),supportedWithPerformance:Xa(!0)}),o.insights.flush())}return o}zu.applyTemplate=function(e,n){var o,r,t,i=this,s=document.createElement("div");return s.classList.add(zu.Css.template),e&&("boolean"!=typeof(n=n||{}).singleDescription&&(n.singleDescription=!0),n.sandboxContent="boolean"!=typeof n.sandboxContent||n.sandboxContent,n.title&&"string"==typeof n.content&&(n.content.includes("{title}")||n.content.includes("{name}"))||(e.title?n.title="{title}":e.name&&(n.title="{name}")),"boolean"!=typeof n.detectHyperlinks&&(n.detectHyperlinks=!0),"boolean"!=typeof n.parsePropertyPaths&&(n.parsePropertyPaths=!0),n.textColor&&(s.style.color=n.textColor),n.fillColor&&(s.style.backgroundColor=n.fillColor),n.title&&((t=this._applyStringTemplate(e,n.title,n)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,zu.Css.title)),(o=document.createElement("div")).classList.add(zu.Css.content),Array.isArray(n.content)?0<n.content.length&&n.content[0].propertyPath?this._appendChild(o,this._generateContent(e,n.content,n),zu.Css.item):n.content.forEach(function(t){i._appendChild(o,i._generateContent(e,t,n),zu.Css.item)}):(r=0,e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++}),t=void 0,1===r||n.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,n.content,n),this._appendChild(o,t,zu.Css.item)),""!==o.innerHTML&&(n.sandboxContent?s.appendChild(zu._createSandboxedIframe(o,n)):s.appendChild(o))),s},zu._createSandboxedIframe=function(t,e){var n=document.createElement("iframe");n.sandbox.add("allow-popups");var o=t.innerHTML,r=!1,i=100,s=550,a=10,l=0;document.body.scrollWidth<=340&&(s=300,i=50);var c=o.split(/<(tr|div|br|li|h[0-9]|p>)/),l=Math.max.apply(Math,N(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),o.includes("<img")||o.includes("<video")?(r=!0,n.width="550px"):(l=-1<o.indexOf(zu.Css.table)?25:20,a+=Math.max(.5*c.length*l,Math.ceil(o.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/i)*l)),n.width=s+"px",n.height=r||280<a?"280px":a+"px";a=e.textColor?"color:"+e.textColor+";":"",e=e.fillColor?"background-color:"+e.fillColor+";":"",o='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+zu._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+a+e+'}</style></head><body><div class="'+zu.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+o+"</div></body></html>";return void 0===n.srcdoc?n.src="data:text/html;charset=utf-8,"+encodeURI(o):n.srcdoc=o,n},zu._appendChild=function(t,e,n){e&&(n&&(e.className=(e.className?e.className+" ":"")+n),t.appendChild(e))},zu._generateContent=function(t,e,n){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,n):this._applyStringTemplate(t,e,n);t=this._generateDynamicTableHtml(t,null,n);if(t){n=document.createElement("div");return n.innerHTML=t,n}return null},zu._applyStringTemplate=function(t,e,n){if(e){for(var o,r=e,i=this._placeholderRx.exec(e);i;)2<=i.length&&(o=this._getPropertyValue(t,i[1],n),r=r.replace(i[0],o)),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},zu._getPropertyValue=function(t,e,n,o){var r=n.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(n.detectHyperlinks&&"link"===e&&(!o||o.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){o&&o.hyperlinkFormat?l=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(l=n.hyperlinkFormat);var u=l&&l.target?l.target:"_blank",h=[];return c.forEach(function(t){t.title||l&&l.label||!t.rel||h.push(t.rel," - "),h.push('<a href="',t.href,'" target="',u,'">'),t.title?h.push(t.title):l&&l.label?h.push(l.label):h.push(t.href),h.push("</a>","<br/>")}),h.pop(),h.join("")}}if(null!=a){for(var p=void 0,p=1;p<i&&(a=a[r[p]],s=r[p],null!=a);p++);if(p===i&&null!=a){var d=void 0;if((d=void 0!==a.value?a.value:a)instanceof Date)return o&&o.dateFormat?d.toLocaleString(void 0,o.dateFormat):n.dateFormat?d.toLocaleString(void 0,n.dateFormat):d.toISOString();if("object"==typeof d)return(m=this._generateDynamicTableHtml(d,r.slice(1),n))||"";if("number"==typeof d){if(o){if(o.dateFormat)return new Date(d).toLocaleString(void 0,o.dateFormat);if(o.numberFormat)return d.toLocaleString(void 0,o.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(d).toISOString();return d.toLocaleString(void 0,n.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(n.detectHyperlinks||o&&o.hyperlinkFormat)){var d=d.trim(),f=this._isUrlRx.test(d)||o&&o.hyperlinkFormat,t=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),e=this._emailRx.test(d);if(f||t||e){f=void 0;o&&o.hyperlinkFormat?f=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(f=n.hyperlinkFormat);var m=void 0;m=f&&f.target?' target="'+f.target+'"':' target="_blank"';n=""+(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+">"+(n=f&&f.isImage||t?'<img src="'+d+'" style="max-width:100%"'+e+'"/>':n)+"</a>"}}return d.toString()}}}return""},zu._generatePropertyInfoTable=function(n,t,o){if(n&&t&&0<t.length){var r=[],i=this;r.push('<table class="'+i.Css.table+'">'),t.forEach(function(t){var e=i._getPropertyValue(n,t.propertyPath,o,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},zu._generateDynamicTableHtml=function(e,t,n){var o=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){o._ignoreProperty(t,e[t])||(r.push("<tr><th>",t,"</th><td>",i._getPropertyValue(e,s+t,n),"</td></tr>"),a++)}),0===a)?null:(r.push("</table>"),r.join(""))}return null},zu._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},zu._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,zu._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,zu._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,zu._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,zu._cssUrl=new F({domain:e,path:"sdk/javascript/mapcontrol/"+G.getEndpointVersion()+"/atlas.min.css"}).toString(),zu.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"},b=zu;function zu(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}M=new F({domain:e,path:"sdk/javascript/mapcontrol/"+G.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});o.setRTLTextPlugin(M.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=ca,u.Map=Mu,u.Pixel=Yo,u.Popup=oa,u.PopupTemplate=b,u.Shape=ii,u._getAssetDomain=function(){return t},u._getDomain=function(){return Ta},u._hasMaxParallelImageRequests=dl,u._hasSetAuthenticationOptions=cl,u._hasSetDomain=ul,u._hasSetLanguage=fl,u._hasSetSessionId=ml,u._hasSetStyleDefinitionsPath=hl,u._hasSetStyleDefinitionsVersion=function(){return Na},u._hasSetView=gl,u._hasWorkerCount=pl,u.addImageTemplate=function(t,e,n){!n&&yl[t.toLowerCase()]||(yl[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){h.clearPrewarmedResources()},u.control=Ct,u.data=bt,u.getAllImageTemplateNames=function(){return Object.keys(yl)},u.getAuthenticationOptions=Fa,u.getDomain=qa,u.getImageTemplate=ll,u.getLanguage=Va,u.getMaxParallelImageRequests=Wa,u.getSessionId=Ya,u.getStaticAssetsDomain=Ua,u.getStyleAPIVersion=Ha,u.getStyleDefinitionsPath=Ga,u.getStyleDefinitionsVersion=Za,u.getSubscriptionKey=Qa,u.getUserRegion=function(){return ba},u.getVersion=function(){return G.getFullVersion()},u.getView=Ja,u.getWorkerCount=Ka,u.internal=nt,u.isSupported=Xa,u.layer=mt,u.math=Lt,u.prewarm=function(){h.prewarm()},u.setAuthenticationOptions=$a,u.setDomain=tl,u.setLanguage=rl,u.setMaxParallelImageRequests=ol,u.setSessionId=il,u.setStyleAPIVersion=function(t){Ia=t},u.setStyleDefinitionsPath=el,u.setStyleDefinitionsVersion=function(t){ka=t,Na=!0},u.setSubscriptionKey=sl,u.setUserRegion=al,u.setView=function(t){ba=t,Aa=!0},u.setWorkerCount=nl,u.source=Ot,Object.defineProperty(u,"__esModule",{value:!0})});