"),n=this.menu.$node||t("
"),i.on("blur.tt",function(t){var r,o,a;r=document.activeElement,o=n.is(r),a=n.has(r).length>0,e.isMsie()&&(o||a)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){i.focus()}))}),n.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,i,n){this._updateHint(),this.eventBus.trigger("render",i,n,e)},_onAsyncRequested:function(t,e,i){this.eventBus.trigger("asyncrequest",i,e)},_onAsyncCanceled:function(t,e,i){this.eventBus.trigger("asynccancel",i,e)},_onAsyncReceived:function(t,e,i){this.eventBus.trigger("asyncreceive",i,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&e.preventDefault()},_onTabKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&e.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=e.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,i,n,r,o,s;t=this.menu.getTopSelectable(),i=this.menu.getSelectableData(t),n=this.input.getInputValue(),!i||e.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(r=a.normalizeQuery(n),o=e.escapeRegExChars(r),(s=new RegExp("^(?:"+o+")(.+$)","i").exec(i.val))&&this.input.setHint(n+s[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,i;return e=this.input.getQuery(),!(!((i=this.menu.getSelectableData(t))&&e!==i.val)||this.eventBus.before("autocomplete",i.obj))&&(this.input.setQuery(i.val),this.eventBus.trigger("autocomplete",i.obj),!0)},moveCursor:function(t){var e,i,n,r;return e=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(t),r=(n=this.menu.getSelectableData(i))?n.obj:null,!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",r)&&(this.menu.setCursor(i),n?this.input.setInputValue(n.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),i;function n(t){var i=[].slice.call(arguments,1);return function(){var n=[].slice.call(arguments);e.each(i,function(e){return t[e].apply(t,n)})}}}();!function(){"use strict";var r,o,s;function h(e,i){e.each(function(){var e,n=t(this);(e=n.data(o.typeahead))&&i(e,n)})}function p(i){var n;return(n=e.isJQuery(i)||e.isElement(i)?t(i).first():[]).length?n:null}r=t.fn.typeahead,o={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},s={initialize:function(r,s){var h;return s=e.isArray(s)?s:[].slice.call(arguments,1),h=i((r=r||{}).classNames),this.each(function(){var i,f,d,m,y,g,v,_,x,b,w;e.each(s,function(t){t.highlight=!!r.highlight}),i=t(this),f=t(h.html.wrapper),d=p(r.hint),m=p(r.menu),y=!1!==r.hint&&!d,g=!1!==r.menu&&!m,y&&(d=function(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css((i=t,{backgroundAttachment:i.css("background-attachment"),backgroundClip:i.css("background-clip"),backgroundColor:i.css("background-color"),backgroundImage:i.css("background-image"),backgroundOrigin:i.css("background-origin"),backgroundPosition:i.css("background-position"),backgroundRepeat:i.css("background-repeat"),backgroundSize:i.css("background-size")})).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1});var i}(i,h)),g&&(m=t(h.html.menu).css(h.css.menu)),d&&d.val(""),i=function(t,e){t.data(o.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}(i,h),(y||g)&&(f.css(h.css.wrapper),i.css(y?h.css.input:h.css.inputWithNoHint),i.wrap(f).parent().prepend(y?d:null).append(g?m:null));w=g?l:u,v=new n({el:i}),_=new a({hint:d,input:i},h),x=new w({node:m,datasets:s},h),b=new c({input:_,menu:x,eventBus:v,minLength:r.minLength},h),i.data(o.www,h),i.data(o.typeahead,b)})},isEnabled:function(){var t;return h(this.first(),function(e){t=e.isEnabled()}),t},enable:function(){return h(this,function(t){t.enable()}),this},disable:function(){return h(this,function(t){t.disable()}),this},isActive:function(){var t;return h(this.first(),function(e){t=e.isActive()}),t},activate:function(){return h(this,function(t){t.activate()}),this},deactivate:function(){return h(this,function(t){t.deactivate()}),this},isOpen:function(){var t;return h(this.first(),function(e){t=e.isOpen()}),t},open:function(){return h(this,function(t){t.open()}),this},close:function(){return h(this,function(t){t.close()}),this},select:function(e){var i=!1,n=t(e);return h(this.first(),function(t){i=t.select(n)}),i},autocomplete:function(e){var i=!1,n=t(e);return h(this.first(),function(t){i=t.autocomplete(n)}),i},moveCursor:function(t){var e=!1;return h(this.first(),function(i){e=i.moveCursor(t)}),e},val:function(t){var e;return arguments.length?(h(this,function(e){e.setVal(t)}),this):(h(this.first(),function(t){e=t.getVal()}),e)},destroy:function(){return h(this,function(t,i){!function(t){var i,n;i=t.data(o.www),n=t.parent().filter(i.selectors.wrapper),e.each(t.data(o.attrs),function(i,n){e.isUndefined(i)?t.removeAttr(n):t.attr(n,i)}),t.removeData(o.typeahead).removeData(o.www).removeData(o.attr).removeClass(i.classes.input),n.length&&(t.detach().insertAfter(n),n.remove())}(i),t.destroy()}),this}},t.fn.typeahead=function(t){return s[t]?s[t].apply(this,[].slice.call(arguments,1)):s.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=r,this}}()}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.mapboxgl=e()}(this,function(){"use strict";var t,e,i;function n(n,r){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(i=r(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=r;else t=r}return n(0,function(t){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}var r=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),o=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,a=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,s={now:r,frame:function(t){return o(t)},cancelFrame:function(t){return a(t)},getImageData:function(t){var e=self.document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(0,0,t.width,t.height)},resolveURL:function(t){var e=self.document.createElement("a");return e.href=t,e.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},supportsWebp:!1};if(self.document){var u=self.document.createElement("img");u.onload=function(){s.supportsWebp=!0},u.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="}var l=c;function c(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}c.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},c.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},c.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},c.prototype.solveCurveX=function(t,e){var i,n,r,o,a;for(void 0===e&&(e=1e-6),r=t,a=0;a<8;a++){if(o=this.sampleCurveX(r)-t,Math.abs(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r},c.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var h=function(t,e,i){this.column=t,this.row=e,this.zoom=i};h.prototype.clone=function(){return new h(this.column,this.row,this.zoom)},h.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},h.prototype.sub=function(t){return this.clone()._sub(t)},h.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},h.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var p=f;function f(t,e){this.x=t,this.y=e}function d(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var i=0;i0;)e[i]=arguments[i+1];for(var n=0,r=e;n(e.y-t.y)*(i.x-t.x)}function I(t){for(var e=0,i=0,n=t.length,r=n-1,o=void 0,a=void 0;i=200&&i.status<300&&i.response?e(null,{data:n,cacheControl:i.getResponseHeader("Cache-Control"),expires:i.getResponseHeader("Expires")}):e(new M(i.statusText,i.status,t.url))},i.send(),i};function D(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function R(t,e,i){if(i&&i[t]){var n=i[t].indexOf(e);-1!==n&&i[t].splice(n,1)}}var B=function(t,e){void 0===e&&(e={}),v(this,e),this.type=t},O=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,"error",v({error:e},i))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(B),F=function(){};F.prototype.on=function(t,e){return this._listeners=this._listeners||{},D(t,e,this._listeners),this},F.prototype.off=function(t,e){return R(t,e,this._listeners),R(t,e,this._oneTimeListeners),this},F.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},D(t,e,this._oneTimeListeners),this},F.prototype.fire=function(t){"string"==typeof t&&(t=new B(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];i0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},F.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var V={$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.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},lineMetrics:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{}},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"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}],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:"string",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Heatmap"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"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"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"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"]},"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"]},"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"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"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"]},"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"]},"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-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},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}},"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"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature"]},"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"]},"property-type":"data-driven"}},"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"}}},N=function(t,e,i,n){this.message=(t?t+": ":"")+i,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function j(t){var e=t.key,i=t.value;return i?[new N(e,i,"constants have been deprecated as of v8")]:[]}function $(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];for(var n=0,r=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var nt=[W,H,X,K,Y,J,et(Q)];function rt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&!rt(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 i=0,n=nt;i255?255:t}function r(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function a(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function s(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in i)return i[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.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===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=r.indexOf("("),l=r.indexOf(")");if(-1!==u&&l+1===r.length){var c=r.substr(0,u),h=r.substr(u+1,l-(u+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=a(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),p];case"hsla":if(4!==h.length)return null;p=a(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=a(h[1]),m=a(h[2]),y=m<=.5?m*(d+1):m+d-m*d,g=2*m-y;return[n(255*s(g,y,f+1/3)),n(255*s(g,y,f)),n(255*s(g,y,f-1/3)),p];default:return null}}return null}}catch(t){}}).parseCSSColor,at=function(t,e,i,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=i,this.a=n};at.parse=function(t){if(t){if(t instanceof at)return t;if("string"==typeof t){var e=ot(t);if(e)return new at(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},at.prototype.toString=function(){var t=this.toArray(),e=t[0],i=t[1],n=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(i)+","+Math.round(n)+","+r+")"},at.prototype.toArray=function(){var t=this.r,e=this.g,i=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*i/n,n]},at.black=new at(0,0,0,1),at.white=new at(1,1,1,1),at.transparent=new at(0,0,0,0);var st=function(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};st.prototype.compare=function(t,e){return this.collator.compare(t,e)},st.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ut=function(t,e,i){this.type=tt,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e};function lt(t,e,i,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ct(t){if(null===t)return W;if("string"==typeof t)return X;if("boolean"==typeof t)return K;if("number"==typeof t)return H;if(t instanceof at)return Y;if(t instanceof st)return tt;if(Array.isArray(t)){for(var e,i=t.length,n=0,r=t;n4)return e.error("Expected 1, 2, or 3 arguments, but found "+(t.length-1)+" instead.");var i,n;if(t.length>2){var r=t[1];if("string"!=typeof r||!(r in mt))return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=mt[r]}else i=Q;if(t.length>3){if("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);n=t[2]}var o=et(i,n),a=e.parse(t[t.length-1],t.length-1,Q);return a?new yt(o,a):null},yt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(rt(this.type,ct(e)))throw new pt("Expected value to be of type "+it(this.type)+", but found "+it(ct(e))+" instead.");return e},yt.prototype.eachChild=function(t){t(this.input)},yt.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},yt.prototype.serialize=function(){var t=["array"],e=this.type.itemType;if("string"===e.kind||"number"===e.kind||"boolean"===e.kind){t.push(e.kind);var i=this.type.N;"number"==typeof i&&t.push(i)}return t.push(this.input.serialize()),t};var gt={"to-number":H,"to-color":Y},vt=function(t,e){this.type=t,this.args=e};vt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var i=t[0],n=gt[i],r=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":lt(e[0],e[1],e[2],e[3])))return new at(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new pt(i||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}for(var a=null,s=0,u=this.args;s=0)return!1;var i=!0;return t.eachChild(function(t){i&&!Tt(t,e)&&(i=!1)}),i}bt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},bt.prototype.eachChild=function(t){this.args.forEach(t)},bt.prototype.possibleOutputs=function(){return[void 0]},bt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},bt.parse=function(t,e){var i=t[0],n=bt.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var r=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=o.filter(function(e){var i=e[0];return!Array.isArray(i)||i.length===t.length-1}),s=[],u=1;ui&&ee))throw new pt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}Et.prototype.parse=function(t,e,i,n,r){return void 0===r&&(r={}),e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)},Et.prototype._parse=function(t,e){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var r=n.parse(t,this);if(!r)return null;if(this.expectedType){var o=this.expectedType,a=r.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind||"value"!==a.kind)if("array"===o.kind&&"value"===a.kind)e.omitTypeAnnotations||(r=new yt(o,r));else if("color"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(this.expectedType,r.type))return null}else e.omitTypeAnnotations||(r=new vt(o,[r]));else e.omitTypeAnnotations||(r=new dt(o,[r]))}if(!(r instanceof ht)&&function t(e){if(e instanceof kt)return t(e.boundExpression);if(e instanceof bt&&"error"===e.name)return!1;if(e instanceof ut)return!1;var i=e instanceof vt||e instanceof dt||e instanceof yt,n=!0;return e.eachChild(function(e){n=i?n&&t(e):n&&e instanceof ht}),!!n&&(wt(e)&&Tt(e,["zoom","heatmap-density","line-progress","is-supported-script"]))}(r)){var s=new xt;try{r=new ht(r.type,r.evaluate(s))}catch(t){return this.error(t.message),null}}return r}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Et.prototype.concat=function(t,e,i){var n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new Et(this.registry,n,e||null,r,this.errors)},Et.prototype.error=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var n=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new Z(n,t))},Et.prototype.checkSubtype=function(t,e){var i=rt(t,e);return i&&this.error(i),i};var zt=function(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,r=i;n=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var h=e.parse(u,c,o);if(!h)return null;o=o||h.type,r.push([s,h])}return new zt(o,i,r)},zt.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;return n>=e[r-1]?i[r-1].evaluate(t):i[At(e,n)].evaluate(t)},zt.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var It=Ct;function Ct(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}function Mt(t,e,i){return t*(1-i)+e*i}Ct.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Ct.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Ct.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Ct.prototype.solveCurveX=function(t,e){var i,n,r,o,a;for(void 0===e&&(e=1e-6),r=t,a=0;a<8;a++){if(o=this.sampleCurveX(r)-t,Math.abs(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r},Ct.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Pt=Object.freeze({number:Mt,color:function(t,e,i){return new at(Mt(t.r,e.r,i),Mt(t.g,e.g,i),Mt(t.b,e.b,i),Mt(t.a,e.a,i))},array:function(t,e,i){return t.map(function(t,n){return Mt(t,e[n],i)})}}),Lt=function(t,e,i,n){this.type=t,this.interpolation=e,this.input=i,this.labels=[],this.outputs=[];for(var r=0,o=n;r1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,H)))return null;var s=[],u=null;e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var l=0;l=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var d=e.parse(h,f,u);if(!d)return null;u=u||d.type,s.push([c,d])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Lt(u,i,n,s):e.error("Type "+it(u)+" is not interpolatable.")},Lt.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);var o=At(e,n),a=e[o],s=e[o+1],u=Lt.interpolationFactor(this.interpolation,n,a,s),l=i[o].evaluate(t),c=i[o+1].evaluate(t);return Pt[this.type.kind.toLowerCase()](l,c,u)},Lt.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e=i.length)throw new pt("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new pt("Array index must be an integer, but found "+e+" instead.");return i[e]},Ot.prototype.eachChild=function(t){t(this.index),t(this.input)},Ot.prototype.possibleOutputs=function(){return[void 0]},Ot.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ft=function(t,e,i,n,r,o){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};Ft.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 i,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return l.error("Numeric branch labels must be integer values.");if(i){if(l.checkSubtype(i,ct(p)))return null}else i=ct(p);if(void 0!==r[String(p)])return l.error("Branch labels must be unique.");r[String(p)]=o.length}var f=e.parse(u,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,Q);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,n);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(i,d.type)?null:new Ft(i,n,d,r,o,m):null},Ft.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ct(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Ft.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ft.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Ft.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();rn.evaluate(t)}function Yt(t,e){var i=e[0],n=e[1];return i.evaluate(t)<=n.evaluate(t)}function Jt(t,e){var i=e[0],n=e[1];return i.evaluate(t)>=n.evaluate(t)}function Qt(t){return{type:t}}function te(t){return{result:"success",value:t}}function ee(t){return{result:"error",value:t}}function ie(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ne(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function re(t){return!!t.expression&&t.expression.interpolated}bt.register(Zt,{error:[{kind:"error"},[X],function(t,e){var i=e[0];throw new pt(i.evaluate(t))}],typeof:[X,[Q],function(t,e){return it(ct(e[0].evaluate(t)))}],"to-string":[X,[Q],function(t,e){var i=e[0],n=typeof(i=i.evaluate(t));return null===i?"":"string"===n||"number"===n||"boolean"===n?String(i):i instanceof at?i.toString():JSON.stringify(i)}],"to-boolean":[K,[Q],function(t,e){var i=e[0];return Boolean(i.evaluate(t))}],"to-rgba":[et(H,4),[Y],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Y,[H,H,H],Gt],rgba:[Y,[H,H,H,H],Gt],has:{type:K,overloads:[[[X],function(t,e){return Wt(e[0].evaluate(t),t.properties())}],[[X,J],function(t,e){var i=e[0],n=e[1];return Wt(i.evaluate(t),n.evaluate(t))}]]},get:{type:Q,overloads:[[[X],function(t,e){return Ht(e[0].evaluate(t),t.properties())}],[[X,J],function(t,e){var i=e[0],n=e[1];return Ht(i.evaluate(t),n.evaluate(t))}]]},"feature-state":[Q,[X],function(t,e){return Ht(e[0].evaluate(t),t.featureState||{})}],properties:[J,[],function(t){return t.properties()}],"geometry-type":[X,[],function(t){return t.geometryType()}],id:[Q,[],function(t){return t.id()}],zoom:[H,[],function(t){return t.globals.zoom}],"heatmap-density":[H,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[H,[],function(t){return t.globals.lineProgress||0}],"+":[H,Qt(H),function(t,e){for(var i=0,n=0,r=e;n":[K,[X,Q],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[K,[Q],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[K,[X,Q],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[K,[Q],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[K,[X,Q],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[K,[Q],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[K,[Q],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[K,[],function(t){return null!==t.id()}],"filter-type-in":[K,[et(X)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[K,[et(Q)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[K,[X,et(Q)],function(t,e){var i=e[0];return e[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[K,[X,et(Q)],function(t,e){var i=e[0],n=e[1];return function(t,e,i,n){for(;i<=n;){var r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[i.value],n.value,0,n.value.length-1)}],">":{type:K,overloads:[[[H,H],Kt],[[X,X],Kt],[[X,X,tt],function(t,e){var i=e[0],n=e[1];return e[2].evaluate(t).compare(i.evaluate(t),n.evaluate(t))>0}]]},"<":{type:K,overloads:[[[H,H],Xt],[[X,X],Xt],[[X,X,tt],function(t,e){var i=e[0],n=e[1];return e[2].evaluate(t).compare(i.evaluate(t),n.evaluate(t))<0}]]},">=":{type:K,overloads:[[[H,H],Jt],[[X,X],Jt],[[X,X,tt],function(t,e){var i=e[0],n=e[1];return e[2].evaluate(t).compare(i.evaluate(t),n.evaluate(t))>=0}]]},"<=":{type:K,overloads:[[[H,H],Yt],[[X,X],Yt],[[X,X,tt],function(t,e){var i=e[0],n=e[1];return e[2].evaluate(t).compare(i.evaluate(t),n.evaluate(t))<=0}]]},all:{type:K,overloads:[[[K,K],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)&&n.evaluate(t)}],[Qt(K),function(t,e){for(var i=0,n=e;ihe?Math.pow(t,1/3):t/ce+ue}function me(t){return t>le?t*t*t:ce*(t-ue)}function ye(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ge(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ve(t){var e=ge(t.r),i=ge(t.g),n=ge(t.b),r=de((.4124564*e+.3575761*i+.1804375*n)/oe),o=de((.2126729*e+.7151522*i+.072175*n)/ae);return{l:116*o-16,a:500*(r-o),b:200*(o-de((.0193339*e+.119192*i+.9503041*n)/se)),alpha:t.a}}function _e(t){var e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=ae*me(e),i=oe*me(i),n=se*me(n),new at(ye(3.2404542*i-1.5371385*e-.4985314*n),ye(-.969266*i+1.8760108*e+.041556*n),ye(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}var xe={forward:ve,reverse:_e,interpolate:function(t,e,i){return{l:Mt(t.l,e.l,i),a:Mt(t.a,e.a,i),b:Mt(t.b,e.b,i),alpha:Mt(t.alpha,e.alpha,i)}}},be={forward:function(t){var e=ve(t),i=e.l,n=e.a,r=e.b,o=Math.atan2(r,n)*fe;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:i,alpha:t.a}},reverse:function(t){var e=t.h*pe,i=t.c;return _e({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:function(t,e,i){var n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,i),c:Mt(t.c,e.c,i),l:Mt(t.l,e.l,i),alpha:Mt(t.alpha,e.alpha,i)}}},we=Object.freeze({lab:xe,hcl:be});function Se(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Te(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ke(t){return t}function Ee(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Ae(t,e,i,n,r){return Ee(typeof i===r?n[i]:void 0,t.default,e.default)}function ze(t,e,i){if("number"!==Se(i))return Ee(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[n-1][0])return t.stops[n-1][1];var r=Me(t.stops,i);return t.stops[r][1]}function Ie(t,e,i){var n=void 0!==t.base?t.base:1;if("number"!==Se(i))return Ee(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];var o=Me(t.stops,i),a=function(t,e,i,n){var r=n-i,o=t-i;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}(i,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=Pt[e.type]||ke;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=we[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 i=s.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==n)return l(i,n,a)}}:l(s,u,a)}function Ce(t,e,i){return"color"===e.type?i=at.parse(i):Se(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),Ee(i,t.default,e.default)}function Me(t,e){for(var i,n,r=0,o=t.length-1,a=0;r<=o;){if(i=t[a=Math.floor((r+o)/2)][0],n=t[a+1][0],e===i||e>i&&ee&&(o=a-1)}return Math.max(a-1,0)}var Pe=function(t,e){var i;this.expression=t,this._warningHistory={},this._defaultValue="color"===(i=e).type&&Te(i.default)?new at(0,0,0,0):"color"===i.type?at.parse(i.default)||null:void 0===i.default?null:i.default,"enum"===e.type&&(this._enumValues=e.values)};function Le(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Zt}function De(t,e){var i=new Et(Zt,[],function(t){var e={color:Y,string:X,number:H,enum:X,boolean:K};return"array"===t.type?et(e[t.value]||Q,t.length):e[t.type]||null}(e)),n=i.parse(t);return n?te(new Pe(n,e)):ee(i.errors)}Pe.prototype.evaluateWithoutErrorHandling=function(t,e,i){return this._evaluator||(this._evaluator=new xt),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this.expression.evaluate(this._evaluator)},Pe.prototype.evaluate=function(t,e,i){this._evaluator||(this._evaluator=new xt),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new pt("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Re=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!St(e.expression)};Re.prototype.evaluateWithoutErrorHandling=function(t,e,i){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i)},Re.prototype.evaluate=function(t,e,i){return this._styleExpression.evaluate(t,e,i)};var Be=function(t,e,i){this.kind=t,this.zoomStops=i.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!St(e.expression),i instanceof Lt&&(this._interpolationType=i.interpolation)};function Oe(t,e){if("error"===(t=De(t,e)).result)return t;var i=t.value.expression,n=wt(i);if(!n&&!ie(e))return ee([new Z("","data expressions not supported")]);var r=Tt(i,["zoom"]);if(!r&&!ne(e))return ee([new Z("","zoom expressions not supported")]);var o=function t(e){var i=null;if(e instanceof Bt)i=t(e.result);else if(e instanceof Rt)for(var n=0,r=e.args;nn.maximum?[new N(e,i,i+" is greater than the maximum value "+n.maximum)]:[]}function Ue(t){var e,i,n,r=t.valueSpec,o=U(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===Se(t.value.stops)&&"array"===Se(t.value.stops[0])&&"object"===Se(t.value.stops[0][0]),c=Ne({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 N(t.key,t.value,'identity function may not have a "stops" property')];var e=[],i=t.value;return e=e.concat(je({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===Se(i)&&0===i.length&&e.push(new N(t.key,i,"array must have at least one stop")),e},default:function(t){return ci({key:t.key,value:t.value,valueSpec:r,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new N(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new N(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!re(t.valueSpec)&&c.push(new N(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!ie(t.valueSpec)?c.push(new N(t.key,t.value,"property functions not supported")):s&&!ne(t.valueSpec)&&c.push(new N(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||c.push(new N(t.key,t.value,'"property" property is required')),c;function h(t){var e=[],o=t.value,s=t.key;if("array"!==Se(o))return[new N(s,o,"array expected, "+Se(o)+" found")];if(2!==o.length)return[new N(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==Se(o[0]))return[new N(s,o,"object expected, "+Se(o[0])+" found")];if(void 0===o[0].zoom)return[new N(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new N(s,o,"object stop key must have value")];if(n&&n>U(o[0].zoom))return[new N(s,o[0].zoom,"stop zoom values must appear in ascending order")];U(o[0].zoom)!==n&&(n=U(o[0].zoom),i=void 0,a={}),e=e.concat(Ne({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:$e,value:p}}))}else e=e.concat(p({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(ci({key:s+"[1]",value:o[1],valueSpec:r,style:t.style,styleSpec:t.styleSpec}))}function p(t,n){var s=Se(t.value),u=U(t.value),l=null!==t.value?t.value:n;if(e){if(s!==e)return[new N(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 N(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 ie(r)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new N(t.key,l,c)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==i&&u=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":for(var e=0,i=t.slice(1);e