!function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,(function(t){return i(e[a][1][t]||t)}),c,c.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;au/i*n?t/n:u/i:"contain"===s?u>t/n*i?t/n:u/i:1,l?r.style.transform="scale("+e+")":(r.style.width=n*e+"px",r.style.height=i*e+"px"),r.style.left=t!==n*e?c*a+"px":"0px",r.style.top=u!==i*e?h*o+"px":"0px"):setTimeout(p,30)}r.style.position="absolute",r.parentElement.style.overflow="hidden",l&&(r.style.transformOrigin="left top"),-1===["relative","absolute","fixed"].indexOf(window.getComputedStyle(r.parentElement,null).getPropertyValue("position"))&&(r.parentElement.style.position="relative"),u(),c(),p(),this.update=p,this.setWidth=function(t){n=Number(t)},this.setHeight=function(t){i=Number(t)},this.setValign=function(t){o=t,u()},this.setHalign=function(t){a=t,c()},this.setFit=function(t){s=t},this.getWidth=function(){return Number(n)},this.getHeight=function(){return Number(i)},this.getCurrentWidth=function(){return e*n},this.getCurrentHeight=function(){return e*i},this.getValign=function(){return o},this.getHalign=function(){return a},this.getFit=function(){return s},this.getScale=function(){return e}}},{}],3:[function(t,e,r){"use strict";t("./index").polyfill()},{"./index":4}],4:[function(t,e,r){"use strict";function n(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;nt._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},Ft=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Bt=function(t){return t._repeat?Nt(t._tTime,t=t.duration()+t._rDelay)*t:0},Nt=function(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},jt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},$t=function(t){return t._end=bt(t._start+(t._tDur/Math.abs(t._ts||t._rts||1e-8)||0))},Ut=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=bt(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),$t(t),r._dirty||Rt(r,t)),t},Vt=function(t,e){var r;if((e._time||e._initted&&!e._dur)&&(r=jt(t.rawTime(),e),(!e._dur||Jt(0,e.totalDuration(),r)-e._tTime>1e-8)&&e.render(r,!0)),Rt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-1e-8}},qt=function(t,e,r,n){return e.parent&&Lt(e),e._start=bt(r+e._delay),e._end=bt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),function(t,e,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,a=t[n];if(i)for(o=e[i];a&&a[i]>o;)a=a._prev;a?(e._next=a._next,a._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=a,e.parent=e._dp=t}(t,e,"_first","_last",t._sort?"_start":0),t._recent=e,n||Vt(t,e),t},Zt=function(t,e){return nt.ScrollTrigger?nt.ScrollTrigger.create(e,t):void 0},Gt=function(t,e,r,n){return qe(t,e),t._initted?!r&&t._pt&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&u!==Ce.frame?(ct.push(t),t._lazy=[e,n],1):void 0:1},Ht=function(t,e,r,n){var i=t._repeat,o=bt(e)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:bt(o*(i+1)+t._rDelay*i):o,a&&!n?Ut(t,t._tTime=t._tDur*a):t.parent&&$t(t),r||Rt(t.parent,t),t},Wt=function(t){return t instanceof Ne?Rt(t):Ht(t,t._dur)},Xt={_start:0,endTime:lt},Kt=function t(e,r){var n,i,o=e.labels,a=e._recent||Xt,s=e.duration()>=O?a.endTime(!1):e._dur;return j(r)&&(isNaN(r)||r in o)?"<"===(n=r.charAt(0))||">"===n?("<"===n?a._start:a.endTime(a._repeat>=0))+(parseFloat(r.substr(1))||0):(n=r.indexOf("="))<0?(r in o||(o[r]=s),o[r]):(i=+(r.charAt(n-1)+r.substr(n+1)),n>1?t(e,r.substr(0,n-1))+i:s+i):null==r?s:+r},Yt=function(t,e){return t||0===t?e(t):e},Jt=function(t,e,r){return re?e:r},Qt=function(t){if("string"!=typeof t)return"";var e=rt.exec(t);return e?t.substr(e.index+e[0].length):""},te=[].slice,ee=function(t,e){return t&&q(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&q(t[0]))&&!t.nodeType&&t!==o},re=function(t,e,r){return void 0===r&&(r=[]),t.forEach((function(t){var n;return j(t)&&!e||ee(t,1)?(n=r).push.apply(n,ne(t)):r.push(t)}))||r},ne=function(t,e){return!j(t)||e||!a&&Se()?X(t)?re(t,e):ee(t)?te.call(t,0):t?[t]:[]:te.call(s.querySelectorAll(t),0)},ie=function(t){return t.sort((function(){return.5-Math.random()}))},oe=function(t){if($(t))return t;var e=q(t)?t:{each:t},r=ze(e.ease),n=e.from||0,i=parseFloat(e.base)||0,o={},a=n>0&&n<1,s=isNaN(n)||a,l=e.axis,u=n,c=n;return j(n)?u=c={center:.5,edges:.5,end:1}[n]||0:!a&&s&&(u=n[0],c=n[1]),function(t,a,p){var h,f,d,m,v,y,g,_,x,b=(p||e).length,w=o[b];if(!w){if(!(x="auto"===e.grid?0:(e.grid||[1,O])[1])){for(g=-O;g<(g=p[x++].getBoundingClientRect().left)&&xg&&(g=v),v<_&&(_=v);"random"===n&&ie(w),w.max=g-_,w.min=_,w.v=b=(parseFloat(e.amount)||parseFloat(e.each)*(x>b?b-1:l?"y"===l?b/x:x:Math.max(x,b/x))||0)*("edges"===n?-1:1),w.b=b<0?i-b:i,w.u=Qt(e.amount||e.each)||0,r=r&&b<0?Pe(r):r}return b=(w[t]-w.min)/w.max||0,bt(w.b+(r?r(b):b)*w.v)+w.u}},ae=function(t){var e=t<1?Math.pow(10,(t+"").length-2):1;return function(r){var n=Math.round(parseFloat(r)/t)*t*e;return(n-n%1)/e+(U(r)?0:Qt(r))}},se=function(t,e){var r,n,i=X(t);return!i&&q(t)&&(r=i=t.radius||O,t.values?(t=ne(t.values),(n=!U(t[0]))&&(r*=r)):t=ae(t.increment)),Yt(e,i?$(t)?function(e){return n=t(e),Math.abs(n-e)<=r?n:e}:function(e){for(var i,o,a=parseFloat(n?e.x:e),s=parseFloat(n?e.y:0),l=O,u=0,c=t.length;c--;)(i=n?(i=t[c].x-a)*i+(o=t[c].y-s)*o:Math.abs(t[c]-a))(i=Math.abs(i))&&(o=n,s=i);return o},fe=function(t,e,r){var n,i,o=t.vars,a=o[e];if(a)return n=o[e+"Params"],i=o.callbackScope||t,r&&ct.length&&Ct(),n?a.apply(i,n):a.call(i)},de=function(t){return Lt(t),t.scrollTrigger&&t.scrollTrigger.kill(!1),t.progress()<1&&fe(t,"onInterrupt"),t},me=function(t){var e=(t=!t.name&&t.default||t).name,r=$(t),n=e&&!r&&t.init?function(){this._props=[]}:t,i={init:lt,render:nr,add:Ue,kill:or,modifier:ir,rawVars:0},o={targetTest:0,get:0,getSetter:Qe,aliases:{},register:0};if(Se(),t!==n){if(ht[e])return;kt(n,kt(zt(t,i),o)),Pt(n.prototype,Pt(i,zt(t,o))),ht[n.prop=e]=n,t.targetTest&&(mt.push(n),ut[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}st(e,n),t.register&&t.register(hr,n,lr)},ve={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ye=function(t,e,r){return 255*(6*(t=t<0?t+1:t>1?t-1:t)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)+.5|0},ge=function(t,e,r){var n,i,o,a,s,l,u,c,p,h,f=t?U(t)?[t>>16,t>>8&255,255&t]:0:ve.black;if(!f){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),ve[t])f=ve[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+n+n+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(f=parseInt(t.substr(1,6),16))>>16,f>>8&255,255&f,parseInt(t.substr(7),16)/255];f=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t]}else if("hsl"===t.substr(0,3))if(f=h=t.match(K),e){if(~t.indexOf("="))return f=t.match(Y),r&&f.length<4&&(f[3]=1),f}else a=+f[0]%360/360,s=+f[1]/100,n=2*(l=+f[2]/100)-(i=l<=.5?l*(s+1):l+s-l*s),f.length>3&&(f[3]*=1),f[0]=ye(a+1/3,n,i),f[1]=ye(a,n,i),f[2]=ye(a-1/3,n,i);else f=t.match(K)||ve.transparent;f=f.map(Number)}return e&&!h&&(n=f[0]/255,i=f[1]/255,o=f[2]/255,l=((u=Math.max(n,i,o))+(c=Math.min(n,i,o)))/2,u===c?a=s=0:(p=u-c,s=l>.5?p/(2-u-c):p/(u+c),a=u===n?(i-o)/p+(i_&&(b+=a-x),((r=(i=(w+=a)-b)-C)>0||s)&&(o=++m.frame,v=i-1e3*m.time,m.time=i/=1e3,C+=r+(r>=T?4:T-r),n=1),s||(h=f(t)),n)for(y=0;y=e&&y--},_listeners:S=[]}),Se=function(){return!p&&Ce.wake()},Ee={},Ae=/^[\d.\-M][\d.\-,\s]/,ke=/["']/g,Ie=function(t){for(var e,r,n,i={},o=t.substr(1,t.length-3).split(":"),a=o[0],s=1,l=o.length;s1&&a.config?a.config.apply(null,~t.indexOf("{")?[Ie(o[1])]:(e=t,r=e.indexOf("(")+1,n=e.indexOf(")"),i=e.indexOf("(",r),e.substring(r,~i&&i=1?r:1,o=(n||(e?.3:.45))/(r<1?r:1),a=o/D*(Math.asin(1/i)||0),s=function(t){return 1===t?1:i*Math.pow(2,-10*t)*N((t-a)*o)+1},l="out"===e?s:"in"===e?function(t){return 1-s(1-t)}:De(s);return o=D/o,l.config=function(r,n){return t(e,r,n)},l},Re=function t(e,r){void 0===r&&(r=1.70158);var n=function(t){return t?--t*t*((r+1)*t+r)+1:0},i="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:De(n);return i.config=function(r){return t(e,r)},i};xt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var r=e<5?e+1:e;Oe(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},(function(t){return 1-Math.pow(1-t,r)}),(function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2}))})),Ee.Linear.easeNone=Ee.none=Ee.Linear.easeIn,Oe("Elastic",Le("in"),Le("out"),Le()),A=7.5625,I=1/(k=2.75),Oe("Bounce",(function(t){return 1-P(1-t)}),P=function(t){return t0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,Ht(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Se(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Ut(this,t),!r._dp||r.parent||Vt(r,this);r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t0||!this._tDur&&!t)&&qt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&1e-8===Math.abs(this._zTime)||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),St(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Bt(this))%this._dur||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Bt(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?Nt(this._tTime,r)+1:1},e.timeScale=function(t){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?jt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,Ft(this.totalTime(Jt(-this._delay,this._tDur,e),!0))},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Se(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&(this._tTime-=1e-8)&&1e-8!==Math.abs(this._zTime)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&qt(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(Z(t)?this.totalDuration():this.duration())/Math.abs(this._ts)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?jt(e.rawTime(t),this):this._tTime:this._tTime},e.globalTime=function(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(e._ts||1),e=e._dp;return r},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,Wt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){return arguments.length?(this._rDelay=t,Wt(this)):this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Kt(this,t),Z(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,Z(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t1?(e?(n[t]=e,r&&(n[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(r){var n=$(t)?t:At,i=function(){var t=e.then;e.then=null,$(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),r(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?i():e._prom=i}))},e.kill=function(){de(this)},t}();kt(Be.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Ne=function(t){function n(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e,n)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=Z(e.sortChildren),i.parent&&Vt(i.parent,r(i)),e.scrollTrigger&&Zt(r(i),e.scrollTrigger),i}e(n,t);var o=n.prototype;return o.to=function(t,e,r){return new We(t,Tt(arguments,0,this),Kt(this,U(e)?arguments[3]:r)),this},o.from=function(t,e,r){return new We(t,Tt(arguments,1,this),Kt(this,U(e)?arguments[3]:r)),this},o.fromTo=function(t,e,r,n){return new We(t,Tt(arguments,2,this),Kt(this,U(e)?arguments[4]:n)),this},o.set=function(t,e,r){return e.duration=0,e.parent=this,Ot(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new We(t,e,Kt(this,r),1),this},o.call=function(t,e,r){return qt(this,We.delayedCall(0,t,e),Kt(this,r))},o.staggerTo=function(t,e,r,n,i,o,a){return r.duration=e,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=a,r.parent=this,new We(t,r,Kt(this,i)),this},o.staggerFrom=function(t,e,r,n,i,o,a){return r.runBackwards=1,Ot(r).immediateRender=Z(r.immediateRender),this.staggerTo(t,e,r,n,i,o,a)},o.staggerFromTo=function(t,e,r,n,i,o,a,s){return n.startAt=r,Ot(n).immediateRender=Z(n.immediateRender),this.staggerTo(t,e,n,i,o,a,s)},o.render=function(t,e,r){var n,o,a,s,l,u,c,p,h,f,d,m,v=this._time,y=this._dirty?this.totalDuration():this._tDur,g=this._dur,_=this!==i&&t>y-1e-8&&t>=0?y:t<1e-8?0:t,x=this._zTime<0!=t<0&&(this._initted||!g);if(_!==this._tTime||r||x){if(v!==this._time&&g&&(_+=this._time-v,t+=this._time-v),n=_,h=this._start,u=!(p=this._ts),x&&(g||(v=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(d=this._yoyo,l=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*l+t,e,r);if(n=bt(_%l),_===y?(s=this._repeat,n=g):((s=~~(_/l))&&s===_/l&&(n=g,s--),n>g&&(n=g)),f=Nt(this._tTime,l),!v&&this._tTime&&f!==s&&(f=s),d&&1&s&&(n=g-n,m=1),s!==f&&!this._lock){var b=d&&1&f,w=b===(d&&1&s);if(se)for(n=t._first;n&&n._start<=r;){if(!n._dur&&"isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if(!n._dur&&"isPause"===n.data&&n._start=v&&t>=0)for(o=this._first;o;){if(a=o._next,(o._act||n>=o._start)&&o._ts&&c!==o){if(o.parent!==this)return this.render(t,e,r);if(o.render(o._ts>0?(n-o._start)*o._ts:(o._dirty?o.totalDuration():o._tDur)+(n-o._start)*o._ts,e,r),n!==this._time||!this._ts&&!u){c=0,a&&(_+=this._zTime=-1e-8);break}}o=a}else{o=this._last;for(var T=t<0?t:n;o;){if(a=o._prev,(o._act||T<=o._end)&&o._ts&&c!==o){if(o.parent!==this)return this.render(t,e,r);if(o.render(o._ts>0?(T-o._start)*o._ts:(o._dirty?o.totalDuration():o._tDur)+(T-o._start)*o._ts,e,r),n!==this._time||!this._ts&&!u){c=0,a&&(_+=this._zTime=T?-1e-8:1e-8);break}}o=a}}if(c&&!e&&(this.pause(),c.render(n>=v?0:-1e-8)._zTime=n>=v?1:-1,this._ts))return this._start=h,$t(this),this.render(t,e,r);this._onUpdate&&!e&&fe(this,"onUpdate",!0),(_===y&&y>=this.totalDuration()||!_&&v)&&(h!==this._start&&Math.abs(p)===Math.abs(this._ts)||this._lock||((t||!g)&&(_===y&&this._ts>0||!_&&this._ts<0)&&Lt(this,1),e||t<0&&!v||!_&&!v||(fe(this,_===y?"onComplete":"onReverseComplete",!0),this._prom&&!(_0)&&this._prom())))}return this},o.add=function(t,e){var r=this;if(U(e)||(e=Kt(this,e)),!(t instanceof Be)){if(X(t))return t.forEach((function(t){return r.add(t,e)})),this;if(j(t))return this.addLabel(t,e);if(!$(t))return this;t=We.delayedCall(0,t)}return this!==t?qt(this,t,e):this},o.getChildren=function(t,e,r,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=-O);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof We?e&&i.push(o):(r&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,r)))),o=o._next;return i},o.getById=function(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},o.remove=function(t){return j(t)?this.removeLabel(t):$(t)?this.killTweensOf(t):(Dt(this,t),t===this._recent&&(this._recent=this._last),Rt(this))},o.totalTime=function(e,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=bt(Ce.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,r),this._forcing=0,this):this._tTime},o.addLabel=function(t,e){return this.labels[t]=Kt(this,e),this},o.removeLabel=function(t){return delete this.labels[t],this},o.addPause=function(t,e,r){var n=We.delayedCall(0,e||lt,r);return n.data="isPause",this._hasPause=1,qt(this,n,Kt(this,t))},o.removePause=function(t){var e=this._first;for(t=Kt(this,t);e;)e._start===t&&"isPause"===e.data&&Lt(e),e=e._next},o.killTweensOf=function(t,e,r){for(var n=this.getTweensOf(t,r),i=n.length;i--;)je!==n[i]&&n[i].kill(t,e);return this},o.getTweensOf=function(t,e){for(var r,n=[],i=ne(t),o=this._first,a=U(e);o;)o instanceof We?wt(o._targets,i)&&(a?(!je||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&n.push(o):(r=o.getTweensOf(i,e)).length&&n.push.apply(n,r),o=o._next;return n},o.tweenTo=function(t,e){e=e||{};var r=this,n=Kt(r,t),i=e,o=i.startAt,a=i.onStart,s=i.onStartParams,l=i.immediateRender,u=We.to(r,kt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(o&&"time"in o?o.time:r._time))/r.timeScale())||1e-8,onStart:function(){r.pause();var t=e.duration||Math.abs((n-r._time)/r.timeScale());u._dur!==t&&Ht(u,t,0,1).render(u._time,!0,!0),a&&a.apply(u,s||[])}},e));return l?u.render(0):u},o.tweenFromTo=function(t,e,r){return this.tweenTo(e,kt({startAt:{time:Kt(this,t)}},r))},o.recent=function(){return this._recent},o.nextLabel=function(t){return void 0===t&&(t=this._time),he(this,Kt(this,t))},o.previousLabel=function(t){return void 0===t&&(t=this._time),he(this,Kt(this,t),1)},o.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+1e-8)},o.shiftChildren=function(t,e,r){void 0===r&&(r=0);for(var n,i=this._first,o=this.labels;i;)i._start>=r&&(i._start+=t,i._end+=t),i=i._next;if(e)for(n in o)o[n]>=r&&(o[n]+=t);return Rt(this)},o.invalidate=function(){var e=this._first;for(this._lock=0;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},o.clear=function(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Rt(this)},o.totalDuration=function(t){var e,r,n,o=0,a=this,s=a._last,l=O;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(n=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),(r=s._start)>l&&a._sort&&s._ts&&!a._lock?(a._lock=1,qt(a,s,r-s._delay,1)._lock=0):l=r,r<0&&s._ts&&(o-=r,(!n&&!a._dp||n&&n.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),l=0),s._end>o&&s._ts&&(o=s._end),s=e;Ht(a,a===i&&a._time>o?a._time:o,1,1),a._dirty=0}return a._tDur},n.updateRoot=function(t){if(i._ts&&(St(i,jt(t,i)),u=Ce.frame),Ce.frame>=dt){dt+=M.autoSleep||120;var e=i._first;if((!e||!e._ts)&&M.autoSleep&&Ce._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ce.sleep()}}},n}(Be);kt(Ne.prototype,{_lock:0,_hasPause:0,_forcing:0});var je,$e=function(t,e,r,n,i,o,a){var s,l,u,c,p,h,f,d,m=new lr(this._pt,t,e,0,1,rr,null,i),v=0,y=0;for(m.b=r,m.e=n,r+="",(f=~(n+="").indexOf("random("))&&(n=ce(n)),o&&(o(d=[r,n],t,e),r=d[0],n=d[1]),l=r.match(Q)||[];s=Q.exec(n);)c=s[0],p=n.substring(v,s.index),u?u=(u+1)%5:"rgba("===p.substr(-5)&&(u=1),c!==l[y++]&&(h=parseFloat(l[y-1])||0,m._pt={_next:m._pt,p:p||1===y?p:",",s:h,c:"="===c.charAt(1)?parseFloat(c.substr(2))*("-"===c.charAt(0)?-1:1):parseFloat(c)-h,m:u&&u<4?Math.round:0},v=Q.lastIndex);return m.c=v0)I||(e._startAt=0);else if(P&&!(r<0&&M))return void(r&&(e._zTime=r))}else!1===I&&(e._startAt=0);else if(E&&P)if(M)!I&&(e._startAt=0);else if(r&&(b=!1),s=kt({overwrite:!1,data:"isFromStart",lazy:b&&Z(w),immediateRender:b,stagger:0,parent:D},o),v&&(s[h.prop]=v),Lt(e._startAt=We.set(O,s)),b){if(!r)return}else t(e._startAt,1e-8);for(e._pt=0,w=P&&Z(w)||w&&!P,a=0;a")}));else{if(h=k.length,m=b?oe(b):lt,q(b))for(f in b)~Ge.indexOf(f)&&(v||(v={}),v[f]=b[f]);for(c=0;cf-1e-8&&t>=0?f:t<1e-8?0:t;if(d){if(m!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=t<0){if(n=m,c=this.timeline,this._repeat){if(a=d+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,r);if(n=bt(m%a),m===f?(o=this._repeat,n=d):((o=~~(m/a))&&o===m/a&&(n=d,o--),n>d&&(n=d)),(l=this._yoyo&&1&o)&&(p=this._yEase,n=d-n),s=Nt(this._tTime,a),n===h&&!r&&this._initted)return this;o!==s&&(c&&this._yEase&&Me(c,l),!this.vars.repeatRefresh||l||this._lock||(this._lock=r=1,this.render(bt(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(Gt(this,t<0?t:n,r,e))return this._tTime=0,this;if(d!==this._dur)return this.render(t,e,r)}for(this._tTime=m,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(p||this._ease)(n/d),this._from&&(this.ratio=u=1-u),n&&!h&&!e&&fe(this,"onStart"),i=this._pt;i;)i.r(u,i.d),i=i._next;c&&c.render(t<0?t:!n&&l?-1e-8:c._dur*u,e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(t<0&&this._startAt&&this._startAt.render(t,!0,r),fe(this,"onUpdate")),this._repeat&&o!==s&&this.vars.onRepeat&&!e&&this.parent&&fe(this,"onRepeat"),m!==this._tDur&&m||this._tTime!==m||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,!0,!0),(t||!d)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&Lt(this,1),e||t<0&&!h||!m&&!h||(fe(this,m===f?"onComplete":"onReverseComplete",!0),this._prom&&!(m0)&&this._prom()))}}else!function(t,e,r,n){var i,o,a,s=t.ratio,l=e<0||!e&&(!t._start&&function t(e){var r=e.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||t(r))}(t)||(t._ts<0||t._dp._ts<0)&&"isFromStart"!==t.data&&"isStart"!==t.data)?0:1,u=t._rDelay,c=0;if(u&&t._repeat&&(c=Jt(0,t._tDur,e),o=Nt(c,u),a=Nt(t._tTime,u),t._yoyo&&1&o&&(l=1-l),o!==a&&(s=1-l,t.vars.repeatRefresh&&t._initted&&t.invalidate())),l!==s||n||1e-8===t._zTime||!e&&t._zTime){if(!t._initted&&Gt(t,e,n,r))return;for(a=t._zTime,t._zTime=e||(r?1e-8:0),r||(r=e&&!a),t.ratio=l,t._from&&(l=1-l),t._time=0,t._tTime=c,i=t._pt;i;)i.r(l,i.d),i=i._next;t._startAt&&e<0&&t._startAt.render(e,!0,!0),t._onUpdate&&!r&&fe(t,"onUpdate"),c&&t._repeat&&!r&&t.parent&&fe(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===l&&(l&&Lt(t,1),r||(fe(t,l?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},a.targets=function(){return this._targets},a.invalidate=function(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),t.prototype.invalidate.call(this)},a.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?de(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,je&&!0!==je.vars.overwrite)._first||de(this),this.parent&&r!==this.timeline.totalDuration()&&Ht(this,this._dur*this.timeline._tDur/r,0,1),this}var n,i,o,a,s,l,u,c=this._targets,p=t?ne(t):c,h=this._ptLookup,f=this._pt;if((!e||"all"===e)&&function(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0}(c,p))return"all"===e&&(this._pt=0),de(this);for(n=this._op=this._op||[],"all"!==e&&(j(e)&&(s={},xt(e,(function(t){return s[t]=1})),e=s),e=function(t,e){var r,n,i,o,a=t[0]?gt(t[0]).harness:0,s=a&&a.aliases;if(!s)return e;for(n in r=Pt({},e),s)if(n in r)for(i=(o=s[n].split(",")).length;i--;)r[o[i]]=r[n];return r}(c,e)),u=c.length;u--;)if(~p.indexOf(c[u]))for(s in i=h[u],"all"===e?(n[u]=e,a=i,o={}):(o=n[u]=n[u]||{},a=e),a)(l=i&&i[s])&&("kill"in l.d&&!0!==l.d.kill(s)||Dt(this,l,"_pt"),delete i[s]),"all"!==o&&(o[s]=1);return this._initted&&!this._pt&&f&&de(this),this},o.to=function(t,e){return new o(t,e,arguments[2])},o.from=function(t,e){return new o(t,Tt(arguments,1))},o.delayedCall=function(t,e,r,n){return new o(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:n})},o.fromTo=function(t,e,r){return new o(t,Tt(arguments,2))},o.set=function(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new o(t,e)},o.killTweensOf=function(t,e,r){return i.killTweensOf(t,e,r)},o}(Be);kt(We.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),xt("staggerTo,staggerFrom,staggerFromTo",(function(t){We[t]=function(){var e=new Ne,r=te.call(arguments,0);return r.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,r)}}));var Xe=function(t,e,r){return t[e]=r},Ke=function(t,e,r){return t[e](r)},Ye=function(t,e,r,n){return t[e](n.fp,r)},Je=function(t,e,r){return t.setAttribute(e,r)},Qe=function(t,e){return $(t[e])?Ke:V(t[e])&&t.setAttribute?Je:Xe},tr=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4,e)},er=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},rr=function(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},nr=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ir=function(t,e,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(t,e,r),o=i},or=function(t){for(var e,r,n=this._pt;n;)r=n._next,n.p===t&&!n.op||n.op===t?Dt(this,n,"_pt"):n.dep||(e=1),n=r;return!e},ar=function(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)},sr=function(t){for(var e,r,n,i,o=t._pt;o;){for(e=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=e}t._pt=n},lr=function(){function t(t,e,r,n,i,o,a,s,l){this.t=e,this.s=n,this.c=i,this.p=r,this.r=o||tr,this.d=a||this,this.set=s||Xe,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,r){this.mSet=this.mSet||this.set,this.set=ar,this.m=t,this.mt=r,this.tween=e},t}();xt(vt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return ut[t]=1})),nt.TweenMax=nt.TweenLite=We,nt.TimelineLite=nt.TimelineMax=Ne,i=new Ne({sortChildren:!1,defaults:z,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),M.stringFilter=Te;var ur={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r1){var n=t.map((function(t){return hr.quickSetter(t,e,r)})),i=n.length;return function(t){for(var e=i;e--;)n[e](t)}}t=t[0]||{};var o=ht[e],a=gt(t),s=a.harness&&(a.harness.aliases||{})[e]||e,l=o?function(e){var n=new o;c._pt=0,n.init(t,r?e+r:e,c,0,[t]),n.render(1,n),c._pt&&nr(1,c)}:a.set(t,s);return o?l:function(e){return l(t,s,r?e+r:e,a,1)}},isTweening:function(t){return i.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=ze(t.ease,z.ease)),Mt(z,t||{})},config:function(t){return Mt(M,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,n=t.plugins,i=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!ht[t]&&!nt[t]&&at()})),ft[e]=function(t,e,n){return r(ne(t),kt(e||{},i),n)},o&&(Ne.prototype[e]=function(t,r,n){return this.add(ft[e](t,q(r)?r:(n=r)&&{},this),n)})},registerEase:function(t,e){Ee[t]=ze(e)},parseEase:function(t,e){return arguments.length?ze(t,e):Ee},getById:function(t){return i.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var r,n,o=new Ne(t);for(o.smoothChildTiming=Z(t.smoothChildTiming),i.remove(o),o._dp=0,o._time=o._tTime=i._time,r=i._first;r;)n=r._next,!e&&!r._dur&&r instanceof We&&r.vars.onComplete===r._targets[0]||qt(o,r,r._start-r._delay),r=n;return qt(i,o,0),o},utils:{wrap:function t(e,r,n){var i=r-e;return X(e)?ue(e,t(0,e.length),r):Yt(n,(function(t){return(i+(t-e)%i)%i+e}))},wrapYoyo:function t(e,r,n){var i=r-e,o=2*i;return X(e)?ue(e,t(0,e.length-1),r):Yt(n,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},distribute:oe,random:le,snap:se,normalize:function(t,e,r){return pe(t,e,0,1,r)},getUnit:Qt,clamp:function(t,e,r){return Yt(r,(function(r){return Jt(t,e,r)}))},splitColor:ge,toArray:ne,mapRange:pe,pipe:function(){for(var t=arguments.length,e=new Array(t),r=0;r=0?un[i]:"")+t},pn=function(){"undefined"!=typeof window&&window.document&&(fr=window,dr=fr.document,mr=dr.documentElement,yr=sn("div")||{style:{}},sn("div"),on=cn(on),an=on+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_r=!!cn("perspective"),vr=1)},hn=function t(e){var r,n=sn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(mr.appendChild(n),n.appendChild(this),this.style.display="block",e)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),mr.removeChild(n),this.style.cssText=a,r},fn=function(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])},dn=function(t){var e;try{e=t.getBBox()}catch(r){e=hn.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===hn||(e=hn.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+fn(t,["x","cx","x1"])||0,y:+fn(t,["y","cy","y1"])||0,width:0,height:0}},mn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!dn(t))},vn=function(t,e){if(e){var r=t.style;e in Br&&e!==an&&(e=on),r.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty(e.replace(Ur,"-$1").toLowerCase())):r.removeAttribute(e)}},yn=function(t,e,r,n,i,o){var a=new lr(t._pt,e,r,0,1,o?Yr:Kr);return t._pt=a,a.b=n,a.e=i,t._props.push(r),a},gn={deg:1,rad:1,turn:1},_n=function t(e,r,n,i){var o,a,s,l,u=parseFloat(n)||0,c=(n+"").trim().substr((u+"").length)||"px",p=yr.style,h=Vr.test(r),f="svg"===e.tagName.toLowerCase(),d=(f?"client":"offset")+(h?"Width":"Height"),m="px"===i,v="%"===i;return i===c||!u||gn[i]||gn[c]?u:("px"!==c&&!m&&(u=t(e,r,n,"px")),l=e.getCTM&&mn(e),!v&&"%"!==c||!Br[r]&&!~r.indexOf("adius")?(p[h?"width":"height"]=100+(m?c:i),a=~r.indexOf("adius")||"em"===i&&e.appendChild&&!f?e:e.parentNode,l&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==dr&&a.appendChild||(a=dr.body),(s=a._gsap)&&v&&s.width&&h&&s.time===Ce.time?bt(u/s.width*100):((v||"%"===c)&&(p.position=ln(e,"position")),a===e&&(p.position="static"),a.appendChild(yr),o=yr[d],a.removeChild(yr),p.position="absolute",h&&v&&((s=gt(a)).time=Ce.time,s.width=a[d]),bt(m?o*u/100:o&&u?100/o*u:0))):(o=l?e.getBBox()[h?"width":"height"]:e[d],bt(v?u/o*100:u/100*o)))},xn=function(t,e,r,n){var i;return vr||pn(),e in Zr&&"transform"!==e&&~(e=Zr[e]).indexOf(",")&&(e=e.split(",")[0]),Br[e]&&"transform"!==e?(i=Mn(t,n),i="transformOrigin"!==e?i[e]:zn(ln(t,an))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=Cn[e]&&Cn[e](t,e,r)||ln(t,e)||_t(t,e)||("opacity"===e?1:0)),r&&!~(i+"").trim().indexOf(" ")?_n(t,e,i,r)+r:i},bn=function(t,e,r,n){if(!r||"none"===r){var i=cn(e,t,1),o=i&&ln(t,i,1);o&&o!==r?(e=i,r=o):"borderColor"===e&&(r=ln(t,"borderTopColor"))}var a,s,l,u,c,p,h,f,d,m,v,y,g=new lr(this._pt,t.style,e,0,1,rr),_=0,x=0;if(g.b=r,g.e=n,r+="","auto"===(n+="")&&(t.style[e]=n,n=ln(t,e)||n,t.style[e]=r),Te(a=[r,n]),n=a[1],l=(r=a[0]).match(J)||[],(n.match(J)||[]).length){for(;s=J.exec(n);)h=s[0],d=n.substring(_,s.index),c?c=(c+1)%5:"rgba("!==d.substr(-5)&&"hsla("!==d.substr(-5)||(c=1),h!==(p=l[x++]||"")&&(u=parseFloat(p)||0,v=p.substr((u+"").length),(y="="===h.charAt(1)?+(h.charAt(0)+"1"):0)&&(h=h.substr(2)),f=parseFloat(h),m=h.substr((f+"").length),_=J.lastIndex-m.length,m||(m=m||M.units[e]||v,_===n.length&&(n+=m,g.e+=m)),v!==m&&(u=_n(t,e,p,m)||0),g._pt={_next:g._pt,p:d||1===x?d:",",s:u,c:y?y*f:f-u,m:c&&c<4||"zIndex"===e?Math.round:0});g.c=_-1;)r=s[i],Br[r]&&(n=1,r="transformOrigin"===r?an:on),vn(o,r);n&&(vn(o,on),l&&(l.svg&&o.removeAttribute("transform"),Mn(o,1),l.uncache=1))}},Cn={clearProps:function(t,e,r,n,i){if("isFromStart"!==i.data){var o=t._pt=new lr(t._pt,e,r,0,0,Tn);return o.u=n,o.pr=-10,o.tween=i,t._props.push(r),1}}},Sn=[1,0,0,1,0,0],En={},An=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},kn=function(t){var e=ln(t,on);return An(e)?Sn:e.substr(7).match(Y).map(bt)},In=function(t,e){var r,n,i,o,a=t._gsap||gt(t),s=t.style,l=kn(t);return a.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?Sn:l:(l!==Sn||t.offsetParent||t===mr||a.svg||(i=s.display,s.display="block",(r=t.parentNode)&&t.offsetParent||(o=1,n=t.nextSibling,mr.appendChild(t)),l=kn(t),i?s.display=i:vn(t,"display"),o&&(n?r.insertBefore(t,n):r?r.appendChild(t):mr.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},Pn=function(t,e,r,n,i,o){var a,s,l,u=t._gsap,c=i||In(t,!0),p=u.xOrigin||0,h=u.yOrigin||0,f=u.xOffset||0,d=u.yOffset||0,m=c[0],v=c[1],y=c[2],g=c[3],_=c[4],x=c[5],b=e.split(" "),w=parseFloat(b[0])||0,T=parseFloat(b[1])||0;r?c!==Sn&&(s=m*g-v*y)&&(l=w*(-v/s)+T*(m/s)-(m*x-v*_)/s,w=w*(g/s)+T*(-y/s)+(y*x-g*_)/s,T=l):(w=(a=dn(t)).x+(~b[0].indexOf("%")?w/100*a.width:w),T=a.y+(~(b[1]||b[0]).indexOf("%")?T/100*a.height:T)),n||!1!==n&&u.smooth?(_=w-p,x=T-h,u.xOffset=f+(_*m+x*y)-_,u.yOffset=d+(_*v+x*g)-x):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=T,u.smooth=!!n,u.origin=e,u.originIsAbsolute=!!r,t.style[an]="0px 0px",o&&(yn(o,u,"xOrigin",p,w),yn(o,u,"yOrigin",h,T),yn(o,u,"xOffset",f,u.xOffset),yn(o,u,"yOffset",d,u.yOffset)),t.setAttribute("data-svg-origin",w+" "+T)},Mn=function(t,e){var r=t._gsap||new Fe(t);if("x"in r&&!e&&!r.uncache)return r;var n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,T,C,S,E,A,k,I,P,z,O,D,L,R=t.style,F=r.scaleX<0,B=ln(t,an)||"0";return n=i=o=l=u=c=p=h=f=0,a=s=1,r.svg=!(!t.getCTM||!mn(t)),v=In(t,r.svg),r.svg&&(E=!r.uncache&&!e&&t.getAttribute("data-svg-origin"),Pn(t,E||B,!!E||r.originIsAbsolute,!1!==r.smooth,v)),d=r.xOrigin||0,m=r.yOrigin||0,v!==Sn&&(x=v[0],b=v[1],w=v[2],T=v[3],n=C=v[4],i=S=v[5],6===v.length?(a=Math.sqrt(x*x+b*b),s=Math.sqrt(T*T+w*w),l=x||b?$r(b,x)*Nr:0,(p=w||T?$r(w,T)*Nr+l:0)&&(s*=Math.abs(Math.cos(p*jr))),r.svg&&(n-=d-(d*x+m*w),i-=m-(d*b+m*T))):(L=v[6],O=v[7],I=v[8],P=v[9],z=v[10],D=v[11],n=v[12],i=v[13],o=v[14],u=(y=$r(L,z))*Nr,y&&(E=C*(g=Math.cos(-y))+I*(_=Math.sin(-y)),A=S*g+P*_,k=L*g+z*_,I=C*-_+I*g,P=S*-_+P*g,z=L*-_+z*g,D=O*-_+D*g,C=E,S=A,L=k),c=(y=$r(-w,z))*Nr,y&&(g=Math.cos(-y),D=T*(_=Math.sin(-y))+D*g,x=E=x*g-I*_,b=A=b*g-P*_,w=k=w*g-z*_),l=(y=$r(b,x))*Nr,y&&(E=x*(g=Math.cos(y))+b*(_=Math.sin(y)),A=C*g+S*_,b=b*g-x*_,S=S*g-C*_,x=E,C=A),u&&Math.abs(u)+Math.abs(l)>359.9&&(u=l=0,c=180-c),a=bt(Math.sqrt(x*x+b*b+w*w)),s=bt(Math.sqrt(S*S+L*L)),y=$r(C,S),p=Math.abs(y)>2e-4?y*Nr:0,f=D?1/(D<0?-D:D):0),r.svg&&(E=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!An(ln(t,on)),E&&t.setAttribute("transform",E))),Math.abs(p)>90&&Math.abs(p)<270&&(F?(a*=-1,p+=l<=0?180:-180,l+=l<=0?180:-180):(s*=-1,p+=p<=0?180:-180)),r.x=n-((r.xPercent=n&&(r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=i-((r.yPercent=i&&(r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=o+"px",r.scaleX=bt(a),r.scaleY=bt(s),r.rotation=bt(l)+"deg",r.rotationX=bt(u)+"deg",r.rotationY=bt(c)+"deg",r.skewX=p+"deg",r.skewY=h+"deg",r.transformPerspective=f+"px",(r.zOrigin=parseFloat(B.split(" ")[2])||0)&&(R[an]=zn(B)),r.xOffset=r.yOffset=0,r.force3D=M.force3D,r.renderTransform=r.svg?Rn:_r?Ln:Dn,r.uncache=0,r},zn=function(t){return(t=t.split(" "))[0]+" "+t[1]},On=function(t,e,r){var n=Qt(e);return bt(parseFloat(e)+parseFloat(_n(t,"x",r+"px",n)))+n},Dn=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Ln(t,e)},Ln=function(t,e){var r=e||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,l=r.rotation,u=r.rotationY,c=r.rotationX,p=r.skewX,h=r.skewY,f=r.scaleX,d=r.scaleY,m=r.transformPerspective,v=r.force3D,y=r.target,g=r.zOrigin,_="",x="auto"===v&&t&&1!==t||!0===v;if(g&&("0deg"!==c||"0deg"!==u)){var b,w=parseFloat(u)*jr,T=Math.sin(w),C=Math.cos(w);w=parseFloat(c)*jr,b=Math.cos(w),o=On(y,o,T*b*-g),a=On(y,a,-Math.sin(w)*-g),s=On(y,s,C*b*-g+g)}"0px"!==m&&(_+="perspective("+m+") "),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(x||"0px"!==o||"0px"!==a||"0px"!==s)&&(_+="0px"!==s||x?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+") "),"0deg"!==l&&(_+="rotate("+l+") "),"0deg"!==u&&(_+="rotateY("+u+") "),"0deg"!==c&&(_+="rotateX("+c+") "),"0deg"===p&&"0deg"===h||(_+="skew("+p+", "+h+") "),1===f&&1===d||(_+="scale("+f+", "+d+") "),y.style[on]=_||"translate(0, 0)"},Rn=function(t,e){var r,n,i,o,a,s=e||this,l=s.xPercent,u=s.yPercent,c=s.x,p=s.y,h=s.rotation,f=s.skewX,d=s.skewY,m=s.scaleX,v=s.scaleY,y=s.target,g=s.xOrigin,_=s.yOrigin,x=s.xOffset,b=s.yOffset,w=s.forceCSS,T=parseFloat(c),C=parseFloat(p);h=parseFloat(h),f=parseFloat(f),(d=parseFloat(d))&&(f+=d=parseFloat(d),h+=d),h||f?(h*=jr,f*=jr,r=Math.cos(h)*m,n=Math.sin(h)*m,i=Math.sin(h-f)*-v,o=Math.cos(h-f)*v,f&&(d*=jr,a=Math.tan(f-d),i*=a=Math.sqrt(1+a*a),o*=a,d&&(a=Math.tan(d),r*=a=Math.sqrt(1+a*a),n*=a)),r=bt(r),n=bt(n),i=bt(i),o=bt(o)):(r=m,o=v,n=i=0),(T&&!~(c+"").indexOf("px")||C&&!~(p+"").indexOf("px"))&&(T=_n(y,"x",c,"px"),C=_n(y,"y",p,"px")),(g||_||x||b)&&(T=bt(T+g-(g*r+_*i)+x),C=bt(C+_-(g*n+_*o)+b)),(l||u)&&(a=y.getBBox(),T=bt(T+l/100*a.width),C=bt(C+u/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+T+","+C+")",y.setAttribute("transform",a),w&&(y.style[on]=a)},Fn=function(t,e,r,n,i,o){var a,s,l=j(i),u=parseFloat(i)*(l&&~i.indexOf("rad")?Nr:1),c=o?u*o:u-n,p=n+c+"deg";return l&&("short"===(a=i.split("_")[1])&&(c%=360)!==c%180&&(c+=c<0?360:-360),"cw"===a&&c<0?c=(c+36e9)%360-360*~~(c/360):"ccw"===a&&c>0&&(c=(c-36e9)%360-360*~~(c/360))),t._pt=s=new lr(t._pt,e,r,n,c,Hr),s.e=p,s.u="deg",t._props.push(r),s},Bn=function(t,e){for(var r in e)t[r]=e[r];return t},Nn=function(t,e,r){var n,i,o,a,s,l,u,c=Bn({},r._gsap),p=r.style;for(i in c.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),p[on]=e,n=Mn(r,1),vn(r,on),r.setAttribute("transform",o)):(o=getComputedStyle(r)[on],p[on]=e,n=Mn(r,1),p[on]=o),Br)(o=c[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=Qt(o)!==(u=Qt(a))?_n(r,i,o,u):parseFloat(o),l=parseFloat(a),t._pt=new lr(t._pt,n,i,s,l-s,Gr),t._pt.u=u||0,t._props.push(i));Bn(n,c)};xt("padding,margin,Width,Radius",(function(t,e){var r="Top",n="Right",i="Bottom",o="Left",a=(e<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return e<2?t+r:"border"+r+t}));Cn[e>1?"border"+t:t]=function(t,e,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(e){return xn(t,e,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(t,e){return s[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,s,i)}}));var jn,$n,Un={name:"css",register:pn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,r,n,i){var o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,T,C=this._props,S=t.style,E=r.vars.startAt;for(p in vr||pn(),e)if("autoRound"!==p&&(a=e[p],!ht[p]||!Ve(p,e,r,n,t,i)))if(u=typeof a,c=Cn[p],"function"===u&&(u=typeof(a=a.call(r,n,t,i))),"string"===u&&~a.indexOf("random(")&&(a=ce(a)),c)c(this,t,p,a,r)&&(_=1);else if("--"===p.substr(0,2))o=(getComputedStyle(t).getPropertyValue(p)+"").trim(),a+="",be.lastIndex=0,be.test(o)||(h=Qt(o),f=Qt(a)),f?h!==f&&(o=_n(t,p,o,f)+f):h&&(a+=h),this.add(S,"setProperty",o,a,n,i,0,0,p);else if("undefined"!==u){if(E&&p in E?(o="function"==typeof E[p]?E[p].call(r,n,t,i):E[p],p in M.units&&!Qt(o)&&(o+=M.units[p]),"="===(o+"").charAt(1)&&(o=xn(t,p))):o=xn(t,p),l=parseFloat(o),(d="string"===u&&"="===a.charAt(1)?+(a.charAt(0)+"1"):0)&&(a=a.substr(2)),s=parseFloat(a),p in Zr&&("autoAlpha"===p&&(1===l&&"hidden"===xn(t,"visibility")&&s&&(l=0),yn(this,S,"visibility",l?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==p&&"transform"!==p&&~(p=Zr[p]).indexOf(",")&&(p=p.split(",")[0])),m=p in Br)if(v||((y=t._gsap).renderTransform&&!e.parseTransform||Mn(t,e.parseTransform),g=!1!==e.smoothOrigin&&y.smooth,(v=this._pt=new lr(this._pt,S,on,0,1,y.renderTransform,y,0,-1)).dep=1),"scale"===p)this._pt=new lr(this._pt,y,"scaleY",y.scaleY,d?d*s:s-y.scaleY),C.push("scaleY",p),p+="X";else{if("transformOrigin"===p){b=void 0,w=void 0,T=void 0,b=(x=a).split(" "),w=b[0],T=b[1]||"50%","top"!==w&&"bottom"!==w&&"left"!==T&&"right"!==T||(x=w,w=T,T=x),b[0]=wn[w]||w,b[1]=wn[T]||T,a=b.join(" "),y.svg?Pn(t,a,0,g,0,this):((f=parseFloat(a.split(" ")[2])||0)!==y.zOrigin&&yn(this,y,"zOrigin",y.zOrigin,f),yn(this,S,p,zn(o),zn(a)));continue}if("svgOrigin"===p){Pn(t,a,1,g,0,this);continue}if(p in En){Fn(this,y,p,l,a,d);continue}if("smoothOrigin"===p){yn(this,y,"smooth",y.smooth,a);continue}if("force3D"===p){y[p]=a;continue}if("transform"===p){Nn(this,a,t);continue}}else p in S||(p=cn(p)||p);if(m||(s||0===s)&&(l||0===l)&&!qr.test(a)&&p in S)s||(s=0),(h=(o+"").substr((l+"").length))!==(f=Qt(a)||(p in M.units?M.units[p]:h))&&(l=_n(t,p,o,f)),this._pt=new lr(this._pt,m?y:S,p,l,d?d*s:s-l,m||"px"!==f&&"zIndex"!==p||!1===e.autoRound?Gr:Xr),this._pt.u=f||0,h!==f&&(this._pt.b=o,this._pt.r=Wr);else if(p in S)bn.call(this,t,p,o,a);else{if(!(p in t))continue;this.add(t,p,t[p],a,n,i)}C.push(p)}_&&sr(this)},get:xn,aliases:Zr,getSetter:function(t,e,r){var n=Zr[e];return n&&n.indexOf(",")<0&&(e=n),e in Br&&e!==an&&(t._gsap.x||xn(t,"x"))?r&&gr===r?"scale"===e?en:tn:(gr=r||{})&&("scale"===e?rn:nn):t.style&&!V(t.style[e])?Jr:~e.indexOf("-")?Qr:Qe(t,e)},core:{_removeProperty:vn,_getMatrix:In}};hr.utils.checkPrefix=cn,$n=xt("x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+(jn="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Br[t]=1})),xt(jn,(function(t){M.units[t]="deg",En[t]=1})),Zr[$n[13]]="x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+jn,xt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");Zr[e[1]]=$n[e[0]]})),xt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){M.units[t]="px"})),hr.registerPlugin(Un);var Vn=hr.registerPlugin(Un)||hr,qn=Vn.core.Tween;t.Back=zr,t.Bounce=Dr,t.CSSPlugin=Un,t.Circ=Fr,t.Cubic=Ar,t.Elastic=Mr,t.Expo=Rr,t.Linear=Sr,t.Power0=xr,t.Power1=br,t.Power2=wr,t.Power3=Tr,t.Power4=Cr,t.Quad=Er,t.Quart=kr,t.Quint=Ir,t.Sine=Lr,t.SteppedEase=Or,t.Strong=Pr,t.TimelineLite=Ne,t.TimelineMax=Ne,t.TweenLite=We,t.TweenMax=qn,t.default=Vn,t.gsap=Vn,"undefined"==typeof window||window!==t?Object.defineProperty(t,"__esModule",{value:!0}):delete window.default}))},{}],6:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).mapboxgl=n()}(this,(function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),r=i(a),"undefined"!=typeof window&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var r,n,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)(n=1))return n;for(;ro?r=i:n=i,i=.5*(n-r)+r}return i},n.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,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[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),r=Math.sin(t),n=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-n*(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 l(t,e,n,i){var o=new r(t,e,n,i);return function(t){return o.solve(t)}}var u=l(.25,.1,.25,1);function c(t,e,r){return Math.min(r,Math.max(e,t))}function p(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function h(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function v(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function y(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function g(t,e){return-1!==t.indexOf(e,t.length-e.length)}function _(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function x(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?_(t,b):t}var w={};function T(t){w[t]||(w[t]=!0)}function C(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function S(t){for(var e=0,r=0,n=t.length,i=n-1,o=void 0,a=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,n,i){var o=n||i;return e[r]=!o||o.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var k=null;function I(t){if(null==k){var e=t.navigator?t.navigator.userAgent:null;k=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return k}function P(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var M,z,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,F=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,B={now:L,frame:function(t){var e=R(t);return{cancel:function(){return F(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=a.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return M||(M=a.document.createElement("a")),M.href=t,M.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==z&&(z=a.matchMedia("(prefers-reduced-motion: reduce)")),z.matches)}},N={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},j={supported:!1,testSupport:function(t){!$&&D&&(U?V(t):O=t)}},$=!1,U=!1;function V(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;j.supported=!0}catch(t){}t.deleteTexture(e),$=!0}a.document&&((D=a.document.createElement("img")).onload=function(){O&&V(O),O=null,U=!0},D.onerror=function(){$=!0,O=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var q="01",Z=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function G(t){return 0===t.indexOf("mapbox:")}Z.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",q,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},Z.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Z.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},Z.prototype.normalizeStyleURL=function(t,e){if(!G(t))return t;var r=K(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeGlyphsURL=function(t,e){if(!G(t))return t;var r=K(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeSourceURL=function(t,e){if(!G(t))return t;var r=K(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeSpriteURL=function(t,e,r,n){var i=K(t);return G(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,Y(i))},Z.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!G(t))return t;var r=K(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(B.devicePixelRatio>=2||512===e?"@2x":"")+(j.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var n=this._customAccessToken||function(t){for(var e=0,r=t;e=0&&t.params.splice(i,1)}if("/"!==n.path&&(t.path=""+n.path+t.path),!N.REQUIRE_ACCESS_TOKEN)return Y(t);if(!(e=e||N.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),Y(t)};var H=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function W(t){return H.test(t)}var X=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(X);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Y(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(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,r=J(N.ACCESS_TOKEN);return e=r&&r.u?a.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))}))):N.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Q.prototype.fetchEventData=function(){var t=P("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var n=a.localStorage.getItem(e);n&&(this.eventData=JSON.parse(n));var i=a.localStorage.getItem(r);i&&(this.anonId=i)}catch(t){T("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var t=P("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{a.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){T("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,r,n){var i=this;if(N.EVENTS_URL){var o=K(N.EVENTS_URL);o.params.push("access_token="+(n||N.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.1",skuId:q,userId:this.anonId},s=e?h(a,e):a,l={url:Y(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var tt,et,rt=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,r,n){this.skuToken=r,(N.EVENTS_URL&&n||N.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||W(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),v(this.anonId)||(this.anonId=m()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(Q),nt=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){N.EVENTS_URL&&N.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||W(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 r=J(N.ACCESS_TOKEN),n=r?r.u:N.ACCESS_TOKEN,i=n!==this.eventData.tokenU;v(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),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-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=n)}),t)}},e}(Q)),it=nt.postTurnstileEvent.bind(nt),ot=new rt,at=ot.postMapLoadEvent.bind(ot),st=500,lt=50;function ut(){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,vt,yt=function(t){function e(e,r,n){401===r&&W(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,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=E()?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(r=t.url)||/^file:/.test(gt())&&!/^\w+:/.test(r))){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return function(t,e){var r,n=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:n.signal}),o=!1,s=!1,l=(r=i.url).indexOf("sku=")>0&&W(r);"json"===t.type&&i.headers.set("Accept","application/json");var u=function(r,n,o){if(!s){if(r&&"SecurityError"!==r.message&&T(r),n&&o)return c(n);var u=Date.now();a.fetch(i).then((function(r){if(r.ok){var n=l?r.clone():null;return c(r,n,u)}return e(new yt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,l){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((function(t){s||(n&&l&&function(t,e,r){if(ut(),tt){var n={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<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 r=new a.Response(e,n);ut(),tt&&tt.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return T(t.message)}))})))}}(i,n,l),o=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return l?function(t,e){if(ut(),!tt)return e(null);var r=ct(t.url);tt.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=A(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}(i,u):u(null,null),{cancel:function(){s=!0,o||n.abort()}}}(t,e);if(E()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){var r=new a.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new yt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.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)},wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";mt=[],vt=0;var Tt=function(t,e){if(j.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),vt>=N.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return mt.push(r),r}vt++;var n=!1,i=function(){if(!n)for(n=!0,vt--;mt.length&&vt0||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 It={$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"},"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"}}},Pt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Mt(t){var e=t.value;return e?[new Pt(t.key,e,"constants have been deprecated as of v8")]:[]}function zt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Xt=[Ft,Bt,Nt,jt,$t,Zt,Ut,Ht(Vt),Gt];function Kt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Kt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=Xt;r255?255:t}function i(t){return n("%"===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,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in r)return r[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 l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+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]),v=m<=.5?m*(d+1):m+d-m*d,y=2*m-v;return[n(255*a(y,v,f+1/3)),n(255*a(y,v,f)),n(255*a(y,v,f-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if("string"==typeof t){var e=Qt(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.prototype.toString=function(){var t=this.toArray(),e=t[1],r=t[2],n=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(r)+","+n+")"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.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}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},ne.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ae(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 te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in pe)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=pe[s],n++}else o=Vt;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],n++}r=Ht(o,a)}else r=pe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var fe=function(t){this.type=Zt,this.sections=t};fe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],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,Bt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,Ht(Nt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,$t)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Vt);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,n.push({content:p,scale:null,font:null,textColor:null})}}return new fe(n)},fe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Gt?new re("",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},fe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return["image",this.input.serialize()]};var me={"to-boolean":jt,"to-color":$t,"to-number":Bt,"to-string":Nt},ve=function(t,e){this.type=t,this.args=e};ve.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=me[r],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":oe(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ce(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Te(t,e){var r=(180+t[0])/360,n=(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(r*i*8192),Math.round(n*i*8192)]}function Ce(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Se(t,e){for(var r,n,i,o,a,s,l,u=!1,c=0,p=e.length;c0&&s<0||a<0&&s>0}function ke(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===o&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}be(e,t)}function De(t,e,r,n){for(var i=8192*Math.pow(2,n.z),o=[8192*n.x,8192*n.y],a=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ae(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne))throw new ce("Input is not a number.");o=a-1}return 0}$e.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},$e.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new he(e,[t]):"coerce"===r?new ve(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 n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];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=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ue)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof _e&&"error"===e.name)return!1;if(e instanceof xe)return!1;if(e instanceof Re)return!1;var r=e instanceof ve||e instanceof he,n=!0;return e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ue})),!!n&&Fe(e)&&Ne(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new ge;try{o=new ue(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+n+'". 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.")},$e.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new $e(this.registry,n,e||null,i,this.errors)},$e.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Lt(n,t))},$e.prototype.checkSubtype=function(t,e){var r=Kt(t,e);return r&&this.error(r),r};var Ve=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new Ve(i,r,n)},Ve.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Ue(e,n)].evaluate(t)},Ve.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ze=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ge=6/29*3*(6/29),He=Math.PI/180,We=180/Math.PI;function Xe(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ge+4/29}function Ke(t){return t>6/29?t*t*t:Ge*(t-4/29)}function Ye(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Je(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Qe(t){var e=Je(t.r),r=Je(t.g),n=Je(t.b),i=Xe((.4124564*e+.3575761*r+.1804375*n)/.95047),o=Xe((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Xe((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function tr(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Ye(3.2404542*r-1.5371385*e-.4985314*n),Ye(-.969266*r+1.8760108*e+.041556*n),Ye(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function er(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var rr={forward:Qe,reverse:tr,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},nr={forward:function(t){var e=Qe(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*We;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*He,r=t.c;return tr({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:er(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ir=Object.freeze({__proto__:null,lab:rr,hcl:nr}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={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,Bt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=$t:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c=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,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new or(u,r,n,i,l):e.error("Type "+Wt(u)+" is not interpolatable.")},or.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=Ue(e,n),a=or.interpolationFactor(this.interpolation,n,e[o],e[o+1]),s=r[o].evaluate(t),l=r[o+1].evaluate(t);return"interpolate"===this.operator?Ze[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?nr.reverse(nr.interpolate(nr.forward(s),nr.forward(l),a)):rr.reverse(rr.interpolate(rr.forward(s),rr.forward(l),a))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ce("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ce("Array index must be an integer, but found "+e+" instead.");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var cr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};cr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),n=e.parse(t[2],2,Vt);return r&&n?Yt(r.type,[jt,Nt,Bt,Ft,Vt])?new cr(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Wt(r.type)+" instead"):null},cr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Jt(e,["boolean","string","number","null"]))throw new ce("Expected first argument to be of type boolean, string, number or null, but found "+Wt(se(e))+" instead.");if(!Jt(r,["string","array"]))throw new ce("Expected second argument to be of type array or string, but found "+Wt(se(r))+" instead.");return r.indexOf(e)>=0},cr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},cr.prototype.outputDefined=function(){return!0},cr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var pr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};pr.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 r=e.parse(t[1],1,Vt),n=e.parse(t[2],2,Vt);if(!r||!n)return null;if(!Yt(r.type,[jt,Nt,Bt,Ft,Vt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Wt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new pr(r,n,i):null}return new pr(r,n)},pr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Jt(e,["boolean","string","number","null"]))throw new ce("Expected first argument to be of type boolean, string, number or null, but found "+Wt(se(e))+" instead.");if(!Jt(r,["string","array"]))throw new ce("Expected second argument to be of type array or string, but found "+Wt(se(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},pr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},pr.prototype.outputDefined=function(){return!1},pr.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 hr=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};hr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,se(h)))return null}else r=se(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=o.length}var f=e.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,Vt);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(r,d.type)?null:new hr(r,n,d,i,o,m):null},hr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},hr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},hr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},hr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Yt(r.type,[Ht(Vt),Nt,Vt]))return e.error("Expected first argument to be of type array or string, but found "+Wt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new dr(r.type,r,n,i):null}return new dr(r.type,r,n)},dr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Jt(e,["string","array"]))throw new ce("Expected first argument to be of type array or string, but found "+Wt(se(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},dr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},dr.prototype.outputDefined=function(){return!1},dr.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 gr=yr("==",(function(t,e,r){return e===r}),vr),_r=yr("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),xr=yr("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),wr=yr("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Tr=yr(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Cr=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Cr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,Nt)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,Bt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Bt))?null:new Cr(r,i,o,a,s)},Cr.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))},Cr.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)},Cr.prototype.outputDefined=function(){return!1},Cr.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 Sr=function(t){this.type=Bt,this.input=t};Sr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Wt(r.type)+" instead."):new Sr(r):null},Sr.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 ce("Expected value to be of type string or array, but found "+Wt(se(e))+" instead.")},Sr.prototype.eachChild=function(t){t(this.input)},Sr.prototype.outputDefined=function(){return!1},Sr.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Er={"==":gr,"!=":_r,">":br,"<":xr,">=":Tr,"<=":wr,array:he,at:ur,boolean:he,case:fr,coalesce:sr,collator:xe,format:fe,image:de,in:cr,"index-of":pr,interpolate:or,"interpolate-hcl":or,"interpolate-lab":or,length:Sr,let:lr,literal:ue,match:hr,number:he,"number-format":Cr,object:he,slice:dr,step:Ve,string:he,"to-boolean":ve,"to-color":ve,"to-number":ve,"to-string":ve,var:je,within:Re};function Ar(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=oe(r,n,i,a);if(s)throw new ce(s);return new te(r/255*a,n/255*a,i/255*a,a)}function kr(t,e){return t in e}function Ir(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Mr(t){return{result:"success",value:t}}function zr(t){return{result:"error",value:t}}function Or(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Lr(t){return!!t.expression&&t.expression.interpolated}function Rr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Fr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Br(t){return t}function Nr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function jr(t,e,r,n,i){return Nr(typeof r===i?n[r]:void 0,t.default,e.default)}function $r(t,e,r){if("number"!==Rr(r))return Nr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=Ue(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Ur(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==Rr(r))return Nr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o=Ue(t.stops.map((function(t){return t[0]})),r),a=function(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=Ze[e.type]||Br;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=ir[t.colorSpace];u=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 r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,a)}}:u(s,l,a)}function Vr(t,e,r){return"color"===e.type?r=te.parse(r):"formatted"===e.type?r=ne.fromString(r.toString()):"resolvedImage"===e.type?r=ie.fromString(r.toString()):Rr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Nr(r,t.default,e.default)}_e.register(Er,{error:[{kind:"error"},[Nt],function(t,e){throw new ce(e[0].evaluate(t))}],typeof:[Nt,[Vt],function(t,e){return Wt(se(e[0].evaluate(t)))}],"to-rgba":[Ht(Bt,4),[$t],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[$t,[Bt,Bt,Bt],Ar],rgba:[$t,[Bt,Bt,Bt,Bt],Ar],has:{type:jt,overloads:[[[Nt],function(t,e){return kr(e[0].evaluate(t),t.properties())}],[[Nt,Ut],function(t,e){var r=e[1];return kr(e[0].evaluate(t),r.evaluate(t))}]]},get:{type:Vt,overloads:[[[Nt],function(t,e){return Ir(e[0].evaluate(t),t.properties())}],[[Nt,Ut],function(t,e){var r=e[1];return Ir(e[0].evaluate(t),r.evaluate(t))}]]},"feature-state":[Vt,[Nt],function(t,e){return Ir(e[0].evaluate(t),t.featureState||{})}],properties:[Ut,[],function(t){return t.properties()}],"geometry-type":[Nt,[],function(t){return t.geometryType()}],id:[Vt,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],"heatmap-density":[Bt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Vt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n":[jt,[Nt,Vt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],"filter-id->":[jt,[Vt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[jt,[Nt,Vt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[jt,[Vt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[jt,[Nt,Vt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[jt,[Vt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[jt,[Vt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[jt,[Ht(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[jt,[Ht(Vt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[jt,[Nt,Ht(Vt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[jt,[Nt,Ht(Vt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[1];return e[0].evaluate(t)&&r.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in Er}function Gr(t,e){var r=new $e(Er,[],e?function(t){var e={color:$t,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Zt,resolvedImage:Gt};return"array"===t.type?Ht(e[t.value]||Vt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Mr(new qr(n,e)):zr(r.errors)}qr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},qr.prototype.evaluate=function(t,e,r,n,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,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 ce("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),this._defaultValue}};var Hr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Be(e.expression)};Hr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},Hr.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)};var Wr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Be(e.expression),this.interpolationType=n};function Xr(t,e){if("error"===(t=Gr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!Or(e))return zr([new Lt("","data expressions not supported")]);var i=Ne(r,["zoom"]);if(!i&&!Dr(e))return zr([new Lt("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof lr)r=t(e.result);else if(e instanceof sr)for(var n=0,i=e.args;nn.maximum?[new Pt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function tn(t){var e,r,n,i=t.valueSpec,o=Ot(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Rr(t.value.stops)&&"array"===Rr(t.value.stops[0])&&"object"===Rr(t.value.stops[0][0]),c=Yr({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 Pt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Jr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Rr(r)&&0===r.length&&e.push(new Pt(t.key,r,"array must have at least one stop")),e},default:function(t){return Tn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Pt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Pt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Lr(t.valueSpec)&&c.push(new Pt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Or(t.valueSpec)?c.push(new Pt(t.key,t.value,"property functions not supported")):s&&!Dr(t.valueSpec)&&c.push(new Pt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Pt(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Rr(o))return[new Pt(s,o,"array expected, "+Rr(o)+" found")];if(2!==o.length)return[new Pt(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Rr(o[0]))return[new Pt(s,o,"object expected, "+Rr(o[0])+" found")];if(void 0===o[0].zoom)return[new Pt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Pt(s,o,"object stop key must have value")];if(n&&n>Ot(o[0].zoom))return[new Pt(s,o[0].zoom,"stop zoom values must appear in ascending order")];Ot(o[0].zoom)!==n&&(n=Ot(o[0].zoom),r=void 0,a={}),e=e.concat(Yr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Qr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Zr(Dt(o[1]))?e.concat([new Pt(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Tn({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Rr(t.value),l=Ot(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new Pt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Pt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Or(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pt(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l=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,r=t.slice(1);ee?1:0}function ln(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?un(t[1],t[2],"=="):"!="===r?hn(un(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?un(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(ln))):"all"===r?["all"].concat(t.slice(1).map(ln)):"none"===r?["all"].concat(t.slice(1).map(ln).map(hn)):"in"===r?cn(t[1],t.slice(2)):"!in"===r?hn(cn(t[1],t.slice(2))):"has"===r?pn(t[1]):"!has"===r?hn(pn(t[1])):"within"!==r||t}function un(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function cn(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(sn)]]:["filter-in-small",t,["literal",e]]}}function pn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function hn(t){return["!",t]}function fn(t){return nn(Dt(t.value))?en(zt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==Rr(r))return[new Pt(n,r,"array expected, "+Rr(r)+" found")];var i,o=e.styleSpec,a=[];if(r.length<1)return[new Pt(n,r,"filter array must have at least 1 element")];switch(a=a.concat(rn({key:n+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ot(r[1])&&a.push(new Pt(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new Pt(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=Rr(r[1]))&&a.push(new Pt(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s=c[f+0]&&n>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),p=this._convertToCellCoord(n),h=l;h<=c;h++)for(var f=u;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,r,n,d,o,a,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var c=t[u];l[u]=Fn[s].shallow.indexOf(u)>=0?c:Un(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function Vn(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||jn(t)||$n(t)||ArrayBuffer.isView(t)||t instanceof Ln)return t;if(Array.isArray(t))return t.map(Vn);if("object"==typeof t){var e=t.$name||"Object",r=Fn[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,o=Object.keys(t);i=0?s:Vn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var qn=function(){this.first=!0};qn.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=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 Gn(t){for(var e=0,r=t;e=65097&&t<=65103)||Zn["CJK Compatibility Ideographs"](t)||Zn["CJK Compatibility"](t)||Zn["CJK Radicals Supplement"](t)||Zn["CJK Strokes"](t)||!(!Zn["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Zn["CJK Unified Ideographs Extension A"](t)||Zn["CJK Unified Ideographs"](t)||Zn["Enclosed CJK Letters and Months"](t)||Zn["Hangul Compatibility Jamo"](t)||Zn["Hangul Jamo Extended-A"](t)||Zn["Hangul Jamo Extended-B"](t)||Zn["Hangul Jamo"](t)||Zn["Hangul Syllables"](t)||Zn.Hiragana(t)||Zn["Ideographic Description Characters"](t)||Zn.Kanbun(t)||Zn["Kangxi Radicals"](t)||Zn["Katakana Phonetic Extensions"](t)||Zn.Katakana(t)&&12540!==t||!(!Zn["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)||!(!Zn["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Zn["Unified Canadian Aboriginal Syllabics"](t)||Zn["Unified Canadian Aboriginal Syllabics Extended"](t)||Zn["Vertical Forms"](t)||Zn["Yijing Hexagram Symbols"](t)||Zn["Yi Syllables"](t)||Zn["Yi Radicals"](t))))}function Wn(t){return!(Hn(t)||function(t){return!!(Zn["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Zn["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)||Zn["Letterlike Symbols"](t)||Zn["Number Forms"](t)||Zn["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)||Zn["Control Pictures"](t)&&9251!==t||Zn["Optical Character Recognition"](t)||Zn["Enclosed Alphanumerics"](t)||Zn["Geometric Shapes"](t)||Zn["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Zn["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Zn["CJK Symbols and Punctuation"](t)||Zn.Katakana(t)||Zn["Private Use Area"](t)||Zn["CJK Compatibility Forms"](t)||Zn["Small Form Variants"](t)||Zn["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 Xn(t){return t>=1424&&t<=2303||Zn["Arabic Presentation Forms-A"](t)||Zn["Arabic Presentation Forms-B"](t)}function Kn(t,e){return!(!e&&Xn(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Zn.Khmer(t))}function Yn(t){for(var e=0,r=t;e-1&&(Qn="error"),Jn&&Jn(t)};function ri(){ni.fire(new Et("pluginStateChange",{pluginStatus:Qn,pluginURL:ti}))}var ni=new kt,ii=function(){return Qn},oi=function(){if("deferred"!==Qn||!ti)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Qn="loading",ri(),ti&&xt({url:ti},(function(t){t?ei(t):(Qn="loaded",ri())}))},ai={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Qn||null!=ai.applyArabicShaping},isLoading:function(){return"loading"===Qn},setState:function(t){Qn=t.pluginStatus,ti=t.pluginURL},isParsed:function(){return null!=ai.applyArabicShaping&&null!=ai.processBidirectionalText&&null!=ai.processStyledBidirectionalText},getPluginURL:function(){return ti}},si=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 qn,this.transition={})};si.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var li=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Fr(t))return new Kr(t,e);if(Zr(t)){var r=Xr(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=te.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};li.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},li.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var ui=function(t){this.property=t,this.value=new li(t,void 0)};ui.prototype.transitioned=function(t,e){return new pi(this.property,this.value,e,h({},t.transition,this.transition),t.now)},ui.prototype.untransitioned=function(){return new pi(this.property,this.value,null,{},0)};var ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};ci.prototype.getValue=function(t){return b(this._values[t].value.value)},ci.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new ui(this._values[t].property)),this._values[t].value=new li(this._values[t].property,null===e?void 0:b(e))},ci.prototype.getTransition=function(t){return b(this._values[t].transition)},ci.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new ui(this._values[t].property)),this._values[t].transition=b(e)||void 0},ci.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(a))}return i};var hi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};hi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new mi(this._properties),i=0,o=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(yi),_i=function(t){this.specification=t};_i.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new si(Math.floor(e.zoom-1),e)),t.expression.evaluate(new si(Math.floor(e.zoom),e)),t.expression.evaluate(new si(Math.floor(e.zoom+1),e)),e)}},_i.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},_i.prototype.interpolate=function(t){return t};var xi=function(t){this.specification=t};xi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},xi.prototype.interpolate=function(){return!1};var bi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new li(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new ui(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Bn("DataDrivenProperty",yi),Bn("DataConstantProperty",vi),Bn("CrossFadedDataDrivenProperty",gi),Bn("CrossFadedProperty",_i),Bn("ColorRampProperty",xi);var wi=function(t){function e(e,r){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),r.layout&&(this._unevaluatedLayout=new fi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new ci(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new mi(r.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,r){void 0===r&&(r={}),null!=e&&this._validate(Mn,"layers."+this.id+".layout."+t,t,e,r)||("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,r){if(void 0===r&&(r={}),null!=e&&this._validate(Pn,"layers."+this.id+".paint."+t,t,e,r))return!1;if(g(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var n=this._transitionablePaint._values[t],i="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.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,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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)},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,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&zn(this,t.call(kn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:It,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 di&&Or(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(kt),Ti={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Si=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ei(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i=Ti[t.type].BYTES_PER_ELEMENT,o=r=Ai(r,Math.max(e,i)),a=t.components||1;return n=Math.max(n,i),r+=i*a,{name:t.name,type:t.type,components:a,offset:o}})),size:Ai(r,Math.max(n,e)),alignment:e}}function Ai(t,e){return Math.ceil(t/e)*e}Si.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Si.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},Si.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Si.prototype.clear=function(){this.length=0},Si.prototype.resize=function(t){this.reserve(t),this.length=t},Si.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)}},Si.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 r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Si);ki.prototype.bytesPerElement=4,Bn("StructArrayLayout2i4",ki);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,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,t},e}(Si);Ii.prototype.bytesPerElement=8,Bn("StructArrayLayout4i8",Ii);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,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Si);Pi.prototype.bytesPerElement=12,Bn("StructArrayLayout2i4i12",Pi);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)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,t},e}(Si);Mi.prototype.bytesPerElement=8,Bn("StructArrayLayout2i4ub8",Mi);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 r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Si);zi.prototype.bytesPerElement=8,Bn("StructArrayLayout2f8",zi);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.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,o,a,s,l,u)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c){var p=10*t;return this.uint16[p+0]=e,this.uint16[p+1]=r,this.uint16[p+2]=n,this.uint16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.uint16[p+8]=u,this.uint16[p+9]=c,t},e}(Si);Oi.prototype.bytesPerElement=20,Bn("StructArrayLayout10ui20",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.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,o,a,s,l,u,c,p)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p,h){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=p,this.int16[f+11]=h,t},e}(Si);Di.prototype.bytesPerElement=24,Bn("StructArrayLayout4i4ui4i24",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.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Si);Li.prototype.bytesPerElement=12,Bn("StructArrayLayout3f12",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.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}(Si);Ri.prototype.bytesPerElement=4,Bn("StructArrayLayout1ul4",Ri);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.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,o,a,s,l)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u){var c=10*t,p=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(Si);Fi.prototype.bytesPerElement=20,Bn("StructArrayLayout6i1ul2ui20",Fi);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.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Si);Bi.prototype.bytesPerElement=12,Bn("StructArrayLayout2i2i2i12",Bi);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.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[s+6]=i,this.int16[s+7]=o,t},e}(Si);Ni.prototype.bytesPerElement=16,Bn("StructArrayLayout2f1f2i16",Ni);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.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[a+1]=n,this.float32[a+2]=i,t},e}(Si);ji.prototype.bytesPerElement=12,Bn("StructArrayLayout2ub2f12",ji);var $i=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,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Si);$i.prototype.bytesPerElement=6,Bn("StructArrayLayout3ui6",$i);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,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y){var g=24*t,_=12*t,x=48*t;return this.int16[g+0]=e,this.int16[g+1]=r,this.uint16[g+2]=n,this.uint16[g+3]=i,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[g+10]=l,this.uint16[g+11]=u,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]=v,this.int16[g+22]=y,t},e}(Si);Ui.prototype.bytesPerElement=48,Bn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",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.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,T,C,S,E,A){var k=this.length;return this.resize(k+1),this.emplace(k,t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,T,C,S,E,A)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,T,C,S,E,A,k){var I=34*t,P=17*t;return this.int16[I+0]=e,this.int16[I+1]=r,this.int16[I+2]=n,this.int16[I+3]=i,this.int16[I+4]=o,this.int16[I+5]=a,this.int16[I+6]=s,this.int16[I+7]=l,this.uint16[I+8]=u,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]=v,this.uint16[I+16]=y,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]=T,this.uint32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=E,this.float32[P+15]=A,this.float32[P+16]=k,t},e}(Si);Vi.prototype.bytesPerElement=68,Bn("StructArrayLayout8i15ui1ul4f68",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.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}(Si);qi.prototype.bytesPerElement=4,Bn("StructArrayLayout1f4",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.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Si);Zi.prototype.bytesPerElement=6,Bn("StructArrayLayout3i6",Zi);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.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t},e}(Si);Gi.prototype.bytesPerElement=8,Bn("StructArrayLayout1ul2ui8",Gi);var Hi=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 r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Si);Hi.prototype.bytesPerElement=4,Bn("StructArrayLayout2ui4",Hi);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){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}(Si);Wi.prototype.bytesPerElement=2,Bn("StructArrayLayout1ui2",Wi);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,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,t},e}(Si);Xi.prototype.bytesPerElement=16,Bn("StructArrayLayout4f16",Xi);var Ki=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);Ki.prototype.size=20;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.get=function(t){return new Ki(this,t)},e}(Fi);Bn("CollisionBoxArray",Yi);var Ji=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);Ji.prototype.size=48;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 Ji(this,t)},e}(Ui);Bn("PlacedSymbolArray",Qi);var to=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={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 r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);to.prototype.size=68;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.get=function(t){return new to(this,t)},e}(Vi);Bn("SymbolInstanceArray",eo);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.getoffsetX=function(t){return this.float32[1*t+0]},e}(qi);Bn("GlyphOffsetArray",ro);var no=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}(Zi);Bn("SymbolLineVertexArray",no);var io=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);io.prototype.size=8;var oo=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 io(this,t)},e}(Gi);Bn("FeatureIndexArray",oo);var ao=Ei([{name:"a_pos",components:2,type:"Int16"}],4).members,so=function(t){void 0===t&&(t=[]),this.segments=t};function lo(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}so.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>so.MAX_VERTEX_ARRAY_LENGTH&&T("Max vertices per segment is "+so.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>so.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},so.prototype.get=function(){return this.segments},so.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>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}})),po=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,o=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++o;switch(n){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}})),ho=co,fo=po;ho.murmur3=co,ho.murmur2=fo;var mo=function(){this.ids=[],this.positions=[],this.indexed=!1};mo.prototype.add=function(t,e,r,n){this.ids.push(yo(t)),this.positions.push(e,r,n)},mo.prototype.getPositions=function(t){for(var e=yo(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var o=[];this.ids[r]===e;)o.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return o},mo.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],a=n-1,s=i+1;;){do{a++}while(e[a]o);if(a>=s)break;go(e,a,s),go(r,3*a,3*s),go(r,3*a+1,3*s+1),go(r,3*a+2,3*s+2)}s-na.x+1||la.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function $o(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?jo(t):[]}}function Uo(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Vo=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 $i,this.segments=new so,this.programConfigurations=new Lo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function qo(t,e){for(var r=0;r1){if(Wo(t,e))return!0;for(var n=0;n1?r:r.sub(e)._mult(i)._add(e))}function Jo(t,e){for(var r,n,i,o=!1,a=0;ae.y!=(i=r[l]).y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function Qo(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function ta(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var o=C(t,e,r[0]);return o!==C(t,e,r[1])||o!==C(t,e,r[2])||o!==C(t,e,r[3])}function ea(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function ra(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function na(t,e,r,n,o){if(!e[0]&&!e[1])return t;var a=i.convert(e)._mult(o);"viewport"===r&&a._rotate(-n);for(var s=[],l=0;l=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;Uo(this.layoutVertexArray,u,c,-1,-1),Uo(this.layoutVertexArray,u,c,1,-1),Uo(this.layoutVertexArray,u,c,1,1),Uo(this.layoutVertexArray,u,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,r,{},n)},Bn("CircleBucket",Vo,{omit:["layers"]});var ia=new bi({"circle-sort-key":new yi(It.layout_circle["circle-sort-key"])}),oa={paint:new bi({"circle-radius":new yi(It.paint_circle["circle-radius"]),"circle-color":new yi(It.paint_circle["circle-color"]),"circle-blur":new yi(It.paint_circle["circle-blur"]),"circle-opacity":new yi(It.paint_circle["circle-opacity"]),"circle-translate":new vi(It.paint_circle["circle-translate"]),"circle-translate-anchor":new vi(It.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new vi(It.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new vi(It.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new yi(It.paint_circle["circle-stroke-width"]),"circle-stroke-color":new yi(It.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new yi(It.paint_circle["circle-stroke-opacity"])}),layout:ia},aa="undefined"!=typeof Float32Array?Float32Array:Array;function sa(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 la(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],v=e[13],y=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*n+x*s+b*p+w*m,t[1]=_*i+x*l+b*h+w*v,t[2]=_*o+x*u+b*f+w*y,t[3]=_*a+x*c+b*d+w*g,t[4]=(_=r[4])*n+(x=r[5])*s+(b=r[6])*p+(w=r[7])*m,t[5]=_*i+x*l+b*h+w*v,t[6]=_*o+x*u+b*f+w*y,t[7]=_*a+x*c+b*d+w*g,t[8]=(_=r[8])*n+(x=r[9])*s+(b=r[10])*p+(w=r[11])*m,t[9]=_*i+x*l+b*h+w*v,t[10]=_*o+x*u+b*f+w*y,t[11]=_*a+x*c+b*d+w*g,t[12]=(_=r[12])*n+(x=r[13])*s+(b=r[14])*p+(w=r[15])*m,t[13]=_*i+x*l+b*h+w*v,t[14]=_*o+x*u+b*f+w*y,t[15]=_*a+x*c+b*d+w*g,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var ua,ca=la;function pa(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}ua=new aa(3),aa!=Float32Array&&(ua[0]=0,ua[1]=0,ua[2]=0),function(){var t=new aa(4);aa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var ha=(function(){var t=new aa(2);aa!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,oa)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Vo(t)},e.prototype.queryRadius=function(t){var e=t;return ea("circle-radius",this,e)+ea("circle-stroke-width",this,e)+ra(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a,s){for(var l=na(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return t.map((function(t){return fa(t,e)}))}(l,s),h=c?u*a:u,f=0,d=n;ft.width||i.height>t.height||r.x>t.width-i.width||r.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||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l80*r){n=o=t[0],i=a=t[1];for(var d=r;do&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-i))?1/u:0}return Ma(h,f,r,n,i,u),f}function Ia(t,e,r,n,i){var o,a;if(i===Qa(t,e,r,n)>0)for(o=e;o=e;o-=n)a=Ka(o,t[o],t[o+1],a);return a&&qa(a,a.next)&&(Ya(a),a=a.next),a}function Pa(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!qa(n,n.next)&&0!==Va(n.prev,n,n.next))n=n.next;else{if(Ya(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function Ma(t,e,r,n,i,o,a){if(t){!a&&o&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Na(i.x,i.y,e,r,n)),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,r,n,i,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(a>1)}(i)}(t,n,i,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?Oa(t,n,i,o):za(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ya(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Ma(t=Da(Pa(t),e,r),e,r,n,i,o,2):2===a&&La(t,e,r,n,i,o):Ma(Pa(t),e,r,n,i,o,1);break}}}function za(t){var e=t.prev,r=t,n=t.next;if(Va(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if($a(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Va(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Oa(t,e,r,n){var i=t.prev,o=t,a=t.next;if(Va(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,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=Na(i.x=u&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&$a(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Va(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&$a(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Va(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&$a(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Va(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&$a(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Va(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Da(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!qa(i,o)&&Za(i,n,n.next,o)&&Wa(i,o)&&Wa(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),Ya(n),Ya(n.next),n=t=o),n=n.next}while(n!==t);return Pa(n)}function La(t,e,r,n,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Ua(a,s)){var l=Xa(a,s);return a=Pa(a,a.next),l=Pa(l,l.next),Ma(a,e,r,n,i,o),void Ma(l,e,r,n,i,o)}s=s.next}a=a.next}while(a!==t)}function Ra(t,e){return t.x-e.x}function Fa(t,e){if(e=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&i!==n.x&&$a(or.x||n.x===r.x&&Ba(r,n)))&&(r=n,h=l)),n=n.next}while(n!==u);return r}(t,e)){var r=Xa(e,t);Pa(e,e.next),Pa(r,r.next)}}function Ba(t,e){return Va(t.prev,t,e.prev)<0&&Va(e.next,t,t.next)<0}function Na(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function ja(t){var e=t,r=t;do{(e.x=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function Ua(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Za(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(Wa(t,e)&&Wa(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Va(t.prev,t,e.prev)||Va(t,e.prev,e))||qa(t,e)&&Va(t.prev,t,t.next)>0&&Va(e.prev,e,e.next)>0)}function Va(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function qa(t,e){return t.x===e.x&&t.y===e.y}function Za(t,e,r,n){var i=Ha(Va(t,e,r)),o=Ha(Va(t,e,n)),a=Ha(Va(r,n,t)),s=Ha(Va(r,n,e));return i!==o&&a!==s||!(0!==i||!Ga(t,r,e))||!(0!==o||!Ga(t,n,e))||!(0!==a||!Ga(r,t,n))||!(0!==s||!Ga(r,e,n))}function Ga(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Ha(t){return t>0?1:t<0?-1:0}function Wa(t,e){return Va(t.prev,t,t.next)<0?Va(t,e,t.next)>=0&&Va(t,t.prev,e)>=0:Va(t,e,t.prev)<0||Va(t,t.next,e)<0}function Xa(t,e){var r=new Ja(t.i,t.x,t.y),n=new Ja(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Ka(t,e,r,n){var i=new Ja(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ya(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 Ja(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Qa(t,e,r,n){for(var i=0,o=e,a=r-n;on;){if(i-n>600){var a=i-n+1,s=r-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*u/a+c)),Math.min(i,Math.floor(r+(a-s)*u/a+c)),o)}var p=e[r],h=n,f=i;for(es(e,n,r),o(e[i],p)>0&&es(e,n,i);h0;)f--}0===o(e[n],p)?es(e,n,f):es(e,++f,i),f<=r&&(n=f+1),r<=f&&(i=f-1)}}(t,e,r||0,n||t.length-1,i||rs)}function es(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function rs(t,e){return te?1:0}function ns(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,o=[],a=0;a1)for(var l=0;l0&&r.holes.push(n+=t[i-1].length)}return r},Ea.default=Aa;var ss=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 $i,this.indexArray2=new Hi,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new so,this.segments2=new so,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ss.prototype.populate=function(t,e,r){this.hasPattern=os("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=t;o>3}if(o--,1===n||2===n)a+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(a,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},fs.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(o+=t.readSVarint())u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},fs.prototype.toGeoJSON=function(t,e,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=fs.types[this.type];function c(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function _s(t,e,r){if(3===t){var n=new vs(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}ys.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 hs(this._pbf,e,this.extent,this._keys,this._values)};var xs={VectorTile:function(t,e){this.layers=t.readFields(_s,{},e)},VectorTileFeature:hs,VectorTileLayer:vs},bs=xs.VectorTileFeature.types,ws=Math.pow(2,13);function Ts(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,2*Math.floor(n*ws)+a,i*ws*2,o*ws*2,Math.round(s))}var Cs=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 Pi,this.indexArray=new $i,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new so,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Ss(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}Cs.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=os("fill-extrusion",this.layers,e);for(var n=0,i=t;n8192}))||z.every((function(t){return t.y<0}))||z.every((function(t){return t.y>8192}))))for(var m=0,v=0;v=1){var g=d[v-1];if(!Ss(y,g)){p.vertexLength+4>so.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=y.sub(g)._perp()._unit(),x=g.dist(y);m+x>32768&&(m=0),Ts(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,0,m),Ts(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,1,m),Ts(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m+=x),Ts(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+l>so.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===bs[t.type]){for(var w=[],T=[],C=p.vertexLength,S=0,E=s;S=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u0;if(T&&y>u){var S=c.dist(f);if(S>2*p){var E=c.sub(c.sub(f)._mult(p/S)._round());this.updateDistance(f,E),this.addCurrentVertex(E,m,0,0,h),f=E}}var A=f&&d,k=A?r:s?"butt":n;if(A&&"round"===k&&(bi&&(k="bevel"),"bevel"===k&&(b>2&&(k="flipbevel"),b100)g=v.mult(-1);else{var I=b*m.add(v).mag()/m.sub(v).mag();g._perp()._mult(I*(C?-1:1))}this.addCurrentVertex(c,g,0,0,h),this.addCurrentVertex(c,g.mult(-1),0,0,h)}else if("bevel"===k||"fakeround"===k){var P=-Math.sqrt(b*b-1),M=C?P:0,z=C?0:P;if(f&&this.addCurrentVertex(c,m,M,z,h),"fakeround"===k)for(var O=Math.round(180*w/Math.PI/20),D=1;D2*p){var j=c.add(d.sub(c)._mult(p/N)._round());this.updateDistance(c,j),this.addCurrentVertex(j,v,0,0,h),c=j}}}}},Ls.prototype.addCurrentVertex=function(t,e,r,n,i,o){void 0===o&&(o=!1);var a=e.y*n-e.x,s=-e.y-e.x*n;this.addHalfVertex(t,e.x+e.y*r,e.y-e.x*r,o,!1,r,i),this.addHalfVertex(t,a,s,o,!0,-n,i),this.distance>Ds/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,o))},Ls.prototype.addHalfVertex=function(t,e,r,n,i,o,a){var s=.5*(this.lineClips?this.scaledDistance*(Ds-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t.x<<1)+(n?1:0),(t.y<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+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 l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),i?this.e2=l:this.e1=l},Ls.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ls.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Bn("LineBucket",Ls,{omit:["layers","patternFeatures"]});var Rs=new bi({"line-cap":new vi(It.layout_line["line-cap"]),"line-join":new yi(It.layout_line["line-join"]),"line-miter-limit":new vi(It.layout_line["line-miter-limit"]),"line-round-limit":new vi(It.layout_line["line-round-limit"]),"line-sort-key":new yi(It.layout_line["line-sort-key"])}),Fs={paint:new bi({"line-opacity":new yi(It.paint_line["line-opacity"]),"line-color":new yi(It.paint_line["line-color"]),"line-translate":new vi(It.paint_line["line-translate"]),"line-translate-anchor":new vi(It.paint_line["line-translate-anchor"]),"line-width":new yi(It.paint_line["line-width"]),"line-gap-width":new yi(It.paint_line["line-gap-width"]),"line-offset":new yi(It.paint_line["line-offset"]),"line-blur":new yi(It.paint_line["line-blur"]),"line-dasharray":new _i(It.paint_line["line-dasharray"]),"line-pattern":new gi(It.paint_line["line-pattern"]),"line-gradient":new xi(It.paint_line["line-gradient"])}),layout:Rs},Bs=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,r){return r=new si(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(yi))(Fs.paint.properties["line-width"].specification);Bs.useIntegerZoom=!0;var Ns=function(t){function e(e){t.call(this,e,Fs),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 Ve,this.gradientVersion=(this.gradientVersion+1)%s)},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Bs.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ls(t)},e.prototype.queryRadius=function(t){var e=t,r=js(ea("line-width",this,e),ea("line-gap-width",this,e)),n=ea("line-offset",this,e);return r/2+Math.abs(n)+ra(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,o,a,s){var l=na(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*js(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(n=function(t,e){for(var r=[],n=new i(0,0),o=0;o=3)for(var o=0;o0?e+2*t:t}var $s=Ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Us=Ei([{name:"a_projected_pos",components:3,type:"Float32"}],4),Vs=(Ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),qs=(Ei([{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"}]),Ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Zs=Ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Gs(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),ai.applyArabicShaping&&(t=ai.applyArabicShaping(t)),t}(t.text,e,r)})),t}Ei([{name:"triangle",components:3,type:"Uint16"}]),Ei([{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"}]),Ei([{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"}]),Ei([{type:"Float32",name:"offsetX"}]),Ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Hs={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Ws=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,c=-7,p=r?i-1:0,h=r?-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+=n;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},Xs=function(t,e,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?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*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m},Ks=Ys;function Ys(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Ys.Varint=0,Ys.Fixed64=1,Ys.Bytes=2,Ys.Fixed32=5;var Js="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Qs(t){return t.type===Ys.Bytes?t.readVarint()+t.pos:t.pos+1}function tl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function el(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function rl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function fl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function dl(t,e,r){1===t&&r.readMessage(ml,e)}function ml(t,e,r){if(3===t){var n=r.readMessage(vl,{}),i=n.width,o=n.height,a=n.left,s=n.top,l=n.advance;e.push({id:n.id,bitmap:new ga({width:i+6,height:o+6},n.bitmap),metrics:{width:i,height:o,left:a,top:s,advance:l}})}}function vl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function yl(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,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>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=pl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=fl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*pl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*fl(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,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return tl(t,n,e);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return tl(t,n,e);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return tl(t,n,e);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return tl(t,n,e);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return tl(t,n,e);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return tl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[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&&Js?function(t,e,r){return Js.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[i+2],128==(192&(o=t[i+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[i+2],s=t[i+3],128==(192&(o=t[i+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}(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!==Ys.Bytes)return t.push(this.readVarint(e));var r=Qs(this);for(t=t||[];this.pos127;);else if(e===Ys.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Ys.Fixed32)this.pos+=4;else{if(e!==Ys.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;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,r.buf[r.pos]=127&(t>>>=7)}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&el(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Xs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Xs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&el(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Ys.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,nl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,cl,e)},writeBytesField:function(t,e){this.writeTag(t,Ys.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Ys.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Ys.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Ys.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Ys.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Ys.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Ys.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Ys.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Ys.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Ys.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var gl=function(t,e){var r=e.pixelRatio,n=e.version,i=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=i,this.stretchY=o,this.content=a,this.version=n},_l={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};_l.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},_l.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},_l.tlbr.get=function(){return this.tl.concat(this.br)},_l.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(gl.prototype,_l);var xl=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var o=yl(i),a=new _a({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=r[s].paddedRect;_a.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=n[c].paddedRect,f=h.x+1,d=h.y+1,m=p.data.width,v=p.data.height;_a.copy(p.data,a,{x:0,y:0},{x:f,y:d},p.data),_a.copy(p.data,a,{x:0,y:v-1},{x:f,y:d-1},{width:m,height:1}),_a.copy(p.data,a,{x:0,y:0},{x:f,y:d+v},{width:m,height:1}),_a.copy(p.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:v}),_a.copy(p.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:v})}this.image=a,this.iconPositions=r,this.patternPositions=n};xl.prototype.addImages=function(t,e,r){for(var n in t){var i=t[n],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(o),e[n]=new gl(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},xl.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},xl.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var n=t.tl;r.update(e.data,void 0,{x:n[0],y:n[1]})}},Bn("ImagePosition",gl),Bn("ImageAtlas",xl);var bl={horizontal:1,vertical:2,horizontalOnly:3},wl=function(){this.scale=1,this.fontStack="",this.imageName=null};wl.forText=function(t,e){var r=new wl;return r.scale=t||1,r.fontStack=e,r},wl.forImage=function(t){var e=new wl;return e.imageName=t,e};var Tl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Cl(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m){var v,y=Tl.fromFeature(t,i);p===bl.vertical&&y.verticalizePunctuation();var g=ai.processBidirectionalText,_=ai.processStyledBidirectionalText;if(g&&1===y.sections.length){v=[];for(var x=0,b=g(y.toString(),Ml(y,u,o,e,n,f,d));x0&&B>S&&(S=B)}else{var N=r[A.fontStack],j=N&&N[I];if(j&&j.rect)z=j.rect,M=j.metrics;else{var $=e[A.fontStack],U=$&&$[I];if(!U)continue;M=U.metrics}P=24*(b-A.scale)}L?(t.verticalizable=!0,C.push({glyph:I,imageName:O,x:h,y:f+P,vertical:L,scale:A.scale,fontStack:A.fontStack,sectionIndex:k,metrics:M,rect:z}),h+=D*A.scale+u):(C.push({glyph:I,imageName:O,x:h,y:f+P,vertical:L,scale:A.scale,fontStack:A.fontStack,sectionIndex:k,metrics:M,rect:z}),h+=M.advance*A.scale+u)}0!==C.length&&(d=Math.max(h-u,d),Ol(C,0,C.length-1,v,S)),h=0;var V=o*b+S;T.lineOffset=Math.max(S,w),f+=V,m=Math.max(V,m),++y}else f+=o,++y}var q,Z=f- -17,G=zl(a),H=G.horizontalAlign,W=G.verticalAlign;(function(t,e,r,n,i,o,a,s,l){var u,c=(e-r)*i;u=o!==a?-s*n- -17:(-n*l+.5)*a;for(var p=0,h=t;p=0&&n>=t&&Sl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Tl.prototype.substring=function(t,e){var r=new Tl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Tl.prototype.toString=function(){return this.text},Tl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Tl.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(wl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var Sl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},El={};function Al(t,e,r,n,i,o){if(e.imageName){var a=n[e.imageName];return a?a.displaySize[0]*e.scale*24/o+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function kl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,p=0,h=0;h-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=c.dist(p)}return!0}function $l(t){for(var e=0,r=0;ru){var d=(u-l)/f,m=qe(p.x,h.x,d),v=qe(p.y,h.y,d),y=new Ll(m,v,h.angleTo(p),c);return y._round(),!a||jl(t,y,s,a,e)?y:void 0}l+=f}}function Zl(t,e,r,n,i,o,a,s,l){var u=Ul(n,o,a),c=Vl(n,i),p=c*a,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-p=0&&b=0&&w=0&&f+c<=p){var T=new Ll(b,w,_,m);T._round(),i&&!jl(e,T,a,i,o)||d.push(T)}}h+=g}return l||d.length||s||(d=t(e,h/2,n,i,o,a,s,!0,u)),d}(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,u,r,p,h,!1,l)}function Gl(t,e,r,n,o){for(var a=[],s=0;s=n&&h.x>=n||(p.x>=n?p=new i(n,p.y+(n-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=n&&(h=new i(n,p.y+(n-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()),u&&p.equals(u[u.length-1])||a.push(u=[p]),u.push(h)))))}return a}function Hl(t,e,r,n){var o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=t.right-t.left,p=t.bottom-t.top,h=a.stretchX||[[0,l]],f=a.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),v=f.reduce(d,0),y=l-m,g=u-v,_=0,x=m,b=0,w=v,T=0,C=y,S=0,E=g;if(a.content&&n){var A=a.content;_=Wl(h,0,A[0]),b=Wl(f,0,A[1]),x=Wl(h,A[0],A[2]),w=Wl(f,A[1],A[3]),T=A[0]-_,S=A[1]-b,C=A[2]-A[0]-x,E=A[3]-A[1]-w}var k=function(n,o,l,u){var h=Kl(n.stretch-_,x,c,t.left),f=Yl(n.fixed-T,C,n.stretch,m),d=Kl(o.stretch-b,w,p,t.top),y=Yl(o.fixed-S,E,o.stretch,v),g=Kl(l.stretch-_,x,c,t.left),A=Yl(l.fixed-T,C,l.stretch,m),k=Kl(u.stretch-b,w,p,t.top),I=Yl(u.fixed-S,E,u.stretch,v),P=new i(h,d),M=new i(g,d),z=new i(g,k),O=new i(h,k),D=new i(f/s,y/s),L=new i(A/s,I/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];P._matMult(N),M._matMult(N),O._matMult(N),z._matMult(N)}var j=n.stretch+n.fixed,$=o.stretch+o.fixed;return{tl:P,tr:M,bl:O,br:z,tex:{x:a.paddedRect.x+1+j,y:a.paddedRect.y+1+$,w:l.stretch+l.fixed-j,h:u.stretch+u.fixed-$},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:L,minFontScaleX:C/s/c,minFontScaleY:E/s/p,isSDF:r}};if(n&&(a.stretchX||a.stretchY))for(var I=Xl(h,y,m),P=Xl(f,g,v),M=0;M0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-l,v=a.bottom*s+l,y=a.left*s-l,g=a.right*s+l,_=a.collisionPadding;if(_&&(y-=_[0]*s,m-=_[1]*s,g+=_[2]*s,v+=_[3]*s),c){var x=new i(y,m),b=new i(g,m),w=new i(y,v),T=new i(g,v),C=c*Math.PI/180;x._rotate(C),b._rotate(C),w._rotate(C),T._rotate(C),y=Math.min(x.x,b.x,w.x,T.x),g=Math.max(x.x,b.x,w.x,T.x),m=Math.min(x.y,b.y,w.y,T.y),v=Math.max(x.y,b.y,w.y,T.y)}t.emplaceBack(e.x,e.y,y,m,g,v,r,n,o)}this.boxEndIndex=t.length},Ql=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=tu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function tu(t,e){return te?1:0}function eu(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;ua)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-n,s-o),h=p/2,f=new Ql([],ru);if(0===p)return new i(n,o);for(var d=n;dv.d||!v.d)&&(v=y),y.max-v.d<=e||(f.push(new nu(y.p.x-(h=y.h/2),y.p.y-h,h,t)),f.push(new nu(y.p.x+h,y.p.y-h,h,t)),f.push(new nu(y.p.x-h,y.p.y+h,h,t)),f.push(new nu(y.p.x+h,y.p.y+h,h,t)),4)}return v.p}function ru(t,e){return e.max-t.max}function nu(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,Yo(t,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Ql.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Ql.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}},Ql.prototype.peek=function(){return this.data[0]},Ql.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n},Ql.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=a,t=o}e[t]=i};var iu=Number.POSITIVE_INFINITY;function ou(t,e){return e[1]!==iu?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-e;break;case"top":n=e-7}switch(t){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=e;break;case"right":r=-e}return[r,n]}(t,e[0])}function au(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 su(t,e,r,n,o,a,s,l,u,c,p,h,f,d,m){var v=function(t,e,r,n,o,a,s,l){for(var u=n.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,h=e.positionedLines;p32640&&T(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===y.kind&&((g=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||g[1]>32640)&&T(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,v,g,l,a,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var _=0,x=p;_=0;a--)if(n.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new si(this.zoom),m=0,v=t;m=0;for(var z=0,O=C.sections;z=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 l=0;l0},yu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},yu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},yu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},yu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},yu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||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 r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&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)}},Bn("SymbolBucket",yu,{omit:["layers","collisionBoxArray","features","compareText"]}),yu.MAX_GLYPHS=65535,yu.addDynamicAttributes=fu;var gu=new bi({"symbol-placement":new vi(It.layout_symbol["symbol-placement"]),"symbol-spacing":new vi(It.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new vi(It.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new yi(It.layout_symbol["symbol-sort-key"]),"symbol-z-order":new vi(It.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new vi(It.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new vi(It.layout_symbol["icon-ignore-placement"]),"icon-optional":new vi(It.layout_symbol["icon-optional"]),"icon-rotation-alignment":new vi(It.layout_symbol["icon-rotation-alignment"]),"icon-size":new yi(It.layout_symbol["icon-size"]),"icon-text-fit":new vi(It.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new vi(It.layout_symbol["icon-text-fit-padding"]),"icon-image":new yi(It.layout_symbol["icon-image"]),"icon-rotate":new yi(It.layout_symbol["icon-rotate"]),"icon-padding":new vi(It.layout_symbol["icon-padding"]),"icon-keep-upright":new vi(It.layout_symbol["icon-keep-upright"]),"icon-offset":new yi(It.layout_symbol["icon-offset"]),"icon-anchor":new yi(It.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new vi(It.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new vi(It.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new vi(It.layout_symbol["text-rotation-alignment"]),"text-field":new yi(It.layout_symbol["text-field"]),"text-font":new yi(It.layout_symbol["text-font"]),"text-size":new yi(It.layout_symbol["text-size"]),"text-max-width":new yi(It.layout_symbol["text-max-width"]),"text-line-height":new vi(It.layout_symbol["text-line-height"]),"text-letter-spacing":new yi(It.layout_symbol["text-letter-spacing"]),"text-justify":new yi(It.layout_symbol["text-justify"]),"text-radial-offset":new yi(It.layout_symbol["text-radial-offset"]),"text-variable-anchor":new vi(It.layout_symbol["text-variable-anchor"]),"text-anchor":new yi(It.layout_symbol["text-anchor"]),"text-max-angle":new vi(It.layout_symbol["text-max-angle"]),"text-writing-mode":new vi(It.layout_symbol["text-writing-mode"]),"text-rotate":new yi(It.layout_symbol["text-rotate"]),"text-padding":new vi(It.layout_symbol["text-padding"]),"text-keep-upright":new vi(It.layout_symbol["text-keep-upright"]),"text-transform":new yi(It.layout_symbol["text-transform"]),"text-offset":new yi(It.layout_symbol["text-offset"]),"text-allow-overlap":new vi(It.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new vi(It.layout_symbol["text-ignore-placement"]),"text-optional":new vi(It.layout_symbol["text-optional"])}),_u={paint:new bi({"icon-opacity":new yi(It.paint_symbol["icon-opacity"]),"icon-color":new yi(It.paint_symbol["icon-color"]),"icon-halo-color":new yi(It.paint_symbol["icon-halo-color"]),"icon-halo-width":new yi(It.paint_symbol["icon-halo-width"]),"icon-halo-blur":new yi(It.paint_symbol["icon-halo-blur"]),"icon-translate":new vi(It.paint_symbol["icon-translate"]),"icon-translate-anchor":new vi(It.paint_symbol["icon-translate-anchor"]),"text-opacity":new yi(It.paint_symbol["text-opacity"]),"text-color":new yi(It.paint_symbol["text-color"],{runtimeType:$t,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new yi(It.paint_symbol["text-halo-color"]),"text-halo-width":new yi(It.paint_symbol["text-halo-width"]),"text-halo-blur":new yi(It.paint_symbol["text-halo-blur"]),"text-translate":new vi(It.paint_symbol["text-translate"]),"text-translate-anchor":new vi(It.paint_symbol["text-translate-anchor"])}),layout:gu},xu=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};xu.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},xu.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){return null},Bn("FormatSectionOverride",xu,{omit:["defaultValue"]});var bu=function(t){function e(e){t.call(this,e,_u)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"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 n=this.layout.get("text-writing-mode");if(n){for(var i=[],o=0,a=n;o",targetMapId:n,sourceMapId:o.mapId})}}},Lu.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else E()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},Lu.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)}},Lu.prototype.processTask=function(t,e){var r=this;if(""===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(Vn(e.error)):n(null,Vn(e.data)))}else{var i=!1,o=I(this.globalScope)?void 0:[],a=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"",sourceMapId:r.mapId,error:e?Un(e):null,data:Un(n,o)},o)}:function(t){i=!0},s=null,l=Vn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Lu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Fu=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]))};Fu.prototype.setNorthEast=function(t){return this._ne=t instanceof Bu?new Bu(t.lng,t.lat):Bu.convert(t),this},Fu.prototype.setSouthWest=function(t){return this._sw=t instanceof Bu?new Bu(t.lng,t.lat):Bu.convert(t),this},Fu.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Bu)e=t,r=t;else{if(!(t instanceof Fu))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Fu.convert(t)):this.extend(Bu.convert(t)):this;if(r=t._ne,!(e=t._sw)||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Bu(e.lng,e.lat),this._ne=new Bu(r.lng,r.lat)),this},Fu.prototype.getCenter=function(){return new Bu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Fu.prototype.getSouthWest=function(){return this._sw},Fu.prototype.getNorthEast=function(){return this._ne},Fu.prototype.getNorthWest=function(){return new Bu(this.getWest(),this.getNorth())},Fu.prototype.getSouthEast=function(){return new Bu(this.getEast(),this.getSouth())},Fu.prototype.getWest=function(){return this._sw.lng},Fu.prototype.getSouth=function(){return this._sw.lat},Fu.prototype.getEast=function(){return this._ne.lng},Fu.prototype.getNorth=function(){return this._ne.lat},Fu.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Fu.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Fu.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Fu.prototype.contains=function(t){var e=Bu.convert(t),r=e.lng,n=e.lat,i=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i},Fu.convert=function(t){return!t||t instanceof Fu?t:new Fu(t)};var Bu=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")};Bu.prototype.wrap=function(){return new Bu(p(this.lng,-180,180),this.lat)},Bu.prototype.toArray=function(){return[this.lng,this.lat]},Bu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Bu.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Bu.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Fu(new Bu(this.lng-r,this.lat-e),new Bu(this.lng+r,this.lat+e))},Bu.convert=function(t){if(t instanceof Bu)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Bu(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Bu(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Nu=2*Math.PI*6371008.8;function ju(t){return Nu*Math.cos(t*Math.PI/180)}function $u(t){return(180+t)/360}function Uu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Vu(t,e){return t/ju(e)}function qu(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Zu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Zu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Bu.convert(t);return new Zu($u(r.lng),Uu(r.lat),Vu(e,r.lat))},Zu.prototype.toLngLat=function(){return new Bu(360*this.x-180,qu(this.y))},Zu.prototype.toAltitude=function(){return this.z*ju(qu(this.y))},Zu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Nu*(t=qu(this.y),1/Math.cos(t*Math.PI/180));var t};var Gu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Xu(0,t,t,e,r)};Gu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Gu.prototype.url=function(t,e){var r,n,i,o,a,s=(n=this.y,i=this.z,o=Ru(256*(r=this.x),256*(n=Math.pow(2,i)-n-1),i),a=Ru(256*(r+1),256*(n+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,r){for(var n,i="",o=t;o>0;o--)i+=(e&(n=1<this.canonical.z?new Wu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Wu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?Xu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Xu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},Wu.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>e&&t.canonical.y===this.canonical.y>>e},Wu.prototype.children=function(t){if(this.overscaledZ>=t)return[new Wu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Wu(e,this.wrap,e,r,n),new Wu(e,this.wrap,e,r+1,n),new Wu(e,this.wrap,e,r,n+1),new Wu(e,this.wrap,e,r+1,n+1)]},Wu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=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)},Ku.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Ku.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Ku.prototype.getPixels=function(){return new _a({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Ku.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-r*this.dim,u=o;u=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},ec.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new xs.VectorTile(new Ks(this.rawTileData)).layers,this.sourceLayerCoder=new Yu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ec.prototype.query=function(t,e,r,n){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=an(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=nc(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),f=nc(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(e,r,n,o){return function(t,e,r,n,o){for(var a=0,s=t;a=l.x&&o>=l.y)return!0}var u=[new i(e,r),new i(e,o),new i(n,o),new i(n,r)];if(t.length>2)for(var c=0,p=u;c=0)return!0;return!1}(o,p)){var f=this.sourceLayerCoder.decode(r),d=this.vtLayers[f].feature(n);if(i.needGeometry){var m=$o(d,!0);if(!i.filter(new si(this.tileID.overscaledZ),m,this.tileID.canonical))return}else if(!i.filter(new si(this.tileID.overscaledZ),d))return;for(var v=this.getId(d,f),y=0;yn)i=!1;else if(e)if(this.expirationTimelt&&(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=Gl,t.clone=function(t){var e=new aa(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 aa(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Zs,t.config=N,t.create=function(){var t=new aa(16);return aa!=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 aa(9);return aa!=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 aa(4);return aa!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Gr,t.createLayout=Ei,t.createStyleLayer=function(t){return"custom"===t.type?new Eu(t):new Au[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=i*l-o*s,t[1]=o*a-n*l,t[2]=n*s-i*a,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=qe,t.offscreenCanvasSupported=ft,t.ortho=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new Ks(t).readFields(dl,[])},t.pbf=Ks,t.performSymbolLayout=function(t,e,r,n,i,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new si(c.minZoom),a),l["text-size"].possiblyEvaluate(new si(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,f=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new si(h.minZoom),a),l["icon-size"].possiblyEvaluate(new si(f),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new si(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new si(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new si(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),v=s.get("text-keep-upright"),y=s.get("text-size"),g=function(){var o=x[_],l=s.get("text-font").evaluate(o,{},a).join(","),c=y.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},g=o.text,b=[0,0];if(g){var w=g.toString(),C=24*s.get("text-letter-spacing").evaluate(o,{},a),S=function(t){for(var e=0,r=t;e=8192||p.y<0||p.y>=8192||function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x,b,w,C,S){var E,A,k,I,P,M=t.addToLineVertexArray(e,r),z=0,O=0,D=0,L=0,R=-1,F=-1,B={},N=ho(""),j=0,$=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(j=(E=s.layout.get("text-offset").evaluate(x,{},C).map((function(t){return 24*t})))[0],$=E[1]):(j=24*s.layout.get("text-radial-offset").evaluate(x,{},C),$=iu),t.allowVerticalPlacement&&n.vertical){var U=s.layout.get("text-rotate").evaluate(x,{},C)+90;I=new Jl(l,e,u,c,p,n.vertical,h,f,d,U),a&&(P=new Jl(l,e,u,c,p,a,v,y,d,U))}if(i){var V=s.layout.get("icon-rotate").evaluate(x,{}),q="none"!==s.layout.get("icon-text-fit"),Z=Hl(i,V,w,q),G=a?Hl(a,V,w,q):void 0;k=new Jl(l,e,u,c,p,i,v,y,!1,V),z=4*Z.length;var H=t.iconSizeData,W=null;"source"===H.kind?(W=[128*s.layout.get("icon-size").evaluate(x,{})])[0]>32640&&T(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===H.kind&&((W=[128*b.compositeIconSizes[0].evaluate(x,{},C),128*b.compositeIconSizes[1].evaluate(x,{},C)])[0]>32640||W[1]>32640)&&T(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,Z,W,_,g,x,!1,e,M.lineStartIndex,M.lineLength,-1,C),R=t.icon.placedSymbolArray.length-1,G&&(O=4*G.length,t.addSymbols(t.icon,G,W,_,g,x,bl.vertical,e,M.lineStartIndex,M.lineLength,-1,C),F=t.icon.placedSymbolArray.length-1)}for(var X in n.horizontal){var K=n.horizontal[X];if(!A){N=ho(K.text);var Y=s.layout.get("text-rotate").evaluate(x,{},C);A=new Jl(l,e,u,c,p,K,h,f,d,Y)}var J=1===K.positionedLines.length;if(D+=su(t,e,K,o,s,d,x,m,M,n.vertical?bl.horizontal:bl.horizontalOnly,J?Object.keys(n.horizontal):[X],B,R,b,C),J)break}n.vertical&&(L+=su(t,e,n.vertical,o,s,d,x,m,M,bl.vertical,["vertical"],B,F,b,C));var Q=A?A.boxStartIndex:t.collisionBoxArray.length,tt=A?A.boxEndIndex:t.collisionBoxArray.length,et=I?I.boxStartIndex:t.collisionBoxArray.length,rt=I?I.boxEndIndex:t.collisionBoxArray.length,nt=k?k.boxStartIndex:t.collisionBoxArray.length,it=k?k.boxEndIndex:t.collisionBoxArray.length,ot=P?P.boxStartIndex:t.collisionBoxArray.length,at=P?P.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(A,st),st=lt(I,st),st=lt(k,st);var ut=(st=lt(P,st))>-1?1:0;ut&&(st*=S/24),t.glyphOffsetArray.length>=yu.MAX_GLYPHS&&T("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,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,Q,tt,et,rt,nt,it,ot,at,u,D,L,z,O,ut,0,h,j,$,st)}(t,p,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,y,b,S,l,_,w,E,d,e,o,u,c,a)};if("line"===A)for(var M=0,z=Gl(e.geometry,0,0,8192,8192);M1){var j=ql(N,C,r.vertical||m,n,24,g);j&&P(N,j)}}else if("Polygon"===e.type)for(var $=0,U=ns(e.geometry,0);$=k.maxzoom||"none"!==k.visibility&&(a(A,this.zoom,n),(m[k.id]=k.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,v,this.tileID.canonical),c.bucketLayerIDs.push(A.map((function(t){return t.id}))))}}}var I=t.mapObject(v.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,z.call(l))})):h={};var P=Object.keys(v.iconDependencies);P.length?o.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){p||(p=t,f=e,z.call(l))})):f={};var M=Object.keys(v.patternDependencies);function z(){if(p)return s(p);if(h&&f&&d){var e=new i(h),r=new t.ImageAtlas(f,d);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,f,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,n),l.addFeatures(v,this.tileID.canonical,r.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:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}M.length?o.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){p||(p=t,d=e,z.call(l))})):d={},z.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=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 n.loading[i],e||!o)return s.status="done",n.loaded[i]=s,r(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.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,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,o=this;if(n&&n[i]){var a=n[i];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,i)),e(t,n)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};function p(t,e){if(0!==t.length){h(t[0],e);for(var r=1;r=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,o=e.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new t.DEMData(n,a,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(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 r=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:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};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=[],r=0,n=this._feature.geometry;r>31}function k(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,o=0,a=r.length,s=0;s>1;!function t(e,r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*c/s+p)),Math.min(o,Math.floor(n+(s-l)*c/s+p)),a)}var h=r[2*n+a],f=i,d=o;for(P(e,r,i,n),r[2*o+a]>h&&P(e,r,i,o);fh;)d--}r[2*i+a]===h?P(e,r,i,d):P(e,r,++d,o),d<=n&&(i=d+1),n<=d&&(o=d-1)}}(e,r,s,i,o,a%2),t(e,r,n,i,s-1,a+1),t(e,r,n,s+1,o,a+1)}}(a,s,n,0,a.length-1,0)};L.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)l=e[2*d+1],(s=e[2*d])>=r&&s<=i&&l>=n&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);l=e[2*m+1],(s=e[2*m])>=r&&s<=i&&l>=n&&l<=o&&c.push(t[m]);var v=(p+1)%2;(0===p?r<=s:n<=l)&&(u.push(f),u.push(m-1),u.push(v)),(0===p?i>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(v))}}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},L.prototype.within=function(t,e,r){return function(t,e,r,n,i,o){for(var a=[0,t.length-1,0],s=[],l=i*i;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)z(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];z(d,m,r,n)<=l&&s.push(t[f]);var v=(u+1)%2;(0===u?r-i<=d:n-i<=m)&&(a.push(p),a.push(f-1),a.push(v)),(0===u?r+i>=d:n+i>=m)&&(a.push(f+1),a.push(c),a.push(v))}}return s}(this.ids,this.coords,t,e,r,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}},F=function(t){this.options=q(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)};function B(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function N(t,e){var r=t.geometry.coordinates,n=r[1];return{x:U(r[0]),y:V(n),zoom:1/0,index:e,parentId:-1}}function j(t){return{type:"Feature",id:t.id,properties:$(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function $(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return q(q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function U(t){return t/360+.5}function V(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function q(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function G(t){return t.y}function H(t,e,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var l=((t-r)*a+(e-n)*s)/(a*a+s*s);l>1?(r=i,n=o):l>0&&(r+=a*l,n+=s*l)}return(a=t-r)*a+(s=e-n)*s}function W(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)X(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(a+=n?(i*u-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-o,2))),i=l,o=u}var c=e.length-3;e[2]=1,function t(e,r,n,i){for(var o,a=i,s=n-r>>1,l=n-r,u=e[r],c=e[r+1],p=e[n],h=e[n+1],f=r+3;fa)o=f,a=d;else if(d===a){var m=Math.abs(f-s);mi&&(o-r>3&&t(e,r,o,i),e[o+2]=a,n-o>3&&t(e,o,n,i))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function Q(t,e,r,n){for(var i=0;i1?1:r}function rt(t,e,r,n,i,o,a,s){if(n/=e,o>=(r/=e)&&a=n)return null;for(var l=[],u=0;u=r&&d=n)){var m=[];if("Point"===h||"MultiPoint"===h)nt(p,m,r,n,i);else if("LineString"===h)it(p,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)at(p,m,r,n,i,!1);else if("Polygon"===h)at(p,m,r,n,i,!0);else if("MultiPolygon"===h)for(var v=0;v=r&&a<=n&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function it(t,e,r,n,i,o,a){for(var s,l,u=ot(t),c=0===i?lt:ut,p=t.start,h=0;hr&&(l=c(u,f,d,v,y,r),a&&(u.start=p+s*l)):g>n?_=r&&(l=c(u,f,d,v,y,r),x=!0),_>n&&g<=n&&(l=c(u,f,d,v,y,n),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=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)>=r&&g<=n&&st(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,r,n,i,o){for(var a=0;aa.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function mt(t,e,r,n){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&e.size<(i?a:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;la)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,o=i-2;n0===e)for(n=0,i=t.length;n24)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 n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n=r;s--){Date.now();o=this._cluster(o,s),this.trees[s]=new L(o,Z,G,i,Float32Array)}return this},F.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=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)r=-180,i=180;else if(r>i){var a=this.getClusters([r,n,180,o],e),s=this.getClusters([-180,n,i,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(U(r),V(o),U(i),V(n));ce&&(h+=m.numPoints||1)}if(h>=o){for(var v=l.x*p,y=l.y*p,g=i&&p>1?this._map(l,!0):null,_=(s<<5)+(e+1)+this.points.length,x=0,b=c;x1)for(var C=0,S=c;C>5},F.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},F.prototype._map=function(t,e){if(t.numPoints)return e?q({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?q({},n):n},yt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},yt.prototype.splitTile=function(t,e,r,n,i,o,a){for(var s=[t,e,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<24)return null;var o=1<0;)l--,u=Math.floor(u/2),c=Math.floor(c/2),s=this.tiles[gt(l,u,c)];return s&&s.source?(this.splitTile(s.source,l,u,c,t,e,r),this.tiles[a]?ht(this.tiles[a],i):null):null};var xt=function(e){function r(t,r,n,i){e.call(this,t,r,n,_t),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function y(t,e,r,n,i,o,a){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:r,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],_.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(o.glyphs[+r]=e[+r]);o.ranges[s]=!0}for(var i=0,a=l;i1&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),h=void 0,f=i/r*(n+1);if(s.isDash){var d=n-Math.abs(f);h=Math.sqrt(p*p+d*d)}else h=n-Math.sqrt(p*p+f*f);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.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,l=t[s],u=0;u1&&(l=t[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},T.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a=n&&e.x=i&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=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?r(null):t?r(t):(e.loadVectorData(o,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),M=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),z=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(e,r){var n=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){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):o&&(n.image=o,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0,s=e;ar.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(z),D=function(e){function r(r,n,i,o){e.call(this,r,n,i,o),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.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())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),o=this._getLoadedTile(i);if(o)return o}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,n=Math.floor(e*r*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var r={};for(var n in this._tiles){var i=this._tiles[n];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),r[i.tileID.key]=i}for(var o in this._tiles=r,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},r.prototype.update=function(e){var n=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 n._source.hasTile(t)})))):i=[];var o=e.coveringZoomLevel(this._source),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(zt(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);pthis._source.maxzoom){var v=d.children(this._source.maxzoom)[0],y=this.getTile(v);if(y&&y.hasData()){n[v.key]=v;continue}}else{var g=d.children(this._source.maxzoom);if(n[g[0].key]&&n[g[1].key]&&n[g[2].key]&&n[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&&(n[b.key]=b,_=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var o=0,a=e;o0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=n?a.getCameraQueryGeometry(e):e,l=e.map((function(t){return a.pointCoordinate(t)})),u=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,v=u;m=0&&y[1].y+v>=0){var g=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));o.push({tile:n,tileID:s,queryGeometry:g,cameraQueryGeometry:_,scale:m})}}},_=0;_=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){this._state.updateState(t=t||"_geojsonTileLayer",e,r)},r.prototype.removeFeatureState=function(t,e,r){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,r)},r.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Mt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function zt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Xi.workerUrl)}Pt.maxOverzooming=10,Pt.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.length0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))};var Kt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function re(e,r,n,i,o,a,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom),p=[256/n.width*2+1,256/n.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=n.transform.width/n.transform.height,v=!1,y=0;yMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,o,a,s,l,u,c,p,h,f,d){var m,v=r/24,y=e.lineOffsetX*v,g=e.lineOffsetY*v;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=ne(v,l,y,g,n,p,h,e,u,a,f);if(!w)return{notEnoughRoom:!0};var T=Qt(w.first.point,s).point,C=Qt(w.last.point,s).point;if(i&&!n){var S=ie(e.writingMode,T,C,d);if(S)return S}m=[w.first];for(var E=e.glyphStartIndex+1;E<_-1;E++)m.push(se(v*l.getoffsetX(E),y,g,n,p,h,e.segment,x,b,u,a,f));m.push(w.last)}else{if(i&&!n){var A=Qt(h,o).point,k=e.lineStartIndex+e.segment+1,I=new t.Point(u.getx(k),u.gety(k)),P=Qt(I,o),M=P.signedDistanceFromCamera>0?P.point:ae(h,I,A,1,o),z=ie(e.writingMode,A,M,d);if(z)return z}var O=se(v*l.getoffsetX(e.glyphStartIndex),y,g,n,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f);if(!O)return{notEnoughRoom:!0};m=[O]}for(var D=0,L=m;D0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var v=d>0?l+s:l+s+1,y=o,g=o,_=0,x=0,b=Math.abs(f),w=[];_+x<=b;){if((v+=d)=u)return null;if(g=y,w.push(y),void 0===(y=h[v])){var T=new t.Point(c.getx(v),c.gety(v)),C=Qt(T,p);if(C.signedDistanceFromCamera>0)y=h[v]=C.point;else{var S=v-d;y=ae(0===_?a:new t.Point(c.getx(S),c.gety(S)),T,g,b-_+1,p)}}_+=x,x=g.dist(y)}var E=(b-_)/x,A=y.sub(g),k=A.mult(E)._add(g);k._add(A._unit()._perp()._mult(n*d));var I=m+Math.atan2(y.y-g.y,y.x-g.x);return w.push(k),{point:k,angle:I,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Kt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,o){this.boxCells[i].push(o)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,o){this.circleCells[i].push(o)},Kt.prototype._query=function(t,e,r,n,i,o){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:a},Kt.prototype._queryCircle=function(t,e,r,n,i){var o=t-r,a=t+r,s=e-r,l=e+r;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},i),n?u.length>0:u},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,o,a,s){var l=a.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,p=0,h=u;p=c[d+0]&&n>=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 v=this.circles,y=0,g=m;ya*a+s*s},Kt.prototype._circleAndRectCollide=function(t,e,r,n,i,o,a){var s=(o-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var u=(a-i)/2,c=Math.abs(e-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=r*r};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;M--)P.push(k.path[M]);for(var z=1;z0){for(var R=P[0].clone(),F=P[0].clone(),B=1;B=S.x&&F.x<=E.x&&R.y>=S.y&&F.y<=E.y?[P]:F.xE.x||F.yE.y?[]:t.clipLine([P],S.x,S.y,E.x,E.y)}for(var N=0,j=L;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},pe.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0?(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:v,width:r,height:n,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:y,placedGlyphBoxes:g}):void 0},be.prototype.placeLayerBucketPart=function(e,r,n){var i=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,v=s.get("text-optional"),y=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"),T="viewport-y"===s.get("symbol-z-order"),C=g&&(_||!a.hasIconData()||y),S=_&&(g||!a.hasTextData()||v);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var E=function(e,o){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,T=!1,E=!1,A=!0,k=null,I={box:null,offscreen:null},P={box:null,offscreen:null},M=null,z=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 F=function(r){var n=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!r&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[e.crossTileID];o&&(i.placedOrientations[e.crossTileID]=o,i.markUsedOrientation(a,n=o,e))}return n},B=function(r,n){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var $=function(t,r,n){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?r:null,h={box:[],offscreen:!1},f=g?2*N.length:N.length,d=0;d=N.length,e,a,n,c);if(v&&(h=v.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,k=v.shift;break}}return h};B((function(){return $(R,o.iconBox,t.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&!(I&&I.box&&I.box.length)&&e.numVerticalGlyphVertices>0&&r?$(r,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),I&&(T=I.box,A=I.offscreen);var U=F(I&&I.box);if(!T&&i.prevPlacement){var V=i.prevPlacement.variableOffsets[e.crossTileID];V&&(i.variableOffsets[e.crossTileID]=V,i.markUsedJustification(a,V.anchor,e,U))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,g,p,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(a,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(I&&I.box&&I.box.length)}}if(T=(f=I)&&f.box&&f.box.length>0,A=f&&f.offscreen,e.useRuntimeCollisionCircles){var Z=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),G=t.evaluateSizeForFeature(a.textSizeData,d,Z),H=s.get("text-padding");M=i.collisionIndex.placeCollisionCircles(g,Z,a.lineVertexArray,a.glyphOffsetArray,G,l,u,c,n,b,m.predicate,e.collisionCircleDiameter,H),T=g||M.circles.length>0&&!M.collisionDetected,A=A&&M.offscreen}if(o.iconFeatureIndex&&(L=o.iconFeatureIndex),o.iconBox){var W=function(t){var e=w&&k?xe(t,k.x,k.y,x,b,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,_,p,l,m.predicate)};E=P&&P.box&&P.box.length&&o.verticalIconBox?(z=W(o.verticalIconBox)).box.length>0:(z=W(o.iconBox)).box.length>0,A=A&&z.offscreen}var X=v||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=y||0===e.numIconVertices;if(X||K?K?X||(E=E&&T):T=E&&T:E=T=E&&T,T&&f&&f.box&&i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,P&&P.box&&D?D:O,m.ID),E&&z&&i.collisionIndex.insertCollisionBox(z.box,s.get("icon-ignore-placement"),a.bucketInstanceId,L,m.ID),M&&(T&&i.collisionIndex.insertCollisionCircles(M.circles,s.get("text-ignore-placement"),a.bucketInstanceId,O,m.ID),n)){var Y=a.bucketInstanceId,J=i.collisionCircleArrays[Y];void 0===J&&(J=i.collisionCircleArrays[Y]=new ve);for(var Q=0;Q=0;--k){var I=A[k];E(a.symbolInstances.get(I),a.collisionArrays[I])}else for(var P=e.symbolInstanceStart;P=0&&(e.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:n.crossTileID)}},be.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,o=r===t.WritingMode.vertical?r:0,a=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];a0,g=i.placedOrientations[o.crossTileID],_=g===t.WritingMode.vertical,x=g===t.WritingMode.horizontal||g===t.WritingMode.horizontalOnly;if(s>0||l>0){var b=Pe(v.text);d(e.text,s,_?Me:b),d(e.text,l,x?Me:b);var w=v.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 T=i.variableOffsets[o.crossTileID];T&&i.markUsedJustification(e,T.anchor,o,g);var C=i.placedOrientations[o.crossTileID];C&&(i.markUsedJustification(e,"left",o,C),i.markUsedOrientation(e,C,o))}if(y){var S=Pe(v.icon),E=!(h&&o.verticalPlacedIconSymbolIndex&&_);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,E?S:Me),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=v.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,E?Me:S),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var A=e.collisionArrays[n];if(A){var k=new t.Point(0,0);if(A.textBox||A.verticalTextBox){var I=!0;if(u){var P=i.variableOffsets[m];P?(k=_e(P.anchor,P.width,P.height,P.textOffset,P.textBoxScale),c&&k._rotate(p?i.transform.angle:-i.transform.angle)):I=!1}A.textBox&&we(e.textCollisionBox.collisionVertexArray,v.text.placed,!I||_,k.x,k.y),A.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,v.text.placed,!I||x,k.x,k.y)}var M=Boolean(!x&&A.verticalIconBox);A.iconBox&&we(e.iconCollisionBox.collisionVertexArray,v.icon.placed,M,h?k.x:0,h?k.y:0),A.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!M,h?k.x:0,h?k.y:0)}}},v=0;vt},be.prototype.setStale=function(){this.stale=!0};var Te=Math.pow(2,25),Ce=Math.pow(2,24),Se=Math.pow(2,17),Ee=Math.pow(2,16),Ae=Math.pow(2,9),ke=Math.pow(2,8),Ie=Math.pow(2,1);function Pe(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Te+e*Ce+r*Se+e*Ee+r*Ae+e*ke+r*Ie+e}var Me=0,ze=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=[]};ze.prototype.continuePlacement=function(t,e,r,n,i){for(var o=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new ze(s)),this._inProgressLayer.continuePlacement(n[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,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,a||(a=t,i=e,c())})),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){u=null,a||(a=t,o=e,c())}));function c(){if(a)n(a);else if(i&&o){var e=t.browser.getImageData(o),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,v=l.stretchY,y=l.content,g=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,g,{x:p,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:g,pixelRatio:d,sdf:f,stretchX:m,stretchY:v,content:y}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return n.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._afterImageUpdated(e)},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},r.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"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Pt(e,r,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}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===e.type){if(Ne(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},n))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,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)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" 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.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),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.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),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.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(r),n)||(o.setLayoutProperty(r,n,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.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(r),n)||(o.setPaintProperty(r,n,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.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,o=this.sourceCaches[n];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,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var o=i.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?r&&"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,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,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 '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){n[a]=o;for(var s=0,l=t;s=0;f--){var d=this._order[f];if(r(d))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 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=yr("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);}"),tr=yr("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);}"),er=yr("#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);}"),rr=yr("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;}"),nr=yr("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;}"),ir=yr("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);}"),or=yr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),ar=yr("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;}"),sr=yr("#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;}"),lr=yr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),ur=yr("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);}"),cr=yr("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);}"),pr=yr("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;}"),hr=yr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/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);}"),fr=yr("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;}"),dr=yr("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));}"),mr=yr("#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);}"),vr=yr("#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;gl_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 yr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=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(r,(function(t,e,r,n,i){return s[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,n,i){var o="float"===n?"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 "+r+" "+o+" a_"+i+";\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+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 "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = unpack_mix_"+a+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:n,staticUniforms:a}}var gr=Object.freeze({__proto__:null,prelude:Ze,background:Ge,backgroundPattern:He,circle:We,clippingMask:Xe,heatmap:Ke,heatmapTexture:Ye,collisionBox:Je,collisionCircle:Qe,debug:tr,fill:er,fillOutline:rr,fillOutlinePattern:nr,fillPattern:ir,fillExtrusion:or,fillExtrusionPattern:ar,hillshadePrepare:sr,hillshade:lr,line:ur,lineGradient:cr,linePattern:pr,lineSDF:hr,raster:fr,symbolIcon:dr,symbolSDF:mr,symbolTextAndIcon:vr}),_r=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function xr(t){for(var e=[],r=0;r>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}br.prototype.draw=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m){var v,y=t.gl;if(!this.failedToCreate){for(var g in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),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 _=(v={},v[y.LINES]=2,v[y.TRIANGLES]=3,v[y.LINE_STRIP]=1,v)[e],x=0,b=c.get();x0?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:Ur(i.paint.get("raster-hue-rotate"))};var o,a};function Ur(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Vr,qr=function(t,e,r,n,i,o,a,s,l,u){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:+r,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:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Zr=function(e,r,n,i,o,a,s,l,u,c,p){var h=o.transform;return t.extend(qr(e,r,n,i,o,a,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})},Gr=function(e,r,n,i,o,a,s,l,u,c){return t.extend(Zr(e,r,n,i,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Hr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Wr=function(e,r,n,i,o,a){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),o=r.imageManager.getPattern(t.to.toString()),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,p=c*(n.tileID.canonical.x+n.tileID.wrap*u),h=c*n.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,l],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(n,1,r.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(i,a,n,o),{u_matrix:e,u_opacity:r})},Xr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image),u_image_height:new t.Uniform1f(e,r.u_image_height)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,f=0,d=0;d0){var b=t.create(),w=g;t.mul(b,y.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,y.placementViewportMatrix),p.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=h+=x.length/4}_&&c.draw(l,u.LINES,St.disabled,Et.disabled,e.colorModeForRenderPass(),kt.disabled,Pr(g,e.transform,v),n.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}if(s&&p.length){var T=e.useProgram("collisionCircle"),C=new t.StructArrayLayout2f1f2i16;C.resize(4*h),C._trim();for(var S=0,E=0,A=p;E=0&&(m[y.associatedIconIndex]={shiftedAnchor:C,angle:S})}else ue(y.numGlyphs,f)}if(p){d.clear();for(var A=e.icon.placedSymbolArray,k=0;k0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=r?(s-r.timeAdded)/a:-1,c=n.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),cn=new t.Color(0,1,0,1),pn=new t.Color(0,0,1,1),hn=new t.Color(1,0,1,1),fn=new t.Color(0,1,1,1);function dn(t,e,r,n){vn(t,0,e+r/2,t.transform.width,r,n)}function mn(t,e,r,n){vn(t,e-r/2,0,r,t.transform.height,n)}function vn(e,r,n,i,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function yn(e,r,n){var i=e.context,o=i.gl,a=n.posMatrix,s=e.useProgram("debug"),l=St.disabled,u=Et.disabled,c=e.colorModeForRenderPass();i.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(i,o.LINE_STRIP,l,u,c,kt.disabled,zr(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=r.getTileByID(n.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),f=r.getTile(n).tileSize,d=512/Math.min(f,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.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(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+" "+h+"kb"),s.draw(i,o.TRIANGLES,l,u,At.alphaBlended,kt.disabled,zr(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var gn={symbol:function(e,r,n,i,o){if("translucent"===e.renderPass){var a=Et.disabled,s=e.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(e,r,n,i,o,a,s){for(var l=r.transform,u="map"===o,c="map"===a,p=0,h=e;p256&&this.clearStencil(),r.setColorMode(At.disabled),r.setDepthMode(St.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Et({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Et({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,o=n[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=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.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new br(this.context,t,gr[t],e,Xr[t],this._showOverdrawInspector)),this.cache[r]},_n.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()},_n.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)},_n.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))},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var xn=function(t,e){this.points=t,this.planes=e};xn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),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(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],o[e[0]],o[e[1]]),n=t.sub([],o[e[2]],o[e[1]]),i=t.normalize([],t.cross([],r,n)),a=-t.dot(i,o[e[1]]);return i.concat(a)}));return new xn(o,a)};var bn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};bn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;pthis.max[l]-this.min[l])return 0}return 1};var wn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<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=r,this.right=n};wn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},wn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},wn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},wn.prototype.clone=function(){return new wn(this.top,this.bottom,this.left,this.right)},wn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Tn=function(e,r,n,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,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 wn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cn={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}};Tn.prototype.clone=function(){var t=new Tn(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},Cn.minZoom.get=function(){return this._minZoom},Cn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Cn.maxZoom.get=function(){return this._maxZoom},Cn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Cn.minPitch.get=function(){return this._minPitch},Cn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Cn.maxPitch.get=function(){return this._maxPitch},Cn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Cn.renderWorldCopies.get=function(){return this._renderWorldCopies},Cn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Cn.worldSize.get=function(){return this.tileSize*this.scale},Cn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cn.size.get=function(){return new t.Point(this.width,this.height)},Cn.bearing.get=function(){return-this.angle/Math.PI*180},Cn.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cn.pitch.get=function(){return this._pitch/Math.PI*180},Cn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Cn.fov.get=function(){return this._fov/Math.PI*180},Cn.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())},Cn.zoom.get=function(){return this._zoom},Cn.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())},Cn.center.get=function(){return this._center},Cn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Cn.padding.get=function(){return this._edgeInsets.toJSON()},Cn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Cn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Tn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Tn.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},Tn.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)},Tn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=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(n.x,i.x,o.x,a.x)),l=Math.floor(Math.max(n.x,i.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},Tn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=[o*i.x,o*i.y,0],s=xn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new bn([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],p=[],h=r,f=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),v=m.x,y=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<=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?f:m.zoom,m.wrap,m.zoom,v,y),distanceSq:t.sqrLen([a[0]-.5-v,a[1]-.5-y])});else for(var T=0;T<4;T++){var C=(v<<1)+T%2,S=(y<<1)+(T>>1);c.push({aabb:m.aabb.quadrant(T),zoom:m.zoom+1,x:C,y:S,wrap:m.wrap,fullyVisible:g})}}return p.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Tn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Cn.unmodified.get=function(){return this._unmodified},Tn.prototype.zoomScale=function(t){return Math.pow(2,t)},Tn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Tn.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},Tn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Cn.point.get=function(){return this.project(this.center)},Tn.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(n.x-i.x),o.y-(n.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Tn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Tn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Tn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Tn.prototype.coordinateLocation=function(t){return t.toLngLat()},Tn.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],o=n[3],a=r[1]/i,s=n[1]/o,l=r[2]/i,u=n[2]/o,c=l===u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(r[0]/i,n[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Tn.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},Tn.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)))},Tn.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},Tn.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])},Tn.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Tn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Tn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,o=-90,a=90,s=-180,l=180,u=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)-oa&&(i=a-v)}if(this.lngRange){var y=f.x,g=u.x/2;y-gl&&(n=l-g)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:f.x,void 0!==i?i:f.y))),this._unmodified=c,this._constraining=!1}},Tn.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var r=Math.PI/2+this._pitch,n=this._fov*(.5+e.y/this.height),i=Math.sin(n)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-r-n,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),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,v=s-Math.round(s)+f*h+d*p,y=new Float64Array(c);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,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={}}},Tn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Tn.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Tn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,o=r.x,a=r.y,s=0,l=e;s=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},Sn.prototype._updateHashUnthrottled=function(){var e=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},An=t.extend({deceleration:2500,maxSpeed:1400},En),kn=t.extend({deceleration:20,maxSpeed:1400},En),In=t.extend({deceleration:1e3,maxSpeed:360},En),Pn=t.extend({deceleration:1e3,maxSpeed:90},En),Mn=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},Mn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Dn(t.type,this._map,t))},Fn.prototype.dblclick=function(t){return this._firePreventable(new Dn(t.type,this._map,t))},Fn.prototype.mouseover=function(t){this._map.fire(new Dn(t.type,this._map,t))},Fn.prototype.mouseout=function(t){this._map.fire(new Dn(t.type,this._map,t))},Fn.prototype.touchstart=function(t){return this._firePreventable(new Ln(t.type,this._map,t))},Fn.prototype.touchmove=function(t){this._map.fire(new Ln(t.type,this._map,t))},Fn.prototype.touchend=function(t){this._map.fire(new Ln(t.type,this._map,t))},Fn.prototype.touchcancel=function(t){this._map.fire(new Ln(t.type,this._map,t))},Fn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Fn.prototype.isEnabled=function(){return!0},Fn.prototype.isActive=function(){return!1},Fn.prototype.enable=function(){},Fn.prototype.disable=function(){};var Bn=function(t){this._map=t};Bn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Bn.prototype.mousemove=function(t){this._map.fire(new Dn(t.type,this._map,t))},Bn.prototype.mousedown=function(){this._delayContextMenu=!0},Bn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Bn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Dn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Bn.prototype.isEnabled=function(){return!0},Bn.prototype.isActive=function(){return!1},Bn.prototype.enable=function(){},Bn.prototype.disable=function(){};var Nn=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function jn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},$n.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Un=function(t){this.singleTap=new $n(t),this.numTaps=t.numTaps,this.reset()};Un.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Un.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Un.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Un.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(n)<30;if(i&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Vn=function(){this._zoomIn=new Un({numTouches:1,numTaps:2}),this._zoomOut=new Un({numTouches:2,numTaps:1}),this.reset()};Vn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Vn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Vn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Vn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),o=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.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 n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},Vn.prototype.touchcancel=function(){this.reset()},Vn.prototype.enable=function(){this._enabled=!0},Vn.prototype.disable=function(){this._enabled=!1,this.reset()},Vn.prototype.isEnabled=function(){return this._enabled},Vn.prototype.isActive=function(){return this._active};var qn={0:1,2:2},Zn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Zn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Zn.prototype._correctButton=function(t,e){return!1},Zn.prototype._move=function(t,e){return{}},Zn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Zn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r)if(t.preventDefault(),function(t,e){var r=qn[e];return void 0===t.buttons||(t.buttons&r)!==r}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(r)0&&(this._active=!0);var i=jn(n,r),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(sMath.abs(t.x)}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.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,ri(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return ri(t)&&ri(e)&&o}},e}(Kn),ii={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ii;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1};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 r=0,n=0,i=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?n=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 this._rotationDisabled&&(n=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ai,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*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},oi.prototype.disableRotation=function(){this._rotationDisabled=!0},oi.prototype.enableRotation=function(){this._rotationDisabled=!1};var si=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,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 r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._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 n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),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 r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,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-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},si.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},si.prototype.reset=function(){this._active=!1};var li=function(t,e){this._clickZoom=t,this._tapZoom=e};li.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},li.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},li.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},li.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var ci=function(){this._tap=new Un({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,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},ci.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},ci.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(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,r){this._el=t,this._mousePan=e,this._touchPan=r};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,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};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,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,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 vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Mn(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),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;oo?Math.min(2,b):Math.max(.5,b),w=Math.pow(v,1-e),T=i.unproject(_.add(x.mult(e*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&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))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}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(),l=this.getPitch(),u=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:l,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),v=o.centerPoint.add(m),y=o.pointLocation(v),g=t.LngLat.convert(e.center||y);this._normalizeCenter(g);var _=o.project(y),x=o.project(g).sub(_),b=e.curve,w=Math.max(o.width,o.height),T=w/d,C=x.mag();if("minZoom"in e){var S=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),E=w/o.zoomScale(S-a);b=Math.sqrt(E/C*2)}var A=b*b;function k(t){var e=(T*T-w*w+(t?-1:1)*A*A*C*C)/(2*(t?T:w)*A*C);return Math.log(Math.sqrt(e*e+1)-e)}function I(t){return(Math.exp(t)-Math.exp(-t))/2}function P(t){return(Math.exp(t)+Math.exp(-t))/2}var M=k(0),z=function(t){return P(M)/P(M+b*t)},O=function(t){return w*((P(M)*(I(e=M+b*t)/P(e))-I(M))/A)/C;var e},D=(k(1)-M)/b;if(Math.abs(C)<1e-6||!isFinite(D)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var L=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(r,!1),this._ease((function(e){var i=e*D,d=1/z(i);o.zoom=1===e?c:a+o.scaleZoom(d),n._rotating&&(o.bearing=t.number(s,p,e)),n._pitching&&(o.pitch=t.number(l,h,e)),n._padding&&(o.interpolatePadding(u,f,e),v=o.centerPoint.add(m));var y=1===e?g:o.unproject(_.add(x.mult(O(i))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?y.wrap():y,v),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop(!1)}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}},r}(t.Evented),_i=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_toggleAttribution","_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=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),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(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},_i.prototype._setElementTitle=function(t,e){var r=this._map._getUIString("AttributionControl."+e);t.title=r,t.setAttribute("aria-label",r)},_i.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},_i.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n=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","mapboxgl-compact-show")};var xi=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};xi.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener 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(){r.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,r=0,n=e?this._queue.concat(e):this._queue;re.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 Tn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.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._clickTolerance=e.clickTolerance,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 Ci))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._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 yi(this,e),this._hash=e.hash&&new Sn("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(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){r.fire(new t.Event(e.dataType+"dataloading",e))}))}n&&(i.__proto__=n),(i.prototype=Object.create(n&&n.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,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"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 n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),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 r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.hasControl=function(t){return this._controls.indexOf(t)>-1},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,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()=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()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,r){var n,i=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var a=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(i,new Dn(t,i,n.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(i,new Dn(t,i,n.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(i,new Dn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);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,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(t,e,r){var i=this;return void 0===r?n.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var o=n[t],a=0;a180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Mi.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Mi.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Mi.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Mi.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Mi.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Mi.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Mi.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Mi.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Mi.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Mi.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=r}this._isDragging&&(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")))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,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))},n.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},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(t.Evented),Fi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Bi=0,Ni=!1,ji=function(e){function n(r){e.call(this),this.options=t.extend({},Fi,r),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.onAdd=function(e){var n;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==Li?n(Li):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){n(Li="denied"!==t.state)})):n(Li=!!t.window.navigator.geolocation),this._container},n.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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Bi=0,Ni=!1},n.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitudee.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),o=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),o,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Ni)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()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.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","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ri(this._dotElement),this._circleElement=r.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"!==n._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.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":Bi--,Ni=!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"),++Bi>1?(e={maximumAge:6e5,timeout:0},Ni=!0):(e=this.options.positionOptions,Ni=!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},n.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)},n}(t.Evented),$i={maxWidth:100,unit:"metric"},Ui=function(e){this.options=t.extend({},$i,e),t.bindAll(["_onMove","setUnit"],this)};function Vi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,o=t.unproject([0,i]),a=t.unproject([n,i]),s=o.distanceTo(a);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?qi(e,n,l/5280,t._getUIString("ScaleControl.Miles")):qi(e,n,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?qi(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?qi(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):qi(e,n,s,t._getUIString("ScaleControl.Meters"))}function qi(t,e,r,n){var i,o,a,s=(i=r,(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/r)+"px",t.innerHTML=s+" "+n}Ui.prototype.getDefaultPosition=function(){return"bottom-left"},Ui.prototype._onMove=function(){Vi(this._map,this._container,this.options)},Ui.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ui.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ui.prototype.setUnit=function(t){this.options.unit=t,Vi(this._map,this._container,this.options)};var Zi=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")};Zi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.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},Zi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Zi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.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)},Zi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Zi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Zi.prototype._isFullscreen=function(){return this._fullscreen},Zi.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())},Zi.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,focusAfterOpen:!0,className:"",maxWidth:"240px"},Hi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Wi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Gi),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.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._focusFirstElement(),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},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("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},n.prototype.getLngLat=function(){return this._lngLat},n.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},n.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},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.setOffset=function(t){return this.options.offset=t,this._update(),this},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return n._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=zi(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(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(n,n),"top-right":new t.Point(-n,n),bottom:new t.Point(0,-r),"bottom-left":new t.Point(n,-n),"bottom-right":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.convert(r);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(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+a.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=i.add(a[o]).round();r.setTransform(this._container,Oi[o]+" translate("+c.x+"px,"+c.y+"px)"),Di(this._container,o,"popup")}},n.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var t=this._container.querySelector(Hi);t&&t.focus()}},n.prototype._onClose=function(){this.remove()},n}(t.Evented),Xi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ai,NavigationControl:Pi,GeolocateControl:ji,AttributionControl:_i,ScaleControl:Ui,FullscreenControl:Zi,Popup:Wi,Marker:Ri,Style:Ve,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(Dt)},clearPrewarmedResources:function(){var t=Rt;t&&t.isPreloaded()&&1===t.numActive()&&(t.release(Dt),Rt=null)},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 Xi})),r}))},{}],7:[function(t,e,r){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!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:a}catch(t){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],p=!1,h=-1;function f(){p&&u&&(p=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!p){var t=l(f);p=!0;for(var e=c.length;e;){for(u=c,c=[];++h1)for(var r=1;r As of ScrollMagic 2.0.0 you need to use 'new ScrollMagic.Controller()' to create a new controller instance. Use 'new ScrollMagic.Scene()' to instance a scene.")};t.version="2.0.8","undefined"!=typeof window&&window.addEventListener("mousewheel",void 0),t.Controller=function(r){var i,o,a="ScrollMagic.Controller",s=e.defaults,l=this,u=n.extend({},s,r),c=[],p=!1,h=0,f="PAUSED",d=!0,m=0,v=!0,y=function(){u.refreshInterval>0&&(o=window.setTimeout(C,u.refreshInterval))},g=function(){return u.vertical?n.get.scrollTop(u.container):n.get.scrollLeft(u.container)},_=function(){return u.vertical?n.get.height(u.container):n.get.width(u.container)},x=this._setScrollPos=function(t){u.vertical?d?window.scrollTo(n.get.scrollLeft(),t):u.container.scrollTop=t:d?window.scrollTo(t,n.get.scrollTop()):u.container.scrollLeft=t},b=function(){if(v&&p){var t=n.type.Array(p)?p:c.slice(0);p=!1;var e=h,r=(h=l.scrollPos())-e;0!==r&&(f=r>0?"FORWARD":"REVERSE"),"REVERSE"===f&&t.reverse(),t.forEach((function(e,r){S(3,"updating Scene "+(r+1)+"/"+t.length+" ("+c.length+" total)"),e.update(!0)})),0===t.length&&u.loglevel>=3&&S(3,"updating 0 Scenes (nothing added to controller)")}},w=function(){i=n.rAF(b)},T=function(t){S(3,"event fired causing an update:",t.type),"resize"==t.type&&(m=_(),f="PAUSED"),!0!==p&&(p=!0,w())},C=function(){if(!d&&m!=_()){var t;try{t=new Event("resize",{bubbles:!1,cancelable:!1})}catch(e){(t=document.createEvent("Event")).initEvent("resize",!1,!1)}u.container.dispatchEvent(t)}c.forEach((function(t,e){t.refresh()})),y()},S=this._log=function(t,e){u.loglevel>=t&&(Array.prototype.splice.call(arguments,1,0,"("+a+") ->"),n.log.apply(window,arguments))};this._options=u;var E=function(t){if(t.length<=1)return t;var e=t.slice(0);return e.sort((function(t,e){return t.scrollOffset()>e.scrollOffset()?1:-1})),e};return this.addScene=function(e){if(n.type.Array(e))e.forEach((function(t,e){l.addScene(t)}));else if(e instanceof t.Scene){if(e.controller()!==l)e.addTo(l);else if(c.indexOf(e)<0){for(var r in c.push(e),c=E(c),e.on("shift.controller_sort",(function(){c=E(c)})),u.globalSceneOptions)e[r]&&e[r].call(e,u.globalSceneOptions[r]);S(3,"adding Scene (now "+c.length+" total)")}}else S(1,"ERROR: invalid argument supplied for '.addScene()'");return l},this.removeScene=function(t){if(n.type.Array(t))t.forEach((function(t,e){l.removeScene(t)}));else{var e=c.indexOf(t);e>-1&&(t.off("shift.controller_sort"),c.splice(e,1),S(3,"removing Scene (now "+c.length+" left)"),t.remove())}return l},this.updateScene=function(e,r){return n.type.Array(e)?e.forEach((function(t,e){l.updateScene(t,r)})):r?e.update(!0):!0!==p&&e instanceof t.Scene&&(-1==(p=p||[]).indexOf(e)&&p.push(e),p=E(p),w()),l},this.update=function(t){return T({type:"resize"}),t&&b(),l},this.scrollTo=function(e,r){if(n.type.Number(e))x.call(u.container,e,r);else if(e instanceof t.Scene)e.controller()===l?l.scrollTo(e.scrollOffset(),r):S(2,"scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.",e);else if(n.type.Function(e))x=e;else{var i=n.get.elements(e)[0];if(i){for(;i.parentNode.hasAttribute("data-scrollmagic-pin-spacer");)i=i.parentNode;var o=u.vertical?"top":"left",a=n.get.offset(u.container),s=n.get.offset(i);d||(a[o]-=l.scrollPos()),l.scrollTo(s[o]-a[o],r)}else S(2,"scrollTo(): The supplied argument is invalid. Scroll cancelled.",e)}return l},this.scrollPos=function(t){return arguments.length?(n.type.Function(t)?g=t:S(2,"Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'."),l):g.call(l)},this.info=function(t){var e={size:m,vertical:u.vertical,scrollPos:h,scrollDirection:f,container:u.container,isDocument:d};return arguments.length?void 0!==e[t]?e[t]:void S(1,'ERROR: option "'+t+'" is not available'):e},this.loglevel=function(t){return arguments.length?(u.loglevel!=t&&(u.loglevel=t),l):u.loglevel},this.enabled=function(t){return arguments.length?(v!=t&&(v=!!t,l.updateScene(c,!0)),l):v},this.destroy=function(t){window.clearTimeout(o);for(var e=c.length;e--;)c[e].destroy(t);return u.container.removeEventListener("resize",T),u.container.removeEventListener("scroll",T),n.cAF(i),S(3,"destroyed "+a+" (reset: "+(t?"true":"false")+")"),null},function(){for(var e in u)s.hasOwnProperty(e)||(S(2,'WARNING: Unknown option "'+e+'"'),delete u[e]);if(u.container=n.get.elements(u.container)[0],!u.container)throw S(1,"ERROR creating object "+a+": No valid scroll container supplied"),a+" init failed.";(d=u.container===window||u.container===document.body||!document.body.contains(u.container))&&(u.container=window),m=_(),u.container.addEventListener("resize",T),u.container.addEventListener("scroll",T);var r=parseInt(u.refreshInterval,10);u.refreshInterval=n.type.Number(r)?r:s.refreshInterval,y(),S(3,"added new "+a+" controller (v"+t.version+")")}(),l};var e={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}};t.Controller.addOption=function(t,r){e.defaults[t]=r},t.Controller.extend=function(e){var r=this;t.Controller=function(){return r.apply(this,arguments),this.$super=n.extend({},this),e.apply(this,arguments)||this},n.extend(t.Controller,r),t.Controller.prototype=r.prototype,t.Controller.prototype.constructor=t.Controller},t.Scene=function(e){var i,o,a="ScrollMagic.Scene",s=r.defaults,l=this,u=n.extend({},s,e),c="BEFORE",p=0,h={start:0,end:0},f=0,d=!0,m={};this.on=function(t,e){return n.type.Function(e)?(t=t.trim().split(" ")).forEach((function(t){var r=t.split("."),n=r[0],i=r[1];"*"!=n&&(m[n]||(m[n]=[]),m[n].push({namespace:i||"",callback:e}))})):v(1,"ERROR when calling '.on()': Supplied callback for '"+t+"' is not a valid function!"),l},this.off=function(t,e){return t?((t=t.trim().split(" ")).forEach((function(t,r){var n=t.split("."),i=n[0],o=n[1]||"";("*"===i?Object.keys(m):[i]).forEach((function(t){for(var r=m[t]||[],n=r.length;n--;){var i=r[n];!i||o!==i.namespace&&"*"!==o||e&&e!=i.callback||r.splice(n,1)}r.length||delete m[t]}))})),l):(v(1,"ERROR: Invalid event name supplied."),l)},this.trigger=function(e,r){if(e){var n=e.trim().split("."),i=n[0],o=n[1],a=m[i];v(3,"event fired:",i,r?"->":"",r||""),a&&a.forEach((function(e,n){o&&o!==e.namespace||e.callback.call(l,new t.Event(i,e.namespace,l,r))}))}else v(1,"ERROR: Invalid event name supplied.");return l},l.on("change.internal",(function(t){"loglevel"!==t.what&&"tweenChanges"!==t.what&&("triggerElement"===t.what?b():"reverse"===t.what&&l.update())})).on("shift.internal",(function(t){_(),l.update()}));var v=this._log=function(t,e){u.loglevel>=t&&(Array.prototype.splice.call(arguments,1,0,"("+a+") ->"),n.log.apply(window,arguments))};this.addTo=function(e){return e instanceof t.Controller?o!=e&&(o&&o.removeScene(l),o=e,C(),x(!0),b(!0),_(),o.info("container").addEventListener("resize",w),e.addScene(l),l.trigger("add",{controller:o}),v(3,"added "+a+" to controller"),l.update()):v(1,"ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller"),l},this.enabled=function(t){return arguments.length?(d!=t&&(d=!!t,l.update(!0)),l):d},this.remove=function(){if(o){o.info("container").removeEventListener("resize",w);var t=o;o=void 0,t.removeScene(l),l.trigger("remove"),v(3,"removed "+a+" from controller")}return l},this.destroy=function(t){return l.trigger("destroy",{reset:t}),l.remove(),l.off("*.*"),v(3,"destroyed "+a+" (reset: "+(t?"true":"false")+")"),null},this.update=function(t){if(o)if(t)if(o.enabled()&&d){var e,r=o.info("scrollPos");e=u.duration>0?(r-h.start)/(h.end-h.start):r>=h.start?1:0,l.trigger("update",{startPos:h.start,endPos:h.end,scrollPos:r}),l.progress(e)}else y&&"DURING"===c&&A(!0);else o.updateScene(l,!1);return l},this.refresh=function(){return x(),b(),l},this.progress=function(t){if(arguments.length){var e=!1,r=c,n=o?o.info("scrollDirection"):"PAUSED",i=u.reverse||t>=p;if(0===u.duration?(e=p!=t,c=0==(p=t<1&&i?0:1)?"BEFORE":"DURING"):t<0&&"BEFORE"!==c&&i?(p=0,c="BEFORE",e=!0):t>=0&&t<1&&i?(p=t,c="DURING",e=!0):t>=1&&"AFTER"!==c?(p=1,c="AFTER",e=!0):"DURING"!==c||i||A(),e){var a={progress:p,state:c,scrollDirection:n},s=c!=r,h=function(t){l.trigger(t,a)};s&&"DURING"!==r&&(h("enter"),h("BEFORE"===r?"start":"end")),h("progress"),s&&"DURING"!==c&&(h("BEFORE"===c?"start":"end"),h("leave"))}return l}return p};var y,g,_=function(){h={start:f+u.offset},o&&u.triggerElement&&(h.start-=o.info("size")*u.triggerHook),h.end=h.start+u.duration},x=function(t){i&&S("duration",i.call(l))&&!t&&(l.trigger("change",{what:"duration",newval:u.duration}),l.trigger("shift",{reason:"duration"}))},b=function(t){var e=0,r=u.triggerElement;if(o&&(r||f>0)){if(r)if(r.parentNode){for(var i=o.info(),a=n.get.offset(i.container),s=i.vertical?"top":"left";r.parentNode.hasAttribute("data-scrollmagic-pin-spacer");)r=r.parentNode;var c=n.get.offset(r);i.isDocument||(a[s]-=o.scrollPos()),e=c[s]-a[s]}else v(2,"WARNING: triggerElement was removed from DOM and will be reset to",void 0),l.triggerElement(void 0);var p=e!=f;f=e,p&&!t&&l.trigger("shift",{reason:"triggerElementPosition"})}},w=function(t){u.triggerHook>0&&l.trigger("shift",{reason:"containerResize"})},T=n.extend(r.validate,{duration:function(t){if(n.type.String(t)&&t.match(/^(\.|\d)*\d+%$/)){var e=parseFloat(t)/100;t=function(){return o?o.info("size")*e:0}}if(n.type.Function(t)){i=t;try{t=parseFloat(i.call(l))}catch(e){t=-1}}if(t=parseFloat(t),!n.type.Number(t)||t<0)throw i?(i=void 0,['Invalid return value of supplied function for option "duration":',t]):['Invalid value for option "duration":',t];return t}}),C=function(t){(t=arguments.length?[t]:Object.keys(T)).forEach((function(t,e){var r;if(T[t])try{r=T[t](u[t])}catch(e){r=s[t];var i=n.type.String(e)?[e]:e;n.type.Array(i)?(i[0]="ERROR: "+i[0],i.unshift(1),v.apply(this,i)):v(1,"ERROR: Problem executing validation callback for option '"+t+"':",e.message)}finally{u[t]=r}}))},S=function(t,e){var r=!1,n=u[t];return u[t]!=e&&(u[t]=e,C(t),r=n!=u[t]),r},E=function(t){l[t]||(l[t]=function(e){return arguments.length?("duration"===t&&(i=void 0),S(t,e)&&(l.trigger("change",{what:t,newval:u[t]}),r.shifts.indexOf(t)>-1&&l.trigger("shift",{reason:t})),l):u[t]})};this.controller=function(){return o},this.state=function(){return c},this.scrollOffset=function(){return h.start},this.triggerPosition=function(){var t=u.offset;return o&&(u.triggerElement?t+=f:t+=o.info("size")*l.triggerHook()),t},l.on("shift.internal",(function(t){var e="duration"===t.reason;("AFTER"===c&&e||"DURING"===c&&0===u.duration)&&A(),e&&k()})).on("progress.internal",(function(t){A()})).on("add.internal",(function(t){k()})).on("destroy.internal",(function(t){l.removePin(t.reset)}));var A=function(t){if(y&&o){var e=o.info(),r=g.spacer.firstChild;if(t||"DURING"!==c){var i={position:g.inFlow?"relative":"absolute",top:0,left:0},a=n.css(r,"position")!=i.position;g.pushFollowers?u.duration>0&&("AFTER"===c&&0===parseFloat(n.css(g.spacer,"padding-top"))||"BEFORE"===c&&0===parseFloat(n.css(g.spacer,"padding-bottom")))&&(a=!0):i[e.vertical?"top":"left"]=u.duration*p,n.css(r,i),a&&k()}else{"fixed"!=n.css(r,"position")&&(n.css(r,{position:"fixed"}),k());var s=n.get.offset(g.spacer,!0),l=u.reverse||0===u.duration?e.scrollPos-h.start:Math.round(p*u.duration*10)/10;s[e.vertical?"top":"left"]+=l,n.css(g.spacer.firstChild,{top:s.top,left:s.left})}}},k=function(){if(y&&o&&g.inFlow){var t="DURING"===c,e=o.info("vertical"),r=g.spacer.firstChild,i=n.isMarginCollapseType(n.css(g.spacer,"display")),a={};g.relSize.width||g.relSize.autoFullWidth?t?n.css(y,{width:n.get.width(g.spacer)}):n.css(y,{width:"100%"}):(a["min-width"]=n.get.width(e?y:r,!0,!0),a.width=t?a["min-width"]:"auto"),g.relSize.height?t?n.css(y,{height:n.get.height(g.spacer)-(g.pushFollowers?u.duration:0)}):n.css(y,{height:"100%"}):(a["min-height"]=n.get.height(e?r:y,!0,!i),a.height=t?a["min-height"]:"auto"),g.pushFollowers&&(a["padding"+(e?"Top":"Left")]=u.duration*p,a["padding"+(e?"Bottom":"Right")]=u.duration*(1-p)),n.css(g.spacer,a)}},I=function(){o&&y&&"DURING"===c&&!o.info("isDocument")&&A()},P=function(){o&&y&&"DURING"===c&&((g.relSize.width||g.relSize.autoFullWidth)&&n.get.width(window)!=n.get.width(g.spacer.parentNode)||g.relSize.height&&n.get.height(window)!=n.get.height(g.spacer.parentNode))&&k()},M=function(t){o&&y&&"DURING"===c&&!o.info("isDocument")&&(t.preventDefault(),o._setScrollPos(o.info("scrollPos")-((t.wheelDelta||t[o.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-t.detail)))};this.setPin=function(t,e){var r=e&&e.hasOwnProperty("pushFollowers");if(e=n.extend({},{pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},e),!(t=n.get.elements(t)[0]))return v(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),l;if("fixed"===n.css(t,"position"))return v(1,"ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."),l;if(y){if(y===t)return l;l.removePin()}var i=(y=t).parentNode.style.display,o=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];y.parentNode.style.display="none";var a="absolute"!=n.css(y,"position"),s=n.css(y,o.concat(["display"])),c=n.css(y,["width","height"]);y.parentNode.style.display=i,!a&&e.pushFollowers&&(v(2,"WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."),e.pushFollowers=!1),window.setTimeout((function(){y&&0===u.duration&&r&&e.pushFollowers&&v(2,"WARNING: pushFollowers =",!0,"has no effect, when scene duration is 0.")}),0);var p=y.parentNode.insertBefore(document.createElement("div"),y),h=n.extend(s,{position:a?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});if(a||n.extend(h,n.css(y,["width","height"])),n.css(p,h),p.setAttribute("data-scrollmagic-pin-spacer",""),n.addClass(p,e.spacerClass),g={spacer:p,relSize:{width:"%"===c.width.slice(-1),height:"%"===c.height.slice(-1),autoFullWidth:"auto"===c.width&&a&&n.isMarginCollapseType(s.display)},pushFollowers:e.pushFollowers,inFlow:a},!y.___origStyle){y.___origStyle={};var f=y.style;o.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]).forEach((function(t){y.___origStyle[t]=f[t]||""}))}return g.relSize.width&&n.css(p,{width:c.width}),g.relSize.height&&n.css(p,{height:c.height}),p.appendChild(y),n.css(y,{position:a?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(g.relSize.width||g.relSize.autoFullWidth)&&n.css(y,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",I),window.addEventListener("resize",I),window.addEventListener("resize",P),y.addEventListener("mousewheel",M),y.addEventListener("DOMMouseScroll",M),v(3,"added pin"),A(),l},this.removePin=function(t){if(y){if("DURING"===c&&A(!0),t||!o){var e=g.spacer.firstChild;if(e.hasAttribute("data-scrollmagic-pin-spacer")){var r=g.spacer.style,i={};["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach((function(t){i[t]=r[t]||""})),n.css(e,i)}g.spacer.parentNode.insertBefore(e,g.spacer),g.spacer.parentNode.removeChild(g.spacer),y.parentNode.hasAttribute("data-scrollmagic-pin-spacer")||(n.css(y,y.___origStyle),delete y.___origStyle)}window.removeEventListener("scroll",I),window.removeEventListener("resize",I),window.removeEventListener("resize",P),y.removeEventListener("mousewheel",M),y.removeEventListener("DOMMouseScroll",M),y=void 0,v(3,"removed pin (reset: "+(t?"true":"false")+")")}return l};var z,O=[];return l.on("destroy.internal",(function(t){l.removeClassToggle(t.reset)})),this.setClassToggle=function(t,e){var r=n.get.elements(t);return 0!==r.length&&n.type.String(e)?(O.length>0&&l.removeClassToggle(),z=e,O=r,l.on("enter.internal_class leave.internal_class",(function(t){var e="enter"===t.type?n.addClass:n.removeClass;O.forEach((function(t,r){e(t,z)}))})),l):(v(1,"ERROR calling method 'setClassToggle()': Invalid "+(0===r.length?"element":"classes")+" supplied."),l)},this.removeClassToggle=function(t){return t&&O.forEach((function(t,e){n.removeClass(t,z)})),l.off("start.internal_class end.internal_class"),z=void 0,O=[],l},function(){for(var t in u)s.hasOwnProperty(t)||(v(2,'WARNING: Unknown option "'+t+'"'),delete u[t]);for(var e in s)E(e);C()}(),l};var r={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(t){if(t=parseFloat(t),!n.type.Number(t))throw['Invalid value for option "offset":',t];return t},triggerElement:function(t){if(t=t||void 0){var e=n.get.elements(t)[0];if(!e||!e.parentNode)throw['Element defined in option "triggerElement" was not found:',t];t=e}return t},triggerHook:function(t){var e={onCenter:.5,onEnter:1,onLeave:0};if(n.type.Number(t))t=Math.max(0,Math.min(parseFloat(t),1));else{if(!(t in e))throw['Invalid value for option "triggerHook": ',t];t=e[t]}return t},reverse:function(t){return!!t},loglevel:function(t){if(t=parseInt(t),!n.type.Number(t)||t<0||t>3)throw['Invalid value for option "loglevel":',t];return t}},shifts:["duration","offset","triggerHook"]};t.Scene.addOption=function(e,n,i,o){e in r.defaults?t._util.log(1,"[static] ScrollMagic.Scene -> Cannot add Scene option '"+e+"', because it already exists."):(r.defaults[e]=n,r.validate[e]=i,o&&r.shifts.push(e))},t.Scene.extend=function(e){var r=this;t.Scene=function(){return r.apply(this,arguments),this.$super=n.extend({},this),e.apply(this,arguments)||this},n.extend(t.Scene,r),t.Scene.prototype=r.prototype,t.Scene.prototype.constructor=t.Scene},t.Event=function(t,e,r,n){for(var i in n=n||{})this[i]=n[i];return this.type=t,this.target=this.currentTarget=r,this.namespace=e||"",this.timeStamp=this.timestamp=Date.now(),this};var n=t._util=function(t){var e,r={},n=function(t){return parseFloat(t)||0},i=function(e){return e.currentStyle?e.currentStyle:t.getComputedStyle(e)},o=function(e,r,o,a){if((r=r===document?t:r)===t)a=!1;else if(!d.DomElement(r))return 0;e=e.charAt(0).toUpperCase()+e.substr(1).toLowerCase();var s=(o?r["offset"+e]||r["outer"+e]:r["client"+e]||r["inner"+e])||0;if(o&&a){var l=i(r);s+="Height"===e?n(l.marginTop)+n(l.marginBottom):n(l.marginLeft)+n(l.marginRight)}return s},a=function(t){return t.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))};r.extend=function(t){for(t=t||{},e=1;e-1};var s=0,l=["ms","moz","webkit","o"],u=t.requestAnimationFrame,c=t.cancelAnimationFrame;for(e=0;!u&&ep.length||t<=0)&&(t=p.length);var e=new Date,r=("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)+":"+("0"+e.getSeconds()).slice(-2)+":"+("00"+e.getMilliseconds()).slice(-3),n=p[t-1],i=Array.prototype.splice.call(arguments,1),o=Function.prototype.bind.call(h[n],h);i.unshift(r),o.apply(h,i)};var d=r.type=function(t){return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};d.String=function(t){return"string"===d(t)},d.Function=function(t){return"function"===d(t)},d.Array=function(t){return Array.isArray(t)},d.Number=function(t){return!d.Array(t)&&t-parseFloat(t)+1>=0},d.DomElement=function(t){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?t instanceof HTMLElement||t instanceof SVGElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName};var m=r.get={};return m.elements=function(e){var r=[];if(d.String(e))try{e=document.querySelectorAll(e)}catch(t){return r}if("nodelist"===d(e)||d.Array(e)||e instanceof NodeList)for(var n=0,i=r.length=e.length;n ERROR calling addIndicators() due to missing Plugin 'debug.addIndicators'. Please make sure to include plugins/debug.addIndicators.js"),this},t.Scene.prototype.removeIndicators=function(){return t._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin 'debug.addIndicators'. Please make sure to include plugins/debug.addIndicators.js"),this},t.Scene.prototype.setTween=function(){return t._util.log(1,"(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js"),this},t.Scene.prototype.removeTween=function(){return t._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js"),this},t.Scene.prototype.setVelocity=function(){return t._util.log(1,"(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin 'animation.velocity'. Please make sure to include plugins/animation.velocity.js"),this},t.Scene.prototype.removeVelocity=function(){return t._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin 'animation.velocity'. Please make sure to include plugins/animation.velocity.js"),this},t},"function"==typeof define&&define.amd?define(i):"object"==typeof r?e.exports=i():n.ScrollMagic=i()},{}],9:[function(t,e,r){ /*! * ScrollMagic v2.0.8 (2020-08-14) * The javascript library for magical scroll interactions. * (c) 2020 Jan Paepke (@janpaepke) * Project Website: http://scrollmagic.io * * @version 2.0.8 * @license Dual licensed under MIT license and GPL. * @author Jan Paepke - e-mail@janpaepke.de * * @file ScrollMagic GSAP Animation Plugin. * * requires: GSAP ~1.14 * Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js * Greensock License info at http://www.greensock.com/licensing/ */ !function(e,n){if("function"==typeof define&&define.amd)define(["ScrollMagic","gsap","TweenMax","TimelineMax"],n);else if("object"==typeof r){var i=t("gsap/dist/gsap")||t("gsap");n(t("scrollmagic"),i,TweenMax||i,TimelineMax||i)}else n(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.gsap,e.gsap||e.TweenMax||e.TweenLite,e.gsap||e.TimelineMax||e.TimelineLite)}(this,(function(t,e,r,n){"use strict";var i="animation.gsap",o=e&&parseFloat(e.version)>=3,a=window.console||{},s=Function.prototype.bind.call(a.error||a.log||function(){},a);t||s("("+i+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."),r||s("("+i+") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs."),t.Scene.addOption("tweenChanges",!1,(function(t){return!!t})),t.Scene.extend((function(){var t,e=this,a=function(){e._log&&(Array.prototype.splice.call(arguments,1,0,"("+i+")","->"),e._log.apply(this,arguments))};e.on("progress.plugin_gsap",(function(){s()})),e.on("destroy.plugin_gsap",(function(t){e.removeTween(t.reset)}));var s=function(){if(t){var r=e.progress(),n=e.state();t.repeat&&-1===t.repeat()?"DURING"===n&&t.paused()?t.play():"DURING"===n||t.paused()||t.pause():r!=t.progress()&&(0===e.duration()?r>0?t.play():t.reverse():e.tweenChanges()&&t.tweenTo?t.tweenTo(r*t.duration()):t.progress(r).pause())}};e.setTween=function(i,l,u){var c;if(arguments.length>1){var p="number"==typeof arguments[1];o?(p||(u=l),u.hasOwnProperty("duration")||(u.duration=p?l:1)):arguments.length<3&&(u=l,l=1),i=o?r.to(i,u):r.to(i,l,u)}try{(c=n&&!o?new n({smoothChildTiming:!0}).add(i):i).pause()}catch(t){return a(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject"),e}if(t&&e.removeTween(),t=c,i.repeat&&-1===i.repeat()&&(t.repeat(-1),t.yoyo(i.yoyo())),e.tweenChanges()&&!t.tweenTo&&a(2,"WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic."),t&&e.controller()&&e.triggerElement()&&e.loglevel()>=2){var h=r.getTweensOf(e.triggerElement()),f=e.controller().info("vertical");h.forEach((function(t,e){var r=t.vars.css||t.vars;if(f?void 0!==r.top||void 0!==r.bottom:void 0!==r.left||void 0!==r.right)return a(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"),!1}))}if(parseFloat(TweenLite.version)>=1.14)for(var d,m,v=o?"onInterrupt":"onOverwrite",y=t.getChildren?t.getChildren(!0,!0,!1):[t],g=function(){a(2,"WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another")},_=0;_=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&a.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":7,timers:10}],11:[function(t,e,r){ /*! * viewport-units-buggyfill v0.6.2 * @web: https://github.com/rodneyrehm/viewport-units-buggyfill/ * @author: Rodney Rehm - http://rodneyrehm.de/en/ */ !function(){!function(t,n){"use strict";"function"==typeof define&&define.amd?define([],n):"object"==typeof r?e.exports=n():t.viewportUnitsBuggyfill=n()}(this,(function(){"use strict";var t,e,r,n,i,o=!1,a=window.navigator.userAgent,s=/([+-]?[0-9.]+)(vh|vw|vmin|vmax)/g,l=/(https?:)?\/\//,u=[].forEach,c=/MSIE [0-9]\./i.test(a),p=/MSIE [0-8]\./i.test(a),h=a.indexOf("Opera Mini")>-1,f=/(iPhone|iPod|iPad).+AppleWebKit/i.test(a)&&((i=a.match(/OS (\d)/))&&i.length>1&&parseInt(i[1])<10),d=a.indexOf(" Android ")>-1&&a.indexOf("Version/")>-1&&parseFloat((a.match("Android ([0-9.]+)")||[])[1])<=4.4;c||(c=!!navigator.userAgent.match(/MSIE 10\.|Trident.*rv[ :]*1[01]\.| Edge\/1\d\./));try{new m("test")}catch(t){var m=function(t,e){var r;return e=e||{bubbles:!1,cancelable:!1,detail:void 0},(r=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r};m.prototype=window.Event.prototype,window.CustomEvent=m}function v(){o&&(y(),setTimeout((function(){n.textContent=_(),n.parentNode.appendChild(n),window.dispatchEvent(new m("viewport-units-buggyfill-style"))}),1))}function y(){return r=[],u.call(document.styleSheets,(function(t){var e=function(t){try{if(!t.cssRules)return}catch(t){if("SecurityError"!==t.name)throw t;return}for(var e=[],r=0;r-1&&(s="init"),r.compatible=i[0]>=2,r.compatible)},r.createRecord=function(t,e){if(!o[t]){var r=null;"function"==typeof e&&(e=(r=e).options),l(t,e),o[t]={Ctor:r,options:e,instances:[]}}},r.isRecorded=function(t){return void 0!==o[t]},r.rerender=c((function(t,e){var r=o[t];if(e){if("function"==typeof e&&(e=e.options),r.Ctor)r.Ctor.options.render=e.render,r.Ctor.options.staticRenderFns=e.staticRenderFns,r.instances.slice().forEach((function(t){t.$options.render=e.render,t.$options.staticRenderFns=e.staticRenderFns,t._staticTrees&&(t._staticTrees=[]),Array.isArray(r.Ctor.options.cached)&&(r.Ctor.options.cached=[]),Array.isArray(t.$options.cached)&&(t.$options.cached=[]);var n=function(t){if(!t._u)return;var e=t._u;return t._u=function(t){try{return e(t,!0)}catch(r){return e(t,null,!0)}},function(){t._u=e}}(t);t.$forceUpdate(),t.$nextTick(n)}));else if(r.options.render=e.render,r.options.staticRenderFns=e.staticRenderFns,r.options.functional){if(Object.keys(e).length>2)p(r.options,e);else{var n=r.options._injectStyles;if(n){var i=e.render;r.options.render=function(t,e){return n.call(e),i(t,e)}}}r.options._Ctor=null,Array.isArray(r.options.cached)&&(r.options.cached=[]),r.instances.slice().forEach((function(t){t.$forceUpdate()}))}}else r.instances.slice().forEach((function(t){t.$forceUpdate()}))})),r.reload=c((function(t,e){var r=o[t];if(e)if("function"==typeof e&&(e=e.options),l(t,e),r.Ctor){i[1]<2&&(r.Ctor.extendOptions=e);var n=r.Ctor.super.extend(e);n.options._Ctor=r.options._Ctor,r.Ctor.options=n.options,r.Ctor.cid=n.cid,r.Ctor.prototype=n.prototype,n.release&&n.release()}else p(r.options,e);r.instances.slice().forEach((function(t){t.$vnode&&t.$vnode.context&&t.$vnode.context.$forceUpdate()}))}))},{}],13:[function(t,e,r){!function(t,n){if("object"==typeof r&&"object"==typeof e)e.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var o in i)("object"==typeof r?r:t)[o]=i[o]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var n={debug:!1,enableLinkTracking:!0,requireConsent:!1,trackInitialView:!0,trackerFileName:"piwik"};function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},n,e),i=r.host,o=r.trackerFileName;(function(t){var e=new Promise((function(e,r){var n=document.createElement("script");n.async=!0,n.defer=!0,n.src=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(n),n.onload=e,n.onerror=r}));return e.catch((function(t){t.target.src})),e})("".concat(i,"/").concat(o,".js")).then((function(){return function(t,e){var r=e.host,n=e.siteId,i=e.trackerFileName,o=e.trackerUrl||"".concat(r,"/").concat(i,".php"),a=window.Piwik.getTracker(o,n);t.prototype.$piwik=a,t.prototype.$matomo=a,e.requireConsent&&a.requireConsent(),e.trackInitialView&&a.trackPageView(),e.enableLinkTracking&&a.enableLinkTracking(),e.router&&e.router.afterEach((function(t,r){var n=window.location,i=n.protocol;":"!==i.slice(-1)&&(i+=":");var o="hash"===e.router.mode?"/#":"",s=i+"//"+n.host+o+t.path;t.meta.analyticsIgnore?e.debug:(e.debug,a.setCustomUrl(s),a.trackPageView())}))}(t,r)}))}}])}))},{}],14:[function(t,e,r){ /*! * vue-resource v1.5.2 * https://github.com/pagekit/vue-resource * Released under the MIT License. */ "use strict";function n(t){this.state=2,this.value=void 0,this.deferred=[];var e=this;try{t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}catch(t){e.reject(t)}}n.reject=function(t){return new n((function(e,r){r(t)}))},n.resolve=function(t){return new n((function(e,r){e(t)}))},n.all=function(t){return new n((function(e,r){var i=0,o=[];function a(r){return function(n){o[r]=n,(i+=1)===t.length&&e(o)}}0===t.length&&e(o);for(var s=0;s=200&&a<300,this.status=a||0,this.statusText=s||"",this.headers=new R(i),this.body=t,d(t)?this.bodyText=t:(r=t,"undefined"!=typeof Blob&&r instanceof Blob&&(this.bodyBlob=t,function(t){return 0===t.type.indexOf("text")||-1!==t.type.indexOf("json")}(t)&&(this.bodyText=function(t){return new o((function(e){var r=new FileReader;r.readAsText(t),r.onload=function(){e(r.result)}}))}(t))))}var e=t.prototype;return e.blob=function(){return g(this.bodyBlob)},e.text=function(){return g(this.bodyText)},e.json=function(){return g(this.text(),(function(t){return JSON.parse(t)}))},t}();Object.defineProperty(B.prototype,"data",{get:function(){return this.body},set:function(t){this.body=t}});var N=function(){function t(t){var e;this.body=null,this.params={},b(this,t,{method:(e=t.method||"GET",e?e.toUpperCase():"")}),this.headers instanceof R||(this.headers=new R(this.headers))}var e=t.prototype;return e.getUrl=function(){return I(this)},e.getBody=function(){return this.body},e.respondWith=function(t,e){return new B(t,b(e||{},{url:this.getUrl()}))},t}(),j={"Content-Type":"application/json;charset=utf-8"};function $(t){var e=this||{},r=function(t){var e=[L],r=[];function n(n){for(;e.length;){var i=e.pop();if(m(i)){var a=function(){var e=void 0,a=void 0;if(v(e=i.call(t,n,(function(t){return a=t}))||a))return{v:new o((function(n,i){r.forEach((function(r){e=g(e,(function(e){return r.call(t,e)||e}),i)})),g(e,n,i)}),t)};m(e)&&r.unshift(e)}();if("object"==typeof a)return a.v}}}return v(t)||(t=null),n.use=function(t){e.push(t)},n}(e.$vm);return function(t){var e=u.call(arguments,1);e.forEach((function(e){for(var r in e)void 0===t[r]&&(t[r]=e[r])}))}(t||{},e.$options,$.options),$.interceptors.forEach((function(t){d(t)&&(t=$.interceptor[t]),m(t)&&r.use(t)})),r(new N(t)).then((function(t){return t.ok?t:o.reject(t)}),(function(t){return Error,o.reject(t)}))}function U(t,e,r,n){var i=this||{},o={};return x(r=b({},U.actions,r),(function(r,a){r=w({url:t,params:b({},e)},n,r),o[a]=function(){return(i.$http||$)(V(r,arguments))}})),o}function V(t,e){var r,n=b({},t),i={};switch(e.length){case 2:i=e[0],r=e[1];break;case 1:/^(POST|PUT|PATCH)$/i.test(n.method)?r=e[0]:i=e[0];break;case 0:break;default:throw"Expected up to 2 arguments [params, body], got "+e.length+" arguments"}return n.body=r,n.params=b({},n.params,i),n}function q(t){q.installed||(!function(t){var e=t.config,r=t.nextTick;s=r,e.debug||!e.silent}(t),t.url=I,t.http=$,t.resource=U,t.Promise=o,Object.defineProperties(t.prototype,{$url:{get:function(){return _(t.url,this,this.$options.url)}},$http:{get:function(){return _(t.http,this,this.$options.http)}},$resource:{get:function(){return t.resource.bind(this)}},$promise:{get:function(){var e=this;return function(r){return new t.Promise(r,e)}}}}))}$.options={},$.headers={put:j,post:j,patch:j,delete:j,common:{Accept:"application/json, text/plain, */*"},custom:{}},$.interceptor={before:function(t){m(t.before)&&t.before.call(this,t)},method:function(t){t.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(t.method)&&(t.headers.set("X-HTTP-Method-Override",t.method),t.method="POST")},jsonp:function(t){"JSONP"==t.method&&(t.client=z)},json:function(t){var e=t.headers.get("Content-Type")||"";return v(t.body)&&0===e.indexOf("application/json")&&(t.body=JSON.stringify(t.body)),function(t){return t.bodyText?g(t.text(),(function(e){var r,n;if(0===(t.headers.get("Content-Type")||"").indexOf("application/json")||(n=(r=e).match(/^\s*(\[|\{)/))&&{"[":/]\s*$/,"{":/}\s*$/}[n[1]].test(r))try{t.body=JSON.parse(e)}catch(e){t.body=null}else t.body=e;return t})):t}},form:function(t){var e;e=t.body,"undefined"!=typeof FormData&&e instanceof FormData?t.headers.delete("Content-Type"):v(t.body)&&t.emulateJSON&&(t.body=I.params(t.body),t.headers.set("Content-Type","application/x-www-form-urlencoded"))},header:function(t){x(b({},$.headers.common,t.crossOrigin?{}:$.headers.custom,$.headers[h(t.method)]),(function(e,r){t.headers.has(r)||t.headers.set(r,e)}))},cors:function(t){if(c){var e=I.parse(location.href),r=I.parse(t.getUrl());r.protocol===e.protocol&&r.host===e.host||(t.crossOrigin=!0,t.emulateHTTP=!1,M||(t.client=P))}}},$.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach((function(t){$[t]=function(e,r){return this(b(r||{},{url:e,method:t}))}})),["post","put","patch"].forEach((function(t){$[t]=function(e,r,n){return this(b(n||{},{url:e,method:t,body:r}))}})),U.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&!window.Vue.resource&&window.Vue.use(q),e.exports=q},{got:1}],15:[function(t,e,r){(function(t){(function(){ /*! * vue-router v3.5.1 * (c) 2021 Evan You * @license MIT */ "use strict";function r(t,e){if(!t)throw new Error("[vue-router] "+e)}function n(e,r){t.env.NODE_ENV}function i(t,e){for(var r in e)t[r]=e[r];return t}var o=/[!'()*]/g,a=function(t){return"%"+t.charCodeAt(0).toString(16)},s=/%2C/g,l=function(t){return encodeURIComponent(t).replace(o,a).replace(s,",")};function u(e){try{return decodeURIComponent(e)}catch(e){"production"!==t.env.NODE_ENV&&n()}return e}var c=function(t){return null==t||"object"==typeof t?t:String(t)};function p(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var r=t.replace(/\+/g," ").split("="),n=u(r.shift()),i=r.length>0?u(r.join("=")):null;void 0===e[n]?e[n]=i:Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]})),e):e}function h(t){var e=t?Object.keys(t).map((function(e){var r=t[e];if(void 0===r)return"";if(null===r)return l(e);if(Array.isArray(r)){var n=[];return r.forEach((function(t){void 0!==t&&(null===t?n.push(l(e)):n.push(l(e)+"="+l(t)))})),n.join("&")}return l(e)+"="+l(r)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var f=/\/?$/;function d(t,e,r,n){var i=n&&n.options.stringifyQuery,o=e.query||{};try{o=m(o)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:o,params:e.params||{},fullPath:g(e,i),matched:t?y(t):[]};return r&&(a.redirectedFrom=g(r,i)),Object.freeze(a)}function m(t){if(Array.isArray(t))return t.map(m);if(t&&"object"==typeof t){var e={};for(var r in t)e[r]=m(t[r]);return e}return t}var v=d(null,{path:"/"});function y(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function g(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var i=t.hash;return void 0===i&&(i=""),(r||"/")+(e||h)(n)+i}function _(t,e,r){return e===v?t===e:!!e&&(t.path&&e.path?t.path.replace(f,"")===e.path.replace(f,"")&&(r||t.hash===e.hash&&x(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(r||t.hash===e.hash&&x(t.query,e.query)&&x(t.params,e.params))))}function x(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),n=Object.keys(e).sort();return r.length===n.length&&r.every((function(r,i){var o=t[r];if(n[i]!==r)return!1;var a=e[r];return null==o||null==a?o===a:"object"==typeof o&&"object"==typeof a?x(o,a):String(o)===String(a)}))}function b(t){for(var e=0;e=0&&(e=t.slice(n),t=t.slice(0,n));var i=t.indexOf("?");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{path:t,query:r,hash:e}}(s.path||""),d=r&&r.path||"/",m=f.path?C(f.path,d,o||s.append):d,v=function(e,r,i){void 0===r&&(r={});var o,a=i||p;try{o=a(e||"")}catch(e){"production"!==t.env.NODE_ENV&&n(0,e.message),o={}}for(var s in r){var l=r[s];o[s]=Array.isArray(l)?l.map(c):c(l)}return o}(f.query,s.query,a&&a.options.parseQuery),y=s.hash||f.hash;return y&&"#"!==y.charAt(0)&&(y="#"+y),{_normalized:!0,path:m,query:v,hash:y}}var Z,G,H,W,X=function(){},K={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var r=this,o=this.$router,a=this.$route,s=o.resolve(this.to,a,this.append),l=s.location,u=s.route,c=s.href,p={},h=o.options.linkActiveClass,m=o.options.linkExactActiveClass,v=null==h?"router-link-active":h,y=null==m?"router-link-exact-active":m,g=null==this.activeClass?v:this.activeClass,x=null==this.exactActiveClass?y:this.exactActiveClass,b=u.redirectedFrom?d(null,q(u.redirectedFrom),null,o):u;p[x]=_(a,b,this.exactPath),p[g]=this.exact||this.exactPath?p[x]:function(t,e){return 0===t.path.replace(f,"/").indexOf(e.path.replace(f,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var r in e)if(!(r in t))return!1;return!0}(t.query,e.query)}(a,b);var w=p[x]?this.ariaCurrentValue:null,T=function(t){Y(t)&&(r.replace?o.replace(l,X):o.push(l,X))},C={click:Y};Array.isArray(this.event)?this.event.forEach((function(t){C[t]=T})):C[this.event]=T;var S={class:p},E=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:u,navigate:T,isActive:p[g],isExactActive:p[x]});if(E){if("production"===t.env.NODE_ENV||this.custom||(!Z&&n(),Z=!0),1===E.length)return E[0];if(E.length>1||!E.length)return"production"!==t.env.NODE_ENV&&n(0,this.to),0===E.length?e():e("span",{},E)}if("production"!==t.env.NODE_ENV&&("tag"in this.$options.propsData&&!G&&(n(),G=!0),"event"in this.$options.propsData&&!H&&(n(),H=!0)),"a"===this.tag)S.on=C,S.attrs={href:c,"aria-current":w};else{var A=function t(e){var r;if(e)for(var n=0;n0){f.map((function(t){return"- "+t})).join("\n");n()}}return{pathList:l,pathMap:u,nameMap:c}}function et(e,r){var i=A(e,[],r);if("production"!==t.env.NODE_ENV){var o=Object.create(null);i.keys.forEach((function(t){n(o[t.name]),o[t.name]=!0}))}return i}function rt(e,i){var o=tt(e),a=o.pathList,s=o.pathMap,l=o.nameMap;function u(e,r,o){var u=q(e,r,!1,i),c=u.name;if(c){var h=l[c];if("production"!==t.env.NODE_ENV&&n(),!h)return p(null,u);var f=h.regex.keys.filter((function(t){return!t.optional})).map((function(t){return t.name}));if("object"!=typeof u.params&&(u.params={}),r&&"object"==typeof r.params)for(var d in r.params)!(d in u.params)&&f.indexOf(d)>-1&&(u.params[d]=r.params[d]);return u.path=V(h.path,u.params),p(h,u,o)}if(u.path){u.params={};for(var m=0;m=t.length?r():t[i]?e(t[i],(function(){n(i+1)})):n(i+1)};n(0)}var Ct={redirected:2,aborted:4,cancelled:8,duplicated:16};function St(t,e){return At(t,e,Ct.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return kt.forEach((function(r){r in t&&(e[r]=t[r])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function Et(t,e){return At(t,e,Ct.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function At(t,e,r,n){var i=new Error(n);return i._isRouter=!0,i.from=t,i.to=e,i.type=r,i}var kt=["params","query","hash"];function It(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Pt(t,e){return It(t)&&t._isRouter&&(null==e||t.type===e)}function Mt(e){return function(r,i,o){var a=!1,s=0,l=null;zt(e,(function(e,r,i,u){if("function"==typeof e&&void 0===e.cid){a=!0,s++;var c,p=Lt((function(t){var r;((r=t).__esModule||Dt&&"Module"===r[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:W.extend(t),i.components[u]=t,--s<=0&&o()})),h=Lt((function(e){var r="Failed to resolve async component "+u+": "+e;"production"!==t.env.NODE_ENV&&n(),l||(l=It(e)?e:new Error(r),o(l))}));try{c=e(p,h)}catch(t){h(t)}if(c)if("function"==typeof c.then)c.then(p,h);else{var f=c.component;f&&"function"==typeof f.then&&f.then(p,h)}}})),a||o()}}function zt(t,e){return Ot(t.map((function(t){return Object.keys(t.components).map((function(r){return e(t.components[r],t.instances[r],t,r)}))})))}function Ot(t){return Array.prototype.concat.apply([],t)}var Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Lt(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var Rt=function(t,e){this.router=t,this.base=function(t){if(!t)if(Q){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=v,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Ft(t,e,r,n){var i=zt(t,(function(t,n,i,o){var a=function(t,e){"function"!=typeof t&&(t=W.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return r(t,n,i,o)})):r(a,n,i,o)}));return Ot(n?i.reverse():i)}function Bt(t,e){if(e)return function(){return t.apply(e,arguments)}}Rt.prototype.listen=function(t){this.cb=t},Rt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Rt.prototype.onError=function(t){this.errorCbs.push(t)},Rt.prototype.transitionTo=function(t,e,r){var n,i=this;try{n=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var o=this.current;this.confirmTransition(n,(function(){i.updateRoute(n),e&&e(n),i.ensureURL(),i.router.afterHooks.forEach((function(t){t&&t(n,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(t){t(n)})))}),(function(t){r&&r(t),t&&!i.ready&&(Pt(t,Ct.redirected)&&o===v||(i.ready=!0,i.readyErrorCbs.forEach((function(e){e(t)}))))}))},Rt.prototype.confirmTransition=function(t,e,r){var i=this,o=this.current;this.pending=t;var a,s,l=function(t){!Pt(t)&&It(t)&&(i.errorCbs.length?i.errorCbs.forEach((function(e){e(t)})):n()),r&&r(t)},u=t.matched.length-1,c=o.matched.length-1;if(_(t,o)&&u===c&&t.matched[u]===o.matched[c])return this.ensureURL(),l(((s=At(a=o,t,Ct.duplicated,'Avoided redundant navigation to current location: "'+a.fullPath+'".')).name="NavigationDuplicated",s));var p=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r0)){var e=this.router,r=e.options.scrollBehavior,n=xt&&r;n&&this.listeners.push(ct());var i=function(){var r=t.current,i=jt(t.base);t.current===v&&i===t._startLocation||t.transitionTo(i,(function(t){n&&pt(e,t,r,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,i=this.current;this.transitionTo(t,(function(t){bt(S(n.base+t.fullPath)),pt(n.router,t,i,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,i=this.current;this.transitionTo(t,(function(t){wt(S(n.base+t.fullPath)),pt(n.router,t,i,!1),e&&e(t)}),r)},e.prototype.ensureURL=function(t){if(jt(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?bt(e):wt(e)}},e.prototype.getCurrentLocation=function(){return jt(this.base)},e}(Rt);function jt(t){var e=window.location.pathname;return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var $t=function(t){function e(e,r,n){t.call(this,e,r),n&&function(t){var e=jt(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Ut()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,r=xt&&e;r&&this.listeners.push(ct());var n=function(){var e=t.current;Ut()&&t.transitionTo(Vt(),(function(n){r&&pt(t.router,n,e,!0),xt||Gt(n.fullPath)}))},i=xt?"popstate":"hashchange";window.addEventListener(i,n),this.listeners.push((function(){window.removeEventListener(i,n)}))}},e.prototype.push=function(t,e,r){var n=this,i=this.current;this.transitionTo(t,(function(t){Zt(t.fullPath),pt(n.router,t,i,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,i=this.current;this.transitionTo(t,(function(t){Gt(t.fullPath),pt(n.router,t,i,!1),e&&e(t)}),r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Vt()!==e&&(t?Zt(e):Gt(e))},e.prototype.getCurrentLocation=function(){return Vt()},e}(Rt);function Ut(){var t=Vt();return"/"===t.charAt(0)||(Gt("/"+t),!1)}function Vt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function qt(t){var e=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}function Zt(t){xt?bt(qt(t)):window.location.hash=t}function Gt(t){xt?wt(qt(t)):window.location.replace(qt(t))}var Ht=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)}),r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,(function(){var t=e.current;e.index=r,e.updateRoute(n),e.router.afterHooks.forEach((function(e){e&&e(n,t)}))}),(function(t){Pt(t,Ct.duplicated)&&(e.index=r)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Rt),Wt=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=rt(e.routes||[],this);var n=e.mode||"hash";switch(this.fallback="history"===n&&!xt&&!1!==e.fallback,this.fallback&&(n="hash"),Q||(n="abstract"),this.mode=n,n){case"history":this.history=new Nt(this,e.base);break;case"hash":this.history=new $t(this,e.base,this.fallback);break;case"abstract":this.history=new Ht(this,e.base);break;default:"production"!==t.env.NODE_ENV&&r(!1,"invalid mode: "+n)}},Xt={currentRoute:{configurable:!0}};function Kt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}Wt.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},Xt.currentRoute.get=function(){return this.history&&this.history.current},Wt.prototype.init=function(e){var n=this;if("production"!==t.env.NODE_ENV&&r(J.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.apps.push(e),e.$once("hook:destroyed",(function(){var t=n.apps.indexOf(e);t>-1&&n.apps.splice(t,1),n.app===e&&(n.app=n.apps[0]||null),n.app||n.history.teardown()})),!this.app){this.app=e;var i=this.history;if(i instanceof Nt||i instanceof $t){var o=function(t){i.setupListeners(),function(t){var e=i.current,r=n.options.scrollBehavior;xt&&r&&"fullPath"in t&&pt(n,t,e,!1)}(t)};i.transitionTo(i.getCurrentLocation(),o,o)}i.listen((function(t){n.apps.forEach((function(e){e._route=t}))}))}},Wt.prototype.beforeEach=function(t){return Kt(this.beforeHooks,t)},Wt.prototype.beforeResolve=function(t){return Kt(this.resolveHooks,t)},Wt.prototype.afterEach=function(t){return Kt(this.afterHooks,t)},Wt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Wt.prototype.onError=function(t){this.history.onError(t)},Wt.prototype.push=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.push(t,e,r)}));this.history.push(t,e,r)},Wt.prototype.replace=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.replace(t,e,r)}));this.history.replace(t,e,r)},Wt.prototype.go=function(t){this.history.go(t)},Wt.prototype.back=function(){this.go(-1)},Wt.prototype.forward=function(){this.go(1)},Wt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Wt.prototype.resolve=function(t,e,r){var n=q(t,e=e||this.history.current,r,this),i=this.match(n,e),o=i.redirectedFrom||i.fullPath;return{location:n,route:i,href:function(t,e,r){var n="hash"===r?"#"+e:e;return t?S(t+"/"+n):n}(this.history.base,o,this.mode),normalizedTo:n,resolved:i}},Wt.prototype.getRoutes=function(){return this.matcher.getRoutes()},Wt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==v&&this.history.transitionTo(this.history.getCurrentLocation())},Wt.prototype.addRoutes=function(e){"production"!==t.env.NODE_ENV&&n(),this.matcher.addRoutes(e),this.history.current!==v&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Wt.prototype,Xt),Wt.install=J,Wt.version="3.5.1",Wt.isNavigationFailure=Pt,Wt.NavigationFailureType=Ct,Wt.START_LOCATION=v,Q&&window.Vue&&window.Vue.use(Wt),e.exports=Wt}).call(this)}).call(this,t("_process"))},{_process:7}],16:[function(t,e,r){(function(t,n){(function(){ /*! * Vue.js v2.6.12 * (c) 2014-2020 Evan You * Released under the MIT License. */ !function(t,n){"object"==typeof r&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Vue=n()}(this,(function(){"use strict";var e=Object.freeze({});function r(t){return null==t}function i(t){return null!=t}function o(t){return!0===t}function a(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function s(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function u(t){return"[object Object]"===l.call(t)}function c(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function d(t,e){for(var r=Object.create(null),n=t.split(","),i=0;i-1)return t.splice(r,1)}}var g=Object.prototype.hasOwnProperty;function _(t,e){return g.call(t,e)}function x(t){var e=Object.create(null);return function(r){return e[r]||(e[r]=t(r))}}var b=/-(\w)/g,w=x((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),T=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,S=x((function(t){return t.replace(C,"-$1").toLowerCase()})),E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function r(r){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,r):t.call(e)}return r._length=t.length,r};function A(t,e){e=e||0;for(var r=t.length-e,n=new Array(r);r--;)n[r]=t[r+e];return n}function k(t,e){for(var r in e)t[r]=e[r];return t}function I(t){for(var e={},r=0;r0,Y=W&&W.indexOf("edge/")>0,J=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===H),Q=(W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W),W&&W.match(/firefox\/(\d+)/)),tt={}.watch,et=!1;if(Z)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,rt)}catch(e){}var nt=function(){return void 0===U&&(U=!Z&&!G&&void 0!==t&&t.process&&"server"===t.process.env.VUE_ENV),U},it=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);at="undefined"!=typeof Set&&ot(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var lt=P,ut=0,ct=function(){this.id=ut++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){y(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){for(var t=this.subs.slice(),e=0,r=t.length;e-1)if(o&&!_(i,"default"))a=!1;else if(""===a||a===S(t)){var l=jt(String,i.type);(l<0||s0&&(ue((l=t(l,(n||"")+"_"+s))[0])&&ue(c)&&(p[u]=yt(c.text+l[0].text),l.shift()),p.push.apply(p,l)):a(l)?ue(c)?p[u]=yt(c.text+l):""!==l&&p.push(yt(l)):ue(l)&&ue(c)?p[u]=yt(c.text+l.text):(o(e._isVList)&&i(l.tag)&&r(l.key)&&i(n)&&(l.key="__vlist"+n+"_"+s+"__"),p.push(l)));return p}(t):void 0}function ue(t){return i(t)&&i(t.text)&&!1===t.isComment}function ce(t,e){if(t){for(var r=Object.create(null),n=st?Reflect.ownKeys(t):Object.keys(t),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==e&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=de(r,l,t[l]))}else i={};for(var u in r)u in i||(i[u]=me(r,u));return t&&Object.isExtensible(t)&&(t._normalized=i),$(i,"$stable",a),$(i,"$key",s),$(i,"$hasNormal",o),i}function de(t,e,r){var n=function(){var t=arguments.length?r.apply(null,arguments):r({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:le(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return r.proxy&&Object.defineProperty(t,e,{get:n,enumerable:!0,configurable:!0}),n}function me(t,e){return function(){return t[e]}}function ve(t,e){var r,n,o,a,l;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),n=0,o=t.length;ndocument.createEvent("Event").timeStamp&&(ar=function(){return sr.now()})}function lr(){var t,e;for(or=ar(),nr=!0,Qe.sort((function(t,e){return t.id-e.id})),ir=0;irir&&Qe[r].id>t.id;)r--;Qe.splice(r+1,0,t)}else Qe.push(t);rr||(rr=!0,te(lr))}}(this)},cr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){$t(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},cr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},cr.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},cr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var pr={enumerable:!0,configurable:!0,get:P,set:P};function hr(t,e,r){pr.get=function(){return this[e][r]},pr.set=function(t){this[e][r]=t},Object.defineProperty(t,r,pr)}var fr={lazy:!0};function dr(t,e,r){var n=!nt();"function"==typeof r?(pr.get=n?mr(e):vr(r),pr.set=P):(pr.get=r.get?n&&!1!==r.cache?mr(e):vr(r.get):P,pr.set=r.set||P),Object.defineProperty(t,e,pr)}function mr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ct.target&&e.depend(),e.value}}function vr(t){return function(){return t.call(this,this)}}function yr(t,e,r,n){return u(r)&&(n=r,r=r.handler),"string"==typeof r&&(r=t[r]),t.$watch(e,r,n)}var gr=0;function _r(t){var e=t.options;if(t.super){var r=_r(t.super);if(r!==t.superOptions){t.superOptions=r;var n=function(t){var e,r=t.options,n=t.sealedOptions;for(var i in r)r[i]!==n[i]&&(e||(e={}),e[i]=r[i]);return e}(t);n&&k(t.extendOptions,n),(e=t.options=Lt(r,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function xr(t){this._init(t)}function br(t){return t&&(t.Ctor.options.name||t.tag)}function wr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(r=t,"[object RegExp]"===l.call(r)&&t.test(e));var r}function Tr(t,e){var r=t.cache,n=t.keys,i=t._vnode;for(var o in r){var a=r[o];if(a){var s=br(a.componentOptions);s&&!e(s)&&Cr(r,o,n,i)}}}function Cr(t,e,r,n){var i=t[e];!i||n&&i.tag===n.tag||i.componentInstance.$destroy(),t[e]=null,y(r,e)}!function(t){t.prototype._init=function(t){var r=this;r._uid=gr++,r._isVue=!0,t&&t._isComponent?function(t,e){var r=t.$options=Object.create(t.constructor.options),n=e._parentVnode;r.parent=e.parent,r._parentVnode=n;var i=n.componentOptions;r.propsData=i.propsData,r._parentListeners=i.listeners,r._renderChildren=i.children,r._componentTag=i.tag,e.render&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns)}(r,t):r.$options=Lt(_r(r.constructor),t||{},r),r._renderProxy=r,r._self=r,function(t){var e=t.$options,r=e.parent;if(r&&!e.abstract){for(;r.$options.abstract&&r.$parent;)r=r.$parent;r.$children.push(t)}t.$parent=r,t.$root=r?r.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(r),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&He(t,e)}(r),function(t){t._vnode=null,t._staticTrees=null;var r=t.$options,n=t.$vnode=r._parentVnode,i=n&&n.context;t.$slots=pe(r._renderChildren,i),t.$scopedSlots=e,t._c=function(e,r,n,i){return Be(t,e,r,n,i,!1)},t.$createElement=function(e,r,n,i){return Be(t,e,r,n,i,!0)};var o=n&&n.data;Et(t,"$attrs",o&&o.attrs||e,null,!0),Et(t,"$listeners",r._parentListeners||e,null,!0)}(r),Je(r,"beforeCreate"),function(t){var e=ce(t.$options.inject,t);e&&(Tt(!1),Object.keys(e).forEach((function(r){Et(t,r,e[r])})),Tt(!0))}(r),function(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var r=t.$options.propsData||{},n=t._props={},i=t.$options._propKeys=[];t.$parent&&Tt(!1);var o=function(o){i.push(o);var a=Ft(o,e,r,t);Et(n,o,a),o in t||hr(t,"_props",o)};for(var a in e)o(a);Tt(!0)}(t,e.props),e.methods&&function(t,e){for(var r in t.$options.props,e)t[r]="function"!=typeof e[r]?P:E(e[r],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;u(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return $t(t,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});for(var r,n=Object.keys(e),i=t.$options.props,o=(t.$options.methods,n.length);o--;){var a=n[o];i&&_(i,a)||(void 0,36!==(r=(a+"").charCodeAt(0))&&95!==r&&hr(t,"_data",a))}St(e,!0)}(t):St(t._data={},!0),e.computed&&function(t,e){var r=t._computedWatchers=Object.create(null),n=nt();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;n||(r[i]=new cr(t,a||P,P,fr)),i in t||dr(t,i,o)}}(t,e.computed),e.watch&&e.watch!==tt&&function(t,e){for(var r in e){var n=e[r];if(Array.isArray(n))for(var i=0;i1?A(e):e;for(var r=A(arguments,1),n='event handler for "'+t+'"',i=0,o=e.length;iparseInt(this.max)&&Cr(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return N}};Object.defineProperty(t,"config",e),t.util={warn:lt,extend:k,mergeOptions:Lt,defineReactive:Et},t.set=At,t.delete=kt,t.nextTick=te,t.observable=function(t){return St(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,k(t.options.components,Er),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var r=A(arguments,1);return r.unshift(this),"function"==typeof t.install?t.install.apply(t,r):"function"==typeof t&&t.apply(null,r),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Lt(this.options,t),this}}(t),function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var r=this,n=r.cid,i=t._Ctor||(t._Ctor={});if(i[n])return i[n];var o=t.name||r.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(r.prototype)).constructor=a,a.cid=e++,a.options=Lt(r.options,t),a.super=r,a.options.props&&function(t){var e=t.options.props;for(var r in e)hr(t.prototype,"_props",r)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var r in e)dr(t.prototype,r,e[r])}(a),a.extend=r.extend,a.mixin=r.mixin,a.use=r.use,F.forEach((function(t){a[t]=r[t]})),o&&(a.options.components[o]=a),a.superOptions=r.options,a.extendOptions=t,a.sealedOptions=k({},a.options),i[n]=a,a}}(t),function(t){F.forEach((function(e){t[e]=function(t,r){return r?("component"===e&&u(r)&&(r.name=r.name||t,r=this.options._base.extend(r)),"directive"===e&&"function"==typeof r&&(r={bind:r,update:r}),this.options[e+"s"][t]=r,r):this.options[e+"s"][t]}}))}(t)}(xr),Object.defineProperty(xr.prototype,"$isServer",{get:nt}),Object.defineProperty(xr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xr,"FunctionalRenderContext",{value:Me}),xr.version="2.6.12";var Ar=d("style,class"),kr=d("input,textarea,option,select,progress"),Ir=function(t,e,r){return"value"===r&&kr(t)&&"button"!==e||"selected"===r&&"option"===t||"checked"===r&&"input"===t||"muted"===r&&"video"===t},Pr=d("contenteditable,draggable,spellcheck"),Mr=d("events,caret,typing,plaintext-only"),zr=d("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Or="http://www.w3.org/1999/xlink",Dr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Lr=function(t){return Dr(t)?t.slice(6,t.length):""},Rr=function(t){return null==t||!1===t};function Fr(t,e){return{staticClass:Br(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Br(t,e){return t?e?t+" "+e:t:e||""}function Nr(t){return Array.isArray(t)?function(t){for(var e,r="",n=0,o=t.length;n-1?pn(t,e,r):zr(e)?Rr(r)?t.removeAttribute(e):(r="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,r)):Pr(e)?t.setAttribute(e,function(t,e){return Rr(e)||"false"===e?"false":"contenteditable"===t&&Mr(e)?e:"true"}(e,r)):Dr(e)?Rr(r)?t.removeAttributeNS(Or,Lr(e)):t.setAttributeNS(Or,e,r):pn(t,e,r)}function pn(t,e,r){if(Rr(r))t.removeAttribute(e);else{if(X&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==r&&!t.__ieph){var n=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",n)};t.addEventListener("input",n),t.__ieph=!0}t.setAttribute(e,r)}}var hn={create:un,update:un};function fn(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=function(t){for(var e=t.data,r=t,n=t;i(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(e=Fr(n.data,e));for(;i(r=r.parent);)r&&r.data&&(e=Fr(e,r.data));return function(t,e){return i(t)||i(e)?Br(t,Nr(e)):""}(e.staticClass,e.class)}(e),l=n._transitionClasses;i(l)&&(s=Br(s,Nr(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var dn,mn,vn,yn,gn,_n,xn={create:fn,update:fn},bn=/[\w).+\-_$\]]/;function wn(t){var e,r,n,i,o,a=!1,s=!1,l=!1,u=!1,c=0,p=0,h=0,f=0;for(n=0;n=0&&" "===(m=t.charAt(d));d--);m&&bn.test(m)||(u=!0)}}else void 0===i?(f=n+1,i=t.slice(0,n).trim()):v();function v(){(o||(o=[])).push(t.slice(f,n).trim()),f=n+1}if(void 0===i?i=t.slice(0,n).trim():0!==f&&v(),o)for(n=0;n-1?{exp:t.slice(0,yn),key:'"'+t.slice(yn+1)+'"'}:{exp:t,key:null};for(mn=t,yn=gn=_n=0;!Nn();)jn(vn=Bn())?Un(vn):91===vn&&$n(vn);return{exp:t.slice(0,gn),key:t.slice(gn+1,_n)}}(t);return null===r.key?t+"="+e:"$set("+r.exp+", "+r.key+", "+e+")"}function Bn(){return mn.charCodeAt(++yn)}function Nn(){return yn>=dn}function jn(t){return 34===t||39===t}function $n(t){var e=1;for(gn=yn;!Nn();)if(jn(t=Bn()))Un(t);else if(91===t&&e++,93===t&&e--,0===e){_n=yn;break}}function Un(t){for(var e=t;!Nn()&&(t=Bn())!==e;);}var Vn,qn="__r";function Zn(t,e,r){var n=Vn;return function i(){null!==e.apply(null,arguments)&&Wn(t,i,r,n)}}var Gn=Gt&&!(Q&&Number(Q[1])<=53);function Hn(t,e,r,n){if(Gn){var i=or,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Vn.addEventListener(t,e,et?{capture:r,passive:n}:r)}function Wn(t,e,r,n){(n||Vn).removeEventListener(t,e._wrapper||e,r)}function Xn(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Vn=e.elm,function(t){if(i(t.__r)){var e=X?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}i(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),oe(n,o,Hn,Wn,Zn,e.context),Vn=void 0}}var Kn,Yn={create:Xn,update:Xn};function Jn(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};for(n in i(l.__ob__)&&(l=e.data.domProps=k({},l)),s)n in l||(a[n]="");for(n in l){if(o=l[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=o;var u=r(o)?"":String(o);Qn(a,u)&&(a.value=u)}else if("innerHTML"===n&&Ur(a.tagName)&&r(a.innerHTML)){(Kn=Kn||document.createElement("div")).innerHTML=""+o+"";for(var c=Kn.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(o!==s[n])try{a[n]=o}catch(t){}}}}function Qn(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var r=!0;try{r=document.activeElement!==t}catch(t){}return r&&t.value!==e}(t,e)||function(t,e){var r=t.value,n=t._vModifiers;if(i(n)){if(n.number)return f(r)!==f(e);if(n.trim)return r.trim()!==e.trim()}return r!==e}(t,e))}var ti={create:Jn,update:Jn},ei=x((function(t){var e={},r=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function ri(t){var e=ni(t.style);return t.staticStyle?k(t.staticStyle,e):e}function ni(t){return Array.isArray(t)?I(t):"string"==typeof t?ei(t):t}var ii,oi=/^--/,ai=/\s*!important$/,si=function(t,e,r){if(oi.test(e))t.style.setProperty(e,r);else if(ai.test(r))t.style.setProperty(S(e),r.replace(ai,""),"important");else{var n=ui(e);if(Array.isArray(r))for(var i=0,o=r.length;i-1?e.split(hi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var r=" "+(t.getAttribute("class")||"")+" ";r.indexOf(" "+e+" ")<0&&t.setAttribute("class",(r+e).trim())}}function di(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(hi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var r=" "+(t.getAttribute("class")||"")+" ",n=" "+e+" ";r.indexOf(n)>=0;)r=r.replace(n," ");(r=r.trim())?t.setAttribute("class",r):t.removeAttribute("class")}}function mi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&k(e,vi(t.name||"v")),k(e,t),e}return"string"==typeof t?vi(t):void 0}}var vi=x((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),yi=Z&&!K,gi="transition",_i="animation",xi="transition",bi="transitionend",wi="animation",Ti="animationend";yi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(xi="WebkitTransition",bi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(wi="WebkitAnimation",Ti="webkitAnimationEnd"));var Ci=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Si(t){Ci((function(){Ci(t)}))}function Ei(t,e){var r=t._transitionClasses||(t._transitionClasses=[]);r.indexOf(e)<0&&(r.push(e),fi(t,e))}function Ai(t,e){t._transitionClasses&&y(t._transitionClasses,e),di(t,e)}function ki(t,e,r){var n=Pi(t,e),i=n.type,o=n.timeout,a=n.propCount;if(!i)return r();var s=i===gi?bi:Ti,l=0,u=function(){t.removeEventListener(s,c),r()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout((function(){l0&&(r=gi,c=a,p=o.length):e===_i?u>0&&(r=_i,c=u,p=l.length):p=(r=(c=Math.max(a,u))>0?a>u?gi:_i:null)?r===gi?o.length:l.length:0,{type:r,timeout:c,propCount:p,hasTransform:r===gi&&Ii.test(n[xi+"Property"])}}function Mi(t,e){for(;t.length1}function Fi(t,e){!0!==e.data.show&&Oi(e)}var Bi=function(t){var e,n,s={},l=t.modules,u=t.nodeOps;for(e=0;ed?_(t,r(n[y+1])?null:n[y+1].elm,n,f,y,o):f>y&&b(e,h,d)}(h,m,y,n,c):i(y)?(i(t.text)&&u.setTextContent(h,""),_(h,null,y,0,y.length-1,n)):i(m)?b(m,0,m.length-1):i(t.text)&&u.setTextContent(h,""):t.text!==e.text&&u.setTextContent(h,e.text),i(d)&&i(f=d.hook)&&i(f=f.postpatch)&&f(t,e)}}}function S(t,e,r){if(o(r)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var n=0;n-1,a.selected!==o&&(a.selected=o);else if(O(Vi(a),n))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Ui(t,e){return e.every((function(e){return!O(e,t)}))}function Vi(t){return"_value"in t?t._value:t.value}function qi(t){t.target.composing=!0}function Zi(t){t.target.composing&&(t.target.composing=!1,Gi(t.target,"input"))}function Gi(t,e){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}function Hi(t){return!t.componentInstance||t.data&&t.data.transition?t:Hi(t.componentInstance._vnode)}var Wi={model:Ni,show:{bind:function(t,e,r){var n=e.value,i=(r=Hi(r)).data&&r.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;n&&i?(r.data.show=!0,Oi(r,(function(){t.style.display=o}))):t.style.display=n?o:"none"},update:function(t,e,r){var n=e.value;!n!=!e.oldValue&&((r=Hi(r)).data&&r.data.transition?(r.data.show=!0,n?Oi(r,(function(){t.style.display=t.__vOriginalDisplay})):Di(r,(function(){t.style.display="none"}))):t.style.display=n?t.__vOriginalDisplay:"none")},unbind:function(t,e,r,n,i){i||(t.style.display=t.__vOriginalDisplay)}}},Xi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ki(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ki(Ve(e.children)):t}function Yi(t){var e={},r=t.$options;for(var n in r.propsData)e[n]=t[n];var i=r._parentListeners;for(var o in i)e[w(o)]=i[o];return e}function Ji(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Qi=function(t){return t.tag||Ue(t)},to=function(t){return"show"===t.name},eo={name:"transition",props:Xi,abstract:!0,render:function(t){var e=this,r=this.$slots.default;if(r&&(r=r.filter(Qi)).length){var n=this.mode,i=r[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=Ki(i);if(!o)return i;if(this._leaving)return Ji(t,i);var s="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?s+"comment":s+o.tag:a(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var l=(o.data||(o.data={})).transition=Yi(this),u=this._vnode,c=Ki(u);if(o.data.directives&&o.data.directives.some(to)&&(o.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,c)&&!Ue(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var p=c.data.transition=k({},l);if("out-in"===n)return this._leaving=!0,ae(p,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Ji(t,i);if("in-out"===n){if(Ue(o))return u;var h,f=function(){h()};ae(l,"afterEnter",f),ae(l,"enterCancelled",f),ae(p,"delayLeave",(function(t){h=t}))}}return i}}},ro=k({tag:String,moveClass:String},Xi);function no(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function io(t){t.data.newPos=t.elm.getBoundingClientRect()}function oo(t){var e=t.data.pos,r=t.data.newPos,n=e.left-r.left,i=e.top-r.top;if(n||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+n+"px,"+i+"px)",o.transitionDuration="0s"}}delete ro.mode;var ao={Transition:eo,TransitionGroup:{props:ro,beforeMount:function(){var t=this,e=this._update;this._update=function(r,n){var i=Xe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,r,n)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),n=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Yi(this),s=0;s-1?Zr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Zr[t]=/HTMLUnknownElement/.test(e.toString())},k(xr.options.directives,Wi),k(xr.options.components,ao),xr.prototype.__patch__=Z?Bi:P,xr.prototype.$mount=function(t,e){return function(t,e,r){var n;return t.$el=e,t.$options.render||(t.$options.render=vt),Je(t,"beforeMount"),n=function(){t._update(t._render(),r)},new cr(t,n,P,{before:function(){t._isMounted&&!t._isDestroyed&&Je(t,"beforeUpdate")}},!0),r=!1,null==t.$vnode&&(t._isMounted=!0,Je(t,"mounted")),t}(this,t=t&&Z?Hr(t):void 0,e)},Z&&setTimeout((function(){N.devtools&&it&&it.emit("init",xr)}),0);var so,lo=/\{\{((?:.|\r?\n)+?)\}\}/g,uo=/[-.*+?^${}()|[\]\/\\]/g,co=x((function(t){var e=t[0].replace(uo,"\\$&"),r=t[1].replace(uo,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+r,"g")})),po={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var r=On(t,"class");r&&(t.staticClass=JSON.stringify(r));var n=zn(t,"class",!1);n&&(t.classBinding=n)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},ho={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var r=On(t,"style");r&&(t.staticStyle=JSON.stringify(ei(r)));var n=zn(t,"style",!1);n&&(t.styleBinding=n)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},fo=d("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),mo=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),vo=d("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),yo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,go=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,_o="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+j.source+"]*",xo="((?:"+_o+"\\:)?"+_o+")",bo=new RegExp("^<"+xo),wo=/^\s*(\/?)>/,To=new RegExp("^<\\/"+xo+"[^>]*>"),Co=/^]+>/i,So=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Po=/&(?:lt|gt|quot|amp|#39);/g,Mo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,zo=d("pre,textarea",!0),Oo=function(t,e){return t&&zo(t)&&"\n"===e[0]};function Do(t,e){var r=e?Mo:Po;return t.replace(r,(function(t){return Io[t]}))}var Lo,Ro,Fo,Bo,No,jo,$o,Uo,Vo=/^@|^v-on:/,qo=/^v-|^@|^:|^#/,Zo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Go=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ho=/^\(|\)$/g,Wo=/^\[.*\]$/,Xo=/:(.*)$/,Ko=/^:|^\.|^v-bind:/,Yo=/\.[^.\]]+(?=[^\]]*$)/g,Jo=/^v-slot(:|$)|^#/,Qo=/[\r\n]/,ta=/\s+/g,ea=x((function(t){return(so=so||document.createElement("div")).innerHTML=t,so.textContent})),ra="_empty_";function na(t,e,r){return{type:1,tag:t,attrsList:e,attrsMap:ua(e),rawAttrsMap:{},parent:r,children:[]}}function ia(t,e){var r,n;(n=zn(r=t,"key"))&&(r.key=n),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=zn(t,"ref");e&&(t.ref=e,t.refInFor=function(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=On(t,"scope"),t.slotScope=e||On(t,"slot-scope")):(e=On(t,"slot-scope"))&&(t.slotScope=e);var r=zn(t,"slot");if(r&&(t.slotTarget='""'===r?'"default"':r,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||An(t,"slot",r,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot"))),"template"===t.tag){var n=Dn(t,Jo);if(n){var i=sa(n),o=i.name,a=i.dynamic;t.slotTarget=o,t.slotTargetDynamic=a,t.slotScope=n.value||ra}}else{var s=Dn(t,Jo);if(s){var l=t.scopedSlots||(t.scopedSlots={}),u=sa(s),c=u.name,p=u.dynamic,h=l[c]=na("template",[],t);h.slotTarget=c,h.slotTargetDynamic=p,h.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=h,!0})),h.slotScope=s.value||ra,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=zn(t,"name"))}(t),function(t){var e;(e=zn(t,"is"))&&(t.component=e),null!=On(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var i=0;i-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Mn(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(n?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Fn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Fn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Fn(e,"$$c")+"}",null,!0)}(t,n,i);else if("input"===o&&"radio"===a)!function(t,e,r){var n=r&&r.number,i=zn(t,"value")||"null";En(t,"checked","_q("+e+","+(i=n?"_n("+i+")":i)+")"),Mn(t,"change",Fn(e,i),null,!0)}(t,n,i);else if("input"===o||"textarea"===o)!function(t,e,r){var n=t.attrsMap.type,i=r||{},o=i.lazy,a=i.number,s=i.trim,l=!o&&"range"!==n,u=o?"change":"range"===n?qn:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var p=Fn(e,c);l&&(p="if($event.target.composing)return;"+p),En(t,"value","("+e+")"),Mn(t,u,p,null,!0),(s||a)&&Mn(t,"blur","$forceUpdate()")}(t,n,i);else if(!N.isReservedTag(o))return Rn(t,n,i),!1;return!0},text:function(t,e){e.value&&En(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&En(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:fo,mustUseProp:Ir,canBeLeftOpenTag:mo,isReservedTag:Vr,getTagNamespace:qr,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(ma)},ya=x((function(t){return d("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));var ga=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,_a=/\([^)]*?\);*$/,xa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ba={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},wa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ta=function(t){return"if("+t+")return null;"},Ca={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ta("$event.target !== $event.currentTarget"),ctrl:Ta("!$event.ctrlKey"),shift:Ta("!$event.shiftKey"),alt:Ta("!$event.altKey"),meta:Ta("!$event.metaKey"),left:Ta("'button' in $event && $event.button !== 0"),middle:Ta("'button' in $event && $event.button !== 1"),right:Ta("'button' in $event && $event.button !== 2")};function Sa(t,e){var r=e?"nativeOn:":"on:",n="",i="";for(var o in t){var a=Ea(t[o]);t[o]&&t[o].dynamic?i+=o+","+a+",":n+='"'+o+'":'+a+","}return n="{"+n.slice(0,-1)+"}",i?r+"_d("+n+",["+i.slice(0,-1)+"])":r+n}function Ea(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return Ea(t)})).join(",")+"]";var e=xa.test(t.value),r=ga.test(t.value),n=xa.test(t.value.replace(_a,""));if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(Ca[s])o+=Ca[s],ba[s]&&a.push(s);else if("exact"===s){var l=t.modifiers;o+=Ta(["ctrl","shift","alt","meta"].filter((function(t){return!l[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Aa).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(e?"return "+t.value+"($event)":r?"return ("+t.value+")($event)":n?"return "+t.value:t.value)+"}"}return e||r?t.value:"function($event){"+(n?"return "+t.value:t.value)+"}"}function Aa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var r=ba[t],n=wa[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(r)+",$event.key,"+JSON.stringify(n)+")"}var ka={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(r){return"_b("+r+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:P},Ia=function(t){this.options=t,this.warn=t.warn||Cn,this.transforms=Sn(t.modules,"transformCode"),this.dataGenFns=Sn(t.modules,"genData"),this.directives=k(k({},ka),t.directives);var e=t.isReservedTag||M;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(t,e){var r=new Ia(e);return{render:"with(this){return "+(t?Ma(t,r):'_c("div")')+"}",staticRenderFns:r.staticRenderFns}}function Ma(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return za(t,e);if(t.once&&!t.onceProcessed)return Oa(t,e);if(t.for&&!t.forProcessed)return La(t,e);if(t.if&&!t.ifProcessed)return Da(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var r=t.slotName||'"default"',n=Na(t,e),i="_t("+r+(n?","+n:""),o=t.attrs||t.dynamicAttrs?Ua((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];return!o&&!a||n||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}(t,e);var r;if(t.component)r=function(t,e,r){var n=e.inlineTemplate?null:Na(e,r,!0);return"_c("+t+","+Ra(e,r)+(n?","+n:"")+")"}(t.component,t,e);else{var n;(!t.plain||t.pre&&e.maybeComponent(t))&&(n=Ra(t,e));var i=t.inlineTemplate?null:Na(t,e,!0);r="_c('"+t.tag+"'"+(n?","+n:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(r+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=function(t,e){var r=t.children[0];if(r&&1===r.type){var n=Pa(r,e.options);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);o&&(r+=o+",")}return r=r.replace(/,$/,"")+"}",t.dynamicAttrs&&(r="_b("+r+',"'+t.tag+'",'+Ua(t.dynamicAttrs)+")"),t.wrapData&&(r=t.wrapData(r)),t.wrapListeners&&(r=t.wrapListeners(r)),r}function Fa(t){return 1===t.type&&("slot"===t.tag||t.children.some(Fa))}function Ba(t,e){var r=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!r)return Da(t,e,Ba,"null");if(t.for&&!t.forProcessed)return La(t,e,Ba);var n=t.slotScope===ra?"":String(t.slotScope),i="function("+n+"){return "+("template"===t.tag?t.if&&r?"("+t.if+")?"+(Na(t,e)||"undefined")+":undefined":Na(t,e)||"undefined":Ma(t,e))+"}",o=n?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+i+o+"}"}function Na(t,e,r,n,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=r?e.maybeComponent(a)?",1":",0":"";return""+(n||Ma)(a,e)+s}var l=r?function(t,e){for(var r=0,n=0;n]*>)","i")),h=t.replace(p,(function(t,r,n){return u=n.length,Ao(c)||"noscript"===c||(r=r.replace(//g,"$1").replace(//g,"$1")),Oo(c,r)&&(r=r.slice(1)),e.chars&&e.chars(r),""}));l+=t.length-h.length,t=h,E(c,l-u,l)}else{var f=t.indexOf("<");if(0===f){if(So.test(t)){var d=t.indexOf("--\x3e");if(d>=0){e.shouldKeepComment&&e.comment(t.substring(4,d),l,l+d+3),T(d+3);continue}}if(Eo.test(t)){var m=t.indexOf("]>");if(m>=0){T(m+2);continue}}var v=t.match(Co);if(v){T(v[0].length);continue}var y=t.match(To);if(y){var g=l;T(y[0].length),E(y[1],g,l);continue}var _=C();if(_){S(_),Oo(_.tagName,t)&&T(1);continue}}var x=void 0,b=void 0,w=void 0;if(f>=0){for(b=t.slice(f);!(To.test(b)||bo.test(b)||So.test(b)||Eo.test(b)||(w=b.indexOf("<",1))<0);)f+=w,b=t.slice(f);x=t.substring(0,f)}f<0&&(x=t),x&&T(x.length),e.chars&&x&&e.chars(x,l-x.length,l)}if(t===r){e.chars&&e.chars(t);break}}function T(e){l+=e,t=t.substring(e)}function C(){var e=t.match(bo);if(e){var r,n,i={tagName:e[1],attrs:[],start:l};for(T(e[0].length);!(r=t.match(wo))&&(n=t.match(go)||t.match(yo));)n.start=l,T(n[0].length),n.end=l,i.attrs.push(n);if(r)return i.unarySlash=r[1],T(r[0].length),i.end=l,i}}function S(t){var r=t.tagName,l=t.unarySlash;o&&("p"===n&&vo(r)&&E(n),s(r)&&n===r&&E(r));for(var u=a(r)||!!l,c=t.attrs.length,p=new Array(c),h=0;h=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)e.end&&e.end(i[u].tag,r,o);i.length=a,n=a&&i[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,r,o):"p"===s&&(e.start&&e.start(t,[],!1,r,o),e.end&&e.end(t,r,o))}E()}(t,{warn:Lo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,o,a,c,p){var h=n&&n.ns||Uo(t);X&&"svg"===h&&(o=function(t){for(var e=[],r=0;rl&&(s.push(o=t.slice(l,i)),a.push(JSON.stringify(o)));var u=wn(n[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),l=i+n[0].length}return l':'
',Ha.innerHTML.indexOf(" ")>0}var Ya=!!Z&&Ka(!1),Ja=!!Z&&Ka(!0),Qa=x((function(t){var e=Hr(t);return e&&e.innerHTML})),ts=xr.prototype.$mount;return xr.prototype.$mount=function(t,e){if((t=t&&Hr(t))===document.body||t===document.documentElement)return this;var r=this.$options;if(!r.render){var n=r.template;if(n)if("string"==typeof n)"#"===n.charAt(0)&&(n=Qa(n));else{if(!n.nodeType)return this;n=n.innerHTML}else t&&(n=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(n){var i=Xa(n,{outputSourceRange:!1,shouldDecodeNewlines:Ya,shouldDecodeNewlinesForHref:Ja,delimiters:r.delimiters,comments:r.comments},this),o=i.render,a=i.staticRenderFns;r.render=o,r.staticRenderFns=a}}return ts.call(this,t,e)},xr.compile=Xa,xr}))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{timers:10}],17:[function(t,e,r){(function(t,r){(function(){ /*! * Vue.js v2.6.12 * (c) 2014-2020 Evan You * Released under the MIT License. */ "use strict";var n=Object.freeze({});function i(t){return null==t}function o(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function l(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function c(t){return u.call(t).slice(8,-1)}function p(t){return"[object Object]"===u.call(t)}function h(t){return"[object RegExp]"===u.call(t)}function f(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function m(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var r=Object.create(null),n=t.split(","),i=0;i-1)return t.splice(r,1)}}var b=Object.prototype.hasOwnProperty;function w(t,e){return b.call(t,e)}function T(t){var e=Object.create(null);return function(r){return e[r]||(e[r]=t(r))}}var C=/-(\w)/g,S=T((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),E=T((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),A=/\B([A-Z])/g,k=T((function(t){return t.replace(A,"-$1").toLowerCase()}));var I=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function r(r){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,r):t.call(e)}return r._length=t.length,r};function P(t,e){e=e||0;for(var r=t.length-e,n=new Array(r);r--;)n[r]=t[r+e];return n}function M(t,e){for(var r in e)t[r]=e[r];return t}function z(t){for(var e={},r=0;r0,tt=Y&&Y.indexOf("edge/")>0,et=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===K),rt=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),nt={}.watch,it=!1;if(W)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){it=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var at=function(){return void 0===G&&(G=!W&&!X&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),G},st=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function lt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ut,ct="undefined"!=typeof Symbol&<(Symbol)&&"undefined"!=typeof Reflect&<(Reflect.ownKeys);ut="undefined"!=typeof Set&<(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var pt,ht,ft,dt=O,mt="undefined"!=typeof console,vt=/(?:^|[-_])(\w)/g;pt=function(t,e){var r=e?dt(e):"";$.warnHandler?$.warnHandler.call(null,t,e,r):mt&&$.silent},ht=function(t,e){mt&&$.silent},ft=function(t,e){if(t.$root===t)return"";var r="function"==typeof t&&null!=t.cid?t.options:t._isVue?t.$options||t.constructor.options:t,n=r.name||r._componentTag,i=r.__file;if(!n&&i){var o=i.match(/([^/\\]+)\.vue$/);n=o&&o[1]}return(n?"<"+(n.replace(vt,(function(t){return t.toUpperCase()})).replace(/[-_]/g,"")+">"):"")+(i&&!1!==e?" at "+i:"")};dt=function(t){if(t._isVue&&t.$parent){for(var e=[],r=0;t;){if(e.length>0){var n=e[e.length-1];if(n.constructor===t.constructor){r++,t=t.$parent;continue}r>0&&(e[e.length-1]=[n,r],r=0)}e.push(t),t=t.$parent}return"\n\nfound in\n\n"+e.map((function(t,e){return""+(0===e?"---\x3e ":function(t,e){for(var r="";e;)e%2==1&&(r+=t),e>1&&(t+=t),e>>=1;return r}(" ",5+2*e))+(Array.isArray(t)?ft(t[0])+"... ("+t[1]+" recursive calls)":ft(t))})).join("\n")}return"\n\n(found in "+ft(t)+")"};var yt=0,gt=function(){this.id=yt++,this.subs=[]};gt.prototype.addSub=function(t){this.subs.push(t)},gt.prototype.removeSub=function(t){x(this.subs,t)},gt.prototype.depend=function(){gt.target&>.target.addDep(this)},gt.prototype.notify=function(){var t=this.subs.slice();$.async||t.sort((function(t,e){return t.id-e.id}));for(var e=0,r=t.length;e-1)if(o&&!w(i,"default"))a=!1;else if(""===a||a===k(t)){var u=Qt(String,i.type);(u<0||s0&&(Le((l=t(l,(r||"")+"_"+n))[0])&&Le(c)&&(p[u]=St(c.text+l[0].text),l.shift()),p.push.apply(p,l)):s(l)?Le(c)?p[u]=St(c.text+l):""!==l&&p.push(St(l)):Le(l)&&Le(c)?p[u]=St(c.text+l.text):(a(e._isVList)&&o(l.tag)&&i(l.key)&&o(r)&&(l.key="__vlist"+r+"_"+n+"__"),p.push(l)));return p}(t):void 0}function Le(t){return o(t)&&o(t.text)&&!1===t.isComment}function Re(t,e){if(t){for(var r=Object.create(null),n=ct?Reflect.ownKeys(t):Object.keys(t),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=je(e,l,t[l]))}else i={};for(var u in e)u in i||(i[u]=$e(e,u));return t&&Object.isExtensible(t)&&(t._normalized=i),q(i,"$stable",a),q(i,"$key",s),q(i,"$hasNormal",o),i}function je(t,e,r){var n=function(){var t=arguments.length?r.apply(null,arguments):r({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:De(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return r.proxy&&Object.defineProperty(t,e,{get:n,enumerable:!0,configurable:!0}),n}function $e(t,e){return function(){return t[e]}}function Ue(t,e){var r,n,i,a,s;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),n=0,i=t.length;n.",t),c=new wt($.parsePlatformTagName(e),r,n,void 0,void 0,t)):c=r&&r.pre||!o(h=Ht(t.$options,"components",e))?new wt(e,r,n,void 0,void 0,t):lr(h,r,t,n,e)}else c=lr(e,r,t,n);return Array.isArray(c)?c:o(c)?(o(p)&&function t(e,r,n){e.ns=r,"foreignObject"===e.tag&&(r=void 0,n=!0);if(o(e.children))for(var s=0,l=e.children.length;sdocument.createEvent("Event").timeStamp&&(Dr=function(){return Lr.now()})}function Rr(){var t,e;for(Or=Dr(),Mr=!0,Er.sort((function(t,e){return t.id-e.id})),zr=0;zr100)){pt("You may have an infinite update loop "+(t.user?'in watcher with expression "'+t.expression+'"':"in a component render function."),t.vm);break}var r=Ar.slice(),n=Er.slice();zr=Er.length=Ar.length=0,kr={},Ir={},Pr=Mr=!1,function(t){for(var e=0;ezr&&Er[r].id>t.id;)r--;Er.splice(r+1,0,t)}else Er.push(t);if(!Pr){if(Pr=!0,!$.async)return void Rr();ve(Rr)}}}(this)},Br.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){re(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Br.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Br.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Br.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||x(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var Nr={enumerable:!0,configurable:!0,get:O,set:O};function jr(t,e,r){Nr.get=function(){return this[e][r]},Nr.set=function(t){this[e][r]=t},Object.defineProperty(t,r,Nr)}function $r(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var r=t.$options.propsData||{},n=t._props={},i=t.$options._propKeys=[],o=!t.$parent;o||Mt(!1);var a=function(a){i.push(a);var s=Wt(a,e,r,t),l=k(a);(_(l)||$.isReservedAttr(l))&&pt('"'+l+'" is a reserved attribute and cannot be used as component prop.',t),Dt(n,a,s,(function(){o||br||pt("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+a+'"',t)})),a in t||jr(t,"_props",a)};for(var s in e)a(s);Mt(!0)}(t,e.props),e.methods&&function(t,e){var r=t.$options.props;for(var n in e)"function"!=typeof e[n]&&pt('Method "'+n+'" has type "'+typeof e[n]+'" in the component definition. Did you reference the function correctly?',t),r&&w(r,n)&&pt('Method "'+n+'" has already been defined as a prop.',t),n in t&&V(n)&&pt('Method "'+n+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),t[n]="function"!=typeof e[n]?O:I(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;p(e=t._data="function"==typeof e?function(t,e){xt();try{return t.call(e,e)}catch(t){return re(t,e,"data()"),{}}finally{bt()}}(e,t):e||{})||(e={},pt("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",t));var r=Object.keys(e),n=t.$options.props,i=t.$options.methods,o=r.length;for(;o--;){var a=r[o];i&&w(i,a)&&pt('Method "'+a+'" has already been defined as a data property.',t),n&&w(n,a)?pt('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',t):V(a)||jr(t,"_data",a)}Ot(e,!0)}(t):Ot(t._data={},!0),e.computed&&function(t,e){var r=t._computedWatchers=Object.create(null),n=at();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;null==a&&pt('Getter is missing for computed property "'+i+'".',t),n||(r[i]=new Br(t,a||O,O,Ur)),i in t?i in t.$data?pt('The computed property "'+i+'" is already defined in data.',t):t.$options.props&&i in t.$options.props&&pt('The computed property "'+i+'" is already defined as a prop.',t):Vr(t,i,o)}}(t,e.computed),e.watch&&e.watch!==nt&&function(t,e){for(var r in e){var n=e[r];if(Array.isArray(n))for(var i=0;i-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!h(t)&&t.test(e)}function Qr(t,e){var r=t.cache,n=t.keys,i=t._vnode;for(var o in r){var a=r[o];if(a){var s=Yr(a.componentOptions);s&&!e(s)&&tn(r,o,n,i)}}}function tn(t,e,r,n){var i=t[e];!i||n&&i.tag===n.tag||i.componentInstance.$destroy(),t[e]=null,x(r,e)}!function(t){t.prototype._init=function(t){var e,r,i=this;i._uid=Hr++,$.performance&&Ce&&(e="vue-perf-start:"+i._uid,r="vue-perf-end:"+i._uid,Ce(e)),i._isVue=!0,t&&t._isComponent?function(t,e){var r=t.$options=Object.create(t.constructor.options),n=e._parentVnode;r.parent=e.parent,r._parentVnode=n;var i=n.componentOptions;r.propsData=i.propsData,r._parentListeners=i.listeners,r._renderChildren=i.children,r._componentTag=i.tag,e.render&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns)}(i,t):i.$options=Gt(Wr(i.constructor),t||{},i),se(i),i._self=i,function(t){var e=t.$options,r=e.parent;if(r&&!e.abstract){for(;r.$options.abstract&&r.$parent;)r=r.$parent;r.$children.push(t)}t.$parent=r,t.$root=r?r.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(i),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&_r(t,e)}(i),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,r=t.$vnode=e._parentVnode,i=r&&r.context;t.$slots=Fe(e._renderChildren,i),t.$scopedSlots=n,t._c=function(e,r,n,i){return cr(t,e,r,n,i,!1)},t.$createElement=function(e,r,n,i){return cr(t,e,r,n,i,!0)};var o=r&&r.data;Dt(t,"$attrs",o&&o.attrs||n,(function(){!br&&pt("$attrs is readonly.",t)}),!0),Dt(t,"$listeners",e._parentListeners||n,(function(){!br&&pt("$listeners is readonly.",t)}),!0)}(i),Sr(i,"beforeCreate"),function(t){var e=Re(t.$options.inject,t);e&&(Mt(!1),Object.keys(e).forEach((function(r){Dt(t,r,e[r],(function(){pt('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+r+'"',t)}))})),Mt(!0))}(i),$r(i),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(i),Sr(i,"created"),$.performance&&Ce&&(i._name=ft(i,!1),Ce(r),Se("vue "+i._name+" init",e,r)),i.$options.el&&i.$mount(i.$options.el)}}(Xr),function(t){var e={get:function(){return this._data}},r={get:function(){return this._props}};e.set=function(){pt("Avoid replacing instance root $data. Use nested data properties instead.",this)},r.set=function(){pt("$props is readonly.",this)},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",r),t.prototype.$set=Lt,t.prototype.$delete=Rt,t.prototype.$watch=function(t,e,r){if(p(e))return Gr(this,t,e,r);(r=r||{}).user=!0;var n=new Br(this,t,e,r);if(r.immediate)try{e.call(this,n.value)}catch(t){re(t,this,'callback for immediate watcher "'+n.expression+'"')}return function(){n.teardown()}}}(Xr),function(t){var e=/^hook:/;t.prototype.$on=function(t,r){var n=this;if(Array.isArray(t))for(var i=0,o=t.length;i1?P(n):n;for(var i=P(arguments,1),o='event handler for "'+t+'"',a=0,s=n.length;aparseInt(this.max)&&tn(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return $},set:function(){pt("Do not replace the Vue.config object, set individual fields instead.")}};Object.defineProperty(t,"config",e),t.util={warn:pt,extend:M,mergeOptions:Gt,defineReactive:Dt},t.set=Lt,t.delete=Rt,t.nextTick=ve,t.observable=function(t){return Ot(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,M(t.options.components,rn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var r=P(arguments,1);return r.unshift(this),"function"==typeof t.install?t.install.apply(t,r):"function"==typeof t&&t.apply(null,r),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Gt(this.options,t),this}}(t),Kr(t),function(t){N.forEach((function(e){t[e]=function(t,r){return r?("component"===e&&qt(t),"component"===e&&p(r)&&(r.name=r.name||t,r=this.options._base.extend(r)),"directive"===e&&"function"==typeof r&&(r={bind:r,update:r}),this.options[e+"s"][t]=r,r):this.options[e+"s"][t]}}))}(t)}(Xr),Object.defineProperty(Xr.prototype,"$isServer",{get:at}),Object.defineProperty(Xr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Xr,"FunctionalRenderContext",{value:nr}),Xr.version="2.6.12";var nn=y("style,class"),on=y("input,textarea,option,select,progress"),an=y("contenteditable,draggable,spellcheck"),sn=y("events,caret,typing,plaintext-only"),ln=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),un="http://www.w3.org/1999/xlink",cn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},pn=function(t){return cn(t)?t.slice(6,t.length):""},hn=function(t){return null==t||!1===t};function fn(t){for(var e=t.data,r=t,n=t;o(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(e=dn(n.data,e));for(;o(r=r.parent);)r&&r.data&&(e=dn(e,r.data));return function(t,e){if(o(t)||o(e))return mn(t,vn(e));return""}(e.staticClass,e.class)}function dn(t,e){return{staticClass:mn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function mn(t,e){return t?e?t+" "+e:t:e||""}function vn(t){return Array.isArray(t)?function(t){for(var e,r="",n=0,i=t.length;n-1?Nn(t,e,r):ln(e)?hn(r)?t.removeAttribute(e):(r="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,r)):an(e)?t.setAttribute(e,function(t,e){return hn(e)||"false"===e?"false":"contenteditable"===t&&sn(e)?e:"true"}(e,r)):cn(e)?hn(r)?t.removeAttributeNS(un,pn(e)):t.setAttributeNS(un,e,r):Nn(t,e,r)}function Nn(t,e,r){if(hn(r))t.removeAttribute(e);else{if(J&&!Q&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==r&&!t.__ieph){var n=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",n)};t.addEventListener("input",n),t.__ieph=!0}t.setAttribute(e,r)}}var jn={create:Fn,update:Fn};function $n(t,e){var r=e.elm,n=e.data,a=t.data;if(!(i(n.staticClass)&&i(n.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=fn(e),l=r._transitionClasses;o(l)&&(s=mn(s,vn(l))),s!==r._prevClass&&(r.setAttribute("class",s),r._prevClass=s)}}var Un,Vn={create:$n,update:$n};function qn(t,e,r){var n=Un;return function i(){var o=e.apply(null,arguments);null!==o&&Hn(t,i,r,n)}}var Zn=le&&!(rt&&Number(rt[1])<=53);function Gn(t,e,r,n){if(Zn){var i=Or,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Un.addEventListener(t,e,it?{capture:r,passive:n}:r)}function Hn(t,e,r,n){(n||Un).removeEventListener(t,e._wrapper||e,r)}function Wn(t,e){if(!i(t.data.on)||!i(e.data.on)){var r=e.data.on||{},n=t.data.on||{};Un=e.elm,function(t){if(o(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(r),Me(r,n,Gn,Hn,qn,e.context),Un=void 0}}var Xn,Kn={create:Wn,update:Wn};function Yn(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var r,n,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};for(r in o(l.__ob__)&&(l=e.data.domProps=M({},l)),s)r in l||(a[r]="");for(r in l){if(n=l[r],"textContent"===r||"innerHTML"===r){if(e.children&&(e.children.length=0),n===s[r])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===r&&"PROGRESS"!==a.tagName){a._value=n;var u=i(n)?"":String(n);Jn(a,u)&&(a.value=u)}else if("innerHTML"===r&&_n(a.tagName)&&i(a.innerHTML)){(Xn=Xn||document.createElement("div")).innerHTML=""+n+"";for(var c=Xn.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(n!==s[r])try{a[r]=n}catch(t){}}}}function Jn(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var r=!0;try{r=document.activeElement!==t}catch(t){}return r&&t.value!==e}(t,e)||function(t,e){var r=t.value,n=t._vModifiers;if(o(n)){if(n.number)return v(r)!==v(e);if(n.trim)return r.trim()!==e.trim()}return r!==e}(t,e))}var Qn={create:Yn,update:Yn},ti=T((function(t){var e={},r=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function ei(t){var e=ri(t.style);return t.staticStyle?M(t.staticStyle,e):e}function ri(t){return Array.isArray(t)?z(t):"string"==typeof t?ti(t):t}var ni,ii=/^--/,oi=/\s*!important$/,ai=function(t,e,r){if(ii.test(e))t.style.setProperty(e,r);else if(oi.test(r))t.style.setProperty(k(e),r.replace(oi,""),"important");else{var n=li(e);if(Array.isArray(r))for(var i=0,o=r.length;i-1?e.split(pi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var r=" "+(t.getAttribute("class")||"")+" ";r.indexOf(" "+e+" ")<0&&t.setAttribute("class",(r+e).trim())}}function fi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(pi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var r=" "+(t.getAttribute("class")||"")+" ",n=" "+e+" ";r.indexOf(n)>=0;)r=r.replace(n," ");(r=r.trim())?t.setAttribute("class",r):t.removeAttribute("class")}}function di(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&M(e,mi(t.name||"v")),M(e,t),e}return"string"==typeof t?mi(t):void 0}}var mi=T((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),vi=W&&!Q,yi="transition",gi="transitionend",_i="animation",xi="animationend";vi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(yi="WebkitTransition",gi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(_i="WebkitAnimation",xi="webkitAnimationEnd"));var bi=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function wi(t){bi((function(){bi(t)}))}function Ti(t,e){var r=t._transitionClasses||(t._transitionClasses=[]);r.indexOf(e)<0&&(r.push(e),hi(t,e))}function Ci(t,e){t._transitionClasses&&x(t._transitionClasses,e),fi(t,e)}function Si(t,e,r){var n=Ai(t,e),i=n.type,o=n.timeout,a=n.propCount;if(!i)return r();var s="transition"===i?gi:xi,l=0,u=function(){t.removeEventListener(s,c),r()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout((function(){l0&&(r="transition",c=a,p=o.length):"animation"===e?u>0&&(r="animation",c=u,p=l.length):p=(r=(c=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===r?o.length:l.length:0,{type:r,timeout:c,propCount:p,hasTransform:"transition"===r&&Ei.test(n[yi+"Property"])}}function ki(t,e){for(;t.length explicit "+e+" duration is not a valid number - got "+JSON.stringify(t)+".",r.context):isNaN(t)&&pt(" explicit "+e+" duration is NaN - the duration expression might be incorrect.",r.context)}function Oi(t){return"number"==typeof t&&!isNaN(t)}function Di(t){if(i(t))return!1;var e=t.fns;return o(e)?Di(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Li(t,e){!0!==e.data.show&&Pi(e)}var Ri=function(t){var e,r,n={},l=t.modules,u=t.nodeOps;for(e=0;e - did you register the component correctly? For recursive components, make sure to provide the "name" option.',t.context),t.elm=t.ns?u.createElementNS(t.ns,y):u.createElement(y,t),b(t),g(t,d,e),o(h)&&x(t,e),v(r,t.elm,i),h&&h.pre&&f--):a(t.isComment)?(t.elm=u.createComment(t.text),v(r,t.elm,i)):(t.elm=u.createTextNode(t.text),v(r,t.elm,i))}}function m(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,_(t)?(x(t,e),b(t)):(Sn(t),e.push(t))}function v(t,e,r){o(t)&&(o(r)?u.parentNode(r)===t&&u.insertBefore(t,e,r):u.appendChild(t,e))}function g(t,e,r){if(Array.isArray(e)){E(e);for(var n=0;nf?w(t,i(r[y+1])?null:r[y+1].elm,r,h,y,n):h>y&&C(e,p,f)}(p,m,v,r,c):o(v)?(E(v),o(t.text)&&u.setTextContent(p,""),w(p,null,v,0,v.length-1,r)):o(m)?C(m,0,m.length-1):o(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),o(f)&&o(h=f.hook)&&o(h=h.postpatch)&&h(t,e)}}}function I(t,e,r){if(a(r)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var n=0;n, or missing . Bailing hydration and performing full client-side render.")}l=t,t=new wt(u.tagName(l).toLowerCase(),{},[],void 0,l)}var f=t.elm,m=u.parentNode(f);if(d(e,p,f._leaveCb?null:m,u.nextSibling(f)),o(e.parent))for(var v=e.parent,y=_(e);v;){for(var g=0;g-1,a.selected!==o&&(a.selected=o);else if(R($i(a),n))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}else pt('