PageSourceSearch

https://test-covid-france.netlify.app/static/js/2.43754451.chunk.js

js test-covid-france.netlify.app collected 2026-10-03 11:29:33 UTC 1,079,714 bytes, 3 lines download raw bytes

1/*! For license information please see 2.43754451.chunk.js.LICENSE.txt */
2(this["webpackJsonptest-center"]=this["webpackJsonptest-center"]||[]).push([[2],[function(t,e,n){"use strict";t.exports=n(44)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(49)()},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(13);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return m})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return g}));var i=n(0),o=n.n(i),a=(n(2),n(10)),s=n(20),u=n(9);function l(){return(l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var c=n(22),p=n.n(c);n(26);function h(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n(40);var f=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router-History"),d=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router"),m=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}r(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(d.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(f.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;o.a.Component;var y={},v=0;function g(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,l=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=y[n]||(y[n]={});if(r[t])return r[t];var i=[],o={regexp:p()(t,i,e),keys:i};return v<1e4&&(r[t]=o,v++),o}(n,{end:o,strict:s,sensitive:l}),i=r.regexp,a=r.keys,u=i.exec(t);if(!u)return null;var c=u[0],h=u.slice(1),f=t===c;return o&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:a.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var _=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(d.Consumer,null,(function(e){e||Object(u.a)(!1);var n=t.props.location||e.location,r=l({},e,{location:n,match:t.props.computedMatch?t.props.computedMatch:t.props.path?g(n.pathname,t.props):e.match}
2),i=t.props,a=i.children,s=i.component,c=i.render;return Array.isArray(a)&&0===a.length&&(a=null),o.a.createElement(d.Provider,{value:r},r.match?a?"function"===typeof a?a(r):a:s?o.a.createElement(s,r):c?c(r):null:"function"===typeof a?a(r):null)}))},e}(o.a.Component);function x(t){return"/"===t.charAt(0)?t:"/"+t}function b(t,e){if(!t)return e;var n=x(t);return 0!==e.pathname.indexOf(n)?e:l({},e,{pathname:e.pathname.substr(n.length)})}function w(t){return"string"===typeof t?t:Object(a.e)(t)}function E(t){return function(){Object(u.a)(!1)}}function S(){}o.a.Component;o.a.Component;o.a.useContext},function(t,e,n){"use strict";var r=n(27),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function s(t){return null!==t&&"object"===typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function l(t){return"[object Function]"===i.call(t)}function c(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!==typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"===typeof t},isNumber:function(t){return"number"===typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:l,isStream:function(t){return s(t)&&l(t.pipe)},isURLSearchParams:function(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:c,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return e},extend:function(t,e,n){return c(e,(function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var r="undefined"!==typeof window?window:t,i=("undefined"!==typeof t||window,"undefined"!==typeof document?document:{})}).call(this,n(17))},function(t,e,n){"use strict";e.a=function(t,e){if(!t)throw new Error("Invariant failed")}},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return k})),n.d(e,"d",(function(){return C})),n.d(e,"c",(function(){return m})),n.d(e,"f",(function(){return y})),n.d(e,"e",(function(){return d}));var a=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],a=e&&e.split("/")||[],s=t&&i(t),u=e&&i(e),l=s||u;if(t&&i(t)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var c=a[a.length-1];n="."===c||".."===c||""===c}else n=!1;for(var p=0,h=a.length;h>=0;h--){var f=a[h];"."===f?o(a,h):".."===f?(o(a,h),p++):p&&(o(a,h),p--)}if(!l)for(;p--;p)a.unshift("..");!l||""===a[0]||a[0]&&i(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,n){if(e===n)return!0;
vendor: 5,463 bytes, line 2
2if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var r=s(e),i=s(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},l=n(9);function c(t){return"/"===t.charAt(0)?t:"/"+t}function p(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function f(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function d(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(t,e,n,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=r({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function y(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function v(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function _(t,e){e(window.confirm(t))}function x(){try{return window.history.state||{}}catch(t){return{}}}function b(t){void 0===t&&(t={}),g||Object(l.a)(!1);var e=window.history,n=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,p=void 0===u?_:u,y=o.keyLength,b=void 0===y?6:y,w=t.basename?f(c(t.basename)):"";function E(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return w&&(o=h(o,w)),m(o,r,n)}function S(){return Math.random().toString(36).substr(2,b)}var T=v();function k(t){r(F,t),F.length=e.length,T.notifyListeners(F.location,F.action)}function P(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||z(E(t.state))}function C(){z(E(x()))}var I=!1;function z(t){if(I)I=!1,k();else{T.confirmTransitionTo(t,"POP",p,(function(e){e?k({action:"POP",location:t}):function(t){var e=F.location,n=M.indexOf(e.key);-1===n&&(n=0);var r=M.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(I=!0,D(i))}(t)}))}}var A=E(x()),M=[A.key];function O(t){return w+d(t)}function D(t){e.go(t)}var L=0;function R(t){1===(L+=t)&&1===t?(window.addEventListener("popstate",P),i&&window.addEventListener("hashchange",C)):0===L&&(window.removeEventListener("popstate",P),i&&window.removeEventListener("hashchange",C))}var B=!1;var F={length:e.length,action:"POP",location:A,createHref:O,push:function(t,r){var i=m(t,r,S(),F.location);T.confirmTransitionTo(i,"PUSH",p,(function(t){if(t){var r=O(i),o=i.key,a=i.state;if(n)if(e.pushState({key:o,state:a},null,r),s)window.location.href=r;else{var u=M.indexOf(F.location.key),l=M.slice(0,u+1);l.push(i.key),M=l,k({action:"PUSH",location:i})}else window.location.href=r}}))},replace:function(t,r){var i=m(t,r,S(),F.location);T.confirmTransitionTo(i,"REPLACE",p,(function(t){if(t){var r=O(i),o=i.key,a=i.state;if(n)if(e.replaceState({key:o,state:a},null,r),s)window.location.replace(r);else{var u=M.indexOf(F.location.key);-1!==u&&(M[u]=i.key),k({action:"REPLACE",location:i})}else window.location.replace(r)}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(t){void 0===t&&(t=!1);var e=T.setPrompt(t);return B||(R(1),B=!0),function(){return B&&(B=!1,R(-1)),e()}},listen:function(t){var e=T.appendListener(t);return R(1),function(){R(-1),e()}}};return F}var w={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+p(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:p,decodePath:c},slash:{encodePath:c,decodePath:c}};function E(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function S(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function T(t){window.location.replace(E(window.location.href)+"#"+t)}function k(t){void 0===t&&(t={}
vendor: 4,442 bytes, line 2
2),g||Object(l.a)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),i=n.getUserConfirmation,o=void 0===i?_:i,a=n.hashType,s=void 0===a?"slash":a,u=t.basename?f(c(t.basename)):"",p=w[s],y=p.encodePath,x=p.decodePath;function b(){var t=x(S());return u&&(t=h(t,u)),m(t)}var k=v();function P(t){r(j,t),j.length=e.length,k.notifyListeners(j.location,j.action)}var C=!1,I=null;function z(){var t,e,n=S(),r=y(n);if(n!==r)T(r);else{var i=b(),a=j.location;if(!C&&(e=i,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(I===d(i))return;I=null,function(t){if(C)C=!1,P();else{k.confirmTransitionTo(t,"POP",o,(function(e){e?P({action:"POP",location:t}):function(t){var e=j.location,n=D.lastIndexOf(d(e));-1===n&&(n=0);var r=D.lastIndexOf(d(t));-1===r&&(r=0);var i=n-r;i&&(C=!0,L(i))}(t)}))}}(i)}}var A=S(),M=y(A);A!==M&&T(M);var O=b(),D=[d(O)];function L(t){e.go(t)}var R=0;function B(t){1===(R+=t)&&1===t?window.addEventListener("hashchange",z):0===R&&window.removeEventListener("hashchange",z)}var F=!1;var j={length:e.length,action:"POP",location:O,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=E(window.location.href)),n+"#"+y(u+d(t))},push:function(t,e){var n=m(t,void 0,void 0,j.location);k.confirmTransitionTo(n,"PUSH",o,(function(t){if(t){var e=d(n),r=y(u+e);if(S()!==r){I=e,function(t){window.location.hash=t}(r);var i=D.lastIndexOf(d(j.location)),o=D.slice(0,i+1);o.push(e),D=o,P({action:"PUSH",location:n})}else P()}}))},replace:function(t,e){var n=m(t,void 0,void 0,j.location);k.confirmTransitionTo(n,"REPLACE",o,(function(t){if(t){var e=d(n),r=y(u+e);S()!==r&&(I=e,T(r));var i=D.indexOf(d(j.location));-1!==i&&(D[i]=e),P({action:"REPLACE",location:n})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=k.setPrompt(t);return F||(B(1),F=!0),function(){return F&&(F=!1,B(-1)),e()}},listen:function(t){var e=k.appendListener(t);return B(1),function(){B(-1),e()}}};return j}function P(t,e,n){return Math.min(Math.max(t,e),n)}function C(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,i=e.initialEntries,o=void 0===i?["/"]:i,a=e.initialIndex,s=void 0===a?0:a,u=e.keyLength,l=void 0===u?6:u,c=v();function p(t){r(x,t),x.length=x.entries.length,c.notifyListeners(x.location,x.action)}function h(){return Math.random().toString(36).substr(2,l)}var f=P(s,0,o.length-1),y=o.map((function(t){return m(t,void 0,"string"===typeof t?h():t.key||h())})),g=d;function _(t){var e=P(x.index+t,0,x.entries.length-1),r=x.entries[e];c.confirmTransitionTo(r,"POP",n,(function(t){t?p({action:"POP",location:r,index:e}):p()}))}var x={length:y.length,action:"POP",location:y[f],index:f,entries:y,createHref:g,push:function(t,e){var r=m(t,e,h(),x.location);c.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=x.index+1,n=x.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=m(t,e,h(),x.location);c.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(x.entries[x.index]=r,p({action:"REPLACE",location:r}))}))},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},canGo:function(t){var e=x.index+t;return e>=0&&e<x.entries.length},block:function(t){return void 0===t&&(t=!1),c.setPrompt(t)},listen:function(t){return c.appendListener(t)}};return x}},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var r="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i="undefined"!==typeof window?window:t,o=("undefined"!==typeof t||window,"undefined"!==typeof document&&document,!1);try{var a={get passive(){return o=!0,!0}};i.addEventListener("test",a,a),i.removeEventListener("test",a,a)}catch(s){}}).call(this,n(17))},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"e",(function(){return Xe})),n.d(e,"c",(function(){return _n})),n.d(e,"d",(function(){return Tn})),n.d(e,"b",(function(){return Bn})),n.d(e,"a",(function(){return zt}));var i=n(4);function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var a=n(3);
2function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function l(t){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?o(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=n(1),f=n(0),d=n(2),m=n.n(d);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(h.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var x=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function b(t){if(!t)return null;if("string"===typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=g(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(a){r.e(a)}finally{r.f()}var o=t.layers.map((function(t){var e=n[t.ref],r=null;if("interactive"in t&&delete(r=v({},t)).interactive,e){delete(r=r||v({},t)).ref;var i,o=g(x);try{for(o.s();!(i=o.n()).done;){var s=i.value;s in e&&(r[s]=e[s])}}catch(a){o.e(a)}finally{o.f()}}return r||t}));return v(v({},t),{},{layers:o})}var w=n(14);var E=n(13);function S(t){return function(t){if(Array.isArray(t))return Object(w.a)(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Object(E.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=n(5),k=1e-6,P="undefined"!==typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});!function(){var t=function(){var t=new P(4);return P!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();function C(t,e){var n,r,i,o=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}([],e,t);return n=o,r=o,i=1/o[3],n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=r[3]*i,o}function I(t,e){var n=t%e;return n<0?e+n:n}function z(t,e,n){return n*e+(1-n)*t}function A(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*r+x*s+b*p+w*m,t[1]=_*i+x*u+b*h+w*y,t[2]=_*o+x*l+b*f+w*v,t[3]=_*a+x*c+b*d+w*g,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*r+x*s+b*p+w*m,t[5]=_*i+x*u+b*h+w*y,t[6]=_*o+x*l+b*f+w*v,t[7]=_*a+x*c+b*d+w*g,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*r+x*s+b*p+w*m,t[9]=_*i+x*u+b*h+w*y,t[10]=_*o+x*l+b*f+w*v,t[11]=_*a+x*c+b*d+w*g,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*r+x*s+b*p+w*m,t[13]=_*i+x*u+b*h+w*y,t[14]=_*o+x*l+b*f+w*v,t[15]=_*a+x*c+b*d+w*g,t}function M(t,e,n){var r,i,o,a,s,u,l,c,p,h,f,d,m=n[0],y=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=r*m+s*y+p*v+e[12],t[13]=i*m+u*y+h*v+e[13],t[14]=o*m+l*y+f*v+e[14],t[15]=a*m+c*y+d*v+e[15]),t}function O(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function D(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],p=t[9],h=t[10],f=t[11],d=t[12],m=t[13],y=t[14],v=t[15],g=e[0],_=e[1],x=e[2],b=e[3],w=e[4],E=e[5],S=e[6],T=e[7],P=e[8],C=e[9],I=e[10],z=e[11],A=e[12],M=e[13],O=e[14],D=e[15];return Math.abs(n-g)<=k*Math.max(1,Math.abs(n),Math.abs(g))&&Math.abs(r-_)<=k*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-x)<=k*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-b)<=k*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(a-w)<=k*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-E)<=k*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(u-S)<=k*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(l-T)<=k*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(c-P)<=k*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(p-C)<=k*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(h-I)<=k*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(f-z)<=k*Math.max(1,Math.abs(f),Math.abs(z))&&Math.abs(d-A)<=k*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(m-M)<=k*Math.max(1,Math.abs(m),Math.abs(M))&&Math.abs(y-O)<=k*Math.max(1,Math.abs(y),Math.abs(O))&&Math.abs(v-D)<=k*Math.max(1,Math.abs(v),Math.abs(D))}function L(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function R(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function B(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function F(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}var j=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};!function(){var t=function(){var t=new P(2);return P!=Float32Array&&(t[0]=0,t[1]=0),t}()}();!function(){var t=function(){var t=new P(3);return P!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}()}();function N(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}var U=Math.PI,V=U/4,q=U/180,Z=180/U;function W(t){return Math.pow(2,t)}function G(t){return Math.log2(t)}function X(t){var e=Object(T.a)(t,2),n=e[0],r=e[1];N(Number.isFinite(n)),N(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var i=r*q;return[512*(n*q+U)/(2*U),512*(U+Math.log(Math.tan(V+.5*i)))/(2*U)]}function H(t){var e=Object(T.a)(t,2),n=e[0],r=e[1],i=n/512*(2*U)-U,o=2*(Math.atan(Math.exp(r/512*(2*U)-U))-V);return[i*Z,o*Z]}function K(t){var e=t.latitude,n=t.longitude,r=t.highPrecision,i=void 0!==r&&r;N(Number.isFinite(e)&&Number.isFinite(n));var o={},a=Math.cos(e*q),s=512/360/a,u=512/4003e4/a;if(o.unitsPerMeter=[u,u,u],o.metersPerUnit=[1/u,1/u,1/u],o.unitsPerDegree=[512/360,s,u],o.degreesPerUnit=[.703125,1/s,1/u],i){var l=q*Math.tan(e*q)/a,c=512/360*l/2,p=512/4003e4*l,h=p/s*u;o.unitsPerDegree2=[0,c,p],o.unitsPerMeter2=[h,0,h]}return o}function Y(t){var e,n,r=t.height,i=t.pitch,o=t.bearing,a=t.altitude,s=t.scale,u=t.center,l=void 0===u?null:u,c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return M(c,c,[0,0,-a]),function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],p=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+p*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=p*i-s*r,t[11]=h*i-u*r}(c,c,-i*q),function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],p=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+p*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=p*i-s*r,t[7]=h*i-u*r}(c,c,o*q),O(c,c,[s/=r,s,s]),l&&M(c,c,((e=[])[0]=-(n=l)[0],e[1]=-n[1],e[2]=-n[2],e)),c}function J(t){var e=t.width,n=t.height,r=t.pitch,i=function(t){var e=t.width,n=t.height,r=t.altitude,i=void 0===r?1.5:r,o=t.pitch,a=void 0===o?0:o,s=t.nearZMultiplier,u=void 0===s?1:s,l=t.farZMultiplier,c=void 0===l?1:l,p=a*q,h=Math.atan(.5/i),f=Math.sin(h)*i/Math.sin(Math.min(Math.max(Math.PI/2-p-h,.01),Math.PI-.01));return{fov:2*h,aspect:e/n,focalDistance:i,near:u,far:(Math.sin(p)*f+i)*c}}({width:e,height:n,altitude:t.altitude,pitch:r,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier});return function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}([],i.fov,i.aspect,i.near,i.far)}function $(t,e){var n=Object(T.a)(t,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return N(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),
2C(e,[r,i,a,1])}function Q(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(T.a)(t,3),i=r[0],o=r[1],a=r[2];if(N(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){var s=C(e,[i,o,a,1]);return s}var u=C(e,[i,o,0,1]),l=C(e,[i,o,1,1]),c=u[2],p=l[2],h=c===p?0:((n||0)-c)/(p-c);return F([],u,l,h)}function tt(t){var e=t.width,n=t.height,r=t.bounds,i=t.minExtent,o=void 0===i?0:i,a=t.maxZoom,s=void 0===a?24:a,u=t.padding,l=void 0===u?0:u,c=t.offset,p=void 0===c?[0,0]:c,h=Object(T.a)(r,2),f=Object(T.a)(h[0],2),d=f[0],m=f[1],y=Object(T.a)(h[1],2),v=y[0],g=y[1];if(Number.isFinite(l)){l={top:l,bottom:l,left:l,right:l}}else N(Number.isFinite(l.top)&&Number.isFinite(l.bottom)&&Number.isFinite(l.left)&&Number.isFinite(l.right));var _=new it({width:e,height:n,longitude:0,latitude:0,zoom:0}),x=_.project([d,g]),b=_.project([v,m]),w=[Math.max(Math.abs(b[0]-x[0]),o),Math.max(Math.abs(b[1]-x[1]),o)],E=[e-l.left-l.right-2*Math.abs(p[0]),n-l.top-l.bottom-2*Math.abs(p[1])];N(E[0]>0&&E[1]>0);var S=E[0]/w[0],k=E[1]/w[1],P=(l.right-l.left)/2/S,C=(l.bottom-l.top)/2/k,I=[(b[0]+x[0])/2+P,(b[1]+x[1])/2+C],z=_.unproject(I),A=Math.min(s,_.zoom+Math.log2(Math.abs(Math.min(S,k))));return N(Number.isFinite(A)),{longitude:z[0],latitude:z[1],zoom:A}}var et=Math.PI/180;function nt(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t.width,o=t.height,a=t.unproject,s={targetZ:r},u=a([0,o],s),l=a([i,o],s),c=Math.atan(.5/t.altitude),p=(90-t.pitch)*et;return c>p-.01?(e=rt(t,0,r),n=rt(t,i,r)):(e=a([0,0],s),n=a([i,0],s)),[u,l,n,e]}function rt(t,e,n){var r=t.pixelUnprojectionMatrix,i=C(r,[e,0,1,1]),o=C(r,[e,t.height,1,1]),a=H(F([],i,o,(n*t.distanceScales.unitsPerMeter[2]-i[2])/(o[2]-i[2])));return a[2]=n,a}var it=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},n=e.width,r=e.height,o=e.latitude,a=void 0===o?0:o,s=e.longitude,u=void 0===s?0:s,l=e.zoom,c=void 0===l?0:l,p=e.pitch,h=void 0===p?0:p,f=e.bearing,d=void 0===f?0:f,m=e.altitude,y=void 0===m?1.5:m,v=e.nearZMultiplier,g=void 0===v?.02:v,_=e.farZMultiplier,x=void 0===_?1.01:_;Object(i.a)(this,t),n=n||1,r=r||1;var b=W(c);y=Math.max(.75,y);var w=X([u,a]);w[2]=0,this.projectionMatrix=J({width:n,height:r,pitch:h,altitude:y,nearZMultiplier:g,farZMultiplier:x}),this.viewMatrix=Y({height:r,scale:b,center:w,pitch:h,bearing:d,altitude:y}),this.width=n,this.height=r,this.scale=b,this.latitude=a,this.longitude=u,this.zoom=c,this.pitch=h,this.bearing=d,this.altitude=y,this.center=w,this.distanceScales=K(this),this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}return Object(a.a)(t,[{key:"_initMatrices",value:function(){var t=this.width,e=this.height,n=this.projectionMatrix,r=this.viewMatrix,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];A(i,i,n),A(i,i,r),this.viewProjectionMatrix=i;var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];O(o,o,[t/2,-e/2,1]),M(o,o,[1,-1,0]),A(o,o,i);var a=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=n*s-r*a,_=n*u-i*a,x=n*l-o*a,b=r*u-i*s,w=r*l-o*s,E=i*l-o*u,S=c*m-p*d,T=c*y-h*d,k=c*v-f*d,P=p*y-h*m,C=p*v-f*m,I=h*v-f*y,z=g*I-_*C+x*P+b*k-w*T+E*S;return z?(z=1/z,t[0]=(s*I-u*C+l*P)*z,t[1]=(i*C-r*I-o*P)*z,t[2]=(m*E-y*w+v*b)*z,t[3]=(h*w-p*E-f*b)*z,t[4]=(u*k-a*I-l*T)*z,t[5]=(n*I-i*k+o*T)*z,t[6]=(y*x-d*E-v*_)*z,t[7]=(c*E-h*x+f*_)*z,t[8]=(a*C-s*k+l*S)*z,t[9]=(r*k-n*C-o*S)*z,t[10]=(d*w-m*x+v*g)*z,t[11]=(p*x-c*w-f*g)*z,t[12]=(s*T-a*P-u*S)*z,t[13]=(n*P-r*T+i*S)*z,t[14]=(m*_-d*b-y*g)*z,t[15]=(c*b-p*_+h*g)*z,t):null}([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}},{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&D(e.projectionMatrix,this.projectionMatrix)&&D(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=this.projectPosition(t),o=$(i,this.pixelProjectionMatrix),a=Object(T.a)(o,2),s=a[0],u=a[1],l=r?u:this.height-u;return 2===t.length?[s,l]:[s,l,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=e.targetZ,o=void 0===i?void 0:i,a=Object(T.a)(t,3),s=a[0],u=a[1],l=a[2],c=r?u:this.height-u,p=o&&o*this.distanceScales.unitsPerMeter[2],h=Q([s,c,l],this.pixelUnprojectionMatrix,p),f=this.unprojectPosition(h),d=Object(T.a)(f,3),m=d[0],y=d[1],v=d[2];return Number.isFinite(l)?[m,y,v]:Number.isFinite(o)?[m,y,o]:[m,y]}},{key:"projectPosition",value:function(t){var e=X(t),n=Object(T.a)(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=H(t),n=Object(T.a)(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){return X(t)}},{key:"unprojectFlat",value:function(t){return H(t)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e,n,r=t.lngLat,i=Q(t.pos,this.pixelUnprojectionMatrix),o=L([],X(r),((e=[])[0]=-(n=i)[0],e[1]=-n[1],e));return H(L([],this.center,o))}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,n=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"fitBounds",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=tt(Object.assign({width:r,height:i,bounds:e},n)),a=o.longitude,s=o.latitude,u=o.zoom;return new t({width:r,height:i,longitude:a,latitude:s,zoom:u})}},{key:"getBounds",value:function(t){var e=this.getBoundingRegion(t),n=Math.min.apply(Math,S(e.map((function(t){return t[0]})))),r=Math.max.apply(Math,S(e.map((function(t){return t[0]}))));return[[n,Math.min.apply(Math,S(e.map((function(t){return t[1]}))))],[r,Math.max.apply(Math,S(e.map((function(t){return t[1]}))))]]}},{key:"getBoundingRegion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return nt(this,t.z||0)}}]),t}();var ot=["longitude","latitude","zoom"],at={curve:1.414,speed:1.2};function st(t,e,n){var r=(n=Object.assign({},at,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],a=W(i),s=e.zoom,u=[e.longitude,e.latitude],l=W(s-i),c=X(o),p=X(u),h=j([],p,c),f=Math.max(t.width,t.height),d=f/l,m=B(h)*a,y=Math.max(m,.01),v=r*r,g=(d*d-f*f+v*v*y*y)/(2*f*v*y),_=(d*d-f*f-v*v*y*y)/(2*d*v*y),x=Math.log(Math.sqrt(g*g+1)-g),b=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:i,startCenterXY:c,uDelta:h,w0:f,u1:m,S:(b-x)/r,rho:r,rho2:v,r0:x,r1:b}}var ut=n(37),lt=n(18),ct=n(25),pt=n.n(ct);function ht(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function ft(t,e){if(t===e)return!0;
2if(ht(t)&&ht(e)){if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!ft(t[n],e[n]))return!1;return!0}return Math.abs(t-e)<=1e-7}function dt(t,e,n){return Math.max(e,Math.min(n,t))}function mt(t,e,n){return ht(t)?t.map((function(t,r){return mt(t,e[r],n)})):n*e+(1-n)*t}function yt(t,e){if(!t)throw new Error(e||"react-map-gl: assertion failed.")}function vt(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return gt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _t=function(){function t(){Object(i.a)(this,t),Object(h.a)(this,"propNames",[])}return Object(a.a)(t,[{key:"arePropsEqual",value:function(t,e){var n,r=vt(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!ft(t[i],e[i]))return!1}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"initializeProps",value:function(t,e){return{start:t,end:e}}},{key:"interpolateProps",value:function(t,e,n){yt(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}(),xt={longitude:1,bearing:1};function bt(t){return Number.isFinite(t)||Array.isArray(t)}function wt(t,e,n){return function(t){return t in xt}(t)&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}function Et(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return St(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return St(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Tt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var kt=["longitude","latitude","zoom","bearing","pitch"],Pt=["latitude","longitude","zoom","width","height"],Ct=["bearing","pitch"],It={speed:1.2,curve:1.414},zt=function(t){u(n,t);var e=Tt(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(this,n),t=e.call(this),Object(h.a)(o(t),"speed",void 0),Object(h.a)(o(t),"propNames",kt),Object(h.a)(o(t),"props",void 0),t.props=Object.assign({},It,r),t}return Object(a.a)(n,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=Et(Pt);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t[a],u=e[a];yt(bt(s)&&bt(u),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=wt(a,s,u)}}catch(d){o.e(d)}finally{o.f()}var l,c=Et(Ct);try{for(c.s();!(l=c.n()).done;){var p=l.value,h=t[p]||0,f=e[p]||0;r[p]=h,i[p]=wt(p,h,f)}}catch(d){c.e(d)}finally{c.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={},o=st(t,e,r),a=o.startZoom,s=o.startCenterXY,u=o.uDelta,l=o.w0,c=o.u1,p=o.S,h=o.rho,f=o.rho2,d=o.r0;if(c<.01){var m=!0,y=!1,v=void 0;try{for(var g,_=ot[Symbol.iterator]();!(m=(g=_.next()).done);m=!0){var x=g.value,b=t[x],w=e[x];i[x]=z(b,w,n)}}catch(A){y=!0,v=A}finally{try{m||null==_.return||_.return()}finally{if(y)throw v}}return i}var E=n*p,S=Math.cosh(d)/Math.cosh(d+h*E),T=l*((Math.cosh(d)*Math.tanh(d+h*E)-Math.sinh(d))/f)/c,k=1/S,P=a+G(k),C=R([],u,T);L(C,C,s);var I=H(C);return i.longitude=I[0],i.latitude=I[1],i.zoom=P,i}(t,e,n,this.props),o=Et(Ct);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=mt(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},at,r),o=i.screenSpeed,a=i.speed,s=i.maxDuration,u=st(t,e,r),l=u.S,c=u.rho,p=1e3*l;return n=Number.isFinite(o)?p/(o/c):p/a,Number.isFinite(s)&&n>s?0:n}(t,e,this.props)),n}}]),n}(_t);function At(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return Mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ot(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var Dt=["longitude","latitude","zoom","bearing","pitch"],Lt=function(t){u(n,t);var e=Ot(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
2return Object(i.a)(this,n),t=e.call(this),Object(h.a)(o(t),"around",void 0),Array.isArray(r)&&(r={transitionProps:r}),t.propNames=r.transitionProps||Dt,r.around&&(t.around=r.around),t}return Object(a.a)(n,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new it(t).unproject(this.around);Object.assign(r,e,{around:new it(e).project(i),aroundLngLat:i})}var o,a=At(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=t[s],l=e[s];yt(bt(u)&&bt(l),"".concat(s," must be supplied for transition")),n[s]=u,r[s]=wt(s,u,l)}}catch(c){a.e(c)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=At(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=mt(t[a],e[a],n)}}catch(p){o.e(p)}finally{o.f()}if(e.around){var s=new it(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:mt(t.around,e.around,n)}),u=Object(T.a)(s,2),l=u[0],c=u[1];i.longitude=l,i.latitude=c}return i}}]),n}(_t),Rt={minZoom:0,maxZoom:24,minPitch:0,maxPitch:60},Bt=0,Ft=0,jt=1.5,Nt=function(){function t(e){var n=e.width,r=e.height,o=e.latitude,a=e.longitude,s=e.zoom,u=e.bearing,l=void 0===u?Ft:u,c=e.pitch,p=void 0===c?Bt:c,f=e.altitude,d=void 0===f?jt:f,m=e.maxZoom,y=void 0===m?Rt.maxZoom:m,v=e.minZoom,g=void 0===v?Rt.minZoom:v,_=e.maxPitch,x=void 0===_?Rt.maxPitch:_,b=e.minPitch,w=void 0===b?Rt.minPitch:b,E=e.transitionDuration,S=e.transitionEasing,T=e.transitionInterpolator,k=e.transitionInterruption,P=e.startPanLngLat,C=e.startZoomLngLat,I=e.startBearing,z=e.startPitch,A=e.startZoom;Object(i.a)(this,t),Object(h.a)(this,"_viewportProps",void 0),Object(h.a)(this,"_interactiveState",void 0),yt(Number.isFinite(n),"`width` must be supplied"),yt(Number.isFinite(r),"`height` must be supplied"),yt(Number.isFinite(a),"`longitude` must be supplied"),yt(Number.isFinite(o),"`latitude` must be supplied"),yt(Number.isFinite(s),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:o,longitude:a,zoom:s,bearing:l,pitch:p,altitude:d,maxZoom:y,minZoom:g,maxPitch:x,minPitch:w,transitionDuration:E,transitionEasing:S,transitionInterpolator:T,transitionInterruption:k}),this._interactiveState={startPanLngLat:P,startZoomLngLat:C,startBearing:I,startPitch:z,startZoom:A}}return Object(a.a)(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._interactiveState.startPanLngLat||this._unproject(n);if(!r)return this;var i=this._calculateNewLngLat({startPanLngLat:r,pos:e}),o=Object(T.a)(i,2),a=o[0],s=o[1];return this._getUpdatedMapState({longitude:a,latitude:s})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){t.pos;return this._getUpdatedMapState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e=t.deltaScaleX,n=void 0===e?0:e,r=t.deltaScaleY,i=void 0===r?0:r,o=this._interactiveState,a=o.startBearing,s=o.startPitch;if(!Number.isFinite(a)||!Number.isFinite(s))return this;var u=this._calculateNewPitchAndBearing({deltaScaleX:n,deltaScaleY:i,startBearing:a||0,startPitch:s||0}),l=u.pitch,c=u.bearing;return this._getUpdatedMapState({bearing:c,pitch:l})}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;yt(r>0,"`scale` must be a positive number");var i=this._interactiveState,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),yt(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),u=new it(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),l=Object(T.a)(u,2),c=l[0],p=l[1];
2return this._getUpdatedMapState({zoom:s,longitude:c,latitude:p})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=dt(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=dt(a,o,i),Object.assign(t,function(t){var e=t.width,n=t.height,r=t.longitude,i=t.latitude,o=t.zoom,a=t.pitch,s=void 0===a?0:a,u=t.bearing,l=void 0===u?0:u;(r<-180||r>180)&&(r=I(r+180,360)-180),(l<-180||l>180)&&(l=I(l+180,360)-180);var c=new it({width:e,height:n,longitude:r,latitude:i,zoom:o}),p=c.project([r,85.05113])[1],h=c.project([r,-85.05113])[1],f=0;return h-p<n&&(o+=Math.log2(n/(h-p)),p=(c=new it({width:e,height:n,longitude:r,latitude:i,zoom:o})).project([r,85.05113])[1],h=c.project([r,-85.05113])[1]),p>0?f=p:h<n&&(f=h-n),f&&(i=c.unproject([e/2,n/2+f])[1]),{width:e,height:n,longitude:r,latitude:i,zoom:o,pitch:s,bearing:l}}(t)),t}},{key:"_unproject",value:function(t){var e=new it(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new it(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom,o=r.minZoom;return dt(n+Math.log2(e),o,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=dt(n,-1,1);var o=this._viewportProps,a=o.minPitch,s=o.maxPitch,u=i;return n>0?u=i+n*(s-i):n<0&&(u=i-n*(a-i)),{pitch:u,bearing:r+180*e}}}]),t}();function Ut(t){return t[0].toLowerCase()+t.slice(1)}var Vt=Object(f.createContext)({viewport:null,map:null,mapContainer:null,onViewportChange:null,onViewStateChange:null,eventManager:null,isDragging:!1});function qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(n),!0).forEach((function(e){Object(h.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Wt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var Gt="A valid API access token is required to use Mapbox data";var Xt={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},Ht=Object.assign({},lt.a.propTypes,{width:m.a.oneOfType([m.a.number,m.a.string]),height:m.a.oneOfType([m.a.number,m.a.string]),onResize:m.a.func,preventStyleDiffing:m.a.bool,disableTokenWarning:m.a.bool,visible:m.a.bool,className:m.a.string,style:m.a.object,visibilityConstraints:m.a.object}),Kt=Object.assign({},lt.a.defaultProps,{preventStyleDiffing:!1,disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:Rt}),Yt=function(t){u(n,t);var e=Wt(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"state",{accessTokenInvalid:!1}),Object(h.a)(o(t),"_mapbox",null),Object(h.a)(o(t),"_map",null),Object(h.a)(o(t),"_mapboxMapRef",Object(f.createRef)()),Object(h.a)(o(t),"_mapContainerRef",Object(f.createRef)()),Object(h.a)(o(t),"_queryParams",{}),Object(h.a)(o(t),"_width",0),Object(h.a)(o(t),"_height",0),Object(h.a)(o(t),"getMap",(function(){return t._map})),Object(h.a)(o(t),"queryRenderedFeatures",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t._map.queryRenderedFeatures(e,n)})),Object(h.a)(o(t),"_mapboxMapError",(function(e){401!==(e.error&&e.error.status||e.status)||t.state.accessTokenInvalid||(console.error(Gt),t.setState({accessTokenInvalid:!0})),t.props.onError(e)})),t}
2return Object(a.a)(n,[{key:"componentDidMount",value:function(){if(n.supported()){var t=this.props.mapStyle;this._mapbox=new lt.a(Object.assign({},this.props,{mapboxgl:pt.a,width:this._width,height:this._height,container:this._mapboxMapRef.current,onError:this._mapboxMapError,mapStyle:b(t)})),this._map=this._mapbox.getMap()}}},{key:"componentDidUpdate",value:function(t){this._mapbox&&(this._updateMapStyle(t,this.props),this._updateMapProps(this.props))}},{key:"componentWillUnmount",value:function(){this._mapbox&&(this._mapbox.finalize(),this._mapbox=null,this._map=null)}},{key:"_updateMapSize",value:function(t,e){this._width===t&&this._height===e||(this._width=t,this._height=e,this._updateMapProps(this.props))}},{key:"_updateMapStyle",value:function(t,e){var n=e.mapStyle;n!==t.mapStyle&&n&&this._map.setStyle(b(n),{diff:!this.props.preventStyleDiffing})}},{key:"_updateMapProps",value:function(t){this._mapbox&&this._mapbox.setProps(Object.assign({},t,{width:this._width,height:this._height}))}},{key:"_renderNoTokenWarning",value:function(){if(this.state.accessTokenInvalid&&!this.props.disableTokenWarning){return f.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},f.createElement("h3",{key:"header"},"NO_TOKEN_WARNING"),f.createElement("div",{key:"text"},"For information on setting up your basemap, read"),f.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}return null}},{key:"_renderOverlays",value:function(t){var e=this,n=t.width,r=t.height;return this._updateMapSize(n,r),f.createElement(Vt.Consumer,null,(function(t){var i=Zt(Zt({},t),{},{viewport:new it(Zt(Zt(Zt({},e.props),e.props.viewState),{},{width:n,height:r})),map:e._map,mapContainer:t.mapContainer||e._mapContainerRef.current});return f.createElement(Vt.Provider,{value:i},f.createElement("div",{key:"map-overlays",className:"overlays",style:Xt},e.props.children))}))}},{key:"render",value:function(){var t=this.props,e=t.className,n=t.width,r=t.height,i=t.style,o=t.visibilityConstraints,a=Object.assign({position:"relative"},i,{width:n,height:r}),s=this.props.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rt;for(var n in e){var r=n.slice(0,3),i=Ut(n.slice(3));if("min"===r&&t[i]<e[n])return!1;if("max"===r&&t[i]>e[n])return!1}return!0}(this.props.viewState||this.props,o),u=Object.assign({},Xt,{visibility:s?"inherit":"hidden"});return f.createElement("div",{key:"map-container",style:a,ref:this._mapContainerRef},f.createElement("div",{key:"map-mapbox",ref:this._mapboxMapRef,style:u,className:e}),f.createElement(ut.a,{key:"autosizer",onResize:this.props.onResize},this._renderOverlays.bind(this)),this._renderNoTokenWarning())}}],[{key:"supported",value:function(){return pt.a&&pt.a.supported()}}]),n}(f.PureComponent);Object(h.a)(Yt,"propTypes",Ht),Object(h.a)(Yt,"defaultProps",Kt);var Jt=function(){};var $t=1,Qt=2,te=3,ee=4,ne={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new Lt,transitionInterruption:$t,onTransitionStart:Jt,onTransitionInterrupt:Jt,onTransitionEnd:Jt,onViewportChange:Jt,onStateChange:Jt},re=function(){function t(e,n){var r=this;Object(i.a)(this,t),Object(h.a)(this,"props",void 0),Object(h.a)(this,"state",void 0),Object(h.a)(this,"time",void 0),Object(h.a)(this,"_animationFrame",null),Object(h.a)(this,"_onTransitionFrame",(function(){r._animationFrame=requestAnimationFrame(r._onTransitionFrame),r._updateViewport()})),e&&(this.props=e),this.time=n||Date.now}return Object(a.a)(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===Qt?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===ee)){var i=this.time(),o=(i-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(i-this.state.startTime),r.transitionEasing=function(t,e){var n=t(e);return function(r){return 1/(1-n)*(t(r*(1-e)+e)-n)}}(this.state.easing,o),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===te||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){yt(this._isTransitionEnabled(e)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator,r=n.getDuration?n.getDuration(t,e):e.transitionDuration;if(0!==r){var i=e.transitionInterpolator.initializeProps(t,e),o={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:r,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{},interactionState:o},this._onTransitionFrame(),this.props.onStateChange(o)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.props.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,a=e.startProps,s=e.endProps,u=!1,l=(t-n)/r;l>=1&&(l=1,u=!0),l=i(l);var c=o.interpolateProps(a,s,l),p=new Nt(Object.assign({},this.props,c));this.state.propsInTransition=p.getViewportProps(),this.props.onViewportChange(this.state.propsInTransition,this.state.interactionState,this.props),u&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();Object(h.a)(re,"defaultProps",ne);
2var ie=n(16),oe=n.n(ie),ae={mousedown:1,mousemove:2,mouseup:4};!function(t){var e=t.prototype.handler;t.prototype.handler=function(t){var n=this.store;t.button>0&&(function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,(function(e){return e.pointerId===t.pointerId}))||n.push(t)),e.call(this,t)}}(oe.a.PointerEventInput),oe.a.MouseInput.prototype.handler=function(t){var e=ae[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};var se=oe.a.Manager,ue=oe.a,le=ue?[[ue.Rotate,{enable:!1}],[ue.Pinch,{enable:!1}],[ue.Swipe,{enable:!1}],[ue.Pan,{threshold:0,enable:!1}],[ue.Press,{enable:!1}],[ue.Tap,{event:"doubletap",taps:2,enable:!1}],[ue.Tap,{event:"anytap",enable:!1}],[ue.Tap,{enable:!1}]]:null,ce={rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},pe={doubletap:["tap"]},he={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},fe=["keydown","keyup"],de=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],me=["wheel","mousewheel","DOMMouseScroll"],ye={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},ve={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},ge=n(11),_e=-1!==ge.b.indexOf("firefox"),xe=me,be=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},o),this.events=xe.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent,!!ge.a&&{passive:!1})}))}return Object(a.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"wheel"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){if(this.options.enable){var e=t.deltaY;ge.c.WheelEvent&&(_e&&t.deltaMode===ge.c.WheelEvent.DOM_DELTA_PIXEL&&(e/=ge.c.devicePixelRatio),t.deltaMode===ge.c.WheelEvent.DOM_DELTA_LINE&&(e*=40));var n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625===0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}}},{key:"_onWheel",value:function(t,e,n){this.callback({type:"wheel",center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),we=de,Ee=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.pressed=!1,this.options=Object.assign({enable:!0},o),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=we.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(a.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"pointermove"===t&&(this.enableMoveEvent=e),"pointerover"===t&&(this.enableOverEvent=e),"pointerout"===t&&(this.enableOutEvent=e),"pointerleave"===t&&(this.enableLeaveEvent=e)}},{key:"handleEvent",value:function(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}},{key:"handleOverEvent",value:function(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:"pointerover",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleOutEvent",value:function(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:"pointerout",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleLeaveEvent",value:function(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:"pointerleave",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleMoveEvent",value:function(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}]),t}(),Se=fe,Te=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},o),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=Se.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),e.tabIndex=o.tabIndex||0,e.style.outline="none",this.events.forEac
2h((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(a.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"keydown"===t&&(this.enableDownEvent=e),"keyup"===t&&(this.enableUpEvent=e)}},{key:"handleEvent",value:function(t){var e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:"keydown",srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:"keyup",srcEvent:t,key:t.key,target:t.target}))}}]),t}(),ke=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},r),this.handleEvent=this.handleEvent.bind(this),e.addEventListener("contextmenu",this.handleEvent)}return Object(a.a)(t,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(t,e){"contextmenu"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){this.options.enable&&this.callback({type:"contextmenu",center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),Pe={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};var Ce={srcElement:"root",priority:0},Ie=function(){function t(e){Object(i.a)(this,t),this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}return Object(a.a)(t,[{key:"isEmpty",value:function(){return!this._active}},{key:"add",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.handlers,a=this.handlersByElement;n&&("object"!==l(n)||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},Ce,n):Ce;var s=a.get(n.srcElement);s||(s=[],a.set(n.srcElement,s));var u={type:t,handler:e,srcElement:n.srcElement,priority:n.priority};r&&(u.once=!0),i&&(u.passive=!0),o.push(u),this._active=this._active||!u.passive;for(var c=s.length-1;c>=0&&!(s[c].priority>=u.priority);)c--;s.splice(c+1,0,u)}},{key:"remove",value:function(t,e){for(var n=this.handlers,r=this.handlersByElement,i=n.length-1;i>=0;i--){var o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);var a=r.get(o.srcElement);a.splice(a.indexOf(o),1),0===a.length&&r.delete(o.srcElement)}}this._active=n.some((function(t){return!t.passive}))}},{key:"handleEvent",value:function(t){if(!this.isEmpty()){for(var e=this._normalizeEvent(t),n=t.srcEvent.target;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}}},{key:"_emit",value:function(t,e){var n=this.handlersByElement.get(e);if(n){for(var r=!1,i=function(){t.handled=!0},o=function(){t.handled=!0,r=!0},a=[],s=0;s<n.length;s++){var u=n[s],l=u.type,c=u.handler,p=u.once;if(c(Object.assign({},t,{type:l,stopPropagation:i,stopImmediatePropagation:o})),p&&a.push(n[s]),r)break}for(var h=0;h<a.length;h++){var f=a[h];l=f.type,c=f.handler;this.remove(l,c)}}}},{key:"_normalizeEvent",value:function(t){var e=this.eventManager.element;return Object.assign({},t,function(t){var e=Pe[t.srcEvent.type];if(!e)return null;var n=t.srcEvent,r=n.buttons,i=n.button,o=n.which,a=!1,s=!1,u=!1;return 4===e||2===e&&!Number.isFinite(r)?(a=1===o,s=2===o,u=3===o):2===e?(a=Boolean(1&r),s=Boolean(4&r),u=Boolean(2&r)):1===e&&(a=0===i,s=1===i,u=2===i),{leftButton:a,middleButton:s,rightButton:u}}(t),function(t,e){var n=t.srcEvent;if(!t.center&&!Number.isFinite(n.clientX))return null;var r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),o=i.width/e.offsetWidth,a=i.height/e.offsetHeight;return{center:r,offsetCenter:{x:(r.x-i.left-e.clientLeft)/o,y:(r.y-i.top-e.clientTop)/a}}}(t,e),{handled:!1,rootElement:e})}}]),t}(),ze={events:null,recognizers:null,recognizerOptions:{},Manager:se,touchAction:"none",tabIndex:0},Ae=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,t),this.options=Object.assign({},ze,n),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(e);var r=n.events;r&&this.on(r)}return Object(a.a)(t,[{key:"setElement",value:function(t){var e=this;if(this.element&&this.destroy(),this.element=t,t){var n=this.options,r=n.Manager;for(var i in this.manager=new r(t,{touchAction:n.touchAction,recognizers:n.recognizers||le}).on("hammer.input",this._onBasicInput),n.recognizers||Object.keys(ce).forEach((function(t){var n=e.manager.get(t);n&&ce[t].forEach((function(t){n.recognizeWith(t)}))})),n.recognizerOptions){var o=this.manager.get(i);if(o){var a=n.recognizerOptions[i];delete a.enable,o.set(a)}}this.wheelInput=new be(t,this._onOtherEvent,{enable:!1}),this.moveInput=new Ee(t,this._onOtherEvent,{enable:!1}
2),this.keyInput=new Te(t,this._onOtherEvent,{enable:!1,tabIndex:n.tabIndex}),this.contextmenuInput=new ke(t,this._onOtherEvent,{enable:!1});var s=!0,u=!1,l=void 0;try{for(var c,p=this.events[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var h=Object(T.a)(c.value,2),f=h[0],d=h[1];d.isEmpty()||(this._toggleRecognizer(d.recognizerName,!0),this.manager.on(f,d.handleEvent))}}catch(m){u=!0,l=m}finally{try{s||null==p.return||p.return()}finally{if(u)throw l}}}}},{key:"destroy",value:function(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}},{key:"on",value:function(t,e,n){this._addEventHandler(t,e,n,!1)}},{key:"once",value:function(t,e,n){this._addEventHandler(t,e,n,!0)}},{key:"watch",value:function(t,e,n){this._addEventHandler(t,e,n,!1,!0)}},{key:"off",value:function(t,e){this._removeEventHandler(t,e)}},{key:"_toggleRecognizer",value:function(t,e){var n=this.manager;if(n){var r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});var i=pe[t];i&&!this.options.recognizers&&i.forEach((function(i){var o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)}))}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}}},{key:"_addEventHandler",value:function(t,e,n,r,i){if("string"===typeof t){var o=this.manager,a=this.events,s=ve[t]||t,u=a.get(s);u||(u=new Ie(this),a.set(s,u),u.recognizerName=ye[s]||s,o&&o.on(s,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}else for(var l in n=e,t)this._addEventHandler(l,t[l],n,r,i)}},{key:"_removeEventHandler",value:function(t,e){if("string"===typeof t){var n=this.events,r=ve[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){var o=i.recognizerName,a=!1,s=!0,u=!1,l=void 0;try{for(var c,p=n.values()[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var h=c.value;if(h.recognizerName===o&&!h.isEmpty()){a=!0;break}}}catch(d){u=!0,l=d}finally{try{s||null==p.return||p.return()}finally{if(u)throw l}}a||this._toggleRecognizer(o,!1)}}else for(var f in t)this._removeEventHandler(f,t[f])}},{key:"_onBasicInput",value:function(t){var e=t.srcEvent,n=he[e.type];n&&this.manager.emit(n,t)}},{key:"_onOtherEvent",value:function(t){this.manager.emit(t.type,t)}}]),t}();var Me={transitionDuration:0},Oe={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new Lt,transitionInterruption:$t},De=["wheel"],Le=["panstart","panmove","panend"],Re=["pinchstart","pinchmove","pinchend","pinchcancel"],Be=["doubletap"],Fe=["keydown"],je=function(){function t(){var e=this;Object(i.a)(this,t),Object(h.a)(this,"events",[]),Object(h.a)(this,"mapState",void 0),Object(h.a)(this,"onViewportChange",void 0),Object(h.a)(this,"onStateChange",void 0),Object(h.a)(this,"mapStateProps",void 0),Object(h.a)(this,"eventManager",void 0),Object(h.a)(this,"scrollZoom",!0),Object(h.a)(this,"dragPan",!0),Object(h.a)(this,"dragRotate",!0),Object(h.a)(this,"doubleClickZoom",!0),Object(h.a)(this,"touchZoom",!0),Object(h.a)(this,"touchRotate",!1),Object(h.a)(this,"keyboard",!0),Object(h.a)(this,"_state",{isDragging:!1}),Object(h.a)(this,"_events",{}),Object(h.a)(this,"_transitionManager",new re),Object(h.a)(this,"setState",(function(t){Object.assign(e._state,t),e.onStateChange&&e.onStateChange(e._state)})),this.handleEvent=this.handleEvent.bind(this),this._onWheelEnd=function(t,e){var n,r,i,o=function(){return i=null,t.apply(n,r)};return function(){n=this,r=arguments,i&&clearTimeout(i),i=setTimeout(o,e)}}(this._onWheelEnd,100)}return Object(a.a)(t,[{key:"handleEvent",value:function(t){switch(this.mapState=this.getMapState(),t.type){case"panstart":return this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchcancel":case"pinchend":return this._onPinchEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"updateViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.mapState?this.mapState.getViewportProps():{},i=Object.assign({},t.getViewportProps(),e),o=Object.keys(i).some((function(t){return r[t]!==i[t]}));o&&this.onViewportChange(i,n,r),this.setState(Object.assign({},t.getInteractiveState(),n))}},{key:"getMapState",value:function(t){return new Nt(Object.assign({},this.mapStateProps,this._state,t))}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,a=void 0===o||o,s=t.scrollZoom,u=void 0===s?this.scrollZoom:s,l=t.dragPan,c=void 0===l?this.dragPan:l,p=t.dragRotate,h=void 0===p?this.dragRotate:p,f=t.doubleClickZoom,d=void 0===f?this.doubleClickZoom:f,m=t.touchZoom,y=void 0===m?this.touchZoom:m,v=t.touchRotate,g=void 0===v?this.touchRotate:v,_=t.keyboard,x=void 0===_?this.keyboard:_;this.onViewportChange=e,this.onStateChange=n;var b=!this.mapStateProps||this.mapStateProps.height!==t.height;this.mapStateProps=t,b&&this.updateViewport(new Nt(t)),this._transitionManager.processViewportChange(Object.assign({},t,{onStateChange:this.setState})),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(De,a&&u),this.toggleEvents(Le,a&&(c||h)),this.toggleEvents(Re,a&&(y||g)),this.toggleEvents(Be,a&&d),this.toggleEvents(Fe,a&&x),this.scrollZoom=u,this.dragPan=c,this.dragRotate=h,this.doubleClickZoom=d,this.touchZoom=y,this.touchRotate=g,this.keyboard=x}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach((function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))}))}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.panStart({pos:e}).rotateStart({pos:e});return this.updateViewport(n,Me,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return this.isFunctionKeyPressed(t)||t.rightButton?this._onPanRotate(t):this._onPanMove(t)}},{key:"_onPanEnd",value:function(t){var e=this.mapState.panEnd().rotateEnd();return this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,Me,{isPanning:!0}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=t.deltaX,n=t.deltaY,r=this.getCenter(t),i=Object(T.a)(r,2)[1],o=i-n,a=this.mapState.getViewportProps(),s=a.width,u=a.height,l=e/s,c=0;n>0?Math.abs(u-o)>5&&(c=n/(o-u)*1.2):n<0&&o>5&&(c=1-i/o),c=Math.min(1,Math.max(-1,c));var p=this.mapState.rotate({deltaScaleX:l,deltaScaleY:c});return this.updateViewport(p,Me,{isRotating:!0}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;t.preventDefault();var e=this.getCenter(t),n=t.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.mapState.zoom({pos:e,scale:r});return this.updateViewport(i,Me,{isZooming:!0}),this._onWheelEnd(),!0}},{key:"_onWheelEnd",value:function(){this.setState({isZooming:!1})}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._state.startPinchRotation=t.rotation,this.updateViewport(n,Me,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation,o=this._state.startPinchRotation;e=e.rotate({deltaScaleX:-(i-o)/180})}return this.updateViewport(e,Me,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(t){var e=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},Oe,{transitionInterpolator:new Lt({around:e})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:r.zoom-2}):this.getMapState({zoom:r.zoom-1});break;case 187:e=n?this.getMapState({zoom:r.zoom+2}):this.getMapState({zoom:r.zoom+1});break;case 37:e=n?this.getMapState({bearing:r.bearing-15}):this.mapState.pan({pos:[100,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:r.bearing+15}):this.mapState.pan({pos:[-100,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:r.pitch+10}):this.mapState.pan({pos:[0,100],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:r.pitch-10}):this.mapState.pan({pos:[0,-100],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,Oe)}}]),t}(),Ne=[{old:"onChangeViewport",new:"onViewportChange"},{old:"perspectiveEnabled",new:"dragRotate"},{old:"onHoverFeatures",new:"onHover"},{old:"onClickFeatures",new:"onClick"},{old:"touchZoomRotate",new:"touchZoom, touchRotate"}
2,{old:"mapControls",new:"controller"}];function Ue(t){return"react-map-gl: `".concat(t,"` is removed.")}function Ve(t){return"Use `".concat(t,"` instead.")}function qe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ne.forEach((function(e){if(t.hasOwnProperty(e.old)){var n=Ue(e.old);e.new&&(n="".concat(n," ").concat(Ve(e.new))),console.warn(n)}}))}function Ze(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var We=Object.assign({},Yt.propTypes,{maxZoom:m.a.number,minZoom:m.a.number,maxPitch:m.a.number,minPitch:m.a.number,onViewStateChange:m.a.func,onViewportChange:m.a.func,onInteractionStateChange:m.a.func,transitionDuration:m.a.oneOfType([m.a.number,m.a.string]),transitionInterpolator:m.a.object,transitionInterruption:m.a.number,transitionEasing:m.a.func,onTransitionStart:m.a.func,onTransitionInterrupt:m.a.func,onTransitionEnd:m.a.func,scrollZoom:m.a.bool,dragPan:m.a.bool,dragRotate:m.a.bool,doubleClickZoom:m.a.bool,touchZoom:m.a.bool,touchRotate:m.a.bool,keyboard:m.a.bool,onHover:m.a.func,onClick:m.a.func,onDblClick:m.a.func,onContextMenu:m.a.func,onMouseDown:m.a.func,onMouseMove:m.a.func,onMouseUp:m.a.func,onTouchStart:m.a.func,onTouchMove:m.a.func,onTouchEnd:m.a.func,onMouseEnter:m.a.func,onMouseLeave:m.a.func,onMouseOut:m.a.func,onWheel:m.a.func,touchAction:m.a.string,clickRadius:m.a.number,interactiveLayerIds:m.a.array,getCursor:m.a.func,controller:m.a.instanceOf(je)}),Ge=Object.assign({},Yt.defaultProps,Rt,re.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}}),Xe=function(t){u(n,t);var e=Ze(n);function n(t){var r;return Object(i.a)(this,n),r=e.call(this,t),Object(h.a)(o(r),"state",{isLoaded:!1,isDragging:!1,isHovering:!1}),Object(h.a)(o(r),"_controller",void 0),Object(h.a)(o(r),"_eventManager",void 0),Object(h.a)(o(r),"_interactiveContext",void 0),Object(h.a)(o(r),"_width",0),Object(h.a)(o(r),"_height",0),Object(h.a)(o(r),"_eventCanvasRef",Object(f.createRef)()),Object(h.a)(o(r),"_staticMapRef",Object(f.createRef)()),Object(h.a)(o(r),"getMap",(function(){return r._staticMapRef.current?r._staticMapRef.current.getMap():null})),Object(h.a)(o(r),"queryRenderedFeatures",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.getMap();return n&&n.queryRenderedFeatures(t,e)})),Object(h.a)(o(r),"_onInteractionStateChange",(function(t){var e=t.isDragging,n=void 0!==e&&e;n!==r.state.isDragging&&(r._updateInteractiveContext({isDragging:n}),r.setState({isDragging:n}));var i=r.props.onInteractionStateChange;i&&i(t)})),Object(h.a)(o(r),"_onResize",(function(t){var e=t.width,n=t.height;r._width=e,r._height=n,r._setControllerProps(r.props),r.props.onResize({width:e,height:n})})),Object(h.a)(o(r),"_onViewportChange",(function(t,e,n){var i=r.props,o=i.onViewStateChange,a=i.onViewportChange;o&&o({viewState:t,interactionState:e,oldViewState:n}),a&&a(t,e,n)})),Object(h.a)(o(r),"_onLoad",(function(t){r.setState({isLoaded:!0}),r.props.onLoad(t)})),Object(h.a)(o(r),"_onEvent",(function(t,e){var n=r.props[t];n&&n(r._normalizeEvent(e))})),Object(h.a)(o(r),"_onPointerDown",(function(t){switch(t.pointerType){case"touch":r._onEvent("onTouchStart",t);break;default:r._onEvent("onMouseDown",t)}})),Object(h.a)(o(r),"_onPointerUp",(function(t){switch(t.pointerType){case"touch":r._onEvent("onTouchEnd",t);break;default:r._onEvent("onMouseUp",t)}})),Object(h.a)(o(r),"_onPointerMove",(function(t){switch(t.pointerType){case"touch":r._onEvent("onTouchMove",t);break;default:r._onEvent("onMouseMove",t)}if(!r.state.isDragging){var e,n=r.props,i=n.onHover,o=n.interactiveLayerIds;t=r._normalizeEvent(t),r.state.isLoaded&&(o||i)&&(e=r._getFeatures({pos:t.point,radius:r.props.clickRadius})),i&&(t.features=e,i(t));var a=Boolean(o&&e&&e.length>0),s=a&&!r.state.isHovering,u=!a&&r.state.isHovering;s&&r._onEvent("onMouseEnter",t),u&&r._onEvent("onMouseLeave",t),(s||u)&&r.setState({isHovering:a})}})),Object(h.a)(o(r),"_onClick",(function(t){var e=r.props,n=e.onClick,i=e.onNativeClick,o=e.onDblClick,a=e.doubleClickZoom,s=[],u=o||a;switch(t.type){case"anyclick":s.push(i),u||s.push(n);break;case"click":u&&s.push(n)}
2(s=s.filter(Boolean)).length&&((t=r._normalizeEvent(t)).features=r._getFeatures({pos:t.point,radius:r.props.clickRadius}),s.forEach((function(e){return e(t)})))})),qe(t),r._controller=t.controller||new je,r._eventManager=new Ae(null,{touchAction:t.touchAction}),r._updateInteractiveContext({isDragging:!1,eventManager:r._eventManager}),r}return Object(a.a)(n,null,[{key:"supported",value:function(){return Yt.supported()}}]),Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this._eventManager,e=this._eventCanvasRef.current;t.setElement(e),t.on({pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerup:this._onPointerUp,pointerleave:this._onEvent.bind(this,"onMouseOut"),click:this._onClick,anyclick:this._onClick,dblclick:this._onEvent.bind(this,"onDblClick"),wheel:this._onEvent.bind(this,"onWheel"),contextmenu:this._onEvent.bind(this,"onContextMenu")}),this._setControllerProps(this.props),this._updateInteractiveContext({mapContainer:e})}},{key:"componentDidUpdate",value:function(){this._setControllerProps(this.props)}},{key:"componentWillUnmount",value:function(){this._eventManager.destroy()}},{key:"_setControllerProps",value:function(t){t=Object.assign({},t,t.viewState,{isInteractive:Boolean(t.onViewStateChange||t.onViewportChange),onViewportChange:this._onViewportChange,onStateChange:this._onInteractionStateChange,eventManager:this._eventManager,width:this._width,height:this._height}),this._controller.setOptions(t);var e=this._interactiveContext;e.onViewportChange=t.onViewportChange,e.onViewStateChange=t.onViewStateChange}},{key:"_getFeatures",value:function(t){var e,n=t.pos,r=t.radius,i={},o=this.getMap();if(this.props.interactiveLayerIds&&(i.layers=this.props.interactiveLayerIds),r){var a=r,s=[[n[0]-a,n[1]+a],[n[0]+a,n[1]-a]];e=o&&o.queryRenderedFeatures(s,i)}else e=o&&o.queryRenderedFeatures(n,i);return e}},{key:"_updateInteractiveContext",value:function(t){this._interactiveContext=Object.assign({},this._interactiveContext,t)}},{key:"_normalizeEvent",value:function(t){if(t.lngLat)return t;var e=t.offsetCenter,n=[e.x,e.y],r=new it(Object.assign({},this.props,{width:this._width,height:this._height}));return t.point=n,t.lngLat=r.unproject(n),t}},{key:"render",value:function(){var t=this.props,e=t.width,n=t.height,i=t.style,o=t.getCursor,a=Object.assign({position:"relative"},i,{width:e,height:n,cursor:o(this.state)});return f.createElement(Vt.Provider,{value:this._interactiveContext},f.createElement("div",{key:"event-canvas",ref:this._eventCanvasRef,style:a},f.createElement(Yt,r({},this.props,{width:"100%",height:"100%",style:null,onResize:this._onResize,onLoad:this._onLoad,ref:this._staticMapRef}),this.props.children)))}}]),n}(f.PureComponent);function He(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!He(t[n],e[n]))return!1;return!0}if(Array.isArray(e))return!1;if("object"===l(t)&&"object"===l(e)){var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var o=0,a=r;o<a.length;o++){var s=a[o];if(!e.hasOwnProperty(s))return!1;if(!He(t[s],e[s]))return!1}return!0}return!1}function Ke(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(Xe,"propTypes",We),Object(h.a)(Xe,"defaultProps",Ge);var Ye={type:m.a.string.isRequired,id:m.a.string},Je=0,$e=function(t){u(n,t);var e=Ke(n);function n(t){var r;return Object(i.a)(this,n),r=e.call(this,t),Object(h.a)(o(r),"id",void 0),Object(h.a)(o(r),"type",void 0),Object(h.a)(o(r),"_map",null),Object(h.a)(o(r),"_sourceOptions",{}),Object(h.a)(o(r),"_updateSource",(function(){var t=o(r),e=t.type;if(t._map){var n=o(r),i=n._sourceOptions,a=n.props;yt(!a.id||a.id===r.id,"source id changed"),yt(a.type===e,"source type changed");var s="",u=0;for(var l in a)"children"===l||"id"===l||He(i[l],a[l])||(i[l]=a[l],s=l,u++);var c=r.getSource();c?u&&("geojson"===e?c.setData(i.data):"image"===e?c.updateImage({url:i.url,coordinates:i.coordinates}):"canvas"!==e&&"video"!==e||1!==u||"coordinates"!==s?console.warn("Unable to update <Source> prop: ".concat(s)):c.setCoordinates(i.coordinates)):r._createSource(i)}})),r.id=t.id||"jsx-source-".concat(Je++),r.type=t.type,r}
2return Object(a.a)(n,[{key:"componentWillUnmount",value:function(){var t=this,e=this._map;e&&(e.off("styledata",this._updateSource),requestAnimationFrame((function(){e.style&&e.style._loaded&&e.removeSource(t.id)})))}},{key:"getSource",value:function(){var t=this._map;return t&&t.style&&t.getSource(this.id)}},{key:"_createSource",value:function(t){var e=this._map;e.style&&e.style._loaded&&e.addSource(this.id,t)}},{key:"_render",value:function(t){var e=this;return!this._map&&t.map&&(this._map=t.map,this._map.on("styledata",this._updateSource)),this._updateSource(),f.Children.map(this.props.children,(function(t){return Object(f.cloneElement)(t,{source:e.id})}))}},{key:"render",value:function(){return f.createElement(Vt.Consumer,null,this._render.bind(this))}}]),n}(f.PureComponent);function Qe(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function tn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)($e,"propTypes",Ye);
2var en={type:m.a.string.isRequired,id:m.a.string,source:m.a.string,beforeId:m.a.string};var nn=0,rn=function(t){u(n,t);var e=tn(n);function n(t){var r;return Object(i.a)(this,n),r=e.call(this,t),Object(h.a)(o(r),"id",void 0),Object(h.a)(o(r),"type",void 0),Object(h.a)(o(r),"_map",null),Object(h.a)(o(r),"_layerOptions",{}),Object(h.a)(o(r),"_updateLayer",(function(){var t=r._map;if(t){var e=o(r),n=e.props,i=e._layerOptions;if(yt(!n.id||n.id===r.id,"layer id changed"),yt(n.type===r.type,"layer type changed"),r.getLayer())try{!function(t,e,n,r){var i=n.layout,o=void 0===i?{}:i,a=n.paint,s=void 0===a?{}:a,u=n.filter,l=n.minzoom,c=n.maxzoom,p=n.beforeId,h=Qe(n,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(p!==r.beforeId&&t.moveLayer(e,p),o!==r.layout)for(var f in o)He(o[f],r.layout[f])||t.setLayoutProperty(e,f,o[f]);if(s!==r.paint)for(var d in s)He(s[d],r.paint[d])||t.setPaintProperty(e,d,s[d]);for(var m in He(u,r.filter)||t.setFilter(e,u),l===r.minzoom&&c===r.maxzoom||t.setLayerZoomRange(e,l,c),h)He(h[m],r[m])||t.setLayerProperty(e,m,h[m])}(t,r.id,n,i),Object.assign(i,n)}catch(a){console.warn(a)}else r._createLayer()}})),r.id=t.id||"jsx-layer-".concat(nn++),r.type=t.type,r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this._updateLayer()}},{key:"componentDidUpdate",value:function(){this._updateLayer()}},{key:"componentWillUnmount",value:function(){var t=this._map;t&&(t.off("styledata",this._updateLayer),t.style&&t.style._loaded&&t.removeLayer(this.id))}},{key:"getLayer",value:function(){var t=this._map;return t&&t.style&&t.getLayer(this.id)}},{key:"_createLayer",value:function(){var t=this._map;if(t.style&&t.style._loaded){var e=Object.assign({},this.props);e.id=this.id,delete e.beforeId,t.addLayer(e,this.props.beforeId),this._layerOptions=e}}},{key:"_render",value:function(t){return!this._map&&t.map&&(this._map=t.map,this._map.on("styledata",this._updateLayer)),null}},{key:"render",value:function(){return f.createElement(Vt.Consumer,null,this._render.bind(this))}}]),n}(f.PureComponent);function on(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(rn,"propTypes",en);var an={captureScroll:m.a.bool,captureDrag:m.a.bool,captureClick:m.a.bool,captureDoubleClick:m.a.bool},sn=function(t){u(n,t);var e=on(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"_context",{}),Object(h.a)(o(t),"_events",null),Object(h.a)(o(t),"_containerRef",Object(f.createRef)()),Object(h.a)(o(t),"_onScroll",(function(e){t.props.captureScroll&&e.stopPropagation()})),Object(h.a)(o(t),"_onDragStart",(function(e){t.props.captureDrag&&e.stopPropagation()})),Object(h.a)(o(t),"_onDblClick",(function(e){t.props.captureDoubleClick&&e.stopPropagation()})),Object(h.a)(o(t),"_onClick",(function(e){t.props.captureClick&&e.stopPropagation()})),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this._containerRef.current;if(t){var e=this._context.eventManager;e&&(this._events={wheel:this._onScroll,panstart:this._onDragStart,anyclick:this._onClick,click:this._onClick,dblclick:this._onDblClick},e.watch(this._events,t))}}},{key:"componentWillUnmount",value:function(){var t=this._context.eventManager;t&&this._events&&t.off(this._events)}},{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){var t=this;return f.createElement(Vt.Consumer,null,(function(e){return t._context=e,t._render()}))}}]),n}(f.PureComponent);function un(t,e,n){return(un="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function ln(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}
2Object(h.a)(sn,"propTypes",an),Object(h.a)(sn,"defaultProps",{captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0});var cn=Object.assign({},sn.propTypes,{draggable:m.a.bool,onDrag:m.a.func,onDragEnd:m.a.func,onDragStart:m.a.func,offsetLeft:m.a.number,offsetTop:m.a.number}),pn=Object.assign({},sn.defaultProps,{draggable:!1,offsetLeft:0,offsetTop:0}),hn=function(t){u(n,t);var e=ln(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"state",{dragPos:null,dragOffset:null}),Object(h.a)(o(t),"_dragEvents",null),Object(h.a)(o(t),"_onDragStart",(function(e){var n=t.props,r=n.draggable,i=n.captureDrag;if((r||i)&&e.stopPropagation(),r){var o=t._getDragEventPosition(e),a=t._getDragEventOffset(e);t.setState({dragPos:o,dragOffset:a}),t._setupDragEvents();var s=t.props.onDragStart;if(s&&a){var u=Object.assign({},e);u.lngLat=t._getDragLngLat(o,a),s(u)}}})),Object(h.a)(o(t),"_onDrag",(function(e){e.stopPropagation();var n=t._getDragEventPosition(e);t.setState({dragPos:n});var r=t.props.onDrag,i=t.state.dragOffset;if(r&&i){var o=Object.assign({},e);o.lngLat=t._getDragLngLat(n,i),r(o)}})),Object(h.a)(o(t),"_onDragEnd",(function(e){var n=t.state,r=n.dragPos,i=n.dragOffset;e.stopPropagation(),t.setState({dragPos:null,dragOffset:null}),t._removeDragEvents();var o=t.props.onDragEnd;if(o&&r&&i){var a=Object.assign({},e);a.lngLat=t._getDragLngLat(r,i),o(a)}})),Object(h.a)(o(t),"_onDragCancel",(function(e){e.stopPropagation(),t.setState({dragPos:null,dragOffset:null}),t._removeDragEvents()})),t}return Object(a.a)(n,[{key:"componentWillUnmount",value:function(){un(p(n.prototype),"componentWillUnmount",this).call(this),this._removeDragEvents()}},{key:"_setupDragEvents",value:function(){var t=this._context.eventManager;t&&(this._dragEvents={panmove:this._onDrag,panend:this._onDragEnd,pancancel:this._onDragCancel},t.on(this._dragEvents))}},{key:"_removeDragEvents",value:function(){var t=this._context.eventManager;t&&this._dragEvents&&(t.off(this._dragEvents),this._dragEvents=null)}},{key:"_getDragEventPosition",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"_getDragEventOffset",value:function(t){var e=t.center,n=e.x,r=e.y,i=this._containerRef.current;if(i){var o=i.getBoundingClientRect();return[o.left-n,o.top-r]}return null}},{key:"_getDraggedPosition",value:function(t,e){return[t[0]+e[0],t[1]+e[1]]}},{key:"_getDragLngLat",value:function(t,e){var n=this.props,r=n.offsetLeft,i=n.offsetTop,o=this._getDraggedPosition(t,e),a=Object(T.a)(o,2),s=a[0],u=a[1];return this._context.viewport.unproject([s-r,u-i])}}]),n}(sn);Object(h.a)(hn,"propTypes",cn),Object(h.a)(hn,"defaultProps",pn);var fn="undefined"!==typeof window&&window.devicePixelRatio||1,dn=function(t){return Math.round(t*fn)/fn},mn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";if(null===t)return e;var r="x"===n?t.offsetWidth:t.offsetHeight;return dn(e/100*r)/r*100};function yn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var vn=Object.assign({},hn.propTypes,{className:m.a.string,longitude:m.a.number.isRequired,latitude:m.a.number.isRequired}),gn=Object.assign({},hn.defaultProps,{className:""}),_n=function(t){u(n,t);var e=yn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"_control",null),t}return Object(a.a)(n,[{key:"_getPosition",value:function(){var t=this.props,e=t.longitude,n=t.latitude,r=t.offsetLeft,i=t.offsetTop,o=this.state,a=o.dragPos,s=o.dragOffset;if(a&&s)return this._getDraggedPosition(a,s);var u=this._context.viewport.project([e,n]),l=Object(T.a)(u,2),c=l[0],p=l[1];return[c+=r,p+=i]}},{key:"_render",value:function(){var t=this._getPosition(),e=Object(T.a)(t,2),n=e[0],r=e[1],i="translate(".concat(dn(n),"px, ").concat(dn(r),"px)"),o=this._containerRef.current;if(this._control&&o)o.style.transform=i;else{var a=this.props,s=a.className,u=a.draggable,l=this.state.dragPos,c={position:"absolute",left:0,top:0,transform:i,cursor:u?l?"grabbing":"grab":"auto"};this._control=f.createElement("div",{className:"mapboxgl-marker ".concat(s),ref:this._containerRef,style:c},this.props.children)}return this._control}},{key:"render",value:function(){return this._control=null,un(p(n.prototype),"render",this).call(this)}}]),n}(hn);Object(h.a)(_n,"propTypes",vn),Object(h.a)(_n,"defaultProps",gn);var xn={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1}
2,left:{x:0,y:.5},right:{x:1,y:.5}},bn=Object.keys(xn);function wn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var En=Object.assign({},sn.propTypes,{className:m.a.string,longitude:m.a.number.isRequired,latitude:m.a.number.isRequired,altitude:m.a.number,offsetLeft:m.a.number,offsetTop:m.a.number,tipSize:m.a.number,closeButton:m.a.bool,closeOnClick:m.a.bool,anchor:m.a.oneOf(Object.keys(xn)),dynamicPosition:m.a.bool,sortByDepth:m.a.bool,onClose:m.a.func}),Sn=Object.assign({},sn.defaultProps,{className:"",altitude:0,offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}}),Tn=function(t){u(n,t);var e=wn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"_closeOnClick",!1),Object(h.a)(o(t),"_contentRef",Object(f.createRef)()),Object(h.a)(o(t),"_onClick",(function(e){if(t.props.captureClick&&e.stopPropagation(),t.props.closeOnClick||"mapboxgl-popup-close-button"===e.target.className){t.props.onClose();var n=t._context.eventManager;n&&n.once("click",(function(t){return t.stopPropagation()}),e.target)}})),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){un(p(n.prototype),"componentDidMount",this).call(this),this.forceUpdate()}},{key:"_getPosition",value:function(t,e){var n=this._context.viewport,r=this.props,i=r.anchor,o=r.dynamicPosition,a=r.tipSize,s=this._contentRef.current;return s&&o?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,a=t.selfHeight,s=t.anchor,u=t.padding,l=void 0===u?0:u,c=xn[s],p=c.x,h=c.y,f=n-h*a,d=f+a;if(f<l)for(;f<l&&h>=.5;)h-=.5,f+=.5*a;else if(d>i-l)for(;d>i-l&&h<=.5;)h+=.5,d-=.5*a;var m=e-p*o,y=m+o,v=.5;
2if(.5===h&&(p=Math.floor(p),v=1),m<l)for(;m<l&&p>=v;)p-=v,m+=v*o;else if(y>r-l)for(;y>r-l&&p<=1-v;)p+=v,y-=v*o;return bn.find((function(t){var e=xn[t];return e.x===p&&e.y===h}))||s}({x:t,y:e,anchor:i,padding:a,width:n.width,height:n.height,selfWidth:s.clientWidth,selfHeight:s.clientHeight}):i}},{key:"_getContainerStyle",value:function(t,e,n,r){var i=this._context.viewport,o=this.props,a=o.offsetLeft,s=o.offsetTop,u=o.sortByDepth,l=xn[r],c=t+a,p=e+s,h=this._containerRef.current,f=mn(h,100*-l.x),d=mn(h,100*-l.y,"y"),m={position:"absolute",transform:"\n        translate(".concat(f,"%, ").concat(d,"%)\n        translate(").concat(dn(c),"px, ").concat(dn(p),"px)\n      "),display:void 0,zIndex:void 0};return u?(n>1||n<-1||t<0||t>i.width||e<0||e>i.height?m.display="none":m.zIndex=Math.floor((1-n)/2*1e5),m):m}},{key:"_renderTip",value:function(t){var e=this.props.tipSize;return f.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:e}})}},{key:"_renderContent",value:function(){var t=this.props,e=t.closeButton,n=t.children,r=this._context.eventManager?null:this._onClick;return f.createElement("div",{key:"content",ref:this._contentRef,className:"mapboxgl-popup-content",onClick:r},e&&f.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button"},"\xd7"),n)}},{key:"_render",value:function(){var t=this.props,e=t.className,n=t.longitude,r=t.latitude,i=t.altitude,o=this._context.viewport.project([n,r,i]),a=Object(T.a)(o,3),s=a[0],u=a[1],l=a[2],c=this._getPosition(s,u),p=this._getContainerStyle(s,u,l,c);return f.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(c," ").concat(e),style:p,ref:this._containerRef},this._renderTip(c),this._renderContent())}}]),n}(sn);Object(h.a)(Tn,"propTypes",En),Object(h.a)(Tn,"defaultProps",Sn);var kn=n(8);function Pn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var Cn,In=Object.assign({},sn.propTypes,{className:m.a.string,container:m.a.object}),zn=Object.assign({},sn.defaultProps,{className:"",container:null}),An=function(t){u(n,t);var e=Pn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"state",{isFullscreen:!1,showButton:!1}),Object(h.a)(o(t),"_mapboxFullscreenControl",null),Object(h.a)(o(t),"_onFullscreenChange",(function(){var e=!t._mapboxFullscreenControl._fullscreen;t._mapboxFullscreenControl._fullscreen=e,t.setState({isFullscreen:e})})),Object(h.a)(o(t),"_onClickFullscreen",(function(){t._mapboxFullscreenControl._onClickFullscreen()})),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this.props.container||this._context.mapContainer;this._mapboxFullscreenControl=new pt.a.FullscreenControl({container:t}),this.setState({showButton:this._mapboxFullscreenControl._checkFullscreenSupport()}),kn.a.addEventListener(this._mapboxFullscreenControl._fullscreenchange,this._onFullscreenChange)}},{key:"componentWillUnmount",value:function(){kn.a.removeEventListener(this._mapboxFullscreenControl._fullscreenchange,this._onFullscreenChange)}},{key:"_renderButton",value:function(t,e,n){return f.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},f.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}},{key:"_render",value:function(){if(!this.state.showButton)return null;var t=this.props.className,e=this.state.isFullscreen?"shrink":"fullscreen";return f.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group ".concat(t),ref:this._containerRef},this._renderButton(e,"Toggle fullscreen",this._onClickFullscreen))}}]),n}(sn);function Mn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(An,"propTypes",In),Object(h.a)(An,"defaultProps",zn);var On=Object.assign({},re.defaultProps,{transitionDuration:500}),Dn=function(){},Ln=Object.assign({}
2,sn.propTypes,{className:m.a.string,style:m.a.object,label:m.a.string,auto:m.a.bool,positionOptions:m.a.object,fitBoundsOptions:m.a.object,trackUserLocation:m.a.bool,showUserLocation:m.a.bool,onViewStateChange:m.a.func,onViewportChange:m.a.func,onGeolocate:m.a.func}),Rn=Object.assign({},sn.defaultProps,{className:"",style:{},label:"Geolocate",auto:!1,positionOptions:null,fitBoundsOptions:null,trackUserLocation:!1,showUserLocation:!0,onGeolocate:function(){}}),Bn=function(t){u(n,t);var e=Mn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"state",{supportsGeolocation:!1,markerPosition:null}),Object(h.a)(o(t),"_mapboxGeolocateControl",null),Object(h.a)(o(t),"_geolocateButtonRef",Object(f.createRef)()),Object(h.a)(o(t),"_setupMapboxGeolocateControl",(function(e){if(e){var n={showUserLocation:!1};["positionOptions","fitBoundsOptions","trackUserLocation"].forEach((function(e){e in t.props&&null!==t.props[e]&&(n[e]=t.props[e])}));var r=new pt.a.GeolocateControl(n);t._mapboxGeolocateControl=r,r._watchState="OFF",r._geolocateButton=t._geolocateButtonRef.current,r.options.trackUserLocation&&r._geolocateButton&&r._geolocateButton.setAttribute("aria-pressed","false"),r._updateMarker=t._updateMarker,r._updateCamera=t._updateCamera,r._setup=!0;var i=t._context.eventManager;r.options.trackUserLocation&&i&&i.on("panstart",(function(){"ACTIVE_LOCK"===r._watchState&&(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"))})),r.on("geolocate",t.props.onGeolocate)}else console.warn("Geolocation support is not available, the GeolocateControl will not be visible.")})),Object(h.a)(o(t),"_triggerGeolocate",(function(){var e=t._mapboxGeolocateControl;return e._map=t._context.map,t.props.showUserLocation&&(e.on("geolocate",t._updateMarker),e.on("trackuserlocationend",t._updateMarker)),t._mapboxGeolocateControl.trigger()})),Object(h.a)(o(t),"_updateMarker",(function(e){e&&t.setState({markerPosition:e.coords})})),Object(h.a)(o(t),"_getBounds",(function(t){var e=new pt.a.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,r=e.toBounds(n);return[[r._ne.lng,r._ne.lat],[r._sw.lng,r._sw.lat]]})),Object(h.a)(o(t),"_updateCamera",(function(e){var n=t._context.viewport,r=t._getBounds(e),i=new it(n).fitBounds(r),o=i.longitude,a=i.latitude,s=i.zoom,u=Object.assign({},n,{longitude:o,latitude:a,zoom:s}),l=new Nt(u),c=Object.assign({},l.getViewportProps(),On),p=t.props.onViewportChange||t._context.onViewportChange||Dn;(t.props.onViewStateChange||t._context.onViewStateChange||Dn)({viewState:c}),p(c)})),Object(h.a)(o(t),"_renderButton",(function(e,n,r){return f.createElement("button",{key:e,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(e),ref:t._geolocateButtonRef,type:"button",title:n,onClick:r},f.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))})),Object(h.a)(o(t),"_renderMarker",(function(){var e=t.state.markerPosition,n=t.props.showUserLocation;return e&&n?f.createElement(_n,{key:"location-maker",className:"mapboxgl-user-location-dot",longitude:e.longitude,latitude:e.latitude,onContextMenu:function(t){return t.preventDefault()},captureDrag:!1,captureDoubleClick:!1}):null})),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this;(void 0!==Cn?Promise.resolve(Cn):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then((function(t){return Cn="denied"!==t.state})):(Cn=Boolean(window.navigator.geolocation),Promise.resolve(Cn))).then((function(e){t.setState({supportsGeolocation:e}),t._setupMapboxGeolocateControl(e),e&&t.props.auto&&t._triggerGeolocate()}))}},{key:"componentDidUpdate",value:function(t){this.state.supportsGeolocation&&!t.auto&&this.props.auto&&this._triggerGeolocate()}},{key:"componentWillUnmount",value:function(){if(this._mapboxGeolocateControl){var t=this._mapboxGeolocateControl._geolocationWatchID;void 0!==t&&(window.navigator.geolocation.clearWatch(t),this._mapboxGeolocateControl._geolocationWatchID=void 0)}}},{key:"_render",value:function(){if(!this.state.supportsGeolocation)return null;var t=this.props,e=t.className,n=t.style,r=t.label;return f.createElement("div",null,this._renderMarker(),f.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group ".concat(e),ref:this._containerRef,style:n,onContextMenu:function(t){return t.preventDefault()}},this._renderButton("geolocate",r,this._triggerGeolocate)))}}]),n}(sn);function Fn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}
2Object(h.a)(Bn,"propTypes",Ln),Object(h.a)(Bn,"defaultProps",Rn);var jn=function(){},Nn=Object.assign({},sn.propTypes,{className:m.a.string,onViewStateChange:m.a.func,onViewportChange:m.a.func,showCompass:m.a.bool,showZoom:m.a.bool,zoomInLabel:m.a.string,zoomOutLabel:m.a.string,compassLabel:m.a.string}),Un=Object.assign({},sn.defaultProps,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function Vn(t){return function(t,e){for(var n=(t||"").split(".").map(Number),r=(e||"").split(".").map(Number),i=0;i<3;i++){var o=n[i]||0,a=r[i]||0;if(o<a)return-1;if(o>a)return 1}return 0}(t,"1.6.0")>=0?2:1}var qn=function(t){u(n,t);var e=Fn(n);function n(t){var r;return Object(i.a)(this,n),r=e.call(this,t),Object(h.a)(o(r),"_uiVersion",void 0),Object(h.a)(o(r),"_onZoomIn",(function(){r._updateViewport({zoom:r._context.viewport.zoom+1})})),Object(h.a)(o(r),"_onZoomOut",(function(){r._updateViewport({zoom:r._context.viewport.zoom-1})})),Object(h.a)(o(r),"_onResetNorth",(function(){r._updateViewport({bearing:0,pitch:0})})),qe(t),r}return Object(a.a)(n,[{key:"_updateViewport",value:function(t){var e=this._context.viewport,n=new Nt(Object.assign({},e,t)),r=Object.assign({},n.getViewportProps(),Oe),i=this.props.onViewportChange||this._context.onViewportChange||jn;(this.props.onViewStateChange||this._context.onViewStateChange||jn)({viewState:r}),i(r)}},{key:"_renderCompass",value:function(){var t=this._context.viewport.bearing,e={transform:"rotate(".concat(-t,"deg)")};return 2===this._uiVersion?f.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:e}):f.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:e})}},{key:"_renderButton",value:function(t,e,n,r){return f.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||f.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}},{key:"_render",value:function(){var t=this.props,e=t.className,n=t.showCompass,r=t.showZoom,i=t.zoomInLabel,o=t.zoomOutLabel,a=t.compassLabel;if(!this._uiVersion){var s=this._context.map;this._uiVersion=s?Vn(s.version):2}return f.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group ".concat(e),ref:this._containerRef},r&&this._renderButton("zoom-in",i,this._onZoomIn),r&&this._renderButton("zoom-out",o,this._onZoomOut),n&&this._renderButton("compass",a,this._onResetNorth,this._renderCompass()))}}]),n}(sn);function Zn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(qn,"propTypes",Nn),Object(h.a)(qn,"defaultProps",Un);var Wn=Object.assign({},sn.propTypes,{maxWidth:m.a.number,unit:m.a.oneOf(["imperial","metric","nautical"])}),Gn=Object.assign({},sn.defaultProps,{maxWidth:100,unit:"metric"}),Xn=function(t){u(n,t);var e=Zn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"_control",null),Object(h.a)(o(t),"_mapboxScaleControl",null),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=new pt.a.ScaleControl;t._map=this._context.map,t._container=this._containerRef.current,this._mapboxScaleControl=t,this._update()}},{key:"_update",value:function(){var t=this._mapboxScaleControl;t&&(t.options=this.props,t._onMove())}},{key:"_render",value:function(){return this._control=this._control||f.createElement("div",{ref:this._containerRef,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}),this._update(),this._control}}]),n}(sn);function Hn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}
2Object(h.a)(Xn,"propTypes",Wn),Object(h.a)(Xn,"defaultProps",Gn);var Kn=Object.assign({},sn.propTypes,{redraw:m.a.func.isRequired}),Yn=function(t){u(n,t);var e=Hn(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a)),Object(h.a)(o(t),"_canvas",void 0),Object(h.a)(o(t),"_ctx",void 0),Object(h.a)(o(t),"_redraw",(function(){var e=t._ctx;if(e){var n=kn.b.devicePixelRatio||1;e.save(),e.scale(n,n);var r=t._context,i=r.viewport,o=r.isDragging;t.props.redraw({width:i.width,height:i.height,ctx:e,isDragging:o,project:i.project.bind(i),unproject:i.unproject.bind(i)}),e.restore()}})),t}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var t=this._containerRef.current;t&&(this._canvas=t,this._ctx=t.getContext("2d")),this._redraw()}},{key:"_render",value:function(){var t=kn.b.devicePixelRatio||1,e=this._context.viewport,n=e.width,r=e.height;return this._redraw(),f.createElement("canvas",{ref:this._containerRef,width:n*t,height:r*t,style:{width:"".concat(n,"px"),height:"".concat(r,"px"),position:"absolute",left:0,top:0}})}}]),n}(sn);function Jn(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(Yn,"propTypes",Kn),Object(h.a)(Yn,"defaultProps",{captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1});var $n=Object.assign({},sn.propTypes,{redraw:m.a.func.isRequired,style:m.a.object}),Qn=function(t){u(n,t);var e=Jn(n);function n(){return Object(i.a)(this,n),e.apply(this,arguments)}return Object(a.a)(n,[{key:"_render",value:function(){var t=this._context,e=t.viewport,n=t.isDragging,r=Object.assign({position:"absolute",left:0,top:0,width:e.width,height:e.height},this.props.style);return f.createElement("div",{ref:this._containerRef,style:r},this.props.redraw({width:e.width,height:e.height,isDragging:n,project:e.project.bind(e),unproject:e.unproject.bind(e)}))}}]),n}(sn);function tr(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(h.a)(Qn,"propTypes",$n),Object(h.a)(Qn,"defaultProps",{captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1});var er=Object.assign({},sn.propTypes,{redraw:m.a.func.isRequired,style:m.a.object}),nr=function(t){u(n,t);var e=tr(n);function n(){return Object(i.a)(this,n),e.apply(this,arguments)}return Object(a.a)(n,[{key:"_render",value:function(){var t=this._context,e=t.viewport,n=t.isDragging,r=Object.assign({position:"absolute",left:0,top:0},this.props.style);return f.createElement("svg",{width:e.width,height:e.height,ref:this._containerRef,style:r},this.props.redraw({width:e.width,height:e.height,isDragging:n,project:e.project.bind(e),unproject:e.unproject.bind(e)}))}}]),n}(sn);Object(h.a)(nr,"propTypes",er),Object(h.a)(nr,"defaultProps",{captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1});pt.a&&pt.a.setRTLTextPlugin},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return x}));var r=n(6);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var o=n(0),a=n.n(o),s=n(10);n(2);function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function l(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}var c=n(9),p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=Object(s.a)(e.props),e}return i(e,t),e.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},e}(a.a.Component);a.a.Component;var h=function(t,e){return"function"===typeof t?t(e):t},f=function(t,e){return"string"===typeof t?Object(s.c)(t,null,null,e):t},d=function(t){return t},m=a.a.forwardRef;"undefined"===typeof m&&(m=d);var y=m((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,o=l(t,["innerRef","navigate","onClick"]),s=o.target,c=u({},o,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return c.ref=d!==m&&e||n,a.a.createElement("a",c)}));var v=m((function(t,e){var n=t.component,i=void 0===n?y:n,o=t.replace,s=t.to,p=t.innerRef,v=l(t,["component","replace","to","innerRef"]);return a.a.createElement(r.c.Consumer,null,(function(t){t||Object(c.a)(!1);var n=t.history,r=f(h(s,t.location),t.location),l=r?n.createHref(r):"",y=u({},v,{href:l,navigate:function(){var e=h(s,t.location);(o?n.replace:n.push)(e)}});return d!==m?y.ref=e||p:y.innerRef=p,a.a.createElement(i,y)}))})),g=function(t){return t},_=a.a.forwardRef;"undefined"===typeof _&&(_=g);var x=_((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,o=t.activeClassName,s=void 0===o?"active":o,p=t.activeStyle,d=t.className,m=t.exact,y=t.isActive,x=t.location,b=t.sensitive,w=t.strict,E=t.style,S=t.to,T=t.innerRef,k=l(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.c.Consumer,null,(function(t){t||Object(c.a)(!1);var n=x||t.location,o=f(h(S,n),n),l=o.pathname,P=l&&l.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=P?Object(r.d)(n.pathname,{path:P,exact:m,sensitive:b,strict:w}):null,I=!!(y?y(C,n):C),z=I?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(d,s):d,A=I?u({},E,{},p):E,M=u({"aria-current":I&&i||null,className:z,style:A,to:o},k);return g!==_?M.ref=e||T:M.innerRef=T,a.a.createElement(v,M)}))}))},function(t,e,n){var r;!function(i,o,a,s){"use strict";var u,l=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p=Math.round,h=Math.abs,f=Date.now;function d(t,e,n){return setTimeout(b(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(y(t,n[e],n),!0)}function y(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function v(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.
vendor: 15,724 bytes, line 2
2stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!==typeof Object.assign?function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var g=v((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&void 0===t[r[i]])&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),_=v((function(t,e){return g(t,e,!0)}),"merge","Use `assign`.");function x(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&u(r,n)}function b(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function E(t,e){return void 0===t?e:t}function S(t,e,n){y(C(e),(function(e){t.addEventListener(e,n,!1)}))}function T(t,e,n){y(C(e),(function(e){t.removeEventListener(e,n,!1)}))}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function P(t,e){return t.indexOf(e)>-1}function C(t){return t.trim().split(/\s+/g)}function I(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function z(t){return Array.prototype.slice.call(t,0)}function A(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];I(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function M(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<l.length;){if((r=(n=l[o])?n+i:e)in t)return r;o++}}var O=1;function D(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var L="ontouchstart"in i,R=void 0!==M(i,"PointerEvent"),B=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F=["x","y"],j=["clientX","clientY"];function N(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&n.handler(e)},this.init()}function U(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i===0,a=12&e&&r-i===0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=V(e));i>1&&!n.firstMultiple?n.firstMultiple=V(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=q(r);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=X(s,u),e.distance=G(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=W(e.deltaX,e.deltaY);var l=Z(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=h(l.x)>h(l.y)?l.x:l.y,e.scale=a?(c=a.pointers,p=r,G(p[0],p[1],j)/G(c[0],c[1],j)):1,e.rotation=a?function(t,e){return X(e[1],e[0],j)+X(t[1],t[0],j)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(s>25||void 0===a.velocity)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,c=Z(s,u,l);r=c.x,i=c.y,n=h(c.x)>h(c.y)?c.x:c.y,o=W(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var c,p;var d=t.element;k(e.srcEvent.target,d)&&(d=e.srcEvent.target);e.target=d}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function V(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:p(t.pointers[n].clientX),clientY:p(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function q(t){var e=t.length;if(1===e)return{x:p(t[0].clientX),y:p(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:p(n/e),y:p(r/e)}}function Z(t,e,n){return{x:e/t||0,y:n/t||0}}function W(t,e){return t===e?1:h(t)>=h(e)?t<0?2:4:e<0?8:16}function G(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function X(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}N.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(D(this.element),this.evWin,this.domHandler)}};var H={mousedown:1,mousemove:2,mouseup:4};function K(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,N.apply(this,arguments)}x(K,N,{handler:function(t){var e=H[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Y={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:"touch",3:"pen",4:"mouse",5:"kinect"},$="pointerdown",Q="pointermove pointerup pointercancel";function tt(){this.evEl=$,this.evWin=Q,N.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&($="MSPointerDown",Q="MSPointerMove MSPointerUp MSPointerCancel"),x(tt,N,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Y[r],o=J[t.pointerType]||t.pointerType,a="touch"==o,s=I(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,N.apply(this,arguments)}function rt(t,e){var n=z(t.touches),r=z(t.changedTouches);return 12&e&&(n=A(n.concat(r),"identifier",!0)),[n,r]}x(nt,N,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=rt.call(this,t,e);12&e&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ot(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},N.apply(this,arguments)}function at(t,e){var n=z(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=z(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return k(t.target,u)})),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;return s.length?[A(o.concat(s),"identifier",!0),s]:void 0}x(ot,N,{handler:function(t){var e=it[t.type],n=at.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});function st(){N.apply(this,arguments);var t=b(this.handler,this);this.touch=new ot(this.manager,t),this.mouse=new K(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function ut(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,lt.call(this,e)):12&t&&lt.call(this,e)}function lt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),2500)}}function ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}x(st,N,{handler:function(t,e,n){var r="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ut.call(this,e,n);else if(i&&ct.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var pt=M(c.style,"touchAction"),ht=void 0!==pt,ft=function(){if(!ht)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||i.CSS.supports("touch-action",n)})),t}();function dt(t,e){this.manager=t,this.set(e)}dt.prototype={set:function(t){"compute"==t&&(t=this.compute()),ht&&this.manager.element.style&&ft[t]&&(this.manager.element.style[pt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return y(this.manager.recognizers,(function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(P(t,"none"))return"none";var e=P(t,"pan-x"),n=P(t,"pan-y");if(e&&n)return"none";if(e||n)return e?"pan-x":"pan-y";if(P(t,"manipulation"))return"manipulation";return"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=P(r,"none")&&!ft.none,o=P(r,"pan-y")&&!ft["pan-y"],a=P(r,"pan-x")&&!ft["pan-x"];if(i){var s=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};function mt(t){this.options=u({},this.defaults,t||{}),this.id=O++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function yt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function vt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function gt(t,e){var n=e.manager;return n?n.get(t):t}function _t(){mt.apply(this,arguments)}function xt(){_t.apply(this,arguments),this.pX=null,this.pY=null}function bt(){_t.apply(this,arguments)}function wt(){mt.apply(this,arguments),this._timer=null,this._input=null}function Et(){_t.apply(this,arguments)}function St(){_t.apply(this,arguments)}function Tt(){mt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function kt(t,e){return(e=e||{}).recognizers=E(e.recognizers,kt.defaults.preset),new Pt(t,e)}mt.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=gt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)||(t=gt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===I(e,t=gt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=gt(t,this);var e=I(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+yt(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+yt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},x(_t,mt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:32}}),x(xt,_t,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return _t.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=vt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),x(bt,_t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),x(wt,mt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),x(Et,_t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),x(St,_t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return xt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&h(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=vt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),x(Tt,mt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||G(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}
2),e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=d((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),kt.VERSION="2.0.7",kt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Et,{enable:!1}],[bt,{enable:!1},["rotate"]],[St,{direction:6}],[xt,{direction:6},["swipe"]],[Tt],[Tt,{event:"doubletap",taps:2},["tap"]],[wt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Pt(t,e){this.options=u({},kt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(R?tt:B?ot:L?st:K))(t,U)}(this),this.touchAction=new dt(this,this.options.touchAction),Ct(this,!0),y(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Ct(t,e){var n,r=t.element;r.style&&(y(t.options.cssProps,(function(i,o){n=M(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Pt.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof mt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(m(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=I(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var n=this.handlers;return y(C(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(void 0!==t){var n=this.handlers;return y(C(t),(function(t){e?n[t]&&n[t].splice(I(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&Ct(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(kt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Pt,Input:N,TouchAction:dt,TouchInput:ot,MouseInput:K,PointerEventInput:tt,TouchMouseInput:st,SingleTouchInput:nt,Recognizer:mt,AttrRecognizer:_t,Tap:Tt,Pan:xt,Swipe:St,Pinch:bt,Rotate:Et,Press:wt,on:S,off:T,each:y,merge:_,extend:g,assign:u,inherit:x,bindFn:b,prefixed:M}),("undefined"!==typeof i?i:"undefined"!==typeof self?self:{}).Hammer=kt,void 0===(r=function(){return kt}.call(e,n,e,t))||(t.exports=r)}(window,document)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return h}));var r=n(4),i=n(3),o=n(1),a=n(2),s=n.n(a),u=n(8);var l={container:s.a.object,gl:s.a.object,mapboxApiAccessToken:s.a.string,mapboxApiUrl:s.a.string,attributionControl:s.a.bool,preserveDrawingBuffer:s.a.bool,reuseMaps:s.a.bool,transformRequest:s.a.func,mapOptions:s.a.object,mapStyle:s.a.oneOfType([s.a.string,
2s.a.object]),visible:s.a.bool,asyncRender:s.a.bool,onLoad:s.a.func,onError:s.a.func,width:s.a.number,height:s.a.number,viewState:s.a.object,longitude:s.a.number,latitude:s.a.number,zoom:s.a.number,bearing:s.a.number,pitch:s.a.number,altitude:s.a.number},c={container:u.a.body,mapboxApiAccessToken:function(){var e=null;if("undefined"!==typeof window&&window.location){var n=window.location.search.match(/access_token=([^&\/]*)/);e=n&&n[1]}e||"undefined"===typeof t||(e=e||Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_MAPBOX_TOKEN:"pk.eyJ1IjoibWFuc2Rlc21leiIsImEiOiJja2YxazkyczIwdHE4MnFwNzZmNTE4aGJnIn0.y9xp6HOT3jNQk39gFs02nA"}).MapboxAccessToken||Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_MAPBOX_TOKEN:"pk.eyJ1IjoibWFuc2Rlc21leiIsImEiOiJja2YxazkyczIwdHE4MnFwNzZmNTE4aGJnIn0.y9xp6HOT3jNQk39gFs02nA"}).REACT_APP_MAPBOX_ACCESS_TOKEN);return e||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",visible:!0,asyncRender:!1,onLoad:function(){},onError:function(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&s.a.checkPropTypes(l,t,"prop",e)}var h=function(){function t(e){var n=this;if(Object(r.a)(this,t),Object(o.a)(this,"mapboxgl",void 0),Object(o.a)(this,"props",c),Object(o.a)(this,"_map",null),Object(o.a)(this,"width",0),Object(o.a)(this,"height",0),Object(o.a)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),!e.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return Object(i.a)(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"resize",value:function(){return this._map.resize(),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(e.mapStyle,{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:e.mapStyle,interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",e.onLoad),this._map.on("error",e.onError)}return this}},{key:"_destroy",value:function(){this._map&&(t.savedMap?this._map.remove():(t.savedMap=this._map,this._map.off("load",this.props.onLoad),this._map.off("error",this.props.onError),this._map.off("styledata",this._fireLoadEvent)),this._map=null)}},{key:"_initialize",value:function(t){var e=this;p(t=Object.assign({},c,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||c.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){p(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);e.asyncRender||!n&&!r||this.redraw(),this.props=e}}}
2,{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=void 0===o?0:o,s=e.bearing,u=void 0===s?0:s,l=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:a,bearing:u,altitude:void 0===l?1.5:l}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if("undefined"!==typeof u.a)try{var e=u.a.createElement("div");e.className="mapboxgl-map",e.style.display="none",u.a.body.append(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=u.a.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),u.a.head.append(r)}}catch(i){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();Object(o.a)(h,"initialized",!1),Object(o.a)(h,"propTypes",l),Object(o.a)(h,"defaultProps",c),Object(o.a)(h,"savedMap",null)}).call(this,n(24))},,function(t,e,n){"use strict";(function(t){var r=n(0),i=n.n(r),o=n(21),a=n(2),s=n.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function l(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var c=i.a.createContext||function(t,e){var n,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return u[t]=(u[t]||0)+1}()+"__",c=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=l(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof e?e(r,i):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);c.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var p=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return p.contextTypes=((i={})[a]=s.a.object,i),{Provider:c,Consumer:p}};e.a=c}).call(this,n(17))},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(51);t.exports=f,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",c=e&&e.delimiter||"/";null!=(n=i.exec(t));){var p=n[0],h=n[1],f=n.index;if(s+=t.slice(a,f),a=f+p.length,h)s+=h[1];else{var d=t[a],m=n[2],y=n[3],v=n[4],g=n[5],_=n[6],x=n[7];s&&(r.push(s),s="");var b=null!=m&&null!=d&&d!==m,w="+"===_||"*"===_,E="?"===_||"*"===_,S=n[2]||c,T=v||g;r.push({name:y||o++,prefix:m||"",delimiter:S,optional:E,repeat:w,partial:b,asterisk:!!x,pattern:T?l(T):x?".*":"[^"+u(S)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"===typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",p(e)));return function(e,i){for(var o="",s=e||{},u=(i||{}).pretty?a:encodeURIComponent,l=0;l<t.length;l++){var c=t[l];if("string"!==typeof c){var p,h=s[c.name];if(null==h){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(h)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var f=0;f<h.length;f++){if(p=u(h[f]),!n[l].test(p))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===f?c.prefix:c.delimiter)+p}}else{if(p=c.asterisk?encodeURI(h).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(h),!n[l].test(p))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+p+'"');o+=c.prefix+p}}else o+=c}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function c(t,e){return t.keys=e,t}function p(t){return t&&t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var l=t[s];if("string"===typeof l)a+=u(l);else{var h=u(l.prefix),f="(?:"+l.pattern+")";e.push(l),l.repeat&&(f+="(?:"+h+f+")*"),a+=f=l.optional?l.partial?h+"("+f+")?":"(?:"+h+"("+f+"))?":h+"("+f+")"}}var d=u(n.delimiter||"/"),m=a.slice(-d.length)===d;
2return i||(a=(m?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&m?"":"(?="+d+"|$)",c(new RegExp("^"+a,p(n)),e)}function f(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(f(t[i],e,n).source);return c(new RegExp("(?:"+r.join("|")+")",p(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var p=0;p<s.length;p++)o.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++p<e;)u&&u[p].run();p=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new d(t,e)),1!==l.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){t.exports=function(){"use strict";var t,e,n;function r(r,i){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),n=i(a),"undefined"!==typeof window&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=i;else t=i}return r(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=r;function r(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}r.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},r.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},r.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},r.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);
vendor: 14,108 bytes, line 2
2if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=n*this.x+e*this.y;return this.x=e*this.x-n*this.y,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=e.x+n*(this.x-e.x)-r*(this.y-e.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var a="undefined"!=typeof self?self:{},s=Math.pow(2,53)-1;function u(t,e,r,i){var o=new n(t,e,r,i);return function(t){return o.solve(t)}}var l=u(.25,.1,.25,1);function c(t,e,n){return Math.min(n,Math.max(e,t))}function p(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i}function h(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r<i.length;r+=1){var o=i[r];for(var a in o)t[a]=o[a]}return t}var f=1;function d(){return f++}function m(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function y(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function v(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function g(t,e){return-1!==t.indexOf(e,t.length-e.length)}function _(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r}function x(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r}function b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?_(t,b):t}var w={};function E(t){w[t]||("undefined"!=typeof console&&console.warn(t),w[t]=!0)}function S(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function T(t){for(var e=0,n=0,r=t.length,i=r-1,o=void 0,a=void 0;n<r;i=n++)e+=((a=t[i]).x-(o=t[n]).x)*(o.y+a.y);return e}function k(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function P(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""})),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}var C=null;function I(t){if(null==C){var e=t.navigator?t.navigator.userAgent:null;C=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return C}function z(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var A,M,O,D,L=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),R=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,B=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,F={now:L,frame:function(t){var e=R(t);return{cancel:function(){return B(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var n=a.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return A||(A=a.document.createElement("a")),A.href=t,A.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==M&&(M=a.matchMedia("(prefers-reduced-motion: reduce)")),M.matches)}},j={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},N={supported:!1,testSupport:function(t){!U&&D&&(V?q(t):O=t)}},U=!1,V=!1;function q(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,D),t.isContextLost())return;N.supported=!0}catch(t){}t.deleteTexture(e),U=!0}a.document&&((D=a.document.createElement("img")).onload=function(){O&&q(O),O=null,V=!0},D.onerror=function(){U=!0,O=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Z="01",W=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function G(t){return 0===t.indexOf("mapbox:")}W.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Z,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},W.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},W.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},W.prototype.normalizeStyleURL=function(t,e){if(!G(t))return t;var n=Y(t);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeGlyphsURL=function(t,e){if(!G(t))return t;var n=Y(t);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeSourceURL=function(t,e){if(!G(t))return t;var n=Y(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeSpriteURL=function(t,e,n,r){var i=Y(t);return G(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+n,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=""+e+n,J(i))},W.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!G(t))return t;var n=Y(t);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,(F.devicePixelRatio>=2||512===e?"@2x":"")+(N.supported?".webp":"$1")),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path;var r=this._customAccessToken||function(t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e].match(/^access_token=(.*)$/);if(r)return r[1]}return null}(n.params)||j.ACCESS_TOKEN;return j.REQUIRE_ACCESS_TOKEN&&r&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,r)},W.prototype.canonicalizeTileURL=function(t,e){var n=Y(t);if(!n.path.match(/(^\/v4\/)/)||!n.path.match(/\.[\w]+$/))return t;var r="mapbox://tiles/";r+=n.path.replace("/v4/","");var i=n.params;return e&&(i=i.filter((function(t){return!t.match(/^access_token=/)}))),i.length&&(r+="?"+i.join("&")),r},W.prototype.canonicalizeTileset=function(t,e){for(var n=!!e&&G(e),r=[],i=0,o=t.tiles||[];i<o.length;i+=1){var a=o[i];H(a)?r.push(this.canonicalizeTileURL(a,n)):r.push(a)}return r},W.prototype._makeAPIURL=function(t,e){var n="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",r=Y(j.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!j.REQUIRE_ACCESS_TOKEN)return J(t);if(!(e=e||j.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),J(t)};var X=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function H(t){return X.test(t)}var K=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Y(t){var e=t.match(K);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function J(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function $(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(a.atob(e[1]).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch(t){return null}}var Q=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(t){var e,n=$(j.ACCESS_TOKEN);return e=n&&n.u?a.btoa(encodeURIComponent(n.u).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))}))):j.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Q.prototype.fetchEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{var r=a.localStorage.getItem(e);r&&(this.eventData=JSON.parse(r));var i=a.localStorage.getItem(n);i&&(this.anonId=i)}catch(t){E("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{a.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){E("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,n,r){var i=this;if(j.EVENTS_URL){var o=Y(j.EVENTS_URL);o.params.push("access_token="+(r||j.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.12.0",skuId:Z,userId:this.anonId},s=e?h(a,e):a,u={url:J(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=bt(u,(function(t){i.pendingRequest=null,n(t),i.saveEventData(),i.processRequests(r)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var tt,et,nt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,n,r){this.skuToken=n,(j.EVENTS_URL&&r||j.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||H(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},r)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,i=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),y(this.anonId)||(this.anonId=m()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||r&&(e.success[r]=!0)}),t))}},e}(Q),rt=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){j.EVENTS_URL&&j.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||H(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=$(j.ACCESS_TOKEN),r=n?n.u:j.ACCESS_TOKEN,i=r!==this.eventData.tokenU;y(this.anonId)||(this.anonId=m(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),u=(o-this.eventData.lastSuccess)/864e5;i=i||u>=1||u<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=r)}),t)}},e}(Q)),it=rt.postTurnstileEvent.bind(rt),ot=new nt,at=ot.postMapLoadEvent.bind(ot),st=500,ut=50;function lt(){a.caches&&!tt&&(tt=a.caches.open("mapbox-tiles"))}function ct(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var pt,ht=1/0;function ft(){return null==pt&&(pt=a.OffscreenCanvas&&new a.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof a.createImageBitmap),pt}var dt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(dt);var mt,yt,vt=function(t){function e(e,n,r){401===n&&H(r)&&(e+=": you may have provided an invali
2d Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=n,this.url=r,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),gt=k()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===a.location.protocol?a.parent:a).location.href},_t=function(t,e){if(!(/^file:/.test(n=t.url)||/^file:/.test(gt())&&!/^\w+:/.test(n))){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return function(t,e){var n,r=new a.AbortController,i=new a.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:gt(),signal:r.signal}),o=!1,s=!1,u=(n=i.url).indexOf("sku=")>0&&H(n);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(n,r,o){if(!s){if(n&&"SecurityError"!==n.message&&E(n),r&&o)return c(r);var l=Date.now();a.fetch(i).then((function(n){if(n.ok){var r=u?n.clone():null;return c(n,r,l)}return e(new vt(n.statusText,n.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(n,r,u){("arrayBuffer"===t.type?n.arrayBuffer():"json"===t.type?n.json():n.text()).then((function(t){s||(r&&u&&function(t,e,n){if(lt(),tt){var r={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return r.headers.set(e,t)}));var i=P(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(t,e){if(void 0===et)try{new Response(new ReadableStream),et=!0}catch(t){et=!1}et?e(t.body):t.blob().then(e)}(e,(function(e){var n=new a.Response(e,r);lt(),tt&&tt.then((function(e){return e.put(ct(t.url),n)})).catch((function(t){return E(t.message)}))})))}}(i,r,u),o=!0,e(null,t,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return u?function(t,e){if(lt(),!tt)return e(null);var n=ct(t.url);tt.then((function(t){t.match(n).then((function(r){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),n=P(t.headers.get("Cache-Control")||"");return e>Date.now()&&!n["no-cache"]}(r);t.delete(n),i&&t.put(n,r.clone()),e(null,r,i)})).catch(e)})).catch(e)}(i,l):l(null,null),{cancel:function(){s=!0,o||r.abort()}}}(t,e);if(k()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var n;return function(t,e){var n=new a.XMLHttpRequest;for(var r in n.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer"),t.headers)n.setRequestHeader(r,t.headers[r]);return"json"===t.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===t.type)try{r=JSON.parse(n.response)}catch(t){return e(t)}e(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else e(new vt(n.statusText,n.status,t.url))},n.send(t.body),{cancel:function(){return n.abort()}}}(t,e)},xt=function(t,e){return _t(h(t,{type:"arrayBuffer"}),e)},bt=function(t,e){return _t(h(t,{method:"POST"}),e)};function wt(t,e,n){n[t]&&-1!==n[t].indexOf(e)||(n[t]=n[t]||[],n[t].push(e))}function Et(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}mt=[],yt=0;var St=function(t,e){void 0===e&&(e={}),h(this,e),this.type=t},Tt=function(t){function e(e,n){void 0===n&&(n={}),t.call(this,"error",h({error:e},n))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(St),kt=function(){};kt.prototype.on=function(t,e){return this._listeners=this._listeners||{},wt(t,e,this._listeners),this},kt.prototype.off=function(t,e){return Et(t,e,this._listeners),Et(t,e,this._oneTimeListeners),this},kt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},wt(t,e,this._oneTimeListeners),this},kt.prototype.fire=function(t,e){"string"==typeof t&&(t=new St(t,e||{}));var n=t.type;if(this.listens(n)){t.target=this;for(var r=0,i=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];r<i.length;r+=1)i[r].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];o<a.length;o+=1){var s=a[o];Et(n,s,this._oneTimeListeners),s.call(this,t)}var u=this._eventedParent;u&&(h(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),u.fire(t))}else t instanceof Tt&&console.error(t.error);return this},kt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},kt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var P
vendor: 19,006 bytes, line 2
2t={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 9,823 bytes, line 2
2,"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
vendor: 104,631 bytes, line 2
2,Ct=function(t,e,n,r){this.message=(t?t+": ":"")+n,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)};function It(t){var e=t.value;return e?[new Ct(t.key,e,"constants have been deprecated as of v8")]:[]}function zt(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r<i.length;r+=1){var o=i[r];for(var a in o)t[a]=o[a]}return t}function At(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Mt(t){if(Array.isArray(t))return t.map(Mt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var n in t)e[n]=Mt(t[n]);return e}return At(t)}var Ot=function(t){function e(e,n){t.call(this,n),this.message=n,this.key=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(Error),Dt=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var i=r[n];this.bindings[i[0]]=i[1]}};Dt.prototype.concat=function(t){return new Dt(this,t)},Dt.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Dt.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Lt={kind:"null"},Rt={kind:"number"},Bt={kind:"string"},Ft={kind:"boolean"},jt={kind:"color"},Nt={kind:"object"},Ut={kind:"value"},Vt={kind:"collator"},qt={kind:"formatted"},Zt={kind:"resolvedImage"};function Wt(t,e){return{kind:"array",itemType:t,N:e}}function Gt(t){if("array"===t.kind){var e=Gt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Xt=[Lt,Rt,Bt,Ft,jt,qt,Nt,Wt(Ut),Zt];function Ht(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Ht(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=Xt;n<r.length;n+=1)if(!Ht(r[n],e))return null}return"Expected "+Gt(t)+" but found "+Gt(e)+" instead."}function Kt(t,e){return e.some((function(e){return e.kind===t.kind}))}function Yt(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var Jt=e((function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return r("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function a(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in n)return n[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=s.indexOf("("),l=s.indexOf(")");if(-1!==u&&l+1===s.length){var c=s.substr(0,u),p=s.substr(u+1,l-(u+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[i(p[0]),i(p[1]),i(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=o(p[1]),m=o(p[2]),y=m<=.5?m*(d+1):m+d-m*d,v=2*m-y;return[r(255*a(v,y,f+1/3)),r(255*a(v,y,f)),r(255*a(v,y,f-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,$t=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};$t.parse=function(t){if(t){if(t instanceof $t)return t;if("string"==typeof t){var e=Jt(t);if(e)return new $t(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},$t.prototype.toString=function(){var t=this.toArray(),e=t[1],n=t[2],r=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(n)+","+r+")"},$t.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},$t.black=new $t(0,0,0,1),$t.white=new $t(1,1,1,1),$t.transparent=new $t(0,0,0,0),$t.red=new $t(1,0,0,1);var Qt=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Qt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Qt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var te=function(t,e,n,r,i){this.text=t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=i},ee=function(t){this.sections=t};ee.fromString=function(t){return new ee([new te(t,null,null,null,null)])},ee.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ee.factory=function(t){return t instanceof ee?t:ee.fromString(t)},ee.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},ee.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];if(r.image)t.push(["image",r.image.name]);else{t.push(r.text);var i={};r.fontStack&&(i["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(i["font-scale"]=r.scale),r.textColor&&(i["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(i)}}return t};var ne=function(t){this.name=t.name,this.available=t.available};function re(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ie(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof $t)return!0;if(t instanceof Qt)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(Array.isArray(t)){for(var e=0,n=t;e<n.length;e+=1)if(!ie(n[e]))return!1;return!0}if("object"==typeof t){for(var r in t)if(!ie(t[r]))return!1;return!0}return!1}function oe(t){if(null===t)return Lt;if("string"==typeof t)return Bt;if("boolean"==typeof t)return Ft;if("number"==typeof t)return Rt;if(t instanceof $t)return jt;if(t instanceof Qt)return Vt;if(t instanceof ee)return qt;if(t instanceof ne)return Zt;if(Array.isArray(t)){for(var e,n=t.length,r=0,i=t;r<i.length;r+=1){var o=oe(i[r]);if(e){if(e===o)continue;e=Ut;break}e=o}return Wt(e||Ut,n)}return Nt}function ae(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof $t||t instanceof ee||t instanceof ne?t.toString():JSON.stringify(t)}ne.prototype.toString=function(){return this.name},ne.fromString=function(t){return t?new ne({name:t,available:!1}):null},ne.prototype.serialize=function(){return["image",this.name]};var se=function(t,e){this.type=t,this.value=e};se.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!ie(t[1]))return e.error("invalid value");var n=t[1],r=oe(n),i=e.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new se(r,n)},se.prototype.evaluate=function(){return this.value},se.prototype.eachChild=function(){},se.prototype.outputDefined=function(){return!0},se.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof $t?["rgba"].concat(this.value.toArray()):this.value instanceof ee?this.value.serialize():this.value};var ue=function(t){this.name="ExpressionEvaluationError",this.message=t};ue.prototype.toJSON=function(){return this.message};var le={string:Bt,number:Rt,boolean:Ft,object:Nt},ce=function(t,e){this.type=t,this.args=e};ce.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n,r=1,i=t[0];if("array"===i){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in le)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=le[s],r++}else o=Ut;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],r++}n=Wt(o,a)}else n=le[i];for(var u=[];r<t.length;r++){var l=e.parse(t[r],r,Ut);if(!l)return null;u.push(l)}return new ce(n,u)},ce.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!Ht(this.type,oe(n)))return n;if(e===this.args.length-1)throw new ue("Expected value to be of type "+Gt(this.type)+", but found "+Gt(oe(n))+" instead.")}return null},ce.prototype.eachChild=function(t){this.args.forEach(t)},ce.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ce.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var n=t.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){e.push(n.kind);var r=t.N;("number"==typeof r||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=qt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return e.error("First argument must be an image or text section.");for(var r=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Rt)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,Wt(Bt))))return null;var l=null;if(a["text-color"]&&!(l=e.parse(a["text-color"],1,jt)))return null;var c=r[r.length-1];c.scale=s,c.font=u,c.textColor=l}else{var p=e.parse(t[o],1,Ut);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:p,scale:null,font:null,textColor:null})}}return new pe(r)},pe.prototype.evaluate=function(t){return new ee(this.sections.map((function(e){var n=e.content.evaluate(t);return oe(n)===Zt?new te("",n,null,null,null):new te(ae(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t.push(r.content.serialize());var i={};r.scale&&(i["font-scale"]=r.scale.serialize()),r.font&&(i["text-font"]=r.font.serialize()),r.textColor&&(i["text-color"]=r.textColor.serialize()),t.push(i)}return t};var he=function(t){this.type=Zt,this.input=t};he.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,Bt);return n?new he(n):e.error("No image name provided.")},he.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=ne.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},he.prototype.eachChild=function(t){t(this.input)},he.prototype.outputDefined=function(){return!1},he.prototype.serialize=function(){return["image",this.input.serialize()]};var fe={"to-boolean":Ft,"to-color":jt,"to-number":Rt,"to-string":Bt},de=function(t,e){this.type=t,this.args=e};de.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return e.error("Expected one argument.");for(var r=fe[n],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Ut);if(!a)return null;i.push(a)}return new de(r,i)},de.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,n,r=0,i=this.args;r<i.length;r+=1){if(n=null,(e=i[r].evaluate(t))instanceof $t)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":re(e[0],e[1],e[2],e[3])))return new $t(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(n||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new ue("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?ee.fromString(ae(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?ne.fromString(ae(this.args[0].evaluate(t))):ae(this.args[0].evaluate(t))},de.prototype.eachChild=function(t){this.args.forEach(t)},de.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},de.prototype.serialize=function(){if("formatted"===this.type.kind)return new pe([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new he(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var me=["Unknown","Point","LineString","Polygon"],ye=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};ye.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},ye.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?me[this.feature.type]:this.feature.type:null},ye.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},ye.prototype.canonicalID=function(){return this.canonical},ye.prototype.properties=function(){return this.feature&&this.feature.properties||{}},ye.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=$t.parse(t)),e};var ve=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};ve.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ve.prototype.eachChild=function(t){this.args.forEach(t)},ve.prototype.outputDefined=function(){return!1},ve.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},ve.parse=function(t,e){var n,r=t[0],i=ve.definitions[r];if(!i)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter((function(e){var n=e[0];return!Array.isArray(n)||n.length===t.length-1})),u=null,l=0,c=s;l<c.length;l+=1){var p=c[l],h=p[0],f=p[1];u=new je(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var v=t[y],g=Array.isArray(h)?h[y-1]:h.type,_=u.parse(v,1+d.length,g);if(!_){m=!0;break}d.push(_)}if(!m)if(Array.isArray(h)&&h.length!==d.length)u.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];u.concat(x+1).checkSubtype(b,w.type)}if(0===u.errors.length)return new ve(r,o,f,d)}}if(1===s.length)(n=e.errors).push.apply(n,u.errors);else{for(var E=(s.length?s:a).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Gt).join(", ")+")":"("+Gt(e.type)+"...)"})).join(" | "),S=[],T=1;T<t.length;T++){var k=e.parse(t[T],1+S.length);if(!k)return null;S.push(Gt(k.type))}e.error("Expected arguments of type "+E+", but found ("+S.join(", ")+") instead.")}return null},ve.register=function(t,e){for(var n in ve.definitions=e,e)t[n]=ve};var ge=function(t,e,n){this.type=Vt,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};function _e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function xe(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function be(t,e){var n=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return[Math.round(n*i*8192),Math.round(r*i*8192)]}function we(t,e,n){return e[1]>t[1]!=n[1]>t[1]&&t[0]<(n[0]-e[0])*(t[1]-e[1])/(n[1]-e[1])+e[0]}function Ee(t,e){for(var n,r,i,o,a,s,u,l=!1,c=0,p=e.length;c<p;c++)for(var h=e[c],f=0,d=h.length;f<d-1;f++){if((o=(n=t)[0]-(r=h[f])[0])*(u=n[1]-(i=h[f+1])[1])-(s=n[0]-i[0])*(a=n[1]-r[1])==0&&o*s<=0&&a*u<=0)return!1;we(t,h[f],h[f+1])&&(l=!l)}return l}function Se(t,e){for(var n=0;n<e.length;n++)if(Ee(t,e[n]))return!0;return!1}function Te(t,e,n,r){var i=r[0]-n[0],o=r[1]-n[1],a=(t[0]-n[0])*o-i*(t[1]-n[1]),s=(e[0]-n[0])*o-i*(e[1]-n[1]);return a>0&&s<0||a<0&&s>0}function ke(t,e,n){for(var r=0,i=n;r<i.length;r+=1)for(var o=i[r],a=0;a<o.length-1;++a)if(0!=(p=[(c=o[a+1])[0]-(l=o[a])[0],c[1]-l[1]])[0]*(h=[(u=e)[0]-(s=t)[0],u[1]-s[1]])[1]-p[1]*h[0]&&Te(s,u,l,c)&&Te(l,c,s,u))return!0;var s,u,l,c,p,h;return!1}function Pe(t,e){for(var n=0;n<t.length;++n)if(!Ee(t[n],e))return!1;for(var r=0;r<t.length-1;++r)if(ke(t[r],t[r+1],e))return!1;return!0}function Ce(t,e){for(var n=0;n<e.length;n++)if(Pe(t,e[n]))return!0;return!1}function Ie(t,e,n){for(var r=[],i=0;i<t.length;i++){for(var o=[],a=0;a<t[i].length;a++){var s=be(t[i][a],n);_e(e,s),o.push(s)}r.push(o)}return r}function ze(t,e,n){for(var r=[],i=0;i<t.length;i++){var o=Ie(t[i],e,n);r.push(o)}return r}function Ae(t,e,n,r){if(t[0]<n[0]||t[0]>n[2]){var i=.5*r,o=t[0]-n[0]>i?-r:n[0]-t[0]>i?r:0;0===o&&(o=t[0]-n[2]>i?-r:n[2]-t[0]>i?r:0),t[0]+=o}_e(e,t)}function Me(t,e,n,r){for(var i=8192*Math.pow(2,r.z),o=[8192*r.x,8192*r.y],a=[],s=0,u=t;s<u.length;s+=1)for(var l=0,c=u[s];l<c.length;l+=1){var p=c[l],h=[p.x+o[0],p.y+o[1]];Ae(h,e,n,i),a.push(h)}return a}function Oe(t,e,n,r){for(var i,o=8192*Math.pow(2,r.z),a=[8192*r.x,8192*r.y],s=[],u=0,l=t;u<l.length;u+=1){for(var c=[],p=0,h=l[u];p<h.length;p+=1){var f=h[p],d=[f.x+a[0],f.y+a[1]];_e(e,d),c.push(d)}s.push(c)}if(e[2]-e[0]<=o/2){(i=e)[0]=i[1]=1/0,i[2]=i[3]=-1/0;for(var m=0,y=s;m<y.length;m+=1)for(var v=0,g=y[m];v<g.length;v+=1)Ae(g[v],e,n,o)}return s}ge.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Ft);if(!r)return null;var i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Ft);if(!i)return null;var o=null;return n.locale&&!(o=e.parse(n.locale,1,Bt))?null:new ge(r,i,o)},ge.prototype.evaluate=function(t){return new Qt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ge.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ge.prototype.outputDefined=function(){return!1},ge.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var De=function(t,e){this.type=Ft,this.geojson=t,this.geometries=e};function Le(t){if(t instanceof ve){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof De)return!1;var e=!0;return t.eachChild((function(t){e&&!Le(t)&&(e=!1)})),e}function Re(t){if(t instanceof ve&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!Re(t)&&(e=!1)})),e}function Be(t,e){if(t instanceof ve&&e.indexOf(t.name)>=0)return!1;var n=!0;return t.eachChild((function(t){n&&!Be(t,e)&&(n=!1)})),n}De.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ie(t[1])){var n=t[1];if("FeatureCollection"===n.type)for(var r=0;r<n.features.length;++r){var i=n.features[r].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new De(n,n.features[r].geometry)}else if("Feature"===n.type){var o=n.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new De(n,n.geometry)}else if("Polygon"===n.type||"MultiPolygon"===n.type)return new De(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},De.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ie(e.coordinates,r,i),a=Me(t.geometry(),n,r,i);if(!xe(n,r))return!1;for(var s=0,u=a;s<u.length;s+=1)if(!Ee(u[s],o))return!1}if("MultiPolygon"===e.type){var l=ze(e.coordinates,r,i),c=Me(t.geometry(),n,r,i);if(!xe(n,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Se(h[p],l))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ie(e.coordinates,r,i),a=Oe(t.geometry(),n,r,i);if(!xe(n,r))return!1;for(var s=0,u=a;s<u.length;s+=1)if(!Pe(u[s],o))return!1}if("MultiPolygon"===e.type){var l=ze(e.coordinates,r,i),c=Oe(t.geometry(),n,r,i);if(!xe(n,r))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Ce(h[p],l))return!1}return!0}(t,this.geometries)}return!1},De.prototype.eachChild=function(){},De.prototype.outputDefined=function(){return!0},De.prototype.serialize=function(){return["within",this.geojson]};var Fe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Fe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new Fe(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},Fe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Fe.prototype.eachChild=function(){},Fe.prototype.outputDefined=function(){return!1},Fe.prototype.serialize=function(){return["var",this.name]};var je=function(t,e,n,r,i){void 0===e&&(e=[]),void 0===r&&(r=new Dt),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=r,this.errors=i,this.expectedType=n};function Ne(t,e){for(var n,r=t.length-1,i=0,o=r,a=0;i<=o;)if((n=t[a=Math.floor((i+o)/2)])<=e){if(a===r||e<t[a+1])return a;i=a+1}else{if(!(n>e))throw new ue("Input is not a number.");o=a-1}return 0}je.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},je.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new ce(e,[t]):"coerce"===n?new de(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof se)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Fe)return t(e.boundExpression);if(e instanceof ve&&"error"===e.name)return!1;if(e instanceof ge)return!1;if(e instanceof De)return!1;var n=e instanceof de||e instanceof ce,r=!0;return e.eachChild((function(e){r=n?r&&t(e):r&&e instanceof se})),!!r&&Le(e)&&Be(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var u=new ye;try{o=new se(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},je.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new je(this.registry,r,e||null,i,this.errors)},je.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Ot(r,t))},je.prototype.checkSubtype=function(t,e){var n=Ht(t,e);return n&&this.error(n),n};var Ue=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r<i.length;r+=1){var o=i[r],a=o[1];this.labels.push(o[0]),this.outputs.push(a)}};function Ve(t,e,n){return t*(1-n)+e*n}Ue.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,Rt);if(!n)return null;var r=[],i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],u=o,l=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var c=e.parse(s,l,i);if(!c)return null;i=i||c.type,r.push([a,c])}return new Ue(i,n,r)},Ue.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[Ne(e,r)].evaluate(t)},Ue.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},Ue.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ue.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var qe=Object.freeze({__proto__:null,number:Ve,color:function(t,e,n){return new $t(Ve(t.r,e.r,n),Ve(t.g,e.g,n),Ve(t.b,e.b,n),Ve(t.a,e.a,n))},array:function(t,e,n){return t.map((function(t,r){return Ve(t,e[r],n)}))}}),Ze=6/29*3*(6/29),We=Math.PI/180,Ge=180/Math.PI;function Xe(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ze+4/29}function He(t){return t>6/29?t*t*t:Ze*(t-4/29)}function Ke(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ye(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t){var e=Ye(t.r),n=Ye(t.g),r=Ye(t.b),i=Xe((.4124564*e+.3575761*n+.1804375*r)/.95047),o=Xe((.2126729*e+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Xe((.0193339*e+.119192*n+.9503041*r)/1.08883)),alpha:t.a}}function $e(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*He(e),n=.95047*He(n),r=1.08883*He(r),new $t(Ke(3.2404542*n-1.5371385*e-.4985314*r),Ke(-.969266*n+1.8760108*e+.041556*r),Ke(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}function Qe(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var tn={forward:Je,reverse:$e,interpolate:function(t,e,n){return{l:Ve(t.l,e.l,n),a:Ve(t.a,e.a,n),b:Ve(t.b,e.b,n),alpha:Ve(t.alpha,e.alpha,n)}}},en={forward:function(t){var e=Je(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*Ge;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*We,n=t.c;return $e({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:Qe(t.h,e.h,n),c:Ve(t.c,e.c,n),l:Ve(t.l,e.l,n),alpha:Ve(t.alpha,e.alpha,n)}}},nn=Object.freeze({__proto__:null,lab:tn,hcl:en}),rn=function(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],u=s[1];this.labels.push(s[0]),this.outputs.push(u)}};function on(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}rn.interpolationFactor=function(t,e,r,i){var o=0;if("exponential"===t.name)o=on(e,t.base,r,i);else if("linear"===t.name)o=on(e,1,r,i);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new n(a[0],a[1],a[2],a[3]).solve(on(e,1,r,i))}return o},rn.parse=function(t,e){var n=t[0],r=t[1],i=t[2],o=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var a=r[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else{if("cubic-bezier"!==r[0])return e.error("Unknown interpolation type "+String(r[0]),1,0);var s=r.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Rt)))return null;var u=[],l=null;"interpolate-hcl"===n||"interpolate-lab"===n?l=jt:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],f=c+3,d=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(u.length&&u[u.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,l);if(!m)return null;l=l||m.type,u.push([p,m])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new rn(l,n,r,i,u):e.error("Type "+Gt(l)+" is not interpolatable.")},rn.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;if(r>=e[i-1])return n[i-1].evaluate(t);var o=Ne(e,r),a=rn.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=n[o].evaluate(t),u=n[o+1].evaluate(t);return"interpolate"===this.operator?qe[this.type.kind.toLowerCase()](s,u,a):"interpolate-hcl"===this.operator?en.reverse(en.interpolate(en.forward(s),en.forward(u),a)):tn.reverse(tn.interpolate(tn.forward(s),tn.forward(u),a))},rn.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},rn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},rn.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};var an=function(t,e){this.type=t,this.args=e};an.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&"value"!==r.kind&&(n=r);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=e.parse(a[o],1+i.length,n,void 0,{typeAnnotation:"omit"});if(!s)return null;n=n||s.type,i.push(s)}var u=r&&i.some((function(t){return Ht(r,t.type)}));return new an(u?Ut:n,i)},an.prototype.evaluate=function(t){for(var e,n=null,r=0,i=0,o=this.args;i<o.length&&(r++,(n=o[i].evaluate(t))&&n instanceof ne&&!n.available&&(e||(e=n.name),n=null,r===this.args.length&&(n=e)),null===n);i+=1);return n},an.prototype.eachChild=function(t){this.args.forEach(t)},an.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},an.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var sn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};sn.prototype.evaluate=function(t){return this.result.evaluate(t)},sn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1)t(n[e][1]);t(this.result)},sn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var i=t[r];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",r);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=e.parse(t[r+1],r+1);if(!o)return null;n.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new sn(n,a):null},sn.prototype.outputDefined=function(){return this.result.outputDefined()},sn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e];t.push(r[0],r[1].serialize())}return t.push(this.result.serialize()),t};var un=function(t,e,n){this.type=t,this.index=e,this.input=n};un.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Rt),r=e.parse(t[2],2,Wt(e.expectedType||Ut));return n&&r?new un(r.type.itemType,n,r):null},un.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new ue("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new ue("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new ue("Array index must be an integer, but found "+e+" instead.");return n[e]},un.prototype.eachChild=function(t){t(this.index),t(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ln=function(t,e){this.type=Ft,this.needle=t,this.haystack=e};ln.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Ut),r=e.parse(t[2],2,Ut);return n&&r?Kt(n.type,[Ft,Bt,Rt,Lt,Ut])?new ln(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(n.type)+" instead"):null},ln.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!Yt(e,["boolean","string","number","null"]))throw new ue("Expected first argument to be of type boolean, string, number or null, but found "+Gt(oe(e))+" instead.");if(!Yt(n,["string","array"]))throw new ue("Expected second argument to be of type array or string, but found "+Gt(oe(n))+" instead.");return n.indexOf(e)>=0},ln.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},ln.prototype.outputDefined=function(){return!0},ln.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var cn=function(t,e,n){this.type=Rt,this.needle=t,this.haystack=e,this.fromIndex=n};cn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Ut),r=e.parse(t[2],2,Ut);if(!n||!r)return null;if(!Kt(n.type,[Ft,Bt,Rt,Lt,Ut]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(n.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Rt);return i?new cn(n,r,i):null}return new cn(n,r)},cn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Yt(e,["boolean","string","number","null"]))throw new ue("Expected first argument to be of type boolean, string, number or null, but found "+Gt(oe(e))+" instead.");if(!Yt(n,["string","array"]))throw new ue("Expected second argument to be of type array or string, but found "+Gt(oe(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},cn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var pn=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};pn.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return l.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return l.error("Numeric branch labels must be integer values.");if(n){if(l.checkSubtype(n,oe(h)))return null}else n=oe(h);if(void 0!==i[String(h)])return l.error("Branch labels must be unique.");i[String(h)]=o.length}var f=e.parse(u,a,r);if(!f)return null;r=r||f.type,o.push(f)}var d=e.parse(t[1],1,Ut);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,r);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(n,d.type)?null:new pn(n,r,d,i,o,m):null},pn.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(oe(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pn.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pn.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(p=r[this.cases[a]])?(r[this.cases[a]]=n.length,n.push([this.cases[a],[a]])):n[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=n;u<l.length;u+=1){var c=l[u],p=c[0],h=c[1];e.push(1===h.length?s(h[0]):h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var hn=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};hn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,Ft);if(!o)return null;var a=e.parse(t[i+1],i+1,n);if(!a)return null;r.push([o,a]),n=n||a.type}var s=e.parse(t[t.length-1],t.length-1,n);return s?new hn(n,r,s):null},hn.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],i=r[1];if(r[0].evaluate(t))return i.evaluate(t)}return this.otherwise.evaluate(t)},hn.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],i=r[1];t(r[0]),t(i)}t(this.otherwise)},hn.prototype.outputDefined=function(){return this.branches.every((function(t){return t[1].outputDefined()}))&&this.otherwise.outputDefined()},hn.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var fn=function(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r};function dn(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function mn(t,e,n,r){return 0===r.compare(e,n)}function yn(t,e,n){var r="=="!==t&&"!="!==t;return function(){function i(t,e,n){this.type=Ft,this.lhs=t,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var n=t[0],o=e.parse(t[1],1,Ut);if(!o)return null;if(!dn(n,o.type))return e.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Gt(o.type)+"'.");var a=e.parse(t[2],2,Ut);if(!a)return null;if(!dn(n,a.type))return e.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Gt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Gt(o.type)+"' and '"+Gt(a.type)+"'.");r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new ce(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new ce(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Vt)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var s=oe(o),u=oe(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new ue('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var l=oe(o),c=oe(a);if("string"!==l.kind||"string"!==c.kind)return e(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):e(i,o,a)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}fn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Ut),r=e.parse(t[2],2,Rt);if(!n||!r)return null;if(!Kt(n.type,[Wt(Ut),Bt,Ut]))return e.error("Expected first argument to be of type array or string, but found "+Gt(n.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Rt);return i?new fn(n.type,n,r,i):null}return new fn(n.type,n,r)},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Yt(e,["string","array"]))throw new ue("Expected first argument to be of type array or string, but found "+Gt(oe(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},fn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var vn=yn("==",(function(t,e,n){return e===n}),mn),gn=yn("!=",(function(t,e,n){return e!==n}),(function(t,e,n,r){return!mn(0,e,n,r)})),_n=yn("<",(function(t,e,n){return e<n}),(function(t,e,n,r){return r.compare(e,n)<0})),xn=yn(">",(function(t,e,n){return e>n}),(function(t,e,n,r){return r.compare(e,n)>0})),bn=yn("<=",(function(t,e,n){return e<=n}),(function(t,e,n,r){return r.compare(e,n)<=0})),wn=yn(">=",(function(t,e,n){return e>=n}),(function(t,e,n,r){return r.compare(e,n)>=0})),En=function(t,e,n,r,i){this.type=Bt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i};En.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,Rt);if(!n)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=e.parse(r.locale,1,Bt)))return null;var o=null;if(r.currency&&!(o=e.parse(r.currency,1,Bt)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=e.parse(r["min-fraction-digits"],1,Rt)))return null;var s=null;return r["max-fraction-digits"]&&!(s=e.parse(r["max-fraction-digits"],1,Rt))?null:new En(n,i,o,a,s)},En.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},En.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},En.prototype.outputDefined=function(){return!1},En.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Sn=function(t){this.type=Rt,this.input=t};Sn.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+Gt(n.type)+" instead."):new Sn(n):null},Sn.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ue("Expected value to be of type string or array, but found "+Gt(oe(e))+" instead.")},Sn.prototype.eachChild=function(t){t(this.input)},Sn.prototype.outputDefined=function(){return!1},Sn.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Tn={"==":vn,"!=":gn,">":xn,"<":_n,">=":wn,"<=":bn,array:ce,at:un,boolean:ce,case:hn,coalesce:an,collator:ge,format:pe,image:he,in:ln,"index-of":cn,interpolate:rn,"interpolate-hcl":rn,"interpolate-lab":rn,length:Sn,let:sn,literal:se,match:pn,number:ce,"number-format":En,object:ce,slice:fn,step:Ue,string:ce,"to-boolean":de,"to-color":de,"to-number":de,"to-string":de,var:Fe,within:De};function kn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3];n=n.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=re(n,r,i,a);if(s)throw new ue(s);return new $t(n/255*a,r/255*a,i/255*a,a)}function Pn(t,e){return t in e}function Cn(t,e){var n=e[t];return void 0===n?null:n}function In(t){return{type:t}}function zn(t){return{result:"success",value:t}}function An(t){return{result:"error",value:t}}function Mn(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function On(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Dn(t){return!!t.expression&&t.expression.interpolated}function Ln(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Rn(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Bn(t){return t}function Fn(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function jn(t,e,n,r,i){return Fn(typeof n===i?r[n]:void 0,t.default,e.default)}function Nn(t,e,n){if("number"!==Ln(n))return Fn(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=Ne(t.stops.map((function(t){return t[0]})),n);return t.stops[i][1]}function Un(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==Ln(n))return Fn(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=Ne(t.stops.map((function(t){return t[0]})),n),a=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=qe[e.type]||Bn;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=nn[t.colorSpace];l=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=u.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return l(n,r,a)}}:l(s,u,a)}function Vn(t,e,n){return"color"===e.type?n=$t.parse(n):"formatted"===e.type?n=ee.fromString(n.toString()):"resolvedImage"===e.type?n=ne.fromString(n.toString()):Ln(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Fn(n,t.default,e.default)}ve.register(Tn,{error:[{kind:"error"},[Bt],function(t,e){throw new ue(e[0].evaluate(t))}],typeof:[Bt,[Ut],function(t,e){return Gt(oe(e[0].evaluate(t)))}],"to-rgba":[Wt(Rt,4),[jt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[jt,[Rt,Rt,Rt],kn],rgba:[jt,[Rt,Rt,Rt,Rt],kn],has:{type:Ft,overloads:[[[Bt],function(t,e){return Pn(e[0].evaluate(t),t.properties())}],[[Bt,Nt],function(t,e){var n=e[1];return Pn(e[0].evaluate(t),n.evaluate(t))}]]},get:{type:Ut,overloads:[[[Bt],function(t,e){return Cn(e[0].evaluate(t),t.properties())}],[[Bt,Nt],function(t,e){var n=e[1];return Cn(e[0].evaluate(t),n.evaluate(t))}]]},"feature-state":[Ut,[Bt],function(t,e){return Cn(e[0].evaluate(t),t.featureState||{})}],properties:[Nt,[],function(t){return t.properties()}],"geometry-type":[Bt,[],function(t){return t.geometryType()}],id:[Ut,[],function(t){return t.id()}],zoom:[Rt,[],function(t){return t.globals.zoom}],"heatmap-density":[Rt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Rt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ut,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Rt,In(Rt),function(t,e){for(var n=0,r=0,i=e;r<i.length;r+=1)n+=i[r].evaluate(t);return n}],"*":[Rt,In(Rt),function(t,e){for(var n=1,r=0,i=e;r<i.length;r+=1)n*=i[r].evaluate(t);return n}],"-":{type:Rt,overloads:[[[Rt,Rt],function(t,e){var n=e[1];return e[0].evaluate(t)-n.evaluate(t)}],[[Rt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Rt,[Rt,Rt],function(t,e){var n=e[1];return e[0].evaluate(t)/n.evaluate(t)}],"%":[Rt,[Rt,Rt],function(t,e){var n=e[1];return e[0].evaluate(t)%n.evaluate(t)}],ln2:[Rt,[],function(){return Math.LN2}],pi:[Rt,[],function(){return Math.PI}],e:[Rt,[],function(){return Math.E}],"^":[Rt,[Rt,Rt],function(t,e){var n=e[1];return Math.pow(e[0].evaluate(t),n.evaluate(t))}],sqrt:[Rt,[Rt],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Rt,[Rt],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Rt,[Rt],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Rt,[Rt],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Rt,[Rt],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Rt,[Rt],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Rt,[Rt],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Rt,In(Rt),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Rt,In(Rt),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Rt,[Rt],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Rt,[Rt],function(t,e){var n=e[0].evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[Rt,[Rt],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Rt,[Rt],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Ft,[Bt,Ut],function(t,e){var n=e[0],r=e[1];return t.properties()[n.value]===r.value}],"filter-id-==":[Ft,[Ut],function(t,e){var n=e[0];return t.id()===n.value}],"filter-type-==":[Ft,[Bt],function(t,e){var n=e[0];return t.geometryType()===n.value}],"filter-<":[Ft,[Bt,Ut],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<o}],"filter-id-<":[Ft,[Ut],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<i}],"filter->":[Ft,[Bt,Ut],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[Ft,[Ut],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Ft,[Bt,Ut],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Ft,[Ut],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Ft,[Bt,Ut],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Ft,[Ut],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Ft,[Ut],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ft,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ft,[Wt(Bt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ft,[Wt(Ut)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ft,[Bt,Wt(Ut)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[Ft,[Bt,Wt(Ut)],function(t,e){var n=e[0],r=e[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var n=e[1];return e[0].evaluate(t)&&n.evaluate(t)}],[In(Ft),function(t,e){for(var n=0,r=e;n<r.length;n+=1)if(!r[n].evaluate(t))return!1;return!0}]]},any:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var n=e[1];return e[0].evaluate(t)||n.evaluate(t)}],[In(Ft),function(t,e){for(var n=0,r=e;n<r.length;n+=1)if(r[n].evaluate(t))return!0;return!1}]]},"!":[Ft,[Ft],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Ft,[Bt],function(t,e){var n=t.globals&&t.globals.isSupportedScript;return!n||n(e[0].evaluate(t))}],upcase:[Bt,[Bt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Bt,[Bt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Bt,In(Ut),function(t,e){return e.map((function(e){return ae(e.evaluate(t))})).join("")}],"resolved-locale":[Bt,[Vt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var qn=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new ye,this._defaultValue=e?function(t){return"color"===t.type&&Rn(t.default)?new $t(0,0,0,0):"color"===t.type?$t.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null};function Zn(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Tn}function Wn(t,e){var n=new je(Tn,[],e?function(t){var e={color:jt,string:Bt,number:Rt,enum:Bt,boolean:Ft,formatted:qt,resolvedImage:Zt};return"array"===t.type?Wt(e[t.value]||Ut,t.length):e[t.type]}(e):void 0),r=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?zn(new qn(r,e)):An(n.errors)}qn.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},qn.prototype.evaluate=function(t,e,n,r,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new ue("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Gn=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Re(e.expression)};Gn.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)},Gn.prototype.evaluate=function(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)};var Xn=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Re(e.expression),this.interpolationType=r};function Hn(t,e){if("error"===(t=Wn(t,e)).result)return t;var n=t.value.expression,r=Le(n);if(!r&&!Mn(e))return An([new Ot("","data expressions not supported")]);var i=Be(n,["zoom"]);if(!i&&!On(e))return An([new Ot("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof sn)n=t(e.result);else if(e instanceof an)for(var r=0,i=e.args;r<i.length&&!(n=t(i[r]));r+=1);else(e instanceof Ue||e instanceof rn)&&e.input instanceof ve&&"zoom"===e.input.name&&(n=e);return n instanceof Ot||e.eachChild((function(e){var r=t(e);r instanceof Ot?n=r:!n&&r?n=new Ot("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&r&&n!==r&&(n=new Ot("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}(n);return o||i?o instanceof Ot?An([o]):o instanceof rn&&!Dn(e)?An([new Ot("",'"interpolate" expressions cannot be used with this property')]):zn(o?new Xn(r?"camera":"composite",t.value,o.labels,o instanceof rn?o.interpolation:void 0):new Gn(r?"constant":"source",t.value)):An([new Ot("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Xn.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)},Xn.prototype.evaluate=function(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)},Xn.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?rn.interpolationFactor(this.interpolationType,t,e,n):0};var Kn=function(t,e){this._parameters=t,this._specification=e,zt(this,function t(e,n){var r,i,o,a="color"===n.type,s=e.stops&&"object"==typeof e.stops[0][0],u=s||!(s||void 0!==e.property),l=e.type||(Dn(n)?"exponential":"interval");if(a&&((e=zt({},e)).stops&&(e.stops=e.stops.map((function(t){return[t[0],$t.parse(t[1])]}))),e.default=$t.parse(e.default?e.default:n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!nn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===l)r=Un;else if("interval"===l)r=Nn;else if("categorical"===l){r=jn,i=Object.create(null);for(var c=0,p=e.stops;c<p.length;c+=1){var h=p[c];i[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');r=Vn}if(s){for(var f={},d=[],m=0;m<e.stops.length;m++){var y=e.stops[m],v=y[0].zoom;void 0===f[v]&&(f[v]={zoom:v,type:e.type,property:e.property,default:e.default,stops:[]},d.push(v)),f[v].stops.push([y[0].value,y[1]])}for(var g=[],_=0,x=d;_<x.length;_+=1){var b=x[_];g.push([f[b].zoom,t(f[b],n)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:rn.interpolationFactor.bind(void 0,w),zoomStops:g.map((function(t){return t[0]})),evaluate:function(t,r){var i=t.zoom;return Un({stops:g,base:e.base},n,i).evaluate(i,r)}}}if(u){var E="exponential"===l?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:E,interpolationFactor:rn.interpolationFactor.bind(void 0,E),zoomStops:e.stops.map((function(t){return t[0]})),evaluate:function(t){return r(e,n,t.zoom,i,o)}}}return{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Fn(e.default,n.default):r(e,n,s,i,o)}}}(this._parameters,this._specification))};function Yn(t){var e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=Ln(n);if("object"!==u)return[new Ct(e,n,"object expected, "+u+" found")];for(var l in n){var c=l.split(".")[0],p=r[c]||r["*"],h=void 0;if(i[c])h=i[c];else if(r[c])h=br;else if(i["*"])h=i["*"];else{if(!r["*"]){s.push(new Ct(e,n[l],'unknown property "'+l+'"'));continue}h=br}s=s.concat(h({key:(e?e+".":e)+l,value:n[l],valueSpec:p,style:o,styleSpec:a,object:n,objectKey:l},n))}for(var f in r)i[f]||r[f].required&&void 0===r[f].default&&void 0===n[f]&&s.push(new Ct(e,n,'missing required property "'+f+'"'));return s}function Jn(t){var e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||br;if("array"!==Ln(e))return[new Ct(o,e,"array expected, "+Ln(e)+" found")];if(n.length&&e.length!==n.length)return[new Ct(o,e,"array length "+n.length+" expected, length "+e.length+" found")];if(n["min-length"]&&e.length<n["min-length"])return[new Ct(o,e,"array length at least "+n["min-length"]+" expected, length "+e.length+" found")];var s={type:n.value,values:n.values};i.$version<7&&(s.function=n.function),"object"===Ln(n.value)&&(s=n.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:r,styleSpec:i,key:o+"["+l+"]"}));return u}function $n(t){var e=t.key,n=t.value,r=t.valueSpec,i=Ln(n);return"number"===i&&n!=n&&(i="NaN"),"number"!==i?[new Ct(e,n,"number expected, "+i+" found")]:"minimum"in r&&n<r.minimum?[new Ct(e,n,n+" is less than the minimum value "+r.minimum)]:"maximum"in r&&n>r.maximum?[new Ct(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function Qn(t){var e,n,r,i=t.valueSpec,o=At(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===Ln(t.value.stops)&&"array"===Ln(t.value.stops[0])&&"object"===Ln(t.value.stops[0][0]),c=Yn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Ct(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(Jn({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Ln(n)&&0===n.length&&e.push(new Ct(t.key,n,"array must have at least one stop")),e},default:function(t){return br({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Ct(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Ct(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Dn(t.valueSpec)&&c.push(new Ct(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!Mn(t.valueSpec)?c.push(new Ct(t.key,t.value,"property functions not supported")):s&&!On(t.valueSpec)&&c.push(new Ct(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||c.push(new Ct(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Ln(o))return[new Ct(s,o,"array expected, "+Ln(o)+" found")];if(2!==o.length)return[new Ct(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==Ln(o[0]))return[new Ct(s,o,"object expected, "+Ln(o[0])+" found")];if(void 0===o[0].zoom)return[new Ct(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Ct(s,o,"object stop key must have value")];if(r&&r>At(o[0].zoom))return[new Ct(s,o[0].zoom,"stop zoom values must appear in ascending order")];At(o[0].zoom)!==r&&(r=At(o[0].zoom),n=void 0,a={}),e=e.concat(Yn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:$n,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Zn(Mt(o[1]))?e.concat([new Ct(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(br({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,r){var s=Ln(t.value),u=At(t.value),l=null!==t.value?t.value:r;if(e){if(s!==e)return[new Ct(t.key,l,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Ct(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Mn(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ct(t.key,l,c)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==n&&u<n?[new Ct(t.key,l,"stop domain values must appear in ascending order")]:(n=u,"categorical"===o&&u in a?[new Ct(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new Ct(t.key,l,"integer expected, found "+u)]}}function tr(t){var e=("property"===t.expressionContext?Hn:Wn)(Mt(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new Ct(""+t.key+e.key,t.value,e.message)}));var n=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!n.outputDefined())return[new Ct(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Re(n))return[new Ct(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Re(n))return[new Ct(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Be(n,["zoom","feature-state"]))return[new Ct(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Le(n))return[new Ct(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function er(t){var e=t.key,n=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(At(n))&&i.push(new Ct(e,n,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(n)+" found")):-1===Object.keys(r.values).indexOf(At(n))&&i.push(new Ct(e,n,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(n)+" found")),i}function nr(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,n=t.slice(1);e<n.length;e+=1){var r=n[e];if(!nr(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}Kn.deserialize=function(t){return new Kn(t._parameters,t._specification)},Kn.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var rr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ir(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};nr(t)||(t=ar(t));var e=Wn(t,rr);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,n,r){return e.value.evaluate(t,n,{},r)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var n=1;n<e.length;n++)if(t(e[n]))return!0;return!1}(t)}}function or(t,e){return t<e?-1:t>e?1:0}function ar(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?sr(t[1],t[2],"=="):"!="===n?cr(sr(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?sr(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(ar))):"all"===n?["all"].concat(t.slice(1).map(ar)):"none"===n?["all"].concat(t.slice(1).map(ar).map(cr)):"in"===n?ur(t[1],t.slice(2)):"!in"===n?cr(ur(t[1],t.slice(2))):"has"===n?lr(t[1]):"!has"===n?cr(lr(t[1])):"within"!==n||t}function sr(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function ur(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(or)]]:["filter-in-small",t,["literal",e]]}}function lr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function cr(t){return["!",t]}function pr(t){return nr(Mt(t.value))?tr(zt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,r=e.key;if("array"!==Ln(n))return[new Ct(r,n,"array expected, "+Ln(n)+" found")];var i,o=e.styleSpec,a=[];if(n.length<1)return[new Ct(r,n,"filter array must have at least 1 element")];switch(a=a.concat(er({key:r+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),At(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===At(n[1])&&a.push(new Ct(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new Ct(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(i=Ln(n[1]))&&a.push(new Ct(r+"[1]",n[1],"string expected, "+i+" found"));for(var s=2;s<n.length;s++)i=Ln(n[s]),"$type"===At(n[1])?a=a.concat(er({key:r+"["+s+"]",value:n[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&a.push(new Ct(r+"["+s+"]",n[s],"string, number, or boolean expected, "+i+" found"));break;case"any":case"all":case"none":for(var u=1;u<n.length;u++)a=a.concat(t({key:r+"["+u+"]",value:n[u],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":i=Ln(n[1]),2!==n.length?a.push(new Ct(r,n,'filter array for "'+n[0]+'" operator must have 2 elements')):"string"!==i&&a.push(new Ct(r+"[1]",n[1],"string expected, "+i+" found"));break;case"within":i=Ln(n[1]),2!==n.length?a.push(new Ct(r,n,'filter array for "'+n[0]+'" operator must have 2 elements')):"object"!==i&&a.push(new Ct(r+"[1]",n[1],"object expected, "+i+" found"))}return a}(t)}function hr(t,e){var n=t.key,r=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return br({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});var l,c=t.valueSpec||s[a];if(!c)return[new Ct(n,o,'unknown property "'+a+'"')];if("string"===Ln(o)&&Mn(c)&&!c.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new Ct(n,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&p.push(new Ct(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Rn(Mt(o))&&"identity"===At(o.type)&&p.push(new Ct(n,o,'"text-font" does not support identity functions'))),p.concat(br({key:t.key,value:o,valueSpec:c,style:r,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function fr(t){return hr(t,"paint")}function dr(t){return hr(t,"layout")}function mr(t){var e=[],n=t.value,r=t.key,i=t.style,o=t.styleSpec;n.type||n.ref||e.push(new Ct(r,n,'either "type" or "ref" is required'));var a,s=At(n.type),u=At(n.ref);if(n.id)for(var l=At(n.id),c=0;c<t.arrayIndex;c++){var p=i.layers[c];At(p.id)===l&&e.push(new Ct(r,n.id,'duplicate layer id "'+n.id+'", previously used at line '+p.id.__line__))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach((function(t){t in n&&e.push(new Ct(r,n[t],'"'+t+'" is prohibited for ref layers'))})),i.layers.forEach((function(t){At(t.id)===u&&(a=t)})),a?a.ref?e.push(new Ct(r,n.ref,"ref cannot reference another ref layer")):s=At(a.type):e.push(new Ct(r,n.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(n.source){var h=i.sources&&i.sources[n.source],f=h&&At(h.type);h?"vector"===f&&"raster"===s?e.push(new Ct(r,n.source,'layer "'+n.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new Ct(r,n.source,'layer "'+n.id+'" requires a vector source')):"vector"!==f||n["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new Ct(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new Ct(r,n,'layer "'+n.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Ct(r,n,'layer "'+n.id+'" must specify a "source-layer"')):e.push(new Ct(r,n.source,'source "'+n.source+'" not found'))}else e.push(new Ct(r,n,'missing required property "source"'));return e=e.concat(Yn({key:r,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return br({key:r+".type",value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:pr,layout:function(t){return Yn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return dr(zt({layerType:s},t))}}})},paint:function(t){return Yn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return fr(zt({layerType:s},t))}}})}}}))}function yr(t){var e=t.value,n=t.key,r=Ln(e);return"string"!==r?[new Ct(n,e,"string expected, "+r+" found")]:[]}var vr={promoteId:function(t){var e=t.key,n=t.value;if("string"===Ln(n))return yr({key:e,value:n});var r=[];for(var i in n)r.push.apply(r,yr({key:e+"."+i,value:n[i]}));return r}};function gr(t){var e=t.value,n=t.key,r=t.styleSpec,i=t.style;if(!e.type)return[new Ct(n,e,'"type" is required')];var o,a=At(e.type);switch(a){case"vector":case"raster":case"raster-dem":return Yn({key:n,value:e,valueSpec:r["source_"+a.replace("-","_")],style:t.style,styleSpec:r,objectElementValidators:vr});case"geojson":if(o=Yn({key:n,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:vr}),e.cluster)for(var s in e.clusterProperties){var u=e.clusterProperties[s],l=u[0],c="string"==typeof l?[l,["accumulated"],["get",s]]:l;o.push.apply(o,tr({key:n+"."+s+".map",value:u[1],expressionContext:"cluster-map"})),o.push.apply(o,tr({key:n+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Yn({key:n,value:e,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return Yn({key:n,value:e,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new Ct(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return er({key:n+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function _r(t){var e=t.value,n=t.styleSpec,r=n.light,i=t.style,o=[],a=Ln(e);if(void 0===e)return o;if("object"!==a)return o.concat([new Ct("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=o.concat(u&&r[u[1]]&&r[u[1]].transition?br({key:s,value:e[s],valueSpec:n.transition,style:i,styleSpec:n}):r[s]?br({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n}):[new Ct(s,e[s],'unknown property "'+s+'"')])}return o}var xr={"*":function(){return[]},array:Jn,boolean:function(t){var e=t.value,n=t.key,r=Ln(e);return"boolean"!==r?[new Ct(n,e,"boolean expected, "+r+" found")]:[]},number:$n,color:function(t){var e=t.key,n=t.value,r=Ln(n);return"string"!==r?[new Ct(e,n,"color expected, "+r+" found")]:null===Jt(n)?[new Ct(e,n,'color expected, "'+n+'" found')]:[]},constants:It,enum:er,filter:pr,function:Qn,layer:mr,object:Yn,source:gr,light:_r,string:yr,formatted:function(t){return 0===yr(t).length?[]:tr(t)},resolvedImage:function(t){return 0===yr(t).length?[]:tr(t)}};function br(t){var e=t.value,n=t.valueSpec,r=t.styleSpec;return n.expression&&Rn(At(e))?Qn(t):n.expression&&Zn(Mt(e))?tr(t):n.type&&xr[n.type]?xr[n.type](t):Yn(zt({},t,{valueSpec:n.type?r[n.type]:n}))}function wr(t){var e=t.value,n=t.key,r=yr(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Ct(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Ct(n,e,'"glyphs" url must include a "{range}" token'))),r}function Er(t,e){void 0===e&&(e=Pt);var n=[];return n=n.concat(br({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:wr,"*":function(){return[]}}})),t.constants&&(n=n.concat(It({key:"constants",value:t.constants,style:t,styleSpec:e}))),Sr(n)}function Sr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Tr(t){return function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return Sr(t.apply(this,e))}}Er.source=Tr(gr),Er.light=Tr(_r),Er.layer=Tr(mr),Er.filter=Tr(pr),Er.paintProperty=Tr(fr),Er.layoutProperty=Tr(dr);var kr=Er,Pr=kr.light,Cr=kr.paintProperty,Ir=kr.layoutProperty;function zr(t,e){var n=!1;if(e&&e.length)for(var r=0,i=e;r<i.length;r+=1)t.fire(new Tt(new Error(i[r].message))),n=!0;return n}var Ar=Mr;function Mr(t,e,n){var r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],this.d=(e=i[1])+2*(n=i[2]);for(var o=0;o<this.d*this.d;o++){var a=i[3+o],s=i[3+o+1];r.push(a===s?null:i.subarray(a,s))}var u=i[3+r.length+1];this.keys=i.subarray(i[3+r.length],u),this.bboxes=i.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var l=0;l<this.d*this.d;l++)r.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var c=n/e*t;this.min=-c,this.max=t+c}Mr.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Mr.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Mr.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},Mr.prototype.query=function(t,e,n,r,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,n,r,this._queryCell,s,{},i),s},Mr.prototype._queryCell=function(t,e,n,r,i,o,a,s){var u=this.cells[i];if(null!==u)for(var l=this.keys,c=this.bboxes,p=0;p<u.length;p++){var h=u[p];if(void 0===a[h]){var f=4*h;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&n>=c[f+0]&&r>=c[f+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},Mr.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),p=this._convertToCellCoord(r),h=u;h<=c;h++)for(var f=l;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&i.call(this,t,e,n,r,d,o,a,s))return}},Mr.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Mr.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Mr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,n=0,r=0;r<this.cells.length;r++)n+=this.cells[r].length;var i=new Int32Array(e+n+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];i[3+a]=o,i.set(s,o),o+=s.length}return i[3+t.length]=o,i.set(this.keys,o),i[3+t.length+1]=o+=this.keys.length,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var Or=a.ImageData,Dr=a.ImageBitmap,Lr={};function Rr(t,e,n){void 0===n&&(n={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Lr[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}for(var Br in Rr("Object",Object),Ar.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),{buffer:n}},Ar.deserialize=function(t){return new Ar(t.buffer)},Rr("Grid",Ar),Rr("Color",$t),Rr("Error",Error),Rr("ResolvedImage",ne),Rr("StylePropertyFunction",Kn),Rr("StyleExpression",qn,{omit:["_evaluator"]}),Rr("ZoomDependentExpression",Xn),Rr("ZoomConstantExpression",Gn),Rr("CompoundExpression",ve,{omit:["_evaluate"]}),Tn)Tn[Br]._classRegistryKey||Rr("Expression_"+Br,Tn[Br]);function Fr(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function jr(t){return Dr&&t instanceof Dr}function Nr(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Fr(t)||jr(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var n=t;return e&&e.push(n.buffer),n}if(t instanceof Or)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var r=[],i=0,o=t;i<o.length;i+=1)r.push(Nr(o[i],e));return r}if("object"==typeof t){var a=t.constructor,s=a._classRegistryKey;if(!s)throw new Error("can't serialize object of unregistered class");var u=a.serialize?a.serialize(t,e):{};if(!a.serialize){for(var l in t)if(t.hasOwnProperty(l)&&!(Lr[s].omit.indexOf(l)>=0)){var c=t[l];u[l]=Lr[s].shallow.indexOf(l)>=0?c:Nr(c,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(u.$name=s),u}throw new Error("can't serialize object of type "+typeof t)}function Ur(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Fr(t)||jr(t)||ArrayBuffer.isView(t)||t instanceof Or)return t;if(Array.isArray(t))return t.map(Ur);if("object"==typeof t){var e=t.$name||"Object",n=Lr[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(t);for(var r=Object.create(n.prototype),i=0,o=Object.keys(t);i<o.length;i+=1){var a=o[i];if("$name"!==a){var s=t[a];r[a]=Lr[e].shallow.indexOf(a)>=0?s:Ur(s)}}return r}throw new Error("can't deserialize object of type "+typeof t)}var Vr=function(){this.first=!0};Vr.prototype.update=function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))};var qr={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function Zr(t){for(var e=0,n=t;e<n.length;e+=1)if(Wr(n[e].charCodeAt(0)))return!0;return!1}function Wr(t){return!(746!==t&&747!==t&&(t<4352||!(qr["Bopomofo Extended"](t)||qr.Bopomofo(t)||qr["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||qr["CJK Compatibility Ideographs"](t)||qr["CJK Compatibility"](t)||qr["CJK Radicals Supplement"](t)||qr["CJK Strokes"](t)||!(!qr["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||qr["CJK Unified Ideographs Extension A"](t)||qr["CJK Unified Ideographs"](t)||qr["Enclosed CJK Letters and Months"](t)||qr["Hangul Compatibility Jamo"](t)||qr["Hangul Jamo Extended-A"](t)||qr["Hangul Jamo Extended-B"](t)||qr["Hangul Jamo"](t)||qr["Hangul Syllables"](t)||qr.Hiragana(t)||qr["Ideographic Description Characters"](t)||qr.Kanbun(t)||qr["Kangxi Radicals"](t)||qr["Katakana Phonetic Extensions"](t)||qr.Katakana(t)&&12540!==t||!(!qr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!qr["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||qr["Unified Canadian Aboriginal Syllabics"](t)||qr["Unified Canadian Aboriginal Syllabics Extended"](t)||qr["Vertical Forms"](t)||qr["Yijing Hexagram Symbols"](t)||qr["Yi Syllables"](t)||qr["Yi Radicals"](t))))}function Gr(t){return!(Wr(t)||function(t){return!!(qr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||qr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||qr["Letterlike Symbols"](t)||qr["Number Forms"](t)||qr["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||qr["Control Pictures"](t)&&9251!==t||qr["Optical Character Recognition"](t)||qr["Enclosed Alphanumerics"](t)||qr["Geometric Shapes"](t)||qr["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||qr["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||qr["CJK Symbols and Punctuation"](t)||qr.Katakana(t)||qr["Private Use Area"](t)||qr["CJK Compatibility Forms"](t)||qr["Small Form Variants"](t)||qr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Xr(t){return t>=1424&&t<=2303||qr["Arabic Presentation Forms-A"](t)||qr["Arabic Presentation Forms-B"](t)}function Hr(t,e){return!(!e&&Xr(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||qr.Khmer(t))}function Kr(t){for(var e=0,n=t;e<n.length;e+=1)if(Xr(n[e].charCodeAt(0)))return!0;return!1}var Yr=null,Jr="unavailable",$r=null,Qr=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Jr="error"),Yr&&Yr(t)};function ti(){ei.fire(new St("pluginStateChange",{pluginStatus:Jr,pluginURL:$r}))}var ei=new kt,ni=function(){return Jr},ri=function(){if("deferred"!==Jr||!$r)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Jr="loading",ti(),$r&&xt({url:$r},(function(t){t?Qr(t):(Jr="loaded",ti())}))},ii={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Jr||null!=ii.applyArabicShaping},isLoading:function(){return"loading"===Jr},setState:function(t){Jr=t.pluginStatus,$r=t.pluginURL},isParsed:function(){return null!=ii.applyArabicShaping&&null!=ii.processBidirectionalText&&null!=ii.processStyledBidirectionalText},getPluginURL:function(){return $r}},oi=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Vr,this.transition={})};oi.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,r=t;n<r.length;n+=1)if(!Hr(r[n].charCodeAt(0),e))return!1;return!0}(t,ii.isLoaded())},oi.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},oi.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),n=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var ai=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Rn(t))return new Kn(t,e);if(Zn(t)){var n=Hn(t,e);if("error"===n.result)throw new Error(n.value.map((function(t){return t.key+": "+t.message})).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=$t.parse(t)),{kind:"constant",evaluate:function(){return r}}}(void 0===e?t.specification.default:e,t.specification)};ai.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ai.prototype.possiblyEvaluate=function(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)};var si=function(t){this.property=t,this.value=new ai(t,void 0)};si.prototype.transitioned=function(t,e){return new li(this.property,this.value,e,h({},t.transition,this.transition),t.now)},si.prototype.untransitioned=function(){return new li(this.property,this.value,null,{},0)};var ui=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};ui.prototype.getValue=function(t){return b(this._values[t].value.value)},ui.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new si(this._values[t].property)),this._values[t].value=new ai(this._values[t].property,null===e?void 0:b(e))},ui.prototype.getTransition=function(t){return b(this._values[t].transition)},ui.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new si(this._values[t].property)),this._values[t].transition=b(e)||void 0},ui.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i);var o=this.getTransition(r);void 0!==o&&(t[r+"-transition"]=o)}return t},ui.prototype.transitioned=function(t,e){for(var n=new ci(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var o=i[r];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n},ui.prototype.untransitioned=function(){for(var t=new ci(this._properties),e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e];t._values[r]=this._values[r].untransitioned()}return t};var li=function(t,e,n,r,i){this.property=t,this.value=e,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=n)};li.prototype.possiblyEvaluate=function(t,e,n){var r=t.now||0,i=this.value.possiblyEvaluate(t,e,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r<this.begin)return o.possiblyEvaluate(t,e,n);var a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,n),i,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(a))}return i};var ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};ci.prototype.possiblyEvaluate=function(t,e,n){for(var r=new fi(this._properties),i=0,o=Object.keys(this._values);i<o.length;i+=1){var a=o[i];r._values[a]=this._values[a].possiblyEvaluate(t,e,n)}return r},ci.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1)if(this._values[e[t]].prior)return!0;return!1};var pi=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};pi.prototype.getValue=function(t){return b(this._values[t].value)},pi.prototype.setValue=function(t,e){this._values[t]=new ai(this._values[t].property,null===e?void 0:b(e))},pi.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i)}return t},pi.prototype.possiblyEvaluate=function(t,e,n){for(var r=new fi(this._properties),i=0,o=Object.keys(this._values);i<o.length;i+=1){var a=o[i];r._values[a]=this._values[a].possiblyEvaluate(t,e,n)}return r};var hi=function(t,e,n){this.property=t,this.value=e,this.parameters=n};hi.prototype.isConstant=function(){return"constant"===this.value.kind},hi.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},hi.prototype.evaluate=function(t,e,n,r){return this.property.evaluate(this.value,this.parameters,t,e,n,r)};var fi=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};fi.prototype.get=function(t){return this._values[t]};var di=function(t){this.specification=t};di.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},di.prototype.interpolate=function(t,e,n){var r=qe[this.specification.type];return r?r(t,e,n):t};var mi=function(t,e){this.specification=t,this.overrides=e};mi.prototype.possiblyEvaluate=function(t,e,n,r){return new hi(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},n,r)}:t.expression,e)},mi.prototype.interpolate=function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new hi(this,{kind:"constant",value:void 0},t.parameters);var r=qe[this.specification.type];return r?new hi(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.parameters):t},mi.prototype.evaluate=function(t,e,n,r,i,o){return"constant"===t.kind?t.value:t.evaluate(e,n,r,i,o)};var yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(t,e,n,r){if(void 0===t.value)return new hi(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},n,r),o="resolvedImage"===t.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,e);return new hi(this,{kind:"constant",value:a},e)}if("camera"===t.expression.kind){var s=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new hi(this,{kind:"constant",value:s},e)}return new hi(this,t.expression,e)},e.prototype.evaluate=function(t,e,n,r,i,o){if("source"===t.kind){var a=t.evaluate(e,n,r,i,o);return this._calculate(a,a,a,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},n,r),t.evaluate({zoom:Math.floor(e.zoom)},n,r),t.evaluate({zoom:Math.floor(e.zoom)+1},n,r),e):t.value},e.prototype._calculate=function(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},e.prototype.interpolate=function(t){return t},e}(mi),vi=function(t){this.specification=t};vi.prototype.possiblyEvaluate=function(t,e,n,r){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},n,r);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new oi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new oi(Math.floor(e.zoom),e)),t.expression.evaluate(new oi(Math.floor(e.zoom+1),e)),e)}},vi.prototype._calculate=function(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},vi.prototype.interpolate=function(t){return t};var gi=function(t){this.specification=t};gi.prototype.possiblyEvaluate=function(t,e,n,r){return!!t.expression.evaluate(e,null,{},n,r)},gi.prototype.interpolate=function(){return!1};var _i=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var n=t[e];n.specification.overridable&&this.overridableProperties.push(e);var r=this.defaultPropertyValues[e]=new ai(n,void 0),i=this.defaultTransitionablePropertyValues[e]=new si(n);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}};Rr("DataDrivenProperty",mi),Rr("DataConstantProperty",di),Rr("CrossFadedDataDrivenProperty",yi),Rr("CrossFadedProperty",vi),Rr("ColorRampProperty",gi);var xi=function(t){function e(e,n){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),n.layout&&(this._unevaluatedLayout=new pi(n.layout)),n.paint)){for(var r in this._transitionablePaint=new ui(n.paint),e.paint)this.setPaintProperty(r,e.paint[r],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new fi(n.paint)}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,n){void 0===n&&(n={}
2),null!=e&&this._validate(Ir,"layers."+this.id+".layout."+t,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return g(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,n){if(void 0===n&&(n={}),null!=e&&this._validate(Cr,"layers."+this.id+".paint."+t,t,e,n))return!1;if(g(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var r=this._transitionablePaint._values[t],i="cross-faded-data-driven"===r.property.specification["property-type"],o=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(t,a,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,n){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}
vendor: 112,899 bytes, line 2
2,e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,n,r,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&zr(this,t.call(kr,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:Pt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof hi&&Mn(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(kt),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},wi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ei=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Si(t,e){void 0===e&&(e=1);var n=0,r=0;return{members:t.map((function(t){var i=bi[t.type].BYTES_PER_ELEMENT,o=n=Ti(n,Math.max(e,i)),a=t.components||1;return r=Math.max(r,i),n+=i*a,{name:t.name,type:t.type,components:a,offset:o}})),size:Ti(n,Math.max(r,e)),alignment:e}}function Ti(t,e){return Math.ceil(t/e)*e}Ei.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Ei.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Ei.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ei.prototype.clear=function(){this.length=0},Ei.prototype.resize=function(t){this.reserve(t),this.length=t},Ei.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Ei.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.int16[r+0]=e,this.int16[r+1]=n,t},e}(Ei);ki.prototype.bytesPerElement=4,Rr("StructArrayLayout2i4",ki);var Pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,t},e}(Ei);Pi.prototype.bytesPerElement=8,Rr("StructArrayLayout4i8",Pi);var Ci=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Ei);Ci.prototype.bytesPerElement=12,Rr("StructArrayLayout2i4i12",Ci);var Ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=4*t,u=8*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.uint8[u+4]=r,this.uint8[u+5]=i,this.uint8[u+6]=o,this.uint8[u+7]=a,t},e}(Ei);Ii.prototype.bytesPerElement=8,Rr("StructArrayLayout2i4ub8",Ii);var zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.float32[r+0]=e,this.float32[r+1]=n,t},e}(Ei);zi.prototype.bytesPerElement=8,Rr("StructArrayLayout2f8",zi);var Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,n,r,i,o,a,s,u,l)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,u,l,c){var p=10*t;return this.uint16[p+0]=e,this.uint16[p+1]=n,this.uint16[p+2]=r,this.uint16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=u,this.uint16[p+8]=l,this.uint16[p+9]=c,t},e}(Ei);Ai.prototype.bytesPerElement=20,Rr("StructArrayLayout10ui20",Ai);var Mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,n,r,i,o,a,s,u,l,c,p)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,u,l,c,p,h){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=u,this.int16[f+8]=l,this.int16[f+9]=c,this.int16[f+10]=p,this.int16[f+11]=h,t},e}(Ei);Mi.prototype.bytesPerElement=24,Rr("StructArrayLayout4i4ui4i24",Mi);var Oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=n,this.float32[i+2]=r,t},e}(Ei);Oi.prototype.bytesPerElement=12,Rr("StructArrayLayout3f12",Oi);var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},e}(Ei);Di.prototype.bytesPerElement=4,Rr("StructArrayLayout1ul4",Di);var Li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,r,i,o,a,s,u)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,u,l){var c=10*t,p=5*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=u,this.uint16[c+9]=l,t},e}(Ei);Li.prototype.bytesPerElement=20,Rr("StructArrayLayout6i1ul2ui20",Li);var Ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Ei);Ri.prototype.bytesPerElement=12,Rr("StructArrayLayout2i2i2i12",Ri);var Bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,r,i)},e.prototype.emplace=function(t,e,n,r,i,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,t},e}(Ei);Bi.prototype.bytesPerElement=16,Rr("StructArrayLayout2f1f2i16",Bi);var Fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,t},e}(Ei);Fi.prototype.bytesPerElement=12,Rr("StructArrayLayout2ub2f12",Fi);var ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,this.uint16[i+2]=r,t},e}(Ei);ji.prototype.bytesPerElement=6,Rr("StructArrayLayout3ui6",ji);var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y,v){var g=24*t,_=12*t,x=48*t;return this.int16[g+0]=e,this.int16[g+1]=n,this.uint16[g+2]=r,this.uint16[g+3]=i,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[g+10]=u,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[_+7]=p,this.float32[_+8]=h,this.uint8[x+36]=f,this.uint8[x+37]=d,this.uint8[x+38]=m,this.uint32[_+10]=y,this.int16[g+22]=v,t},e}(Ei);Ni.prototype.bytesPerElement=48,Rr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ni);var Ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y,v,g,_,x,b,w,E,S,T,k,P){var C=this.length;return this.resize(C+1),this.emplace(C,t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y,v,g,_,x,b,w,E,S,T,k,P)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y,v,g,_,x,b,w,E,S,T,k,P,C){var I=34*t,z=17*t;return this.int16[I+0]=e,this.int16[I+1]=n,this.int16[I+2]=r,this.int16[I+3]=i,this.int16[I+4]=o,this.int16[I+5]=a,this.int16[I+6]=s,this.int16[I+7]=u,this.uint16[I+8]=l,this.uint16[I+9]=c,this.uint16[I+10]=p,this.uint16[I+11]=h,this.uint16[I+12]=f,this.uint16[I+13]=d,this.uint16[I+14]=m,this.uint16[I+15]=y,this.uint16[I+16]=v,this.uint16[I+17]=g,this.uint16[I+18]=_,this.uint16[I+19]=x,this.uint16[I+20]=b,this.uint16[I+21]=w,this.uint16[I+22]=E,this.uint32[z+12]=S,this.float32[z+13]=T,this.float32[z+14]=k,this.float32[z+15]=P,this.float32[z+16]=C,t},e}(Ei);Ui.prototype.bytesPerElement=68,Rr("StructArrayLayout8i15ui1ul4f68",Ui);var Vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},e}(Ei);Vi.prototype.bytesPerElement=4,Rr("StructArrayLayout1f4",Vi);var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=n,this.int16[i+2]=r,t},e}(Ei);qi.prototype.bytesPerElement=6,Rr("StructArrayLayout3i6",qi);var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=n,this.uint16[i+3]=r,t},e}(Ei);Zi.prototype.bytesPerElement=8,Rr("StructArrayLayout1ul2ui8",Zi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,t},e}(Ei);Wi.prototype.bytesPerElement=4,Rr("StructArrayLayout2ui4",Wi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},e}(Ei);Gi.prototype.bytesPerElement=2,Rr("StructArrayLayout1ui2",Gi);var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,t},e}(Ei);Xi.prototype.bytesPerElement=16,Rr("StructArrayLayout4f16",Xi);var Hi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(wi);Hi.prototype.size=20;var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Hi(this,t)},e}(Li);Rr("CollisionBoxArray",Ki);var Yi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(wi);Yi.prototype.size=48;var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Yi(this,t)},e}(Ni);Rr("PlacedSymbolArray",Ji);var $i=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(wi);$i.prototype.size=68;var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new $i(this,t)},e}(Ui);Rr("SymbolInstanceArray",Qi);var to=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Vi);Rr("GlyphOffsetArray",to);var eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(qi);Rr("SymbolLineVertexArray",eo);var no=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(wi);no.prototype.size=8;var ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new no(this,t)},e}(Zi);Rr("FeatureIndexArray",ro);var io=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,oo=function(t){void 0===t&&(t=[]),this.segments=t};function ao(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}oo.prototype.prepareSegment=function(t,e,n,r){var i=this.segments[this.segments.length-1];return t>oo.MAX_VERTEX_ARRAY_LENGTH&&E("Max vertices per segment is "+oo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>oo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i},oo.prototype.get=function(){return this.segments},oo.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var n=e[t];for(var r in n.vaos)n.vaos[r].destroy()}},oo.simpleSegment=function(t,e,n,r){return new oo([{vertexOffset:t,primitiveOffset:e,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])},oo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Rr("SegmentVector",oo);var so=Si([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),uo=e((function(t){t.exports=function(t,e){var n,r,i,o,a,s,u,l;for(r=t.length-(n=3&t.length),i=e,a=3432918353,s=461845907,l=0;l<r;)u=255&t.charCodeAt(l)|(255&t.charCodeAt(++l))<<8|(255&t.charCodeAt(++l))<<16|(255&t.charCodeAt(++l))<<24,++l,i=27492+(65535&(o=5*(65535&(i=(i^=u=(65535&(u=(u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&t.charCodeAt(l+2))<<16;case 2:u^=(255&t.charCodeAt(l+1))<<8;case 1:i^=u=(65535&(u=(u=(65535&(u^=255&t.charCodeAt(l)))*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),lo=e((function(t){t.exports=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),co=uo,po=lo;co.murmur3=uo,co.murmur2=po;var ho=function(){this.ids=[],this.positions=[],this.indexed=!1};ho.prototype.add=function(t,e,n,r){this.ids.push(mo(t)),this.positions.push(e,n,r)},ho.prototype.getPositions=function(t){for(var e=mo(t),n=0,r=this.ids.length-1;n<r;){var i=n+r>>1;this.ids[i]>=e?r=i:n=i+1}for(var o=[];this.ids[n]===e;)o.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return o},ho.serialize=function(t,e){var n=new Float64Array(t.ids),r=new Uint32Array(t.positions);return function t(e,n,r,i){for(;r<i;){for(var o=e[r+i>>1],a=r-1,s=i+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;yo(e,a,s),yo(n,3*a,3*s),yo(n,3*a+1,3*s+1),yo(n,3*a+2,3*s+2)}s-r<i-s?(t(e,n,r,s),r=s+1):(t(e,n,s+1,i),i=s)}}(n,r,0,n.length-1),e&&e.push(n.buffer,r.buffer),{ids:n,positions:r}},ho.deserialize=function(t){var e=new ho;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var fo=Math.pow(2,53)-1;function mo(t){var e=+t;return!isNaN(e)&&e<=fo?e:co(String(t))}function yo(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}Rr("FeaturePositionMap",ho);var vo=function(t,e){this.gl=t.gl,this.location=e},go=function(t){function e(e,n){t.call(this,e,n),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(vo),_o=function(t){function e(e,n){t.call(this,e,n),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(vo),xo=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(vo),bo=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(vo),wo=function(t){function e(e,n){t.call(this,e,n),this.current=[0,0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(vo),Eo=function(t){function e(e,n){t.call(this,e,n),this.current=$t.transparent}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(vo),So=new Float32Array(16),To=function(t){function e(e,n){t.call(this,e,n),this.current=So}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(vo);function ko(t){return[ao(255*t.r,255*t.g),ao(255*t.b,255*t.a)]}var Po=function(t,e,n){this.value=t,this.uniformNames=e.map((function(t){return"u_"+t})),this.type=n};Po.prototype.setUniform=function(t,e,n){t.set(n.constantOr(this.value))},Po.prototype.getBinding=function(t,e,n){return"color"===this.type?new Eo(t,e):new _o(t,e)};var Co=function(t,e){this.uniformNames=e.map((function(t){return"u_"+t})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Co.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},Co.prototype.setUniform=function(t,e,n,r){var i="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;i&&t.set(i)},Co.prototype.getBinding=function(t,e,n){return"u_pattern"===n.substr(0,9)?new wo(t,e):new _o(t,e)};var Io=function(t,e,n,r){this.expression=t,this.type=n,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===n?2:1,offset:0}})),this.paintVertexArray=new r};Io.prototype.populatePaintArray=function(t,e,n,r,i){var o=this.paintVertexArray.length,a=this.expression.evaluate(new oi(0),e,{},r,[],i);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)},Io.prototype.updatePaintArray=function(t,e,n,r){var i=this.expression.evaluate({zoom:0},n,r);this._setPaintValue(t,e,i)},Io.prototype._setPaintValue=function(t,e,n){if("color"===this.type)for(var r=ko(n),i=t;i<e;i++)this.paintVertexArray.emplace(i,r[0],r[1]);else{for(var o=t;o<e;o++)this.paintVertexArray.emplace(o,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}},Io.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Io.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var zo=function(t,e,n,r,i,o){this.expression=t,this.uniformNames=e.map((function(t){return"u_"+t+"_t"})),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===n?4:2,offset:0}})),this.paintVertexArray=new o};zo.prototype.populatePaintArray=function(t,e,n,r,i){var o=this.expression.evaluate(new oi(this.zoom),e,{},r,[],i),a=this.expression.evaluate(new oi(this.zoom+1),e,{},r,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)},zo.prototype.updatePaintArray=function(t,e,n,r){var i=this.expression.evaluate({zoom:this.zoom},n,r),o=this.expression.evaluate({zoom:this.zoom+1},n,r);this._setPaintValue(t,e,i,o)},zo.prototype._setPaintValue=function(t,e,n,r){if("color"===this.type)for(var i=ko(n),o=ko(r),a=t;a<e;a++)this.paintVertexArray.emplace(a,i[0],i[1],o[0],o[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,n,r);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(r))}},zo.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},zo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},zo.prototype.setUniform=function(t,e){var n=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,r=c(this.expression.interpolationFactor(n,this.zoom,this.zoom+1),0,1);t.set(r)},zo.prototype.getBinding=function(t,e,n){return new _o(t,e)};var Ao=function(t,e,n,r,i,o){this.expression=t,this.type=e,this.useIntegerZoom=n,this.zoom=r,this.layerId=o,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i};Ao.prototype.populatePaintArray=function(t,e,n){var r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(r,t,e.patterns&&e.patterns[this.layerId],n)},Ao.prototype.updatePaintArray=function(t,e,n,r,i){this._setPaintValues(t,e,n.patterns&&n.patterns[this.layerId],i)},Ao.prototype._setPaintValues=function(t,e,n,r){if(r&&n){var i=r[n.min],o=r[n.mid],a=r[n.max];if(i&&o&&a)for(var s=t;s<e;s++)this.zoomInPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],i.tl[0],i.tl[1],i.br[0],i.br[1],o.pixelRatio,i.pixelRatio),this.zoomOutPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],a.tl[0],a.tl[1],a.br[0],a.br[1],o.pixelRatio,a.pixelRatio)}},Ao.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,so.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,so.members,this.expression.isStateDependent))},Ao.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Mo=function(t,e,n){this.binders={},this._buffers=[];var r=[];for(var i in t.paint._values)if(n(i)){var o=t.paint.get(i);if(o instanceof hi&&Mn(o.property.specification)){var a=Do(i,t.type),s=o.value,u=o.property.specification.type,l=o.property.useIntegerZoom,c=o.property.specification["property-type"],p="cross-faded"===c||"cross-faded-data-driven"===c;if("constant"===s.kind)this.binders[i]=p?new Co(s.value,a):new Po(s.value,a,u),r.push("/u_"+i);else if("source"===s.kind||p){var h=Lo(i,u,"source");this.binders[i]=p?new Ao(s,u,l,e,h,t.id):new Io(s,a,u,h),r.push("/a_"+i)}else{var f=Lo(i,u,"composite");this.binders[i]=new zo(s,a,u,l,e,f),r.push("/z_"+i)}}}this.cacheKey=r.sort().join("")};Mo.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof Io||e instanceof zo?e.maxValue:0},Mo.prototype.populatePaintArrays=function(t,e,n,r,i){for(var o in this.binders){var a=this.binders[o];(a instanceof Io||a instanceof zo||a instanceof Ao)&&a.populatePaintArray(t,e,n,r,i)}},Mo.prototype.setConstantPatternPositions=function(t,e){for(var n in this.binders){var r=this.binders[n];r instanceof Co&&r.setConstantPatternPositions(t,e)}},Mo.prototype.updatePaintArrays=function(t,e,n,r,i){var o=!1;for(var a in t)for(var s=0,u=e.getPositions(a);s<u.length;s+=1){var l=u[s],c=n.feature(l.index);for(var p in this.binders){var h=this.binders[p];if((h instanceof Io||h instanceof zo||h instanceof Ao)&&!0===h.expression.isStateDependent){var f=r.paint.get(p);h.expression=f.value,h.updatePaintArray(l.start,l.end,c,t[a],i),o=!0}}}return o},Mo.prototype.defines=function(){var t=[];for(var e in this.binders){var n=this.binders[e];(n instanceof Po||n instanceof Co)&&t.push.apply(t,n.uniformNames.map((function(t){return"#define HAS_UNIFORM_"+t})))}return t},Mo.prototype.getBinderAttributes=function(){var t=[];for(var e in this.binders){var n=this.binders[e];if(n instanceof Io||n instanceof zo)for(var r=0;r<n.paintVertexAttributes.length;r++)t.push(n.paintVertexAttributes[r].name);else if(n instanceof Ao)for(var i=0;i<so.members.length;i++)t.push(so.members[i].name)}return t},Mo.prototype.getBinderUniforms=function(){var t=[];for(var e in this.binders){var n=this.binders[e];if(n instanceof Po||n instanceof Co||n instanceof zo)for(var r=0,i=n.uniformNames;r<i.length;r+=1)t.push(i[r])}return t},Mo.prototype.getPaintVertexBuffers=function(){return this._buffers},Mo.prototype.getUniforms=function(t,e){var n=[];for(var r in this.binders){var i=this.binders[r];if(i instanceof Po||i instanceof Co||i instanceof zo)for(var o=0,a=i.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var u=i.getBinding(t,e[s],s);n.push({name:s,property:r,binding:u})}}}return n},Mo.prototype.setUniforms=function(t,e,n,r){for(var i=0,o=e;i<o.length;i+=1){var a=o[i],s=a.name,u=a.property;this.binders[u].setUniform(a.binding,r,n.get(u),s)}},Mo.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var n=this.binders[e];if(t&&n instanceof Ao){var r=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;r&&this._buffers.push(r)}else(n instanceof Io||n instanceof zo)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}},Mo.prototype.upload=function(t){for(var e in this.binders){var n=this.binders[e];(n instanceof Io||n instanceof zo||n instanceof Ao)&&n.upload(t)}this.updatePaintBuffers()},Mo.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof Io||e instanceof zo||e instanceof Ao)&&e.destroy()}};var Oo=function(t,e,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var r=0,i=t;r<i.length;r+=1){var o=i[r];this.programConfigurations[o.id]=new Mo(o,e,n)}this.needsUpload=!1,this._featureMap=new ho,this._bufferOffset=0};function Do(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Lo(t,e,n){var r={color:{source:zi,composite:Xi},number:{source:Vi,composite:zi}},i=function(t){return{"line-pattern":{source:Ai,composite:Ai},"fill-pattern":{source:Ai,composite:Ai},"fill-extrusion-pattern":{source:Ai,composite:Ai}}[t]}(t);return i&&i[n]||r[e][n]}Oo.prototype.populatePaintArrays=function(t,e,n,r,i,o){for(var a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(t,e,r,i,o);void 0!==e.id&&this._featureMap.add(e.id,n,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},Oo.prototype.updatePaintArrays=function(t,e,n,r){for(var i=0,o=n;i<o.length;i+=1){var a=o[i];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,this._featureMap,e,a,r)||this.needsUpload}},Oo.prototype.get=function(t){return this.programConfigurations[t]},Oo.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Oo.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Rr("ConstantBinder",Po),Rr("CrossFadedConstantBinder",Co),Rr("SourceExpressionBinder",Io),Rr("CrossFadedCompositeBinder",Ao),Rr("CompositeExpressionBinder",zo),Rr("ProgramConfiguration",Mo,{omit:["_buffers"]}),Rr("ProgramConfigurationSet",Oo);var Ro=Math.pow(2,14)-1,Bo=-Ro-1;function Fo(t){for(var e=8192/t.extent,n=t.loadGeometry(),r=0;r<n.length;r++)for(var i=n[r],o=0;o<i.length;o++){var a=i[o],s=Math.round(a.x*e),u=Math.round(a.y*e);a.x=c(s,Bo,Ro),a.y=c(u,Bo,Ro),(s<a.x||s>a.x+1||u<a.y||u>a.y+1)&&E("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function jo(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var No=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new ki,this.indexArray=new ji,this.segments=new oo,this.programConfigurations=new Oo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Uo(t,e){for(var n=0;n<t.length;n++)if(Yo(e,t[n]))return!0;for(var r=0;r<e.length;r++)if(Yo(t,e[r]))return!0;return!!Wo(t,e)}function Vo(t,e,n){return!!Yo(t,e)||!!Xo(e,t,n)}function qo(t,e){if(1===t.length)return Ko(e,t[0]);for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;i++)if(Yo(t,r[i]))return!0;for(var o=0;o<t.length;o++)if(Ko(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(Wo(t,e[a]))return!0;return!1}function Zo(t,e,n){if(t.length>1){if(Wo(t,e))return!0;for(var r=0;r<e.length;r++)if(Xo(e[r],t,n))return!0}for(var i=0;i<t.length;i++)if(Xo(t[i],e,n))return!0;return!1}function Wo(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var r=t[n],i=t[n+1],o=0;o<e.length-1;o++)if(Go(r,i,e[o],e[o+1]))return!0;return!1}function Go(t,e,n,r){return S(t,n,r)!==S(e,n,r)&&S(t,e,n)!==S(t,e,r)}function Xo(t,e,n){var r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(var i=1;i<e.length;i++)if(Ho(t,e[i-1],e[i])<r)return!0;return!1}function Ho(t,e,n){var r=e.distSqr(n);if(0===r)return t.distSqr(e);var i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return t.distSqr(i<0?e:i>1?n:n.sub(e)._mult(i)._add(e))}function Ko(t,e){for(var n,r,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(n=t[a]).length-1;s<n.length;u=s++)(r=n[s]).y>e.y!=(i=n[u]).y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function Yo(t,e){for(var n=!1,r=0,i=t.length-1;r<t.length;i=r++){var o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function Jo(t,e,n){var r=n[0],i=n[2];if(t.x<r.x&&e.x<r.x||t.x>i.x&&e.x>i.x||t.y<r.y&&e.y<r.y||t.y>i.y&&e.y>i.y)return!1;var o=S(t,e,n[0]);return o!==S(t,e,n[1])||o!==S(t,e,n[2])||o!==S(t,e,n[3])}function $o(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).getMaxValue(t)}function Qo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ta(t,e,n,r,o){if(!e[0]&&!e[1])return t;var a=i.convert(e)._mult(o);"viewport"===n&&a._rotate(-r);for(var s=[],u=0;u<t.length;u++)s.push(t[u].sub(a));return s}No.prototype.populate=function(t,e,n){var r=this.layers[0],i=[],o=null;"circle"===r.type&&(o=r.layout.get("circle-sort-key"));for(var a=0,s=t;a<s.length;a+=1){var u=s[a],l=u.feature,c=u.id,p=u.index,h=u.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,d={type:l.type,id:c,properties:l.properties,geometry:f?Fo(l):[]};if(this.layers[0]._featureFilter.filter(new oi(this.zoom),d,n)){f||(d.geometry=Fo(l));var m=o?o.evaluate(d,{},n):void 0;i.push({id:c,properties:l.properties,type:l.type,sourceLayerIndex:h,index:p,geometry:d.geometry,patterns:{},sortKey:m})}}o&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var y=0,v=i;y<v.length;y+=1){var g=v[y],_=g.geometry,x=g.index,b=g.sourceLayerIndex,w=t[x].feature;this.addFeature(g,_,x,n),e.featureIndex.insert(w,_,x,b,this.index)}},No.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},No.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},No.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},No.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,io),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},No.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},No.prototype.addFeature=function(t,e,n,r){for(var i=0,o=e;i<o.length;i+=1)for(var a=0,s=o[i];a<s.length;a+=1){var u=s[a],l=u.x,c=u.y;if(!(l<0||l>=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;jo(this.layoutVertexArray,l,c,-1,-1),jo(this.layoutVertexArray,l,c,1,-1),jo(this.layoutVertexArray,l,c,1,1),jo(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{},r)},Rr("CircleBucket",No,{omit:["layers"]});var ea=new _i({"circle-sort-key":new mi(Pt.layout_circle["circle-sort-key"])}),na={paint:new _i({"circle-radius":new mi(Pt.paint_circle["circle-radius"]),"circle-color":new mi(Pt.paint_circle["circle-color"]),"circle-blur":new mi(Pt.paint_circle["circle-blur"]),"circle-opacity":new mi(Pt.paint_circle["circle-opacity"]),"circle-translate":new di(Pt.paint_circle["circle-translate"]),"circle-translate-anchor":new di(Pt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new di(Pt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new di(Pt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new mi(Pt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new mi(Pt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new mi(Pt.paint_circle["circle-stroke-opacity"])}),layout:ea},ra="undefined"!=typeof Float32Array?Float32Array:Array;function ia(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oa(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*r+x*s+b*p+w*m,t[1]=_*i+x*u+b*h+w*y,t[2]=_*o+x*l+b*f+w*v,t[3]=_*a+x*c+b*d+w*g,t[4]=(_=n[4])*r+(x=n[5])*s+(b=n[6])*p+(w=n[7])*m,t[5]=_*i+x*u+b*h+w*y,t[6]=_*o+x*l+b*f+w*v,t[7]=_*a+x*c+b*d+w*g,t[8]=(_=n[8])*r+(x=n[9])*s+(b=n[10])*p+(w=n[11])*m,t[9]=_*i+x*u+b*h+w*y,t[10]=_*o+x*l+b*f+w*v,t[11]=_*a+x*c+b*d+w*g,t[12]=(_=n[12])*r+(x=n[13])*s+(b=n[14])*p+(w=n[15])*m,t[13]=_*i+x*u+b*h+w*y,t[14]=_*o+x*l+b*f+w*v,t[15]=_*a+x*c+b*d+w*g,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,n=arguments.length;n--;)e+=t[n]*t[n];return Math.sqrt(e)});var aa,sa=oa;function ua(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}aa=new ra(3),ra!=Float32Array&&(aa[0]=0,aa[1]=0,aa[2]=0),function(){var t=new ra(4);ra!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var la=(function(){var t=new ra(2);ra!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,na)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new No(t)},e.prototype.queryRadius=function(t){var e=t;return $o("circle-radius",this,e)+$o("circle-stroke-width",this,e)+Qo(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o,a,s){for(var u=ta(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),l=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),c="map"===this.paint.get("circle-pitch-alignment"),p=c?u:function(t,e){return t.map((function(t){return ca(t,e)}))}(u,s),h=c?l*a:l,f=0,d=r;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var v=y[m],g=c?v:ca(v,s),_=h,x=ua([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=o.cameraToCenterDistance/x[3]),Vo(p,g,_))return!0}return!1},e}(xi));function ca(t,e){var n=ua([],[t.x,t.y,0,1],e);return new i(n[0]/n[3],n[1]/n[3])}var pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(No);function ha(t,e,n,r){var i=e.width,o=e.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return t.width=i,t.height=o,t.data=r,t}function fa(t,e,n){var r=e.width,i=e.height;if(r!==t.width||i!==t.height){var o=ha({},{width:r,height:i},n);da(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,i)},n),t.width=r,t.height=i,t.data=o.data}}function da(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,u=0;u<i.height;u++)for(var l=((n.y+u)*t.width+n.x)*o,c=((r.y+u)*e.width+r.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[l+p];return e}Rr("HeatmapBucket",pa,{omit:["layers"]});var ma=function(t,e){ha(this,t,1,e)};ma.prototype.resize=function(t){fa(this,t,1)},ma.prototype.clone=function(){return new ma({width:this.width,height:this.height},new Uint8Array(this.data))},ma.copy=function(t,e,n,r,i){da(t,e,n,r,i,1)};var ya=function(t,e){ha(this,t,4,e)};ya.prototype.resize=function(t){fa(this,t,4)},ya.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},ya.prototype.clone=function(){return new ya({width:this.width,height:this.height},new Uint8Array(this.data))},ya.copy=function(t,e,n,r,i){da(t,e,n,r,i,4)},Rr("AlphaImage",ma),Rr("RGBAImage",ya);var va={paint:new _i({"heatmap-radius":new mi(Pt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new mi(Pt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new di(Pt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new gi(Pt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new di(Pt.paint_heatmap["heatmap-opacity"])})};function ga(t){var e={},n=t.resolution||256,r=t.clips?t.clips.length:1,i=t.image||new ya({width:n,height:r}),o=function(n,r,o){e[t.evaluationKey]=o;var a=t.expression.evaluate(e);i.data[n+r+0]=Math.floor(255*a.r/a.a),i.data[n+r+1]=Math.floor(255*a.g/a.a),i.data[n+r+2]=Math.floor(255*a.b/a.a),i.data[n+r+3]=Math.floor(255*a.a)};if(t.clips)for(var a=0,s=0;a<r;++a,s+=4*n)for(var u=0,l=0;u<n;u++,l+=4){var c=u/(n-1),p=t.clips[a];o(s,l,p.start*(1-c)+p.end*c)}else for(var h=0,f=0;h<n;h++,f+=4)o(0,f,h/(n-1));return i}var _a=function(t){function e(e){t.call(this,e,va),this._updateColorRamp()}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new pa(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){this.colorRamp=ga({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(xi),xa={paint:new _i({"hillshade-illumination-direction":new di(Pt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new di(Pt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new di(Pt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new di(Pt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new di(Pt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new di(Pt.paint_hillshade["hillshade-accent-color"])})},ba=function(t){function e(e){t.call(this,e,xa)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(xi),wa=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,Ea=Ta,Sa=Ta;function Ta(t,e,n){n=n||2;var r,i,o,a,s,u,l,c=e&&e.length,p=c?e[0]*n:t.length,h=ka(t,0,p,n,!0),f=[];if(!h||h.next===h.prev)return f;if(c&&(h=function(t,e,n,r){var i,o,a,s=[];for(i=0,o=e.length;i<o;i++)(a=ka(t,e[i]*r,i<o-1?e[i+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(Ba(a));for(s.sort(Oa),i=0;i<s.length;i++)Da(s[i],n),n=Pa(n,n.next);return n}(t,e,h,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var d=n;d<p;d+=n)(s=t[d])<r&&(r=s),(u=t[d+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return Ca(h,f,n,r,i,l),f}function ka(t,e,n,r,i){var o,a;if(i===Ya(t,e,n,r)>0)for(o=e;o<n;o+=r)a=Xa(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=Xa(o,t[o],t[o+1],a);return a&&Ua(a,a.next)&&(Ha(a),a=a.next),a}function Pa(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Ua(r,r.next)&&0!==Na(r.prev,r,r.next))r=r.next;else{if(Ha(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ca(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Ra(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?za(t,r,i,o):Ia(t))e.push(s.i/n),e.push(t.i/n),e.push(u.i/n),Ha(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?Ca(t=Aa(Pa(t),e,n),e,n,r,i,o,2):2===a&&Ma(t,e,n,r,i,o):Ca(Pa(t),e,n,r,i,o,1);break}}}function Ia(t){var e=t.prev,n=t,r=t.next;if(Na(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fa(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Na(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function za(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Na(i,o,a)>=0)return!1;for(var s=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,l=Ra(i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,e,n,r),c=Ra(s,u,e,n,r),p=t.prevZ,h=t.nextZ;p&&p.z>=l&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&Fa(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Na(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&Fa(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Na(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=l;){if(p!==t.prev&&p!==t.next&&Fa(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Na(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&Fa(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Na(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Aa(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Ua(i,o)&&Va(i,r,r.next,o)&&Wa(i,o)&&Wa(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Ha(r),Ha(r.next),r=t=o),r=r.next}while(r!==t);return Pa(r)}function Ma(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&ja(a,s)){var u=Ga(a,s);return a=Pa(a,a.next),u=Pa(u,u.next),Ca(a,e,n,r,i,o),void Ca(u,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function Oa(t,e){return t.x-e.x}function Da(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n;var u,l=n,c=n.x,p=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&Fa(o<p?i:a,o,c,p,o<p?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),Wa(r,t)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&La(n,r)))&&(n=r,h=u)),r=r.next}while(r!==l);return n}(t,e)){var n=Ga(e,t);Pa(e,e.next),Pa(n,n.next)}}function La(t,e){return Na(t.prev,t,e.prev)<0&&Na(e.next,t,t.next)<0}function Ra(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ba(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Fa(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function ja(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Va(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Wa(t,e)&&Wa(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(Na(t.prev,t,e.prev)||Na(t,e.prev,e))||Ua(t,e)&&Na(t.prev,t,t.next)>0&&Na(e.prev,e,e.next)>0)}function Na(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Ua(t,e){return t.x===e.x&&t.y===e.y}function Va(t,e,n,r){var i=Za(Na(t,e,n)),o=Za(Na(t,e,r)),a=Za(Na(n,r,t)),s=Za(Na(n,r,e));return i!==o&&a!==s||!(0!==i||!qa(t,n,e))||!(0!==o||!qa(t,r,e))||!(0!==a||!qa(n,t,r))||!(0!==s||!qa(n,e,r))}function qa(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Za(t){return t>0?1:t<0?-1:0}function Wa(t,e){return Na(t.prev,t,t.next)<0?Na(t,e,t.next)>=0&&Na(t,t.prev,e)>=0:Na(t,e,t.prev)<0||Na(t,t.next,e)<0}function Ga(t,e){var n=new Ka(t.i,t.x,t.y),r=new Ka(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Xa(t,e,n,r){var i=new Ka(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ha(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Ka(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ya(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function Ja(t,e,n,r,i){!function t(e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*l/a+c)),Math.min(i,Math.floor(n+(a-s)*l/a+c)),o)}var p=e[n],h=r,f=i;for($a(e,r,n),o(e[i],p)>0&&$a(e,r,i);h<f;){for($a(e,h,f),h++,f--;o(e[h],p)<0;)h++;for(;o(e[f],p)>0;)f--}0===o(e[r],p)?$a(e,r,f):$a(e,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}(t,e,n||0,r||t.length-1,i||Qa)}function $a(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Qa(t,e){return t<e?-1:t>e?1:0}function ts(t,e){var n=t.length;if(n<=1)return[t];for(var r,i,o=[],a=0;a<n;a++){var s=T(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(r&&o.push(r),r=[t[a]]):r.push(t[a]))}if(r&&o.push(r),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(Ja(o[u],e,1,o[u].length-1,es),o[u]=o[u].slice(0,e));return o}function es(t,e){return e.area-t.area}function ns(t,e,n){for(var r=n.patternDependencies,i=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(i=!0);var u=s.constantOr(null);u&&(i=!0,r[u.to]=!0,r[u.from]=!0)}return i}function rs(t,e,n,r,i){for(var o=i.patternDependencies,a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.paint.get(t+"-pattern").value;if("constant"!==l.kind){var c=l.evaluate({zoom:r-1},n,{},i.availableImages),p=l.evaluate({zoom:r},n,{},i.availableImages),h=l.evaluate({zoom:r+1},n,{},i.availableImages);p=p&&p.name?p.name:p,h=h&&h.name?h.name:h,o[c=c&&c.name?c.name:c]=!0,o[p]=!0,o[h]=!0,n.patterns[u.id]={min:c,mid:p,max:h}}}return n}Ta.deviation=function(t,e,n,r){var i=e&&e.length,o=Math.abs(Ya(t,0,i?e[0]*n:t.length,n));if(i)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(Ya(t,e[a]*n,a<s-1?e[a+1]*n:t.length,n));var u=0;for(a=0;a<r.length;a+=3){var l=r[a]*n,c=r[a+1]*n,p=r[a+2]*n;u+=Math.abs((t[l]-t[p])*(t[c+1]-t[l+1])-(t[l]-t[c])*(t[p+1]-t[l+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},Ta.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&n.holes.push(r+=t[i-1].length)}return n},Ea.default=Sa;var is=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ki,this.indexArray=new ji,this.indexArray2=new Wi,this.programConfigurations=new Oo(t.layers,t.zoom),this.segments=new oo,this.segments2=new oo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};is.prototype.populate=function(t,e,n){this.hasPattern=ns("fill",this.layers,e);for(var r=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=t;o<a.length;o+=1){var s=a[o],u=s.feature,l=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:u.type,id:l,properties:u.properties,geometry:h?Fo(u):[]};if(this.layers[0]._featureFilter.filter(new oi(this.zoom),f,n)){h||(f.geometry=Fo(u));var d=r?r.evaluate(f,{},n,e.availableImages):void 0;i.push({id:l,properties:u.properties,type:u.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}r&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,y=i;m<y.length;m+=1){var v=y[m],g=v.geometry,_=v.index,x=v.sourceLayerIndex;if(this.hasPattern){var b=rs("fill",this.layers,v,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(v,g,_,n,{});e.featureIndex.insert(t[_].feature,g,_,x,this.index)}},is.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},is.prototype.addFeatures=function(t,e,n){for(var r=0,i=this.patternFeatures;r<i.length;r+=1){var o=i[r];this.addFeature(o,o.geometry,o.index,e,n)}},is.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},is.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},is.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,wa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},is.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},is.prototype.addFeature=function(t,e,n,r,i){for(var o=0,a=ts(e,500);o<a.length;o+=1){for(var s=a[o],u=0,l=0,c=s;l<c.length;l+=1)u+=c[l].length;for(var p=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray),h=p.vertexLength,f=[],d=[],m=0,y=s;m<y.length;m+=1){var v=y[m];if(0!==v.length){v!==s[0]&&d.push(f.length/2);var g=this.segments2.prepareSegment(v.length,this.layoutVertexArray,this.indexArray2),_=g.vertexLength;this.layoutVertexArray.emplaceBack(v[0].x,v[0].y),this.indexArray2.emplaceBack(_+v.length-1,_),f.push(v[0].x),f.push(v[0].y);for(var x=1;x<v.length;x++)this.layoutVertexArray.emplaceBack(v[x].x,v[x].y),this.indexArray2.emplaceBack(_+x-1,_+x),f.push(v[x].x),f.push(v[x].y);g.vertexLength+=v.length,g.primitiveLength+=v.length}}for(var b=Ea(f,d),w=0;w<b.length;w+=3)this.indexArray.emplaceBack(h+b[w],h+b[w+1],h+b[w+2]);p.vertexLength+=u,p.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)},Rr("FillBucket",is,{omit:["layers","patternFeatures"]});var os=new _i({"fill-sort-key":new mi(Pt.layout_fill["fill-sort-key"])}),as={paint:new _i({"fill-antialias":new di(Pt.paint_fill["fill-antialias"]),"fill-opacity":new mi(Pt.paint_fill["fill-opacity"]),"fill-color":new mi(Pt.paint_fill["fill-color"]),"fill-outline-color":new mi(Pt.paint_fill["fill-outline-color"]),"fill-translate":new di(Pt.paint_fill["fill-translate"]),"fill-translate-anchor":new di(Pt.paint_fill["fill-translate-anchor"]),"fill-pattern":new yi(Pt.paint_fill["fill-pattern"])}),layout:os},ss=function(t){function e(e){t.call(this,e,as)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,n){t.prototype.recalculate.call(this,e,n);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new is(t)},e.prototype.queryRadius=function(){return Qo(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o,a){return qo(ta(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)},e.prototype.isTileClipped=function(){return!0},e}(xi),us=Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,ls=cs;function cs(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(ps,this,e)}function ps(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function hs(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)r+=((n=t[a]).x-(e=t[i]).x)*(e.y+n.y);return r}cs.types=["Unknown","Point","LineString","Polygon"],cs.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,r=1,o=0,a=0,s=0,u=[];t.pos<n;){if(o<=0){var l=t.readVarint();r=7&l,o=l>>3}if(o--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&u.push(e),e=[]),e.push(new i(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&u.push(e),u},cs.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},cs.prototype.toGeoJSON=function(t,e,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=cs.types[this.type];function c(t){for(var e=0;e<t.length;e++){var n=t[e];t[e]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(n.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(r=0;r<u.length;r++)p[r]=u[r][0];c(u=p);break;case 2:for(r=0;r<u.length;r++)c(u[r]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var a=hs(t[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}return n&&i.push(n),i}(u),r=0;r<u.length;r++)for(i=0;i<u[r].length;i++)c(u[r][i])}1===u.length?u=u[0]:l="Multi"+l;var h={type:"Feature",geometry:{type:l,coordinates:u},properties:this.properties};return"id"in this&&(h.id=this.id),h};var fs=ds;function ds(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(ms,this,e),this.length=this._features.length}function ms(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){for(var e=null,n=t.readVarint()+t.pos;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}function ys(t,e,n){if(3===t){var r=new fs(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}ds.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ls(this._pbf,e,this.extent,this._keys,this._values)};var vs={VectorTile:function(t,e){this.layers=t.readFields(ys,{},e)},VectorTileFeature:ls,VectorTileLayer:fs},gs=vs.VectorTileFeature.types,_s=Math.pow(2,13);function xs(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*_s)+a,i*_s*2,o*_s*2,Math.round(s))}var bs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ci,this.indexArray=new ji,this.programConfigurations=new Oo(t.layers,t.zoom),this.segments=new oo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function ws(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}bs.prototype.populate=function(t,e,n){this.features=[],this.hasPattern=ns("fill-extrusion",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var o=i[r],a=o.feature,s=o.id,u=o.index,l=o.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,p={type:a.type,id:s,properties:a.properties,geometry:c?Fo(a):[]};if(this.layers[0]._featureFilter.filter(new oi(this.zoom),p,n)){var h={id:s,sourceLayerIndex:l,index:u,geometry:c?p.geometry:Fo(a),properties:a.properties,type:a.type,patterns:{}};this.hasPattern?this.features.push(rs("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,u,n,{}),e.featureIndex.insert(a,h.geometry,u,l,this.index,!0)}}},bs.prototype.addFeatures=function(t,e,n){for(var r=0,i=this.features;r<i.length;r+=1){var o=i[r];this.addFeature(o,o.geometry,o.index,e,n)}},bs.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},bs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},bs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},bs.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,us),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},bs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},bs.prototype.addFeature=function(t,e,n,r,i){for(var o=0,a=ts(e,500);o<a.length;o+=1){for(var s=a[o],u=0,l=0,c=s;l<c.length;l+=1)u+=c[l].length;for(var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=0,f=s;h<f.length;h+=1){var d=f[h];if(0!==d.length&&!((M=d).every((function(t){return t.x<0}))||M.every((function(t){return t.x>8192}))||M.every((function(t){return t.y<0}))||M.every((function(t){return t.y>8192}))))for(var m=0,y=0;y<d.length;y++){var v=d[y];if(y>=1){var g=d[y-1];if(!ws(v,g)){p.vertexLength+4>oo.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=v.sub(g)._perp()._unit(),x=g.dist(v);m+x>32768&&(m=0),xs(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m),xs(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m),xs(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m+=x),xs(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m);var b=p.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+u>oo.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray)),"Polygon"===gs[t.type]){for(var w=[],E=[],S=p.vertexLength,T=0,k=s;T<k.length;T+=1){var P=k[T];if(0!==P.length){P!==s[0]&&E.push(w.length/2);for(var C=0;C<P.length;C++){var I=P[C];xs(this.layoutVertexArray,I.x,I.y,0,0,1,1,0),w.push(I.x),w.push(I.y)}}}for(var z=Ea(w,E),A=0;A<z.length;A+=3)this.indexArray.emplaceBack(S+z[A],S+z[A+2],S+z[A+1]);p.primitiveLength+=z.length/3,p.vertexLength+=u}}var M;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)},Rr("FillExtrusionBucket",bs,{omit:["layers","features"]});var Es={paint:new _i({"fill-extrusion-opacity":new di(Pt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new mi(Pt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new di(Pt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new di(Pt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new yi(Pt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new mi(Pt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new mi(Pt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new di(Pt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Ss=function(t){function e(e){t.call(this,e,Es)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new bs(t)},e.prototype.queryRadius=function(){return Qo(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,n,r,o,a,s,u){var l=ta(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,n),p=this.paint.get("fill-extrusion-base").evaluate(e,n),h=function(t,e,n,r){for(var o=[],a=0,s=t;a<s.length;a+=1){var u=s[a],l=[u.x,u.y,0,1];ua(l,l,e),o.push(new i(l[0]/l[3],l[1]/l[3]))}return o}(l,u),f=function(t,e,n,r){for(var o=[],a=[],s=r[8]*e,u=r[9]*e,l=r[10]*e,c=r[11]*e,p=r[8]*n,h=r[9]*n,f=r[10]*n,d=r[11]*n,m=0,y=t;m<y.length;m+=1){for(var v=[],g=[],_=0,x=y[m];_<x.length;_+=1){var b=x[_],w=b.x,E=b.y,S=r[0]*w+r[4]*E+r[12],T=r[1]*w+r[5]*E+r[13],k=r[2]*w+r[6]*E+r[14],P=r[3]*w+r[7]*E+r[15],C=k+l,I=P+c,z=S+p,A=T+h,M=k+f,O=P+d,D=new i((S+s)/I,(T+u)/I);D.z=C/I,v.push(D);var L=new i(z/O,A/O);L.z=M/O,g.push(L)}o.push(v),a.push(g)}return[o,a]}(r,p,c,u);return function(t,e,n){var r=1/0;qo(n,e)&&(r=ks(n,e[0]));for(var i=0;i<e.length;i++)for(var o=e[i],a=t[i],s=0;s<o.length-1;s++){var u=o[s],l=[u,o[s+1],a[s+1],a[s],u];Uo(n,l)&&(r=Math.min(r,ks(n,l)))}return r!==1/0&&r}(f[0],f[1],h)},e}(xi);function Ts(t,e){return t.x*e.x+t.y*e.y}function ks(t,e){if(1===t.length){for(var n,r=0,i=e[r++];!n||i.equals(n);)if(!(n=e[r++]))return 1/0;for(;r<e.length;r++){var o=e[r],a=t[0],s=n.sub(i),u=o.sub(i),l=a.sub(i),c=Ts(s,s),p=Ts(s,u),h=Ts(u,u),f=Ts(l,s),d=Ts(l,u),m=c*h-p*p,y=(h*f-p*d)/m,v=(c*d-p*f)/m,g=i.z*(1-y-v)+n.z*y+o.z*v;if(isFinite(g))return g}return 1/0}for(var _=1/0,x=0,b=e;x<b.length;x+=1)_=Math.min(_,b[x].z);return _}var Ps=Si([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Cs=Si([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,Is=vs.VectorTileFeature.types,zs=Math.cos(Math.PI/180*37.5),As=Math.pow(2,14)/.5,Ms=function(t){var e=this;this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((function(t){e.gradients[t.id]={}})),this.layoutVertexArray=new Ii,this.layoutVertexArray2=new zi,this.indexArray=new ji,this.programConfigurations=new Oo(t.layers,t.zoom),this.segments=new oo,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};Ms.prototype.populate=function(t,e,n){this.hasPattern=ns("line",this.layers,e);for(var r=this.layers[0].layout.get("line-sort-key"),i=[],o=0,a=t;o<a.length;o+=1){var s=a[o],u=s.feature,l=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:u.type,id:l,properties:u.properties,geometry:h?Fo(u):[]};if(this.layers[0]._featureFilter.filter(new oi(this.zoom),f,n)){h||(f.geometry=Fo(u));var d=r?r.evaluate(f,{},n):void 0;i.push({id:l,properties:u.properties,type:u.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}r&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,y=i;m<y.length;m+=1){var v=y[m],g=v.geometry,_=v.index,x=v.sourceLayerIndex;if(this.hasPattern){var b=rs("line",this.layers,v,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(v,g,_,n,{});e.featureIndex.insert(t[_].feature,g,_,x,this.index)}},Ms.prototype.update=function(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)},Ms.prototype.addFeatures=function(t,e,n){for(var r=0,i=this.patternFeatures;r<i.length;r+=1){var o=i[r];this.addFeature(o,o.geometry,o.index,e,n)}},Ms.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ms.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ms.prototype.upload=function(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Cs)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ps),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ms.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ms.prototype.lineFeatureClips=function(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}},Ms.prototype.addFeature=function(t,e,n,r,i){var o=this.layers[0].layout,a=o.get("line-join").evaluate(t,{}),s=o.get("line-cap"),u=o.get("line-miter-limit"),l=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(var c=0,p=e;c<p.length;c+=1)this.addLine(p[c],t,a,s,u,l);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)},Ms.prototype.addLine=function(t,e,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var s="Polygon"===Is[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var l=0;l<u-1&&t[l].equals(t[l+1]);)l++;if(!(u<(s?3:2))){"bevel"===n&&(i=1.05);var c,p=this.overscaling<=16?122880/(512*this.overscaling):0,h=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray),f=void 0,d=void 0,m=void 0,y=void 0;this.e1=this.e2=-1,s&&(y=t[l].sub(c=t[u-2])._unit()._perp());for(var v=l;v<u;v++)if(!(d=v===u-1?s?t[l+1]:void 0:t[v+1])||!t[v].equals(d)){y&&(m=y),c&&(f=c),c=t[v],y=d?d.sub(c)._unit()._perp():m;var g=(m=m||y).add(y);0===g.x&&0===g.y||g._unit();var _=m.x*y.x+m.y*y.y,x=g.x*y.x+g.y*y.y,b=0!==x?1/x:1/0,w=2*Math.sqrt(2-2*x),E=x<zs&&f&&d,S=m.x*y.y-m.y*y.x>0;if(E&&v>l){var T=c.dist(f);if(T>2*p){var k=c.sub(c.sub(f)._mult(p/T)._round());this.updateDistance(f,k),this.addCurrentVertex(k,m,0,0,h),f=k}}var P=f&&d,C=P?n:s?"butt":r;if(P&&"round"===C&&(b<o?C="miter":b<=2&&(C="fakeround")),"miter"===C&&b>i&&(C="bevel"),"bevel"===C&&(b>2&&(C="flipbevel"),b<i&&(C="miter")),f&&this.updateDistance(f,c),"miter"===C)g._mult(b),this.addCurrentVertex(c,g,0,0,h);else if("flipbevel"===C){if(b>100)g=y.mult(-1);else{var I=b*m.add(y).mag()/m.sub(y).mag();g._perp()._mult(I*(S?-1:1))}this.addCurrentVertex(c,g,0,0,h),this.addCurrentVertex(c,g.mult(-1),0,0,h)}else if("bevel"===C||"fakeround"===C){var z=-Math.sqrt(b*b-1),A=S?z:0,M=S?0:z;if(f&&this.addCurrentVertex(c,m,A,M,h),"fakeround"===C)for(var O=Math.round(180*w/Math.PI/20),D=1;D<O;D++){var L=D/O;if(.5!==L){var R=L-.5;L+=L*R*(L-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*R*R+(.848013+_*(.215638*_-1.06021)))}var B=y.sub(m)._mult(L)._add(m)._unit()._mult(S?-1:1);this.addHalfVertex(c,B.x,B.y,!1,S,0,h)}d&&this.addCurrentVertex(c,y,-A,-M,h)}else if("butt"===C)this.addCurrentVertex(c,g,0,0,h);else if("square"===C){var F=f?1:-1;this.addCurrentVertex(c,g,F,F,h)}else"round"===C&&(f&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),d&&(this.addCurrentVertex(c,y,-1,-1,h,!0),this.addCurrentVertex(c,y,0,0,h)));if(E&&v<u-1){var j=c.dist(d);if(j>2*p){var N=c.add(d.sub(c)._mult(p/j)._round());this.updateDistance(c,N),this.addCurrentVertex(N,y,0,0,h),c=N}}}}},Ms.prototype.addCurrentVertex=function(t,e,n,r,i,o){void 0===o&&(o=!1);var a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*n,e.y-e.x*n,o,!1,n,i),this.addHalfVertex(t,a,s,o,!0,-r,i),this.distance>As/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,n,r,i,o))},Ms.prototype.addHalfVertex=function(t,e,n,r,i,o,a){var s=.5*(this.lineClips?this.scaledDistance*(As-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t.x<<1)+(r?1:0),(t.y<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var u=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),a.primitiveLength++),i?this.e2=u:this.e1=u},Ms.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ms.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Rr("LineBucket",Ms,{omit:["layers","patternFeatures"]});var Os=new _i({"line-cap":new di(Pt.layout_line["line-cap"]),"line-join":new mi(Pt.layout_line["line-join"]),"line-miter-limit":new di(Pt.layout_line["line-miter-limit"]),"line-round-limit":new di(Pt.layout_line["line-round-limit"]),"line-sort-key":new mi(Pt.layout_line["line-sort-key"])}),Ds={paint:new _i({"line-opacity":new mi(Pt.paint_line["line-opacity"]),"line-color":new mi(Pt.paint_line["line-color"]),"line-translate":new di(Pt.paint_line["line-translate"]),"line-translate-anchor":new di(Pt.paint_line["line-translate-anchor"]),"line-width":new mi(Pt.paint_line["line-width"]),"line-gap-width":new mi(Pt.paint_line["line-gap-width"]),"line-offset":new mi(Pt.paint_line["line-offset"]),"line-blur":new mi(Pt.paint_line["line-blur"]),"line-dasharray":new vi(Pt.paint_line["line-dasharray"]),"line-pattern":new yi(Pt.paint_line["line-pattern"]),"line-gradient":new gi(Pt.paint_line["line-gradient"])}),layout:Os},Ls=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new oi(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),t.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,r,i){return n=h({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,r,i)},e}(mi))(Ds.paint.properties["line-width"].specification);Ls.useIntegerZoom=!0;var Rs=function(t){function e(e){t.call(this,e,Ds),this.gradientVersion=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ue,this.gradientVersion=(this.gradientVersion+1)%s)},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,n){t.prototype.recalculate.call(this,e,n),this.paint._values["line-floorwidth"]=Ls.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ms(t)},e.prototype.queryRadius=function(t){var e=t,n=Bs($o("line-width",this,e),$o("line-gap-width",this,e)),r=$o("line-offset",this,e);return n/2+Math.abs(r)+Qo(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,o,a,s){var u=ta(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),l=s/2*Bs(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),c=this.paint.get("line-offset").evaluate(e,n);return c&&(r=function(t,e){for(var n=[],r=new i(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],u=0;u<a.length;u++){var l=a[u],c=a[u+1],p=0===u?r:l.sub(a[u-1])._unit()._perp(),h=u===a.length-1?r:c.sub(l)._unit()._perp(),f=p._add(h)._unit();f._mult(1/(f.x*h.x+f.y*h.y)),s.push(f._mult(e)._add(l))}n.push(s)}return n}(r,c*s)),function(t,e,n){for(var r=0;r<e.length;r++){var i=e[r];if(t.length>=3)for(var o=0;o<i.length;o++)if(Yo(t,i[o]))return!0;if(Zo(t,i,n))return!0}return!1}(u,r,l)},e.prototype.isTileClipped=function(){return!0},e}(xi);function Bs(t,e){return e>0?e+2*t:t}var Fs=Si([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),js=Si([{name:"a_projected_pos",components:3,type:"Float32"}],4),Ns=(Si([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Si([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Us=(Si([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Vs=Si([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function qs(t,e,n){return t.sections.forEach((function(t){t.text=function(t,e,n){var r=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),ii.applyArabicShaping&&(t=ii.applyArabicShaping(t)),t}(t.text,e,n)})),t}Si([{name:"triangle",components:3,type:"Uint16"}]),Si([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Si([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Si([{type:"Float32",name:"offsetX"}]),Si([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Zs={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},Ws=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,p=n?i-1:0,h=n?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)},Gs=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*u-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+f]=255&a,f+=d,a/=256,l-=8);t[n+f-d]|=128*m},Xs=Hs;function Hs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Hs.Varint=0,Hs.Fixed64=1,Hs.Bytes=2,Hs.Fixed32=5;var Ks="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ys(t){return t.type===Hs.Bytes?t.readVarint()+t.pos:t.pos+1}function Js(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function $s(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function Qs(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function tu(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function eu(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function nu(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function ru(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function iu(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function ou(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function au(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function su(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function uu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function lu(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function cu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function pu(t,e,n){1===t&&n.readMessage(hu,e)}function hu(t,e,n){if(3===t){var r=n.readMessage(fu,{}),i=r.width,o=r.height,a=r.left,s=r.top,u=r.advance;e.push({id:r.id,bitmap:new ma({width:i+6,height:o+6},r.bitmap),metrics:{width:i,height:o,left:a,top:s,advance:u}})}}function fu(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}function du(t){for(var e=0,n=0,r=0,i=t;r<i.length;r+=1){var o=i[r];e+=o.w*o.h,n=Math.max(n,o.w)}t.sort((function(t,e){return e.h-t.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),n),h:1/0}],s=0,u=0,l=0,c=t;l<c.length;l+=1)for(var p=c[l],h=a.length-1;h>=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,u=Math.max(u,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else p.h===f.h?(f.x+=p.w,f.w-=p.w):p.w===f.w?(f.y+=p.h,f.h-=p.h):(a.push({x:f.x+p.w,y:f.y,w:f.w-p.w,h:p.h}),f.y+=p.h,f.h-=p.h);break}}return{w:s,h:u,fill:e/(s*u)||0}}Hs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=uu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=cu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=uu(this.buf,this.pos)+4294967296*uu(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=uu(this.buf,this.pos)+4294967296*cu(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ws(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ws(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return Js(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return Js(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return Js(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return Js(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return Js(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return Js(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Ks?function(t,e,n){return Ks.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var r="",i=e;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(a=t[i+2],128==(192&(o=t[i+1]))&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=t[i+2],s=t[i+3],128==(192&(o=t[i+1]))&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Hs.Bytes)return t.push(this.readVarint(e));var n=Ys(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Hs.Bytes)return t.push(this.readSVarint());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Hs.Bytes)return t.push(this.readBoolean());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Hs.Bytes)return t.push(this.readFloat());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Hs.Bytes)return t.push(this.readDouble());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Hs.Bytes)return t.push(this.readFixed32());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Hs.Bytes)return t.push(this.readSFixed32());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Hs.Bytes)return t.push(this.readFixed64());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Hs.Bytes)return t.push(this.readSFixed64());var e=Ys(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Hs.Varint)for(;this.buf[this.pos++]>127;);else if(e===Hs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Hs.Fixed32)this.pos+=4;else{if(e!==Hs.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),lu(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),lu(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),lu(this.buf,-1&t,this.pos),lu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),lu(this.buf,-1&t,this.pos),lu(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,n.buf[n.pos]=127&(t>>>=7)}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&$s(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Gs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Gs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&$s(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,Hs.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Qs,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,tu,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ru,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,eu,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,nu,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,iu,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ou,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,au,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,su,e)},writeBytesField:function(t,e){this.writeTag(t,Hs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Hs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Hs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Hs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Hs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Hs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var mu=function(t,e){var n=e.pixelRatio,r=e.version,i=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=n,this.stretchX=i,this.stretchY=o,this.content=a,this.version=r},yu={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};yu.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},yu.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},yu.tlbr.get=function(){return this.tl.concat(this.br)},yu.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(mu.prototype,yu);var vu=function(t,e){var n={},r={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,n,i),this.addImages(e,r,i);var o=du(i),a=new ya({width:o.w||1,height:o.h||1});for(var s in t){var u=t[s],l=n[s].paddedRect;ya.copy(u.data,a,{x:0,y:0},{x:l.x+1,y:l.y+1},u.data)}for(var c in e){var p=e[c],h=r[c].paddedRect,f=h.x+1,d=h.y+1,m=p.data.width,y=p.data.height;ya.copy(p.data,a,{x:0,y:0},{x:f,y:d},p.data),ya.copy(p.data,a,{x:0,y:y-1},{x:f,y:d-1},{width:m,height:1}),ya.copy(p.data,a,{x:0,y:0},{x:f,y:d+y},{width:m,height:1}),ya.copy(p.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:y}),ya.copy(p.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:y})}this.image=a,this.iconPositions=n,this.patternPositions=r};vu.prototype.addImages=function(t,e,n){for(var r in t){var i=t[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),e[r]=new mu(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},vu.prototype.patchUpdatedImages=function(t,e){for(var n in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[n],t.getImage(n),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n),e)},vu.prototype.patchUpdatedImage=function(t,e,n){if(t&&e&&t.version!==e.version){t.version=e.version;var r=t.tl;n.update(e.data,void 0,{x:r[0],y:r[1]})}},Rr("ImagePosition",mu),Rr("ImageAtlas",vu);var gu={horizontal:1,vertical:2,horizontalOnly:3},_u=function(){this.scale=1,this.fontStack="",this.imageName=null};_u.forText=function(t,e){var n=new _u;return n.scale=t||1,n.fontStack=e,n},_u.forImage=function(t){var e=new _u;return e.imageName=t,e};var xu=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function bu(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m){var y,v=xu.fromFeature(t,i);p===gu.vertical&&v.verticalizePunctuation();var g=ii.processBidirectionalText,_=ii.processStyledBidirectionalText;if(g&&1===v.sections.length){y=[];for(var x=0,b=g(v.toString(),Cu(v,l,o,e,r,f,d));x<b.length;x+=1){var w=b[x],E=new xu;E.text=w,E.sections=v.sections;for(var S=0;S<w.length;S++)E.sectionIndex.push(0);y.push(E)}}else if(_){y=[];for(var T=0,k=_(v.text,v.sectionIndex,Cu(v,l,o,e,r,f,d));T<k.length;T+=1){var P=k[T],C=new xu;C.text=P[0],C.sectionIndex=P[1],C.sections=v.sections,y.push(C)}}else y=function(t,e){for(var n=[],r=t.text,i=0,o=0,a=e;o<a.length;o+=1){var s=a[o];n.push(t.substring(i,s)),i=s}return i<r.length&&n.push(t.substring(i,r.length)),n}(v,Cu(v,l,o,e,r,f,d));var I=[],z={positionedLines:I,text:v.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,e,n,r,i,o,a,s,u,l,c,p){for(var h=0,f=-17,d=0,m=0,y="right"===s?1:"left"===s?0:.5,v=0,g=0,_=i;g<_.length;g+=1){var x=_[g];x.trim();var b=x.getMaxScale(),w=24*(b-1),E={positionedGlyphs:[],lineOffset:0};t.positionedLines[v]=E;var S=E.positionedGlyphs,T=0;if(x.length()){for(var k=0;k<x.length();k++){var P=x.getSection(k),C=x.getSectionIndex(k),I=x.getCharCode(k),z=0,A=null,M=null,O=null,D=24,L=!(u===gu.horizontal||!c&&!Wr(I)||c&&(wu[I]||(Z=I,qr.Arabic(Z)||qr["Arabic Supplement"](Z)||qr["Arabic Extended-A"](Z)||qr["Arabic Presentation Forms-A"](Z)||qr["Arabic Presentation Forms-B"](Z))));if(P.imageName){var R=r[P.imageName];if(!R)continue;O=P.imageName,t.iconsInText=t.iconsInText||!0,M=R.paddedRect;var B=R.displaySize;P.scale=24*P.scale/p,z=w+(24-B[1]*P.scale),D=(A={width:B[0],height:B[1],left:1,top:-3,advance:L?B[1]:B[0]}).advance;var F=L?B[0]*P.scale-24*b:B[1]*P.scale-24*b;F>0&&F>T&&(T=F)}else{var j=n[P.fontStack],N=j&&j[I];if(N&&N.rect)M=N.rect,A=N.metrics;else{var U=e[P.fontStack],V=U&&U[I];if(!V)continue;A=V.metrics}z=24*(b-P.scale)}L?(t.verticalizable=!0,S.push({glyph:I,imageName:O,x:h,y:f+z,vertical:L,scale:P.scale,fontStack:P.fontStack,sectionIndex:C,metrics:A,rect:M}),h+=D*P.scale+l):(S.push({glyph:I,imageName:O,x:h,y:f+z,vertical:L,scale:P.scale,fontStack:P.fontStack,sectionIndex:C,metrics:A,rect:M}),h+=A.advance*P.scale+l)}0!==S.length&&(d=Math.max(h-l,d),zu(S,0,S.length-1,y,T)),h=0;var q=o*b+T;E.lineOffset=Math.max(T,w),f+=q,m=Math.max(q,m),++v}else f+=o,++v}var Z,W=f- -17,G=Iu(a),X=G.horizontalAlign,H=G.verticalAlign;(function(t,e,n,r,i,o,a,s,u){var l,c=(e-n)*i;l=o!==a?-s*r- -17:(-r*u+.5)*a;for(var p=0,h=t;p<h.length;p+=1)for(var f=0,d=h[p].positionedGlyphs;f<d.length;f+=1){var m=d[f];m.x+=c,m.y+=l}})(t.positionedLines,y,X,H,d,m,o,W,i.length),t.top+=-H*W,t.bottom=t.top+W,t.left+=-X*d,t.right=t.left+d}(z,e,n,r,y,a,s,u,p,l,h,m),!function(t){for(var e=0,n=t;e<n.length;e+=1)if(0!==n[e].positionedGlyphs.length)return!1;return!0}(I)&&z}xu.fromFeature=function(t,e){for(var n=new xu,r=0;r<t.sections.length;r++){var i=t.sections[r];i.image?n.addImageSection(i):n.addTextSection(i,e)}return n},xu.prototype.length=function(){return this.text.length},xu.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},xu.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},xu.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},xu.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n+1)||null,i=t.charCodeAt(n-1)||null;e+=r&&Gr(r)&&!Zs[t[n+1]]||i&&Gr(i)&&!Zs[t[n-1]]||!Zs[t[n]]?t[n]:Zs[t[n]]}return e}(this.text)},xu.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&wu[this.text.charCodeAt(e)];e++)t++;for(var n=this.text.length,r=this.text.length-1;r>=0&&r>=t&&wu[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)},xu.prototype.substring=function(t,e){var n=new xu;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n},xu.prototype.toString=function(){return this.text},xu.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,n){return Math.max(e,t.sections[n].scale)}
vendor: 1,043 bytes, line 2
2),0)},xu.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(_u.forText(t.scale,t.fontStack||e));for(var n=this.sections.length-1,r=0;r<t.text.length;++r)this.sectionIndex.push(n)},xu.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(_u.forImage(e)),this.sectionIndex.push(this.sections.length-1)):E("Reached maximum number of images 6401")}else E("Can't add FormattedSection with an empty image.")},xu.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var wu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Eu={};function Su(t,e,n,r,i,o){if(e.imageName){var a=r[e.imageName];return a?a.displaySize[0]*e.scale*24/o+i:0}var s=n[e.fontStack],u=s&&s[t];return u?u.metrics.advance*e.scale+i:0}function Tu(t,e,n,r){var i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}
vendor: 120,441 bytes, line 2
2function ku(t,e,n){var r=0;return 10===t&&(r-=1e4),n&&(r+=150),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Pu(t,e,n,r,i,o){for(var a=null,s=Tu(e,n,i,o),u=0,l=r;u<l.length;u+=1){var c=l[u],p=Tu(e-c.x,n,i,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function Cu(t,e,n,r,i,o,a){if("point"!==o)return[];if(!t)return[];for(var s,u=[],l=function(t,e,n,r,i,o){for(var a=0,s=0;s<t.length();s++){var u=t.getSection(s);a+=Su(t.getCharCode(s),u,r,i,e,o)}return a/Math.max(1,Math.ceil(a/n))}(t,e,n,r,i,a),c=t.text.indexOf("\u200b")>=0,p=0,h=0;h<t.length();h++){var f=t.getSection(h),d=t.getCharCode(h);if(wu[d]||(p+=Su(d,f,r,i,e,a)),h<t.length()-1){var m=!((s=d)<11904||!(qr["Bopomofo Extended"](s)||qr.Bopomofo(s)||qr["CJK Compatibility Forms"](s)||qr["CJK Compatibility Ideographs"](s)||qr["CJK Compatibility"](s)||qr["CJK Radicals Supplement"](s)||qr["CJK Strokes"](s)||qr["CJK Symbols and Punctuation"](s)||qr["CJK Unified Ideographs Extension A"](s)||qr["CJK Unified Ideographs"](s)||qr["Enclosed CJK Letters and Months"](s)||qr["Halfwidth and Fullwidth Forms"](s)||qr.Hiragana(s)||qr["Ideographic Description Characters"](s)||qr["Kangxi Radicals"](s)||qr["Katakana Phonetic Extensions"](s)||qr.Katakana(s)||qr["Vertical Forms"](s)||qr["Yi Radicals"](s)||qr["Yi Syllables"](s)));(Eu[d]||m||f.imageName)&&u.push(Pu(h+1,p,l,u,ku(d,t.getCharCode(h+1),m&&c),!1))}}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Pu(t.length(),p,l,u,0,!0))}function Iu(t){var e=.5,n=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function zu(t,e,n,r,i){if(r||i)for(var o=t[n],a=(t[n].x+o.metrics.advance*o.scale)*r,s=e;s<=n;s++)t[s].x-=a,t[s].y+=i}function Au(t,e,n,r,i,o){var a,s=t.image;if(s.content){var u=s.content,l=s.pixelRatio||1;a=[u[0]/l,u[1]/l,s.displaySize[0]-u[2]/l,s.displaySize[1]-u[3]/l]}var c,p,h,f,d=e.left*o,m=e.right*o;"width"===n||"both"===n?(f=i[0]+d-r[3],p=i[0]+m+r[1]):p=(f=i[0]+(d+m-s.displaySize[0])/2)+s.displaySize[0];var y=e.top*o,v=e.bottom*o;return"height"===n||"both"===n?(c=i[1]+y-r[0],h=i[1]+v+r[2]):h=(c=i[1]+(y+v-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:p,bottom:h,left:f,collisionPadding:a}}Eu[10]=!0,Eu[32]=!0,Eu[38]=!0,Eu[40]=!0,Eu[41]=!0,Eu[43]=!0,Eu[45]=!0,Eu[47]=!0,Eu[173]=!0,Eu[183]=!0,Eu[8203]=!0,Eu[8208]=!0,Eu[8211]=!0,Eu[8231]=!0;var Mu=function(t){function e(e,n,r,i){t.call(this,e,n),this.angle=r,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(i);function Ou(t,e){var n=e.expression;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new oi(t+1))};if("source"===n.kind)return{kind:"source"};for(var r=n.zoomStops,i=n.interpolationType,o=0;o<r.length&&r[o]<=t;)o++;for(var a=o=Math.max(0,o-1);a<r.length&&r[a]<t+1;)a++;a=Math.min(r.length-1,a);var s=r[o],u=r[a];return"composite"===n.kind?{kind:"composite",minZoom:s,maxZoom:u,interpolationType:i}:{kind:"camera",minZoom:s,maxZoom:u,minSize:n.evaluate(new oi(s)),maxSize:n.evaluate(new oi(u)),interpolationType:i}}function Du(t,e,n){var r=e.uSize,i=n.lowerSize;return"source"===t.kind?i/128:"composite"===t.kind?Ve(i/128,n.upperSize/128,e.uSizeT):r}function Lu(t,e){var n=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){var i=t.interpolationType,o=i?c(rn.interpolationFactor(i,e,t.minZoom,t.maxZoom),0,1):0;"camera"===t.kind?r=Ve(t.minSize,t.maxSize,o):n=o}return{uSizeT:n,uSize:r}}Rr("Anchor",Mu);var Ru=Object.freeze({__proto__:null,getSizeData:Ou,evaluateSizeForFeature:Du,evaluateSizeForZoom:Lu,SIZE_PACK_FACTOR:128});function Bu(t,e,n,r,i){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var u=[],l=0;s<n/2;){var c=t[a],p=t[a+1];if(!p)return!1;var h=t[a-1].angleTo(c)-c.angleTo(p);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:h}),l+=h;s-u[0].distance>r;)l-=u.shift().angleDelta;if(l>i)return!1;a++,s+=c.dist(p)}return!0}function Fu(t){for(var e=0,n=0;n<t.length-1;n++)e+=t[n].dist(t[n+1]);return e}function ju(t,e,n){return t?.6*e*n:0}function Nu(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Uu(t,e,n,r,i,o){for(var a=ju(n,i,o),s=Nu(n,r)*o,u=0,l=Fu(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],f=p.dist(h);if(u+f>l){var d=(l-u)/f,m=Ve(p.x,h.x,d),y=Ve(p.y,h.y,d),v=new Mu(m,y,h.angleTo(p),c);return v._round(),!a||Bu(t,v,s,a,e)?v:void 0}u+=f}}function Vu(t,e,n,r,i,o,a,s,u){var l=ju(r,o,a),c=Nu(r,i),p=c*a,h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;return e-p<e/4&&(e=p+e/4),function t(e,n,r,i,o,a,s,u,l){for(var c=a/2,p=Fu(e),h=0,f=n-r,d=[],m=0;m<e.length-1;m++){for(var y=e[m],v=e[m+1],g=y.dist(v),_=v.angleTo(y);f+r<h+g;){var x=((f+=r)-h)/g,b=Ve(y.x,v.x,x),w=Ve(y.y,v.y,x);if(b>=0&&b<l&&w>=0&&w<l&&f-c>=0&&f+c<=p){var E=new Mu(b,w,_,m);E._round(),i&&!Bu(e,E,a,i,o)||d.push(E)}}h+=g}return u||d.length||s||(d=t(e,h/2,r,i,o,a,s,!0,l)),d}(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,l,n,p,h,!1,u)}function qu(t,e,n,r,o){for(var a=[],s=0;s<t.length;s++)for(var u=t[s],l=void 0,c=0;c<u.length-1;c++){var p=u[c],h=u[c+1];p.x<e&&h.x<e||(p.x<e?p=new i(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x<e&&(h=new i(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y<n&&h.y<n||(p.y<n?p=new i(p.x+(n-p.y)/(h.y-p.y)*(h.x-p.x),n)._round():h.y<n&&(h=new i(p.x+(n-p.y)/(h.y-p.y)*(h.x-p.x),n)._round()),p.x>=r&&h.x>=r||(p.x>=r?p=new i(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=r&&(h=new i(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new i(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new i(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),l&&p.equals(l[l.length-1])||a.push(l=[p]),l.push(h)))))}return a}function Zu(t,e,n,r){var o=[],a=t.image,s=a.pixelRatio,u=a.paddedRect.w-2,l=a.paddedRect.h-2,c=t.right-t.left,p=t.bottom-t.top,h=a.stretchX||[[0,u]],f=a.stretchY||[[0,l]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),y=f.reduce(d,0),v=u-m,g=l-y,_=0,x=m,b=0,w=y,E=0,S=v,T=0,k=g;if(a.content&&r){var P=a.content;_=Wu(h,0,P[0]),b=Wu(f,0,P[1]),x=Wu(h,P[0],P[2]),w=Wu(f,P[1],P[3]),E=P[0]-_,T=P[1]-b,S=P[2]-P[0]-x,k=P[3]-P[1]-w}var C=function(r,o,u,l){var h=Xu(r.stretch-_,x,c,t.left),f=Hu(r.fixed-E,S,r.stretch,m),d=Xu(o.stretch-b,w,p,t.top),v=Hu(o.fixed-T,k,o.stretch,y),g=Xu(u.stretch-_,x,c,t.left),P=Hu(u.fixed-E,S,u.stretch,m),C=Xu(l.stretch-b,w,p,t.top),I=Hu(l.fixed-T,k,l.stretch,y),z=new i(h,d),A=new i(g,d),M=new i(g,C),O=new i(h,C),D=new i(f/s,v/s),L=new i(P/s,I/s),R=e*Math.PI/180;if(R){var B=Math.sin(R),F=Math.cos(R),j=[F,-B,B,F];z._matMult(j),A._matMult(j),O._matMult(j),M._matMult(j)}var N=r.stretch+r.fixed,U=o.stretch+o.fixed;return{tl:z,tr:A,bl:O,br:M,tex:{x:a.paddedRect.x+1+N,y:a.paddedRect.y+1+U,w:u.stretch+u.fixed-N,h:l.stretch+l.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:L,minFontScaleX:S/s/c,minFontScaleY:k/s/p,isSDF:n}};if(r&&(a.stretchX||a.stretchY))for(var I=Gu(h,v,m),z=Gu(f,g,y),A=0;A<I.length-1;A++)for(var M=I[A],O=I[A+1],D=0;D<z.length-1;D++)o.push(C(M,z[D],O,z[D+1]));else o.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:u+1},{fixed:0,stretch:l+1}));return o}function Wu(t,e,n){for(var r=0,i=0,o=t;i<o.length;i+=1){var a=o[i];r+=Math.max(e,Math.min(n,a[1]))-Math.max(e,Math.min(n,a[0]))}return r}function Gu(t,e,n){for(var r=[{fixed:-1,stretch:0}],i=0,o=t;i<o.length;i+=1){var a=o[i],s=a[0],u=a[1],l=r[r.length-1];r.push({fixed:s-l.stretch,stretch:l.stretch}),r.push({fixed:s-l.stretch,stretch:l.stretch+(u-s)})}return r.push({fixed:e+1,stretch:n}),r}function Xu(t,e,n,r){return t/e*n+r}function Hu(t,e,n,r){return t-e*n/r}var Ku=function(t,e,n,r,o,a,s,u,l,c){if(this.boxStartIndex=t.length,l){var p=a.top,h=a.bottom,f=a.collisionPadding;f&&(p-=f[1],h+=f[3]);var d=h-p;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-u,y=a.bottom*s+u,v=a.left*s-u,g=a.right*s+u,_=a.collisionPadding;if(_&&(v-=_[0]*s,m-=_[1]*s,g+=_[2]*s,y+=_[3]*s),c){var x=new i(v,m),b=new i(g,m),w=new i(v,y),E=new i(g,y),S=c*Math.PI/180;x._rotate(S),b._rotate(S),w._rotate(S),E._rotate(S),v=Math.min(x.x,b.x,w.x,E.x),g=Math.max(x.x,b.x,w.x,E.x),m=Math.min(x.y,b.y,w.y,E.y),y=Math.max(x.y,b.y,w.y,E.y)}t.emplaceBack(e.x,e.y,v,m,g,y,n,r,o)}this.boxEndIndex=t.length},Yu=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Ju),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Ju(t,e){return t<e?-1:t>e?1:0}function $u(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,u=t[0],l=0;l<u.length;l++){var c=u[l];(!l||c.x<r)&&(r=c.x),(!l||c.y<o)&&(o=c.y),(!l||c.x>a)&&(a=c.x),(!l||c.y>s)&&(s=c.y)}var p=Math.min(a-r,s-o),h=p/2,f=new Yu([],Qu);if(0===p)return new i(r,o);for(var d=r;d<a;d+=p)for(var m=o;m<s;m+=p)f.push(new tl(d+h,m+h,h,t));for(var y=function(t){for(var e=0,n=0,r=0,i=t[0],o=0,a=i.length,s=a-1;o<a;s=o++){var u=i[o],l=i[s],c=u.x*l.y-l.x*u.y;n+=(u.x+l.x)*c,r+=(u.y+l.y)*c,e+=3*c}return new tl(n/e,r/e,0,t)}(t),v=f.length;f.length;){var g=f.pop();(g.d>y.d||!y.d)&&(y=g,n&&console.log("found best %d after %d probes",Math.round(1e4*g.d)/1e4,v)),g.max-y.d<=e||(f.push(new tl(g.p.x-(h=g.h/2),g.p.y-h,h,t)),f.push(new tl(g.p.x+h,g.p.y-h,h,t)),f.push(new tl(g.p.x-h,g.p.y+h,h,t)),f.push(new tl(g.p.x+h,g.p.y+h,h,t)),v+=4)}return n&&(console.log("num probes: "+v),console.log("best distance: "+y.d)),y.p}function Qu(t,e){return e.max-t.max}function tl(t,e,n,r){this.p=new i(t,e),this.h=n,this.d=function(t,e){for(var n=!1,r=1/0,i=0;i<e.length;i++)for(var o=e[i],a=0,s=o.length,u=s-1;a<s;u=a++){var l=o[a],c=o[u];l.y>t.y!=c.y>t.y&&t.x<(c.x-l.x)*(t.y-l.y)/(c.y-l.y)+l.x&&(n=!n),r=Math.min(r,Ho(t,l,c))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Yu.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Yu.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Yu.prototype.peek=function(){return this.data[0]},Yu.prototype._up=function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},Yu.prototype._down=function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&n(e[s],a)<0&&(o=s,a=e[s]),n(a,i)>=0)break;e[t]=a,t=o}e[t]=i};var el=Number.POSITIVE_INFINITY;function nl(t,e){return e[1]!==el?function(t,e,n){var r=0,i=0;switch(e=Math.abs(e),n=Math.abs(n),t){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,i]}(t,e[0],e[1]):function(t,e){var n=0,r=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=e;break;case"right":n=-e}return[n,r]}(t,e[0])}function rl(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function il(t,e,n,r,o,a,s,u,l,c,p,h,f,d,m){var y=function(t,e,n,r,o,a,s,u){for(var l=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,h=e.positionedLines;p<h.length;p+=1)for(var f=h[p],d=0,m=f.positionedGlyphs;d<m.length;d+=1){var y=m[d];if(y.rect){var v=y.rect||{},g=4,_=!0,x=1,b=0,w=(o||u)&&y.vertical,E=y.metrics.advance*y.scale/2;if(u&&e.verticalizable&&(b=f.lineOffset/2-(y.imageName?-(24-y.metrics.width*y.scale)/2:24*(y.scale-1))),y.imageName){var S=s[y.imageName];_=S.sdf,g=1/(x=S.pixelRatio)}var T=o?[y.x+E,y.y]:[0,0],k=o?[0,0]:[y.x+E+n[0],y.y+n[1]-b],P=[0,0];w&&(P=k,k=[0,0]);var C=(y.metrics.left-g)*y.scale-E+k[0],I=(-y.metrics.top-g)*y.scale+k[1],z=C+v.w*y.scale/x,A=I+v.h*y.scale/x,M=new i(C,I),O=new i(z,I),D=new i(C,A),L=new i(z,A);if(w){var R=new i(-E,E- -17),B=-Math.PI/2,F=12-E,j=new i(22-F,-(y.imageName?F:0)),N=new(Function.prototype.bind.apply(i,[null].concat(P)));M._rotateAround(B,R)._add(j)._add(N),O._rotateAround(B,R)._add(j)._add(N),D._rotateAround(B,R)._add(j)._add(N),L._rotateAround(B,R)._add(j)._add(N)}if(l){var U=Math.sin(l),V=Math.cos(l),q=[V,-U,U,V];M._matMult(q),O._matMult(q),D._matMult(q),L._matMult(q)}var Z=new i(0,0),W=new i(0,0);c.push({tl:M,tr:O,bl:D,br:L,tex:v,writingMode:e.writingMode,glyphOffset:T,sectionIndex:y.sectionIndex,isSDF:_,pixelOffsetTL:Z,pixelOffsetBR:W,minFontScaleX:0,minFontScaleY:0})}}return c}(0,n,u,o,a,s,r,t.allowVerticalPlacement),v=t.textSizeData,g=null;"source"===v.kind?(g=[128*o.layout.get("text-size").evaluate(s,{})])[0]>32640&&E(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===v.kind&&((g=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||g[1]>32640)&&E(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,y,g,u,a,s,c,e,l.lineStartIndex,l.lineLength,f,m);for(var _=0,x=p;_<x.length;_+=1)h[x[_]]=t.text.placedSymbolArray.length-1;return 4*y.length}function ol(t){for(var e in t)return t[e];return null}function al(t,e,n,r){var i=t.compareText;if(e in i){for(var o=i[e],a=o.length-1;a>=0;a--)if(r.dist(o[a])<n)return!0}else i[e]=[];return i[e].push(r),!1}var sl=vs.VectorTileFeature.types,ul=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ll(t,e,n,r,i,o,a,s,u,l,c,p,h){var f=s?Math.min(32640,Math.round(s[0])):0,d=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,n,Math.round(32*r),Math.round(32*i),o,a,(f<<1)+(u?1:0),d,16*l,16*c,256*p,256*h)}function cl(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}function pl(t){for(var e=0,n=t.sections;e<n.length;e+=1)if(Kr(n[e].text))return!0;return!1}var hl=function(t){this.layoutVertexArray=new Mi,this.indexArray=new ji,this.programConfigurations=t,this.segments=new oo,this.dynamicLayoutVertexArray=new Oi,this.opacityVertexArray=new Di,this.placedSymbolArray=new Ji};hl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},hl.prototype.upload=function(t,e,n,r){this.isEmpty()||(n&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Fs.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,js.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ul,!0),this.opacityVertexBuffer.itemSize=1),(n||r)&&this.programConfigurations.upload(t))},hl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Rr("SymbolBuffers",hl);var fl=function(t,e,n){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new n,this.segments=new oo,this.collisionVertexArray=new Fi};fl.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Ns.members,!0)},fl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Rr("CollisionBuffers",fl);var dl=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ia([]),this.placementViewportMatrix=ia([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ou(this.zoom,e["text-size"]),this.iconSizeData=Ou(this.zoom,e["icon-size"]);var n=this.layers[0].layout,r=n.get("symbol-sort-key"),i=n.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==i&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey)&&(n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement")),"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map((function(t){return gu[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID};dl.prototype.createArrays=function(){this.text=new hl(new Oo(this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new hl(new Oo(this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.glyphOffsetArray=new to,this.lineVertexArray=new eo,this.symbolInstances=new Qi},dl.prototype.calculateGlyphDependencies=function(t,e,n,r,i){for(var o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(n||r)&&i){var a=Zs[t.charAt(o)];a&&(e[a.charCodeAt(0)]=!0)}},dl.prototype.populate=function(t,e,n){var r=this.layers[0],i=r.layout,o=i.get("text-font"),a=i.get("text-field"),s=i.get("icon-image"),u=("constant"!==a.value.kind||a.value.value instanceof ee&&!a.value.value.isEmpty()||a.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),l="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],u||l){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new oi(this.zoom),m=0,y=t;m<y.length;m+=1){var v=y[m],g=v.feature,_=v.id,x=v.index,b=v.sourceLayerIndex,w=r._featureFilter.needGeometry,E={type:g.type,id:_,properties:g.properties,geometry:w?Fo(g):[]};if(r._featureFilter.filter(d,E,n)){w||(E.geometry=Fo(g));var S=void 0;if(u){var T=r.getValueAndResolveTokens("text-field",E,n,f),k=ee.factory(T);pl(k)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===ni()||this.hasRTLText&&ii.isParsed())&&(S=qs(k,r,E))}var P=void 0;if(l){var C=r.getValueAndResolveTokens("icon-image",E,n,f);P=C instanceof ne?C:ne.fromString(C)}if(S||P){var I=this.sortFeaturesByKey?c.evaluate(E,{},n):void 0,z={id:_,text:S,icon:P,index:x,sourceLayerIndex:b,geometry:Fo(g),properties:g.properties,type:sl[g.type],sortKey:I};if(this.features.push(z),P&&(p[P.name]=!0),S){var A=o.evaluate(E,{},n).join(","),M="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(gu.vertical)>=0;for(var O=0,D=S.sections;O<D.length;O+=1){var L=D[O];if(L.image)p[L.image.name]=!0;else{var R=Zr(S.toString()),B=L.fontStack||A,F=h[B]=h[B]||{};this.calculateGlyphDependencies(L.text,F,M,this.allowVerticalPlacement,R)}}}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},n={},r=[],i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){var o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){var o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function u(t,e,n){var r=n?e[0][e[0].length-1]:e[0][0];return t+":"+r.x+":"+r.y}for(var l=0;l<t.length;l++){var c=t[l],p=c.geometry,h=c.text?c.text.toString():null;if(h){var f=u(h,p),d=u(h,p,!0);if(f in n&&d in e&&n[f]!==e[d]){var m=s(f,d,p),y=a(f,d,r[m].geometry);delete e[f],delete n[d],n[u(h,r[y].geometry,!0)]=y,r[m].geometry=null}else f in n?a(f,d,p):d in e?s(f,d,p):(o(l),e[f]=i-1,n[d]=i-1)}else o(l)}return r.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}))}},dl.prototype.update=function(t,e,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,n),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,n))},dl.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},dl.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},dl.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},dl.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},dl.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},dl.prototype.addToLineVertexArray=function(t,e){var n=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}},dl.prototype.addSymbols=function(t,e,n,r,i,o,a,s,u,l,c,p){for(var h=t.indexArray,f=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,f,h,o.sortKey),m=this.glyphOffsetArray.length,y=d.vertexLength,v=this.allowVerticalPlacement&&a===gu.vertical?Math.PI/2:0,g=o.text&&o.text.sections,_=0;_<e.length;_++){var x=e[_],b=x.tl,w=x.tr,E=x.bl,S=x.br,T=x.tex,k=x.pixelOffsetTL,P=x.pixelOffsetBR,C=x.minFontScaleX,I=x.minFontScaleY,z=x.glyphOffset,A=x.isSDF,M=x.sectionIndex,O=d.vertexLength,D=z[1];ll(f,s.x,s.y,b.x,D+b.y,T.x,T.y,n,A,k.x,k.y,C,I),ll(f,s.x,s.y,w.x,D+w.y,T.x+T.w,T.y,n,A,P.x,k.y,C,I),ll(f,s.x,s.y,E.x,D+E.y,T.x,T.y+T.h,n,A,k.x,P.y,C,I),ll(f,s.x,s.y,S.x,D+S.y,T.x+T.w,T.y+T.h,n,A,P.x,P.y,C,I),cl(t.dynamicLayoutVertexArray,s,v),h.emplaceBack(O,O+1,O+2),h.emplaceBack(O+1,O+2,O+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(z[0]),_!==e.length-1&&M===e[_+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,o,o.index,{},p,g&&g[M])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,y,u,l,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,0,!1,0,c)},dl.prototype._addCollisionDebugVertex=function(t,e,n,r,i,o){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r,i,Math.round(o.x),Math.round(o.y))},dl.prototype.addCollisionDebugVertices=function(t,e,n,r,o,a,s){var u=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),l=u.vertexLength,c=o.layoutVertexArray,p=o.collisionVertexArray,h=s.anchorX,f=s.anchorY;this._addCollisionDebugVertex(c,p,a,h,f,new i(t,e)),this._addCollisionDebugVertex(c,p,a,h,f,new i(n,e)),this._addCollisionDebugVertex(c,p,a,h,f,new i(n,r)),this._addCollisionDebugVertex(c,p,a,h,f,new i(t,r)),u.vertexLength+=4;var d=o.indexArray;d.emplaceBack(l,l+1),d.emplaceBack(l+1,l+2),d.emplaceBack(l+2,l+3),d.emplaceBack(l+3,l),u.primitiveLength+=4},dl.prototype.addDebugCollisionBoxes=function(t,e,n,r){for(var i=t;i<e;i++){var o=this.collisionBoxArray.get(i);this.addCollisionDebugVertices(o.x1,o.y1,o.x2,o.y2,r?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,n)}},dl.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new fl(Ri,Us.members,Wi),this.iconCollisionBox=new fl(Ri,Us.members,Wi);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},dl.prototype._deserializeCollisionBoxesForSymbol=function(t,e,n,r,i,o,a,s,u){for(var l={},c=e;c<n;c++){var p=t.get(c);l.textBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},l.textFeatureIndex=p.featureIndex;break}for(var h=r;h<i;h++){var f=t.get(h);l.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},l.verticalTextFeatureIndex=f.featureIndex;break}for(var d=o;d<a;d++){var m=t.get(d);l.iconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},l.iconFeatureIndex=m.featureIndex;break}for(var y=s;y<u;y++){var v=t.get(y);l.verticalIconBox={x1:v.x1,y1:v.y1,x2:v.x2,y2:v.y2,anchorPointX:v.anchorPointX,anchorPointY:v.anchorPointY},l.verticalIconFeatureIndex=v.featureIndex;break}return l},dl.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var n=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}},dl.prototype.hasTextData=function(){return this.text.segments.get().length>0},dl.prototype.hasIconData=function(){return this.icon.segments.get().length>0},dl.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},dl.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},dl.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},dl.prototype.addIndicesForPlacedSymbol=function(t,e){for(var n=t.placedSymbolArray.get(e),r=n.vertexStartIndex+4*n.numGlyphs,i=n.vertexStartIndex;i<r;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)},dl.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),n=Math.cos(t),r=[],i=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);r.push(0|Math.round(e*s.anchorX+n*s.anchorY)),i.push(s.featureIndex)}return o.sort((function(t,e){return r[t]-r[e]||i[e]-i[t]})),o},dl.prototype.addToSortKeyRanges=function(t,e){var n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===e?n.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},dl.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n<r.length;n+=1){var i=this.symbolInstances.get(r[n]);this.featureSortOrder.push(i.featureIndex),[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((function(t,n,r){t>=0&&r.indexOf(t)===n&&e.addIndicesForPlacedSymbol(e.text,t)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,i.verticalPlacedTextSymbolIndex),i.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.placedIconSymbolIndex),i.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Rr("SymbolBucket",dl,{omit:["layers","collisionBoxArray","features","compareText"]}),dl.MAX_GLYPHS=65535,dl.addDynamicAttributes=cl;var ml=new _i({"symbol-placement":new di(Pt.layout_symbol["symbol-placement"]),"symbol-spacing":new di(Pt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new di(Pt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new mi(Pt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new di(Pt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new di(Pt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new di(Pt.layout_symbol["icon-ignore-placement"]),"icon-optional":new di(Pt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new di(Pt.layout_symbol["icon-rotation-alignment"]),"icon-size":new mi(Pt.layout_symbol["icon-size"]),"icon-text-fit":new di(Pt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new di(Pt.layout_symbol["icon-text-fit-padding"]),"icon-image":new mi(Pt.layout_symbol["icon-image"]),"icon-rotate":new mi(Pt.layout_symbol["icon-rotate"]),"icon-padding":new di(Pt.layout_symbol["icon-padding"]),"icon-keep-upright":new di(Pt.layout_symbol["icon-keep-upright"]),"icon-offset":new mi(Pt.layout_symbol["icon-offset"]),"icon-anchor":new mi(Pt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new di(Pt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new di(Pt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new di(Pt.layout_symbol["text-rotation-alignment"]),"text-field":new mi(Pt.layout_symbol["text-field"]),"text-font":new mi(Pt.layout_symbol["text-font"]),"text-size":new mi(Pt.layout_symbol["text-size"]),"text-max-width":new mi(Pt.layout_symbol["text-max-width"]),"text-line-height":new di(Pt.layout_symbol["text-line-height"]),"text-letter-spacing":new mi(Pt.layout_symbol["text-letter-spacing"]),"text-justify":new mi(Pt.layout_symbol["text-justify"]),"text-radial-offset":new mi(Pt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new di(Pt.layout_symbol["text-variable-anchor"]),"text-anchor":new mi(Pt.layout_symbol["text-anchor"]),"text-max-angle":new di(Pt.layout_symbol["text-max-angle"]),"text-writing-mode":new di(Pt.layout_symbol["text-writing-mode"]),"text-rotate":new mi(Pt.layout_symbol["text-rotate"]),"text-padding":new di(Pt.layout_symbol["text-padding"]),"text-keep-upright":new di(Pt.layout_symbol["text-keep-upright"]),"text-transform":new mi(Pt.layout_symbol["text-transform"]),"text-offset":new mi(Pt.layout_symbol["text-offset"]),"text-allow-overlap":new di(Pt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new di(Pt.layout_symbol["text-ignore-placement"]),"text-optional":new di(Pt.layout_symbol["text-optional"])}),yl={paint:new _i({"icon-opacity":new mi(Pt.paint_symbol["icon-opacity"]),"icon-color":new mi(Pt.paint_symbol["icon-color"]),"icon-halo-color":new mi(Pt.paint_symbol["icon-halo-color"]),"icon-halo-width":new mi(Pt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new mi(Pt.paint_symbol["icon-halo-blur"]),"icon-translate":new di(Pt.paint_symbol["icon-translate"]),"icon-translate-anchor":new di(Pt.paint_symbol["icon-translate-anchor"]),"text-opacity":new mi(Pt.paint_symbol["text-opacity"]),"text-color":new mi(Pt.paint_symbol["text-color"],{runtimeType:jt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new mi(Pt.paint_symbol["text-halo-color"]),"text-halo-width":new mi(Pt.paint_symbol["text-halo-width"]),"text-halo-blur":new mi(Pt.paint_symbol["text-halo-blur"]),"text-translate":new di(Pt.paint_symbol["text-translate"]),"text-translate-anchor":new di(Pt.paint_symbol["text-translate-anchor"])}),layout:ml},vl=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Lt,this.defaultValue=t};vl.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},vl.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},vl.prototype.outputDefined=function(){return!1},vl.prototype.serialize=function(){return null},Rr("FormatSectionOverride",vl,{omit:["defaultValue"]});var gl=function(t){function e(e){t.call(this,e,yl)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,n){if(t.prototype.recalculate.call(this,e,n),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var i=[],o=0,a=r;o<a.length;o+=1){var s=a[o];i.indexOf(s)<0&&i.push(s)}this.layout._values["text-writing-mode"]=i}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(t,e,n,r){var i=this.layout.get(t).evaluate(e,{},n,r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||Zn(o.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,(function(e,n){return n in t?String(t[n]):""}))}(e.properties,i)},e.prototype.createBucket=function(t){return new dl(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,n=yl.paint.overridableProperties;t<n.length;t+=1){var r=n[t];if(e.hasPaintOverride(this.layout,r)){var i,o=this.paint.get(r),a=new vl(o),s=new qn(a,o.property.specification);i="constant"===o.value.kind||"source"===o.value.kind?new Gn("source",s):new Xn("composite",s,o.value.zoomStops,o.value._interpolationType),this.paint._values[r]=new hi(o.property,i,o.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(t,n,r){return!(!this.layout||n.isDataDriven()||r.isDataDriven())&&e.hasPaintOverride(this.layout,t)},e.hasPaintOverride=function(t,e){var n=t.get("text-field"),r=yl.paint.properties[e],i=!1,o=function(t){for(var e=0,n=t;e<n.length;e+=1)if(r.overrides&&r.overrides.hasOverride(n[e]))return void(i=!0)};if("constant"===n.value.kind&&n.value.value instanceof ee)o(n.value.value.sections);else if("source"===n.value.kind){var a=n.value;a._styleExpression&&function t(e){i||(e instanceof se&&oe(e.value)===qt?o(e.value.sections):e instanceof pe?o(e.sections):e.eachChild(t))}(a._styleExpression.expression)}return i},e}(xi),_l={paint:new _i({"background-color":new di(Pt.paint_background["background-color"]),"background-pattern":new vi(Pt.paint_background["background-pattern"]),"background-opacity":new di(Pt.paint_background["background-opacity"])})},xl=function(t){function e(e){t.call(this,e,_l)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(xi),bl={paint:new _i({"raster-opacity":new di(Pt.paint_raster["raster-opacity"]),"raster-hue-rotate":new di(Pt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new di(Pt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new di(Pt.paint_raster["raster-brightness-max"]),"raster-saturation":new di(Pt.paint_raster["raster-saturation"]),"raster-contrast":new di(Pt.paint_raster["raster-contrast"]),"raster-resampling":new di(Pt.paint_raster["raster-resampling"]),"raster-fade-duration":new di(Pt.paint_raster["raster-fade-duration"])})},wl=function(t){function e(e){t.call(this,e,bl)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(xi),El=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(xi),Sl={circle:la,heatmap:_a,hillshade:ba,fill:ss,"fill-extrusion":Ss,line:Rs,symbol:gl,background:xl,raster:wl},Tl=a.HTMLImageElement,kl=a.HTMLCanvasElement,Pl=a.HTMLVideoElement,Cl=a.ImageData,Il=a.ImageBitmap,zl=function(t,e,n,r){this.context=t,this.format=n,this.texture=t.gl.createTexture(),this.update(e,r)};zl.prototype.update=function(t,e,n){var r=t.width,i=t.height,o=!(this.size&&this.size[0]===r&&this.size[1]===i||n),a=this.context,s=a.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),o)this.size=[r,i],t instanceof Tl||t instanceof kl||t instanceof Pl||t instanceof Cl||Il&&t instanceof Il?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,r,i,0,this.format,s.UNSIGNED_BYTE,t.data);else{var u=n||{x:0,y:0},l=u.x,c=u.y;t instanceof Tl||t instanceof kl||t instanceof Pl||t instanceof Cl||Il&&t instanceof Il?s.texSubImage2D(s.TEXTURE_2D,0,l,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,l,c,r,i,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},zl.prototype.bind=function(t,e,n){var r=this.context.gl;r.bindTexture(r.TEXTURE_2D,this.texture),n!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=r.LINEAR),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n||t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)},zl.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},zl.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Al=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};Al.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){t._triggered=!1,t._callback()}),0))},Al.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Ml=function(t,e,n){this.target=t,this.parent=e,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v(["receive","process"],this),this.invoker=new Al(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=k()?t:a};function Ol(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}Ml.prototype.send=function(t,e,n,r,i){var o=this;void 0===i&&(i=!1);var a=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[a]=n);var s=I(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:Nr(e,s)},s),{cancel:function(){n&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:o.mapId})}}},Ml.prototype.receive=function(t){var e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else k()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Ml.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Ml.prototype.processTask=function(t,e){var n=this;if("<response>"===e.type){var r=this.callbacks[t];delete this.callbacks[t],r&&(e.error?r(Ur(e.error)):r(null,Ur(e.data)))}else{var i=!1,o=I(this.globalScope)?void 0:[],a=e.hasCallback?function(e,r){i=!0,delete n.cancelCallbacks[t],n.target.postMessage({id:t,type:"<response>",sourceMapId:n.mapId,error:e?Nr(e):null,data:Nr(r,o)},o)}:function(t){i=!0},s=null,u=Ur(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,u,a);else if(this.parent.getWorkerSource){var l=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,l[0],u.source)[l[1]](u,a)}else a(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Ml.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Dl=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Dl.prototype.setNorthEast=function(t){return this._ne=t instanceof Ll?new Ll(t.lng,t.lat):Ll.convert(t),this},Dl.prototype.setSouthWest=function(t){return this._sw=t instanceof Ll?new Ll(t.lng,t.lat):Ll.convert(t),this},Dl.prototype.extend=function(t){var e,n,r=this._sw,i=this._ne;if(t instanceof Ll)e=t,n=t;else{if(!(t instanceof Dl))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Dl.convert(t)):this.extend(Ll.convert(t)):this;if(n=t._ne,!(e=t._sw)||!n)return this}return r||i?(r.lng=Math.min(e.lng,r.lng),r.lat=Math.min(e.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new Ll(e.lng,e.lat),this._ne=new Ll(n.lng,n.lat)),this},Dl.prototype.getCenter=function(){return new Ll((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Dl.prototype.getSouthWest=function(){return this._sw},Dl.prototype.getNorthEast=function(){return this._ne},Dl.prototype.getNorthWest=function(){return new Ll(this.getWest(),this.getNorth())},Dl.prototype.getSouthEast=function(){return new Ll(this.getEast(),this.getSouth())},Dl.prototype.getWest=function(){return this._sw.lng},Dl.prototype.getSouth=function(){return this._sw.lat},Dl.prototype.getEast=function(){return this._ne.lng},Dl.prototype.getNorth=function(){return this._ne.lat},Dl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Dl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Dl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Dl.prototype.contains=function(t){var e=Ll.convert(t),n=e.lng,r=e.lat,i=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&i},Dl.convert=function(t){return!t||t instanceof Dl?t:new Dl(t)};var Ll=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ll.prototype.wrap=function(){return new Ll(p(this.lng,-180,180),this.lat)},Ll.prototype.toArray=function(){return[this.lng,this.lat]},Ll.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ll.prototype.distanceTo=function(t){var e=Math.PI/180,n=this.lat*e,r=t.lat*e,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Ll.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Dl(new Ll(this.lng-n,this.lat-e),new Ll(this.lng+n,this.lat+e))},Ll.convert=function(t){if(t instanceof Ll)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Ll(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Ll(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Rl=2*Math.PI*6371008.8;function Bl(t){return Rl*Math.cos(t*Math.PI/180)}function Fl(t){return(180+t)/360}function jl(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Nl(t,e){return t/Bl(e)}function Ul(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Vl=function(t,e,n){void 0===n&&(n=0),this.x=+t,this.y=+e,this.z=+n};Vl.fromLngLat=function(t,e){void 0===e&&(e=0);var n=Ll.convert(t);return new Vl(Fl(n.lng),jl(n.lat),Nl(e,n.lat))},Vl.prototype.toLngLat=function(){return new Ll(360*this.x-180,Ul(this.y))},Vl.prototype.toAltitude=function(){return this.z*Bl(Ul(this.y))},Vl.prototype.meterInMercatorCoordinateUnits=function(){return 1/Rl*(t=Ul(this.y),1/Math.cos(t*Math.PI/180));var t};var ql=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=Gl(0,t,t,e,n)};ql.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},ql.prototype.url=function(t,e){var n,r,i,o,a,s=(r=this.y,i=this.z,o=Ol(256*(n=this.x),256*(r=Math.pow(2,i)-r-1),i),a=Ol(256*(n+1),256*(r+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),u=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",u).replace("{bbox-epsg-3857}",s)},ql.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new i(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},ql.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Zl=function(t,e){this.wrap=t,this.canonical=e,this.key=Gl(t,e.z,e.z,e.x,e.y)},Wl=function(t,e,n,r,i){this.overscaledZ=t,this.wrap=e,this.canonical=new ql(n,+r,+i),this.key=Gl(e,t,n,r,i)};function Gl(t,e,n,r,i){(t*=2)<0&&(t=-1*t-1);var o=1<<n;return(o*o*t+o*i+r).toString(36)+n.toString(36)+e.toString(36)}Wl.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Wl.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Wl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Wl.prototype.calculateScaledKey=function(t,e){var n=this.canonical.z-t;return t>this.canonical.z?Gl(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Gl(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)},Wl.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Wl.prototype.children=function(t){if(this.overscaledZ>=t)return[new Wl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Wl(e,this.wrap,e,n,r),new Wl(e,this.wrap,e,n+1,r),new Wl(e,this.wrap,e,n,r+1),new Wl(e,this.wrap,e,n+1,r+1)]},Wl.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Wl.prototype.wrapped=function(){return new Wl(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Wl.prototype.unwrapTo=function(t){return new Wl(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Wl.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Wl.prototype.toUnwrapped=function(){return new Zl(this.wrap,this.canonical)},Wl.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Wl.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Vl(t.x-this.wrap,t.y))},Rr("CanonicalTileID",ql),Rr("OverscaledTileID",Wl,{omit:["posMatrix"]});var Xl=function(t,e,n){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return E('"'+n+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=e.height;var r=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=n||"mapbox";for(var i=0;i<r;i++)this.data[this._idx(-1,i)]=this.data[this._idx(0,i)],this.data[this._idx(r,i)]=this.data[this._idx(r-1,i)],this.data[this._idx(i,-1)]=this.data[this._idx(i,0)],this.data[this._idx(i,r)]=this.data[this._idx(i,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)],this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)],this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)]};Xl.prototype.get=function(t,e){var n=new Uint8Array(this.data.buffer),r=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(n[r],n[r+1],n[r+2])},Xl.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Xl.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Xl.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},Xl.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},Xl.prototype.getPixels=function(){return new ya({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Xl.prototype.backfillBorder=function(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var r=e*this.dim,i=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,u=-n*this.dim,l=o;l<a;l++)for(var c=r;c<i;c++)this.data[this._idx(c,l)]=t.data[this._idx(c+s,l+u)]},Rr("DEMData",Xl);var Hl=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var n=t[e];this._stringToNumber[n]=e,this._numberToString[e]=n}};Hl.prototype.encode=function(t){return this._stringToNumber[t]},Hl.prototype.decode=function(t){return this._numberToString[t]};var Kl=function(t,e,n,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=n,t._y=r,this.properties=t.properties,this.id=i},Yl={geometry:{configurable:!0}};Yl.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Yl.geometry.set=function(t){this._geometry=t},Kl.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Kl.prototype,Yl);var Jl=function(){this.state={},this.stateChanges={},this.deletedStates={}};Jl.prototype.updateState=function(t,e,n){var r=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][r]=this.stateChanges[t][r]||{},h(this.stateChanges[t][r],n),null===this.deletedStates[t])for(var i in this.deletedStates[t]={},this.state[t])i!==r&&(this.deletedStates[t][i]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][r])for(var o in this.deletedStates[t][r]={},this.state[t][r])n[o]||(this.deletedStates[t][r][o]=null);else for(var a in n)this.deletedStates[t]&&this.deletedStates[t][r]&&null===this.deletedStates[t][r][a]&&delete this.deletedStates[t][r][a]},Jl.prototype.removeFeatureState=function(t,e,n){if(null!==this.deletedStates[t]){var r=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},n&&void 0!==e)null!==this.deletedStates[t][r]&&(this.deletedStates[t][r]=this.deletedStates[t][r]||{},this.deletedStates[t][r][n]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][r])for(n in this.deletedStates[t][r]={},this.stateChanges[t][r])this.deletedStates[t][r][n]=null;else this.deletedStates[t][r]=null;else this.deletedStates[t]=null}},Jl.prototype.getState=function(t,e){var n=String(e),r=h({},(this.state[t]||{})[n],(this.stateChanges[t]||{})[n]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var i=this.deletedStates[t][e];if(null===i)return{};for(var o in i)delete r[o]}return r},Jl.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Jl.prototype.coalesceChanges=function(t,e){var n={};for(var r in this.stateChanges){this.state[r]=this.state[r]||{};var i={};for(var o in this.stateChanges[r])this.state[r][o]||(this.state[r][o]={}),h(this.state[r][o],this.stateChanges[r][o]),i[o]=this.state[r][o];n[r]=i}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var u in this.state[a])s[u]={},this.state[a][u]={};else for(var l in this.deletedStates[a]){if(null===this.deletedStates[a][l])this.state[a][l]={};else for(var c=0,p=Object.keys(this.deletedStates[a][l]);c<p.length;c+=1)delete this.state[a][l][p[c]];s[l]=this.state[a][l]}n[a]=n[a]||{},h(n[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(var f in t)t[f].setFeatureState(n,e)};var $l=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ar(8192,16,0),this.grid3D=new Ar(8192,16,0),this.featureIndexArray=new ro,this.promoteId=e};function Ql(t,e,n,r,i){return _(t,(function(t,o){var a=e instanceof fi?e.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a}))}function tc(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),n=Math.min(n,s.y),r=Math.max(r,s.x),i=Math.max(i,s.y)}return{minX:e,minY:n,maxX:r,maxY:i}}function ec(t,e){return e-t}$l.prototype.insert=function(t,e,n,r,i,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var s=o?this.grid3D:this.grid,u=0;u<e.length;u++){for(var l=e[u],c=[1/0,1/0,-1/0,-1/0],p=0;p<l.length;p++){var h=l[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<8192&&c[1]<8192&&c[2]>=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},$l.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vs.VectorTile(new Xs(this.rawTileData)).layers,this.sourceLayerCoder=new Hl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},$l.prototype.query=function(t,e,n,r){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,u=ir(a.filter),l=t.queryGeometry,c=t.queryPadding*s,p=tc(l),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),f=tc(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(e,n,r,o){return function(t,e,n,r,o){for(var a=0,s=t;a<s.length;a+=1){var u=s[a];if(e<=u.x&&n<=u.y&&r>=u.x&&o>=u.y)return!0}var l=[new i(e,n),new i(e,o),new i(r,o),new i(r,n)];if(t.length>2)for(var c=0,p=l;c<p.length;c+=1)if(Yo(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(Jo(t[h],t[h+1],l))return!0;return!1}(t.cameraQueryGeometry,e-c,n-c,r+c,o+c)}));d<m.length;d+=1)h.push(m[d]);h.sort(ec);for(var y,v={},g=function(i){var c=h[i];if(c!==y){y=c;var p=o.featureIndexArray.get(c),f=null;o.loadMatchingFeature(v,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,u,a.layers,a.availableImages,e,n,r,(function(e,n,r){return f||(f=Fo(e)),n.queryIntersectsFeature(l,e,r,f,o.z,t.transform,s,t.pixelPosMatrix)}))}},_=0;_<h.length;_++)g(_);return v},$l.prototype.loadMatchingFeature=function(t,e,n,r,i,o,a,s,u,l,c){var p=this.bucketLayerIDs[e];if(!o||function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1}(o,p)){var h=this.sourceLayerCoder.decode(n),f=this.vtLayers[h].feature(r);if(i.filter(new oi(this.tileID.overscaledZ),f))for(var d=this.getId(f,h),m=0;m<p.length;m++){var y=p[m];if(!(o&&o.indexOf(y)<0)){var v=s[y];if(v){var g={};void 0!==d&&l&&(g=l.getState(v.sourceLayer||"_geojsonTileLayer",d));var _=u[y];_.paint=Ql(_.paint,v.paint,f,g,a),_.layout=Ql(_.layout,v.layout,f,g,a);var x=!c||c(f,v,g);if(x){var b=new Kl(f,this.z,this.x,this.y,d);b.layer=_;var w=t[y];void 0===w&&(w=t[y]=[]),w.push({featureIndex:r,feature:b,intersectionZ:x})}}}}}},$l.prototype.lookupSymbolFeatures=function(t,e,n,r,i,o,a,s){var u={};this.loadVTLayers();for(var l=ir(i),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(u,n,r,p[c],l,o,a,s,e);return u},$l.prototype.hasLayer=function(t){for(var e=0,n=this.bucketLayerIDs;e<n.length;e+=1)for(var r=0,i=n[e];r<i.length;r+=1)if(t===i[r])return!0;return!1},$l.prototype.getId=function(t,e){var n=t.id;return this.promoteId&&"boolean"==typeof(n=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]])&&(n=Number(n)),n},Rr("FeatureIndex",$l,{omit:["rawTileData","sourceLayerCoder"]});var nc=function(t,e){this.tileID=t,this.uid=d(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};nc.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<F.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},nc.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},nc.prototype.loadVectorData=function(t,e,n){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var r in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var n={};if(!e)return n;for(var r=function(){var t=o[i],r=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==r.length){t.layers=r,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return r.filter((function(e){return e.id===t}))[0]})));for(var a=0,s=r;a<s.length;a+=1)n[s[a].id]=t}},i=0,o=t;i<o.length;i+=1)r();return n}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var i=this.buckets[r];if(i instanceof dl){if(this.hasSymbolBuckets=!0,!n)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var o in this.buckets){var a=this.buckets[o];if(a instanceof dl&&a.hasRTLText){this.hasRTLText=!0,ii.isLoading()||ii.isLoaded()||"deferred"!==ni()||ri();break}}for(var s in this.queryPadding=0,this.buckets){var u=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(u))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Ki},nc.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},nc.prototype.getBucket=function(t){return this.buckets[t.id]},nc.prototype.upload=function(t){for(var e in this.buckets){var n=this.buckets[e];n.uploadPending()&&n.upload(t)}var r=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new zl(t,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new zl(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},nc.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},nc.prototype.queryRenderedFeatures=function(t,e,n,r,i,o,a,s,u,l){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:l,transform:s,params:a,queryPadding:this.queryPadding*u},t,e,n):{}},nc.prototype.querySourceFeatures=function(t,e){var n=this.latestFeatureIndex;if(n&&n.rawTileData){var r=n.loadVTLayers(),i=e?e.sourceLayer:"",o=r._geojsonTileLayer||r[i];if(o)for(var a=ir(e&&e.filter),s=this.tileID.canonical,u=s.z,l=s.x,c=s.y,p={z:u,x:l,y:c},h=0;h<o.length;h++){var f=o.feature(h);if(a.filter(new oi(this.tileID.overscaledZ),f)){var d=n.getId(f,i),m=new Kl(f,u,l,c,d);m.tile=p,t.push(m)}}}},nc.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},nc.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},nc.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var n=P(t.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var r=Date.now(),i=!1;if(this.expirationTime>r)i=!1;else if(e)if(this.expirationTime<e)i=!0;else{var o=this.expirationTime-e;o?this.expirationTime=r+Math.max(o,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},nc.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},nc.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var n=this.latestFeatureIndex.loadVTLayers();for(var r in this.buckets)if(e.style.hasLayer(r)){var i=this.buckets[r],o=i.layers[0].sourceLayer||"_geojsonTileLayer",a=n[o],s=t[o];if(a&&s&&0!==Object.keys(s).length){i.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var u=e&&e.style&&e.style.getLayer(r);u&&(this.queryPadding=Math.max(this.queryPadding,u.queryRadius(i)))}}}},nc.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},nc.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<F.now()},nc.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},nc.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=F.now()+t},nc.prototype.setDependencies=function(t,e){for(var n={},r=0,i=e;r<i.length;r+=1)n[i[r]]=!0;this.dependencies[t]=n},nc.prototype.hasDependency=function(t,e){for(var n=0,r=t;n<r.length;n+=1){var i=this.dependencies[r[n]];if(i)for(var o=0,a=e;o<a.length;o+=1)if(i[a[o]])return!0}return!1};var rc=a.performance,ic=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},rc.mark(this._marks.start)};ic.prototype.finish=function(){rc.mark(this._marks.end);var t=rc.getEntriesByName(this._marks.measure);return 0===t.length&&(rc.measure(this._marks.measure,this._marks.start,this._marks.end),t=rc.getEntriesByName(this._marks.measure),rc.clearMarks(this._marks.start),rc.clearMarks(this._marks.end),rc.clearMeasures(this._marks.measure)),t},t.Actor=Ml,t.AlphaImage=ma,t.CanonicalTileID=ql,t.CollisionBoxArray=Ki,t.Color=$t,t.DEMData=Xl,t.DataConstantProperty=di,t.DictionaryCoder=Hl,t.EXTENT=8192,t.ErrorEvent=Tt,t.EvaluationParameters=oi,t.Event=St,t.Evented=kt,t.FeatureIndex=$l,t.FillBucket=is,t.FillExtrusionBucket=bs,t.ImageAtlas=vu,t.ImagePosition=mu,t.LineBucket=Ms,t.LngLat=Ll,t.LngLatBounds=Dl,t.MercatorCoordinate=Vl,t.ONE_EM=24,t.OverscaledTileID=Wl,t.Point=i,t.Point$1=i,t.Properties=_i,t.Protobuf=Xs,t.RGBAImage=ya,t.RequestManager=W,t.RequestPerformance=ic,t.ResourceType=dt,t.SegmentVector=oo,t.SourceFeatureState=Jl,t.StructArrayLayout1ui2=Gi,t.StructArrayLayout2f1f2i16=Bi,t.StructArrayLayout2i4=ki,t.StructArrayLayout3ui6=ji,t.StructArrayLayout4i8=Pi,t.SymbolBucket=dl,t.Texture=zl,t.Tile=nc,t.Transitionable=ui,t.Uniform1f=_o,t.Uniform1i=go,t.Uniform2f=xo,t.Uniform3f=bo,t.Uniform4f=wo,t.UniformColor=Eo,t.UniformMatrix4f=To,t.UnwrappedTileID=Zl,t.ValidationError=Ct,t.WritingMode=gu,t.ZoomHistory=Vr,t.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},t.addDynamicAttributes=cl,t.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var r=t.length,i=new Array(t.length),o=null;t.forEach((function(t,a){e(t,(function(t,e){t&&(o=t),i[a]=e,0==--r&&n(o,i)}))}))},t.bezier=u,t.bindAll=v,t.browser=F,t.cacheEntryPossiblyAdded=function(t){++ht>ut&&(t.getActor().send("enforceCacheSizeLimit",st),ht=0)},t.clamp=c,t.clearTileCache=function(t){var e=a.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=qu,t.clone=function(t){var e=new ra(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=b,t.clone$2=function(t){var e=new ra(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Vs,t.config=j,t.create=function(){var t=new ra(16);return ra!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new ra(9);return ra!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new ra(4);return ra!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wn,t.createLayout=Si,t.createStyleLayer=function(t){return"custom"===t.type?new El(t):new Sl[t.type](t)},t.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t},t.deepEqual=function t(e,n){if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==n){if("object"!=typeof n)return!1;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(var i in e)if(!t(e[i],n[i]))return!1;return!0}return e===n},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=l,t.emitValidationErrors=zr,t.endsWith=g,t.enforceCacheSizeLimit=function(t){lt(),tt&&tt.then((function(e){e.keys().then((function(n){for(var r=0;r<n.length-t;r++)e.delete(n[r])}))}))},t.evaluateSizeForFeature=Du,t.evaluateSizeForZoom=Lu,t.evaluateVariableOffset=nl,t.evented=ei,t.extend=h,t.featureFilter=ir,t.filterObject=x,t.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=Iu,t.getAnchorJustification=rl,t.getArrayBuffer=xt,t.getImage=function t(e,n){if(N.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),yt>=j.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:n,cancelled:!1,cancel:function(){this.cancelled=!0}};return mt.push(r),r}yt++;var i=!1,o=function(){if(!i)for(i=!0,yt--;mt.length&&yt<j.MAX_PARALLEL_IMAGE_REQUESTS;){var e=mt.shift();e.cancelled||(e.cancel=t(e.requestParameters,e.callback).cancel)}},s=xt(e,(function(t,e,r,i){o(),t?n(t):e&&(ft()?function(t,e){var n=new a.Blob([new Uint8Array(t)],{type:"image/png"});a.createImageBitmap(n).then((function(t){e(null,t)})).catch((function(t){e(new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}(e,n):function(t,e,n,r){var i=new a.Image,o=a.URL;i.onload=function(){e(null,i),o.revokeObjectURL(i.src)},i.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var s=new a.Blob([new Uint8Array(t)],{type:"image/png"});i.cacheControl=n,i.expires=r,i.src=t.byteLength?o.createObjectURL(s):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(e,n,r,i))}));return{cancel:function(){s.cancel(),o()}}},t.getJSON=function(t,e){return _t(h(t,{type:"json"}),e)},t.getRTLTextPluginStatus=ni,t.getReferrer=gt,t.getVideo=function(t,e){var n,r,i=a.document.createElement("video");i.muted=!0,i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var s=a.document.createElement("source");n=t[o],r=void 0,(r=a.document.createElement("a")).href=n,(r.protocol!==a.document.location.protocol||r.host!==a.document.location.host)&&(i.crossOrigin="Anonymous"),s.src=t[o],i.appendChild(s)}return{cancel:function(){}}},t.identity=ia,t.invert=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=n*s-r*a,_=n*u-i*a,x=n*l-o*a,b=r*u-i*s,w=r*l-o*s,E=i*l-o*u,S=c*m-p*d,T=c*y-h*d,k=c*v-f*d,P=p*y-h*m,C=p*v-f*m,I=h*v-f*y,z=g*I-_*C+x*P+b*k-w*T+E*S;return z?(t[0]=(s*I-u*C+l*P)*(z=1/z),t[1]=(i*C-r*I-o*P)*z,t[2]=(m*E-y*w+v*b)*z,t[3]=(h*w-p*E-f*b)*z,t[4]=(u*k-a*I-l*T)*z,t[5]=(n*I-i*k+o*T)*z,t[6]=(y*x-d*E-v*_)*z,t[7]=(c*E-h*x+f*_)*z,t[8]=(a*C-s*k+l*S)*z,t[9]=(r*k-n*C-o*S)*z,t[10]=(d*w-m*x+v*g)*z,t[11]=(p*x-c*w-f*g)*z,t[12]=(s*T-a*P-u*S)*z,t[13]=(n*P-r*T+i*S)*z,t[14]=(m*_-d*b-y*g)*z,t[15]=(c*b-p*_+h*g)*z,t):null},t.isChar=qr,t.isMapboxURL=G,t.keysDifference=function(t,e){var n=[];for(var r in t)r in e||n.push(r);return n},t.makeRequest=_t,t.mapObject=_,t.mercatorXfromLng=Fl,t.mercatorYfromLat=jl,t.mercatorZfromAltitude=Nl,t.mul=sa,t.multiply=oa,t.mvt=vs,t.nextPowerOfTwo=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.normalize=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=Ve,t.offscreenCanvasSupported=ft,t.ortho=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t},t.parseGlyphPBF=function(t){return new Xs(t).readFields(pu,[])},t.pbf=Xs,t.performSymbolLayout=function(t,e,n,r,i,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,l={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;l.compositeTextSizes=[u["text-size"].possiblyEvaluate(new oi(c.minZoom),a),u["text-size"].possiblyEvaluate(new oi(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,f=h.maxZoom;l.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new oi(h.minZoom),a),u["icon-size"].possiblyEvaluate(new oi(f),a)]}l.layoutTextSize=u["text-size"].possiblyEvaluate(new oi(t.zoom+1),a),l.layoutIconSize=u["icon-size"].possiblyEvaluate(new oi(t.zoom+1),a),l.textMaxSize=u["text-size"].possiblyEvaluate(new oi(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),y=s.get("text-keep-upright"),v=s.get("text-size"),g=function(){var o=x[_],u=s.get("text-font").evaluate(o,{},a).join(","),c=v.evaluate(o,{},a),p=l.layoutTextSize.evaluate(o,{},a),h=l.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},g=o.text,b=[0,0];if(g){var w=g.toString(),S=24*s.get("text-letter-spacing").evaluate(o,{},a),T=function(t){for(var e=0,n=t;e<n.length;e+=1)if(r=n[e].charCodeAt(0),qr.Arabic(r)||qr["Arabic Supplement"](r)||qr["Arabic Extended-A"](r)||qr["Arabic Presentation Forms-A"](r)||qr["Arabic Presentation Forms-B"](r))return!1;var r;return!0}(w)?S:0,k=s.get("text-anchor").evaluate(o,{},a),P=s.get("text-variable-anchor");if(!P){var C=s.get("text-radial-offset").evaluate(o,{},a);b=C?nl(k,[24*C,el]):s.get("text-offset").evaluate(o,{},a).map((function(t){return 24*t}))}var I=m?"center":s.get("text-justify").evaluate(o,{},a),z=s.get("symbol-placement"),A="point"===z?24*s.get("text-max-width").evaluate(o,{},a):0,M=function(){t.allowVerticalPlacement&&Zr(w)&&(f.vertical=bu(g,e,n,i,u,A,d,k,"left",T,b,gu.vertical,!0,z,p,c))};if(!m&&P){for(var O="auto"===I?P.map((function(t){return rl(t)})):[I],D=!1,L=0;L<O.length;L++){var R=O[L];if(!f.horizontal[R])if(D)f.horizontal[R]=f.horizontal[0];else{var B=bu(g,e,n,i,u,A,d,"center",R,T,b,gu.horizontal,!1,z,p,c);B&&(f.horizontal[R]=B,D=1===B.positionedLines.length)}}M()}else{"auto"===I&&(I=rl(k));var F=bu(g,e,n,i,u,A,d,k,I,T,b,gu.horizontal,!1,z,p,c);F&&(f.horizontal[I]=F),M(),Zr(w)&&m&&y&&(f.vertical=bu(g,e,n,i,u,A,d,k,I,T,b,gu.vertical,!1,z,p,c))}}var j=void 0,N=!1;if(o.icon&&o.icon.name){var U=r[o.icon.name];U&&(j=function(t,e,n){var r=Iu(n),i=e[0]-t.displaySize[0]*r.horizontalAlign,o=e[1]-t.displaySize[1]*r.verticalAlign;return{image:t,top:o,bottom:o+t.displaySize[1],left:i,right:i+t.displaySize[0]}}(i[o.icon.name],s.get("icon-offset").evaluate(o,{},a),s.get("icon-anchor").evaluate(o,{},a)),N=U.sdf,void 0===t.sdfIcons?t.sdfIcons=U.sdf:t.sdfIcons!==U.sdf&&E("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(U.pixelRatio!==t.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}var V=ol(f.horizontal)||f.vertical;t.iconsInText=!!V&&V.iconsInText,(V||j)&&function(t,e,n,r,i,o,a,s,u,l,c){var p=o.textMaxSize.evaluate(e,{});void 0===p&&(p=a);var h,f=t.layers[0].layout,d=f.get("icon-offset").evaluate(e,{},c),m=ol(n.horizontal),y=a/24,v=t.tilePixelRatio*y,g=t.tilePixelRatio*p/24,_=t.tilePixelRatio*s,x=t.tilePixelRatio*f.get("symbol-spacing"),b=f.get("text-padding")*t.tilePixelRatio,w=f.get("icon-padding")*t.tilePixelRatio,S=f.get("text-max-angle")/180*Math.PI,T="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),k="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),P=f.get("symbol-placement"),C=x/2,I=f.get("icon-text-fit");r&&"none"!==I&&(t.allowVerticalPlacement&&n.vertical&&(h=Au(r,n.vertical,I,f.get("icon-text-fit-padding"),d,y)),m&&(r=Au(r,m,I,f.get("icon-text-fit-padding"),d,y)));var z=function(s,p){p.x<0||p.x>=8192||p.y<0||p.y>=8192||function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m,y,v,g,_,x,b,w,S,T){var k,P,C,I,z,A=t.addToLineVertexArray(e,n),M=0,O=0,D=0,L=0,R=-1,B=-1,F={},j=co(""),N=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(N=(k=s.layout.get("text-offset").evaluate(x,{},S).map((function(t){return 24*t})))[0],U=k[1]):(N=24*s.layout.get("text-radial-offset").evaluate(x,{},S),U=el),t.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(x,{},S)+90;I=new Ku(u,e,l,c,p,r.vertical,h,f,d,V),a&&(z=new Ku(u,e,l,c,p,a,y,v,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(x,{}),Z="none"!==s.layout.get("icon-text-fit"),W=Zu(i,q,w,Z),G=a?Zu(a,q,w,Z):void 0;C=new Ku(u,e,l,c,p,i,y,v,!1,q),M=4*W.length;var X=t.iconSizeData,H=null;"source"===X.kind?(H=[128*s.layout.get("icon-size").evaluate(x,{})])[0]>32640&&E(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===X.kind&&((H=[128*b.compositeIconSizes[0].evaluate(x,{},S),128*b.compositeIconSizes[1].evaluate(x,{},S)])[0]>32640||H[1]>32640)&&E(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,W,H,_,g,x,!1,e,A.lineStartIndex,A.lineLength,-1,S),R=t.icon.placedSymbolArray.length-1,G&&(O=4*G.length,t.addSymbols(t.icon,G,H,_,g,x,gu.vertical,e,A.lineStartIndex,A.lineLength,-1,S),B=t.icon.placedSymbolArray.length-1)}for(var K in r.horizontal){var Y=r.horizontal[K];if(!P){j=co(Y.text);var J=s.layout.get("text-rotate").evaluate(x,{},S);P=new Ku(u,e,l,c,p,Y,h,f,d,J)}var $=1===Y.positionedLines.length;if(D+=il(t,e,Y,o,s,d,x,m,A,r.vertical?gu.horizontal:gu.horizontalOnly,$?Object.keys(r.horizontal):[K],F,R,b,S),$)break}r.vertical&&(L+=il(t,e,r.vertical,o,s,d,x,m,A,gu.vertical,["vertical"],F,B,b,S));var Q=P?P.boxStartIndex:t.collisionBoxArray.length,tt=P?P.boxEndIndex:t.collisionBoxArray.length,et=I?I.boxStartIndex:t.collisionBoxArray.length,nt=I?I.boxEndIndex:t.collisionBoxArray.length,rt=C?C.boxStartIndex:t.collisionBoxArray.length,it=C?C.boxEndIndex:t.collisionBoxArray.length,ot=z?z.boxStartIndex:t.collisionBoxArray.length,at=z?z.boxEndIndex:t.collisionBoxArray.length,st=-1,ut=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=ut(P,st),st=ut(I,st),st=ut(C,st);var lt=(st=ut(z,st))>-1?1:0;lt&&(st*=T/24),t.glyphOffsetArray.length>=dl.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,R,B,j,Q,tt,et,nt,rt,it,ot,at,l,D,L,M,O,lt,0,h,N,U,st)}(t,p,s,n,r,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,b,T,u,_,w,k,d,e,o,l,c,a)};if("line"===P)for(var A=0,M=qu(e.geometry,0,0,8192,8192);A<M.length;A+=1)for(var O=M[A],D=0,L=Vu(O,x,S,n.vertical||m,r,24,g,t.overscaling,8192);D<L.length;D+=1){var R=L[D];m&&al(t,m.text,C,R)||z(O,R)}else if("line-center"===P)for(var B=0,F=e.geometry;B<F.length;B+=1){var j=F[B];if(j.length>1){var N=Uu(j,S,n.vertical||m,r,24,g);N&&z(j,N)}}else if("Polygon"===e.type)for(var U=0,V=ts(e.geometry,0);U<V.length;U+=1){var q=V[U],Z=$u(q,16);z(q[0],new Mu(Z.x,Z.y,0))}else if("LineString"===e.type)for(var W=0,G=e.geometry;W<G.length;W+=1){var X=G[W];z(X,new Mu(X[0].x,X[0].y,0))}else if("Point"===e.type)for(var H=0,K=e.geometry;H<K.length;H+=1)for(var Y=0,J=K[H];Y<J.length;Y+=1){var $=J[Y];z([$],new Mu($.x,$.y,0))}}(t,o,f,j,r,l,p,h,b,N,a)},_=0,x=t.features;_<x.length;_+=1)g();o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},t.pick=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];i in t&&(n[i]=t[i])}return n},t.plugin=ii,t.polygonIntersectsPolygon=Uo,t.postMapLoadEvent=at,t.postTurnstileEvent=it,t.potpack=du,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Rr,t.registerForPluginStateChange=function(t){return t({pluginStatus:Jr,pluginURL:$r}),ei.on("pluginStateChange",t),t},t.renderColorRamp=ga,t.rotate=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*s,t[1]=i*u+a*s,t[2]=r*-s+o*u,t[3]=i*-s+a*u,t},t.rotateX=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+p*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=p*i-s*r,t[11]=h*i-u*r,t},t.rotateZ=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+p*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=p*i-s*r,t[7]=h*i-u*r,t},t.scale=function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},t.scale$2=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},t.setCacheLimits=function(t,e){st=t,ut=e},t.setRTLTextPlugin=function(t,e,n){if(void 0===n&&(n=!1),"deferred"===Jr||"loading"===Jr||"loaded"===Jr)throw new Error("setRTLTextPlugin cannot be called multiple times.");$r=F.resolveURL(t),Jr="deferred",Yr=e,ti(),n||ri()},t.sphericalToCartesian=function(t){var e=t[0],n=t[1],r=t[2];return n+=90,n*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(n)*Math.sin(r),y:e*Math.sin(n)*Math.sin(r),z:e*Math.cos(r)}},t.sqrLen=function(t){var e=t[0],n=t[1];return e*e+n*n},t.styleSpec=Pt,t.sub=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},t.symbolSize=Ru,t.transformMat3=function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t},t.transformMat4=ua,t.translate=function(t,e,n){var r,i,o,a,s,u,l,c,p,h,f,d,m=n[0],y=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=r*m+s*y+p*v+e[12],t[13]=i*m+u*y+h*v+e[13],t[14]=o*m+l*y+f*v+e[14],t[15]=a*m+c*y+d*v+e[15]),t},t.triggerPluginCompletionEvent=Qr,t.uniqueId=d,t.validateCustomStyleLayer=function(t){var e=[],n=t.id;return void 0===n&&e.push({message:"layers."+n+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+n+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+n+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=Pr,t.validateStyle=kr,t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.vectorTile=vs,t.version="1.12.0",t.warnOnce=E,t.webpSupported=N,t.window=a,t.wrap=p})),r(0,(function(t){function e(t){var n=typeof t;if("number"===n||"boolean"===n||"string"===n||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",i=0,o=t;i<o.length;i+=1)r+=e(o[i])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",u=0;u<a.length;u++)s+=JSON.stringify(a[u])+":"+e(t[a[u]])+",";return s+"}"}function n(n){for(var r="",i=0,o=t.refProperties;i<o.length;i+=1)r+="/"+e(n[o[i]]);return r}var r=function(t){this.keyCache={},t&&this.replace(t)};r.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},r.prototype.update=function(e,r){for(var i=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var u=this._layers[s.id]=t.createStyleLayer(s);u._featureFilter=t.featureFilter(u.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var l=0,c=r;l<c.length;l+=1){var p=c[l];delete this.keyCache[p],delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,f=function(t,e){for(var r={},i=0;i<t.length;i++){var o=e&&e[t[i].id]||n(t[i]);e&&(e[t[i].id]=o);var a=r[o];a||(a=r[o]=[]),a.push(t[i])}var s=[];for(var u in r)s.push(r[u]);return s}(t.values(this._layerConfigs),this.keyCache);h<f.length;h+=1){var d=f[h].map((function(t){return i._layers[t.id]})),m=d[0];if("none"!==m.visibility){var y=m.source||"",v=this.familiesBySource[y];v||(v=this.familiesBySource[y]={});var g=m.sourceLayer||"_geojsonTileLayer",_=v[g];_||(_=v[g]=[]),_.push(d)}}};var i=function(e){var n={},r=[];for(var i in e){var o=e[i],a=n[i]={};for(var s in o){var u=o[+s];if(u&&0!==u.bitmap.width&&0!==u.bitmap.height){var l={x:0,y:0,w:u.bitmap.width+2,h:u.bitmap.height+2};r.push(l),a[s]={rect:l,metrics:u.metrics}}}}var c=t.potpack(r),p=new t.AlphaImage({width:c.w||1,height:c.h||1});for(var h in e){var f=e[h];for(var d in f){var m=f[+d];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var y=n[h][d].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:y.x+1,y:y.y+1},m.bitmap)}}}this.image=p,this.positions=n};t.register("GlyphAtlas",i);var o=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId};function a(e,n,r){for(var i=new t.EvaluationParameters(n),o=0,a=e;o<a.length;o+=1)a[o].recalculate(i,r)}function s(e,n){var r=t.getArrayBuffer(e.request,(function(e,r,i,o){e?n(e):r&&n(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(r)),rawData:r,cacheControl:i,expires:o})}));return function(){r.cancel(),n()}}o.prototype.parse=function(e,n,r,o,s){var u=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var l=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var p,h,f,d,m={},y={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},v=n.familiesBySource[this.source];for(var g in v){var _=e.layers[g];if(_){1===_.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+g+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=l.encode(g),b=[],w=0;w<_.length;w++){var E=_.feature(w),S=c.getId(E,g);b.push({feature:E,id:S,index:w,sourceLayerIndex:x})}for(var T=0,k=v[g];T<k.length;T+=1){var P=k[T],C=P[0];C.minzoom&&this.zoom<Math.floor(C.minzoom)||C.maxzoom&&this.zoom>=C.maxzoom||"none"!==C.visibility&&(a(P,this.zoom,r),(m[C.id]=C.createBucket({index:c.bucketLayerIDs.length,layers:P,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,y,this.tileID.canonical),c.bucketLayerIDs.push(P.map((function(t){return t.id}))))}}}var I=t.mapObject(y.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(I).length?o.send("getGlyphs",{uid:this.uid,stacks:I},(function(t,e){p||(p=t,h=e,M.call(u))})):h={};var z=Object.keys(y.iconDependencies);z.length?o.send("getImages",{icons:z,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){p||(p=t,f=e,M.call(u))})):f={};var A=Object.keys(y.patternDependencies);function M(){if(p)return s(p);if(h&&f&&d){var e=new i(h),n=new t.ImageAtlas(f,d);for(var o in m){var u=m[o];u instanceof t.SymbolBucket?(a(u.layers,this.zoom,r),t.performSymbolLayout(u,h,e.positions,f,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):u.hasPattern&&(u instanceof t.LineBucket||u instanceof t.FillBucket||u instanceof t.FillExtrusionBucket)&&(a(u.layers,this.zoom,r),u.addFeatures(y,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}A.length?o.send("getImages",{icons:A,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){p||(p=t,d=e,M.call(u))})):d={},M.call(this)};var u=function(t,e,n,r){this.actor=t,this.layerIndex=e,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}};u.prototype.loadTile=function(e,n){var r=this,i=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete r.loading[i],e||!o)return s.status="done",r.loaded[i]=s,n(e);var u=o.rawData,l={};o.expires&&(l.expires=o.expires),o.cacheControl&&(l.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(e,r){if(e||!r)return n(e);n(null,t.extend({rawTileData:u.slice(0)},r,l,c))})),r.loaded=r.loaded||{},r.loaded[i]=s}))},u.prototype.reloadTile=function(t,e){var n=this,r=this.loaded,i=t.uid,o=this;if(r&&r[i]){var a=r[i];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,r){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,n.availableImages,o.actor,i)),e(t,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},u.prototype.abortTile=function(t,e){var n=this.loading,r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()},u.prototype.removeTile=function(t,e){var n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()};var l=t.window.ImageBitmap,c=function(){this.loaded={}};function p(t,e){if(0!==t.length){h(t[0],e);for(var n=1;n<t.length;n++)h(t[n],!e)}}function h(t,e){for(var n=0,r=0,i=t.length,o=i-1;r<i;o=r++)n+=(t[r][0]-t[o][0])*(t[o][1]+t[r][1]);n>=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,n){var r=e.uid,i=e.encoding,o=e.rawImageData,a=l&&o instanceof l?this.getImageData(o):o,s=new t.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:n.width,height:n.height},n.data)},c.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,r=this._feature.geometry;n<r.length;n+=1){var i=r[n];e.push([new t.Point$1(i[0],i[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var u=[],l=0,c=s[a];l<c.length;l+=1){var p=c[l];u.push(new t.Point$1(p[0],p[1]))}o.push(u)}return o},d.prototype.toGeoJSON=function(t,e,n){return f.call(this,t,e,n)};var m=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};m.prototype.feature=function(t){return new d(this._features[t])};var y=t.vectorTile.VectorTileFeature,v=g;function g(t,e){this.options=e||{},this.features=t,this.length=t.length}function _(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}g.prototype.feature=function(t){return new _(this.features[t],this.options.extent)},_.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var n=0;n<e.length;n++){for(var r=e[n],i=[],o=0;o<r.length;o++)i.push(new t.Point$1(r[o][0],r[o][1]));this.geometry.push(i)}return this.geometry},_.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),n=Math.max(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.y)}return[e,r,n,i]},_.prototype.toGeoJSON=y.prototype.toGeoJSON;var x=w,b=v;function w(e){var n=new t.pbf;return function(t,e){for(var n in t.layers)e.writeMessage(3,E,t.layers[n])}(e,n),n.finish()}function E(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)r.feature=t.feature(n),e.writeMessage(2,S,r);var i=r.keys;for(n=0;n<i.length;n++)e.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)e.writeMessage(4,I,o[n])}function S(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,T,t),e.writeVarintField(3,n.type),e.writeMessage(4,C,n)}function T(t,e){var n=t.feature,r=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var u=o[s];void 0===u&&(r.push(s),o[s]=u=r.length-1),e.writeVarint(u);var l=n.properties[s],c=typeof l;"string"!==c&&"boolean"!==c&&"number"!==c&&(l=JSON.stringify(l));var p=c+":"+l,h=a[p];void 0===h&&(i.push(l),a[p]=h=i.length-1),e.writeVarint(h)}}function k(t,e){return(e<<3)+(7&t)}function P(t){return t<<1^t>>31}function C(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var u=n[s],l=1;1===r&&(l=u.length),e.writeVarint(k(1,l));for(var c=3===r?u.length-1:u.length,p=0;p<c;p++){1===p&&1!==r&&e.writeVarint(k(2,c-1));var h=u[p].x-i,f=u[p].y-o;e.writeVarint(P(h)),e.writeVarint(P(f)),i+=h,o+=f}3===r&&e.writeVarint(k(7,1))}}function I(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function z(t,e,n,r){A(t,n,r),A(e,2*n,2*r),A(e,2*n+1,2*r+1)}function A(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function M(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}x.fromVectorTileJs=w,x.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new v(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return w({layers:n})},x.GeoJSONWrapper=b;var O=function(t){return t[0]},D=function(t){return t[1]},L=function(t,e,n,r,i){void 0===e&&(e=O),void 0===n&&(n=D),void 0===r&&(r=64),void 0===i&&(i=Float64Array),this.nodeSize=r,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new i(2*t.length),u=0;u<t.length;u++)a[u]=u,s[2*u]=e(t[u]),s[2*u+1]=n(t[u]);!function t(e,n,r,i,o,a){if(!(o-i<=r)){var s=i+o>>1;!function t(e,n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);t(e,n,r,Math.max(i,Math.floor(r-u*c/s+p)),Math.min(o,Math.floor(r+(s-u)*c/s+p)),a)}var h=n[2*r+a],f=i,d=o;for(z(e,n,i,r),n[2*o+a]>h&&z(e,n,i,o);f<d;){for(z(e,n,f,d),f++,d--;n[2*f+a]<h;)f++;for(;n[2*d+a]>h;)d--}n[2*i+a]===h?z(e,n,i,d):z(e,n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(e,n,s,i,o,a%2),t(e,n,r,i,s-1,a+1),t(e,n,r,s+1,o,a+1)}}(a,s,r,0,a.length-1,0)};L.prototype.range=function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var s,u,l=[0,t.length-1,0],c=[];l.length;){var p=l.pop(),h=l.pop(),f=l.pop();if(h-f<=a)for(var d=f;d<=h;d++)u=e[2*d+1],(s=e[2*d])>=n&&s<=i&&u>=r&&u<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);u=e[2*m+1],(s=e[2*m])>=n&&s<=i&&u>=r&&u<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?n<=s:r<=u)&&(l.push(f),l.push(m-1),l.push(y)),(0===p?i>=s:o>=u)&&(l.push(m+1),l.push(h),l.push(y))}}return c}(this.ids,this.coords,t,e,n,r,this.nodeSize)},L.prototype.within=function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],u=i*i;a.length;){var l=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)M(e[2*h],e[2*h+1],n,r)<=u&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];M(d,m,n,r)<=u&&s.push(t[f]);var y=(l+1)%2;(0===l?n-i<=d:r-i<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===l?n+i>=d:r+i>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)};var R={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},B=function(t){this.options=Z(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)};function F(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function j(t,e){var n=t.geometry.coordinates,r=n[1];return{x:V(n[0]),y:q(r),zoom:1/0,index:e,parentId:-1}}function N(t){return{type:"Feature",id:t.id,properties:U(t),geometry:{type:"Point",coordinates:[(r=t.x,360*(r-.5)),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n,r}function U(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function V(t){return t/360+.5}function q(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Z(t,e){for(var n in e)t[n]=e[n];return t}function W(t){return t.x}function G(t){return t.y}function X(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function H(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)K(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)K(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)K(t,e[r][i])}(i),i}function K(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function Y(t,e,n,r){if(e.geometry){var i=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],u=e.id;if(n.promoteId?u=e.properties[n.promoteId]:n.generateId&&(u=r||0),"Point"===o)J(i,s);else if("MultiPoint"===o)for(var l=0;l<i.length;l++)J(i[l],s);else if("LineString"===o)$(i,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(l=0;l<i.length;l++)$(i[l],s=[],a,!1),t.push(H(u,"LineString",s,e.properties));return}Q(i,s,a,!1)}else if("Polygon"===o)Q(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(l=0;l<e.geometry.geometries.length;l++)Y(t,{id:u,geometry:e.geometry.geometries[l],properties:e.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(l=0;l<i.length;l++){var c=[];Q(i[l],c,a,!0),s.push(c)}}t.push(H(u,o,s,e.properties))}}function J(t,e){e.push(tt(t[0])),e.push(et(t[1])),e.push(0)}function $(t,e,n,r){for(var i,o,a=0,s=0;s<t.length;s++){var u=tt(t[s][0]),l=et(t[s][1]);e.push(u),e.push(l),e.push(0),s>0&&(a+=r?(i*l-u*o)/2:Math.sqrt(Math.pow(u-i,2)+Math.pow(l-o,2))),i=u,o=l}var c=e.length-3;e[2]=1,function t(e,n,r,i){for(var o,a=i,s=r-n>>1,u=r-n,l=e[n],c=e[n+1],p=e[r],h=e[r+1],f=n+3;f<r;f+=3){var d=X(e[f],e[f+1],l,c,p,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<u&&(o=f,u=m)}}a>i&&(o-n>3&&t(e,n,o,i),e[o+2]=a,r-o>3&&t(e,o,r,i))}(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function Q(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];$(t[i],o,n,r),e.push(o)}}function tt(t){return t/360+.5}function et(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function nt(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a<r)return t;if(a<n||o>=r)return null;for(var u=[],l=0;l<t.length;l++){var c=t[l],p=c.geometry,h=c.type,f=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(f>=n&&d<r)u.push(c);else if(!(d<n||f>=r)){var m=[];if("Point"===h||"MultiPoint"===h)rt(p,m,n,r,i);else if("LineString"===h)it(p,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===h)at(p,m,n,r,i,!1);else if("Polygon"===h)at(p,m,n,r,i,!0);else if("MultiPolygon"===h)for(var y=0;y<p.length;y++){var v=[];at(p[y],v,n,r,i,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)u.push(H(c.id,h,m[y],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),u.push(H(c.id,h,m,c.tags))}}}return u.length?u:null}function rt(t,e,n,r,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function it(t,e,n,r,i,o,a){for(var s,u,l=ot(t),c=0===i?ut:lt,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],v=t[h+4],g=0===i?f:d,_=0===i?y:v,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-v,2))),g<n?_>n&&(u=c(l,f,d,y,v,n),a&&(l.start=p+s*u)):g>r?_<r&&(u=c(l,f,d,y,v,r),a&&(l.start=p+s*u)):st(l,f,d,m),_<n&&g>=n&&(u=c(l,f,d,y,v,n),x=!0),_>r&&g<=r&&(u=c(l,f,d,y,v,r),x=!0),!o&&x&&(a&&(l.end=p+s*u),e.push(l),l=ot(t)),a&&(p+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(g=0===i?f:d)>=n&&g<=r&&st(l,f,d,m),b=l.length-3,o&&b>=3&&(l[b]!==l[0]||l[b+1]!==l[1])&&st(l,l[0],l[1],l[2]),l.length&&e.push(l)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,n,r,i,o){for(var a=0;a<t.length;a++)it(t[a],e,n,r,i,o,!1)}function st(t,e,n,r){t.push(e),t.push(n),t.push(r)}function ut(t,e,n,r,i,o){var a=(o-e)/(r-e);return t.push(o),t.push(n+(i-n)*a),t.push(1),a}function lt(t,e,n,r,i,o){var a=(o-n)/(i-n);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function ct(t,e){for(var n=[],r=0;r<t.length;r++){var i,o=t[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=pt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(pt(o.geometry[s],e))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var u=[],l=0;l<o.geometry[s].length;l++)u.push(pt(o.geometry[s][l],e));i.push(u)}n.push(H(o.id,a,i,o.tags))}return n}function pt(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var r=0;r<t.length;r+=3)n.push(t[r]+e,t[r+1],t[r+2]);return n}function ht(t,e){if(t.transformed)return t;var n,r,i,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var u=t.features[n],l=u.geometry,c=u.type;if(u.geometry=[],1===c)for(r=0;r<l.length;r+=2)u.geometry.push(ft(l[r],l[r+1],e,o,a,s));else for(r=0;r<l.length;r++){var p=[];for(i=0;i<l[r].length;i+=2)p.push(ft(l[r][i],l[r][i+1],e,o,a,s));u.geometry.push(p)}}return t.transformed=!0,t}function ft(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function dt(t,e,n,r,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,mt(a,t[s],o,i);var u=t[s].minX,l=t[s].minY,c=t[s].maxX,p=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function mt(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)yt(a,i,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)yt(a,i[s],t,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<i.length;u++){var l=i[u];for(s=0;s<l.length;s++)yt(a,l[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function yt(t,e,n,r,i,o){var a=r*r;if(r>0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===r||e[u+2]>a)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r<i;o=r,r+=2)n+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(n>0===e)for(r=0,i=t.length;r<i/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[i-2-r],t[r+1]=t[i-1-r],t[i-2-r]=a,t[i-1-r]=s}}(s,o),t.push(s)}}function vt(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)Y(n,t.features[r],e,r);else Y(n,"Feature"===t.type?t:{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(t,e){var n=e.buffer/e.extent,r=t,i=nt(t,1,-1-n,n,0,-1,2,e),o=nt(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=nt(t,1,-n,1+n,0,-1,2,e)||[],i&&(r=ct(i,1).concat(r)),o&&(r=r.concat(ct(o,-1)))),r}(r,e)).length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function gt(t,e,n){return 32*((1<<t)*n+e)+t}function _t(t,e){var n=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return e(null,null);var i=new m(r.features),o=x(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}B.prototype.load=function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare "+t.length+" points";n&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(j(t[u],u));this.trees[i+1]=new L(s,W,G,o,Float32Array),n&&console.timeEnd(a);for(var l=i;l>=r;l--){var c=+Date.now();s=this._cluster(s,l),this.trees[l]=new L(s,W,G,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",l,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this},B.prototype.getClusters=function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return a.concat(s)}for(var u=this.trees[this._limitZoom(e)],l=[],c=0,p=u.range(V(n),q(o),V(i),q(r));c<p.length;c+=1){var h=u.points[p[c]];l.push(h.numPoints?N(h):this.points[h.index])}return l},B.prototype.getChildren=function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],u=0,l=i.within(o.x,o.y,a);u<l.length;u+=1){var c=i.points[l[u]];c.parentId===t&&s.push(c.numPoints?N(c):this.points[c.index])}if(0===s.length)throw new Error(r);return s},B.prototype.getLeaves=function(t,e,n){var r=[];return this._appendLeaves(r,t,e=e||10,n=n||0,0),r},B.prototype.getTile=function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.radius/o.extent,s=(n-a)/i,u=(n+1+a)/i,l={features:[]};return this._addTileFeatures(r.range((e-a)/i,s,(e+1+a)/i,u),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-a/i,s,1,u),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,a/i,u),r.points,-1,n,i,l),l.features.length?l:null},B.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e},B.prototype._appendLeaves=function(t,e,n,r,i){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],u=s.properties;if(u&&u.cluster?i+u.point_count<=r?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,n,r,i):i<r?i++:t.push(s),t.length===n)break}return i},B.prototype._addTileFeatures=function(t,e,n,r,i,o){for(var a=0,s=t;a<s.length;a+=1){var u=e[s[a]],l=u.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(u.x*i-n)),Math.round(this.options.extent*(u.y*i-r))]],tags:l?U(u):this.points[u.index].properties},p=void 0;l?p=u.id:this.options.generateId?p=u.index:this.points[u.index].id&&(p=this.points[u.index].id),void 0!==p&&(c.id=p),o.features.push(c)}},B.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))},B.prototype._cluster=function(t,e){for(var n=[],r=this.options,i=r.reduce,o=r.minPoints,a=r.radius/(r.extent*Math.pow(2,e)),s=0;s<t.length;s++){var u=t[s];if(!(u.zoom<=e)){u.zoom=e;for(var l=this.trees[e+1],c=l.within(u.x,u.y,a),p=u.numPoints||1,h=p,f=0,d=c;f<d.length;f+=1){var m=l.points[d[f]];m.zoom>e&&(h+=m.numPoints||1)}if(h>=o){for(var y=u.x*p,v=u.y*p,g=i&&p>1?this._map(u,!0):null,_=(s<<5)+(e+1)+this.points.length,x=0,b=c;x<b.length;x+=1){var w=l.points[b[x]];if(!(w.zoom<=e)){w.zoom=e;var E=w.numPoints||1;y+=w.x*E,v+=w.y*E,w.parentId=_,i&&(g||(g=this._map(u,!0)),i(g,this._map(w)))}}u.parentId=_,n.push(F(y/h,v/h,_,h,g))}else if(n.push(u),h>1)for(var S=0,T=c;S<T.length;S+=1){var k=l.points[T[S]];k.zoom<=e||(k.zoom=e,n.push(k))}}}return n},B.prototype._getOriginId=function(t){return t-this.points.length>>5},B.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},B.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Z({},r):r},vt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},vt.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],u=this.options,l=u.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=gt(e,n,r),h=this.tiles[p];if(!h&&(l>1&&console.time("creation"),h=this.tiles[p]=dt(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<<i-e;if(n!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||h.numPoints<=u.indexMaxPoints)continue;if(h.source=null,0!==t.length){l>1&&console.time("clipping");var m,y,v,g,_,x,b=.5*u.buffer/u.extent,w=.5-b,E=.5+b,S=1+b;m=y=v=g=null,_=nt(t,c,n-b,n+E,0,h.minX,h.maxX,u),x=nt(t,c,n+w,n+S,0,h.minX,h.maxX,u),t=null,_&&(m=nt(_,c,r-b,r+E,1,h.minY,h.maxY,u),y=nt(_,c,r+w,r+S,1,h.minY,h.maxY,u),_=null),x&&(v=nt(x,c,r-b,r+E,1,h.minY,h.maxY,u),g=nt(x,c,r+w,r+S,1,h.minY,h.maxY,u),x=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(y||[],e+1,2*n,2*r+1),s.push(v||[],e+1,2*n+1,2*r),s.push(g||[],e+1,2*n+1,2*r+1)}}},vt.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<<t,s=gt(t,e=(e%a+a)%a,n);if(this.tiles[s])return ht(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,p=n;!u&&l>0;)l--,c=Math.floor(c/2),p=Math.floor(p/2),u=this.tiles[gt(l,c,p)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,p),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,p,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],i):null):null};var xt=function(e){function n(t,n,r,i){e.call(this,t,n,r,_t),i&&(this.loadGeoJSON=i)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new t.RequestPerformance(r.request);this.loadGeoJSON(r,(function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));!function t(e,n){var r,i=e&&e.type;if("FeatureCollection"===i)for(r=0;r<e.features.length;r++)t(e.features[r],n);else if("GeometryCollection"===i)for(r=0;r<e.geometries.length;r++)t(e.geometries[r],n);else if("Feature"===i)t(e.geometry,n);else if("Polygon"===i)p(e.coordinates,n);else if("MultiPolygon"===i)for(r=0;r<e.coordinates.length;r++)p(e.coordinates[r],n);return e}(a,!0);try{if(r.filter){var s=t.createExpression(r.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===s.result)throw new Error(s.value.map((function(t){return t.key+": "+t.message})).join(", "));var u=a.features.filter((function(t){return s.value.evaluate({zoom:0},t)}));a={type:"FeatureCollection",features:u}}e._geoJSONIndex=r.cluster?new B(function(e){var n=e.superclusterOptions,r=e.clusterProperties;if(!r||!n)return n;for(var i={},o={},a={accumulated:null,zoom:0},s={properties:null},u=Object.keys(r),l=0,c=u;l<c.length;l+=1){var p=c[l],h=r[p],f=h[0],d=t.createExpression(h[1]),m=t.createExpression("string"==typeof f?[f,["accumulated"],["get",p]]:f);i[p]=d.value,o[p]=m.value}return n.map=function(t){s.properties=t;for(var e={},n=0,r=u;n<r.length;n+=1){var o=r[n];e[o]=i[o].evaluate(a,s)}return e},n.reduce=function(t,e){s.properties=e;for(var n=0,r=u;n<r.length;n+=1){var i=r[n];a.accumulated=t[i],t[i]=o[i].evaluate(a,s)}},n}(r)).load(a.features):function(t,e){return new vt(t,e)}(a,r.geojsonVtOptions)}catch(o){return n(o)}e.loaded={};var l={};if(i){var c=i.finish();c&&(l.resourceTiming={},l.resourceTiming[r.source]=JSON.parse(JSON.stringify(c)))}n(null,l)}))}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(t,n){var r=this.loaded;return r&&r[t.uid]?e.prototype.reloadTile.call(this,t,n):this.loadTile(t,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)t.getJSON(e.request,n);else{if("string"!=typeof e.data)return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(t){return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},n.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},n.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},n}(u),bt=function(e){var n=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:u,geojson:xt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');n.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return bt.prototype.setReferrer=function(t,e){this.referrer=e},bt.prototype.setImages=function(t,e,n){for(var r in this.availableImages[t]=e,this.workerSources[t]){var i=this.workerSources[t][r];for(var o in i)i[o].availableImages=e}n()},bt.prototype.setLayers=function(t,e,n){this.getLayerIndex(t).replace(e),n()},bt.prototype.updateLayers=function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()},bt.prototype.loadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).loadTile(e,n)},bt.prototype.loadDEMTile=function(t,e,n){this.getDEMWorkerSource(t,e.source).loadTile(e,n)},bt.prototype.reloadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).reloadTile(e,n)},bt.prototype.abortTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)},bt.prototype.removeTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)},bt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},bt.prototype.removeSource=function(t,e,n){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var r=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==r.removeSource?r.removeSource(e,n):n()}},bt.prototype.loadWorkerSource=function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}},bt.prototype.syncRTLPluginState=function(e,n,r){try{t.plugin.setState(n);var i=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=i){this.self.importScripts(i);var o=t.plugin.isParsed();r(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+i),o)}}catch(t){r(t.toString())}},bt.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||(e=[]),e},bt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new r),e},bt.prototype.getWorkerSource=function(t,e,n){var r=this;return this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),this.workerSources[t][e][n]||(this.workerSources[t][e][n]=new this.workerSourceTypes[e]({send:function(e,n,i){r.actor.send(e,n,i,t)}},this.getLayerIndex(t),this.getAvailableImages(t))),this.workerSources[t][e][n]},bt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new c),this.demWorkerSources[t][e]},bt.prototype.enforceCacheSizeLimit=function(e,n){t.enforceCacheSizeLimit(n)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new bt(self)),bt})),r(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!n(t)}function n(t){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{e=new Worker(r),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(r),t}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}()?(void 0===r[n=t&&t.failIfMajorPerformanceCaveat]&&(r[n]=function(t){var n=function(t){var n=document.createElement("canvas"),r=Object.create(e.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,n.probablySupportsContext?n.probablySupportsContext("webgl",r)||n.probablySupportsContext("experimental-webgl",r):n.supportsContext?n.supportsContext("webgl",r)||n.supportsContext("experimental-webgl",r):n.getContext("webgl",r)||n.getContext("experimental-webgl",r)}(t);if(!n)return!1;var r=n.createShader(n.VERTEX_SHADER);return!(!r||n.isContextLost())&&(n.shaderSource(r,"void main() {}
2"),n.compileShader(r),!0===n.getShaderParameter(r,n.COMPILE_STATUS))}(n)),r[n]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var n}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=n);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),n={create:function(e,n,r){var i=t.window.document.createElement(e);return void 0!==n&&(i.className=n),r&&r.appendChild(i),i},createNS:function(e,n){return t.window.document.createElementNS(e,n)}},r=t.window.document&&t.window.document.documentElement.style;function i(t){if(!r)return t[0];for(var e=0;e<t.length;e++)if(t[e]in r)return t[e];return t[0]}var o,a=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);n.disableDrag=function(){r&&a&&(o=r[a],r[a]="none")},n.enableDrag=function(){r&&a&&(r[a]=o)};var s=i(["transform","WebkitTransform"]);n.setTransform=function(t,e){t.style[s]=e};var u=!1;try{var l=Object.defineProperty({},"passive",{get:function(){u=!0}});t.window.addEventListener("test",l,l),t.window.removeEventListener("test",l,l)}catch(t){u=!1}n.addEventListener=function(t,e,n,r){void 0===r&&(r={}),t.addEventListener(e,n,"passive"in r&&u?r:r.capture)},n.removeEventListener=function(t,e,n,r){void 0===r&&(r={}),t.removeEventListener(e,n,"passive"in r&&u?r:r.capture)};var c=function e(n){n.preventDefault(),n.stopPropagation(),t.window.removeEventListener("click",e,!0)};function p(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}n.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout((function(){t.window.removeEventListener("click",c,!0)}),0)},n.mousePos=function(e,n){var r=e.getBoundingClientRect();return new t.Point(n.clientX-r.left-e.clientLeft,n.clientY-r.top-e.clientTop)},n.touchPos=function(e,n){for(var r=e.getBoundingClientRect(),i=[],o=0;o<n.length;o++)i.push(new t.Point(n[o].clientX-r.left-e.clientLeft,n[o].clientY-r.top-e.clientTop));return i},n.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},n.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function n(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e<n.length;e+=1){var r=n[e];this._notify(r.ids,r.callback)}this.requestors=[]}},n.prototype.getImage=function(t){return this.images[t]},n.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},n.prototype._validate=function(e,n){var r=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),r=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),r=!1),this._validateContent(n.content,n)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),r=!1),r},n.prototype._validateStretch=function(t,e){if(!t)return!0;for(var n=0,r=0,i=t;r<i.length;r+=1){var o=i[r];if(o[0]<n||o[1]<o[0]||e<o[1])return!1;n=o[1]}return!0},n.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},n.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},n.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},n.prototype.listImages=function(){return Object.keys(this.images)},n.prototype.getImages=function(t,e){var n=!0;if(!this.isLoaded())for(var r=0,i=t;r<i.length;
vendor: 105,895 bytes, line 2
2r+=1)this.images[i[r]]||(n=!1);this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})},n.prototype._notify=function(e,n){for(var r={},i=0,o=e;i<o.length;i+=1){var a=o[i];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?r[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}n(null,r)},n.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},n.prototype.getPattern=function(e){var n=this.patterns[e],r=this.getImage(e);if(!r)return null;if(n&&n.position.version===r.version)return n.position;if(n)n.position.version=r.version;else{var i={w:r.data.width+2,h:r.data.height+2,x:0,y:0},o=new t.ImagePosition(i,r);this.patterns[e]={bin:i,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},n.prototype.bind=function(e){var n=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)},n.prototype._updatePatternAtlas=function(){var e=[];for(var n in this.patterns)e.push(this.patterns[n].bin);var r=t.potpack(e),i=r.w,o=r.h,a=this.atlasImage;for(var s in a.resize({width:i||1,height:o||1}),this.patterns){var u=this.patterns[s].bin,l=u.x+1,c=u.y+1,p=this.images[s].data,h=p.width,f=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:l,y:c},{width:h,height:f}),t.RGBAImage.copy(p,a,{x:0,y:f-1},{x:l,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:l,y:c+f},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:l-1,y:c},{width:1,height:f}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:l+h,y:c},{width:1,height:f})}this.dirty=!0},n.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},n.prototype.dispatchRenderCallbacks=function(t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!this.callbackDispatchedThisFrame[r]){this.callbackDispatchedThisFrame[r]=!0;var i=this.images[r];p(i)&&this.updateImage(r,i)}}},n}(t.Evented),f=y,d=y,m=1e20;function y(t,e,n,r,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=n||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function v(t,e,n,r,i,o,a){for(var s=0;s<e;s++){for(var u=0;u<n;u++)r[u]=t[u*e+s];for(g(r,i,o,a,n),u=0;u<n;u++)t[u*e+s]=i[u]}for(u=0;u<n;u++){for(s=0;s<e;s++)r[s]=t[u*e+s];for(g(r,i,o,a,e),s=0;s<e;s++)t[u*e+s]=Math.sqrt(i[s])}}function g(t,e,n,r,i){n[0]=0,r[0]=-m,r[1]=+m;for(var o=1,a=0;o<i;o++){for(var s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);s<=r[a];)a--,s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);n[++a]=o,r[a]=s,r[a+1]=+m}for(o=0,a=0;o<i;o++){for(;r[a+1]<o;)a++;e[o]=(o-n[a])*(o-n[a])+t[n[a]]}}y.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),r=0;r<this.size*this.size;r++){var i=e.data[4*r+3]/255;this.gridOuter[r]=1===i?0:0===i?m:Math.pow(Math.max(0,.5-i),2),this.gridInner[r]=1===i?m:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),r=0;r<this.size*this.size;r++)n[r]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[r]-this.gridInner[r])/this.radius+this.cutoff))));return n},f.default=d;var _=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};_.prototype.setURL=function(t){this.url=t},_.prototype.getGlyphs=function(e,n){var r=this,i=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1)i.push({stack:o,id:s[a]});t.asyncAll(i,(function(t,e){var n=t.stack,i=t.id,o=r.entries[n];o||(o=r.entries[n]={glyphs:{},requests:{},ranges:{}});var a=o.glyphs[i];if(void 0===a){if(a=r._tinySDF(o,n,i))return o.glyphs[i]=a,void e(null,{stack:n,id:i,glyph:a});var s=Math.floor(i/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:n,id:i,glyph:a});else{var u=o.requests[s];u||(u=o.requests[s]=[],_.loadGlyphRange(n,s,r.url,r.requestManager,(function(t,e){if(e){for(var n in e)r._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=e[+n]);o.ranges[s]=!0}for(var i=0,a=u;i<a.length;i+=1)(0,a[i])(t,e);delete o.requests[s]}))),u.push((function(t,r){t?e(t):r&&e(null,{stack:n,id:i,glyph:r[i]||null})}))}}else e(null,{stack:n,id:i,glyph:a})}),(function(t,e){if(t)n(t);else if(e){for(var r={},i=0,o=e;i<o.length;i+=1){var a=o[i],s=a.stack,u=a.id,l=a.glyph;(r[s]||(r[s]={}))[u]=l&&{id:l.id,bitmap:l.bitmap.clone(),metrics:l.metrics}}n(null,r)}}))},_.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},_.prototype._tinySDF=function(e,n,r){var i=this.localIdeographFontFamily;if(i&&this._doesCharSupportLocalGlyph(r)){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(n)?a="900":/medium/i.test(n)?a="500":/light/i.test(n)&&(a="200"),o=e.tinySDF=new _.TinySDF(24,3,8,.25,i,a)}return{id:r,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},_.loadGlyphRange=function(e,n,r,i,o){var a=256*n,s=a+255,u=i.transformRequest(i.normalizeGlyphsURL(r).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(u,(function(e,n){if(e)o(e);else if(n){for(var r={},i=0,a=t.parseGlyphPBF(n);i<a.length;i+=1){var s=a[i];r[s.id]=s}o(null,r)}}))},_.TinySDF=f;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(e,n){return t.sphericalToCartesian(e.expression.evaluate(n))},x.prototype.interpolate=function(e,n,r){return{x:t.number(e.x,n.x,r),y:t.number(e.y,n.y,r),z:t.number(e.z,n.z,r)}};var b=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),w=function(e){function n(n){e.call(this),this._transitionable=new t.Transitionable(b),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.getLight=function(){return this._transitionable.serialize()},n.prototype.setLight=function(e,n){if(void 0===n&&(n={}),!this._validate(t.validateLight,e,n))for(var r in e){var i=e[r];t.endsWith(r,"-transition")?this._transitionable.setTransition(r.slice(0,-"-transition".length),i):this._transitionable.setValue(r,i)}},n.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},n.prototype.hasTransition=function(){return this._transitioning.hasTransition()},n.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},n.prototype._validate=function(e,n,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},n}(t.Evented),E=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};E.prototype.getDash=function(t,e){var n=t.join(",")+String(e);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(t,e)),this.dashEntry[n]},E.prototype.getDashRanges=function(t,e,n){var r=[],i=t.length%2==1?-t[t.length-1]*n:0,o=t[0]*n,a=!0;r.push({left:i,right:o,isDash:a,zeroLength:0===t[0]});for(var s=t[0],u=1;u<t.length;u++){var l=t[u];r.push({left:i=s*n,right:o=(s+=l)*n,isDash:a=!a,zeroLength:0===l})}return r},E.prototype.addRoundDash=function(t,e,n){for(var r=e/2,i=-n;i<=n;i++)for(var o=this.width*(this.nextRow+n+i),a=0,s=t[a],u=0;u<this.width;u++){u/s.right>1&&(s=t[++a]);var l=Math.abs(u-s.left),c=Math.abs(u-s.right),p=Math.min(l,c),h=void 0,f=i/n*(r+1);if(s.isDash){var d=r-Math.abs(f);h=Math.sqrt(p*p+d*d)}else h=r-Math.sqrt(p*p+f*f);this.data[o+u]=Math.max(0,Math.min(255,h+128))}},E.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var n=t[e],r=t[e+1];n.zeroLength?t.splice(e,1):r&&r.isDash===n.isDash&&(r.left=n.left,t.splice(e,1))}var i=t[0],o=t[t.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,u=t[s],l=0;l<this.width;l++){l/u.right>1&&(u=t[++s]);var c=Math.abs(l-u.left),p=Math.abs(l-u.right),h=Math.min(c,p);this.data[a+l]=Math.max(0,Math.min(255,(u.isDash?h:-h)+128))}},E.prototype.addDash=function(e,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];if(0!==o){var s=this.width/o,u=this.getDashRanges(e,this.width,s);n?this.addRoundDash(u,s,r):this.addRegularDash(u)}var l={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=i,this.dirty=!0,l},E.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))};var S=function e(n,r){this.workerPool=n,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),o=0;o<i.length;o++){var a=new e.Actor(i[o],r,this.id);a.name="Worker "+o,this.actors.push(a)}};function T(e,n,r){var i=function(i,o){if(i)return r(i);if(o){var a=t.pick(t.extend(o,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map((function(t){return t.id}))),a.tiles=n.canonicalizeTileset(a,e.url),r(null,a)}};return e.url?t.getJSON(n.transformRequest(n.normalizeSourceURL(e.url),t.ResourceType.Source),i):t.browser.frame((function(){return i(null,e)}))}S.prototype.broadcast=function(e,n,r){t.asyncAll(this.actors,(function(t,r){t.send(e,n,r)}),r=r||function(){})},S.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},S.prototype.remove=function(){this.actors.forEach((function(t){t.remove()})),this.actors=[],this.workerPool.release(this.id)},S.Actor=t.Actor;var k=function(e,n,r){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=r||24};k.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},k.prototype.contains=function(e){var n=Math.pow(2,e.z),r=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*n),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*n);return e.x>=r&&e.x<o&&e.y>=i&&e.y<a};var P=function(e){function n(n,r,i,o){if(e.call(this),this.id=n,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(r,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=T(this._options,this.map._requestManager,(function(n,r){e._tileJSONRequest=null,e._loaded=!0,n?e.fire(new t.ErrorEvent(n)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new k(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setSourceProperty=function(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},n.prototype.setTiles=function(t){var e=this;return this.setSourceProperty((function(){e._options.tiles=t})),this},n.prototype.setUrl=function(t){var e=this;return this.setSourceProperty((function(){e.url=t,e._options.url=t})),this},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.loadTile=function(e,n){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),i={request:this.map._requestManager.transformRequest(r,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,i){return delete e.request,e.aborted?n(null):r&&404!==r.status?n(r):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=n:e.request=e.actor.send("reloadTile",i,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",i,o.bind(this)))},n.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)},n.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)},n.prototype.hasTransition=function(){return!1},n}(t.Evented),C=function(e){function n(n,r,i,o){e.call(this),this.id=n,this.dispatcher=i,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},r),t.extend(this,t.pick(r,["url","scheme","tileSize"]))}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=T(this._options,this.map._requestManager,(function(n,r){e._tileJSONRequest=null,e._loaded=!0,n?e.fire(new t.ErrorEvent(n)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new k(r.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(r.tiles),t.postMapLoadEvent(r.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.loadTile=function(e,n){var r=this,i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),(function(i,o){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(i)e.state="errored",n(i);else if(o){r.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=r.map.painter.context,s=a.gl;e.texture=r.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(r.dispatcher),n(null)}}))},n.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},n.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},n.prototype.hasTransition=function(){return!1},n}(t.Evented),I=function(e){function n(n,r,i,o){e.call(this,n,r,i,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox"}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},n.prototype.loadTile=function(e,n){var r=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function i(t,r){t&&(e.state="errored",n(t)),r&&(e.dem=r,e.needsHillshadePrepare=!0,e.state="loaded",n(null))}e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),function(r,o){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(r)e.state="errored",n(r);else if(o){this.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=t.window.ImageBitmap&&o instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?o:t.browser.getImageData(o,1),s={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:a,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",s,i.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},n.prototype._getNeighboringTiles=function(e){var n=e.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?e.wrap-1:e.wrap,a=(n.x+1+r)%r,s=n.x+1===r?e.wrap+1:e.wrap,u={};return u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),u},n.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})},n}(C),z=function(e){function n(n,r,i,o){e.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=i.getActor(),this.setEventedParent(o),this._data=r.data,this._options=t.extend({},r),this._collectResourceTiming=r.collectResourceTiming,this._resourceTiming=[],void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId;var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,r.clusterMinPoints||2),extent:t.EXTENT,radius:(r.clusterRadius||50)*a,log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(n){if(n)e.fire(new t.ErrorEvent(n));else{var r={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}}))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)n.fire(new t.ErrorEvent(e));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new t.Event("data",r))}})),this},n.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},n.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},n.prototype.getClusterLeaves=function(t,e,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},r),this},n.prototype._updateWorkerData=function(e){var n=this;this._loaded=!1;var r=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(r.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.actor.send(this.type+".loadData",r,(function(t,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),e(t))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(e,n){var r=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(i,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?n(null):t?n(t):(e.loadVectorData(o,r.map.painter,"reloadTile"===i),n(null))}))},n.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),A=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),M=function(e){function n(t,n,r,i){e.call(this),this.id=t,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(e,n){var r=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,o){r._loaded=!0,i?r.fire(new t.ErrorEvent(i)):o&&(r.image=o,e&&(r.coordinates=e),n&&n(),r._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setCoordinates=function(e){var n=this;this.coordinates=e;var r=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var u=s[a];n=Math.min(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.x),o=Math.max(o,u.y)}var l=Math.max(i-n,o-r),c=Math.max(0,Math.floor(-Math.log(l)/Math.LN2)),p=Math.pow(2,c);return new t.CanonicalTileID(c,Math.floor((n+i)/2*p),Math.floor((r+o)/2*p))}(r),this.minzoom=this.maxzoom=this.tileID.z;var i=r.map((function(t){return n.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,A.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(t.Evented),O=function(e){function n(t,n,r,i){e.call(this,t,n,r,i),this.roundZoom=!0,this.type="video",this.options=n}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){var e=this;this._loaded=!1;var n=this.options;this.urls=[];for(var r=0,i=n.urls;r<i.length;r+=1)this.urls.push(this.map._requestManager.transformRequest(i[r],t.ResourceType.Source).url);t.getVideo(this.urls,(function(n,r){e._loaded=!0,n?e.fire(new t.ErrorEvent(n)):r&&(e.video=r,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},n.prototype.pause=function(){this.video&&this.video.pause()},n.prototype.play=function(){this.video&&this.video.play()},n.prototype.seek=function(e){if(this.video){var n=this.video.seekable;e<n.start(0)||e>n.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=e}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,A.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(M),D=function(e){function n(n,r,i,o){e.call(this,n,r,i,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,A.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var n=e[t];if(isNaN(n)||n<=0)return!0}return!1},n}(M),L={vector:P,raster:C,"raster-dem":I,geojson:z,video:O,image:M,canvas:D};function R(e,n){var r=t.identity([]);return t.translate(r,r,[1,1,0]),t.scale(r,r,[.5*e.width,.5*e.height,1]),t.multiply(r,r,e.calculatePosMatrix(n.toUnwrapped()))}function B(t,e,n,r,i,o){var a=function(t,e,n){if(t)for(var r=0,i=t;r<i.length;r+=1){var o=e[i[r]];if(o&&o.source===n&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===n&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,e,t.id),s=o.maxPitchScaleFactor(),u=t.tilesIn(r,s,a);u.sort(F);for(var l=[],c=0,p=u;c<p.length;c+=1){var h=p[c];l.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,n,t._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,i,o,s,R(t.transform,h.tileID))})}var f=function(t){for(var e={},n={},r=0,i=t;r<i.length;r+=1){var o=i[r],a=o.queryResults,s=o.wrappedTileID,u=n[s]=n[s]||{};for(var l in a)for(var c=a[l],p=u[l]=u[l]||{},h=e[l]=e[l]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m))}}return e}(l);for(var d in f)f[d].forEach((function(e){var n=e.feature,r=t.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=r}));return f}function F(t,e){var n=t.tileID,r=e.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}var j=function(t,e){this.max=t,this.onRemove=e,this.reset()};j.prototype.reset=function(){for(var t in this.data)for(var e=0,n=this.data[t];e<n.length;e+=1){var r=n[e];r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value)}return this.data={},this.order=[],this},j.prototype.add=function(t,e,n){var r=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var o={value:e,timeout:void 0};if(void 0!==n&&(o.timeout=setTimeout((function(){r.remove(t,o)}),n)),this.data[i].push(o),this.order.push(i),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},j.prototype.has=function(t){return t.wrapped().key in this.data},j.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},j.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},j.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},j.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},j.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,r=void 0===e?0:this.data[n].indexOf(e),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},j.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},j.prototype.filter=function(t){var e=[];for(var n in this.data)for(var r=0,i=this.data[n];r<i.length;r+=1){var o=i[r];t(o.value)||e.push(o)}for(var a=0,s=e;a<s.length;a+=1){var u=s[a];this.remove(u.value.tileID,u)}};var N=function(t,e,n){this.context=t;var r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};N.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},N.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},N.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var U={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},V=function(t,e,n,r){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};V.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},V.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},V.prototype.enableAttributes=function(t,e){for(var n=0;n<this.attributes.length;n++){var r=e.attributes[this.attributes[n].name];void 0!==r&&t.enableVertexAttribArray(r)}},V.prototype.setVertexAttribPointers=function(t,e,n){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[U[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}},V.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var q=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};q.prototype.get=function(){return this.current},q.prototype.set=function(t){},q.prototype.getDefault=function(){return this.default},q.prototype.setDefault=function(){this.set(this.default)};var Z=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.getDefault=function(){return t.Color.transparent},n.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},n}(q),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(q),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(q),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(q),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(q),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(q),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(q),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(q),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(q),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(q),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(q),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),it=function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.getDefault=function(){return t.Color.transparent},n.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},n}(q),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(q),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(q),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(q),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(q),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(q),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(q),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(q),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(q),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(q),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(q),yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(q),vt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(q),gt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(q),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),bt=function(t){function e(e,n){t.call(this,e),this.context=e,this.parent=n}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e}(q),wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(bt),Et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(bt),St=function(t,e,n,r){this.context=t,this.width=e,this.height=n;var i=this.framebuffer=t.gl.createFramebuffer();this.colorAttachment=new wt(t,i),r&&(this.depthAttachment=new Et(t,i))};St.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var n=this.depthAttachment.get();n&&t.deleteRenderbuffer(n)}t.deleteFramebuffer(this.framebuffer)};var Tt=function(t,e,n){this.func=t,this.mask=e,this.range=n};Tt.ReadOnly=!1,Tt.ReadWrite=!0,Tt.disabled=new Tt(519,Tt.ReadOnly,[0,1]);var kt=function(t,e,n,r,i,o){this.test=t,this.ref=e,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o};kt.disabled=new kt({func:519,mask:0},0,0,7680,7680,7680);var Pt=function(t,e,n){this.blendFunction=t,this.blendColor=e,this.mask=n};Pt.disabled=new Pt(Pt.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),Pt.unblended=new Pt(Pt.Replace,t.Color.transparent,[!0,!0,!0,!0]),Pt.alphaBlended=new Pt([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Ct=function(t,e,n){this.enable=t,this.mode=e,this.frontFace=n};Ct.disabled=new Ct(!1,1029,2305),Ct.backCCW=new Ct(!0,1029,2305);var It=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Z(this),this.clearDepth=new W(this),this.clearStencil=new G(this),this.colorMask=new X(this),this.depthMask=new H(this),this.stencilMask=new K(this),this.stencilFunc=new Y(this),this.stencilOp=new J(this),this.stencilTest=new $(this),this.depthRange=new Q(this),this.depthTest=new tt(this),this.depthFunc=new et(this),this.blend=new nt(this),this.blendFunc=new rt(this),this.blendColor=new it(this),this.blendEquation=new ot(this),this.cullFace=new at(this),this.cullFaceSide=new st(this),this.frontFace=new ut(this),this.program=new lt(this),this.activeTexture=new ct(this),this.viewport=new pt(this),this.bindFramebuffer=new ht(this),this.bindRenderbuffer=new ft(this),this.bindTexture=new dt(this),this.bindVertexBuffer=new mt(this),this.bindElementBuffer=new yt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new vt(this),this.pixelStoreUnpack=new gt(this),this.pixelStoreUnpackPremultiplyAlpha=new _t(this),this.pixelStoreUnpackFlipY=new xt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)};It.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},It.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},It.prototype.createIndexBuffer=function(t,e){return new N(this,t,e)},It.prototype.createVertexBuffer=function(t,e,n){return new V(this,t,e,n)},It.prototype.createRenderbuffer=function(t,e,n){var r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),i},It.prototype.createFramebuffer=function(t,e,n){return new St(this,t,e,n)},It.prototype.clear=function(t){var e=t.color,n=t.depth,r=this.gl,i=0;e&&(i|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==n&&(i|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),r.clear(i)},It.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},It.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},It.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},It.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,Pt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},It.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var zt=function(e){function n(n,r,i){var o=this;e.call(this),this.id=n,this.dispatcher=i,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))})),this.on("error",(function(){o._sourceErrored=!0})),this._source=function(e,n,r,i){var o=new L[n.type](e,n,r,i);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(n,r,i,this),this._tiles={},this._cache=new j(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},n.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},n.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},n.prototype.getSource=function(){return this._source},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},n.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},n.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},n.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},n.prototype.serialize=function(){return this._source.serialize()},n.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var n=this._tiles[e];n.upload(t),n.prepare(this.map.style.imageManager)}},n.prototype.getIds=function(){return t.values(this._tiles).map((function(t){return t.tileID})).sort(At).map((function(t){return t.key}))},n.prototype.getRenderableIds=function(e){var n=this,r=[];for(var i in this._tiles)this._isIdRenderable(i,e)&&r.push(this._tiles[i]);return e?r.sort((function(e,r){var i=e.tileID,o=r.tileID,a=new t.Point(i.canonical.x,i.canonical.y)._rotate(n.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(n.transform.angle);return i.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})).map((function(t){return t.tileID.key})):r.map((function(t){return t.tileID})).sort(At).map((function(t){return t.key}))},n.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},n.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},n.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},n.prototype._reloadTile=function(t,e){var n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))},n.prototype._tileLoaded=function(e,n,r,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(n,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},n.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),n=0;n<e.length;n++){var r=e[n];if(t.neighboringTiles&&t.neighboringTiles[r]){var i=this.getTileByID(r);o(t,i),o(i,t)}}function o(t,e){t.needsHillshadePrepare=!0;var n=e.tileID.canonical.x-t.tileID.canonical.x,r=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},n.prototype.getTile=function(t){return this.getTileByID(t.key)},n.prototype.getTileByID=function(t){return this._tiles[t]},n.prototype._retainLoadedChildren=function(t,e,n,r){for(var i in this._tiles){var o=this._tiles[i];if(!(r[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var u=a;u.overscaledZ>e;)if(t[(u=u.scaledTo(u.overscaledZ-1)).key]){r[a.key]=a;break}}}},n.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r),o=this._getLoadedTile(i);if(o)return o}},n.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},n.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,n=Math.ceil(t.height/this._source.tileSize)+1,r=Math.floor(e*n*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},n.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var n={};for(var r in this._tiles){var i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),n[i.tileID.key]=i}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},n.prototype.update=function(e){var r=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return r._source.hasTile(t)})))):i=[];var o=e.coveringZoomLevel(this._source),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,o);if(Mt(this._source.type)){for(var l={},c={},p=0,h=Object.keys(u);p<h.length;p+=1){var f=h[p],d=u[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),l[y.tileID.key]=y.tileID),c[f]=d}}for(var v in this._retainLoadedChildren(c,o,s,u),l)u[v]||(this._coveredTiles[v]=!0,u[v]=l[v])}for(var g in u)this._tiles[g].clearFadeHold();for(var _=0,x=t.keysDifference(this._tiles,u);_<x.length;_+=1){var b=x[_],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}this._updateLoadedParentTileCache()}},n.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},n.prototype._updateRetainedTiles=function(t,e){for(var r={},i={},o=Math.max(e-n.maxOverzooming,this._source.minzoom),a=Math.max(e+n.maxUnderzooming,this._source.minzoom),s={},u=0,l=t;u<l.length;u+=1){var c=l[u],p=this._addTile(c);r[c.key]=c,p.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,r);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],v=this.getTile(y);if(v&&v.hasData()){r[y.key]=y;continue}}else{var g=d.children(this._source.maxzoom);if(r[g[0].key]&&r[g[1].key]&&r[g[2].key]&&r[g[3].key])continue}for(var _=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(i[b.key])break;if(i[b.key]=!0,!(m=this.getTile(b))&&_&&(m=this._addTile(b)),m&&(r[b.key]=b,_=m.wasRequested(),m.hasData()))break}}}return r},n.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,r=this._tiles[t].tileID;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}e.push(r.key);var i=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(i))break;r=i}for(var o=0,a=e;o<a.length;o+=1)this._loadedParentTiles[a[o]]=n}},n.prototype._addTile=function(e){var n=this._tiles[e.key];if(n)return n;(n=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,n),n.tileID=e,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,n)));var r=Boolean(n);return r||(n=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,e.key,n.state))),n?(n.uses++,this._tiles[e.key]=n,r||this._source.fire(new t.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=function(t,e){var n=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout((function(){n._reloadTile(t,"expired"),delete n._timers[t]}),r))},n.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},n.prototype.tilesIn=function(e,n,r){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(e):e,u=e.map((function(t){return a.pointCoordinate(t)})),l=s.map((function(t){return a.pointCoordinate(t)})),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=l;m<y.length;m+=1){var v=y[m];p=Math.min(p,v.x),h=Math.min(h,v.y),f=Math.max(f,v.x),d=Math.max(d,v.y)}for(var g=function(e){var r=i._tiles[c[e]];if(!r.holdingForFade()){var s=r.tileID,m=Math.pow(2,a.zoom-r.tileID.overscaledZ),y=n*r.queryPadding*t.EXTENT/r.tileSize/m,v=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(v[0].x-y<t.EXTENT&&v[0].y-y<t.EXTENT&&v[1].x+y>=0&&v[1].y+y>=0){var g=u.map((function(t){return s.getTilePoint(t)})),_=l.map((function(t){return s.getTilePoint(t)}));o.push({tile:r,tileID:s,queryGeometry:g,cameraQueryGeometry:_,scale:m})}}},_=0;_<c.length;_++)g(_);return o},n.prototype.getVisibleCoordinates=function(t){for(var e=this,n=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),r=0,i=n;r<i.length;r+=1){var o=i[r];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return n},n.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Mt(this._source.type))for(var e in this._tiles){var n=this._tiles[e];if(void 0!==n.fadeEndTime&&n.fadeEndTime>=t.browser.now())return!0}return!1},n.prototype.setFeatureState=function(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)},n.prototype.removeFeatureState=function(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)},n.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},n.prototype.setDependencies=function(t,e,n){var r=this._tiles[t];r&&r.setDependencies(e,n)},n.prototype.reloadTilesForDependencies=function(t,e){for(var n in this._tiles)this._tiles[n].hasDependency(t,e)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(t,e)}))},n}(t.Evented);function At(t,e){var n=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Mt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Hi.workerUrl)}zt.maxOverzooming=10,zt.maxUnderzooming=3;var Dt="mapboxgl_preloaded_worker_pool",Lt=function(){this.active={}};Lt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Lt.workerCount;)this.workers.push(new Ot);return this.active[t]=!0,this.workers.slice()},Lt.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)},Lt.prototype.isPreloaded=function(){return!!this.active[Dt]},Lt.prototype.numActive=function(){return Object.keys(this.active).length};var Rt,Bt=Math.floor(t.browser.hardwareConcurrency/2);function Ft(){return Rt||(Rt=new Lt),Rt}function jt(e,n){var r={};for(var i in e)"ref"!==i&&(r[i]=e[i]);return t.refProperties.forEach((function(t){t in n&&(r[t]=n[t])})),r}function Nt(t){t=t.slice();for(var e=Object.create(null),n=0;n<t.length;n++)e[t[n].id]=t[n];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=jt(t[r],e[t[r].ref]));return t}Lt.workerCount=Math.max(Math.min(Bt,6),1);var Ut={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Vt(t,e,n){n.push({command:Ut.addSource,args:[t,e[t]]})}function qt(t,e,n){e.push({command:Ut.removeSource,args:[t]}),n[t]=!0}function Zt(t,e,n,r){qt(t,n,r),Vt(t,e,n)}function Wt(e,n,r){var i;for(i in e[r])if(e[r].hasOwnProperty(i)&&"data"!==i&&!t.deepEqual(e[r][i],n[r][i]))return!1;for(i in n[r])if(n[r].hasOwnProperty(i)&&"data"!==i&&!t.deepEqual(e[r][i],n[r][i]))return!1;return!0}function Gt(e,n,r,i,o,a){var s;for(s in n=n||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}));for(s in n)n.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}))}function Xt(t){return t.id}function Ht(t,e){return t[e.id]=e,t}var Kt=function(t,e){this.reset(t,e)};Kt.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Kt.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var n=1,r=this._distances[n],i=e*this.paddedLength+this.padding;r<i&&n<this._distances.length;)r=this._distances[++n];var o=n-1,a=this._distances[o],s=r-a,u=s>0?(i-a)/s:0;return this.points[o].mult(1-u).add(this.points[n].mult(u))};var Yt=function(t,e,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(var o=0;o<this.xCellCount*this.yCellCount;o++)r.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};function Jt(e,n,r,i,o){var a=t.create();return n?(t.scale(a,a,[1/o,1/o,1]),r||t.rotateZ(a,a,i.angle)):t.multiply(a,i.labelPlaneMatrix,e),a}function $t(e,n,r,i,o){if(n){var a=t.clone(e);return t.scale(a,a,[o,o,1]),r||t.rotateZ(a,a,-i.angle),a}return i.glCoordMatrix}function Qt(e,n){var r=[e.x,e.y,0,1];ce(r,r,n);var i=r[3];return{point:new t.Point(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function te(t,e){return.5+t/e*.5}function ee(t,e){var n=t[0]/t[3],r=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function ne(e,n,r,i,o,a,s,u){var l=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(l,r.transform.zoom),p=[256/r.width*2+1,256/r.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=r.transform.width/r.transform.height,y=!1,v=0;v<d.length;v++){var g=d.get(v);if(g.hidden||g.writingMode===t.WritingMode.vertical&&!y)le(g.numGlyphs,h);else{y=!1;var _=[g.anchorX,g.anchorY,0,1];if(t.transformMat4(_,_,n),ee(_,p)){var x=te(r.transform.cameraToCenterDistance,_[3]),b=t.evaluateSizeForFeature(l,c,g),w=s?b/x:b*x,E=new t.Point(g.anchorX,g.anchorY),S=Qt(E,o).point,T={},k=oe(g,w,!1,u,n,o,a,e.glyphOffsetArray,f,h,S,E,T,m);y=k.useVertical,(k.notEnoughRoom||y||k.needsFlipping&&oe(g,w,!0,u,n,o,a,e.glyphOffsetArray,f,h,S,E,T,m).notEnoughRoom)&&le(g.numGlyphs,h)}else le(g.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function re(t,e,n,r,i,o,a,s,u,l,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(p-1),y=se(t*d,n,r,i,o,a,s.segment,h,f,u,l,c);if(!y)return null;var v=se(t*m,n,r,i,o,a,s.segment,h,f,u,l,c);return v?{first:y,last:v}:null}function ie(e,n,r,i){return e===t.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?n.y<r.y:n.x>r.x)?{needsFlipping:!0}:null}function oe(e,n,r,i,o,a,s,u,l,c,p,h,f,d){var m,y=n/24,v=e.lineOffsetX*y,g=e.lineOffsetY*y;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=re(y,u,v,g,r,p,h,e,l,a,f);if(!w)return{notEnoughRoom:!0};var E=Qt(w.first.point,s).point,S=Qt(w.last.point,s).point;if(i&&!r){var T=ie(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var k=e.glyphStartIndex+1;k<_-1;k++)m.push(se(y*u.getoffsetX(k),v,g,r,p,h,e.segment,x,b,l,a,f));m.push(w.last)}else{if(i&&!r){var P=Qt(h,o).point,C=e.lineStartIndex+e.segment+1,I=new t.Point(l.getx(C),l.gety(C)),z=Qt(I,o),A=z.signedDistanceFromCamera>0?z.point:ae(h,I,P,1,o),M=ie(e.writingMode,P,A,d);if(M)return M}var O=se(y*u.getoffsetX(e.glyphStartIndex),v,g,r,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,a,f);if(!O)return{notEnoughRoom:!0};m=[O]}for(var D=0,L=m;D<L.length;D+=1){var R=L[D];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function ae(t,e,n,r,i){var o=Qt(t.add(t.sub(e)._unit()),i).point,a=n.sub(o);return n.add(a._mult(r/a.mag()))}function se(e,n,r,i,o,a,s,u,l,c,p,h){var f=i?e-n:e+n,d=f>0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var y=d>0?u+s:u+s+1,v=o,g=o,_=0,x=0,b=Math.abs(f),w=[];_+x<=b;){if((y+=d)<u||y>=l)return null;if(g=v,w.push(v),void 0===(v=h[y])){var E=new t.Point(c.getx(y),c.gety(y)),S=Qt(E,p);if(S.signedDistanceFromCamera>0)v=h[y]=S.point;else{var T=y-d;v=ae(0===_?a:new t.Point(c.getx(T),c.gety(T)),E,g,b-_+1,p)}}_+=x,x=g.dist(v)}var k=(b-_)/x,P=v.sub(g),C=P.mult(k)._add(g);C._add(P._unit()._perp()._mult(r*d));var I=m+Math.atan2(v.y-g.y,v.x-g.x);return w.push(C),{point:C,angle:I,path:w}}Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Yt.prototype.insertCircle=function(t,e,n,r){this._forEachCell(e-r,n-r,e+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(r)},Yt.prototype._insertBoxCell=function(t,e,n,r,i,o){this.boxCells[i].push(o)},Yt.prototype._insertCircleCell=function(t,e,n,r,i,o){this.circleCells[i].push(o)},Yt.prototype._query=function(t,e,n,r,i,o){if(n<0||t>this.width||r<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var u=0;u<this.circleKeys.length;u++){var l=this.circles[3*u],c=this.circles[3*u+1],p=this.circles[3*u+2];a.push({key:this.circleKeys[u],x1:l-p,y1:c-p,x2:l+p,y2:c+p})}return o?a.filter(o):a}return this._forEachCell(t,e,n,r,this._queryCell,a,{hitTest:i,seenUids:{box:{},circle:{}}},o),i?a.length>0:a},Yt.prototype._queryCircle=function(t,e,n,r,i){var o=t-n,a=t+n,s=e-n,u=e+n;if(a<0||o>this.width||u<0||s>this.height)return!r&&[];var l=[];return this._forEachCell(o,s,a,u,this._queryCellCircle,l,{hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},i),r?l.length>0:l},Yt.prototype.query=function(t,e,n,r,i){return this._query(t,e,n,r,!1,i)},Yt.prototype.hitTest=function(t,e,n,r,i){return this._query(t,e,n,r,!0,i)},Yt.prototype.hitTestCircle=function(t,e,n,r){return this._queryCircle(t,e,n,!0,r)},Yt.prototype._queryCell=function(t,e,n,r,i,o,a,s){var u=a.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,p=0,h=l;p<h.length;p+=1){var f=h[p];if(!u.box[f]){u.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&n>=c[d+0]&&r>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var y=this.circles,v=0,g=m;v<g.length;v+=1){var _=g[v];if(!u.circle[_]){u.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,n,r)&&(!s||s(this.circleKeys[_]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],E=y[x+2];o.push({key:this.circleKeys[_],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},Yt.prototype._queryCellCircle=function(t,e,n,r,i,o,a,s){var u=a.circle,l=a.seenUids,c=this.boxCells[i];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!l.box[d]){l.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(u.x,u.y,u.radius,p[m+0],p[m+1],p[m+2],p[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[i];if(null!==y)for(var v=this.circles,g=0,_=y;g<_.length;g+=1){var x=_[g];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],u.x,u.y,u.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Yt.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var u=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(n),p=this._convertToYCellCoord(r),h=u;h<=c;h++)for(var f=l;f<=p;f++)if(i.call(this,t,e,n,r,this.xCellCount*f+h,o,a,s))return},Yt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Yt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Yt.prototype._circlesCollide=function(t,e,n,r,i,o){var a=r-t,s=i-e,u=n+o;return u*u>a*a+s*s},Yt.prototype._circleAndRectCollide=function(t,e,n,r,i,o,a){var s=(o-r)/2,u=Math.abs(t-(r+s));if(u>s+n)return!1;var l=(a-i)/2,c=Math.abs(e-(i+l));if(c>l+n)return!1;if(u<=s||c<=l)return!0;var p=u-s,h=c-l;return p*p+h*h<=n*n};var ue=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function le(t,e){for(var n=0;n<t;n++){var r=e.length;e.resize(r+4),e.float32.set(ue,3*r)}}function ce(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t[3]=n[3]*r+n[7]*i+n[15],t}var pe=function(t,e,n){void 0===e&&(e=new Yt(t.width+200,t.height+200,25)),void 0===n&&(n=new Yt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=n,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function he(e,n,r){return n*(t.EXTENT/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}pe.prototype.placeCollisionBox=function(t,e,n,r,i){var o=this.projectAndGetPerspectiveRatio(r,t.anchorPointX,t.anchorPointY),a=n*o.perspectiveRatio,s=t.x1*a+o.point.x,u=t.y1*a+o.point.y,l=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,u,l,c)||!e&&this.grid.hitTest(s,u,l,c,i)?{box:[],offscreen:!1}:{box:[s,u,l,c],offscreen:this.isOffscreen(s,u,l,c)}},pe.prototype.placeCollisionCircles=function(e,n,r,i,o,a,s,u,l,c,p,h,f){var d=[],m=new t.Point(n.anchorX,n.anchorY),y=Qt(m,a),v=te(this.transform.cameraToCenterDistance,y.signedDistanceFromCamera),g=(c?o/v:o*v)/t.ONE_EM,_=Qt(m,s).point,x=re(g,i,n.lineOffsetX*g,n.lineOffsetY*g,!1,_,m,n,r,s,{}),b=!1,w=!1,E=!0;if(x){for(var S=.5*h*v+f,T=new t.Point(-100,-100),k=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),P=new Kt,C=x.first,I=x.last,z=[],A=C.path.length-1;A>=1;A--)z.push(C.path[A]);for(var M=1;M<I.path.length;M++)z.push(I.path[M]);var O=2.5*S;if(u){var D=z.map((function(t){return Qt(t,u)}));z=D.some((function(t){return t.signedDistanceFromCamera<=0}))?[]:D.map((function(t){return t.point}))}var L=[];if(z.length>0){for(var R=z[0].clone(),B=z[0].clone(),F=1;F<z.length;F++)R.x=Math.min(R.x,z[F].x),R.y=Math.min(R.y,z[F].y),B.x=Math.max(B.x,z[F].x),B.y=Math.max(B.y,z[F].y);L=R.x>=T.x&&B.x<=k.x&&R.y>=T.y&&B.y<=k.y?[z]:B.x<T.x||R.x>k.x||B.y<T.y||R.y>k.y?[]:t.clipLine([z],T.x,T.y,k.x,k.y)}for(var j=0,N=L;j<N.length;j+=1){var U;P.reset(N[j],.25*S),U=P.length<=.5*S?1:Math.ceil(P.paddedLength/O)+1;for(var V=0;V<U;V++){var q=V/Math.max(U-1,1),Z=P.lerp(q),W=Z.x+100,G=Z.y+100;d.push(W,G,S,0);var X=W-S,H=G-S,K=W+S,Y=G+S;if(E=E&&this.isOffscreen(X,H,K,Y),w=w||this.isInsideGrid(X,H,K,Y),!e&&this.grid.hitTestCircle(W,G,S,p)&&(b=!0,!l))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!l&&b||!w?[]:d,offscreen:E,collisionDetected:b}},pe.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var n=[],r=1/0,i=1/0,o=-1/0,a=-1/0,s=0,u=e;s<u.length;s+=1){var l=u[s],c=new t.Point(l.x+100,l.y+100);r=Math.min(r,c.x),i=Math.min(i,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),n.push(c)}for(var p={},h={},f=0,d=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]={}),!p[y.bucketInstanceId][y.featureIndex]){var v=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(n,v)&&(p[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},pe.prototype.insertCollisionBox=function(t,e,n,r,i){(e?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:r,collisionGroupID:i},t[0],t[1],t[2],t[3])},pe.prototype.insertCollisionCircles=function(t,e,n,r,i){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:n,featureIndex:r,collisionGroupID:i},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},pe.prototype.projectAndGetPerspectiveRatio=function(e,n,r){var i=[n,r,0,1];return ce(i,i,e),{point:new t.Point((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},pe.prototype.isOffscreen=function(t,e,n,r){return n<100||t>=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},pe.prototype.isInsideGrid=function(t,e,n,r){return n>=0&&t<this.gridRightBoundary&&r>=0&&e<this.gridBottomBoundary},pe.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e};var fe=function(t,e,n,r){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):r&&n?1:0,this.placed=n};fe.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var de=function(t,e,n,r,i){this.text=new fe(t?t.text:null,e,n,i),this.icon=new fe(t?t.icon:null,e,r,i)};de.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var me=function(t,e,n){this.text=t,this.icon=e,this.skipFade=n},ye=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},ve=function(t,e,n,r,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i},ge=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function _e(e,n,r,i,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*n,u=-(a.verticalAlign-.5)*r,l=t.evaluateVariableOffset(e,i);return new t.Point(s+l[0]*o,u+l[1]*o)}function xe(e,n,r,i,o,a){var s=e.x1,u=e.x2,l=e.y1,c=e.y2,p=e.anchorPointX,h=e.anchorPointY,f=new t.Point(n,r);return i&&f._rotate(o?a:-a),{x1:s+f.x,y1:l+f.y,x2:u+f.x,y2:c+f.y,anchorPointX:p,anchorPointY:h}}ge.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var be=function(t,e,n,r){this.transform=t.clone(),this.collisionIndex=new pe(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new ge(n),this.collisionCircleArrays={},this.prevPlacement=r,r&&(r.prevPlacement=void 0),this.placedOrientations={}};function we(t,e,n,r,i){t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0)}be.prototype.getBucketParts=function(e,n,r,i){var o=r.getBucket(n),a=r.latestFeatureIndex;if(o&&a&&n.id===o.layerIds[0]){var s=r.collisionBoxArray,u=o.layers[0].layout,l=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h="map"===u.get("text-pitch-alignment"),f="map"===u.get("text-rotation-alignment"),d=he(r,1,this.transform.zoom),m=Jt(p,h,f,this.transform,d),y=null;if(h){var v=$t(p,h,f,this.transform,d);y=t.multiply([],this.transform.labelPlaneMatrix,v)}this.retainedQueryData[o.bucketInstanceId]=new ve(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);var g={bucket:o,layout:u,posMatrix:p,textLabelPlaneMatrix:m,labelToScreenMatrix:y,scale:l,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(var _=0,x=o.sortKeyRanges;_<x.length;_+=1){var b=x[_];e.push({sortKey:b.sortKey,symbolInstanceStart:b.symbolInstanceStart,symbolInstanceEnd:b.symbolInstanceEnd,parameters:g})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:g})}},be.prototype.attemptAnchorPlacement=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d){var m,y=[p.textOffset0,p.textOffset1],v=_e(t,n,r,y,i),g=this.collisionIndex.placeCollisionBox(xe(e,v.x,v.y,o,a,this.transform.angle),c,s,u,l.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(xe(d,v.x,v.y,o,a,this.transform.angle),c,s,u,l.predicate).box.length)return g.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:y,width:n,height:r,anchor:t,textBoxScale:i,prevAnchor:m},this.markUsedJustification(h,t,p,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,p),this.placedOrientations[p.crossTileID]=f),{shift:v,placedGlyphBoxes:g}):void 0},be.prototype.placeLayerBucketPart=function(e,n,r){var i=this,o=e.parameters,a=o.bucket,s=o.layout,u=o.posMatrix,l=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,y=s.get("text-optional"),v=s.get("icon-optional"),g=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),E="viewport-y"===s.get("symbol-z-order"),S=g&&(_||!a.hasIconData()||v),T=_&&(g||!a.hasTextData()||y);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var k=function(e,o){if(!n[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,E=!1,k=!1,P=!0,C=null,I={box:null,offscreen:null},z={box:null,offscreen:null},A=null,M=null,O=0,D=0,L=0;o.textFeatureIndex?O=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),o.verticalTextFeatureIndex&&(D=o.verticalTextFeatureIndex);var R=o.textBox;if(R){var B=function(n){var r=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!n&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[e.crossTileID];o&&(i.placedOrientations[e.crossTileID]=o,i.markUsedOrientation(a,r=o,e))}return r},F=function(n,r){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i<s.length&&(s[i]===t.WritingMode.vertical?(I=r(),z=I):I=n(),!(I&&I.box&&I.box.length));i+=1);else I=n()};if(s.get("text-variable-anchor")){var j=s.get("text-variable-anchor");if(i.prevPlacement&&i.prevPlacement.variableOffsets[e.crossTileID]){var N=i.prevPlacement.variableOffsets[e.crossTileID];j.indexOf(N.anchor)>0&&(j=j.filter((function(t){return t!==N.anchor}))).unshift(N.anchor)}var U=function(t,n,r){for(var o=t.x2-t.x1,s=t.y2-t.y1,l=e.textBoxScale,c=w&&!_?n:null,h={box:[],offscreen:!1},f=g?2*j.length:j.length,d=0;d<f;++d){var y=i.attemptAnchorPlacement(j[d%j.length],t,o,s,l,x,b,p,u,m,d>=j.length,e,a,r,c);if(y&&(h=y.placedGlyphBoxes)&&h.box&&h.box.length){E=!0,C=y.shift;break}}return h};F((function(){return U(R,o.iconBox,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&!(I&&I.box&&I.box.length)&&e.numVerticalGlyphVertices>0&&n?U(n,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),I&&(E=I.box,P=I.offscreen);var V=B(I&&I.box);if(!E&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[e.crossTileID];q&&(i.variableOffsets[e.crossTileID]=q,i.markUsedJustification(a,q.anchor,e,V))}}else{var Z=function(t,n){var r=i.collisionIndex.placeCollisionBox(t,g,p,u,m.predicate);return r&&r.box&&r.box.length&&(i.markUsedOrientation(a,n,e),i.placedOrientations[e.crossTileID]=n),r};F((function(){return Z(R,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?Z(n,t.WritingMode.vertical):{box:null,offscreen:null}})),B(I&&I.box&&I.box.length)}}if(E=(f=I)&&f.box&&f.box.length>0,P=f&&f.offscreen,e.useRuntimeCollisionCircles){var W=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),G=t.evaluateSizeForFeature(a.textSizeData,d,W),X=s.get("text-padding");A=i.collisionIndex.placeCollisionCircles(g,W,a.lineVertexArray,a.glyphOffsetArray,G,u,l,c,r,b,m.predicate,e.collisionCircleDiameter,X),E=g||A.circles.length>0&&!A.collisionDetected,P=P&&A.offscreen}if(o.iconFeatureIndex&&(L=o.iconFeatureIndex),o.iconBox){var H=function(t){var e=w&&C?xe(t,C.x,C.y,x,b,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,_,p,u,m.predicate)};k=z&&z.box&&z.box.length&&o.verticalIconBox?(M=H(o.verticalIconBox)).box.length>0:(M=H(o.iconBox)).box.length>0,P=P&&M.offscreen}var K=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,Y=v||0===e.numIconVertices;if(K||Y?Y?K||(k=k&&E):E=k&&E:k=E=k&&E,E&&f&&f.box&&i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,z&&z.box&&D?D:O,m.ID),k&&M&&i.collisionIndex.insertCollisionBox(M.box,s.get("icon-ignore-placement"),a.bucketInstanceId,L,m.ID),A&&(E&&i.collisionIndex.insertCollisionCircles(A.circles,s.get("text-ignore-placement"),a.bucketInstanceId,O,m.ID),r)){var J=a.bucketInstanceId,$=i.collisionCircleArrays[J];void 0===$&&($=i.collisionCircleArrays[J]=new ye);for(var Q=0;Q<A.circles.length;Q+=4)$.circles.push(A.circles[Q+0]),$.circles.push(A.circles[Q+1]),$.circles.push(A.circles[Q+2]),$.circles.push(A.collisionDetected?1:0)}i.placements[e.crossTileID]=new me(E||S,k||T,P||a.justReloaded),n[e.crossTileID]=!0}};if(E)for(var P=a.getSortedSymbolIndexes(this.transform.angle),C=P.length-1;C>=0;--C){var I=P[C];k(a.symbolInstances.get(I),a.collisionArrays[I])}else for(var z=e.symbolInstanceStart;z<e.symbolInstanceEnd;z++)k(a.symbolInstances.get(z),a.collisionArrays[z]);if(r&&a.bucketInstanceId in this.collisionCircleArrays){var A=this.collisionCircleArrays[a.bucketInstanceId];t.invert(A.invProjMatrix,u),A.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},be.prototype.markUsedJustification=function(e,n,r,i){var o;o=i===t.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(n)];for(var a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];a<s.length;a+=1){var u=s[a];u>=0&&(e.text.placedSymbolArray.get(u).crossTileID=o>=0&&u!==o?0:r.crossTileID)}},be.prototype.markUsedOrientation=function(e,n,r){for(var i=n===t.WritingMode.horizontal||n===t.WritingMode.horizontalOnly?n:0,o=n===t.WritingMode.vertical?n:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a<s.length;a+=1)e.text.placedSymbolArray.get(s[a]).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)},be.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,n=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var r=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(var s in this.placements){var u=this.placements[s],l=i[s];l?(this.opacities[s]=new de(l,r,u.text,u.icon),n=n||u.text!==l.text.placed||u.icon!==l.icon.placed):(this.opacities[s]=new de(null,r,u.text,u.icon,u.skipFade),n=n||u.text||u.icon)}for(var c in i){var p=i[c];if(!this.opacities[c]){var h=new de(p,r,!1,!1);h.isHidden()||(this.opacities[c]=h,n=n||p.text.placed||p.icon.placed)}}for(var f in o)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=o[f]);for(var d in a)this.placedOrientations[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.placedOrientations[d]=a[d]);n?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},be.prototype.updateLayerOpacities=function(t,e){for(var n={},r=0,i=e;r<i.length;r+=1){var o=i[r],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,n,o.collisionBoxArray)}},be.prototype.updateBucketOpacities=function(e,n,r){var i=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();var o=e.layers[0].layout,a=new de(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),u=o.get("icon-allow-overlap"),l=o.get("text-variable-anchor"),c="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),h="none"!==o.get("icon-text-fit"),f=new de(null,0,s&&(u||!e.hasIconData()||o.get("icon-optional")),u&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);for(var d=function(t,e,n){for(var r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(n)},m=function(r){var o=e.symbolInstances.get(r),s=o.numHorizontalGlyphVertices,u=o.numVerticalGlyphVertices,m=o.crossTileID,y=i.opacities[m];n[m]?y=a:y||(i.opacities[m]=y=f),n[m]=!0;var v=o.numIconVertices>0,g=i.placedOrientations[o.crossTileID],_=g===t.WritingMode.vertical,x=g===t.WritingMode.horizontal||g===t.WritingMode.horizontalOnly;if(s>0||u>0){var b=ze(y.text);d(e.text,s,_?Ae:b),d(e.text,u,x?Ae:b);var w=y.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||_?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var E=i.variableOffsets[o.crossTileID];E&&i.markUsedJustification(e,E.anchor,o,g);var S=i.placedOrientations[o.crossTileID];S&&(i.markUsedJustification(e,"left",o,S),i.markUsedOrientation(e,S,o))}if(v){var T=ze(y.icon),k=!(h&&o.verticalPlacedIconSymbolIndex&&_);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,k?T:Ae),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=y.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,k?Ae:T),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var P=e.collisionArrays[r];if(P){var C=new t.Point(0,0);if(P.textBox||P.verticalTextBox){var I=!0;if(l){var z=i.variableOffsets[m];z?(C=_e(z.anchor,z.width,z.height,z.textOffset,z.textBoxScale),c&&C._rotate(p?i.transform.angle:-i.transform.angle)):I=!1}P.textBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!I||_,C.x,C.y),P.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!I||x,C.x,C.y)}var A=Boolean(!x&&P.verticalIconBox);P.iconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,A,h?C.x:0,h?C.y:0),P.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!A,h?C.x:0,h?C.y:0)}}},y=0;y<e.symbolInstances.length;y++)m(y);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var v=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=v.invProjMatrix,e.placementViewportMatrix=v.viewportMatrix,e.collisionCircleArray=v.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},be.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},be.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},be.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},be.prototype.stillRecent=function(t,e){var n=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*n>t},be.prototype.setStale=function(){this.stale=!0};var Ee=Math.pow(2,25),Se=Math.pow(2,24),Te=Math.pow(2,17),ke=Math.pow(2,16),Pe=Math.pow(2,9),Ce=Math.pow(2,8),Ie=Math.pow(2,1);function ze(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*Ee+e*Se+n*Te+e*ke+n*Pe+e*Ce+n*Ie+e}var Ae=0,Me=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Me.prototype.continuePlacement=function(t,e,n,r,i){for(var o=this._bucketParts;this._currentTileIndex<t.length;)if(e.getBucketParts(o,r,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,i())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((function(t,e){return t.sortKey-e.sortKey})));this._currentPartIndex<o.length;)if(e.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,i())return!0;return!1};var Oe=function(t,e,n,r,i,o,a){this.placement=new be(t,i,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=r,this._done=!1};Oe.prototype.isDone=function(){return this._done},Oe.prototype.continuePlacement=function(e,n,r){for(var i=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!i._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=n[e[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=u)&&(!s.maxzoom||s.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new Me(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Oe.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Le=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;r<e.length;r++){var i=e.get(r),o=i.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:i.crossTileID,coord:this.getScaledCoordinates(i,t)})}};Le.prototype.getScaledCoordinates=function(e,n){var r=De/Math.pow(2,n.canonical.z-this.tileID.canonical.z);return{x:Math.floor((n.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((n.canonical.y*t.EXTENT+e.anchorY)*r)}},Le.prototype.findMatches=function(t,e,n){for(var r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0;i<t.length;i++){var o=t.get(i);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),u=0,l=a;u<l.length;u+=1){var c=l[u];if(Math.abs(c.coord.x-s.x)<=r&&Math.abs(c.coord.y-s.y)<=r&&!n[c.crossTileID]){n[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var Re=function(){this.maxCrossTileID=0};Re.prototype.generate=function(){return++this.maxCrossTileID};var Be=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Be.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var n in this.indexes){var r=this.indexes[n],i={};for(var o in r){var a=r[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),i[a.tileID.key]=a}this.indexes[n]=i}this.lng=t},Be.prototype.addBucket=function(t,e,n){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var r=0;r<e.symbolInstances.length;r++)e.symbolInstances.get(r).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var i=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var u=a[s];u.tileID.isChildOf(t)&&u.findMatches(e.symbolInstances,t,i)}else{var l=a[t.scaledTo(Number(o)).key];l&&l.findMatches(e.symbolInstances,t,i)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=n.generate(),i[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Le(t,e.symbolInstances,e.bucketInstanceId),!0},Be.prototype.removeBucketCrossTileIDs=function(t,e){for(var n in e.indexedSymbolInstances)for(var r=0,i=e.indexedSymbolInstances[n];r<i.length;r+=1)delete this.usedCrossTileIDs[t][i[r].crossTileID]},Be.prototype.removeStaleBuckets=function(t){var e=!1;for(var n in this.indexes){var r=this.indexes[n];for(var i in r)t[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],e=!0)}return e};var Fe=function(){this.layerIndexes={},this.crossTileIDs=new Re,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Fe.prototype.addLayer=function(t,e,n){var r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new Be);var i=!1,o={};r.handleWrapJump(n);for(var a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.getBucket(t);l&&t.id===l.layerIds[0]&&(l.bucketInstanceId||(l.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(u.tileID,l,this.crossTileIDs)&&(i=!0),o[l.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(i=!0),i},Fe.prototype.pruneUnusedLayers=function(t){var e={};for(var n in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[n]||delete this.layerIndexes[n]};var je=function(e,n){return t.emitValidationErrors(e,n&&n.filter((function(t){return"source.canvas"!==t.identifier})))},Ne=t.pick(Ut,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ue=t.pick(Ut,["setCenter","setZoom","setBearing","setP
2itch"]),Ve=function(){var e={},n=t.styleSpec.$version;for(var r in t.styleSpec.$root){var i,o=t.styleSpec.$root[r];o.required&&null!=(i="version"===r?n:"array"===o.type?[]:{})&&(e[r]=i)}return e}(),qe=function(e){function n(r,i){var o=this;void 0===i&&(i={}),e.call(this),this.map=r,this.dispatcher=new S(Ft(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new _(r._requestManager,i.localIdeographFontFamily),this.lineAtlas=new E(256,512),this.crossTileSymbolIndex=new Fe,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=n.registerForPluginStateChange((function(e){a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},(function(e,n){if(t.triggerPluginCompletionEvent(e),n&&n.every((function(t){return t})))for(var r in a.sourceCaches)a.sourceCaches[r].reload()}))})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var n=e.getSource();if(n&&n.vectorLayerIds)for(var r in o._layers){var i=o._layers[r];i.source===n.id&&o._validateLayer(i)}}}}))}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.loadURL=function(e,n){var r=this;void 0===n&&(n={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var i="boolean"==typeof n.validate?n.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,n.accessToken);var o=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,(function(e,n){r._request=null,e?r.fire(new t.ErrorEvent(e)):n&&r._load(n,i)}))},n.prototype.loadJSON=function(e,n){var r=this;void 0===n&&(n={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame((function(){r._request=null,r._load(e,!1!==n.validate)}))},n.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(Ve,!1)},n.prototype._load=function(e,n){if(!n||!je(this,t.validateStyle(e))){for(var r in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(r,e.sources[r],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=Nt(this.stylesheet.layers);this._order=i.map((function(t){return t.id})),this._layers={},this._serializedLayers={};for(var o=0,a=i;o<a.length;o+=1){var s=a[o];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},n.prototype._loadSprite=function(e){var n=this;this._spriteRequest=function(e,n,r){var i,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",u=t.getJSON(n.transformRequest(n.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){u=null,a||(a=t,i=e,c())})),l=t.getImage(n.transformRequest(n.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){l=null,a||(a=t,o=e,c())}));function c(){if(a)r(a);else if(i&&o){var e=t.browser.getImageData(o),n={};for(var s in i){var u=i[s],l=u.width,c=u.height,p=u.x,h=u.y,f=u.sdf,d=u.pixelRatio,m=u.stretchX,y=u.stretchY,v=u.content,g=new t.RGBAImage({width:l,height:c});t.RGBAImage.copy(e,g,{x:p,y:h},{x:0,y:0},{width:l,height:c}),n[s]={data:g,pixelRatio:d,sdf:f,stretchX:m,stretchY:y,content:v}}r(null,n)}}return{cancel:function(){u&&(u.cancel(),u=null),l&&(l.cancel(),l=null)}}}(e,this.map._requestManager,(function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n._availableImages=n.imageManager.listImages(),n.dispatcher.broadcast("setImages",n._availableImages),n.fire(new t.Event("data",{dataType:"style"}))}))},n.prototype._validateLayer=function(e){var n=this.sourceCaches[e.source];if(n){var r=e.sourceLayer;if(r){var i=n.getSource();
vendor: 8,533 bytes, line 2
2("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},n.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},n.prototype._serializeLayers=function(t){for(var e=[],n=0,r=t;n<r.length;n+=1){var i=this._layers[r[n]];"custom"!==i.type&&e.push(i.serialize())}return e},n.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},n.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},n.prototype.update=function(e){if(this._loaded){var n=this._changed;if(this._changed){var r=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var o in(r.length||i.length)&&this._updateWorkerLayers(r,i),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var u in this.sourceCaches)this.sourceCaches[u].used=!1;for(var l=0,c=this._order;l<c.length;l+=1){var p=this._layers[c[l]];p.recalculate(e,this._availableImages),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,n&&this.fire(new t.Event("data",{dataType:"style"}))}},n.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}},n.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},n.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},n.prototype.setState=function(e){var n=this;if(this._checkLoaded(),je(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Nt(e.layers);var r=function(e,n){if(!e)return[{command:Ut.setStyle,args:[n]}];var r=[];try{if(!t.deepEqual(e.version,n.version))return[{command:Ut.setStyle,args:[n]}];t.deepEqual(e.center,n.center)||r.push({command:Ut.setCenter,args:[n.center]}),t.deepEqual(e.zoom,n.zoom)||r.push({command:Ut.setZoom,args:[n.zoom]}),t.deepEqual(e.bearing,n.bearing)||r.push({command:Ut.setBearing,args:[n.bearing]}),t.deepEqual(e.pitch,n.pitch)||r.push({command:Ut.setPitch,args:[n.pitch]}),t.deepEqual(e.sprite,n.sprite)||r.push({command:Ut.setSprite,args:[n.sprite]}),t.deepEqual(e.glyphs,n.glyphs)||r.push({command:Ut.setGlyphs,args:[n.glyphs]}),t.deepEqual(e.transition,n.transition)||r.push({command:Ut.setTransition,args:[n.transition]}),t.deepEqual(e.light,n.light)||r.push({command:Ut.setLight,args:[n.light]});var i={},o=[];!function(e,n,r,i){var o;for(o in n=n||{},e=e||{})e.hasOwnProperty(o)&&(n.hasOwnProperty(o)||qt(o,r,i));for(o in n)n.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],n[o])||("geojson"===e[o].type&&"geojson"===n[o].type&&Wt(e,n,o)?r.push({command:Ut.setGeoJSONSourceData,args:[o,n[o].data]}):Zt(o,n,r,i)):Vt(o,n,r))}(e.sources,n.sources,o,i);var a=[];e.layers&&e.layers.forEach((function(t){i[t.source]?r.push({command:Ut.removeLayer,args:[t.id]}):a.push(t)})),r=r.concat(o),function(e,n,r){n=n||[];var i,o,a,s,u,l,c,p=(e=e||[]).map(Xt),h=n.map(Xt),f=e.reduce(Ht,{}),d=n.reduce(Ht,{}),m=p.slice(),y=Object.create(null);for(i=0,o=0;i<p.length;i++)d.hasOwnProperty(a=p[i])?o++:(r.push({command:Ut.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(i=0,o=0;i<h.length;i++)m[m.length-1-i]!==(a=h[h.length-1-i])&&(f.hasOwnProperty(a)?(r.push({command:Ut.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,r.push({command:Ut.addLayer,args:[d[a],l=m[m.length-i]]}),m.splice(m.length-i,0,a),y[a]=!0);for(i=0;i<h.length;i++)if(s=f[a=h[i]],u=d[a],!y[a]&&!t.deepEqual(s,u))if(t.deepEqual(s.source,u.source)&&t.deepEqual(s["source-layer"],u["source-layer"])&&t.deepEqual(s.type,u.type)){for(c in Gt(s.layout,u.layout,r,a,null,Ut.setLayoutProperty),Gt(s.paint,u.paint,r,a,null,Ut.setPaintProperty),t.deepEqual(s.filter,u.filter)||r.push({command:Ut.setFilter,args:[a,u.filter]}),t.deepEqual(s.minzoom,u.minzoom)&&t.deepEqual(s.maxzoom,u.maxzoom)||r.push({command:Ut.setLayerZoomRange,args:[a,u.minzoom,u.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Gt(s[c],u[c],r,a,c.slice(6),Ut.setPaintProperty):t.deepEqual(s[c],u[c])||r.push({command:Ut.setLayerProperty,args:[a,c,u[c]]}));for(c in u)u.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Gt(s[c],u[c],r,a,c.slice(6),Ut.setPaintProperty):t.deepEqual(s[c],u[c])||r.push({command:Ut.setLayerProperty,args:[a,c,u[c]]}))}else r.push({command:Ut.removeLayer,args:[a]}),l=m[m.lastIndexOf(a)+1],r.push({command:Ut.addLayer,args:[u,l]})}(a,n.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:Ut.setStyle,args:[n]}]}return r}(this.serialize(),e).filter((function(t){return!(t.command in Ue)}));if(0===r.length)return!1;var i=r.filter((function(t){return!(t.command in Ne)}));if(i.length>0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return r.forEach((function(t){"setTransition"!==t.command&&n[t.command].apply(n,t.args)})),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this._afterImageUpdated(e)},n.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},n.prototype.getImage=function(t){return this.imageManager.getImage(t)},n.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},n.prototype._afterImageUpdated=function(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,r){var i=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[e]=new zt(e,n,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},n.prototype.addLayer=function(e,n,r){void 0===r&&(r={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with i
2d "'+i+'" already exists on this map')));else{var o;if("custom"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var r=this._order.indexOf(e);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;
vendor: 13,287 bytes, line 2
2n&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(t){return this._layers[t]},n.prototype.hasLayer=function(t){return t in this._layers},n.prototype.setLayerZoomRange=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(e,n,r){void 0===r&&(r={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",n,null,r)||(i.filter=t.clone$1(n),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(n),r)||(o.setLayoutProperty(n,r,i),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(e,n){var r=this.getLayer(e);if(r)return r.getLayoutProperty(n);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(e,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(n),r)||(o.setPaintProperty(n,r,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var r=e.source,i=e.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,e.id,n)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(e,n){this._checkLoaded();var r=e.source,i=this.sourceCaches[r];if(void 0!==i){var o=i.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(a,e.id,n):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,r=e.sourceLayer,i=this.sourceCaches[n];if(void 0!==i){if("vector"!==i.getSource().type||r)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},n.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,n=function(t){return"fill-extrusion"===e._layers[t].type},r={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(n(a)){r[a]=o;for(var s=0,u=t;s<u.length;s+=1){var l=u[s][a];if(l)for(var c=0,p=l;c<p.length;c+=1)i.push(p[c])}}}i.sort((function(t,e){return e.intersectionZ-t.intersectionZ}));for(var h=[],f=this._order.length-1;f>=0;f--){var d=this._order[f];if(n(d))for(var m=i.length-1;m>=0;m--){var y=i[m].feature;if(r[y.layer.id]<f)break;h.push(y),i.pop()}else for(var v=0,g=t;v<g.length;v+=1){var _=g[v][d];if(_)for(var x=0,b=_;x<b.length;x+=1)h.push(b[x].feature)}}return h},n.prototype.queryRenderedFeatures=function(e,n,r){n&&n.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",n.filter,null,n);var i={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=n.layers;o<a.length;o+=1){var s=a[o],u=this._layers[s];if(!u)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];i[u.source]=!0}}var l=[];for(var c in n.availableImages=this._availableImages,this.sourceCaches)n.layers&&!i[c]||l.push(B(this.sourceCaches[c],this._layers,this._serializedLayers,e,n,r));return this.placement&&l.push(function(t,e,n,r,i,o,a){for(var s={},u=o.queryRenderedSymbols(r),l=[],c=0,p=Object.keys(u).map(Number);c<p.length;c+=1)l.push(a[p[c]]);l.sort(F);for(var h=function(){var n=d[f],r=n.featureIndex.lookupSymbolFeatures(u[n.bucketInstanceId],e,n.bucketIndex,n.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(var o in r){var a=s[o]=s[o]||[],l=r[o];l.sort((function(t,e){var r=n.featureSortOrder;if(r){var i=r.indexOf(t.featureIndex);return r.indexOf(e.featureIndex)-i}return e.featureIndex-t.featureIndex}));for(var c=0,p=l;c<p.length;c+=1)a.push(p[c])}},f=0,d=l;f<d.length;f+=1)h();var m=function(e){s[e].forEach((function(r){var i=r.feature,o=n[t[e].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=o}))};for(var y in s)m(y);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(l)},n.prototype.querySourceFeatures=function(e,n){n&&n.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);var r=this.sourceCaches[e];return r?function(t,e){for(var n=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),r=[],i={},o=0;o<n.length;o++){var a=n[o],s=a.tileID.canonical.key;i[s]||(i[s]=!0,a.querySourceFeatures(r,e))}return r}(r,n):[]},n.prototype.addSourceType=function(t,e,r){return n.getSourceType(t)?r(new Error('A source type called "'+t+'" already exists.')):(n.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))},n.prototype.getLight=function(){return this.light.getLight()},n.prototype.setLight=function(e,n){void 0===n&&(n={}),this._checkLoaded();var r=this.light.getLight(),i=!1;for(var o in e)if(!t.deepEqual(e[o],r[o])){i=!0;break}if(i){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,n),this.light.updateTransitions(a)}},n.prototype._validate=function(e,n,r,i,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&je(this,e.call(t.validateStyle,t.extend({key:n,style:this.serialize(),value:r,styleSpec:t.styleSpec},i)))},n.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var n in this.sourceCaches)this.sourceCaches[n].clearTiles(),this.sourceCaches[n].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},n.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},n.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},n.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},n.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},n.prototype._updatePlacement=function(e,n,r,i,o){void 0===o&&(o=!1);for(var a=!1,s=!1,u={},l=0,c=this._order;l<c.length;l+=1){var p=this._layers[c[l]];if("symbol"===p.type){if(!u[p.source]){var h=this.sourceCaches[p.source];u[p.source]=h.getRenderableIds(!0).map((function(t){return h.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var f=this.crossTileSymbolIndex.addLayer(p,u[p.source],e.center.lng);a=a||f}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new Oe(e,this._order,o,n,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,u),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var d=0,m=this._order;d<m.length;d+=1){var y=this._layers[m[d]];"symbol"===y.type&&this.placement.updateLayerOpacities(y,u[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},n.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},n.prototype.getImages=function(t,e,n){this.imageManager.getImages(e.icons,n),this._updateTilesForChangedImages();var r=this.sourceCaches[e.source];r&&r.setDependencies(e.tileID.key,e.type,e.icons)},n.prototype.getGlyphs=function(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)},n.prototype.getResource=function(e,n,r){return t.makeRequest(n,r)},n}(t.Evented);qe.getSourceType=function(t){return L[t]},qe.setSourceType=function(t,e){L[t]=e},qe.registerForPluginStateChange=t.registerForPluginStateChange;var Ze=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),We=gn("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);
2return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Ge=gn("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Xe=gn("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),He=gn("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Ke=gn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ye=gn("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Je=gn("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),$e=gn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Qe=gn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tn=gn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),en=gn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),nn=gn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),rn=gn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),on=gn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),an=gn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=amb
2ientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),sn=gn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),un=gn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),ln=gn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
2\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),cn=gn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pn=gn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),hn=gn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),fn=gn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
2uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),dn=gn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),mn=gn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),yn=gn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),vn=gn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
2gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function gn(t,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=e.match(/attribute ([\w]+) ([\w]+)/g),i=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(i):i,s={};return{fragmentSource:t=t.replace(n,(function(t,e,n,r,i){return s[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+n+" "+r+" "+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n    "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:e=e.replace(n,(function(t,e,n,r,i){var o="float"===r?"vec2":"vec4",a=i.match(/color/)?"color":o;return s[i]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\nvarying "+n+" "+r+" "+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+i+" = a_"+i+";\n#else\n    "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+i+" = unpack_mix_"+a+"(a_"+i+", u_"+i+"_t);\n#else\n    "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+n+" "+r+" "+i+" = a_"+i+";\n#else\n    "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+n+" "+r+" "+i+" = unpack_mix_"+a+"(a_"+i+", u_"+i+"_t);\n#else\n    "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:r,staticUniforms:a}}var _n=Object.freeze({__proto__:null,prelude:We,background:Ge,backgroundPattern:Xe,cir
vendor: 9,219 bytes, line 2
2cle:He,clippingMask:Ke,heatmap:Ye,heatmapTexture:Je,collisionBox:$e,collisionCircle:Qe,debug:tn,fill:en,fillOutline:nn,fillOutlinePattern:rn,fillPattern:on,fillExtrusion:an,fillExtrusionPattern:sn,hillshadePrepare:un,hillshade:ln,line:cn,lineGradient:pn,linePattern:hn,lineSDF:fn,raster:dn,symbolIcon:mn,symbolSDF:yn,symbolTextAndIcon:vn}),xn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function bn(t){for(var e=[],n=0;n<t.length;n++)if(null!==t[n]){var r=t[n].split(" ");e.push(r.pop())}return e}xn.prototype.bind=function(t,e,n,r,i,o,a,s){this.context=t;for(var u=this.boundPaintVertexBuffers.length!==r.length,l=0;!u&&l<r.length;l++)this.boundPaintVertexBuffers[l]!==r[l]&&(u=!0);t.extVertexArrayObject&&this.vao&&this.boundProgram===e&&this.boundLayoutVertexBuffer===n&&!u&&this.boundIndexBuffer===i&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s?(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind()):this.freshBind(e,n,r,i,o,a,s)},xn.prototype.freshBind=function(t,e,n,r,i,o,a){var s,u=t.numAttributes,l=this.context,c=l.gl;if(l.extVertexArrayObject)this.vao&&this.destroy(),this.vao=l.extVertexArrayObject.createVertexArrayOES(),l.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=l.currentNumAttributes||0;for(var p=u;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=n;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(var d=0,m=n;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,i)}o&&(o.bind(),o.setVertexAttribPointers(c,t,i)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,i)),l.currentNumAttributes=u},xn.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var wn=function(t,e,n,r,i,o){var a=t.gl;this.program=a.createProgram();for(var s=bn(n.staticAttributes),u=r?r.getBinderAttributes():[],l=s.concat(u),c=n.staticUniforms?bn(n.staticUniforms):[],p=r?r.getBinderUniforms():[],h=[],f=0,d=c.concat(p);f<d.length;f+=1){var m=d[f];h.indexOf(m)<0&&h.push(m)}var y=r?r.defines():[];o&&y.push("#define OVERDRAW_INSPECTOR;");var v=y.concat(We.fragmentSource,n.fragmentSource).join("\n"),g=y.concat(We.vertexSource,n.vertexSource).join("\n"),_=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(_,v),a.compileShader(_),a.attachShader(this.program,_);var x=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(x,g),a.compileShader(x),a.attachShader(this.program,x),this.attributes={};var b={};this.numAttributes=l.length;for(var w=0;w<this.numAttributes;w++)l[w]&&(a.bindAttribLocation(this.program,w,l[w]),this.attributes[l[w]]=w);a.linkProgram(this.program),a.deleteShader(x),a.deleteShader(_);for(var E=0;E<h.length;E++){var S=h[E];if(S&&!b[S]){var T=a.getUniformLocation(this.program,S);T&&(b[S]=T)}}this.fixedUniforms=i(t,b),this.binderUniforms=r?r.getUniforms(t,b):[]}}};function En(t,e,n){var r=1/he(n,1,e.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,e.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}wn.prototype.draw=function(t,e,n,r,i,o,a,s,u,l,c,p,h,f,d,m){var y,v=t.gl;if(!this.failedToCreate){for(var g in t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(r),t.setColorMode(i),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[g].set(a[g]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var _=(y={},y[v.LINES]=2,y[v.TRIANGLES]=3,y[v.LINE_STRIP]=1,y)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],E=w.vaos||(w.vaos={});(E[s]||(E[s]=new xn)).bind(t,this,u,f?f.getPaintVertexBuffers():[],l,w.vertexOffset,d,m),v.drawElements(e,w.primitiveLength*_,v.UNSIGNED_SHORT,w.primitiveOffset*_*2)}}};var Sn=function(e,n,r,i){var o=n.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],u=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(u,-n.transform.angle),t.transformMat3(s,s,u);var l=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+r,u_opacity:i}},Tn=function(e,n,r,i,o,a,s){return t.extend(Sn(e,n,r,i),En(a,n,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8})},kn=function(t){return{u_matrix:t}},Pn=function(e,n,r,i){return t.extend(kn(e),En(r,n,i))},Cn=function(t,e){return{u_matrix:t,u_world:e}},In=function(e,n,r,i,o){return t.extend(Pn(e,n,r,i),{u_world:o})},zn=function(e,n,r,i){var o,a,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var u=he(r,1,s.zoom);o=!0,a=[u,u]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(n.posMatrix,r,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:a}},An=function(t,e,n){var r=he(n,1,e.zoom),i=Math.pow(2,e.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[e.pixelsToGLUnits[0]/(r*i),e.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:o}},Mn=function(t,e,n){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},On=function(t,e,n){return void 0===n&&(n=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:n}},Dn=function(t){return{u_matrix:t}},Ln=function(t,e,n,r){return{u_matrix:t,u_extrude_scale:he(e,1,n),u_intensity:r}},Rn=function(e,n,r){var i=e.transform;return{u_matrix:Un(e,n,r),u_ratio:1/he(n,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Bn=function(e,n,r,i){return t.extend(Rn(e,n,r),{u_image:0,u_image_height:i})},Fn=function(e,n,r,i){var o=e.transform,a=Nn(n,o);return{u_matrix:Un(e,n,r),u_texsize:n.imageAtlasTexture.size,u_ratio:1/he(n,1,o.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[a,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},jn=function(e,n,r,i,o){var a=e.lineAtlas,s=Nn(n,e.transform),u="round"===r.layout.get("line-cap"),l=a.getDash(i.from,u),c=a.getDash(i.to,u),p=l.width*o.fromScale,h=c.width*o.toScale;return t.extend(Rn(e,n,r),{u_patternscale_a:[s/p,-l.height/2],u_patternscale_b:[s/h,-c.height/2],u_sdfgamma:a.width/(256*Math.min(p,h)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:l.y,u_tex_y_b:c.y,u_mix:o.t})};function Nn(t,e){return 1/he(t,1,e.tileZoom)}function Un(t,e,n){return t.translatePosMatrix(e.tileID.posMatrix,e,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var Vn=function(t,e,n,r,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:qn(i.paint.get("raster-hue-rotate"))};var o,a};function qn(t){t*=Math.PI/180;var e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}var Zn,Wn=function(t,e,n,r,i,o,a,s,u,l){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+r,u_texsize:l,u_texture:0}},Gn=function(e,n,r,i,o,a,s,u,l,c,p){var h=o.transform;return t.extend(Wn(e,n,r,i,o,a,s,u,l,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})},Xn=function(e,n,r,i,o,a,s,u,l,c){return t.extend(Gn(e,n,r,i,o,a,s,u,!0,l,!0),{u_texsize_icon:c,u_texture_icon:1})},Hn=function(t,e,n){return{u_matrix:t,u_opacity:e,u_color:n}},Kn=function(e,n,r,i,o,a){return t.extend(function(t,e,n,r){var i=n.imageManager.getPattern(t.from.toString()),o=n.imageManager.getPattern(t.to.toString()),a=n.imageManager.getPixelSize(),s=a.width,u=a.height,l=Math.pow(2,r.tileID.overscaledZ
vendor: 7,470 bytes, line 2
2),c=r.tileSize*Math.pow(2,n.transform.tileZoom)/l,p=c*(r.tileID.canonical.x+r.tileID.wrap*l),h=c*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,u],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/he(r,1,n.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(i,a,r,o),{u_matrix:e,u_opacity:n})},Yn={fillExtrusion:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fillExtrusionPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,n.u_height_factor),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},collisionBox:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,n.u_overscale_factor)}},collisionCircle:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,n.u_viewport_size)}},debug:function(e,n){return{u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_overlay:new t.Uniform1i(e,n.u_overlay),u_overlay_scale:new t.Uniform1f(e,n.u_overlay_scale)}},clippingMask:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new t.Uniform1f(e,n.u_extrude_scale),u_intensity:new t.Uniform1f(e,n.u_intensity),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_color_ramp:new t.Uniform1i(e,n.u_color_ramp),u_opacity:new t.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_latrange:new t.Uniform2f(e,n.u_latrange),u_light:new t.Uniform2f(e,n.u_light),u_shadow:new t.UniformColor(e,n.u_shadow),u_highlight:new t.UniformColor(e,n.u_highlight),u_accent:new t.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_dimension:new t.Uniform2f(e,n.u_dimension),u_zoom:new t.Uniform1f(e,n.u_zoom),u_unpack:new t.Uniform4f(e,n.u_unpack)}},line:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_image:new t.Uniform1i(e,n.u_image),u_image_height:new t.Uniform1f(e,n.u_image_height)}},linePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texsize:new t.Uniform2f(e,n.u_texsize),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_image:new t.Uniform1i(e,n.u_image),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,n.u_sdfgamma),u_image:new t.Uniform1i(e,n.u_image),u_tex_y_a:new t.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,n.u_tex_y_b),u_mix:new t.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new t.Uniform2f(e,n.u_tl_parent),u_scale_parent:new t.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,n.u_buffer_scale),u_fade_t:new t.Uniform1f(e,n.u_fade_t),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image0:new t.Uniform1i(e,n.u_image0),u_image1:new t.Uniform1i(e,n.u_image1),u_brightness_low:new t.Uniform1f(e,n.u_brightness_low),u_brightness_high:new t.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix
vendor: 119,572 bytes, line 2
2),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}},symbolTextAndIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texsize_icon:new t.Uniform2f(e,n.u_texsize_icon),u_texture:new t.Uniform1i(e,n.u_texture),u_texture_icon:new t.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_color:new t.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image:new t.Uniform1i(e,n.u_image),u_pattern_tl_a:new t.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,n.u_pattern_br_b),u_texsize:new t.Uniform2f(e,n.u_texsize),u_mix:new t.Uniform1f(e,n.u_mix),u_pattern_size_a:new t.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,n.u_scale_a),u_scale_b:new t.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,n.u_tile_units_to_pixels)}}};function Jn(e,n,r,i,o,a,s){for(var u=e.context,l=u.gl,c=e.useProgram("collisionBox"),p=[],h=0,f=0,d=0;d<i.length;d++){var m=i[d],y=n.getTile(m),v=y.getBucket(r);if(v){var g=m.posMatrix;0===o[0]&&0===o[1]||(g=e.translatePosMatrix(m.posMatrix,y,o,a));var _=s?v.textCollisionBox:v.iconCollisionBox,x=v.collisionCircleArray;if(x.length>0){var b=t.create(),w=g;t.mul(b,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,v.placementViewportMatrix),p.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=h+=x.length/4}_&&c.draw(u,l.LINES,Tt.disabled,kt.disabled,e.colorModeForRenderPass(),Ct.disabled,An(g,e.transform,y),r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}if(s&&p.length){var E=e.useProgram("collisionCircle"),S=new t.StructArrayLayout2f1f2i16;S.resize(4*h),S._trim();for(var T=0,k=0,P=p;k<P.length;k+=1)for(var C=P[k],I=0;I<C.circleArray.length/4;I++){var z=4*I,A=C.circleArray[z+0],M=C.circleArray[z+1],O=C.circleArray[z+2],D=C.circleArray[z+3];S.emplace(T++,A,M,O,D,0),S.emplace(T++,A,M,O,D,1),S.emplace(T++,A,M,O,D,2),S.emplace(T++,A,M,O,D,3)}(!Zn||Zn.length<2*h)&&(Zn=function(e){var n=2*e,r=new t.StructArrayLayout3ui6;r.resize(n),r._trim();for(var i=0;i<n;i++){var o=6*i;r.uint16[o+0]=4*i+0,r.uint16[o+1]=4*i+1,r.uint16[o+2]=4*i+2,r.uint16[o+3]=4*i+2,r.uint16[o+4]=4*i+3,r.uint16[o+5]=4*i+0}return r}(h));for(var L=u.createIndexBuffer(Zn,!0),R=u.createVertexBuffer(S,t.collisionCircleLayout.members,!0),B=0,F=p;B<F.length;B+=1){var j=F[B],N=Mn(j.transform,j.invTransform,e.transform);E.draw(u,l.TRIANGLES,Tt.disabled,kt.disabled,e.colorModeForRenderPass(),Ct.disabled,N,r.id,R,L,t.SegmentVector.simpleSegment(0,2*j.circleOffset,j.circleArray.length,j.circleArray.length/2),null,e.transform.zoom,null,null,null)}R.destroy(),L.destroy()}}var $n=t.identity(new Float32Array(16));function Qn(e,n,r,i,o,a){var s=t.getAnchorAlignment(e),u=-(s.horizontalAlign-.5)*n,l=-(s.verticalAlign-.5)*r,c=t.evaluateVariableOffset(e,i);return new t.Point((u/o+c[0])*a,(l/o+c[1])*a)}function tr(e,n,r,i,o,a,s,u,l,c,p){var h=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,m={};f.clear();for(var y=0;y<h.length;y++){var v=h.get(y),g=v.hidden||!v.crossTileID||e.allowVerticalPlacement&&!v.placedOrientation?null:i[v.crossTileID];if(g){var _=new t.Point(v.anchorX,v.anchorY),x=Qt(_,r?u:s),b=te(a.cameraToCenterDistance,x.signedDistanceFromCamera),w=o.evaluateSizeForFeature(e.textSizeData,c,v)*b/t.ONE_EM;r&&(w*=e.tilePixelRatio/l);for(var E=Qn(g.anchor,g.width,g.height,g.textOffset,g.textBoxScale,w),S=r?Qt(_.add(E),s).point:x.point.add(n?E.rotate(-a.angle):E),T=e.allowVerticalPlacement&&v.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,k=0;k<v.numGlyphs;k++)t.addDynamicAttributes(f,S,T);p&&v.associatedIconIndex>=0&&(m[v.associatedIconIndex]={shiftedAnchor:S,angle:T})}else le(v.numGlyphs,f)}if(p){d.clear();for(var P=e.icon.placedSymbolArray,C=0;C<P.length;C++){var I=P.get(C);if(I.hidden)le(I.numGlyphs,d);else{var z=m[C];if(z)for(var A=0;A<I.numGlyphs;A++)t.addDynamicAttributes(d,z.shiftedAnchor,z.angle);else le(I.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(f)}function er(t,e,n){return n.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function nr(e,n,r,i,o,a,s,u,l,c,p,h){for(var f=e.context,d=f.gl,m=e.transform,y="map"===u,v="map"===l,g=y&&"point"!==r.layout.get("symbol-placement"),_=y&&!v&&!g,x=void 0!==r.layout.get("symbol-sort-key").constantOr(1),b=e.depthModeForSublayer(0,Tt.ReadOnly),w=r.layout.get("text-variable-anchor"),E=[],S=0,T=i;S<T.length;S+=1){var k=T[S],P=n.getTile(k),C=P.getBucket(r);if(C){var I=o?C.text:C.icon;if(I&&I.segments.get().length){var z=I.programConfigurations.get(r.id),A=o||C.sdfIcons,M=o?C.textSizeData:C.iconSizeData,O=v||0!==m.pitch,D=e.useProgram(er(A,o,C),z),L=t.evaluateSizeForZoom(M,m.zoom),R=void 0,B=[0,0],F=void 0,j=void 0,N=null,U=void 0;if(o)F=P.glyphAtlasTexture,j=d.LINEAR,R=P.glyphAtlasTexture.size,C.iconsInText&&(B=P.imageAtlasTexture.size,N=P.imageAtlasTexture,U=O||e.options.rotating||e.options.zooming||"composite"===M.kind||"camera"===M.kind?d.LINEAR:d.NEAREST);else{var V=1!==r.layout.get("icon-size").constantOr(0)||C.iconsNeedLinear;F=P.imageAtlasTexture,j=A||e.options.rotating||e.options.zooming||V||O?d.LINEAR:d.NEAREST,R=P.imageAtlasTexture.size}var q=he(P,1,e.transform.zoom),Z=Jt(k.posMatrix,v,y,e.transform,q),W=$t(k.posMatrix,v,y,e.transform,q),G=w&&C.hasTextData(),X="none"!==r.layout.get("icon-text-fit")&&G&&C.hasIconData();g&&ne(C,k.posMatrix,e,o,Z,W,v,c);var H=e.translatePosMatrix(k.posMatrix,P,a,s),K=g||o&&w||X?$n:Z,Y=e.translatePosMatrix(W,P,a,s,!0),J=A&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),$={program:D,buffers:I,uniformValues:A?C.iconsInText?Xn(M.kind,L,_,v,e,H,K,Y,R,B):Gn(M.kind,L,_,v,e,H,K,Y,o,R,!0):Wn(M.kind,L,_,v,e,H,K,Y,o,R),atlasTexture:F,atlasTextureIcon:N,atlasInterpolation:j,atlasInterpolationIcon:U,isSDF:A,hasHalo:J};if(x)for(var Q=0,tt=I.segments.get();Q<tt.length;Q+=1){var et=tt[Q];E.push({segments:new t.SegmentVector([et]),sortKey:et.sortKey,state:$})}else E.push({segments:I.segments,sortKey:0,state:$})}}}x&&E.sort((function(t,e){return t.sortKey-e.sortKey}));for(var nt=0,rt=E;nt<rt.length;nt+=1){var it=rt[nt],ot=it.state;if(f.activeTexture.set(d.TEXTURE0),ot.atlasTexture.bind(ot.atlasInterpolation,d.CLAMP_TO_EDGE),ot.atlasTextureIcon&&(f.activeTexture.set(d.TEXTURE1),ot.atlasTextureIcon&&ot.atlasTextureIcon.bind(ot.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),ot.isSDF){var at=ot.uniformValues;ot.hasHalo&&(at.u_is_halo=1,rr(ot.buffers,it.segments,r,e,ot.program,b,p,h,at)),at.u_is_halo=0}rr(ot.buffers,it.segments,r,e,ot.program,b,p,h,ot.uniformValues)}}function rr(t,e,n,r,i,o,a,s,u){var l=r.context;i.draw(l,l.gl.TRIANGLES,o,a,s,Ct.disabled,u,n.id,t.layoutVertexBuffer,t.indexBuffer,e,n.paint,r.transform.zoom,t.programConfigurations.get(n.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function ir(t,e,n,r,i,o,a){var s,u,l,c,p,h=t.context.gl,f=n.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=n.getCrossfadeParameters();a?(u=d&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(u=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,v=r;y<v.length;y+=1){var g=v[y],_=e.getTile(g);if(!d||_.patternsLoaded()){var x=_.getBucket(n);if(x){var b=x.programConfigurations.get(n.id),w=t.useProgram(u,b);d&&(t.context.activeTexture.set(h.TEXTURE0),_.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePaintBuffers(m));var E=f.constantOr(null);if(E&&_.imageAtlas){var S=_.imageAtlas,T=S.patternPositions[E.to.toString()],k=S.patternPositions[E.from.toString()];T&&k&&b.setConstantPatternPositions(T,k)}var P=t.translatePosMatrix(g.posMatrix,_,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){c=x.indexBuffer2,p=x.segments2;var C=[h.drawingBufferWidth,h.drawingBufferHeight];l="fillOutlinePattern"===u&&d?In(P,t,m,_,C):Cn(P,C)}else c=x.indexBuffer,p=x.segments,l=d?Pn(P,t,m,_):kn(P);w.draw(t.context,s,i,t.stencilModeForClipping(g),o,Ct.disabled,l,n.id,x.layoutVertexBuffer,c,p,n.paint,t.transform.zoom,b)}}}}function or(t,e,n,r,i,o,a){for(var s=t.context,u=s.gl,l=n.paint.get("fill-extrusion-pattern"),c=l.constantOr(1),p=n.getCrossfadeParameters(),h=n.paint.get("fill-extrusion-opacity"),f=0,d=r;f<d.length;f+=1){var m=d[f],y=e.getTile(m),v=y.getBucket(n);if(v){var g=v.programConfigurations.get(n.id),_=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",g);c&&(t.context.activeTexture.set(u.TEXTURE0),y.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),g.updatePaintBuffers(p));var x=l.constantOr(null);if(x&&y.imageAtlas){var b=y.imageAtlas,w=b.patternPositions[x.to.toString()],E=b.patternPositions[x.from.toString()];w&&E&&g.setConstantPatternPositions(w,E)}var S=t.translatePosMatrix(m.posMatrix,y,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),T=n.paint.get("fill-extrusion-vertical-gradient"),k=c?Tn(S,t,T,h,m,p,y):Sn(S,t,T,h);_.draw(s,s.gl.TRIANGLES,i,o,a,Ct.backCCW,k,n.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,n.paint,t.transform.zoom,g)}}}function ar(e,n,r,i,o,a){var s=e.context,u=s.gl,l=n.fbo;if(l){var c=e.useProgram("hillshade");s.activeTexture.set(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,l.colorAttachment.get());var p=function(e,n,r){var i=r.paint.get("hillshade-shadow-color"),o=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var u,l,c,p=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(n.tileID.toUnwrapped(),p),u_image:0,u_latrange:(u=n.tileID,l=Math.pow(2,u.canonical.z),c=u.canonical.y,[new t.MercatorCoordinate(0,c/l).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/l).toLngLat().lat]),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}}(e,n,r);c.draw(s,u.TRIANGLES,i,o,a,Ct.disabled,p,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}function sr(e,n,r,i,o,a){var s=e.context,u=s.gl,l=n.dem;if(l&&l.data){var c=l.dim,p=l.stride,h=l.getPixels();if(s.activeTexture.set(u.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||e.getTileTexture(p),n.demTexture){var f=n.demTexture;f.update(h,{premultiply:!1}),f.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else n.demTexture=new t.Texture(s,h,u.RGBA,{premultiply:!1}),n.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);s.activeTexture.set(u.TEXTURE0);var d=n.fbo;if(!d){var m=new t.Texture(s,{width:c,height:c,data:null},u.RGBA);m.bind(u.LINEAR,u.CLAMP_TO_EDGE),(d=n.fbo=s.createFramebuffer(c,c,!0)).colorAttachment.set(m.texture)}s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,c,c]),e.useProgram("hillshadePrepare").draw(s,u.TRIANGLES,i,o,a,Ct.disabled,function(e,n){var r=n.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:n.getUnpackVector()}}(n.tileID,l),r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function ur(e,n,r,i,o){var a=i.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),u=(s-e.timeAdded)/a,l=n?(s-n.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?u:1-l,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var lr=new t.Color(1,0,0,1),cr=new t.Color(0,1,0,1),pr=new t.Color(0,0,1,1),hr=new t.Color(1,0,1,1),fr=new t.Color(0,1,1,1);function dr(t,e,n,r){yr(t,0,e+n/2,t.transform.width,n,r)}function mr(t,e,n,r){yr(t,e-n/2,0,n,t.transform.height,r)}function yr(e,n,r,i,o,a){var s=e.context,u=s.gl;u.enable(u.SCISSOR_TEST),u.scissor(n*t.browser.devicePixelRatio,r*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),u.disable(u.SCISSOR_TEST)}function vr(e,n,r){var i=e.context,o=i.gl,a=r.posMatrix,s=e.useProgram("debug"),u=Tt.disabled,l=kt.disabled,c=e.colorModeForRenderPass();i.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(i,o.LINE_STRIP,u,l,c,Ct.disabled,On(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=n.getTileByID(r.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),f=n.getTile(r).tileSize,d=512/Math.min(f,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var n=t.debugOverlayCanvas,r=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(e,m+" "+h+"kb"),s.draw(i,o.TRIANGLES,u,l,Pt.alphaBlended,Ct.disabled,On(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var gr={symbol:function(e,n,r,i,o){if("translucent"===e.renderPass){var a=kt.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,n,r,i,o,a,s){for(var u=n.transform,l="map"===o,c="map"===a,p=0,h=e;p<h.length;p+=1){var f=h[p],d=i.getTile(f),m=d.getBucket(r);if(m&&m.text&&m.text.segments.get().length){var y=t.evaluateSizeForZoom(m.textSizeData,u.zoom),v=he(d,1,n.transform.zoom),g=Jt(f.posMatrix,c,l,n.transform,v),_="none"!==r.layout.get("icon-text-fit")&&m.hasIconData();if(y){var x=Math.pow(2,u.zoom-d.tileID.overscaledZ);tr(m,l,c,s,t.symbolSize,u,g,f.posMatrix,x,y,_)}}}}(i,e,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&nr(e,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&nr(e,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(Jn(e,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),Jn(e,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}},circle:function(e,n,r,i){if("translucent"===e.renderPass){var o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),u=void 0!==r.layout.get("circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var l=e.context,c=l.gl,p=e.depthModeForSublayer(0,Tt.ReadOnly),h=kt.disabled,f=e.colorModeForRenderPass(),d=[],m=0;m<i.length;m++){var y=i[m],v=n.getTile(y),g=v.getBucket(r);if(g){var _=g.programConfigurations.get(r.id),x={programConfiguration:_,program:e.useProgram("circle",_),layoutVertexBuffer:g.layoutVertexBuffer,indexBuffer:g.indexBuffer,uniformValues:zn(e,y,v,r)};if(u)for(var b=0,w=g.segments.get();b<w.length;b+=1){var E=w[b];d.push({segments:new t.SegmentVector([E]),sortKey:E.sortKey,state:x})}else d.push({segments:g.segments,sortKey:0,state:x})}}u&&d.sort((function(t,e){return t.sortKey-e.sortKey}));for(var S=0,T=d;S<T.length;S+=1){var k=T[S],P=k.state;P.program.draw(l,c.TRIANGLES,p,h,f,Ct.disabled,P.uniformValues,r.id,P.layoutVertexBuffer,P.indexBuffer,k.segments,r.paint,e.transform.zoom,P.programConfiguration)}}}},heatmap:function(e,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=kt.disabled,u=new Pt([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,n){var r=t.gl;t.activeTexture.set(r.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,n,r){var i=t.gl;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,e.width/4,e.height/4,0,i.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE,null),r.colorAttachment.set(n)}(t,e,o,i)}}(o,e,r),o.clear({color:t.Color.transparent});for(var l=0;l<i.length;l++){var c=i[l];if(!n.hasRenderableParent(c)){var p=n.getTile(c),h=p.getBucket(r);if(h){var f=h.programConfigurations.get(r.id);e.useProgram("heatmap",f).draw(o,a.TRIANGLES,Tt.disabled,s,u,Ct.disabled,Ln(c.posMatrix,p,e.transform.zoom,r.paint.get("heatmap-intensity")),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,r.paint,e.transform.zoom,f)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,n){var r=e.context,i=r.gl,o=n.heatmapFbo;if(o){r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);var a=n.colorRampTexture;a||(a=n.colorRampTexture=new t.Texture(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,Tt.disabled,kt.disabled,e.colorModeForRenderPass(),Ct.disabled,function(e,n,r,i){var o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:n.paint.get("heatmap-opacity")}}(e,n),n.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,n.paint,e.transform.zoom)}}(e,r))},line:function(e,n,r,i){if("translucent"===e.renderPass){var o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=e.depthModeForSublayer(0,Tt.ReadOnly),u=e.colorModeForRenderPass(),l=r.paint.get("line-dasharray"),c=r.paint.get("line-pattern"),p=c.constantOr(1),h=r.paint.get("line-gradient"),f=r.getCrossfadeParameters(),d=p?"linePattern":l?"lineSDF":h?"lineGradient":"line",m=e.context,y=m.gl,v=!0,g=0,_=i;g<_.length;g+=1){var x=_[g],b=n.getTile(x);if(!p||b.patternsLoaded()){var w=b.getBucket(r);if(w){var E=w.programConfigurations.get(r.id),S=e.context.program.get(),T=e.useProgram(d,E),k=v||T.program!==S,P=c.constantOr(null);if(P&&b.imageAtlas){var C=b.imageAtlas,I=C.patternPositions[P.to.toString()],z=C.patternPositions[P.from.toString()];I&&z&&E.setConstantPatternPositions(I,z)}var A=p?Fn(e,b,r,f):l?jn(e,b,r,l,f):h?Bn(e,b,r,w.lineClipsArray.length):Rn(e,b,r);if(p)m.activeTexture.set(y.TEXTURE0),b.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),E.updatePaintBuffers(f);else if(l&&(k||e.lineAtlas.dirty))m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m);else if(h){var M=w.gradients[r.id],O=M.texture;if(r.gradientVersion!==M.version){var D=256;if(r.stepInterpolant){var L=n.getSource().maxzoom,R=x.canonical.z===L?Math.ceil(1<<e.transform.maxZoom-x.canonical.z):1;D=t.clamp(t.nextPowerOfTwo(w.maxLineLength/t.EXTENT*1024*R),256,m.maxTextureSize)}M.gradient=t.renderColorRamp({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:D,image:M.gradient||void 0,clips:w.lineClipsArray}),M.texture?M.texture.update(M.gradient):M.texture=new t.Texture(m,M.gradient,y.RGBA),M.version=r.gradientVersion,O=M.texture}m.activeTexture.set(y.TEXTURE0),O.bind(r.stepInterpolant?y.NEAREST:y.LINEAR,y.CLAMP_TO_EDGE)}T.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(x),u,Ct.disabled,A,r.id,w.layoutVertexBuffer,w.indexBuffer,w.segments,r.paint,e.transform.zoom,E,w.layoutVertexBuffer2),v=!1}}}}},fill:function(e,n,r,i){var o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),u=r.paint.get("fill-pattern"),l=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===l){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?Tt.ReadWrite:Tt.ReadOnly);ir(e,n,r,i,c,s,!1)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){var p=e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,Tt.ReadOnly);ir(e,n,r,i,p,s,!0)}}},"fill-extrusion":function(t,e,n,r){var i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===t.renderPass){var o=new Tt(t.context.gl.LEQUAL,Tt.ReadWrite,t.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))or(t,e,n,r,o,kt.disabled,Pt.disabled),or(t,e,n,r,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();or(t,e,n,r,o,kt.disabled,a)}}},hillshade:function(t,e,n,r){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var i=t.context,o=t.depthModeForSublayer(0,Tt.ReadOnly),a=t.colorModeForRenderPass(),s="translucent"===t.renderPass?t.stencilConfigForOverlap(r):[{},r],u=s[0],l=0,c=s[1];l<c.length;l+=1){var p=c[l],h=e.getTile(p);h.needsHillshadePrepare&&"offscreen"===t.renderPass?sr(t,h,n,o,kt.disabled,a):"translucent"===t.renderPass&&ar(t,h,n,o,u[p.overscaledZ],a)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,n,r){if("translucent"===t.renderPass&&0!==n.paint.get("raster-opacity")&&r.length)for(var i=t.context,o=i.gl,a=e.getSource(),s=t.useProgram("raster"),u=t.colorModeForRenderPass(),l=a instanceof M?[{},r]:t.stencilConfigForOverlap(r),c=l[0],p=l[1],h=p[p.length-1].overscaledZ,f=!t.options.moving,d=0,m=p;d<m.length;d+=1){var y=m[d],v=t.depthModeForSublayer(y.overscaledZ-h,1===n.paint.get("raster-opacity")?Tt.ReadWrite:Tt.ReadOnly,o.LESS),g=e.getTile(y),_=t.transform.calculatePosMatrix(y.toUnwrapped(),f);g.registerFadeDuration(n.paint.get("raster-fade-duration"));var x=e.findLoadedParent(y,0),b=ur(g,x,e,n,t.transform),w=void 0,E=void 0,S="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;i.activeTexture.set(o.TEXTURE0),g.texture.bind(S,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(o.TEXTURE1),x?(x.texture.bind(S,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-g.tileID.overscaledZ),E=[g.tileID.canonical.x*w%1,g.tileID.canonical.y*w%1]):g.texture.bind(S,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var T=Vn(_,E||[0,0],w||1,b,n);a instanceof M?s.draw(i,o.TRIANGLES,v,kt.disabled,u,Ct.disabled,T,n.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(i,o.TRIANGLES,v,c[y.overscaledZ],u,Ct.disabled,T,n.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,n){var r=n.paint.get("background-color"),i=n.paint.get("background-opacity");if(0!==i){var o=t.context,a=o.gl,s=t.transform,u=s.tileSize,l=n.paint.get("background-pattern");if(!t.isPatternMissing(l)){var c=!l&&1===r.a&&1===i&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass===c){var p=kt.disabled,h=t.depthModeForSublayer(0,"opaque"===c?Tt.ReadWrite:Tt.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(l?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:u});l&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=n.getCrossfadeParameters(),v=0,g=m;v<g.length;v+=1){var _=g[v],x=t.transform.calculatePosMatrix(_.toUnwrapped()),b=l?Kn(x,i,t,l,{tileID:_,tileSize:u},y):Hn(x,i,r);d.draw(o,a.TRIANGLES,h,p,f,Ct.disabled,b,n.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,n){for(var r=0;r<n.length;r++)vr(t,e,n[r])},custom:function(t,e,n){var r=t.context,i=n.implementation;if("offscreen"===t.renderPass){var o=i.prerender;o&&(t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),o.call(i,r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),r.setStencilMode(kt.disabled);var a="3d"===i.renderingMode?new Tt(t.context.gl.LEQUAL,Tt.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,Tt.ReadOnly);r.setDepthMode(a),i.render(r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState(),r.bindFramebuffer.set(null)}}},_r=function(t,e){this.context=new It(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=zt.maxUnderzooming+zt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Fe,this.gpuTimers={}};_r.prototype.resize=function(e,n){if(this.width=e*t.browser.devicePixelRatio,this.height=n*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,i=this.style._order;r<i.length;r+=1)this.style._layers[i[r]].resize()},_r.prototype.setup=function(){var e=this.context,n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(n,Ze.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(r,Ze.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var i=new t.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(t.EXTENT,0,t.EXTENT,0),i.emplaceBack(0,t.EXTENT,0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(i,A.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ze.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var u=this.context.gl;this.stencilClearMode=new kt({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO)},_r.prototype.clearStencil=function(){var e=this.context,n=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var r=t.create();t.ortho(r,0,this.width,this.height,0,0,1),t.scale(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,n.TRIANGLES,Tt.disabled,this.stencilClearMode,Pt.disabled,Ct.disabled,Dn(r),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_r.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var n=this.context,r=n.gl;this.nextStencilID+e.length>256&&this.clearStencil(),n.setColorMode(Pt.disabled),n.setDepthMode(Tt.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o<a.length;o+=1){var s=a[o],u=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;i.draw(n,r.TRIANGLES,Tt.disabled,new kt({func:r.ALWAYS,mask:0},u,255,r.KEEP,r.KEEP,r.REPLACE),Pt.disabled,Ct.disabled,Dn(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_r.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new kt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_r.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new kt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_r.prototype.stencilConfigForOverlap=function(t){var e,n=this.context.gl,r=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=r[r.length-1].overscaledZ,o=r[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+i]=new kt({func:n.GEQUAL,mask:255},s+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=o,[a,r]}return[(e={},e[i]=kt.disabled,e),r]},_r.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Pt([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Pt.unblended:Pt.alphaBlended},_r.prototype.depthModeForSublayer=function(t,e,n){if(!this.opaquePassEnabledForLayer())return Tt.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new Tt(n||this.context.gl.LEQUAL,e,[r,r])},_r.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_r.prototype.render=function(e,n){var r=this;this.style=e,this.options=n,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var i=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var u,l,c={},p={},h={};for(var f in o){var d=o[f];c[f]=d.getVisibleCoordinates(),p[f]=c[f].slice().reverse(),h[f]=d.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<i.length;m++)if(this.style._layers[i[m]].is3D()){this.opaquePassCutoff=m;break}this.renderPass="offscreen";for(var y=0,v=i;y<v.length;y+=1){var g=this.style._layers[v[y]];if(g.hasOffscreenPass()&&!g.isHidden(this.transform.zoom)){var _=p[g.source];("custom"===g.type||_.length)&&this.renderLayer(this,o[g.source],g,_)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var x=this.style._layers[i[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var E=this.style._layers[i[this.currentLayer]],S=o[E.source],T=("symbol"===E.type?h:p)[E.source];this._renderTileClippingMasks(E,c[E.source]),this.renderLayer(this,S,E,T)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach((function(t){t.source&&!t.isHidden(r.transform.zoom)&&(t.source!==(l&&l.id)&&(l=r.style.sourceCaches[t.source]),(!u||u.getSource().maxzoom<l.getSource().maxzoom)&&(u=l))})),u&&gr.debug(this,u,u.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;dr(t,t.transform.height-(e.top||0),3,lr),dr(t,e.bottom||0,3,cr),mr(t,e.left||0,3,pr),mr(t,t.transform.width-(e.right||0),3,hr);var n=t.transform.centerPoint;!function(t,e,n,r){yr(t,e-1,n-10,2,20,r),yr(t,e-10,n-1,20,2,r)}(t,n.x,t.transform.height-n.y,fr)}(this),this.context.setDefault()},_r.prototype.renderLayer=function(t,e,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||"custom"===n.type||r.length)&&(this.id=n.id,this.gpuTimingStart(n),gr[n.type](t,e,n,r,this.style.placement.variableOffsets),this.gpuTimingEnd())},_r.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,n=this.gpuTimers[t.id];n||(n=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),n.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,n.query)}},_r.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},_r.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},_r.prototype.queryGpuTimers=function(t){var e={};for(var n in t){var r=t[n],i=this.context.extTimerQuery,o=i.getQueryObjectEXT(r.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r.query),e[n]=o}return e},_r.prototype.translatePosMatrix=function(e,n,r,i,o){if(!r[0]&&!r[1])return e;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);r=[r[0]*u-r[1]*s,r[0]*s+r[1]*u]}var l=[o?r[0]:he(n,r[0],this.transform.zoom),o?r[1]:he(n,r[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,l),c},_r.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},_r.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},_r.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),n=this.imageManager.getPattern(t.to.toString());return!e||!n},_r.prototype.useProgram=function(t,e){this.cache=this.cache||{};var n=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new wn(this.context,t,_n[t],e,Yn[t],this._showOverdrawInspector)),this.cache[n]},_r.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_r.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_r.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},_r.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var xr=function(t,e){this.points=t,this.planes=e};xr.fromInvProjectionMatrix=function(e,n,r){var i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(n){return t.transformMat4([],n,e)})).map((function(e){return t.scale$1([],e,1/e[3]/n*i)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var n=t.sub([],o[e[0]],o[e[1]]),r=t.sub([],o[e[2]],o[e[1]]),i=t.normalize([],t.cross([],n,r)),a=-t.dot(i,o[e[1]]);return i.concat(a)}));return new xr(o,a)};var br=function(e,n){this.min=e,this.max=n,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};br.prototype.quadrant=function(e){for(var n=[e%2==0,e<2],r=t.clone$2(this.min),i=t.clone$2(this.max),o=0;o<n.length;o++)r[o]=n[o]?this.min[o]:this.center[o],i[o]=n[o]?this.center[o]:this.max[o];return i[2]=this.max[2],new br(r,i)},br.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},br.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},br.prototype.intersects=function(e){for(var n=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],r=!0,i=0;i<e.planes.length;i++){for(var o=e.planes[i],a=0,s=0;s<n.length;s++)a+=t.dot$1(o,n[s])>=0;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(var u=0;u<3;u++){for(var l=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<e.points.length;p++){var h=e.points[p][u]-this.min[u];l=Math.min(l,h),c=Math.max(c,h)}if(c<0||l>this.max[u]-this.min[u])return 0}return 1};var wr=function(t,e,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=n,this.right=r};wr.prototype.interpolate=function(e,n,r){return null!=n.top&&null!=e.top&&(this.top=t.number(e.top,n.top,r)),null!=n.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,n.bottom,r)),null!=n.left&&null!=e.left&&(this.left=t.number(e.left,n.left,r)),null!=n.right&&null!=e.right&&(this.right=t.number(e.right,n.right,r)),this},wr.prototype.getCenter=function(e,n){var r=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+n-this.bottom)/2,0,n);return new t.Point(r,i)},wr.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},wr.prototype.clone=function(){return new wr(this.top,this.bottom,this.left,this.right)},wr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Er=function(e,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new wr,this._posMatrixCache={},this._alignedPosMatrixCache={}},Sr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Er.prototype.clone=function(){var t=new Er(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Sr.minZoom.get=function(){return this._minZoom},Sr.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Sr.maxZoom.get=function(){return this._maxZoom},Sr.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Sr.minPitch.get=function(){return this._minPitch},Sr.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Sr.maxPitch.get=function(){return this._maxPitch},Sr.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Sr.renderWorldCopies.get=function(){return this._renderWorldCopies},Sr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Sr.worldSize.get=function(){return this.tileSize*this.scale},Sr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Sr.size.get=function(){return new t.Point(this.width,this.height)},Sr.bearing.get=function(){return-this.angle/Math.PI*180},Sr.bearing.set=function(e){var n=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Sr.pitch.get=function(){return this._pitch/Math.PI*180},Sr.pitch.set=function(e){var n=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Sr.fov.get=function(){return this._fov/Math.PI*180},Sr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Sr.zoom.get=function(){return this._zoom},Sr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Sr.center.get=function(){return this._center},Sr.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Sr.padding.get=function(){return this._edgeInsets.toJSON()},Sr.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Sr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Er.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Er.prototype.interpolatePadding=function(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()},Er.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Er.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),u=Math.floor(Math.max(r.x,i.x,o.x,a.x)),l=s-1;l<=u+1;l++)0!==l&&n.push(new t.UnwrappedTileID(l,e));return n},Er.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),r=n;if(void 0!==e.minzoom&&n<e.minzoom)return[];void 0!==e.maxzoom&&n>e.maxzoom&&(n=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=[o*i.x,o*i.y,0],s=xr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),u=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(u=n);var l=function(t){return{aabb:new br([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],p=[],h=n,f=e.reparseOverscaled?r:n;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(l(-d)),c.push(l(d));for(c.push(l(0));c.length>0;){var m=c.pop(),y=m.x,v=m.y,g=m.fullyVisible;if(!g){var _=m.aabb.intersects(s);if(0===_)continue;g=2===_}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===h||w>3+(1<<h-m.zoom)-2&&m.zoom>=u)p.push({tileID:new t.OverscaledTileID(m.zoom===h?f:m.zoom,m.wrap,m.zoom,y,v),distanceSq:t.sqrLen([a[0]-.5-y,a[1]-.5-v])});else for(var E=0;E<4;E++){var S=(y<<1)+E%2,T=(v<<1)+(E>>1);c.push({aabb:m.aabb.quadrant(E),zoom:m.zoom+1,x:S,y:T,wrap:m.wrap,fullyVisible:g})}}return p.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Er.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Sr.unmodified.get=function(){return this._unmodified},Er.prototype.zoomScale=function(t){return Math.pow(2,t)},Er.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Er.prototype.project=function(e){var n=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(n)*this.worldSize)},Er.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Sr.point.get=function(){return this.project(this.center)},Er.prototype.setLocationAtPoint=function(e,n){var r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Er.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Er.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Er.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Er.prototype.coordinateLocation=function(t){return t.toLngLat()},Er.prototype.pointCoordinate=function(e){var n=[e.x,e.y,0,1],r=[e.x,e.y,1,1];t.transformMat4(n,n,this.pixelMatrixInverse),t.transformMat4(r,r,this.pixelMatrixInverse);var i=n[3],o=r[3],a=n[1]/i,s=r[1]/o,u=n[2]/i,l=r[2]/o,c=u===l?0:(0-u)/(l-u);return new t.MercatorCoordinate(t.number(n[0]/i,r[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Er.prototype.coordinatePoint=function(e){var n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix),new t.Point(n[0]/n[3],n[1]/n[3])},Er.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Er.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Er.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Er.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var r=e.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,u=t.identity(new Float64Array(16));return t.translate(u,u,[s*a,o.y*a,0]),t.scale(u,u,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(u,n?this.alignedProjMatrix:this.projMatrix,u),i[r]=new Float32Array(u),i[r]},Er.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Er.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,r,i,o=-90,a=90,s=-180,u=180,l=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<l.y?l.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,n=(u=t.mercatorXfromLng(h[1])*this.worldSize)-s<l.x?l.x/(u-s):0}var f=this.point,d=Math.max(n||0,e||0);if(d)return this.center=this.unproject(new t.Point(n?(u+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,y=l.y/2;m-y<o&&(i=o+y),m+y>a&&(i=a-y)}if(this.lngRange){var v=f.x,g=l.x/2;v-g<s&&(r=s+g),v+g>u&&(r=u-g)}void 0===r&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==r?r:f.x,void 0!==i?i:f.y))),this._unmodified=c,this._constraining=!1}},Er.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var n=Math.PI/2+this._pitch,r=this._fov*(.5+e.y/this.height),i=Math.sin(r)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),l=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,l,u),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*p+d*h,y=s-Math.round(s)+f*h+d*p,v=new Float64Array(c);if(t.translate(v,v,[m>.5?m-1:m,y>.5?y-1:y,0]),this.alignedProjMatrix=v,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Er.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},Er.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Er.prototype.getCameraQueryGeometry=function(e){var n=this.getCameraPoint();if(1===e.length)return[e[0],n];for(var r=n.x,i=n.y,o=n.x,a=n.y,s=0,u=e;s<u.length;s+=1){var l=u[s];r=Math.min(r,l.x),i=Math.min(i,l.y),o=Math.max(o,l.x),a=Math.max(a,l.y)}return[new t.Point(r,i),new t.Point(o,i),new t.Point(o,a),new t.Point(r,a),new t.Point(r,i)]},Object.defineProperties(Er.prototype,Sr);var Tr=function(e){var n,r,i,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(n=this._updateHashUnthrottled.bind(this),r=!1,i=null,o=function(){i=null,r&&(n(),i=setTimeout(o,300),r=!1)},function(){return r=!0,i||o(),i})};Tr.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Tr.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Tr.prototype.getHashString=function(e){var n=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,i),a=Math.round(n.lng*o)/o,s=Math.round(n.lat*o)/o,u=this._map.getBearing(),l=this._map.getPitch(),c="";if(c+=e?"/"+a+"/"+s+"/"+r:r+"/"+s+"/"+a,(u||l)&&(c+="/"+Math.round(10*u)/10),l&&(c+="/"+Math.round(l)),this._hashName){var p=this._hashName,h=!1,f=t.window.location.hash.slice(1).split("&").map((function(t){var e=t.split("=")[0];return e===p?(h=!0,e+"="+c):t})).filter((function(t){return t}));return h||f.push(p+"="+c),"#"+f.join("&")}return"#"+c},Tr.prototype._getCurrentHash=function(){var e,n=this,r=t.window.location.hash.replace("#","");return this._hashName?(r.split("&").map((function(t){return t.split("=")})).forEach((function(t){t[0]===n._hashName&&(e=t)})),(e&&e[1]||"").split("/")):r.split("/")},Tr.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Tr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var kr={linearity:.3,easing:t.bezier(0,0,.3,1)},Pr=t.extend({deceleration:2500,maxSpeed:1400},kr),Cr=t.extend({deceleration:20,maxSpeed:1400},kr),Ir=t.extend({deceleration:1e3,maxSpeed:360},kr),zr=t.extend({deceleration:1e3,maxSpeed:90},kr),Ar=function(t){this._map=t,this.clear()};function Mr(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function Or(e,n,r){var i=r.maxSpeed,o=r.linearity,a=r.deceleration,s=t.clamp(e*o/(n/1e3),-i,i),u=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*u,amount:s*(u/2)}}Ar.prototype.clear=function(){this._inertiaBuffer=[]},Ar.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},Ar.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,n=t.browser.now();e.length>0&&n-e[0].time>160;)e.shift()},Ar.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},r=0,i=this._inertiaBuffer;r<i.length;r+=1){var o=i[r].settings;n.zoom+=o.zoomDelta||0,n.bearing+=o.bearingDelta||0,n.pitch+=o.pitchDelta||0,o.panDelta&&n.pan._add(o.panDelta),o.around&&(n.around=o.around),o.pinchAround&&(n.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(n.pan.mag()){var u=Or(n.pan.mag(),a,t.extend({},Pr,e||{}));s.offset=n.pan.mult(u.amount/n.pan.mag()),s.center=this._map.transform.center,Mr(s,u)}if(n.zoom){var l=Or(n.zoom,a,Cr);s.zoom=this._map.transform.zoom+l.amount,Mr(s,l)}if(n.bearing){var c=Or(n.bearing,a,Ir);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Mr(s,c)}if(n.pitch){var p=Or(n.pitch,a,zr);s.pitch=this._map.transform.pitch+p.amount,Mr(s,p)}if(s.zoom||s.bearing){var h=void 0===n.pinchAround?n.around:n.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Dr=function(e){function r(r,i,o,a){void 0===a&&(a={});var s=n.mousePos(i.getCanvasContainer(),o),u=i.unproject(s);e.call(this,r,t.extend({point:s,lngLat:u,originalEvent:o},a)),this._defaultPrevented=!1,this.target=i}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(t.Event),Lr=function(e){function r(r,i,o){var a="touchend"===r?o.changedTouches:o.touches,s=n.touchPos(i.getCanvasContainer(),a),u=s.map((function(t){return i.unproject(t)})),l=s.reduce((function(t,e,n,r){return t.add(e.div(r.length))}),new t.Point(0,0)),c=i.unproject(l);e.call(this,r,{points:s,point:l,lngLats:u,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(t.Event),Rr=function(t){function e(e,n,r){t.call(this,e,{originalEvent:r}),this._defaultPrevented=!1}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,n),e}(t.Event),Br=function(t,e){this._map=t,this._clickTolerance=e.clickTolerance};Br.prototype.reset=function(){delete this._mousedownPos},Br.prototype.wheel=function(t){return this._firePreventable(new Rr(t.type,this._map,t))},Br.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Dr(t.type,this._map,t))},Br.prototype.mouseup=function(t){this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.dblclick=function(t){return this._firePreventable(new Dr(t.type,this._map,t))},Br.prototype.mouseover=function(t){this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.mouseout=function(t){this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.touchstart=function(t){return this._firePreventable(new Lr(t.type,this._map,t))},Br.prototype.touchmove=function(t){this._map.fire(new Lr(t.type,this._map,t))},Br.prototype.touchend=function(t){this._map.fire(new Lr(t.type,this._map,t))},Br.prototype.touchcancel=function(t){this._map.fire(new Lr(t.type,this._map,t))},Br.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Br.prototype.isEnabled=function(){return!0},Br.prototype.isActive=function(){return!1},Br.prototype.enable=function(){},Br.prototype.disable=function(){};var Fr=function(t){this._map=t};Fr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Fr.prototype.mousemove=function(t){this._map.fire(new Dr(t.type,this._map,t))},Fr.prototype.mousedown=function(){this._delayContextMenu=!0},Fr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Fr.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Dr(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Fr.prototype.isEnabled=function(){return!0},Fr.prototype.isActive=function(){return!1},Fr.prototype.enable=function(){},Fr.prototype.disable=function(){};var jr=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Nr(t,e){for(var n={},r=0;r<t.length;r++)n[t[r].identifier]=e[r];return n}jr.prototype.isEnabled=function(){return!!this._enabled},jr.prototype.isActive=function(){return!!this._active},jr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},jr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},jr.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(n.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},jr.prototype.mousemoveWindow=function(t,e){if(this._active){var r=e;if(!(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=r,this._box||(this._box=n.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var o=Math.min(i.x,r.x),a=Math.max(i.x,r.x),s=Math.min(i.y,r.y),u=Math.max(i.y,r.y);n.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=u-s+"px"}}},jr.prototype.mouseupWindow=function(e,r){var i=this;if(this._active&&0===e.button){var o=this._startPos,a=r;if(this.reset(),n.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(o,a,i._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},jr.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},jr.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos},jr.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,{originalEvent:n}))};var Ur=function(t){this.reset(),this.numTouches=t.numTouches};Ur.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Ur.prototype.touchstart=function(e,n,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){for(var n=new t.Point(0,0),r=0,i=e;r<i.length;r+=1)n._add(i[r]);return n.div(e.length)}(n),this.touches=Nr(r,n)))},Ur.prototype.touchmove=function(t,e,n){if(!this.aborted&&this.centroid){var r=Nr(n,e);for(var i in this.touches){var o=r[i];(!o||o.dist(this.touches[i])>30)&&(this.aborted=!0)}}},Ur.prototype.touchend=function(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};var Vr=function(t){this.singleTap=new Ur(t),this.numTaps=t.numTaps,this.reset()};Vr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Vr.prototype.touchstart=function(t,e,n){this.singleTap.touchstart(t,e,n)},Vr.prototype.touchmove=function(t,e,n){this.singleTap.touchmove(t,e,n)},Vr.prototype.touchend=function(t,e,n){var r=this.singleTap.touchend(t,e,n);if(r){var i=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(i&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}};var qr=function(){this._zoomIn=new Vr({numTouches:1,numTaps:2}),this._zoomOut=new Vr({numTouches:2,numTaps:1}),this.reset()};qr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},qr.prototype.touchstart=function(t,e,n){this._zoomIn.touchstart(t,e,n),this._zoomOut.touchstart(t,e,n)},qr.prototype.touchmove=function(t,e,n){this._zoomIn.touchmove(t,e,n),this._zoomOut.touchmove(t,e,n)},qr.prototype.touchend=function(t,e,n){var r=this,i=this._zoomIn.touchend(t,e,n),o=this._zoomOut.touchend(t,e,n);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},qr.prototype.touchcancel=function(){this.reset()},qr.prototype.enable=function(){this._enabled=!0},qr.prototype.disable=function(){this._enabled=!1,this.reset()},qr.prototype.isEnabled=function(){return this._enabled},qr.prototype.isActive=function(){return this._active};var Zr={0:1,2:2},Wr=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Wr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Wr.prototype._correctButton=function(t,e){return!1},Wr.prototype._move=function(t,e){return{}},Wr.prototype.mousedown=function(t,e){if(!this._lastPoint){var r=n.mouseButton(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}},Wr.prototype.mousemoveWindow=function(t,e){var n=this._lastPoint;if(n)if(t.preventDefault(),function(t,e){var n=Zr[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(n,e)},Wr.prototype.mouseupWindow=function(t){this._lastPoint&&n.mouseButton(t)===this._eventButton&&(this._moved&&n.suppressClick(),this.reset())},Wr.prototype.enable=function(){this._enabled=!0},Wr.prototype.disable=function(){this._enabled=!1,this.reset()},Wr.prototype.isEnabled=function(){return this._enabled},Wr.prototype.isActive=function(){return this._active};var Gr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.mousedown=function(e,n){t.prototype.mousedown.call(this,e,n),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},e.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},e}(Wr),Xr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var n=.8*(e.x-t.x);if(n)return this._active=!0,{bearingDelta:n}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(Wr),Hr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var n=-.5*(e.y-t.y);if(n)return this._active=!0,{pitchDelta:n}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(Wr),Kr=function(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()};Kr.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},Kr.prototype.touchstart=function(t,e,n){return this._calculateTransform(t,e,n)},Kr.prototype.touchmove=function(t,e,n){if(this._active&&!(n.length<this._minTouches))return t.preventDefault(),this._calculateTransform(t,e,n)},Kr.prototype.touchend=function(t,e,n){this._calculateTransform(t,e,n),this._active&&n.length<this._minTouches&&this.reset()},Kr.prototype.touchcancel=function(){this.reset()},Kr.prototype._calculateTransform=function(e,n,r){r.length>0&&(this._active=!0);var i=Nr(r,n),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var u in i){var l=i[u],c=this._touches[u];c&&(o._add(l),a._add(l.sub(c)),s++,i[u]=l)}if(this._touches=i,!(s<this._minTouches)&&a.mag()){var p=a.div(s);if(this._sum._add(p),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:p}}},Kr.prototype.enable=function(){this._enabled=!0},Kr.prototype.disable=function(){this._enabled=!1,this.reset()},Kr.prototype.isEnabled=function(){return this._enabled},Kr.prototype.isActive=function(){return this._active};var Yr=function(){this.reset()};function Jr(t,e,n){for(var r=0;r<t.length;r++)if(t[r].identifier===n)return e[r]}function $r(t,e){return Math.log(t/e)/Math.LN2}Yr.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Yr.prototype._start=function(t){},Yr.prototype._move=function(t,e,n){return{}},Yr.prototype.touchstart=function(t,e,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([e[0],e[1]]))},Yr.prototype.touchmove=function(t,e,n){if(this._firstTwoTouches){t.preventDefault();var r=this._firstTwoTouches,i=r[1],o=Jr(n,e,r[0]),a=Jr(n,e,i);if(o&&a){var s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,t)}}},Yr.prototype.touchend=function(t,e,r){if(this._firstTwoTouches){var i=this._firstTwoTouches,o=i[1],a=Jr(r,e,i[0]),s=Jr(r,e,o);a&&s||(this._active&&n.suppressClick(),this.reset())}},Yr.prototype.touchcancel=function(){this.reset()},Yr.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},Yr.prototype.disable=function(){this._enabled=!1,this.reset()},Yr.prototype.isEnabled=function(){return this._enabled},Yr.prototype.isActive=function(){return this._active};var Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},e.prototype._move=function(t,e){var n=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs($r(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:$r(this._distance,n),pinchAround:e}},e}(Yr);function ti(t,e){return 180*t.angleWith(e)/Math.PI}var ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},e.prototype._move=function(t,e){var n=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ti(this._vector,n),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,n=ti(t,this._startVector);return Math.abs(n)<e},e}(Yr);function ni(t){return Math.abs(t.y)>Math.abs(t.x)}var ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,n){var r=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,n){if(void 0!==this._valid)return this._valid;var r=t.mag()>=2,i=e.mag()>=2;if(r||i){if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return ni(t)&&ni(e)&&o}},e}(Yr),ii={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ii;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function ai(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=0,r=0,i=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var u=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ai,zoom:n?Math.round(u)+n*(t.shiftKey?2:1):u,bearing:s.getBearing()+r*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var si=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onTimeout"],this)};si.prototype.setZoomRate=function(t){this._defaultZoomRate=t},si.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},si.prototype.isEnabled=function(){return!!this._enabled},si.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},si.prototype.isZooming=function(){return!!this._zooming},si.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},si.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},si.prototype.wheel=function(e){if(this.isEnabled()){var n=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=t.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}},si.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},si.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=n.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},si.prototype.renderFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,u=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&u&&l){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(p);a=t.number(u,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},si.prototype._smoothOutEasing=function(e){var n=t.ease;if(this._prevEase){var r=this._prevEase,i=(t.browser.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:n},n},si.prototype.reset=function(){this._active=!1};var ui=function(t,e){this._clickZoom=t,this._tapZoom=e};ui.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ui.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ui.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ui.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var li=function(){this.reset()};li.prototype.reset=function(){this._active=!1},li.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(t.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:t})}}},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ci=function(){this._tap=new Vr({numTouches:1,numTaps:1}),this.reset()};ci.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ci.prototype.touchstart=function(t,e,n){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(t,e,n))},ci.prototype.touchmove=function(t,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var r=e[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,n)},ci.prototype.touchend=function(t,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(t,e,n)&&(this._tapTime=t.timeStamp)},ci.prototype.touchcancel=function(){this.reset()},ci.prototype.enable=function(){this._enabled=!0},ci.prototype.disable=function(){this._enabled=!1,this.reset()},ci.prototype.isEnabled=function(){return this._enabled},ci.prototype.isActive=function(){return this._active};var pi=function(t,e,n){this._el=t,this._mousePan=e,this._touchPan=n};pi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},pi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},pi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},pi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var hi=function(t,e,n){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n};hi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},hi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},hi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},hi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var fi=function(t,e,n,r){this._el=t,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0};fi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},fi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},fi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},fi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},fi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},fi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var di=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function yi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var vi=function(e,r){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ar(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],u=s[0];n.addEventListener(u,s[1],u===t.window.document?this.handleWindowEvent:this.handleEvent,s[2])}};vi.prototype.destroy=function(){for(var e=0,r=this._listeners;e<r.length;e+=1){var i=r[e],o=i[0];n.removeEventListener(o,i[1],o===t.window.document?this.handleWindowEvent:this.handleEvent,i[2])}},vi.prototype._addDefaultHandlers=function(t){var e=this._map,n=e.getCanvasContainer();this._add("mapEvent",new Br(e,t));var r=e.boxZoom=new jr(e,t);this._add("boxZoom",r);var i=new qr,o=new li;e.doubleClickZoom=new ui(o,i),this._add("tapZoom",i),this._add("clickZoom",o);var a=new ci;this._add("tapDragZoom",a);var s=e.touchPitch=new ri;this._add("touchPitch",s);var u=new Xr(t),l=new Hr(t);e.dragRotate=new hi(t,u,l),this._add("mouseRotate",u,["mousePitch"]),this._add("mousePitch",l,["mouseRotate"]);var c=new Gr(t),p=new Kr(t);e.dragPan=new pi(n,c,p),this._add("mousePan",c),this._add("touchPan",p,["touchZoom","touchRotate"]);var h=new ei,f=new Qr;e.touchZoomRotate=new fi(n,f,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]);var d=e.scrollZoom=new si(e,this);this._add("scrollZoom",d,["mousePan"]);var m=e.keyboard=new oi;this._add("keyboard",m),this._add("blockableMapEvent",new Fr(e));for(var y=0,v=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];y<v.length;y+=1){var g=v[y];t.interactive&&t[g]&&e[g].enable(t[g])}},vi.prototype._add=function(t,e,n){this._handlers.push({handlerName:t,handler:e,allowed:n}),this._handlersById[t]=e},vi.prototype.stop=function(t){if(!this._updatingCamera){for(var e=0,n=this._handlers;e<n.length;e+=1)n[e].handler.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}},vi.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},vi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},vi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},vi.prototype.isMoving=function(){return Boolean(di(this._eventsInProgress))||this.isZooming()},vi.prototype._blockedByActive=function(t,e,n){for(var r in t)if(r!==n&&(!e||e.indexOf(r)<0))return!0;return!1},vi.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},vi.prototype._getMapTouches=function(t){for(var e=[],n=0,r=t;n<r.length;n+=1){var i=r[n];this._el.contains(i.target)&&e.push(i)}return e},vi.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var r="renderFrame"===t.type?void 0:t,i={needsRenderFrame:!1},o={},a={},s=t.touches?this._getMapTouches(t.touches):void 0,u=s?n.touchPos(this._el,s):n.mousePos(this._el,t),l=0,c=this._handlers;l<c.length;l+=1){var p=c[l],h=p.handlerName,f=p.handler,d=p.allowed;if(f.isEnabled()){var m=void 0;this._blockedByActive(a,d,h)?f.reset():f[e||t.type]&&(m=f[e||t.type](t,u,s),this.mergeHandlerResult(i,o,m,h,r),m&&m.needsRenderFrame&&this._triggerRenderFrame()),(m||f.isActive())&&(a[h]=f)}}var y={};for(var v in this._previousActiveHandlers)a[v]||(y[v]=r);this._previousActiveHandlers=a,(Object.keys(y).length||yi(i))&&(this._changes.push([i,o,y]),this._triggerRenderFrame()),(Object.keys(a).length||yi(i))&&this._map._stop(!0),this._updatingCamera=!1;var g=i.cameraAnimation;g&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],g(this._map))}else this.stop(!0)},vi.prototype.mergeHandlerResult=function(e,n,r,i,o){if(r){t.extend(e,r);var a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}},vi.prototype._applyChanges=function(){for(var e={},n={},r={},i=0,o=this._changes;i<o.length;i+=1){var a=o[i],s=a[0],u=a[1],l=a[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(n,u),t.extend(r,l)}this._updateMapTransform(e,n,r),this._changes=[]},vi.prototype._updateMapTransform=function(t,e,n){var r=this._map,i=r.transform;if(!yi(t))return this._fireEvents(e,n,!0);var o=t.panDelta,a=t.zoomDelta,s=t.bearingDelta,u=t.pitchDelta,l=t.around,c=t.pinchAround;void 0!==c&&(l=c),r._stop(!0),l=l||r.transform.centerPoint;var p=i.pointLocation(o?l.sub(o):l);s&&(i.bearing+=s),u&&(i.pitch+=u),a&&(i.zoom+=a),i.setLocationAtPoint(p,l),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,n,!0)},vi.prototype._fireEvents=function(e,n,r){var i=this,o=di(this._eventsInProgress),a=di(e),s={};for(var u in e)this._eventsInProgress[u]||(s[u+"start"]=e[u].originalEvent),this._eventsInProgress[u]=e[u];for(var l in!o&&a&&this._fireEvent("movestart",a.originalEvent),s)this._fireEvent(l,s[l]);for(var c in a&&this._fireEvent("move",a.originalEvent),e)this._fireEvent(c,e[c].originalEvent);var p,h={};for(var f in this._eventsInProgress){var d=this._eventsInProgress[f],m=d.handlerName,y=d.originalEvent;this._handlersById[m].isActive()||(delete this._eventsInProgress[f],h[f+"end"]=p=n[m]||y)}for(var v in h)this._fireEvent(v,h[v]);var g=di(this._eventsInProgress);if(r&&(o||a)&&!g){this._updatingCamera=!0;var _=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),x=function(t){return 0!==t&&-i._bearingSnap<t&&t<i._bearingSnap};_?(x(_.bearing||this._map.getBearing())&&(_.bearing=0),this._map.easeTo(_,{originalEvent:p})):(this._map.fire(new t.Event("moveend",{originalEvent:p})),x(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},vi.prototype._fireEvent=function(e,n){this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},vi.prototype._requestFrame=function(){var t=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(e){delete t._frameId,t.handleEvent(new mi("renderFrame",{timeStamp:e})),t._applyChanges()}))},vi.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var gi=function(e){function n(n,r){e.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=r.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},n.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},n.prototype.panBy=function(e,n,r){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),r)},n.prototype.panTo=function(e,n,r){return this.easeTo(t.extend({center:e},n),r)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},n.prototype.zoomTo=function(e,n,r){return this.easeTo(t.extend({zoom:e},n),r)},n.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},n.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},n.prototype.getPadding=function(){return this.transform.padding},n.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},n.prototype.rotateTo=function(e,n,r){return this.easeTo(t.extend({bearing:e},n),r)},n.prototype.resetNorth=function(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this},n.prototype.resetNorthPitch=function(e,n){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),n),this},n.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},n.prototype.getPitch=function(){return this.transform.pitch},n.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},n.prototype.cameraForBounds=function(e,n){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,n)},n.prototype._cameraForBoxAndBearing=function(e,n,r,i){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(i=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var a=i.padding;i.padding={top:a,bottom:a,right:a,left:a}}i.padding=t.extend(o,i.padding);var s=this.transform,u=s.padding,l=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(n)),p=l.rotate(-r*Math.PI/180),h=c.rotate(-r*Math.PI/180),f=new t.Point(Math.max(p.x,h.x),Math.max(p.y,h.y)),d=new t.Point(Math.min(p.x,h.x),Math.min(p.y,h.y)),m=f.sub(d),y=(s.width-(u.left+u.right+i.padding.left+i.padding.right))/m.x,v=(s.height-(u.top+u.bottom+i.padding.top+i.padding.bottom))/m.y;if(!(v<0||y<0)){var g=Math.min(s.scaleZoom(s.scale*Math.min(y,v)),i.maxZoom),_=t.Point.convert(i.offset),x=new t.Point(_.x+(i.padding.left-i.padding.right)/2,_.y+(i.padding.top-i.padding.bottom)/2).mult(s.scale/s.zoomScale(g));return{center:s.unproject(l.add(c).div(2).sub(x)),zoom:g,bearing:r}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},n.prototype.fitBounds=function(t,e,n){return this._fitInternal(this.cameraForBounds(t,e),e,n)},n.prototype.fitScreenCoordinates=function(e,n,r,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(n)),r,i),i,o)},n.prototype._fitInternal=function(e,n,r){return e?(delete(n=t.extend(e,n)).padding,n.linear?this.easeTo(n,r):this.flyTo(n,r)):this},n.prototype.jumpTo=function(e,n){this.stop();var r=this.transform,i=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(i=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=t.LngLat.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),null==e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),i&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),o&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),a&&this.fire(new t.Event("pitchstart",n)).fire(new t.Event("pitch",n)).fire(new t.Event("pitchend",n)),this.fire(new t.Event("moveend",n))},n.prototype.easeTo=function(e,n){var r=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u=this.getPadding(),l="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,h="padding"in e?e.padding:i.padding,f=t.Point.convert(e.offset),d=i.centerPoint.add(f),m=i.pointLocation(d),y=t.LngLat.convert(e.center||m);this._normalizeCenter(y);var v,g,_=i.project(m),x=i.project(y).sub(_),b=i.zoomScale(l-o);e.around&&(v=t.LngLat.convert(e.around),g=i.locationPoint(v));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||l!==o,this._rotating=this._rotating||a!==c,this._pitching=this._pitching||p!==s,this._padding=!i.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(n,e.noMoveStart,w),this._ease((function(e){if(r._zooming&&(i.zoom=t.number(o,l,e)),r._rotating&&(i.bearing=t.number(a,c,e)),r._pitching&&(i.pitch=t.number(s,p,e)),r._padding&&(i.interpolatePadding(u,h,e),d=i.centerPoint.add(f)),v)i.setLocationAtPoint(v,g);else{var m=i.zoomScale(i.zoom-o),y=l>o?Math.min(2,b):Math.max(.5,b),w=Math.pow(y,1-e),E=i.unproject(_.add(x.mult(e*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?E.wrap():E,d)}r._fireMoveEvents(n)}),(function(t){r._afterEase(n,t)}),e),this},n.prototype._prepareEase=function(e,n,r){void 0===r&&(r={}),this._moving=!0,n||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},n.prototype._afterEase=function(e,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},n.prototype.flyTo=function(e,n){var r=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),u=this.getPitch(),l=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:u,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),y=o.centerPoint.add(m),v=o.pointLocation(y),g=t.LngLat.convert(e.center||v);this._normalizeCenter(g);var _=o.project(v),x=o.project(g).sub(_),b=e.curve,w=Math.max(o.width,o.height),E=w/d,S=x.mag();if("minZoom"in e){var T=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),k=w/o.zoomScale(T-a);b=Math.sqrt(k/S*2)}var P=b*b;function C(t){var e=(E*E-w*w+(t?-1:1)*P*P*S*S)/(2*(t?E:w)*P*S);return Math.log(Math.sqrt(e*e+1)-e)}function I(t){return(Math.exp(t)-Math.exp(-t))/2}function z(t){return(Math.exp(t)+Math.exp(-t))/2}var A=C(0),M=function(t){return z(A)/z(A+b*t)},O=function(t){return w*((z(A)*(I(e=A+b*t)/z(e))-I(A))/P)/S;var e},D=(C(1)-A)/b;if(Math.abs(S)<1e-6||!isFinite(D)){if(Math.abs(w-E)<1e-6)return this.easeTo(e,n);var L=E<w?-1:1;D=Math.abs(Math.log(E/w))/b,O=function(){return 0},M=function(t){return Math.exp(L*b*t)}}return e.duration="duration"in e?+e.duration:1e3*D/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==u,this._padding=!o.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((function(e){var i=e*D,d=1/M(i);o.zoom=1===e?c:a+o.scaleZoom(d),r._rotating&&(o.bearing=t.number(s,p,e)),r._pitching&&(o.pitch=t.number(u,h,e)),r._padding&&(o.interpolatePadding(l,f,e),y=o.centerPoint.add(m));var v=1===e?g:o.unproject(_.add(x.mult(O(i))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?v.wrap():v,y),r._fireMoveEvents(n)}),(function(){return r._afterEase(n)}),e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!t){var r=this.handlers;r&&r.stop(!1)}return this},n.prototype._ease=function(e,n,r){!1===r.animate||0===r.duration?(e(1),n()):(this._easeStart=t.browser.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=t.wrap(e,-180,180);var r=Math.abs(e-n);return Math.abs(e-360-n)<r&&(e-=360),Math.abs(e+360-n)<r&&(e+=360),e},n.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}},n}(t.Evented),_i=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};_i.prototype.getDefaultPosition=function(){return"bottom-right"},_i.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},_i.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},_i.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var r=n.reduce((function(t,e,r){return e.value&&(t+=e.key+"="+e.value+(r<n.length-1?"&":"")),t}),"?");e.href=t.config.FEEDBACK_URL+"/"+r+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow"}},_i.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},_i.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return"string"!=typeof t?"":t}))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var n=this._map.style.sourceCaches;for(var r in n){var i=n[r];if(i.used){var o=i.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort((function(t,e){return t.length-e.length}));var a=(t=t.filter((function(e,n){for(var r=n+1;r<t.length;r++)if(t[r].indexOf(e)>=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},_i.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var xi=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};xi.prototype.onAdd=function(t){this._map=t,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},xi.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},xi.prototype.getDefaultPosition=function(){return"bottom-left"},xi.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},xi.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},xi.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var bi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};bi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},bi.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,r=e?this._queue.concat(e):this._queue;n<r.length;n+=1){var i=r[n];if(i.id===t)return void(i.cancelled=!0)}},bi.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var n=0,r=e;n<r.length;n+=1){var i=r[n];if(!i.cancelled&&(i.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},bi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var wi={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Ei=t.window.HTMLImageElement,Si=t.window.HTMLElement,Ti=t.window.ImageBitmap,ki={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Pi=function(r){function i(e){var n=this;if(null!=(e=t.extend({},ki,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new Er(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(r.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new bi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},wi,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Si))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new vi(this,e),this._hash=e.hash&&new Tr("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new _i({customAttribution:e.customAttribution})),this.addControl(new xi,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new t.Event(e.dataType+"dataloading",e))}))}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,n){if(void 0===n&&e.getDefaultPosition&&(n=e.getDefaultPosition()),void 0===n&&(n="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this},i.prototype.resize=function(e){var n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},i.prototype.getMinZoom=function(){return this.transform.minZoom},i.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},i.prototype.getMinPitch=function(){return this.transform.minPitch},i.prototype.setMaxPitch=function(t){if((t=null==t?60:t)>60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,n){var r,i=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){var a=i.getLayer(e)?i.queryRenderedFeatures(r.point,{layers:[e]}):[];a.length?o||(o=!0,n.call(i,new Dr(t,i,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(i.getLayer(e)?i.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,n.call(i,new Dr(t,i,r.originalEvent)))},mouseout:function(e){a&&(a=!1,n.call(i,new Dr(t,i,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(r={},r[t]=function(t){var r=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(i,t),delete t.features)},r)}},i.prototype.on=function(t,e,n){if(void 0===n)return r.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(t,e,n){if(void 0===n)return r.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(t,e,n){var i=this;return void 0===n?r.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(r){for(var o=r[t],a=0;a<o.length;a++){var s=o[a];if(s.layer===e&&s.listener===n){for(var u in s.delegates)i.off(u,s.delegates[u]);return o.splice(a,1),i}}}(this._delegatedListeners),this)},i.prototype.queryRenderedFeatures=function(e,n){if(!this.style)return[];var r;if(void 0!==n||void 0===e||e instanceof t.Point||Array.isArray(e)||(n=e,e=void 0),n=n||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])r=[t.Point.convert(e)];else{var i=t.Point.convert(e[0]),o=t.Point.convert(e[1]);r=[i,new t.Point(o.x,i.y),o,new t.Point(i.x,o.y),i]}return this.style.queryRenderedFeatures(r,n,this.transform)},i.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},i.prototype.setStyle=function(e,n){return!1!==(n=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(e,n))},i.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},i.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new qe(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},i.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new qe(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},i.prototype._diffStyle=function(e,n){var r=this;if("string"==typeof e){var i=this._requestManager.normalizeStyleURL(e),o=this._requestManager.transformRequest(i,t.ResourceType.Style);t.getJSON(o,(function(e,i){e?r.fire(new t.ErrorEvent(e)):i&&r._updateDiff(i,n)}))}else"object"==typeof e&&this._updateDiff(e,n)},i.prototype._updateDiff=function(e,n){try{this.style.setState(e)&&this._update(!0)}catch(r){t.warnOnce("Unable to perform style diff: "+(r.message||r.error||r)+".  Rebuilding the style from scratch."),this._updateStyle(e,n)}},i.prototype.getStyle=function(){if(this.style)return this.style.serialize()},i.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},i.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},i.prototype.isSourceLoaded=function(e){var n=this.style&&this.style.sourceCaches[e];if(void 0!==n)return n.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},i.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var n=t[e]._tiles;for(var r in n){var i=n[r];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0},i.prototype.addSourceType=function(t,e,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,n)},i.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},i.prototype.getSource=function(t){return this.style.getSource(t)},i.prototype.addImage=function(e,n,r){void 0===r&&(r={});var i=r.pixelRatio;void 0===i&&(i=1);var o=r.sdf;void 0===o&&(o=!1);var a=r.stretchX,s=r.stretchY,u=r.content;if(this._lazyInitEmptyStyle(),n instanceof Ei||Ti&&n instanceof Ti){var l=t.browser.getImageData(n);this.style.addImage(e,{data:new t.RGBAImage({width:l.width,height:l.height},l.data),pixelRatio:i,stretchX:a,stretchY:s,content:u,sdf:o,version:0})}else{if(void 0===n.width||void 0===n.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=n;this.style.addImage(e,{data:new t.RGBAImage({width:n.width,height:n.height},new Uint8Array(n.data)),pixelRatio:i,stretchX:a,stretchY:s,content:u,sdf:o,version:0,userImage:c}),c.onAdd&&c.onAdd(this,e)}},i.prototype.updateImage=function(e,n){var r=this.style.getImage(e);if(!r)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var i=n instanceof Ei||Ti&&n instanceof Ti?t.browser.getImageData(n):n,o=i.width,a=i.height,s=i.data;return void 0===o||void 0===a?this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):o!==r.data.width||a!==r.data.height?this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(r.data.replace(s,!(n instanceof Ei||Ti&&n instanceof Ti)),void this.style.updateImage(e,r))},i.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},i.prototype.removeImage=function(t){this.style.removeImage(t)},i.prototype.loadImage=function(e,n){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),n)},i.prototype.listImages=function(){return this.style.listImages()},i.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},i.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},i.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},i.prototype.getLayer=function(t){return this.style.getLayer(t)},i.prototype.setLayerZoomRange=function(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0)},i.prototype.setFilter=function(t,e,n){return void 0===n&&(n={}),this.style.setFilter(t,e,n),this._update(!0)},i.prototype.getFilter=function(t){return this.style.getFilter(t)},i.prototype.setPaintProperty=function(t,e,n,r){return void 0===r&&(r={}),this.style.setPaintProperty(t,e,n,r),this._update(!0)},i.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},i.prototype.setLayoutProperty=function(t,e,n,r){return void 0===r&&(r={}),this.style.setLayoutProperty(t,e,n,r),this._update(!0)},i.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},i.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},i.prototype.getLight=function(){return this.style.getLight()},i.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},i.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},i.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},i.prototype.getContainer=function(){return this._container},i.prototype.getCanvasContainer=function(){return this._canvasContainer},i.prototype.getCanvas=function(){return this._canvas},i.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},i.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described 
2in https://www.mapbox.com/mapbox-gl-js/api/.")},i.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=n.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=n.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=n.create("canvas","mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var i=this._controlContainer=n.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){o[t]=n.create("div","mapboxgl-ctrl-"+t,i)}))},i.prototype._resizeCanvas=function(e,n){var r=t.browser.devicePixelRatio||1;this._canvas.width=r*e,this._canvas.height=r*n,this._canvas.style.width=e+"px",this._canvas.style.height=n+"px"},i.prototype._setupPainter=function(){var n=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);r?(this.painter=new _r(r,this.transform),t.webpSupported.testSupport(r)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},i.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},i.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},i.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},i.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},i.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},i.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},i.prototype._render=function(e){var n,r=this,i=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(n=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,n),i=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,u=t.browser.now();this.style.zoomHistory.update(s,u);var l=new t.EvaluationParameters(s,{now:u,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=l.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(l)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var p=t.browser.now()-i;o.endQueryEXT(o.TIME_ELAPSED_EXT,n),setTimeout((function(){var e=o.getQueryObjectEXT(n,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(n),r.fire(new t.Event("gpu-timing-frame",{cpuTime:p,gpuTime:e}))}),50)}if(this.listens("gpu-timing-layer")){var h=this.painter.collectGpuTimers();setTimeout((function(){var e=r.painter.queryGpuTimers(h);r.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))}),50)}var f=this._sourcesDirty||this._styleDirty||this._placementDirty;return f||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),!this._loaded||this._fullyLoaded||f||(this._fullyLoaded=!0),this}},i.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,n=this._controls;e<n.length;e+=1)n[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("orientationchange",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext(),Ci(this._canvasContainer),Ci(this._controlContainer),Ci(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},i.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render(t)})))},i.prototype._onWindowOnline=function(){this._update()},i.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices}
vendor: 17,897 bytes, line 2
2,o.vertices.set=function(t){this._vertices=t,this._update()},i.prototype._setCacheLimits=function(e,n){t.setCacheLimits(e,n)},o.version.get=function(){return t.version},Object.defineProperties(i.prototype,o),i}(gi);function Ci(t){t.parentNode&&t.parentNode.removeChild(t)}var Ii={showCompass:!0,showZoom:!0,visualizePitch:!1},zi=function(e){var r=this;this.options=t.extend({},Ii,e),this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(t){return r._map.zoomIn({},{originalEvent:t})})),n.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(t){return r._map.zoomOut({},{originalEvent:t})})),n.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(t){r.options.visualizePitch?r._map.resetNorthPitch({},{originalEvent:t}):r._map.resetNorth({},{originalEvent:t})})),this._compassIcon=n.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};zi.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},zi.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=t},zi.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ai(this._map,this._compass,this.options.visualizePitch)),this._container},zi.prototype.onRemove=function(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},zi.prototype._createButton=function(t,e){var r=n.create("button",t,this._container);return r.type="button",r.addEventListener("click",e),r},zi.prototype._setButtonTitle=function(t,e){var n=this._map._getUIString("NavigationControl."+e);t.title=n,t.setAttribute("aria-label",n)};var Ai=function(e,r,i){void 0===i&&(i=!1),this._clickTolerance=10,this.element=r,this.mouseRotate=new Xr({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,i&&(this.mousePitch=new Hr({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),n.addEventListener(r,"mousedown",this.mousedown),n.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(r,"touchmove",this.touchmove),n.addEventListener(r,"touchend",this.touchend),n.addEventListener(r,"touchcancel",this.reset)};function Mi(e,n,r){if(e=new t.LngLat(e.lng,e.lat),n){var i=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=r.locationPoint(e).distSqr(n);r.locationPoint(i).distSqr(n)<a?e=i:r.locationPoint(o).distSqr(n)<a&&(e=o)}for(;Math.abs(e.lng-r.center.lng)>180;){var s=r.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}Ai.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),n.disableDrag()},Ai.prototype.move=function(t,e){var n=this.map,r=this.mouseRotate.mousemoveWindow(t,e);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}},Ai.prototype.off=function(){var t=this.element;n.removeEventListener(t,"mousedown",this.mousedown),n.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(t,"touchmove",this.touchmove),n.removeEventListener(t,"touchend",this.touchend),n.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Ai.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(t.window,"mousemove",this.mousemove),n.removeEventListener(t.window,"mouseup",this.mouseup)},Ai.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),n.mousePos(this.element,e)),n.addEventListener(t.window,"mousemove",this.mousemove),n.addEventListener(t.window,"mouseup",this.mouseup)},Ai.prototype.mousemove=function(t){this.move(t,n.mousePos(this.element,t))},Ai.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ai.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ai.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ai.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ai.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Oi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Di(t,e,n){var r=t.classList;for(var i in Oi)r.remove("mapboxgl-"+n+"-anchor-"+i);r.add("mapboxgl-"+n+"-anchor-"+e)}var Li,Ri=function(e){function r(r,i){var o=this;if(e.call(this),(r instanceof t.window.HTMLElement||i)&&(r=t.extend({element:r},i)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._scale=r&&r.scale||1,this._draggable=r&&r.draggable||!1,this._state="inactive",this._rotation=r&&r.rotation||0,this._rotationAlignment=r&&r.rotationAlignment||"auto",this._pitchAlignment=r&&r.pitchAlignment&&"auto"!==r.pitchAlignment?r.pitchAlignment:this._rotationAlignment,r&&r.element)this._element=r.element,this._offset=t.Point.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div"),this._element.setAttribute("aria-label","Map marker");var a=n.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var s=n.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"stroke","none"),s.setAttributeNS(null,"stroke-width","1"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"fill-rule","evenodd");var u=n.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"fill-rule","nonzero");var l=n.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,p=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c<p.length;c+=1){var h=p[c],f=n.createNS("http://www.w3.org/2000/svg","ellipse");f.setAttributeNS(null,"opacity","0.04"),f.setAttributeNS(null,"cx","10.5"),f.setAttributeNS(null,"cy","5.80029008"),f.setAttributeNS(null,"rx",h.rx),f.setAttributeNS(null,"ry",h.ry),l.appendChild(f)}var d=n.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill",this._color);var m=n.createNS("http://www.w3.org/2000/svg","path");m.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),d.appendChild(m);var y=n.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"opacity","0.25"),y.setAttributeNS(null,"fill","#000000");var v=n.createNS("http://www.w3.org/2000/svg","path");v.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),y.appendChild(v);var g=n.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(6.0, 7.0)"),g.setAttributeNS(null,"fill","#FFFFFF");var _=n.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(8.0, 8.0)");var x=n.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#000000"),x.setAttributeNS(null,"opacity","0.25"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962");var b=n.createNS("http://www.w3.org/2000/svg","circle");b.setAttributeNS(null,"fill","#FFFFFF"),b.setAttributeNS(null,"cx","5.5"),b.setAttributeNS(null,"cy","5.5"),b.setAttributeNS(null,"r","5.4999962"),_.appendChild(x),_.appendChild(b),u.appendChild(l),u.appendChild(d),u.appendChild(y),u.appendChild(g),u.appendChild(_),a.appendChild(u),a.setAttributeNS(null,"height",41*this._scale+"px"),a.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(a),this._offset=t.Point.convert(r&&r.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(t){t.preventDefault()})),this._element.addEventListener("mousedown",(function(t){t.preventDefault()})),this._element.addEventListener("focus",(function(){var t=o._map.getContainer();t.scrollTop=0,t.scrollLeft=0})),Di(this._element,this._anchor,"marker"),this._popup=null}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},r.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},r.prototype.getElement=function(){return this._element},r.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},r.prototype._onKeyPress=function(t){var e=t.code,n=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==n&&13!==n||this.togglePopup()},r.prototype._onMapClick=function(t){var e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()},r.prototype.getPopup=function(){return this._popup},r.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},r.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Mi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),n.setTransform(this._element,Oi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+r+" "+e)}},r.prototype.getOffset=function(){return this._offset},r.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},r.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},r.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},r.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},r.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},r.prototype.isDraggable=function(){return this._draggable},r.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},r.prototype.getRotation=function(){return this._rotation},r.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},r.prototype.getRotationAlignment=function(){return this._rotationAlignment},r.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},r.prototype.getPitchAlignment=function(){return this._pitchAlignment},r}(t.Evented),Bi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Fi=0,ji=!1,Ni=function(e){function r(n){e.call(this),this.options=t.extend({},Bi,n),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),r=this._setupUI,void 0!==Li?r(Li):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){r(Li="denied"!==t.state)})):r(Li=!!t.window.navigator.geolocation),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Fi=0,ji=!1},r.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),n=t.coords;return e&&(n.longitude<e.getWest()||n.longitude>e.getEast()||n.latitude<e.getSouth()||n.latitude>e.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
2RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},r.prototype._updateCamera=function(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,i=this._map.getBearing(),o=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})},r.prototype._updateMarker=function(e){if(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),n=this._map.unproject([1,t]),r=e.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
2se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ri(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ri({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==r._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new t.Event("trackuserlocationend")))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fi--,ji=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fi>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(t.Evented),Ui={maxWidth:100,unit:"metric"},Vi=function(e){this.options=t.extend({},Ui,e),t.bindAll(["_onMove","setUnit"],this)};function qi(t,e,n){var r=n&&n.maxWidth||100,i=t._container.clientHeight/2,o=t.unproject([0,i]),a=t.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){var u=3.2808*s;u>5280?Zi(e,r,u/5280,t._getUIString("ScaleControl.Miles")):Zi(e,r,u,t._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?Zi(e,r,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Zi(e,r,s/1e3,t._getUIString("ScaleControl.Kilometers")):Zi(e,r,s,t._getUIString("ScaleControl.Meters"))}function Zi(t,e,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a)));t.style.width=e*(s/n)+"px",t.innerHTML=s+"&nbsp;"+r}Vi.prototype.getDefaultPosition=function(){return"bottom-left"},Vi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Vi.prototype.onAdd=function(t){return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Vi.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Vi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Wi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Wi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Wi.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Wi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Wi.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Wi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Wi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Wi.prototype._isFullscreen=function(){return this._fullscreen},Wi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Wi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Gi={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Xi=function(e){function r(n){e.call(this),this.options=t.extend(Object.create(Gi),n),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat}
vendor: 4,973 bytes, line 2
2,r.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},r.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},r.prototype.setHTML=function(e){var n,r=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},r.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},r.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(t){this._update(t.point)},r.prototype._onMouseMove=function(t){this._update(t.point)},r.prototype._onDrag=function(t){this._update(t.point)},r.prototype._update=function(e){var r=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return r._container.classList.add(t)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Mi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new t.Point(0,0),top:new t.Point(0,n),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-n),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(n,0),right:new t.Point(-n,0)}}if(n instanceof t.Point||Array.isArray(n)){var i=t.Point.convert(n);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(n.center||[0,0]),top:t.Point.convert(n.top||[0,0]),"top-left":t.Point.convert(n["top-left"]||[0,0]),"top-right":t.Point.convert(n["top-right"]||[0,0]),bottom:t.Point.convert(n.bottom||[0,0]),"bottom-left":t.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(n["bottom-right"]||[0,0]),left:t.Point.convert(n.left||[0,0]),right:t.Point.convert(n.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,u=this._container.offsetWidth,l=this._container.offsetHeight;s=i.y+a.bottom.y<l?["top"]:i.y>this._map.transform.height-l?["bottom"]:[],i.x<u/2?s.push("left"):i.x>this._map.transform.width-u/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=i.add(a[o]).round();n.setTransform(this._container,Oi[o]+" translate("+c.x+"px,"+c.y+"px)"),Di(this._container,o,"popup")}},r.prototype._onClose=function(){this.remove()},r}(t.Evented),Hi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Pi,NavigationControl:zi,GeolocateControl:Ni,AttributionControl:_i,ScaleControl:Vi,FullscreenControl:Wi,Popup:Xi,Marker:Ri,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.
2Evented,config:t.config,prewarm:function(){Ft().acquire(Dt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Dt),Rt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Lt.workerCount},set workerCount(t){Lt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Hi})),n}()},function(t,e,n){"use strict";t.exports=n(52)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(7);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(7),i=n(58),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s={adapter:function(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e))&&(t=n(31)),t}(),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){s.headers[t]=r.merge(o)})),t.exports=s}).call(this,n(24))},function(t,e,n){"use strict";var r=n(7),i=n(59),o=n(61),a=n(28),s=n(62),u=n(65),l=n(66),c=n(32);t.exports=function(t){return new Promise((function(e,n){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"],(r.isBlob(p)||r.isFile(p))&&p.type&&delete h["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",m=unescape(encodeURIComponent(t.auth.password))||"";h.Authorization="Basic "+btoa(d+":"+m)}var y=s(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),a(y,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?u(f.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:t,request:f};i(e,n,o),f=null}},f.onabort=function(){f&&(n(c("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(c("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(c(e,t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var v=(t.withCredentials||l(y))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;v&&(h[t.xsrfHeaderName]=v)}if("setRequestHeader"in f&&r.forEach(h,(function(t,e){"undefined"===typeof p&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)}
2)),r.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(g){if("json"!==t.responseType)throw g}"function"===typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),n(t),f=null)})),p||(p=null),f.send(p)}))}},function(t,e,n){"use strict";var r=n(60);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function l(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,l),r.forEach(a,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(s,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var c=i.concat(o).concat(a).concat(s),p=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===c.indexOf(t)}));return r.forEach(p,l),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}}(),t.exports=n(45)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},function(t,e,n){"use strict";(function(t){var r=n(0);function i(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof self?self:t;var r="undefined"!==typeof document&&document.attachEvent;if(!r){var i=function(){var t=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(t){return n.setTimeout(t,20)};return function(e){return t(e)}}(),o=function(){var t=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(e){return t(e)}}(),a=function(t){var e=t.__resizeTriggers__,n=e.firstElementChild,r=e.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},s=function(t){if(!(t.target.className.indexOf("contract-trigger")<0&&t.target.className.indexOf("expand-trigger")<0)){var e=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(n){n.call(e,t)})))}
2))}},u=!1,l="",c="animationstart",p="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=document.createElement("fakeelement");if(void 0!==f.style.animationName&&(u=!0),!1===u)for(var d=0;d<p.length;d++)if(void 0!==f.style[p[d]+"AnimationName"]){l="-"+p[d].toLowerCase()+"-",c=h[d],u=!0;break}var m="resizeanim",y="@"+l+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",v=l+"animation: 1ms "+m+"; "}return{addResizeListener:function(t,i){if(r)t.attachEvent("onresize",i);else{if(!t.__resizeTriggers__){var o=t.ownerDocument,u=n.getComputedStyle(t);u&&"static"==u.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var n=(y||"")+".resize-triggers { "+(v||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(t.createTextNode(n)),r.appendChild(i)}}(o),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=o.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),a(t),t.addEventListener("scroll",s,!0),c&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&a(t)},t.__resizeTriggers__.addEventListener(c,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(i)}},removeResizeListener:function(t,e){if(r)t.detachEvent("onresize",e);else if(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),!t.__resizeListeners__.length){t.removeEventListener("scroll",s,!0),t.__resizeTriggers__.__animationListener__&&(t.__resizeTriggers__.removeEventListener(c,t.__resizeTriggers__.__animationListener__),t.__resizeTriggers__.__animationListener__=null);try{t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)}catch(n){}}}}}var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e},l=function(t){function e(){var t,n,r;o(this,e);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=u(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var t=r.props,e=t.disableHeight,n=t.disableWidth,i=t.onResize;if(r._parentNode){var o=r._parentNode.offsetHeight||0,a=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},u=parseInt(s.paddingLeft,10)||0,l=parseInt(s.paddingRight,10)||0,c=parseInt(s.paddingTop,10)||0,p=parseInt(s.paddingBottom,10)||0,h=o-c-p,f=a-u-l;(!e&&r.state.height!==h||!n&&r.state.width!==f)&&(r.setState({height:o-c-p,width:a-u-l}),i({height:o,width:a}))}},r._setRef=function(t){r._autoSizer=t},u(r,n)}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
2(e,t),a(e,[{key:"componentDidMount",value:function(){var t=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=i(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.className,i=t.disableHeight,o=t.disableWidth,a=t.style,u=this.state,l=u.height,c=u.width,p={overflow:"visible"},h={},f=!1;return i||(0===l&&(f=!0),p.height=0,h.height=l),o||(0===c&&(f=!0),p.width=0,h.width=c),Object(r.createElement)("div",{className:n,ref:this._setRef,style:s({},p,a)},!f&&e(h))}}]),e}(r.PureComponent);l.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},e.a=l}).call(this,n(17))},,,function(t,e,n){"use strict";var r=n(26),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=f(n);i&&i!==d&&t(e,i,r)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=u(e),m=u(n),y=0;y<a.length;++y){var v=a[y];if(!o[v]&&(!r||!r[v])&&(!m||!m[v])&&(!s||!s[v])){var g=h(n,v);try{l(e,v,g)}catch(_){}}}}return e}},function(t,e,n){t.exports=n(53)},function(t,e,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n(13);function s(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=Object(a.a)(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}var u=n(4),l=n(3);function c(t,e,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;!function t(e,n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1),f=Math.max(i,Math.floor(r-u*c/s+h)),d=Math.min(o,Math.floor(r+(s-u)*c/s+h));t(e,n,r,f,d,a)}var m=n[2*r+a],y=i,v=o;for(p(e,n,i,r),n[2*o+a]>m&&p(e,n,i,o);y<v;){for(p(e,n,y,v),y++,v--;n[2*y+a]<m;)y++;for(;n[2*v+a]>m;)v--}
2n[2*i+a]===m?p(e,n,i,v):(v++,p(e,n,v,o)),v<=r&&(i=v+1),r<=v&&(o=v-1)}}(t,e,a,r,i,o%2),c(t,e,n,r,a-1,o+1),c(t,e,n,a+1,i,o+1)}}function p(t,e,n,r){h(t,n,r),h(e,2*n,2*r),h(e,2*n+1,2*r+1)}function h(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function f(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}var d=function(t){return t[0]},m=function(t){return t[1]},y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;Object(u.a)(this,t),this.nodeSize=i,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(e.length),l=this.coords=new o(2*e.length),p=0;p<e.length;p++)s[p]=p,l[2*p]=n(e[p]),l[2*p+1]=r(e[p]);c(s,l,i,0,s.length-1,0)}return Object(l.a)(t,[{key:"range",value:function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var s,u,l=[0,t.length-1,0],c=[];l.length;){var p=l.pop(),h=l.pop(),f=l.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],u=e[2*d+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],u=e[2*m+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?n<=s:r<=u)&&(l.push(f),l.push(m-1),l.push(y)),(0===p?i>=s:o>=u)&&(l.push(m+1),l.push(h),l.push(y))}}return c}(this.ids,this.coords,t,e,n,r,this.nodeSize)}},{key:"within",value:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],u=i*i;a.length;){var l=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)f(e[2*h],e[2*h+1],n,r)<=u&&s.push(t[h]);else{var d=Math.floor((p+c)/2),m=e[2*d],y=e[2*d+1];f(m,y,n,r)<=u&&s.push(t[d]);var v=(l+1)%2;(0===l?n-i<=m:r-i<=y)&&(a.push(p),a.push(d-1),a.push(v)),(0===l?n+i>=m:r+i>=y)&&(a.push(d+1),a.push(c),a.push(v))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}]),t}(),v={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},g=function(){function t(e){Object(u.a)(this,t),this.options=k(Object.create(v),e),this.trees=new Array(this.options.maxZoom+1)}return Object(l.a)(t,[{key:"load",value:function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare ".concat(t.length," points");n&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(x(t[u],u));this.trees[i+1]=new y(s,P,C,o,Float32Array),n&&console.timeEnd(a);for(var l=i;l>=r;l--){var c=+Date.now();s=this._cluster(s,l),this.trees[l]=new y(s,P,C,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",l,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),u=this.getClusters([-180,r,i,o],e);return a.concat(u)}var l,c=this.trees[this._limitZoom(e)],p=[],h=s(c.range(E(n),S(o),E(i),S(r)));try{for(h.s();!(l=h.n()).done;){var f=l.value,d=c.points[f];p.push(d.numPoints?b(d):this.points[d.index])}}catch(m){h.e(m)}finally{h.f()}return p}},{key:"getChildren",value:function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);var a,u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),l=[],c=s(i.within(o.x,o.y,u));try{for(c.s();!(a=c.n()).done;){var p=a.value,h=i.points[p];h.parentId===t&&l.push(h.numPoints?b(h):this.points[h.index])}}catch(f){c.e(f)}finally{c.f()}if(0===l.length)throw new Error(r);return l}},{key:"getLeaves",value:function(t,e,n){e=e||10,n=n||0;var r=[];return this._appendLeaves(r,t,e,n,0),r}},{key:"getTile",value:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,u=(n-s)/i,l=(n+1+s)/i,c={features:[]};return this._addTileFeatures(r.range((e-s)/i,u,(e+1+s)/i,l),r.points,e,n,i,c),0===e&&this._addTileFeatures(r.range(1-s/i,u,1,l),r.points,i,n,i,c),e===i-1&&this._addTileFeatures(r.range(0,u,s/i,l),r.points,-1,n,i,c),c.features.length?c:null}},{key:"getClusterExpansionZoom",value:function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}},{key:"_appendLeaves",value:function(t,e,n,r,i){var o,a=s(this.getChildren(e));try{for(a.s();!(o=a.n()).done;){var u=o.value,l=u.properties;if(l&&l.cluster?i+l.point_count<=r?i+=l.point_count:i=this._appendLeaves(t,l.cluster_id,n,r,i):i<r?i++:t.push(u),t.length===n)break}}catch(c){a.e(c)}finally{a.f()}return i}},{key:"_addTileFeatures",value:function(t,e,n,r,i,o){var a,u=s(t);try{for(u.s();!(a=u.n()).done;){var l=e[a.value],c=l.numPoints,p={type:1,geometry:[[Math.round(this.options.extent*(l.x*i-n)),Math.round(this.options.extent*(l.y*i-r))]],tags:c?w(l):this.points[l.index].properties},h=void 0;c?h=l.id:this.options.generateId?h=l.index:this.points[l.index].id&&(h=this.points[l.index].id),void 0!==h&&(p.id=h),o.features.push(p)}}catch(f){u.e(f)}finally{u.f()}}},{key:"_limitZoom",value:function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))}},{key:"_cluster",value:function(t,e){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,u=r.minPoints,l=i/(o*Math.pow(2,e)),c=0;c<t.length;c++){var p=t[c];if(!(p.zoom<=e)){p.zoom=e;var h,f=this.trees[e+1],d=f.within(p.x,p.y,l),m=p.numPoints||1,y=m,v=s(d);try{for(v.s();!(h=v.n()).done;){var g=h.value,x=f.points[g];x.zoom>e&&(y+=x.numPoints||1)}}catch(D){v.e(D)}finally{v.f()}if(y>=u){var b,w=p.x*m,E=p.y*m,S=a&&m>1?this._map(p,!0):null,T=(c<<5)+(e+1)+this.points.length,k=s(d);try{for(k.s();!(b=k.n()).done;){var P=b.value,C=f.points[P];if(!(C.zoom<=e)){C.zoom=e;var I=C.numPoints||1;w+=C.x*I,E+=C.y*I,C.parentId=T,a&&(S||(S=this._map(p,!0)),a(S,this._map(C)))}}}catch(D){k.e(D)}finally{k.f()}p.parentId=T,n.push(_(w/y,E/y,T,y,S))}else if(n.push(p),y>1){var z,A=s(d);try{for(A.s();!(z=A.n()).done;){var M=z.value,O=f.points[M];O.zoom<=e||(O.zoom=e,n.push(O))}}catch(D){A.e(D)}finally{A.f()}}}}return n}},{key:"_getOriginId",value:function(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function(t){return(t-this.points.length)%32}},{key:"_map",value:function(t,e){if(t.numPoints)return e?k({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?k({},r):r}}]),t}();function _(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function x(t,e){var n=Object(o.a)(t.geometry.coordinates,2),r=n[0],i=n[1];return{x:E(r),y:S(i),zoom:1/0,index:e,parentId:-1}}function b(t){return{type:"Feature",id:t.id,properties:w(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),T(t.y)]}};var e}function w(t){var e=t.numPoints,n=e>=1e4?"".concat(Math.round(e/1e3),"k"):e>=1e3?"".concat(Math.round(e/100)/10,"k"):e;return k(k({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function E(t){return t/360+.5}function S(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function T(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function k(t,e){for(var n in e)t[n]=e[n];return t}function P(t){return t.x}function C(t){return t.y}var I=Object.prototype.hasOwnProperty;function z(t,e,n){var r,i=s(t.keys());try{for(i.s();!(r=i.n()).done;)if(A(n=r.value,e))return n}catch(o){i.e(o)}finally{i.f()}}function A(t,e){var n,r,i;if(t===e)return!0;
2if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&A(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;var o,a=s(t);try{for(a.s();!(o=a.n()).done;){if((i=r=o.value)&&"object"===typeof i&&!(i=z(e,i)))return!1;if(!e.has(i))return!1}}catch(c){a.e(c)}finally{a.f()}return!0}if(n===Map){if(t.size!==e.size)return!1;var u,l=s(t);try{for(l.s();!(u=l.n()).done;){if((i=(r=u.value)[0])&&"object"===typeof i&&!(i=z(e,i)))return!1;if(!A(r[1],e.get(i)))return!1}}catch(c){l.e(c)}finally{l.f()}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===typeof t){for(n in r=0,t){if(I.call(t,n)&&++r&&!I.call(e,n))return!1;if(!(n in e)||!A(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!==t&&e!==e}function M(t){var e=i.a.useRef();return A(t,e.current)||(e.current=t),e.current}var O=Object.prototype.hasOwnProperty;e.a=function(t){var e,n,o=t.points,a=t.bounds,s=t.zoom,u=t.options,l=Object(r.useRef)(),c=Object(r.useRef)(),p=Object(r.useState)([]),h=
2p[0],f=p[1],d=Math.round(s);return e=function(){l.current&&function t(e,n){var r,i;if(e===n)return!0;if(e&&n&&(r=e.constructor)===n.constructor){if(r===Date)return e.getTime()===n.getTime();if(r===RegExp)return e.toString()===n.toString();if(r===Array){if((i=e.length)===n.length)for(;i--&&t(e[i],n[i]););return-1===i}if(!r||"object"===typeof e){for(r in i=0,e){if(O.call(e,r)&&++i&&!O.call(n,r))return!1;if(!(r in n)||!t(e[r],n[r]))return!1}return Object.keys(n).length===i}}return e!==e&&n!==n}(c.current,o)||(l.current=new g(u),l.current.load(o)),a&&f(l.current.getClusters(a,d)),c.current=o},n=[o,a,d],i.a.useEffect(e,M(n)),{clusters:h,supercluster:l.current}}},,function(t,e,n){"use strict";var r=n(23),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,p=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,y="function"===typeof Symbol&&Symbol.iterator;function v(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function x(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||g}function b(){}function w(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||g}x.prototype.isReactComponent={},x.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(v(85));this.updater.enqueueSetState(this,t,e,"setState")},x.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=x.prototype;var E=w.prototype=new b;E.constructor=w,r(E,x.prototype),E.isPureReactComponent=!0;var S={current:null},T=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function P(t,e,n){var r,i={},a=null,s=null;
vendor: 29,311 bytes, line 2
2if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)T.call(e,r)&&!k.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:S.current}}function C(t){return"object"===typeof t&&null!==t&&t.$$typeof===o}var I=/\/+/g,z=[];function A(t,e,n,r){if(z.length){var i=z.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function M(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>z.length&&z.push(t)}function O(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+D(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=n+D(s=e[l],l);u+=t(s,c,r,i)}else if(null===e||"object"!==typeof e?c=null:c="function"===typeof(c=y&&e[y]||e["@@iterator"])?c:null,"function"===typeof c)for(e=c.call(e),l=0;!(s=e.next()).done;)u+=t(s=s.value,c=n+D(s,l++),r,i);else if("object"===s)throw r=""+e,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return u}(t,"",e,n)}function D(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function L(t,e){t.func.call(t.context,e,t.count++)}function R(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?B(t,r,n,(function(t){return t})):null!=t&&(C(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(I,"$&/")+"/")+n)),r.push(t))}function B(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(I,"$&/")+"/"),O(t,R,e=A(e,o,r,i)),M(e)}var F={current:null};function j(){var t=F.current;if(null===t)throw Error(v(321));return t}var N={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return B(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;O(t,L,e=A(null,null,e,n)),M(e)},count:function(t){return O(t,(function(){return null}),null)},toArray:function(t){var e=[];return B(t,e,null,(function(t){return t})),e},only:function(t){if(!C(t))throw Error(v(143));return t}},e.Component=x,e.Fragment=s,e.Profiler=l,e.PureComponent=w,e.StrictMode=u,e.Suspense=f,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(v(267,t));var i=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=S.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)T.call(e,c)&&!k.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var p=0;p<c;p++)l[p]=arguments[p+2];i.children=l}return{$$typeof:o,type:t.type,key:a,ref:s,props:i,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:p,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},e.createElement=P,e.createFactory=function(t){var e=P.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:h,render:t}},e.isValidElement=C,e.lazy=function(t){return{$$typeof:m,_ctor:t,_status:-1,_result:null}},e.memo=function(t,e){return{$$typeof:d,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return j().useCallback(t,e)},e.useContext=function(t,e){return j().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return j().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return j().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return j().useLayoutEffect(t,e)},e.useMemo=function(t,e){return j().useMemo(t,e)},e.useReducer=function(t,e,n){return j().useReducer(t,e,n)},e.useRef=function(t){return j().useRef(t)},e.useState=function(t){return j().useState(t)},e.version="16.13.1"},function(t,e,n){"use strict";var r=n(0),i=n(23),o=n(46);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(t,e,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(c){this.onError(c)}}var u=!1,l=null,c=!1,p=null,h={onError:function(t){u=!0,l=t}};function f(t,e,n,r,i,o,a,c,p){u=!1,l=null,s.apply(h,arguments)}var d=null,m=null,y=null;function v(t,e,n){var r=t.type||"unknown-event";t.currentTarget=y(n),function(t,e,n,r,i,o,s,h,d){if(f.apply(this,arguments),u){if(!u)throw Error(a(198));var m=l;u=!1,l=null,c||(c=!0,p=m)}}(r,e,void 0,t),t.currentTarget=null}var g=null,_={};function x(){if(g)for(var t in _){var e=_[t],n=g.indexOf(t);if(!(-1<n))throw Error(a(96,t));if(!w[n]){if(!e.extractEvents)throw Error(a(97,t));for(var r in w[n]=e,n=e.eventTypes){var i=void 0,o=n[r],s=e,u=r;if(E.hasOwnProperty(u))throw Error(a(99,u));E[u]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&b(l[i],s,u);i=!0}else o.registrationName?(b(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,r,t))}}}}function b(t,e,n){if(S[t])throw Error(a(100,t));S[t]=e,T[t]=e.eventTypes[n].dependencies}var w=[],E={},S={},T={};function k(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];if(!_.hasOwnProperty(e)||_[e]!==r){if(_[e])throw Error(a(102,e));_[e]=r,n=!0}}n&&x()}var P=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),C=null,I=null,z=null;function A(t){if(t=m(t)){if("function"!==typeof C)throw Error(a(280));var e=t.stateNode;e&&(e=d(e),C(t.stateNode,t.type,e))}}function M(t){I?z?z.push(t):z=[t]:I=t}function O(){if(I){var t=I,e=z;if(z=I=null,A(t),e)for(t=0;t<e.length;t++)A(e[t])}}function D(t,e){return t(e)}function L(t,e,n,r,i){return t(e,n,r,i)}function R(){}var B=D,F=!1,j=!1;function N(){null===I&&null===z||(R(),O())}function U(t,e,n){if(j)return t(e,n);j=!0;try{return B(t,e,n)}finally{j=!1,N()}}var V=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,Z={},W={};function G(t,e,n,r,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o}var X={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){X[t]=new G(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];X[e]=new G(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){X[t]=new G(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){X[t]=new G(t,2,!1,t,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){X[t]=new G(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){X[t]=new G(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){X[t]=new G(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){X[t]=new G(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){X[t]=new G(t,5,!1,t.toLowerCase(),null,!1)}));var H=/[\-:]([a-z])/g;function K(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(H,K);X[e]=new G(e,1,!1,t,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(H,K);X[e]=new G(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(H,K);X[e]=new G(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){X[t]=new G(t,1,!1,t.toLowerCase(),null,!1)})),X.xlinkHref=new G("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){X[t]=new G(t,1,!1,t.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function J(t,e,n,r){var i=X.hasOwnProperty(e)?X[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!q.call(W,t)||!q.call(Z,t)&&(V.test(t)?W[t]=!0:(Z[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var $=/^(.*)[\\\/]/,Q="function"===typeof Symbol&&Symbol.for,tt=Q?Symbol.for("react.element"):60103,et=Q?Symbol.for("react.portal"):60106,nt=Q?Symbol.for("react.fragment"):60107,rt=Q?Symbol.for("react.strict_mode"):60108,it=Q?Symbol.for("react.profiler"):60114,ot=Q?Symbol.for("react.provider"):60109,at=Q?Symbol.for("react.context"):60110,st=Q?Symbol.for("react.concurrent_mode"):60111,ut=Q?Symbol.for("react.forward_ref"):60112,lt=Q?Symbol.for("react.suspense"):60113,ct=Q?Symbol.for("react.suspense_list"):60120,pt=Q?Symbol.for("react.memo"):60115,ht=Q?Symbol.for("react.lazy"):60116,ft=Q?Symbol.for("react.block"):60121,dt="function"===typeof Symbol&&Symbol.iterator;function mt(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=dt&&t[dt]||t["@@iterator"])?t:null}function yt(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case nt:return"Fragment";case et:return"Portal";case it:return"Profiler";case rt:return"StrictMode";case lt:return"Suspense";case ct:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case at:return"Context.Consumer";case ot:return"Context.Provider";case ut:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case pt:return yt(t.type);case ft:return yt(t.render);case ht:if(t=1===t._status?t._result:null)return yt(t)}return null}function vt(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var r=t._debugOwner,i=t._debugSource,o=yt(t.type);n=null,r&&(n=yt(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace($,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}e+=n,t=t.return}while(t);return e}function gt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _t(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function xt(t){t._valueTracker||(t._valueTracker=function(t){var e=_t(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function bt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=_t(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function wt(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Et(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=gt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function St(t,e){null!=(e=e.checked)&&J(t,"checked",e,!1)}function Tt(t,e){St(t,e);var n=gt(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?Pt(t,e.type,n):e.hasOwnProperty("defaultValue")&&Pt(t,e.type,gt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function kt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function Pt(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Ct(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function It(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+gt(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function zt(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function At(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:gt(n)}}function Mt(t,e){var n=gt(e.value),r=gt(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function Ot(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var Dt="http://www.w3.org/1999/xhtml",Lt="http://www.w3.org/2000/svg";function Rt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Rt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ft,jt=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction((function(){return t(e,n)}))}:t}((function(t,e){if(t.namespaceURI!==Lt||"innerHTML"in t)t.innerHTML=e;else{for((Ft=Ft||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ft.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}}));function Nt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function Ut(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Vt={animationend:Ut("Animation","AnimationEnd"),animationiteration:Ut("Animation","AnimationIteration"),animationstart:Ut("Animation","AnimationStart"),transitionend:Ut("Transition","TransitionEnd")},qt={},Zt={};function Wt(t){if(qt[t])return qt[t];if(!Vt[t])return t;var e,n=Vt[t];for(e in n)if(n.hasOwnProperty(e)&&e in Zt)return qt[t]=n[e];return t}P&&(Zt=document.createElement("div").style,"AnimationEvent"in window||(delete Vt.animationend.animation,delete Vt.animationiteration.animation,delete Vt.animationstart.animation),"TransitionEvent"in window||delete Vt.transitionend.transition);var Gt=Wt("animationend"),Xt=Wt("animationiteration"),Ht=Wt("animationstart"),Kt=Wt("transitionend"),Yt="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jt=new("function"===typeof WeakMap?WeakMap:Map);function $t(t){var e=Jt.get(t);return void 0===e&&(e=new Map,Jt.set(t,e)),e}function Qt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).effectTag)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function te(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function ee(t){if(Qt(t)!==t)throw Error(a(188))}function ne(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Qt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ee(i),t;if(o===r)return ee(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function re(t,e){if(null==e)throw Error(a(30));return null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function ie(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var oe=null;function ae(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var r=0;r<e.length&&!t.isPropagationStopped();r++)v(t,e[r],n[r]);else e&&v(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function se(t){if(null!==t&&(oe=re(oe,t)),t=oe,oe=null,t){if(ie(t,ae),oe)throw Error(a(95));if(c)throw t=p,c=!1,p=null,t}}function ue(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function le(t){if(!P)return!1;var e=(t="on"+t)in document;return e||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"===typeof e[t]),e}var ce=[];function pe(t){t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>ce.length&&ce.push(t)}function he(t,e,n,r){if(ce.length){var i=ce.pop();return i.topLevelType=t,i.eventSystemFlags=r,i.nativeEvent=e,i.targetInst=n,i}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function fe(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(e=n.tag)&&6!==e||t.ancestors.push(n),n=Pn(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var i=ue(t.nativeEvent);r=t.topLevelType;var o=t.nativeEvent,a=t.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<w.length;u++){var l=w[u];l&&(l=l.extractEvents(r,e,o,i,a))&&(s=re(s,l))}se(s)}}function de(t,e,n){if(!n.has(t)){switch(t){case"scroll":He(e,"scroll",!0);break;case"focus":case"blur":He(e,"focus",!0),He(e,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":le(t)&&He(e,t,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Yt.indexOf(t)&&Xe(t,e)}n.set(t,null)}}var me,ye,ve,ge=!1,_e=[],xe=null,be=null,we=null,Ee=new Map,Se=new Map,Te=[],ke="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Pe="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ce(t,e,n,r,i){return{blockedOn:t,topLevelType:e,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ie(t,e){switch(t){case"focus":case"blur":xe=null;break;case"dragenter":case"dragleave":be=null;break;case"mouseover":case"mouseout":we=null;break;case"pointerover":case"pointerout":Ee.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Se.delete(e.pointerId)}}function ze(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=Ce(e,n,r,i,o),null!==e&&(null!==(e=Cn(e))&&ye(e)),t):(t.eventSystemFlags|=r,t)}function Ae(t){var e=Pn(t.target);if(null!==e){var n=Qt(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=te(n)))return t.blockedOn=e,void o.unstable_runWithPriority(t.priority,(function(){ve(n)}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function Me(t){if(null!==t.blockedOn)return!1;var e=$e(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);if(null!==e){var n=Cn(e);return null!==n&&ye(n),t.blockedOn=e,!1}return!0}function Oe(t,e,n){Me(t)&&n.delete(e)}function De(){for(ge=!1;0<_e.length;){var t=_e[0];if(null!==t.blockedOn){null!==(t=Cn(t.blockedOn))&&me(t);break}var e=$e(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);null!==e?t.blockedOn=e:_e.shift()}null!==xe&&Me(xe)&&(xe=null),null!==be&&Me(be)&&(be=null),null!==we&&Me(we)&&(we=null),Ee.forEach(Oe),Se.forEach(Oe)}function Le(t,e){t.blockedOn===e&&(t.blockedOn=null,ge||(ge=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,De)))}function Re(t){function e(e){return Le(e,t)}if(0<_e.length){Le(_e[0],t);for(var n=1;n<_e.length;n++){var r=_e[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==xe&&Le(xe,t),null!==be&&Le(be,t),null!==we&&Le(we,t),Ee.forEach(e),Se.forEach(e),n=0;n<Te.length;n++)(r=Te[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Te.length&&null===(n=Te[0]).blockedOn;)Ae(n),null===n.blockedOn&&Te.shift()}var Be={},Fe=new Map,je=new Map,Ne=["abort","abort",Gt,"animationEnd",Xt,"animationIteration",Ht,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Kt,"transitionEnd","waiting","waiting"];function Ue(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:e},je.set(r,e),Fe.set(r,o),Be[i]=o}}Ue("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ue("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ue(Ne,2);for(var Ve="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),qe=0;qe<Ve.length;qe++)je.set(Ve[qe],0);var Ze=o.unstable_UserBlockingPriority,We=o.unstable_runWithPriority,Ge=!0;function Xe(t,e){He(e,t,!1)}function He(t,e,n){var r=je.get(e);switch(void 0===r?2:r){case 0:r=Ke.bind(null,e,1,t);break;case 1:r=Ye.bind(null,e,1,t);break;default:r=Je.bind(null,e,1,t)}n?t.addEventListener(e,r,!0):t.addEventListener(e,r,!1)}function Ke(t,e,n,r){F||R();var i=Je,o=F;F=!0;try{L(i,t,e,n,r)}finally{(F=o)||N()}}function Ye(t,e,n,r){We(Ze,Je.bind(null,t,e,n,r))}function Je(t,e,n,r){if(Ge)if(0<_e.length&&-1<ke.indexOf(t))t=Ce(null,t,e,n,r),_e.push(t);else{var i=$e(t,e,n,r);if(null===i)Ie(t,r);else if(-1<ke.indexOf(t))t=Ce(i,t,e,n,r),_e.push(t);else if(!function(t,e,n,r,i){switch(e){case"focus":return xe=ze(xe,t,e,n,r,i),!0;case"dragenter":return be=ze(be,t,e,n,r,i),!0;case"mouseover":return we=ze(we,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ee.set(o,ze(Ee.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Se.set(o,ze(Se.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r)){Ie(t,r),t=he(t,r,null,e);try{U(fe,t)}finally{pe(t)}}}}function $e(t,e,n,r){if(null!==(n=Pn(n=ue(r)))){var i=Qt(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=te(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}t=he(t,r,n,e);try{U(fe,t)}finally{pe(t)}return null}var Qe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];function en(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||Qe.hasOwnProperty(t)&&Qe[t]?(""+e).trim():e+"px"}function nn(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=en(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}
2Object.keys(Qe).forEach((function(t){tn.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qe[e]=Qe[t]}))}));var rn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(t,e){if(e){if(rn[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62,""))}}function an(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Dt;function un(t,e){var n=$t(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=T[e];for(var r=0;r<e.length;r++)de(e[r],t,n)}function ln(){}function cn(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function pn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hn(t,e){var n,r=pn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=pn(r)}}function fn(){for(var t=window,e=cn();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=cn((t=e.contentWindow).document)}return e}function dn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var mn=null,yn=null;function vn(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function gn(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var _n="function"===typeof setTimeout?setTimeout:void 0,xn="function"===typeof clearTimeout?clearTimeout:void 0;function bn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function wn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var En=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+En,Tn="__reactEventHandlers$"+En,kn="__reactContainere$"+En;function Pn(t){var e=t[Sn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[kn]||n[Sn]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=wn(t);null!==t;){if(n=t[Sn])return n;t=wn(t)}return e}n=(t=n).parentNode}return null}function Cn(t){return!(t=t[Sn]||t[kn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function In(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function zn(t){return t[Tn]||null}function An(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Mn(t,e){var n=t.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}
vendor: 3,018 bytes, line 2
2function On(t,e,n){(e=Mn(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function Dn(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=An(e);for(e=n.length;0<e--;)On(n[e],"captured",t);for(e=0;e<n.length;e++)On(n[e],"bubbled",t)}}function Ln(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=Mn(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function Rn(t){t&&t.dispatchConfig.registrationName&&Ln(t._targetInst,null,t)}function Bn(t){ie(t,Dn)}var Fn=null,jn=null,Nn=null;function Un(){if(Nn)return Nn;var t,e,n=jn,r=n.length,i="value"in Fn?Fn.value:Fn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return Nn=i.slice(t,1<e?1-e:void 0)}function Vn(){return!0}function qn(){return!1}function Zn(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Vn:qn,this.isPropagationStopped=qn,this}function Wn(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Gn(t){if(!(t instanceof this))throw Error(a(279));t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Xn(t){t.eventPool=[],t.getPooled=Wn,t.release=Gn}i(Zn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Vn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Vn)},persist:function(){this.isPersistent=Vn},isPersistent:qn,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=qn,this._dispatchInstances=this._dispatchListeners=null}}),Zn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Zn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,Xn(n),n},Xn(Zn);var Hn=Zn.extend({data:null}),Kn=Zn.extend({data:null}),Yn=[9,13,27,32],Jn=P&&"CompositionEvent"in window,$n=null;P&&"documentMode"in document&&($n=document.documentMode);var Qn=P&&"TextEvent"in window&&!$n,tr=P&&(!Jn||$n&&8<$n&&11>
vendor: 9,393 bytes, line 2
2=$n),er=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ir(t,e){switch(t){case"keyup":return-1!==Yn.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(t,e,n,r){var i;if(Jn)t:{switch(t){case"compositionstart":var o=nr.compositionStart;break t;case"compositionend":o=nr.compositionEnd;break t;case"compositionupdate":o=nr.compositionUpdate;break t}o=void 0}else ar?ir(t,n)&&(o=nr.compositionEnd):"keydown"===t&&229===n.keyCode&&(o=nr.compositionStart);return o?(tr&&"ko"!==n.locale&&(ar||o!==nr.compositionStart?o===nr.compositionEnd&&ar&&(i=Un()):(jn="value"in(Fn=r)?Fn.value:Fn.textContent,ar=!0)),o=Hn.getPooled(o,e,n,r),i?o.data=i:null!==(i=or(n))&&(o.data=i),Bn(o),i=o):i=null,(t=Qn?function(t,e){switch(t){case"compositionend":return or(e);case"keypress":return 32!==e.which?null:(rr=!0,er);case"textInput":return(t=e.data)===er&&rr?null:t;default:return null}}(t,n):function(t,e){if(ar)return"compositionend"===t||!Jn&&ir(t,e)?(t=Un(),Nn=jn=Fn=null,ar=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return tr&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))?((e=Kn.getPooled(nr.beforeInput,e,n,r)).data=t,Bn(e)):e=null,null===i?e:null===e?i:[i,e]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!ur[t.type]:"textarea"===e}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function pr(t,e,n){return(t=Zn.getPooled(cr.change,t,e,n)).type="change",M(n),Bn(t),t}var hr=null,fr=null;function dr(t){se(t)}function mr(t){if(bt(In(t)))return t}function yr(t,e){if("change"===t)return e}var vr=!1;function gr(){hr&&(hr.detachEvent("onpropertychange",_r),fr=hr=null)}function _r(t){if("value"===t.propertyName&&mr(fr))if(t=pr(fr,t,ue(t)),F)se(t);else{F=!0;try{D(dr,t)}finally{F=!1,N()}}}function xr(t,e,n){"focus"===t?(gr(),fr=n,(hr=e).attachEvent("onpropertychange",_r)):"blur"===t&&gr()}function br(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return mr(fr)}function wr(t,e){if("click"===t)return mr(e)}function Er(t,e){if("input"===t||"change"===t)return mr(e)}P&&(vr=le("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:cr,_isInputEventSupported:vr,extractEvents:function(t,e,n,r){var i=e?In(e):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=yr;else if(lr(i))if(vr)a=Er;else{a=br;var s=xr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=wr);if(a&&(a=a(t,e)))return pr(a,n,r);s&&s(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&Pt(i,"number",i.value)}},Tr=Zn.extend({view:null,detail:null}),kr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pr(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=kr[t])&&!!e[t]}function Cr(){return Pr}var Ir=0,zr=0,Ar=!1,Mr=!1,Or=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Cr,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=Ir;return Ir=t.screenX,Ar?"mousemove"===t.type?t.screenX-e:0:(Ar=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=zr;return zr=t.screenY,Mr?"mousemove"===t.type?t.screenY-e:0:(Mr=!0,0)}}),Dr=Or.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Rr={eventTypes:Lr,extractEvents:function(t,e,n,r,i){var o="mouseover"===t||"pointerover"===t,a="mouseout"===t||"pointerout"===t;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=e,null!==(e=(e=n.relatedTarget||n.toElement)?Pn(e):null)&&(e!==Qt(e)||5!==e.tag&&6!==e.tag)&&(e=null)):a=null;if(a===e)return null;if("mouseout"===t||"mouseover"===t)var s=Or,u=Lr.mouseLeave,l=Lr.mouseEnter,c="mouse";else"pointerout"!==t&&"pointerover"!==t||(s=Dr,u=Lr.pointerLeave,l=Lr.pointerEnter,c="pointer");if(t=null==a?o:In(a),o=null==e?o:In(e),(u=s.getPooled(u,a,n,r)).type=c+"leave",u.target=t,u.relatedTarget=o,(n=s.getPooled(l,e,n,r)).type=c+"enter",n.target=o,n.relatedTarget=t,c=e,(r=a)&&c)t:{for(l=c,a=0,t=s=r;t;t=An(t))a++;for(t=0,e=l;e;e=An(e))t++;for(;0<a-t;)s=An(s),a--;for(;0<t-a;)l=An(l),t--;for(;a--;){if(s===l||s===l.alternate)break t;s=An(s),l=An(l)}s=null}else s=null;for(l=s,s=[];r&&r!==l&&(null===(a=r.alternate)||a!==l);)s.push(r),r=An(r);for(r=[];c&&c!==l&&(null===(a=c.alternate)||a!==l);)r.push(c),c=An(c);for(c=0;c<s.length;c++)Ln(s[c],"bubbled",u);for(c=r.length;0<c--;)Ln(r[c],"captured",n);return 0===(64&i)?[u]:[u,n]}};var Br="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},Fr=Object.prototype.hasOwnProperty;function jr(t,e){if(Br(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(e,n[r])||!Br(t[n[r]],e[n[r]]))return!1;return!0}var Nr=P&&"documentMode"in document&&11>=document.documentMode,Ur={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vr=null,qr=null,Zr=null,Wr=!1;function Gr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Wr||null==Vr||Vr!==cn(n)?null:("selectionStart"in(n=Vr)&&dn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Zr&&jr(Zr,n)?null:(Zr=n,(t=Zn.getPooled(Ur.select,qr,t,e)).type="select",t.target=Vr,Bn(t),t))}var Xr={eventTypes:Ur,extractEvents:function(t,e,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{i=$t(i),o=T.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break t}i=!0}o=!i}if(o)return null;switch(i=e?In(e):window,t){case"focus":(lr(i)||"true"===i.contentEditable)&&(Vr=i,qr=e,Zr=null);break;case"blur":Zr=qr=Vr=null;break;case"mousedown":Wr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Wr=!1,Gr(n,r);case"selectionchange":if(Nr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},Hr=Zn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Kr=Zn.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Yr=Tr.extend({relatedTarget:null});function Jr(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var $r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ti=Tr.extend({key:function(t){if(t.key){var e=$r[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=Jr(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"ke
2yup"===t.type?Qr[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Cr,charCode:function(t){return"keypress"===t.type?Jr(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?Jr(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),ei=Or.extend({dataTransfer:null}),ni=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Cr}),ri=Zn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Or.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:Be,extractEvents:function(t,e,n,r){var i=Fe.get(t);if(!i)return null;switch(t){case"keypress":if(0===Jr(n))return null;case"keydown":case"keyup":t=ti;break;case"blur":case"focus":t=Yr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=ei;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=ni;break;case Gt:case Xt:case Ht:t=Hr;break;case Kt:t=ri;break;case"scroll":t=Tr;break;case"wheel":t=ii;break;case"copy":case"cut":case"paste":t=Kr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Dr;break;default:t=Zn}return Bn(e=t.getPooled(i,e,n,r)),e}};if(g)throw Error(a(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x(),d=zn,m=Cn,y=In,k({SimpleEventPlugin:oi,EnterLeaveEventPlugin:Rr,ChangeEventPlugin:Sr,SelectEventPlugin:Xr,BeforeInputEventPlugin:sr});var ai=[],si=-1;function ui(t){0>si||(t.current=ai[si],ai[si]=null,si--)}function li(t,e){si++,ai[si]=t.current,t.current=e}var ci={},pi={current:ci},hi={current:!1},fi=ci;function di(t,e){var n=t.type.contextTypes;if(!n)return ci;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function mi(t){return null!==(t=t.childContextTypes)&&void 0!==t}function yi(){ui(hi),ui(pi)}function vi(t,e,n){if(pi.current!==ci)throw Error(a(168));li(pi,e),li(hi,n)}function gi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,yt(e)||"Unknown",o));return i({},n,{},r)}function _i(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,fi=pi.current,li(pi,t),li(hi,hi.current),!0}function xi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=gi(t,e,fi),r.__reactInternalMemoizedMergedChildContext=t,ui(hi),ui(pi),li(pi,t)):ui(hi),li(hi,n)}var bi=o.unstable_runWithPriority,wi=o.unstable_scheduleCallback,Ei=o.unstable_cancelCallback,Si=o.unstable_requestPaint,Ti=o.unstable_now,ki=o.unstable_getCurrentPriorityLevel,Pi=o.unstable_ImmediatePriority,Ci=o.unstable_UserBlockingPriority,Ii=o.unstable_NormalPriority,zi=o.unstable_LowPriority,Ai=o.unstable_IdlePriority,Mi={},Oi=o.unstable_shouldYield,Di=void 0!==Si?Si:function(){},Li=null,Ri=null,Bi=!1,Fi=Ti(),ji=1e4>Fi?Ti:function(){return Ti()-Fi};function Ni(){switch(ki()){case Pi:return 99;case Ci:return 98;case Ii:return 97;case zi:return 96;case Ai:return 95;default:throw Error(a(332))}}function Ui(t){switch(t){case 99:return Pi;case 98:return Ci;case 97:return Ii;case 96:return zi;case 95:return Ai;default:throw Error(a(332))}}function Vi(t,e){return t=Ui(t),bi(t,e)}function qi(t,e,n){return t=Ui(t),wi(t,e,n)}function Zi(t){return null===Li?(Li=[t],Ri=wi(Pi,Gi)):Li.push(t),Mi}function Wi(){if(null!==Ri){var t=Ri;Ri=null,Ei(t)}Gi()}
2function Gi(){if(!Bi&&null!==Li){Bi=!0;var t=0;try{var e=Li;Vi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(t+1)),wi(Pi,Wi),n}finally{Bi=!1}}}function Xi(t,e,n){return 1073741821-(1+((1073741821-t+e/10)/(n/=10)|0))*n}function Hi(t,e){if(t&&t.defaultProps)for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var Ki={current:null},Yi=null,Ji=null,$i=null;function Qi(){$i=Ji=Yi=null}function to(t){var e=Ki.current;ui(Ki),t.type._context._currentValue=e}function eo(t,e){for(;null!==t;){var n=t.alternate;if(t.childExpirationTime<e)t.childExpirationTime=e,null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e);else{if(!(null!==n&&n.childExpirationTime<e))break;n.childExpirationTime=e}t=t.return}}function no(t,e){Yi=t,$i=Ji=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(t.expirationTime>=e&&(za=!0),t.firstContext=null)}function ro(t,e){if($i!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||($i=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Ji){if(null===Yi)throw Error(a(308));Ji=e,Yi.dependencies={expirationTime:0,firstContext:e,responders:null}}else Ji=Ji.next=e;return t._currentValue}var io=!1;function oo(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function so(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function uo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function lo(t,e){var n=t.alternate;null!==n&&ao(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function co(t,e,n,r){var o=t.updateQueue;io=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var l=o.baseState,c=0,p=null,h=null,f=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)<r){var m={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===f?(h=f=m,p=l):f=f.next=m,s>c&&(c=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),ou(s,d.suspenseConfig);t:{var y=t,v=d;switch(s=e,m=n,v.tag){case 1:if("function"===typeof(y=v.payload)){l=y.call(m,l,s);break t}l=y;break t;case 3:y.effectTag=-4097&y.effectTag|64;case 0:if(null===(s="function"===typeof(y=v.payload)?y.call(m,l,s):y)||void 0===s)break t;l=i({},l,s);break t;case 2:io=!0}}null!==d.callback&&(t.effectTag|=32,null===(s=o.effects)?o.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=o.shared.pending))break;d=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===f?p=l:f.next=h,o.baseState=p,o.baseQueue=f,au(c),t.expirationTime=c,t.memoizedState=l}}function po(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var ho=Y.ReactCurrentBatchConfig,fo=(new r.Component).refs;function mo(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.expirationTime&&(t.updateQueue.baseState=n)}var yo={isMounted:function(t){return!!(t=t._reactInternalFiber)&&Qt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=Gs(),i=ho.suspense;(i=so(r=Xs(r,t,i),i)).payload=e,void 0!==n&&null!==n&&(i.callback=n),uo(t,i),Hs(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=Gs(),i=ho.suspense;(i=so(r=Xs(r,t,i),i)).tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),uo(t,i),Hs(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=Gs(),r=ho.suspense;(r=so(n=Xs(n,t,r),r)).tag=2,void 0!==e&&null!==e&&(r.callback=e),uo(t,r),Hs(t,n)}};function vo(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!jr(n,r)||!jr(i,o))}function go(t,e,n){var r=!1,i=ci,o=e.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=mi(e)?fi:pi.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?di(t,i):ci),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=yo,t.stateNode=e,e._reactInternalFiber=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function _o(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&yo.enqueueReplaceState(e,e.state,null)}function xo(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=fo,oo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=mi(e)?fi:pi.current,i.context=di(t,o)),co(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(mo(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&yo.enqueueReplaceState(i,i.state,null),co(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.effectTag|=4)}var bo=Array.isArray;function wo(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs;e===fo&&(e=r.refs={}),null===t?delete e[i]:e[i]=t})._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Eo(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,""))}function So(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=ku(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Iu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function l(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=wo(t,e,n),r.return=t,r):((r=Pu(n.type,n.key,n.props,null,t.mode,r)).ref=wo(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=zu(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function p(t,e,n,r,o){return null===e||7!==e.tag?((e=Cu(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function h(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Iu(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case tt:return(n=Pu(e.type,e.key,e.props,null,t.mode,n)).ref=wo(t,null,e),n.return=t,n;case et:return(e=zu(e,t.mode,n)).return=t,e}if(bo(e)||mt(e))return(e=Cu(e,t.mode,n,null)).return=t,e;Eo(t,e)}return null}function f(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case tt:return n.key===i?n.type===nt?p(t,e,n.props.children,r,i):l(t,e,n,r):null;case et:return n.key===i?c(t,e,n,r):null}if(bo(n)||mt(n))return null!==i?null:p(t,e,n,r,null);Eo(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case tt:return t=t.get(null===r.key?n:r.key)||null,r.type===nt?p(e,t,r.props.children,i,r.key):l(e,t,r,i
vendor: 33,588 bytes, line 2
2);case et:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||mt(r))return p(e,t=t.get(n)||null,r,i,null);Eo(e,r)}return null}function m(i,a,s,u){for(var l=null,c=null,p=a,m=a=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var v=f(i,p,s[m],u);if(null===v){null===p&&(p=y);break}t&&p&&null===v.alternate&&e(i,p),a=o(v,a,m),null===c?l=v:c.sibling=v,c=v,p=y}if(m===s.length)return n(i,p),l;if(null===p){for(;m<s.length;m++)null!==(p=h(i,s[m],u))&&(a=o(p,a,m),null===c?l=p:c.sibling=p,c=p);return l}for(p=r(i,p);m<s.length;m++)null!==(y=d(p,i,m,s[m],u))&&(t&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===c?l=y:c.sibling=y,c=y);return t&&p.forEach((function(t){return e(i,t)})),l}function y(i,s,u,l){var c=mt(u);if("function"!==typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var p=c=null,m=s,y=s=0,v=null,g=u.next();null!==m&&!g.done;y++,g=u.next()){m.index>y?(v=m,m=null):v=m.sibling;var _=f(i,m,g.value,l);if(null===_){null===m&&(m=v);break}t&&m&&null===_.alternate&&e(i,m),s=o(_,s,y),null===p?c=_:p.sibling=_,p=_,m=v}if(g.done)return n(i,m),c;if(null===m){for(;!g.done;y++,g=u.next())null!==(g=h(i,g.value,l))&&(s=o(g,s,y),null===p?c=g:p.sibling=g,p=g);return c}for(m=r(i,m);!g.done;y++,g=u.next())null!==(g=d(m,i,y,g.value,l))&&(t&&null!==g.alternate&&m.delete(null===g.key?y:g.key),s=o(g,s,y),null===p?c=g:p.sibling=g,p=g);return t&&m.forEach((function(t){return e(i,t)})),c}return function(t,r,o,u){var l="object"===typeof o&&null!==o&&o.type===nt&&null===o.key;l&&(o=o.props.children);var c="object"===typeof o&&null!==o;if(c)switch(o.$$typeof){case tt:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){switch(l.tag){case 7:if(o.type===nt){n(t,l.sibling),(r=i(l,o.props.children)).return=t,t=r;break t}break;default:if(l.elementType===o.type){n(t,l.sibling),(r=i(l,o.props)).ref=wo(t,l,o),r.return=t,t=r;break t}}n(t,l);break}e(t,l),l=l.sibling}o.type===nt?((r=Cu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Pu(o.type,o.key,o.props,null,t.mode,u)).ref=wo(t,r,o),u.return=t,t=u)}return s(t);case et:t:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=zu(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Iu(o,t.mode,u)).return=t,t=r),s(t);if(bo(o))return m(t,r,o,u);if(mt(o))return y(t,r,o,u);if(c&&Eo(t,o),"undefined"===typeof o&&!l)switch(t.tag){case 1:case 0:throw t=t.type,Error(a(152,t.displayName||t.name||"Component"))}return n(t,r)}}var To=So(!0),ko=So(!1),Po={},Co={current:Po},Io={current:Po},zo={current:Po};function Ao(t){if(t===Po)throw Error(a(174));return t}function Mo(t,e){switch(li(zo,e),li(Io,t),li(Co,Po),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Bt(null,"");break;default:e=Bt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}ui(Co),li(Co,e)}function Oo(){ui(Co),ui(Io),ui(zo)}function Do(t){Ao(zo.current);var e=Ao(Co.current),n=Bt(e,t.type);e!==n&&(li(Io,t),li(Co,n))}function Lo(t){Io.current===t&&(ui(Co),ui(Io))}var Ro={current:0};function Bo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Fo(t,e){return{responder:t,props:e}}var jo=Y.ReactCurrentDispatcher,No=Y.ReactCurrentBatchConfig,Uo=0,Vo=null,qo=null,Zo=null,Wo=!1;function Go(){throw Error(a(321))}function Xo(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Br(t[n],e[n]))return!1;return!0}function Ho(t,e,n,r,i,o){if(Uo=o,Vo=e,e.memoizedState=null,e.updateQueue=null,e.expirationTime=0,jo.current=null===t||null===t.memoizedState?va:ga,t=n(r,i),e.expirationTime===Uo){o=0;do{if(e.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Zo=qo=null,e.updateQueue=null,jo.current=_a,t=n(r,i)}while(e.expirationTime===Uo)}if(jo.current=ya,e=null!==qo&&null!==qo.next,Uo=0,Zo=qo=Vo=null,Wo=!1,e)throw Error(a(300));return t}function Ko(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?Vo.memoizedState=Zo=t:Zo=Zo.next=t,Zo}function Yo(){if(null===qo){var t=Vo.alternate;t=null!==t?t.memoizedState:null}else t=qo.next;var e=null===Zo?Vo.memoizedState:Zo.next;if(null!==e)Zo=e,qo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(qo=t).memoizedState,baseState:qo.baseState,baseQueue:qo.baseQueue,queue:qo.queue,next:null},null===Zo?Vo.memoizedState=Zo=t:Zo=Zo.next=t}return Zo}function Jo(t,e){return"function"===typeof e?e(t):e}function $o(t){var e=Yo(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=qo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,l=i;do{var c=l.expirationTime;if(c<Uo){var p={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=p,o=r):u=u.next=p,c>Vo.expirationTime&&(Vo.expirationTime=c,au(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),ou(c,l.suspenseConfig),r=l.eagerReducer===t?l.eagerState:t(r,l.action);l=l.next}while(null!==l&&l!==i);null===u?o=r:u.next=s,Br(r,e.memoizedState)||(za=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function Qo(t){var e=Yo(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);Br(o,e.memoizedState)||(za=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function ta(t){var e=Ko();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t}).dispatch=ma.bind(null,Vo,t),[e.memoizedState,t]}function ea(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Vo.updateQueue)?(e={lastEffect:null},Vo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function na(){return Yo().memoizedState}function ra(t,e,n,r){var i=Ko();Vo.effectTag|=t,i.memoizedState=ea(1|e,n,void 0,void 0===r?null:r)}function ia(t,e,n,r){var i=Yo();r=void 0===r?null:r;var o=void 0;if(null!==qo){var a=qo.memoizedState;if(o=a.destroy,null!==r&&Xo(r,a.deps))return void ea(e,n,o,r)}Vo.effectTag|=t,i.memoizedState=ea(1|e,n,o,r)}function oa(t,e){return ra(516,4,t,e)}function aa(t,e){return ia(516,4,t,e)}function sa(t,e){return ia(4,2,t,e)}function ua(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function la(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ia(4,2,ua.bind(null,e,t),n)}function ca(){}function pa(t,e){return Ko().memoizedState=[t,void 0===e?null:e],t}function ha(t,e){var n=Yo();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Xo(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function fa(t,e){var n=Yo();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Xo(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function da(t,e,n){var r=Ni();Vi(98>r?98:r,(function(){t(!0)})),Vi(97<r?97:r,(function(){var r=No.suspense;No.suspense=void 0===e?null:e;try{t(!1),n()}finally{No.suspense=r}}))}function ma(t,e,n){var r=Gs(),i=ho.suspense;i={expirationTime:r=Xs(r,t,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=e.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),e.pending=i,o=t.alternate,t===Vo||null!==o&&o===Vo)Wo=!0,i.expirationTime=Uo,Vo.expirationTime=Uo;else{if(0===t.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Br(s,a))return}catch(u){}Hs(t,r)}}var ya={readContext:ro,useCallback:Go,useContext:Go,useEffect:Go,useImperativeHandle:Go,useLayoutEffect:Go,useMemo:Go,useReducer:Go,useRef:Go,useState:Go,useDebugValue:Go,useResponder:Go,useDeferredValue:Go,useTransition:Go},va={readContext:ro,useCallback:pa,useContext:ro,useEffect:oa,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ra(4,2,ua.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ra(4,2,t,e)},useMemo:function(t,e){var n=Ko();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ko();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=ma.bind(null,Vo,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Ko().memoizedState=t},useState:ta,useDebugValue:ca,useResponder:Fo,useDeferredValue:function(t,e){var n=ta(t),r=n[0],i=n[1];return oa((function(){var n=No.suspense;No.suspense=void 0===e?null:e;try{i(t)}finally{No.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ta(!1),n=e[0];return e=e[1],[pa(da.bind(null,e,t),[e,t]),n]}},ga={readContext:ro,useCallback:ha,useContext:ro,useEffect:aa,useImperativeHandle:la,useLayoutEffect:sa,useMemo:fa,useReducer:$o,useRef:na,useState:function(){return $o(Jo)},useDebugValue:ca,useResponder:Fo,useDeferredValue:function(t,e){var n=$o(Jo),r=n[0],i=n[1];return aa((function(){var n=No.suspense;No.suspense=void 0===e?null:e;try{i(t)}finally{No.suspense=n}}),[t,e]),r},useTransition:function(t){var e=$o(Jo),n=e[0];return e=e[1],[ha(da.bind(null,e,t),[e,t]),n]}},_a={readContext:ro,useCallback:ha,useContext:ro,useEffect:aa,useImperativeHandle:la,useLayoutEffect:sa,useMemo:fa,useReducer:Qo,useRef:na,useState:function(){return Qo(Jo)},useDebugValue:ca,useResponder:Fo,useDeferredValue:function(t,e){var n=Qo(Jo),r=n[0],i=n[1];return aa((function(){var n=No.suspense;No.suspense=void 0===e?null:e;try{i(t)}finally{No.suspense=n}}),[t,e]),r},useTransition:function(t){var e=Qo(Jo),n=e[0];return e=e[1],[ha(da.bind(null,e,t),[e,t]),n]}},xa=null,ba=null,wa=!1;function Ea(t,e){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Sa(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function Ta(t){if(wa){var e=ba;if(e){var n=e;if(!Sa(t,e)){if(!(e=bn(n.nextSibling))||!Sa(t,e))return t.effectTag=-1025&t.effectTag|2,wa=!1,void(xa=t);Ea(xa,n)}xa=t,ba=bn(e.firstChild)}else t.effectTag=-1025&t.effectTag|2,wa=!1,xa=t}}function ka(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;xa=t}function Pa(t){if(t!==xa)return!1;if(!wa)return ka(t),wa=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!gn(e,t.memoizedProps))for(e=ba;e;)Ea(t,e),e=bn(e.nextSibling);if(ka(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){ba=bn(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}ba=null}}else ba=xa?bn(t.stateNode.nextSibling):null;return!0}function Ca(){ba=xa=null,wa=!1}var Ia=Y.ReactCurrentOwner,za=!1;function Aa(t,e,n,r){e.child=null===t?ko(e,null,n,r):To(e,t.child,n,r)}function Ma(t,e,n,r,i){n=n.render;var o=e.ref;return no(e,i),r=Ho(t,e,n,r,o,i),null===t||za?(e.effectTag|=1,Aa(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Ha(t,e,i))}function Oa(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||Tu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Pu(n.type,null,r,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Da(t,e,a,r,i,o))}return a=t.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:jr)(i,r)&&t.ref===e.ref)?Ha(t,e,o):(e.effectTag|=1,(t=ku(a,r)).ref=e.ref,t.return=e,e.child=t)}function Da(t,e,n,r,i,o){return null!==t&&jr(t.memoizedProps,r)&&t.ref===e.ref&&(za=!1,i<o)?(e.expirationTime=t.expirationTime,Ha(t,e,o)):Ra(t,e,n,r,o)}function La(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Ra(t,e,n,r,i){var o=mi(n)?fi:pi.current;return o=di(e,o),no(e,i),n=Ho(t,e,n,r,o,i),null===t||za?(e.effectTag|=1,Aa(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Ha(t,e,i))}function Ba(t,e,n,r,i){if(mi(n)){var o=!0;_i(e)}else o=!1;if(no(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),go(e,n,r),xo(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"===typeof l&&null!==l?l=ro(l):l=di(e,l=mi(n)?fi:pi.current);var c=n.getDerivedStateFromProps,p="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;p||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==l)&&_o(e,a,r,l),io=!1;var h=e.memoizedState;a.state=h,co(e,r,a,i),u=e.memoizedState,s!==r||h!==u||hi.current||io?("function"===typeof c&&(mo(e,n,c,r),u=e.memoizedState),(s=io||vo(e,n,s,r,h,u,l))?(p||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.effectTag|=4)):("function"===typeof a.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"===typeof a.componentDidMount&&(e.effectTag|=4),r=!1)}else a=e.stateNode,ao(t,e),s=e.memoizedProps,a.props=e.type===e.elementType?s:Hi(e.type,s),u=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=ro(l):l=di(e,l=mi(n)?fi:pi.current),(p="function"===typeof(c=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==l)&&_o(e,a,r,l),io=!1,u=e.memoizedState,a.state=u,co(e,r,a,i),h=e.memoizedState,s!==r||u!==h||hi.current||io?("function"===typeof c&&(mo(e,n,c,r),h=e.memoizedState),(c=io||vo(e,n,s,r,u,h,l))?(p||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(e.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),r=!1);return Fa(t,e,n,r,o,i)}function Fa(t,e,n,r,i,o){La(t,e);var a=0!==(64&e.effectTag);if(!r&&!a)return i&&xi(e,n,!1),Ha(t,e,o);r=e.stateNode,Ia.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.effectTag|=1,null!==t&&a?(e.child=To(e,t.child,null,o),e.child=To(e,null,s,o)):Aa(t,e,s,o),e.memoizedState=r.state,i&&xi(e,n,!0),e.child}function ja(t){var e=t.stateNode;e.pendingContext?vi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&vi(0,e.context,!1),Mo(t,e.containerInfo)}var Na,Ua,Va,qa={dehydrated:null,retryTime:0};function Za(t,e,n){var r,i=e.mode,o=e.pendingProps,a=Ro.current,s=!1;if((r=0!==(64&e.effectTag))||(r=0!==(2&a)&&(null===t||null!==t.memoizedState)),r?(s=!0,e.effectTag&=-65):null!==t&&null===t.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),li(Ro,1&a),null===t){if(void 0!==o.fallback&&Ta(e),s){if(s=o.fallback,(o=Cu(null,i,0,null)).return=e,0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=Cu(s,i,n,null)).return=e,o.sibling=n,e.memoizedState=qa,e.child=o,n}return i=o.children,e.memoizedState=null,e.child=ko(e,null,i,n)}if(null!==t.memoizedState){if(i=(t=t.child).sibling,s){if(o=o.fallback,(n=ku(t,t.pendingProps)).return=e,0===(2&e.mode)&&(s=null!==e.memoizedState?e.child.child:e.child)!==t.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=ku(i,o)).return=e,n.sibling=i,n.childExpirationTime=0,e.memoizedState=qa,e.child=n,i}return n=To(e,t.child,o.children,n),e.memoizedState=null,e.child=n}if(t=t.child,s){if(s=o.fallback,(o=Cu(null,i,0,null)).return=e,o.child=t,null!==t&&(t.return=o),0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=Cu(s,i,n,null)).return=e,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,e.memoizedState=qa,e.child=o,n}return e.memoizedState=null,e.child=To(e,t,o.children,n)}function Wa(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e),eo(t.return,e)}function Ga(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Xa(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Aa(t,e,r.children,n),0!==(2&(r=Ro.current)))r=1&r|2,e.effectTag|=64;else{if(null!==t&&0!==(64&t.effectTag))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Wa(t,n);else if(19===t.tag)Wa(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(li(Ro,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Bo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Ga(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Bo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Ga(e,!0,n,null,o,e.lastEffect);break;case"together":Ga(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Ha(t,e,n){null!==t&&(e.dependencies=t.dependencies);var r=e.expirationTime;if(0!==r&&au(r),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=ku(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=ku(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Ka(t,e){switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ya(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return mi(e.type)&&yi(),null;case 3:return Oo(),ui(hi),ui(pi),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||!Pa(e)||(e.effectTag|=4),null;case 5:Lo(e),n=Ao(zo.current);var o=e.type;if(null!==t&&null!=e.stateNode)Ua(t,e,o,r,n),t.ref!==e.ref&&(e.effectTag|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Ao(Co.current),Pa(e)){r=e.stateNode,o=e.type;var s=e.memoizedProps;switch(r[Sn]=e,r[Tn]=s,o){case"iframe":case"object":case"embed":Xe("load",r);break;case"video":case"audio":for(t=0;t<Yt.length;t++)Xe(Yt[t],r);break;case"source":Xe("error",r);break;case"img":case"image":case"link":Xe("error",r),Xe("load",r);break;case"form":Xe("reset",r),Xe("submit",r);break;case"details":Xe("toggle",r);break;case"input":Et(r,s),Xe("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Xe("invalid",r),un(n,"onChange");break;case"textarea":At(r,s),Xe("invalid",r),un(n,"onChange")}for(var u in on(o,s),t=null,s)if(s.hasOwnProperty(u)){var l=s[u];"children"===u?"string"===typeof l?r.textContent!==l&&(t=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(t=["children",""+l]):S.hasOwnProperty(u)&&null!=l&&un(n,u)}switch(o){case"input":xt(r),kt(r,s,!0);break;case"textarea":xt(r),Ot(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=ln)}n=t,e.updateQueue=n,null!==n&&(e.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,t===sn&&(t=Rt(o)),t===sn?"script"===o?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=u.createElement(o,{is:r.is}):(t=u.createElement(o),"select"===o&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,o),t[Sn]=e,t[Tn]=r,Na(t,e),e.stateNode=t,u=an(o,r),o){case"iframe":case"object":case"embed":Xe("load",t),l=r;break;case"video":case"audio":for(l=0;l<Yt.length;l++)Xe(Yt[l],t);l=r;break;case"source":Xe("error",t),l=r;break;case"img":case"image":case"link":Xe("error",t),Xe("load",t),l=r;break;case"form":Xe("reset",t),Xe("submit",t),l=r;break;case"details":Xe("toggle",t),l=r;break;case"input":Et(t,r),l=wt(t,r),Xe("invalid",t),un(n,"onChange");break;case"option":l=Ct(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},l=i({},r,{value:void 0}),Xe("invalid",t),un(n,"onChange");break;case"textarea":At(t,r),l=zt(t,r),Xe("invalid",t),un(n,"onChange");break;default:l=r}on(o,l);var c=l;for(s in c)if(c.hasOwnProperty(s)){var p=c[s];"style"===s?nn(t,p):"dangerouslySetInnerHTML"===s?null!=(p=p?p.__html:void 0)&&jt(t,p):"children"===s?"string"===typeof p?("textarea"!==o||""!==p)&&Nt(t,p):"number"===typeof p&&Nt(t,""+p):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=p&&un(n,s):null!=p&&J(t,s,p,u))}switch(o){case"input":xt(t),kt(t,r,!1);break;case"textarea":xt(t),Ot(t);break;case"option":null!=r.value&&t.setAttribute("value",""+gt(r.value));break;case"select":t.multiple=!!r.multiple,null!=(n=r.value)?It(t,!!r.multiple,n,!1):null!=r.defaultValue&&It(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof l.onClick&&(t.onclick=ln)}vn(o,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Va(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=Ao(zo.current),Ao(Co.current),Pa(e)?(n=e.stateNode,r=e.memoizedProps,n[Sn]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=e,e.stateNode=n)}return null;case 13:return ui(Ro),r=e.memoizedState,0!==(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&Pa(e):(r=null!==(o=t.memoizedState),n||null===o||null!==(o=t.child.sibling)&&(null!==(s=e.firstEffect)?(e.firstEffect=o,o.nextEffect=s):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Ro.current)?Ps===xs&&(Ps=bs):(Ps!==xs&&Ps!==bs||(Ps=ws),0!==Ms&&null!==Ss&&(Ou(Ss,ks),Du(Ss,Ms)))),(n||r)&&(e.effectTag|=4),null);case 4:return Oo(),null;case 10:return to(e),null;case 17:return mi(e.type)&&yi(),null;case 19:if(ui(Ro),null===(r=e.memoizedState))return null;if(o=0!==(64&e.effectTag),null===(s=r.rendering)){if(o)Ka(r,!1);else if(Ps!==xs||null!==t&&0!==(64&t.effectTag))for(s=e.child;null!==s;){if(null!==(t=Bo(s))){for(e.effectTag|=64,Ka(r,!1),null!==(o=t.updateQueue)&&(e.updateQueue=o,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(t=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=t.childExpirationTime,o.expirationTime=t.expirationTime,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,s=t.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return li(Ro,1&Ro.current|2),e.child}s=s.sibling}}else{if(!o)if(null!==(t=Bo(s))){if(e.effectTag|=64,o=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),Ka(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*ji()-r.renderingStartTime>r.tailExpiration&&1<n&&(e.effectTag|=64,o=!0,Ka(r,!1),e.expirationTime=e.childExpirationTime=n-1);r.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=r.last)?n.sibling=s:e.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=ji()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=ji(),n.sibling=null,e=Ro.current,li(Ro,o?1&e|2:1&e),n):null}throw Error(a(156,e.tag))}function Ja(t){switch(t.tag){case 1:mi(t.type)&&yi();var e=t.effectTag;return 4096&e?(t.effectTag=-4097&e|64,t):null;case 3:if(Oo(),ui(hi),ui(pi),0!==(64&(e=t.effectTag)))throw Error(a(285));return t.effectTag=-4097&e|64,t;case 5:return Lo(t),null;case 13:return ui(Ro),4096&(e=t.effectTag)?(t.effectTag=-4097&e|64,t):null;case 19:return ui(Ro),null;case 4:return Oo(),null;case 10:return to(t),null;default:return null}}function $a(t,e){return{value:t,source:e,stack:vt(e)}}Na=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(t,e,n,r,o){var a=t.memoizedProps;if(a!==r){var s,u,l=e.stateNode;switch(Ao(Co.current),t=null,n){case"input":a=wt(l,a),r=wt(l,r),t=[];break;case"option":a=Ct(l,a),r=Ct(l,r),t=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),t=[];break;case"textarea":a=zt(l,a),r=zt(l,r),t=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(l.onclick=ln)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in l=a[s])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?t||(t=[]):(t=t||[]).push(s,null));for(s in r){var c=r[s];if(l=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&c!==l&&(null!=c||null!=l))if("style"===s)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(t||(t=[]),t.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(t=t||[]).push(s,c)):"children"===s?l===c||"string"!==typeof c&&"number"!==typeof c||(t=t||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=c&&un(o,s),t||l===c||(t=[])):(t=t||[]).push(s,c))}n&&(t=t||[]).push("style",n),o=t,(e.updateQueue=o)&&(e.effectTag|=4)}},Va=function(t,e,n,r){n!==r&&(e.effectTag|=4)};var Qa="function"===typeof WeakSet?WeakSet:Set;function ts(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=vt(n)),null!==n&&yt(n.type),e=e.value,null!==t&&1===t.tag&&yt(t.type);try{console.error(e)}catch(i){setTimeout((function(){throw i}))}}function es(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){gu(t,n)}else e.current=null}function ns(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.effectTag&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Hi(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==e)}}function is(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function os(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:return void is(3,n);case 1:if(t=n.stateNode,4&n.effectTag)if(null===e)t.componentDidMount();else{var r=n.elementType===n.type?e.memoizedProps:Hi(n.type,e.memoizedProps);t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate)}return void(null!==(e=n.updateQueue)&&po(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}po(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.effectTag&&vn(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Re(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(t,e,n){switch("function"===typeof wu&&wu(e),e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var r=t.next;Vi(97<n?97:n,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var i=e;try{n()}catch(o){gu(i,o)}}t=t.next}while(t!==r)}))}break;case 1:es(e),"function"===typeof(n=e.stateNode).componentWillUnmount&&function(t,e){try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(n){gu(t,n)}}(e,n);break;case 5:es(e);break;case 4:cs(t,e,n)}}function ss(t){var e=t.alternate;t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.alternate=null,t.firstEffect=null,t.lastEffect=null,t.pendingProps=null,t.memoizedProps=null,t.stateNode=null,null!==e&&ss(e)}function us(t){return 5===t.tag||3===t.tag||4===t.tag}function ls(t){t:{for(var e=t.return;null!==e;){if(us(e)){var n=e;break t}e=e.return}throw Error(a(160))}switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Nt(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}r?function t(e,n,r){var i=e.tag,o=5===i||6===i;if(o)e=o?e.stateNode:e.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(8===r.nodeType?(n=r.parentNode).insertBefore(e,r):(n=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=ln));else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e):function t(e,n,r){var i=e.tag,o=5===i||6===i;if(o)e=o?e.stateNode:e.stateNode.instance,n?r.insertBefore(e,n):r.appendChild(e);else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e)}function cs(t,e,n){for(var r,i,o=e,s=!1;;){if(!s){s=o.return;t:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break t;case 3:case 4:r=r.containerInfo,i=!0;break t}s=s.return}s=!0}if(5===o.tag||6===o.tag){t:for(var u=t,l=o,c=n,p=l;;)if(as(u,p,c),null!==p.child&&4!==p.tag)p.child.return=p,p=p.child;else{if(p===l)break t;for(;null===p.sibling;){if(null===p.return||p.return===l)break t;p=p.return}p.sibling.return=p.return,p=p.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(as(t,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function ps(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,e);case 1:return;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;
vendor: 4,874 bytes, line 2
2if(e.updateQueue=null,null!==o){for(n[Tn]=r,"input"===t&&"radio"===r.type&&null!=r.name&&St(n,r),an(t,i),e=an(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?nn(n,u):"dangerouslySetInnerHTML"===s?jt(n,u):"children"===s?Nt(n,u):J(n,s,u,e)}switch(t){case"input":Tt(n,r);break;case"textarea":Mt(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(t=r.value)?It(n,!!r.multiple,t,!1):e!==!!r.multiple&&(null!=r.defaultValue?It(n,!!r.multiple,r.defaultValue,!0):It(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((e=e.stateNode).hydrate&&(e.hydrate=!1,Re(e.containerInfo)));case 12:return;case 13:if(n=e,null===e.memoizedState?r=!1:(r=!0,n=e.child,Ds=ji()),null!==n)t:for(t=n;;){if(5===t.tag)o=t.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=t.stateNode,i=void 0!==(i=t.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=en("display",i));else if(6===t.tag)t.stateNode.nodeValue=r?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(o=t.child.sibling).return=t,t=o;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}return void hs(e);case 19:return void hs(e);case 17:return}throw Error(a(163))}function hs(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Qa),e.forEach((function(e){var r=xu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}var fs="function"===typeof WeakMap?WeakMap:Map;function ds(t,e,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Rs||(Rs=!0,Bs=r),ts(t,e)},n}function ms(t,e,n){(n=so(n,null)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return ts(t,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Fs?Fs=new Set([this]):Fs.add(this),ts(t,e));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}var ys,vs=Math.ceil,gs=Y.ReactCurrentDispatcher,_s=Y.ReactCurrentOwner,xs=0,bs=3,ws=4,Es=0,Ss=null,Ts=null,ks=0,Ps=xs,Cs=null,Is=1073741823,zs=1073741823,As=null,Ms=0,Os=!1,Ds=0,Ls=null,Rs=!1,Bs=null,Fs=null,js=!1,Ns=null,Us=90,Vs=null,qs=0,Zs=null,Ws=0;function Gs(){return 0!==(48&Es)?1073741821-(ji()/10|0):0!==Ws?Ws:Ws=1073741821-(ji()/10|0)}function Xs(t,e,n){if(0===(2&(e=e.mode)))return 1073741823;var r=Ni();if(0===(4&e))return 99===r?1073741823:1073741822;if(0!==(16&Es))return ks;if(null!==n)t=Xi(t,0|n.timeoutMs||5e3,250);else switch(r){case 99:t=1073741823;break;case 98:t=Xi(t,150,100);break;case 97:case 96:t=Xi(t,5e3,250);break;case 95:t=2;break;default:throw Error(a(326))}return null!==Ss&&t===ks&&--t,t}function Hs(t,e){if(50<qs)throw qs=0,Zs=null,Error(a(185));if(null!==(t=Ks(t,e))){var n=Ni();1073741823===e?0!==(8&Es)&&0===(48&Es)?Qs(t):(Js(t),0===Es&&Wi()):Js(t),0===(4&Es)||98!==n&&99!==n||(null===Vs?Vs=new Map([[t,e]]):(void 0===(n=Vs.get(t))||n>e)&&Vs.set(t,e))}}function Ks(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var r=t.return,i=null;if(null===r&&3===t.tag)i=t.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<e&&(r.childExpirationTime=e),null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Ss===i&&(au(e),Ps===ws&&Ou(i,ks)),Du(i,e)),i}function Ys(t){var e=t.lastExpiredTime;if(0!==e)return e;if(!Mu(t,e=t.firstPendingTime))return e;var n=t.lastPingedTime;return 2>=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function Js(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=Zi(Qs.bind(null,t));else{var e=Ys(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=Gs();if(1073741823===e?r=99:1===e||2===e?r=95:r=0>=(r=10*(1073741821-e)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=t.callbackPriority;if(t.callbackExpirationTime===e&&i>=r)return;n!==Mi&&Ei(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?Zi(Qs.bind(null,t)):qi(r,$s.bind(null,t),{timeout:10*(1073741821-e)-ji()}),t.callbackNode=e}}}function $s(t,e){if(Ws=0,e)return Lu(t,e=Gs()),Js(t),null;var n=Ys(t);if(0!==n){if(e=t.callbackNode,0!==(48&Es))throw Error(a(327));if(mu(),t===Ss&&n===ks||nu(t,n),null!==Ts){var r=Es;Es|=16;for(var i=iu();;)try{uu();break}catch(u){ru(t,u)}
vendor: 20,342 bytes, line 2
2if(Qi(),Es=r,gs.current=i,1===Ps)throw e=Cs,nu(t,n),Ou(t,n),Js(t),e;if(null===Ts)switch(i=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=Ps,Ss=null,r){case xs:case 1:throw Error(a(345));case 2:Lu(t,2<n?2:n);break;case bs:if(Ou(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=pu(i)),1073741823===Is&&10<(i=Ds+500-ji())){if(Os){var o=t.lastPingedTime;if(0===o||o>=n){t.lastPingedTime=n,nu(t,n);break}}if(0!==(o=Ys(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=_n(hu.bind(null,t),i);break}hu(t);break;case ws:if(Ou(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=pu(i)),Os&&(0===(i=t.lastPingedTime)||i>=n)){t.lastPingedTime=n,nu(t,n);break}if(0!==(i=Ys(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==zs?r=10*(1073741821-zs)-ji():1073741823===Is?r=0:(r=10*(1073741821-Is)-5e3,0>(r=(i=ji())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vs(r/1960))-r)&&(r=n)),10<r){t.timeoutHandle=_n(hu.bind(null,t),r);break}hu(t);break;case 5:if(1073741823!==Is&&null!==As){o=Is;var s=As;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=ji()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Ou(t,n),t.timeoutHandle=_n(hu.bind(null,t),r);break}}hu(t);break;default:throw Error(a(329))}if(Js(t),t.callbackNode===e)return $s.bind(null,t)}}return null}function Qs(t){var e=t.lastExpiredTime;if(e=0!==e?e:1073741823,0!==(48&Es))throw Error(a(327));if(mu(),t===Ss&&e===ks||nu(t,e),null!==Ts){var n=Es;Es|=16;for(var r=iu();;)try{su();break}catch(i){ru(t,i)}if(Qi(),Es=n,gs.current=r,1===Ps)throw n=Cs,nu(t,e),Ou(t,e),Js(t),n;if(null!==Ts)throw Error(a(261));t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,Ss=null,hu(t),Js(t)}return null}function tu(t,e){var n=Es;Es|=1;try{return t(e)}finally{0===(Es=n)&&Wi()}}function eu(t,e){var n=Es;Es&=-2,Es|=8;try{return t(e)}finally{0===(Es=n)&&Wi()}}function nu(t,e){t.finishedWork=null,t.finishedExpirationTime=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,xn(n)),null!==Ts)for(n=Ts.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&yi();break;case 3:Oo(),ui(hi),ui(pi);break;case 5:Lo(r);break;case 4:Oo();break;case 13:case 19:ui(Ro);break;case 10:to(r)}n=n.return}Ss=t,Ts=ku(t.current,null),ks=e,Ps=xs,Cs=null,zs=Is=1073741823,As=null,Ms=0,Os=!1}function ru(t,e){for(;;){try{if(Qi(),jo.current=ya,Wo)for(var n=Vo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Uo=0,Zo=qo=Vo=null,Wo=!1,null===Ts||null===Ts.return)return Ps=1,Cs=e,Ts=null;t:{var i=t,o=Ts.return,a=Ts,s=e;if(e=ks,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var u=s;if(0===(2&a.mode)){var l=a.alternate;l?(a.updateQueue=l.updateQueue,a.memoizedState=l.memoizedState,a.expirationTime=l.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var c=0!==(1&Ro.current),p=o;do{var h;if(h=13===p.tag){var f=p.memoizedState;if(null!==f)h=null!==f.dehydrated;else{var d=p.memoizedProps;h=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!c)}}if(h){var m=p.updateQueue;if(null===m){var y=new Set;y.add(u),p.updateQueue=y}else m.add(u);if(0===(2&p.mode)){if(p.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=so(1073741823,null);v.tag=2,uo(a,v)}a.expirationTime=1073741823;break t}s=void 0,a=e;var g=i.pingCache;if(null===g?(g=i.pingCache=new fs,s=new Set,g.set(u,s)):void 0===(s=g.get(u))&&(s=new Set,g.set(u,s)),!s.has(a)){s.add(a);var _=_u.bind(null,i,u,a);u.then(_,_)}p.effectTag|=4096,p.expirationTime=e;break t}p=p.return}while(null!==p);s=Error((yt(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+vt(a))}5!==Ps&&(Ps=2),s=$a(s,a),p=o;do{switch(p.tag){case 3:u=s,p.effectTag|=4096,p.expirationTime=e,lo(p,ds(p,u,e));break t;case 1:u=s;var x=p.type,b=p.stateNode;if(0===(64&p.effectTag)&&("function"===typeof x.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Fs||!Fs.has(b)))){p.effectTag|=4096,p.expirationTime=e,lo(p,ms(p,u,e));break t}}p=p.return}while(null!==p)}Ts=cu(Ts)}catch(w){e=w;continue}break}}function iu(){var t=gs.current;return gs.current=ya,null===t?ya:t}function ou(t,e){t<Is&&2<t&&(Is=t),null!==e&&t<zs&&2<t&&(zs=t,As=e)}function au(t){t>Ms&&(Ms=t)}function su(){for(;null!==Ts;)Ts=lu(Ts)}function uu(){for(;null!==Ts&&!Oi();)Ts=lu(Ts)}function lu(t){var e=ys(t.alternate,t,ks);return t.memoizedProps=t.pendingProps,null===e&&(e=cu(t)),_s.current=null,e}function cu(t){Ts=t;do{var e=Ts.alternate;if(t=Ts.return,0===(2048&Ts.effectTag)){if(e=Ya(e,Ts,ks),1===ks||1!==Ts.childExpirationTime){for(var n=0,r=Ts.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Ts.childExpirationTime=n}if(null!==e)return e;null!==t&&0===(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=Ts.firstEffect),null!==Ts.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=Ts.firstEffect),t.lastEffect=Ts.lastEffect),1<Ts.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=Ts:t.firstEffect=Ts,t.lastEffect=Ts))}else{if(null!==(e=Ja(Ts)))return e.effectTag&=2047,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=2048)}if(null!==(e=Ts.sibling))return e;Ts=t}while(null!==Ts);return Ps===xs&&(Ps=5),null}function pu(t){var e=t.expirationTime;return e>(t=t.childExpirationTime)?e:t}function hu(t){var e=Ni();return Vi(99,fu.bind(null,t,e)),null}function fu(t,e){do{mu()}while(null!==Ns);if(0!==(48&Es))throw Error(a(327));var n=t.finishedWork,r=t.finishedExpirationTime;if(null===n)return null;if(t.finishedWork=null,t.finishedExpirationTime=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var i=pu(n);if(t.firstPendingTime=i,r<=t.lastSuspendedTime?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:r<=t.firstSuspendedTime&&(t.firstSuspendedTime=r-1),r<=t.lastPingedTime&&(t.lastPingedTime=0),r<=t.lastExpiredTime&&(t.lastExpiredTime=0),t===Ss&&(Ts=Ss=null,ks=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Es;Es|=32,_s.current=null,mn=Ge;var s=fn();if(dn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else t:{var l=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{u.nodeType,p.nodeType}catch(k){u=null;break t}var h=0,f=-1,d=-1,m=0,y=0,v=s,g=null;e:for(;;){for(var _;v!==u||0!==c&&3!==v.nodeType||(f=h+c),v!==p||0!==l&&3!==v.nodeType||(d=h+l),3===v.nodeType&&(h+=v.nodeValue.length),null!==(_=v.firstChild);)g=v,v=_;for(;;){if(v===s)break e;if(g===u&&++m===c&&(f=h),g===p&&++y===l&&(d=h),null!==(_=v.nextSibling))break;g=(v=g).parentNode}v=_}u=-1===f||-1===d?null:{start:f,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;yn={activeElementDetached:null,focusedElem:s,selectionRange:u},Ge=!1,Ls=i;do{try{du()}catch(k){if(null===Ls)throw Error(a(330));gu(Ls,k),Ls=Ls.nextEffect}}while(null!==Ls);Ls=i;do{try{for(s=t,u=e;null!==Ls;){var x=Ls.effectTag;if(16&x&&Nt(Ls.stateNode,""),128&x){var b=Ls.alternate;if(null!==b){var w=b.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&x){case 2:ls(Ls),Ls.effectTag&=-3;break;case 6:ls(Ls),Ls.effectTag&=-3,ps(Ls.alternate,Ls);break;case 1024:Ls.effectTag&=-1025;break;case 1028:Ls.effectTag&=-1025,ps(Ls.alternate,Ls);break;case 4:ps(Ls.alternate,Ls);break;case 8:cs(s,c=Ls,u),ss(c)}Ls=Ls.nextEffect}}catch(k){if(null===Ls)throw Error(a(330));gu(Ls,k),Ls=Ls.nextEffect}}while(null!==Ls);if(w=yn,b=fn(),x=w.focusedElem,u=w.selectionRange,b!==x&&x&&x.ownerDocument&&function t(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}(x.ownerDocument.documentElement,x)){null!==u&&dn(x)&&(b=u.start,void 0===(w=u.end)&&(w=b),"selectionStart"in x?(x.selectionStart=b,x.selectionEnd=Math.min(w,x.value.length)):(w=(b=x.ownerDocument||document)&&b.defaultView||window).getSelection&&(w=w.getSelection(),c=x.textContent.length,s=Math.min(u.start,c),u=void 0===u.end?s:Math.min(u.end,c),!w.extend&&s>u&&(c=u,u=s,s=c),c=hn(x,s),p=hn(x,u),c&&p&&(1!==w.rangeCount||w.anchorNode!==c.node||w.anchorOffset!==c.offset||w.focusNode!==p.node||w.focusOffset!==p.offset)&&((b=b.createRange()).setStart(c.node,c.offset),w.removeAllRanges(),s>u?(w.addRange(b),w.extend(p.node,p.offset)):(b.setEnd(p.node,p.offset),w.addRange(b))))),b=[];for(w=x;w=w.parentNode;)1===w.nodeType&&b.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof x.focus&&x.focus(),x=0;x<b.length;x++)(w=b[x]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Ge=!!mn,yn=mn=null,t.current=n,Ls=i;do{try{for(x=t;null!==Ls;){var E=Ls.effectTag;if(36&E&&os(x,Ls.alternate,Ls),128&E){b=void 0;var S=Ls.ref;if(null!==S){var T=Ls.stateNode;switch(Ls.tag){case 5:b=T;break;default:b=T}"function"===typeof S?S(b):S.current=b}}Ls=Ls.nextEffect}}catch(k){if(null===Ls)throw Error(a(330));gu(Ls,k),Ls=Ls.nextEffect}}while(null!==Ls);Ls=null,Di(),Es=o}else t.current=n;if(js)js=!1,Ns=t,Us=e;else for(Ls=i;null!==Ls;)e=Ls.nextEffect,Ls.nextEffect=null,Ls=e;if(0===(e=t.firstPendingTime)&&(Fs=null),1073741823===e?t===Zs?qs++:(qs=0,Zs=t):qs=0,"function"===typeof bu&&bu(n.stateNode,r),Js(t),Rs)throw Rs=!1,t=Bs,Bs=null,t;return 0!==(8&Es)||Wi(),null}function du(){for(;null!==Ls;){var t=Ls.effectTag;0!==(256&t)&&ns(Ls.alternate,Ls),0===(512&t)||js||(js=!0,qi(97,(function(){return mu(),null}))),Ls=Ls.nextEffect}}function mu(){if(90!==Us){var t=97<Us?97:Us;return Us=90,Vi(t,yu)}}function yu(){if(null===Ns)return!1;var t=Ns;if(Ns=null,0!==(48&Es))throw Error(a(331));var e=Es;for(Es|=32,t=t.current.firstEffect;null!==t;){try{var n=t;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),is(5,n)}}catch(r){if(null===t)throw Error(a(330));gu(t,r)}n=t.nextEffect,t.nextEffect=null,t=n}return Es=e,Wi(),!0}function vu(t,e,n){uo(t,e=ds(t,e=$a(n,e),1073741823)),null!==(t=Ks(t,1073741823))&&Js(t)}function gu(t,e){if(3===t.tag)vu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){vu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Fs||!Fs.has(r))){uo(n,t=ms(n,t=$a(e,t),1073741823)),null!==(n=Ks(n,1073741823))&&Js(n);break}}n=n.return}}function _u(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),Ss===t&&ks===n?Ps===ws||Ps===bs&&1073741823===Is&&ji()-Ds<500?nu(t,ks):Os=!0:Mu(t,n)&&(0!==(e=t.lastPingedTime)&&e<n||(t.lastPingedTime=n,Js(t)))}function xu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(e=Xs(e=Gs(),t,null)),null!==(t=Ks(t,e))&&Js(t)}ys=function(t,e,n){var r=e.expirationTime;if(null!==t){var i=e.pendingProps;if(t.memoizedProps!==i||hi.current)za=!0;else{if(r<n){switch(za=!1,e.tag){case 3:ja(e),Ca();break;case 5:if(Do(e),4&e.mode&&1!==n&&i.hidden)return e.expirationTime=e.childExpirationTime=1,null;break;case 1:mi(e.type)&&_i(e);break;case 4:Mo(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value,i=e.type._context,li(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(r=e.child.childExpirationTime)&&r>=n?Za(t,e,n):(li(Ro,1&Ro.current),null!==(e=Ha(t,e,n))?e.sibling:null);li(Ro,1&Ro.current);break;case 19:if(r=e.childExpirationTime>=n,0!==(64&t.effectTag)){if(r)return Xa(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),li(Ro,Ro.current),!r)return null}return Ha(t,e,n)}za=!1}}else za=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=di(e,pi.current),no(e,n),i=Ho(null,e,r,t,i,n),e.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,mi(r)){var o=!0;_i(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&mo(e,r,s,t),i.updater=yo,e.stateNode=i,i._reactInternalFiber=e,xo(e,r,t,n),e=Fa(null,e,r,!0,o,n)}else e.tag=0,Aa(null,e,i,n),e=e.child;return e;case 16:t:{if(i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,e.type=i,o=e.tag=function(t){if("function"===typeof t)return Tu(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===ut)return 11;if(t===pt)return 14}return 2}(i),t=Hi(i,t),o){case 0:e=Ra(null,e,i,t,n);break t;case 1:e=Ba(null,e,i,t,n);break t;case 11:e=Ma(null,e,i,t,n);break t;case 14:e=Oa(null,e,i,Hi(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,Ra(t,e,r,i=e.elementType===r?i:Hi(r,i),n);case 1:return r=e.type,i=e.pendingProps,Ba(t,e,r,i=e.elementType===r?i:Hi(r,i),n);case 3:if(ja(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,ao(t,e),co(e,r,null,n),(r=e.memoizedState.element)===i)Ca(),e=Ha(t,e,n);else{if((i=e.stateNode.hydrate)&&(ba=bn(e.stateNode.containerInfo.firstChild),xa=e,i=wa=!0),i)for(n=ko(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Aa(t,e,r,n),Ca();e=e.child}return e;case 5:return Do(e),null===t&&Ta(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,gn(r,i)?s=null:null!==o&&gn(r,o)&&(e.effectTag|=16),La(t,e),4&e.mode&&1!==n&&i.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Aa(t,e,s,n),e=e.child),e;case 6:return null===t&&Ta(e),null;case 13:return Za(t,e,n);case 4:return Mo(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=To(e,null,r,n):Aa(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,Ma(t,e,r,i=e.elementType===r?i:Hi(r,i),n);case 7:return Aa(t,e,e.pendingProps,n),e.child;case 8:case 12:return Aa(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(li(Ki,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=Br(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!hi.current){e=Ha(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&o)){1===u.tag&&((c=so(n,null)).tag=2,uo(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),eo(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Aa(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,no(e,n),r=r(i=ro(i,o.unstable_observedBits)),e.effectTag|=1,Aa(t,e,r,n),e.child;case 14:return o=Hi(i=e.type,e.pendingProps),Oa(t,e,i,o=Hi(i.type,o),r,n);case 15:return Da(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Hi(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,mi(r)?(t=!0,_i(e)):t=!1,no(e,n),go(e,r,i),xo(e,r,i,n),Fa(null,e,r,!0,t,n);case 19:return Xa(t,e,n)}throw Error(a(156,e.tag))};var bu=null,wu=null;function Eu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(t,e,n,r){return new Eu(t,e,n,r)}function Tu(t){return!(!(t=t.prototype)||!t.isReactComponent)}function ku(t,e){var n=t.alternate;return null===n?((n=Su(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=t.childExpirationTime,n.expirationTime=t.expirationTime,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{expirationTime:e.expirationTime,firstContext:e.firstContext,responders:e.responders},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Pu(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)Tu(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case nt:return Cu(n.children,i,o,e);case st:s=8,i|=7;break;case rt:s=8,i|=1;break;case it:return(t=Su(12,n,e,8|i)).elementType=it,t.type=it,t.expirationTime=o,t;case lt:return(t=Su(13,n,e,i)).type=lt,t.elementType=lt,t.expirationTime=o,t;case ct:return(t=Su(19,n,e,i)).elementType=ct,t.expirationTime=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case ot:s=10;break t;case at:s=9;break t;case ut:s=11;break t;case pt:s=14;break t;case ht:s=16,r=null;break t;case ft:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=Su(s,n,e,i)).elementType=t,e.type=r,e.expirationTime=o,e}function Cu(t,e,n,r){return(t=Su(7,t,r,e)).expirationTime=n,t}function Iu(t,e,n){return(t=Su(6,t,null,e)).expirationTime=n,t}function zu(t,e,n){return(e=Su(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Au(t,e,n){this.tag=e,this.current=null,this.containerInfo=t,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Mu(t,e){var n=t.firstSuspendedTime;return t=t.lastSuspendedTime,0!==n&&n>=e&&t<=e}function Ou(t,e){var n=t.firstSuspendedTime,r=t.lastSuspendedTime;n<e&&(t.firstSuspendedTime=e),(r>e||0===n)&&(t.lastSuspendedTime=e),e<=t.lastPingedTime&&(t.lastPingedTime=0),e<=t.lastExpiredTime&&(t.lastExpiredTime=0)}function Du(t,e){e>t.firstPendingTime&&(t.firstPendingTime=e);var n=t.firstSuspendedTime;0!==n&&(e>=n?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:e>=t.lastSuspendedTime&&(t.lastSuspendedTime=e+1),e>t.nextKnownPendingLevel&&(t.nextKnownPendingLevel=e))}function Lu(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function Ru(t,e,n,r){var i=e.current,o=Gs(),s=ho.suspense;o=Xs(o,i,s);t:if(n){e:{if(Qt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(mi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(mi(l)){n=gi(n,l,u);break t}}n=u}else n=ci;return null===e.context?e.context=n:e.pendingContext=n,(e=so(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),uo(i,e),Hs(i,o),o}function Bu(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Fu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime<e&&(t.retryTime=e)}function ju(t,e){Fu(t,e),(t=t.alternate)&&Fu(t,e)}function Nu(t,e,n){var r=new Au(t,e,n=null!=n&&!0===n.hydrate),i=Su(3,null,null,2===e?7:1===e?3:0);r.current=i,i.stateNode=r,oo(i),t[kn]=r.current,n&&0!==e&&function(t,e){var n=$t(e);ke.forEach((function(t){de(t,e,n)}
vendor: 4,313 bytes, line 2
2)),Pe.forEach((function(t){de(t,e,n)}))}(0,9===t.nodeType?t:t.ownerDocument),this._internalRoot=r}function Uu(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Vu(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=Bu(a);s.call(t)}}Ru(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new Nu(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=Bu(a);u.call(t)}}eu((function(){Ru(e,a,t,i)}))}return Bu(a)}function qu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:et,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Zu(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uu(e))throw Error(a(200));return qu(t,e,null,n)}Nu.prototype.render=function(t){Ru(t,this._internalRoot,null,null)},Nu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Ru(null,t,null,(function(){e[kn]=null}))},me=function(t){if(13===t.tag){var e=Xi(Gs(),150,100);Hs(t,e),ju(t,e)}},ye=function(t){13===t.tag&&(Hs(t,3),ju(t,3))},ve=function(t){if(13===t.tag){var e=Gs();Hs(t,e=Xs(e,t,null)),ju(t,e)}},C=function(t,e,n){switch(e){case"input":if(Tt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=zn(r);if(!i)throw Error(a(90));bt(r),Tt(r,i)}}}break;case"textarea":Mt(t,n);break;case"select":null!=(e=n.value)&&It(t,!!n.multiple,e,!1)}},D=tu,L=function(t,e,n,r,i){var o=Es;Es|=4;try{return Vi(98,t.bind(null,e,n,r,i))}finally{0===(Es=o)&&Wi()}},R=function(){0===(49&Es)&&(function(){if(null!==Vs){var t=Vs;Vs=null,t.forEach((function(t,e){Lu(e,t),Js(e)})),Wi()}}(),mu())},B=function(t,e){var n=Es;Es|=2;try{return t(e)}finally{0===(Es=n)&&Wi()}};var Wu={Events:[Cn,In,zn,k,E,Bn,function(t){ie(t,Rn)},M,O,Je,se,mu,{current:!1}]};!function(t){var e=t.findFiberByHostInstance;(function(t){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);bu=function(t){try{e.onCommitFiberRoot(n,t,void 0,64===(64&t.current.effectTag))}catch(r){}},wu=function(t){try{e.onCommitFiberUnmount(n,t)}catch(r){}}}catch(r){}})(i({},t,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=ne(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Pn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wu,e.createPortal=Zu,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=ne(e))?null:t.stateNode},e.flushSync=function(t,e){if(0!==(48&Es))throw Error(a(187));var n=Es;Es|=1;try{return Vi(99,t.bind(null,e))}finally{Es=n,Wi()}},e.hydrate=function(t,e,n){if(!Uu(e))throw Error(a(200));return Vu(null,t,e,!0,n)},e.render=function(t,e,n){if(!Uu(e))throw Error(a(200));return Vu(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!Uu(t))throw Error(a(40));return!!t._reactRootContainer&&(eu((function(){Vu(null,null,t,!1,(function(){t._reactRootContainer=null,t[kn]=null}))})),!0)},e.unstable_batchedUpdates=tu,e.unstable_createPortal=function(t,e){return Zu(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Uu(n))throw Error(a(200));if(null==t||void 0===t._reactInternalFiber)throw Error(a(38));return Vu(t,e,n,!1,r)},e.version="16.13.1"},function(t,e,n){"use strict";
vendor: 4,707 bytes, line 2
2t.exports=n(47)},function(t,e,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,l=null,c=function t(){if(null!==u)try{var n=e.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(t,0),r}},p=Date.now();e.unstable_now=function(){return Date.now()-p},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(c,0))},i=function(t,e){l=setTimeout(t,e)},o=function(){clearTimeout(l)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,f=window.Date,d=window.setTimeout,m=window.clearTimeout;if("undefined"!==typeof console){var y=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof h&&"function"===typeof h.now)e.unstable_now=function(){return h.now()};else{var v=f.now();e.unstable_now=function(){return f.now()-v}}var g=!1,_=null,x=-1,b=5,w=0;a=function(){return e.unstable_now()>=w},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):b=0<t?Math.floor(1e3/t):5};var E=new MessageChannel,S=E.port2;E.port1.onmessage=function(){if(null!==_){var t=e.unstable_now();w=t+b;try{_(!0,t)?S.postMessage(null):(g=!1,_=null)}catch(n){throw S.postMessage(null),n}}else g=!1},r=function(t){_=t,g||(g=!0,S.postMessage(null))},i=function(t,n){x=d((function(){t(e.unstable_now())}),n)},o=function(){m(x),x=-1}}function T(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<C(i,e)))break t;t[r]=e,t[n]=i,n=r}}function k(t){return void 0===(t=t[0])?null:t}function P(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>C(a,n))void 0!==u&&0>C(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>C(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function C(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var I=[],z=[],A=1,M=null,O=3,D=!1,L=!1,R=!1;function B(t){for(var e=k(z);null!==e;){if(null===e.callback)P(z);else{if(!(e.startTime<=t))break;P(z),e.sortIndex=e.expirationTime,T(I,e)}e=k(z)}}function F(t){if(R=!1,B(t),!L)if(null!==k(I))L=!0,r(j);else{var e=k(z);null!==e&&i(F,e.startTime-t)}}function j(t,n){L=!1,R&&(R=!1,o()),D=!0;var r=O;try{for(B(n),M=k(I);null!==M&&(!(M.expirationTime>n)||t&&!a());){var s=M.callback;if(null!==s){M.callback=null,O=M.priorityLevel;var u=s(M.expirationTime<=n);n=e.unstable_now(),"function"===typeof u?M.callback=u:M===k(I)&&P(I),B(n)}else P(I);M=k(I)}if(null!==M)var l=!0;else{var c=k(z);null!==c&&i(F,c.startTime-n),l=!1}return l}finally{M=null,O=r,D=!1}}function N(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){L||D||(L=!0,r(j))},e.unstable_getCurrentPriorityLevel=function(){return O},e.unstable_getFirstCallbackNode=function(){return k(I)},e.unstable_next=function(t){switch(O){case 1:case 2:case 3:var e=3;break;default:e=O}var n=O;O=e;try{return t()}finally{O=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=U,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=O;O=t;try{return e()}finally{O=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0<u?s+u:s,a="number"===typeof a.timeout?a.timeout:N(t)}else a=N(t),u=s;return t={id:A++,callback:n,priorityLevel:t,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(t.sortIndex=u,T(z,t),null===k(I)&&t===k(z)&&(R?o():R=!0,i(F,u-s))):(t.sortIndex=a,T(I,t),L||D||(L=!0,r(j))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();B(t);var n=k(I);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<M.expirationTime||a()},e.unstable_wrapCallback=function(t){var e=O;return function(){var n=O;O=e;try{return t.apply(this,arguments)}finally{O=n}}}},,function(t,e,n){"use strict";var r=n(50);function i(){}function o(){}
2o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,_=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case p:case h:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case c:case f:case v:case y:case l:return t;default:return e}}case o:return e}}}function E(t){return w(t)===h}e.AsyncMode=p,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=l,e.Element=i,e.ForwardRef=f,e.Fragment=a,e.Lazy=v,e.Memo=y,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return E(t)||w(t)===p},e.isConcurrentMode=E,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===l},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===f},e.isFragment=function(t){return w(t)===a},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===y},e.isPortal=function(t){return w(t)===o},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===s},e.isSuspense=function(t){return w(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===h||t===u||t===s||t===d||t===m||"object"===typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===l||t.$$typeof===c||t.$$typeof===f||t.$$typeof===_||t.$$typeof===x||t.$$typeof===b||t.$$typeof===g)},e.typeOf=w},function(t,e,n){"use strict";var r=n(7),i=n(27),o=n(54),a=n(33);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=s(n(30));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=n(34),u.CancelToken=n(67),u.isCancel=n(29),u.all=function(t){return Promise.all(t)},u.spread=n(68),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";var r=n(7),i=n(28),o=n(55),a=n(56),s=n(33);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"===typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=u},function(t,e,n){"use strict";var r=n(7);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(7),i=n(57),o=n(29),a=n(30);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(32);t.exports=function(t,e,n){var i=n.config.validateStatus;
vendor: 3,162 bytes, lines 2-3
2n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(7);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(63),i=n(64);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(7),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(7);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(34);function i(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}}]]);
3//# sourceMappingURL=2.43754451.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.