(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"014b":function(e,t,n){"use strict";var i=n("e53d"),r=n("07e3"),o=n("8e60"),s=n("63b6"),a=n("9138"),l=n("ebfd").KEY,c=n("294c"),u=n("dbdb"),h=n("45f2"),d=n("62a0"),p=n("5168"),f=n("ccb9"),m=n("6718"),g=n("47ee"),y=n("9003"),v=n("e4ae"),_=n("f772"),x=n("241e"),b=n("36c3"),w=n("1bc3"),T=n("aebd"),S=n("a159"),E=n("0395"),k=n("bf0b"),C=n("9aa9"),A=n("d9f6"),I=n("c3a1"),M=k.f,P=A.f,D=E.f,L=i.Symbol,O=i.JSON,z=O&&O.stringify,R="prototype",F=p("_hidden"),N=p("toPrimitive"),B={}.propertyIsEnumerable,j=u("symbol-registry"),V=u("symbols"),$=u("op-symbols"),U=Object[R],q="function"==typeof L&&!!C.f,G=i.QObject,H=!G||!G[R]||!G[R].findChild,W=o&&c((function(){return 7!=S(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=M(U,t);i&&delete U[t],P(e,t,n),i&&e!==U&&P(U,t,i)}:P,Z=function(e){var t=V[e]=S(L[R]);return t._k=e,t},X=q&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},Y=function(e,t,n){return e===U&&Y($,t,n),v(e),t=w(t,!0),v(n),r(V,t)?(n.enumerable?(r(e,F)&&e[F][t]&&(e[F][t]=!1),n=S(n,{enumerable:T(0,!1)})):(r(e,F)||P(e,F,T(1,{})),e[F][t]=!0),W(e,t,n)):P(e,t,n)},Q=function(e,t){v(e);var n,i=g(t=b(t)),r=0,o=i.length;while(o>r)Y(e,n=i[r++],t[n]);return e},K=function(e,t){return void 0===t?S(e):Q(S(e),t)},J=function(e){var t=B.call(this,e=w(e,!0));return!(this===U&&r(V,e)&&!r($,e))&&(!(t||!r(this,e)||!r(V,e)||r(this,F)&&this[F][e])||t)},ee=function(e,t){if(e=b(e),t=w(t,!0),e!==U||!r(V,t)||r($,t)){var n=M(e,t);return!n||!r(V,t)||r(e,F)&&e[F][t]||(n.enumerable=!0),n}},te=function(e){var t,n=D(b(e)),i=[],o=0;while(n.length>o)r(V,t=n[o++])||t==F||t==l||i.push(t);return i},ne=function(e){var t,n=e===U,i=D(n?$:b(e)),o=[],s=0;while(i.length>s)!r(V,t=i[s++])||n&&!r(U,t)||o.push(V[t]);return o};q||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call($,n),r(this,F)&&r(this[F],e)&&(this[F][e]=!1),W(this,e,T(1,n))};return o&&H&&W(U,e,{configurable:!0,set:t}),Z(e)},a(L[R],"toString",(function(){return this._k})),k.f=ee,A.f=Y,n("6abf").f=E.f=te,n("355d").f=J,C.f=ne,o&&!n("b8e3")&&a(U,"propertyIsEnumerable",J,!0),f.f=function(e){return Z(p(e))}),s(s.G+s.W+s.F*!q,{Symbol:L});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ie.length>re;)p(ie[re++]);for(var oe=I(p.store),se=0;oe.length>se;)m(oe[se++]);s(s.S+s.F*!q,"Symbol",{for:function(e){return r(j,e+="")?j[e]:j[e]=L(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!q,"Object",{create:K,defineProperty:Y,defineProperties:Q,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:ne});var ae=c((function(){C.f(1)}));s(s.S+s.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(x(e))}}),O&&s(s.S+s.F*(!q||c((function(){var e=L();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))}))),"JSON",{stringify:function(e){var t,n,i=[e],r=1;while(arguments.length>r)i.push(arguments[r++]);if(n=t=i[1],(_(t)||void 0!==e)&&!X(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),i[1]=t,z.apply(O,i)}}),L[R][N]||n("35e8")(L[R],N,L[R].valueOf),h(L,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},"01f9":function(e,t,n){"use strict";var i=n("2d00"),r=n("5ca1"),o=n("2aba"),s=n("32e9"),a=n("84f2"),l=n("41a0"),c=n("7f20"),u=n("38fd"),h=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",f="keys",m="values",g=function(){return this};e.exports=function(e,t,n,y,v,_,x){l(n,t,y);var b,w,T,S=function(e){if(!d&&e in A)return A[e];switch(e){case f:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",k=v==m,C=!1,A=e.prototype,I=A[h]||A[p]||v&&A[v],M=I||S(v),P=v?k?S("entries"):M:void 0,D="Array"==t&&A.entries||I;if(D&&(T=u(D.call(new e)),T!==Object.prototype&&T.next&&(c(T,E,!0),i||"function"==typeof T[h]||s(T,h,g))),k&&I&&I.name!==m&&(C=!0,M=function(){return I.call(this)}),i&&!x||!d&&!C&&A[h]||s(A,h,M),a[t]=M,a[E]=g,v)if(b={values:k?M:S(m),keys:_?M:S(f),entries:P},x)for(w in b)w in A||o(A,w,b[w]);else r(r.P+r.F*(d||C),t,b);return b}},"02f4":function(e,t,n){var i=n("4588"),r=n("be13");e.exports=function(e){return function(t,n){var o,s,a=String(r(t)),l=i(n),c=a.length;return l<0||l>=c?e?"":void 0:(o=a.charCodeAt(l),o<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):o:e?a.slice(l,l+2):s-56320+(o-55296<<10)+65536)}}},"0390":function(e,t,n){"use strict";var i=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},"0395":function(e,t,n){var i=n("36c3"),r=n("6abf").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return r(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?a(e):r(i(e))}},"07e3":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"0949":function(e,t,n){var i,r;(function(o,s){i=s,r="function"===typeof i?i.call(t,n,t,e):i,void 0===r||(e.exports=r)})("undefined"!=typeof window&&window,(function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return-1==i.indexOf(t)&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{},i=n[e]=n[e]||{};return i[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return-1!=i&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],r=0;r<n.length;r++){var o=n[r],s=i&&i[o];s&&(this.off(e,o),delete i[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}))},"097d":function(e,t,n){"use strict";var i=n("5ca1"),r=n("8378"),o=n("7726"),s=n("ebd6"),a=n("bcaa");i(i.P+i.R,"Promise",{finally:function(e){var t=s(this,r.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return a(t,e()).then((function(){return n}))}:e,n?function(n){return a(t,e()).then((function(){throw n}))}:e)}})},"09fa":function(e,t,n){var i=n("4588"),r=n("9def");e.exports=function(e){if(void 0===e)return 0;var t=i(e),n=r(t);if(t!==n)throw RangeError("Wrong length!");return n}},"0a06":function(e,t,n){"use strict";var i=n("c532"),r=n("30b5"),o=n("f6b4"),s=n("5270"),a=n("4a7b");function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=a(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[s,void 0],n=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=a(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,i){return this.request(a(i||{},{method:e,url:t,data:n}))}})),e.exports=l},"0a49":function(e,t,n){var i=n("9b43"),r=n("626a"),o=n("4bf8"),s=n("9def"),a=n("cd1c");e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,h=6==e,d=5==e||h,p=t||a;return function(t,a,f){for(var m,g,y=o(t),v=r(y),_=i(a,f,3),x=s(v.length),b=0,w=n?p(t,x):l?p(t,0):void 0;x>b;b++)if((d||b in v)&&(m=v[b],g=_(m,b,y),e))if(n)w[b]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return b;case 2:w.push(m)}else if(u)return!1;return h?-1:c||u?u:w}}},"0a8c":function(e,t){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"0d58":function(e,t,n){var i=n("ce10"),r=n("e11e");e.exports=Object.keys||function(e){return i(e,r)}},"11e9":function(e,t,n){var i=n("52a7"),r=n("4630"),o=n("6821"),s=n("6a99"),a=n("69a8"),l=n("c69a"),c=Object.getOwnPropertyDescriptor;t.f=n("9e1e")?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(n){}if(a(e,t))return r(!i.f.call(e,t),e[t])}},1495:function(e,t,n){var i=n("86cc"),r=n("cb7c"),o=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){r(e);var n,s=o(t),a=s.length,l=0;while(a>l)i.f(e,n=s[l++],t[n]);return e}},1991:function(e,t,n){var i,r,o,s=n("9b43"),a=n("31f4"),l=n("fab2"),c=n("230e"),u=n("7726"),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,m=u.Dispatch,g=0,y={},v="onreadystatechange",_=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},x=function(e){_.call(e.data)};d&&p||(d=function(e){var t=[],n=1;while(arguments.length>n)t.push(arguments[n++]);return y[++g]=function(){a("function"==typeof e?e:Function(e),t)},i(g),g},p=function(e){delete y[e]},"process"==n("2d95")(h)?i=function(e){h.nextTick(s(_,e,1))}:m&&m.now?i=function(e){m.now(s(_,e,1))}:f?(r=new f,o=r.port2,r.port1.onmessage=x,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",x,!1)):i=v in c("script")?function(e){l.appendChild(c("script"))[v]=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(s(_,e,1),0)}),e.exports={set:d,clear:p}},"1fa8":function(e,t,n){var i=n("cb7c");e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(s){var o=e["return"];throw void 0!==o&&i(o.call(e)),s}}},"230e":function(e,t,n){var i=n("d3f4"),r=n("7726").document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},"23c6":function(e,t,n){var i=n("2d95"),r=n("2b4c")("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),r))?n:o?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},"27ee":function(e,t,n){var i=n("23c6"),r=n("2b4c")("iterator"),o=n("84f2");e.exports=n("8378").getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||o[i(e)]}},"2aba":function(e,t,n){var i=n("7726"),r=n("32e9"),o=n("69a8"),s=n("ca5a")("src"),a="toString",l=Function[a],c=(""+l).split(a);n("8378").inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,a){var l="function"==typeof n;l&&(o(n,"name")||r(n,"name",t)),e[t]!==n&&(l&&(o(n,s)||r(n,s,e[t]?""+e[t]:c.join(String(t)))),e===i?e[t]=n:a?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,a,(function(){return"function"==typeof this&&this[s]||l.call(this)}))},"2aeb":function(e,t,n){var i=n("cb7c"),r=n("1495"),o=n("e11e"),s=n("613b")("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n("230e")("iframe"),i=o.length,r="<",s=">";t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+s+"document.F=Object"+r+"/script"+s),e.close(),c=e.F;while(i--)delete c[l][o[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=i(e),n=new a,a[l]=null,n[s]=e):n=c(),void 0===t?n:r(n,t)}},"2b4c":function(e,t,n){var i=n("5537")("wks"),r=n("ca5a"),o=n("7726").Symbol,s="function"==typeof o,a=e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:r)("Symbol."+e))};a.store=i},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"31f4":function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"32e9":function(e,t,n){var i=n("86cc"),r=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},"33a4":function(e,t,n){var i=n("84f2"),r=n("2b4c")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[r]===e)}},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4a59":function(e,t,n){var i=n("9b43"),r=n("1fa8"),o=n("33a4"),s=n("cb7c"),a=n("9def"),l=n("27ee"),c={},u={};t=e.exports=function(e,t,n,h,d){var p,f,m,g,y=d?function(){return e}:l(e),v=i(n,h,t?2:1),_=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=a(e.length);p>_;_++)if(g=t?v(s(f=e[_])[0],f[1]):v(e[_]),g===c||g===u)return g}else for(m=y.call(e);!(f=m.next()).done;)if(g=r(m,v,f.value,t),g===c||g===u)return g};t.BREAK=c,t.RETURN=u},"52a7":function(e,t){t.f={}.propertyIsEnumerable},"551c":function(e,t,n){"use strict";var i,r,o,s,a=n("2d00"),l=n("7726"),c=n("9b43"),u=n("23c6"),h=n("5ca1"),d=n("d3f4"),p=n("d8e8"),f=n("f605"),m=n("4a59"),g=n("ebd6"),y=n("1991").set,v=n("8079")(),_=n("a5b8"),x=n("9c80"),b=n("a25f"),w=n("bcaa"),T="Promise",S=l.TypeError,E=l.process,k=E&&E.versions,C=k&&k.v8||"",A=l[T],I="process"==u(E),M=function(){},P=r=_.f,D=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(M,M)};return(I||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==C.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(i){}}(),L=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){var i=e._v,r=1==e._s,o=0,s=function(t){var n,o,s,a=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{a?(r||(2==e._h&&F(e),e._h=1),!0===a?n=i:(u&&u.enter(),n=a(i),u&&(u.exit(),s=!0)),n===t.promise?c(S("Promise-chain cycle")):(o=L(n))?o.call(n,l,c):l(n)):c(i)}catch(h){u&&!s&&u.exit(),c(h)}};while(n.length>o)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&z(e)}))}},z=function(e){y.call(l,(function(){var t,n,i,r=e._v,o=R(e);if(o&&(t=x((function(){I?E.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),e._h=I||R(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(l,(function(){var t;I?E.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=L(e))?v((function(){var i={_w:n,_d:!1};try{t.call(e,c(B,i,1),c(N,i,1))}catch(r){N.call(i,r)}})):(n._v=e,n._s=1,O(n,!1))}catch(i){N.call({_w:n,_d:!1},i)}}};D||(A=function(e){f(this,A,T,"_h"),p(e),i.call(this);try{e(c(B,this,1),c(N,this,1))}catch(t){N.call(this,t)}},i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n("dcbc")(A.prototype,{then:function(e,t){var n=P(g(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=I?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i;this.promise=e,this.resolve=c(B,e,1),this.reject=c(N,e,1)},_.f=P=function(e){return e===A||e===s?new o(e):r(e)}),h(h.G+h.W+h.F*!D,{Promise:A}),n("7f20")(A,T),n("7a56")(T),s=n("8378")[T],h(h.S+h.F*!D,T,{reject:function(e){var t=P(this),n=t.reject;return n(e),t.promise}}),h(h.S+h.F*(a||!D),T,{resolve:function(e){return w(a&&this===s?A:this,e)}}),h(h.S+h.F*!(D&&n("5cc5")((function(e){A.all(e)["catch"](M)}))),T,{all:function(e){var t=this,n=P(t),i=n.resolve,r=n.reject,o=x((function(){var n=[],o=0,s=1;m(e,!1,(function(e){var a=o++,l=!1;n.push(void 0),s++,t.resolve(e).then((function(e){l||(l=!0,n[a]=e,--s||i(n))}),r)})),--s||i(n)}));return o.e&&r(o.v),n.promise},race:function(e){var t=this,n=P(t),i=n.reject,r=x((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},5537:function(e,t,n){var i=n("8378"),r=n("7726"),o="__core-js_shared__",s=r[o]||(r[o]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,n){var i=n("7726"),r=n("8378"),o=n("32e9"),s=n("2aba"),a=n("9b43"),l="prototype",c=function(e,t,n){var u,h,d,p,f=e&c.F,m=e&c.G,g=e&c.S,y=e&c.P,v=e&c.B,_=m?i:g?i[t]||(i[t]={}):(i[t]||{})[l],x=m?r:r[t]||(r[t]={}),b=x[l]||(x[l]={});for(u in m&&(n=t),n)h=!f&&_&&void 0!==_[u],d=(h?_:n)[u],p=v&&h?a(d,i):y&&"function"==typeof d?a(Function.call,d):d,_&&s(_,u,d,e&c.U),x[u]!=d&&o(x,u,p),y&&b[u]!=d&&(b[u]=d)};i.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5cc5":function(e,t,n){var i=n("2b4c")("iterator"),r=!1;try{var o=[7][i]();o["return"]=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(s){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},e(o)}catch(s){}return n}},"5dbc":function(e,t,n){var i=n("d3f4"),r=n("8b97").set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&i(o)&&r&&r(e,o),e}},"613b":function(e,t,n){var i=n("5537")("keys"),r=n("ca5a");e.exports=function(e){return i[e]||(i[e]=r(e))}},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},6821:function(e,t,n){var i=n("626a"),r=n("be13");e.exports=function(e){return i(r(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var i=n("4588"),r=Math.max,o=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):o(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7a56":function(e,t,n){"use strict";var i=n("7726"),r=n("86cc"),o=n("9e1e"),s=n("2b4c")("species");e.exports=function(e){var t=i[e];o&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},"7f20":function(e,t,n){var i=n("86cc").f,r=n("69a8"),o=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},"7f7f":function(e,t,n){var i=n("86cc").f,r=Function.prototype,o=/^\s*function ([^ (]*)/,s="name";s in r||n("9e1e")&&i(r,s,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},8079:function(e,t,n){var i=n("7726"),r=n("1991").set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n("2d95")(s);e.exports=function(){var e,t,n,c=function(){var i,r;l&&(i=s.domain)&&i.exit();while(e){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var r={fn:i,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},8378:function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,n){var i=n("cb7c"),r=n("c69a"),o=n("6a99"),s=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"8b97":function(e,t,n){var i=n("d3f4"),r=n("cb7c"),o=function(e,t){if(r(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(r){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:o}},9093:function(e,t,n){var i=n("ce10"),r=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},"9def":function(e,t,n){var i=n("4588"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a25f:function(e,t,n){var i=n("7726"),r=i.navigator;e.exports=r&&r.userAgent||""},a5b8:function(e,t,n){"use strict";var i=n("d8e8");function r(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new r(e)}},aa77:function(e,t,n){var i=n("5ca1"),r=n("be13"),o=n("79e5"),s=n("fdef"),a="["+s+"]",l="​",c=RegExp("^"+a+a+"*"),u=RegExp(a+a+"*$"),h=function(e,t,n){var r={},a=o((function(){return!!s[e]()||l[e]()!=l})),c=r[e]=a?t(d):s[e];n&&(r[n]=c),i(i.P+i.F*a,"String",r)},d=h.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=h},bcaa:function(e,t,n){var i=n("cb7c"),r=n("d3f4"),o=n("a5b8");e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=o.f(e),s=n.resolve;return s(t),n.promise}},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},c366:function(e,t,n){var i=n("6821"),r=n("9def"),o=n("77f1");e.exports=function(e){return function(t,n,s){var a,l=i(t),c=r(l.length),u=o(s,c);if(e&&n!=n){while(c>u)if(a=l[u++],a!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},c5f6:function(e,t,n){"use strict";var i=n("7726"),r=n("69a8"),o=n("2d95"),s=n("5dbc"),a=n("6a99"),l=n("79e5"),c=n("9093").f,u=n("11e9").f,h=n("86cc").f,d=n("aa77").trim,p="Number",f=i[p],m=f,g=f.prototype,y=o(n("2aeb")(g))==p,v="trim"in String.prototype,_=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=v?t.trim():d(t,3);var n,i,r,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+t}for(var s,l=t.slice(2),c=0,u=l.length;c<u;c++)if(s=l.charCodeAt(c),s<48||s>r)return NaN;return parseInt(l,i)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof f&&(y?l((function(){g.valueOf.call(n)})):o(n)!=p)?s(new m(_(t)),n,f):_(t)};for(var x,b=n("9e1e")?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)r(m,x=b[w])&&!r(f,x)&&h(f,x,u(m,x));f.prototype=g,g.constructor=f,n("2aba")(i,p,f)}},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},ca5a:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},cb7c:function(e,t,n){var i=n("d3f4");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},ce10:function(e,t,n){var i=n("69a8"),r=n("6821"),o=n("c366")(!1),s=n("613b")("IE_PROTO");e.exports=function(e,t){var n,a=r(e),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);while(t.length>l)i(a,n=t[l++])&&(~o(c,n)||c.push(n));return c}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},dcbc:function(e,t,n){var i=n("2aba");e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},ebd6:function(e,t,n){var i=n("cb7c"),r=n("d8e8"),o=n("2b4c")("species");e.exports=function(e,t){var n,s=i(e).constructor;return void 0===s||void 0==(n=i(s)[o])?t:r(n)}},f605:function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},fab2:function(e,t,n){var i=n("7726").document;e.exports=i&&i.documentElement},fb15:function(e,t,n){"use strict";var i;(n.r(t),"undefined"!==typeof window)&&((i=window.document.currentScript)&&(i=i.src.match(/(.+\/)[^/]+\.js$/))&&(n.p=i[1]));n("551c");var r,o,s={render:function(){var e=this.$slots.default;if(e&&(e=e.filter((function(e){var t=e.tag;return t})),e.length))return e[0]}},a={name:"GlideRect",mixins:[s],props:{callback:{type:Function,required:!0}},mounted:function(){this.update()},methods:{update:function(){this.callback(this.$el.getBoundingClientRect()),window.requestAnimationFrame(this.update)}}},l=a;function c(e,t,n,i,r,o,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}var u=c(l,r,o,!1,null,null,null);u.options.__file="GlideRect.vue";var h=u.exports,d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("GlidePosition",{attrs:{callback:e.callback}},[n("GlideAnimation",{attrs:{keyframes:e.keyframes,options:{duration:1,fill:"both"},"current-time":e.currentTime,"playback-rate":0}},[e._t("default")],2)],1)},p=[],f=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("GlideRect",{attrs:{callback:e.update}},[e._t("default")],2)},m=[],g={name:"GlidePosition",components:{GlideRect:h},props:{callback:{type:Function,required:!0}},data:function(){return{rect:void 0,previousPosition:void 0}},computed:{top:function(){var e=this.rect;return e.bottom/e.height},right:function(){var e=this.rect;return(e.right-window.innerWidth)/e.width},bottom:function(){var e=this.rect;return(e.bottom-window.innerHeight)/e.height},left:function(){var e=this.rect;return e.right/e.width},innerWidth:function(){var e=this.rect;return e.left/(window.innerWidth-e.width)},innerHeight:function(){var e=this.rect;return e.top/(window.innerHeight-e.height)},outerWidth:function(){var e=this.rect;return e.right/(window.innerWidth+e.width)},outerHeight:function(){var e=this.rect;return e.bottom/(window.innerHeight+e.height)},position:function(){return{top:this.top,right:this.right,bottom:this.bottom,left:this.left,innerWidth:this.innerWidth,innerHeight:this.innerHeight,outerWidth:this.outerWidth,outerHeight:this.outerHeight}}},methods:{update:function(e){this.rect=e,this.callback(this.position)}}},y=g,v=c(y,f,m,!1,null,null,null);v.options.__file="GlidePosition.vue";var _,x,b=v.exports,w=(n("c5f6"),{name:"GlideAnimation",mixins:[s],props:{keyframes:{type:Object,default:null},options:{type:[Number,Object],default:null},startTime:{type:Number,default:null},currentTime:{type:Number,default:null},playbackRate:{type:Number,default:1}},data:function(){return{animation:void 0}},watch:{keyframes:{handler:function(){this.cancel(),this.init()},deep:!0},options:{handler:function(){this.cancel(),this.init()},deep:!0},startTime:function(e){this.animation.startTime=e},currentTime:function(e){this.animation.currentTime=e},playbackRate:function(e){this.animation.playbackRate=e}},mounted:function(){this.init()},methods:{cancel:function(){this.animation.cancel()},finish:function(){this.animation.finish()},play:function(){this.animation.play()},pause:function(){this.animation.pause()},reverse:function(){this.animation.reverse()},init:function(){var e=this;this.animation=this.$el.animate(this.keyframes,this.options);var t=this.animation,n=this.startTime,i=this.currentTime,r=this.playbackRate;t.playbackRate=r,null!==n&&(t.startTime=n),null!==i&&(t.currentTime=i),t.addEventListener("finish",(function(){return e.$emit("finish")})),t.addEventListener("cancel",(function(){return e.$emit("cancel")})),this.animation=t}}}),T=w,S=c(T,_,x,!1,null,null,null);S.options.__file="GlideAnimation.vue";var E=S.exports;function k(e){if(Array.isArray(e))return e}function C(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(l){r=!0,o=l}finally{try{i||null==a["return"]||a["return"]()}finally{if(r)throw o}}return n}function A(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function I(e,t){return k(e)||C(e,t)||A()}var M,P,D={name:"GlideIntersection",mixins:[s],props:{callback:{type:Function,required:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{intersectionObserver:void 0}},watch:{options:"reset",callback:"reset"},mounted:function(){this.create(),this.observe()},methods:{create:function(){var e=this;this.intersectionObserver=new IntersectionObserver((function(t){var n=I(t,1),i=n[0];return e.callback(i)}),this.options)},observe:function(){this.intersectionObserver.observe(this.$el)},disconnect:function(){this.intersectionObserver.disconnect()},reset:function(){this.disconnect(),this.create(),this.observe()}}},L=D,O=c(L,M,P,!1,null,null,null);O.options.__file="GlideIntersection.vue";var z=O.exports,R={name:"GlideParallax",components:{GlidePosition:b,GlideAnimation:E,GlideIntersection:z},props:{from:{type:String,default:"0px"},to:{type:String,default:"0px"}},data:function(){return{currentTime:0}},computed:{keyframes:function(){return{transform:["translateY(".concat(this.from,")"),"translateY(".concat(this.to,")")]}}},methods:{callback:function(e){var t=e.outerHeight;this.currentTime=t}}},F=R,N=c(F,d,p,!1,null,null,null);N.options.__file="GlideParallax.vue";var B=N.exports,j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("GlideIntersection",{class:e.className,attrs:{callback:e.callback,options:e.options}},[e._t("default")],2)},V=[],$=(n("7f7f"),{name:"GlideVisibility",components:{GlideIntersection:z},props:{name:{type:String,default:"v"},appear:{type:Boolean,default:!1},persist:{type:Boolean,default:!1},css:{type:Boolean,default:!0},visibleClass:{type:String,default:null},hiddenClass:{type:String,default:null},options:{type:Object,default:null}},data:function(){return{previousIsIntersecting:void 0}},computed:{className:function(){return this.css?void 0!==this.previousIsIntersecting?this.previousIsIntersecting?this.visibleClass?this.visibleClass:"".concat(this.name,"-visible"):this.visibleClass?this.hiddenClass:"".concat(this.name,"-hidden"):void 0:null}},methods:{callback:function(e){var t=e.isIntersecting;void 0!==this.previousIsIntersecting||this.appear?t!==this.previousIsIntersecting&&(this.persist&&!t||(this.previousIsIntersecting=t,this[t?"enter":"leave"](e))):this.previousIsIntersecting=t},enter:function(e){var t=e.rootBounds,n=e.intersectionRect;this.$emit("enter"),t.top===n.top&&this.$emit("enter-top"),t.right===n.right&&this.$emit("enter-right"),t.bottom===n.bottom&&this.$emit("enter-bottom"),t.left===n.left&&this.$emit("enter-left")},leave:function(e){var t=e.rootBounds,n=e.boundingClientRect;this.$emit("leave"),t.top>n.top&&this.$emit("leave-top"),t.right<n.right&&this.$emit("leave-right"),t.bottom<n.bottom&&this.$emit("leave-bottom"),t.left>n.left&&this.$emit("leave-left")}}}),U=$,q=c(U,j,V,!1,null,null,null);q.options.__file="GlideVisibility.vue";var G=q.exports;function H(e){e.component("GlideRect",h),e.component("GlideParallax",B),e.component("GlidePosition",b),e.component("GlideAnimation",E),e.component("GlideVisibility",G),e.component("GlideIntersection",z)}var W={install:H,GlideRect:h,GlideParallax:B,GlidePosition:b,GlideAnimation:E,GlideVisibility:G,GlideIntersection:z};t["default"]=W},fdef:function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"}})},"0b7d":function(e,t,n){"use strict";
/*! npm.im/object-fit-images 3.2.4 */var i="bfred-it:object-fit-images",r=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,o="undefined"===typeof Image?{style:{"object-position":1}}:new Image,s="object-fit"in o.style,a="object-position"in o.style,l="background-size"in o.style,c="string"===typeof o.currentSrc,u=o.getAttribute,h=o.setAttribute,d=!1;function p(e,t){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+e+"' height='"+t+"'%3E%3C/svg%3E"}function f(e){if(e.srcset&&!c&&window.picturefill){var t=window.picturefill._;e[t.ns]&&e[t.ns].evaled||t.fillImg(e,{reselect:!0}),e[t.ns].curSrc||(e[t.ns].supported=!1,t.fillImg(e,{reselect:!0})),e.currentSrc=e[t.ns].curSrc||e.src}}function m(e){var t,n=getComputedStyle(e).fontFamily,i={};while(null!==(t=r.exec(n)))i[t[1]]=t[2];return i}function g(e,t,n){var i=p(t||1,n||0);u.call(e,"src")!==i&&h.call(e,"src",i)}function y(e,t){e.naturalWidth?t(e):setTimeout(y,100,e,t)}function v(e){var t=m(e),n=e[i];if(t["object-fit"]=t["object-fit"]||"fill",!n.img){if("fill"===t["object-fit"])return;if(!n.skipTest&&s&&!t["object-position"])return}if(!n.img){n.img=new Image(e.width,e.height),n.img.srcset=u.call(e,"data-ofi-srcset")||e.srcset,n.img.src=u.call(e,"data-ofi-src")||e.src,h.call(e,"data-ofi-src",e.src),e.srcset&&h.call(e,"data-ofi-srcset",e.srcset),g(e,e.naturalWidth||e.width,e.naturalHeight||e.height),e.srcset&&(e.srcset="");try{_(e)}catch(r){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}f(n.img),e.style.backgroundImage='url("'+(n.img.currentSrc||n.img.src).replace(/"/g,'\\"')+'")',e.style.backgroundPosition=t["object-position"]||"center",e.style.backgroundRepeat="no-repeat",e.style.backgroundOrigin="content-box",/scale-down/.test(t["object-fit"])?y(n.img,(function(){n.img.naturalWidth>e.width||n.img.naturalHeight>e.height?e.style.backgroundSize="contain":e.style.backgroundSize="auto"})):e.style.backgroundSize=t["object-fit"].replace("none","auto").replace("fill","100% 100%"),y(n.img,(function(t){g(e,t.naturalWidth,t.naturalHeight)}))}function _(e){var t={get:function(t){return e[i].img[t||"src"]},set:function(t,n){return e[i].img[n||"src"]=t,h.call(e,"data-ofi-"+n,t),v(e),t}};Object.defineProperty(e,"src",t),Object.defineProperty(e,"currentSrc",{get:function(){return t.get("currentSrc")}}),Object.defineProperty(e,"srcset",{get:function(){return t.get("srcset")},set:function(e){return t.set(e,"srcset")}})}function x(){function e(e,t){return e[i]&&e[i].img&&("src"===t||"srcset"===t)?e[i].img:e}a||(HTMLImageElement.prototype.getAttribute=function(t){return u.call(e(this,t),t)},HTMLImageElement.prototype.setAttribute=function(t,n){return h.call(e(this,t),t,String(n))})}function b(e,t){var n=!d&&!e;if(t=t||{},e=e||"img",a&&!t.skipTest||!l)return!1;"img"===e?e=document.getElementsByTagName("img"):"string"===typeof e?e=document.querySelectorAll(e):"length"in e||(e=[e]);for(var r=0;r<e.length;r++)e[r][i]=e[r][i]||{skipTest:t.skipTest},v(e[r]);n&&(document.body.addEventListener("load",(function(e){"IMG"===e.target.tagName&&b(e.target,{skipTest:t.skipTest})}),!0),d=!0,e="img"),t.watchMQ&&window.addEventListener("resize",b.bind(null,e,{skipTest:t.skipTest}))}b.supportsObjectFit=s,b.supportsObjectPosition=a,x(),e.exports=b},"0bfb":function(e,t,n){"use strict";var i=n("cb7c");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var i=n("ce10"),r=n("e11e");e.exports=Object.keys||function(e){return i(e,r)}},"0df6":function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"0e33":function(e,t,n){var i,r,o;(function(s){r=[n("1157")],i=s,o="function"===typeof i?i.apply(t,r):i,void 0===o||(e.exports=o)})((function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;return function(){
/**
 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
 * Released under MIT license, http://github.com/requirejs/almond/LICENSE
 */
var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){var r,o,s,a,l={},c={},u={},h={},d=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function m(e,t){return d.call(e,t)}function g(e,t){var n,i,r,o,s,a,l,c,h,d,p,m,g=t&&t.split("/"),y=u.map,v=y&&y["*"]||{};if(e){for(e=e.split("/"),s=e.length-1,u.nodeIdCompat&&f.test(e[s])&&(e[s]=e[s].replace(f,"")),"."===e[0].charAt(0)&&g&&(m=g.slice(0,g.length-1),e=m.concat(e)),h=0;h<e.length;h++)if(p=e[h],"."===p)e.splice(h,1),h-=1;else if(".."===p){if(0===h||1===h&&".."===e[2]||".."===e[h-1])continue;h>0&&(e.splice(h-1,2),h-=2)}e=e.join("/")}if((g||v)&&y){for(n=e.split("/"),h=n.length;h>0;h-=1){if(i=n.slice(0,h).join("/"),g)for(d=g.length;d>0;d-=1)if(r=y[g.slice(0,d).join("/")],r&&(r=r[i],r)){o=r,a=h;break}if(o)break;!l&&v&&v[i]&&(l=v[i],c=h)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function y(e,n){return function(){var i=p.call(arguments,0);return"string"!==typeof i[0]&&1===i.length&&i.push(null),o.apply(t,i.concat([e,n]))}}function v(e){return function(t){return g(t,e)}}function _(e){return function(t){l[e]=t}}function x(e){if(m(c,e)){var n=c[e];delete c[e],h[e]=!0,r.apply(t,n)}if(!m(l,e)&&!m(h,e))throw new Error("No "+e);return l[e]}function b(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return e?b(e):[]}function T(e){return function(){return u&&u.config&&u.config[e]||{}}}s=function(e,t){var n,i=b(e),r=i[0],o=t[1];return e=i[1],r&&(r=g(r,o),n=x(r)),r?e=n&&n.normalize?n.normalize(e,v(o)):g(e,o):(e=g(e,o),i=b(e),r=i[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},a={require:function(e){return y(e)},exports:function(e){var t=l[e];return"undefined"!==typeof t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:T(e)}}},r=function(e,n,i,r){var o,u,d,p,f,g,v,b=[],T=typeof i;if(r=r||e,g=w(r),"undefined"===T||"function"===T){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(p=s(n[f],g),u=p.f,"require"===u)b[f]=a.require(e);else if("exports"===u)b[f]=a.exports(e),v=!0;else if("module"===u)o=b[f]=a.module(e);else if(m(l,u)||m(c,u)||m(h,u))b[f]=x(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,y(r,!0),_(u),{}),b[f]=l[u]}d=i?i.apply(l[e],b):void 0,e&&(o&&o.exports!==t&&o.exports!==l[e]?l[e]=o.exports:d===t&&v||(l[e]=d))}else e&&(l[e]=i)},e=n=o=function(e,n,i,l,c){if("string"===typeof e)return a[e]?a[e](n):x(s(e,w(n)).f);if(!e.splice){if(u=e,u.deps&&o(u.deps,u.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"===typeof i&&(i=l,l=c),l?r(t,e,n,i):setTimeout((function(){r(t,e,n,i)}),4),o},o.config=function(e){return o(e)},e._defined=l,i=function(e,t,n){if("string"!==typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])},i.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i)}(),t.define("almond",(function(){})),t.define("jquery",[],(function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t})),t.define("select2/utils",["jquery"],(function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){var r=t[i];"function"===typeof r&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function o(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}function s(){this.constructor=o}t.displayName=e.displayName,o.prototype=new s;for(var a=0;a<r.length;a++){var l=r[a];o.prototype[l]=e.prototype[l]}for(var c=function(e){var n=function(){};e in o.prototype&&(n=o.prototype[e]);var i=t.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,n),i.apply(this,arguments)}},u=0;u<i.length;u++){var h=i[u];o.prototype[h]=c(h)}return o};var i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++){var i=Math.floor(36*Math.random());t+=i.toString(36)}return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];o=o.substring(0,1).toLowerCase()+o.substring(1),o in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,o=n.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!==typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var n=e.getAttribute("data-select2-id");return null!=n||(n=e.id?"select2-data-"+e.id:"select2-data-"+(++r).toString()+"-"+t.generateChars(4),e.setAttribute("data-select2-id",n)),n},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(e,t){var n=e.getAttribute("class").trim().split(/\s+/);n=n.filter((function(e){return 0===e.indexOf("select2-")}));var i=t.getAttribute("class").trim().split(/\s+/);i=i.filter((function(e){return 0!==e.indexOf("select2-")}));var r=n.concat(i);e.setAttribute("class",r.join(" "))},t})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current((function(i){var r=i.map((function(e){return e.id.toString()})),o=n.$results.find(".select2-results__option--selectable");o.each((function(){var n=e(this),i=t.GetData(this,"data"),o=""+i.id;null!=i.element&&i.element.selected||null==i.element&&r.indexOf(o)>-1?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))}))}))},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.classList.add("select2-results__option"),i.classList.add("select2-results__option--selectable");var r={role:"option"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var s in(null!=n.element&&o.call(n.element,":disabled")||null==n.element&&n.disabled)&&(r["aria-disabled"]="true",i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--disabled")),null==n.id&&i.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(r.role="group",r["aria-label"]=n.text,i.classList.remove("select2-results__option--selectable"),i.classList.add("select2-results__option--group")),r){var a=r[s];i.setAttribute(s,a)}if(n.children){var l=e(i),c=document.createElement("strong");c.className="select2-results__group",this.template(n,c);for(var u=[],h=0;h<n.children.length;h++){var d=n.children[h],p=this.option(d);u.push(p)}var f=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});f.append(u),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())})),n.on("results:append",(function(e){r.append(e.data),n.isOpen()&&r.setClasses()})),n.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),n.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");e.hasClass("select2-results__option--selected")?r.trigger("close",{}):r.trigger("select",{data:n})}})),n.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}})),n.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find(".select2-results__option--selectable"),n=t.index(e),i=n+1;if(!(i>=t.length)){var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top+r.$results.outerHeight(!1),a=o.offset().top+o.outerHeight(!1),l=r.$results.scrollTop()+a-s;0===i?r.$results.scrollTop(0):a>s&&r.$results.scrollTop(l)}})),n.on("results:focus",(function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")})),n.on("results:message",(function(e){r.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(n){var i=e(this),o=t.GetData(this,"data");i.hasClass("select2-results__option--selected")?r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:o}):r.trigger("close",{}):r.trigger("select",{originalEvent:n,data:o})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),r.trigger("results:focus",{data:i,element:e(this)})}))},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find(".select2-results__option--selectable"),n=t.index(e),i=this.$results.offset().top,r=e.offset().top,o=this.$results.scrollTop()+(r-i),s=r-i;o-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"===typeof o?n.innerHTML=r(o):e(n).append(o)},n})),t.define("select2/keys",[],(function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e})),t.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var i=e(n.target),r=i.closest(".select2"),o=e(".select2.select2-container--open");o.each((function(){if(this!=r[0]){var e=t.GetData(this,"element");e.select2("close")}}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.attr("aria-controls",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,r){var o=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!o.isDisabled()){var i=e(this),r=i.parent(),s=n.GetData(r[0],"data");o.trigger("unselect",{originalEvent:t,data:s})}})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(e){o.isDisabled()||e.stopPropagation()}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},i.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>');return t},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",r=0;r<e.length;r++){var o=e[r],s=this.selectionContainer(),a=this.display(o,s),l=i+n.generateChars(4)+"-";o.id?l+=o.id:l+=n.generateChars(4),s.find(".select2-selection__choice__display").append(a).attr("id",l);var c=o.title||o.text;c&&s.attr("title",c);var u=this.options.get("translations").get("removeItem"),h=s.find(".select2-selection__choice__remove");h.attr("title",u()),h.attr("aria-label",u()),h.attr("aria-describedby",l),n.StoreData(s[0],"data",o),t.push(s)}var d=this.$selection.find(".select2-selection__rendered");d.append(t)}},i})),t.define("select2/selection/placeholder",[],(function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"===typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");var i=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",i),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,i=t.length>1;if(i||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},e})),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){i._handleClear(e)})),t.on("keypress",(function(e){i._handleKeyboardClear(e,t)}))},i.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var r=n.GetData(i[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var s={data:r};if(this.trigger("clear",s),s.prevented)this.$element.val(o);else{for(var a=0;a<r.length;a++)if(s={data:r[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},i.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},i.prototype.update=function(t,i){if(t.call(this,i),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var r=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),s=e('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');s.attr("title",o()),s.attr("aria-label",o()),s.attr("aria-describedby",r),n.StoreData(s[0],"data",i),this.$selection.prepend(s),this.$selection[0].classList.add("select2-selection--clearable")}},i})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=this.options.get("translations").get("search"),i=e('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=i,this.$search=i.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n());var r=t.call(this);return this._transferTabIndex(),r.append(this.$searchContainer),r},i.prototype.bind=function(e,i,r){var o=this,s=i.id+"-results",a=i.id+"-container";e.call(this,i,r),o.$search.attr("aria-describedby",a),i.on("open",(function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")})),i.on("close",(function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),i.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),i.on("disable",(function(){o.$search.prop("disabled",!0)})),i.on("focus",(function(e){o.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented();var i=e.which;if(i===n.BACKSPACE&&""===o.$search.val()){var r=o.$selection.find(".select2-selection__choice").last();if(r.length>0){var s=t.GetData(r[0],"data");o.searchRemoveChoice(s),e.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(e){o.$search.val()&&e.stopPropagation()}));var l=document.documentMode,c=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){c?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(c&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}}))},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";if(""===this.$search.attr("placeholder")){var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},i})),t.define("select2/selection/selectionCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("selectionCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",(function(t,n){if(-1!==o.indexOf(t)){n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i),-1!==s.indexOf(t)&&(n.prevented=i.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n})),t.define("select2/diacritics",[],(function(){var e={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"};return e})),t.define("select2/data/base",["../utils"],(function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=this,i=Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(e){return t.item(n(e))}));e(i)},i.prototype.select=function(e){var t=this;if(e.selected=!0,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var i=[];e=[e],e.push.apply(e,n);for(var r=0;r<e.length;r++){var o=e[r].id;-1===i.indexOf(o)&&i.push(o)}t.$element.val(i),t.$element.trigger("input").trigger("change")}));else{var n=e.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var i=[],r=0;r<n.length;r++){var o=n[r].id;o!==e.id&&-1===i.indexOf(o)&&i.push(o)}t.$element.val(i),t.$element.trigger("input").trigger("change")}))}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",(function(e){n.select(e.data)})),e.on("unselect",(function(e){n.unselect(e.data)}))},i.prototype.destroy=function(){this.$element.find("*").each((function(){t.RemoveData(this)}))},i.prototype.query=function(e,t){var i=[],r=this,o=this.$element.children();o.each((function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var t=n(this),o=r.item(t),s=r.matches(e,o);null!==s&&i.push(s)}})),t({results:i})},i.prototype.addOptions=function(e){this.$element.append(e)},i.prototype.option=function(e){var i;e.children?(i=document.createElement("optgroup"),i.label=e.text):(i=document.createElement("option"),void 0!==i.textContent?i.textContent=e.text:i.innerText=e.text),void 0!==e.id&&(i.value=e.id),e.disabled&&(i.disabled=!0),e.selected&&(i.selected=!0),e.title&&(i.title=e.title);var r=this._normalizeItem(e);return r.element=i,t.StoreData(i,"data",r),n(i)},i.prototype.item=function(e){var i={};if(i=t.GetData(e[0],"data"),null!=i)return i;var r=e[0];if("option"===r.tagName.toLowerCase())i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===r.tagName.toLowerCase()){i={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),s=[],a=0;a<o.length;a++){var l=n(o[a]),c=this.item(l);s.push(c)}i.children=s}return i=this._normalizeItem(i),i.element=e[0],t.StoreData(e[0],"data",i),i},i.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},i.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},i})),t.define("select2/data/array",["./select","../utils","jquery"],(function(e,t,n){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(e){var t=this.$element.find("option").filter((function(t,n){return n.value==e.id.toString()}));0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var t=this,i=this.$element.find("option"),r=i.map((function(){return t.item(n(this)).id})).get(),o=[];function s(e){return function(){return n(this).val()==e.id}}for(var a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(r.indexOf(l.id)>=0){var c=i.filter(s(l)),u=this.item(c),h=n.extend(!0,{},l,u),d=this.option(h);c.replaceWith(d)}else{var p=this.option(l);if(l.children){var f=this.convertToOptions(l.children);p.append(f)}o.push(p)}}return o},i})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&("function"===typeof this._request.abort&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function o(){var n=r.transport(r,(function(n){var r=i.processResults(n,e);i.options.get("debug")&&window.console&&console.error&&(r&&r.results&&Array.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)}),(function(){(!("status"in n)||0!==n.status&&"0"!==n.status)&&i.trigger("results:message",{message:"errorLoading"})}));i._request=n}"function"===typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"===typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},i})),t.define("select2/data/tags",["jquery"],(function(e){function t(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),Array.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return t.prototype.query=function(e,t,n){var i=this;function r(e,o){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!r({results:l.children},!0),u=(l.text||"").toUpperCase(),h=(t.term||"").toUpperCase(),d=u===h;if(d||c)return!o&&(e.data=s,void n(e))}if(o)return!0;var p=i.createTag(t);if(null!=p){var f=i.option(p);f.attr("data-select2-tag","true"),i.addOptions([f]),i.insertTag(s,p)}e.results=s,n(e)}this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,r):e.call(this,t,n)},t.prototype.createTag=function(e,t){if(null==t.term)return null;var n=t.term.trim();return""===n?null:{id:n,text:n}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=this.$element.find("option[data-select2-tag]");n.each((function(){this.selected||e(this).remove()}))},t})),t.define("select2/data/tokenizer",["jquery"],(function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var r=this;function o(t){var n=r._normalizeItem(t),i=r.$element.find("option").filter((function(){return e(this).val()===n.id}));if(!i.length){var o=r.option(n);o.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([o])}s(n)}function s(e){r.trigger("select",{data:e})}n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.trigger("focus")),n.term=a.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){var o=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};while(a<s.length){var c=s[a];if(-1!==o.indexOf(c)){var u=s.substr(0,a),h=e.extend({},n,{term:u}),d=l(h);null!=d?(r(d),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t})),t.define("select2/data/minimumInputLength",[],(function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumInputLength",[],(function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){var i=null!=e?e.length:0;n.maximumSelectionLength>0&&i>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("translations").get("search"),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",i()),n.prepend(r),n},t.prototype.bind=function(t,n,i){var r=this,o=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){if(null==e.query.term||""===e.query.term){var t=r.showSearch(e);t?r.$searchContainer[0].classList.remove("select2-search--hide"):r.$searchContainer[0].classList.add("select2-search--hide")}})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"===typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){var n=this.$results.offset().top+this.$results.outerHeight(!1),i=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1);n+50>=i&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id,a=this.$container.parents().filter(t.hasScroll);a.off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),i=this.$dropdown[0].classList.contains("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<o.top-a.height,u=l.bottom>o.bottom+a.height,h={left:o.left,top:s.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var p={top:0,left:0};(e.contains(document.body,d[0])||d[0].isConnected)&&(p=d.offset()),h.top-=p.top,h.left-=p.left,n||i||(r="below"),u||!c||n?!c&&u&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(h.top=s.top-p.top-a.height),null!=r&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+r),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+r)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t})),t.define("select2/dropdown/selectOnClose",["../utils"],(function(e){function t(){}return t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",(function(e){i._handleSelectOnClose(e)}))},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var i=n.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var o=e.GetData(r[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t})),t.define("select2/dropdown/closeOnSelect",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(e){i._selectTriggered(e)})),t.on("unselect",(function(e){i._selectTriggered(e)}))},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e})),t.define("select2/dropdown/dropdownCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=this.options.get("dropdownCssClass")||"";return-1!==i.indexOf(":all:")&&(i=i.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(i),n},t})),t.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(e){function t(){}return t.prototype.highlightFirstItem=function(t){var n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(n.length>0){var i=n.first(),r=e.GetData(i[0],"data"),o=r.element;if(o&&o.getAttribute&&"true"===o.getAttribute("data-select2-tag"))return void i.trigger("mouseenter")}t.call(this)},t})),t.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),t.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x,b,w,T,S,E,k,C,A,I,M){function P(){this.reset()}P.prototype.apply=function(u){if(u=e.extend(!0,{},this.defaults,u),null==u.dataAdapter&&(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=p:u.dataAdapter=d,u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,_)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,g))),null==u.resultsAdapter&&(u.resultsAdapter=t,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,T)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,w)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,k)),u.tags&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,I))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=x;else{var h=c.Decorate(x,b);u.dropdownAdapter=h}0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,E)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)),null!=u.dropdownCssClass&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,A)),u.dropdownAdapter=c.Decorate(u.dropdownAdapter,S)}null==u.selectionAdapter&&(u.multiple?u.selectionAdapter=i:u.selectionAdapter=n,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,o)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),null!=u.selectionCssClass&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),u.selectionAdapter=c.Decorate(u.selectionAdapter,l)),u.language=this._resolveLanguage(u.language),u.language.push("en");for(var M=[],P=0;P<u.language.length;P++){var D=u.language[P];-1===M.indexOf(D)&&M.push(D)}return u.language=M,u.translations=this._processTranslations(u.language,u.debug),u},P.prototype.reset=function(){function t(e){function t(e){return h[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,r){if(null==i.term||""===i.term.trim())return r;if(r.children&&r.children.length>0){for(var o=e.extend(!0,{},r),s=r.children.length-1;s>=0;s--){var a=r.children[s],l=n(i,a);null==l&&o.children.splice(s,1)}return o.children.length>0?o:n(i,o)}var c=t(r.text).toUpperCase(),u=t(i.term).toUpperCase();return c.indexOf(u)>-1?r:null}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},P.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return e.language=s,e},P.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];var n;n=Array.isArray(t)?t:[t];for(var i=[],r=0;r<n.length;r++)if(i.push(n[r]),"string"===typeof n[r]&&n[r].indexOf("-")>0){var o=n[r].split("-"),s=o[0];i.push(s)}return i},P.prototype._processTranslations=function(t,n){for(var i=new u,r=0;r<t.length;r++){var o=new u,s=t[r];if("string"===typeof s)try{o=u.loadPath(s)}catch(a){try{s=this.defaults.amdLanguageBase+s,o=u.loadPath(s)}catch(l){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+s+'" could not be automatically loaded. A fallback will be used instead.')}}else o=e.isPlainObject(s)?new u(s):s;i.extend(o)}return i},P.prototype.set=function(t,n){var i=e.camelCase(t),r={};r[i]=n;var o=c._convertData(r);e.extend(!0,this.defaults,o)};var D=new P;return D})),t.define("select2/options",["jquery","./defaults","./utils"],(function(e,t,n){function i(e,n){this.options=e,null!=n&&this.fromElement(n),null!=n&&(this.options=t.applyFromElement(this.options,n)),this.options=t.apply(this.options)}return i.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var r={};function o(e,t){return t.toUpperCase()}for(var s=0;s<t[0].attributes.length;s++){var a=t[0].attributes[s].name,l="data-";if(a.substr(0,l.length)==l){var c=a.substring(l.length),u=n.GetData(t[0],c),h=c.replace(/-([a-z])/g,o);r[h]=u}}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(r=e.extend(!0,{},t[0].dataset,r));var d=e.extend(!0,{},n.GetData(t[0]),r);for(var p in d=n._convertData(d),d)i.indexOf(p)>-1||(e.isPlainObject(this.options[p])?e.extend(this.options[p],d[p]):this.options[p]=d[p]);return this},i.prototype.get=function(e){return this.options[e]},i.prototype.set=function(e,t){this.options[e]=t},i})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,i){var r=function(e,i){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),r.__super__.constructor.call(this);var o=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",o),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var h=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){h.trigger("selection:update",{data:e})})),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t,t},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!==typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}if("computedstyle"==t){var h=window.getComputedStyle(e[0]);return h.width}return t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(t){e._syncA(),e._syncS(t)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerSelectionEvents=function(){var e=this,t=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,i){-1===t.indexOf(n)&&e.trigger(n,i)}))},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){e.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){e.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){e.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){e.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.UP&&t.altKey?(e.close(t),t.preventDefault()):n===i.ENTER||n===i.TAB?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&e.addedNodes.length>0)for(var n=0;n<e.addedNodes.length;n++){var i=e.addedNodes[n];if(i.selected)return!0}else{if(e.removedNodes&&e.removedNodes.length>0)return!0;if(Array.isArray(e))return e.some((function(e){return t._isChangeMutation(e)}))}return!1},r.prototype._syncSubtree=function(e){var t=this._isChangeMutation(e),n=this;t&&this.dataAdapter.current((function(e){n.trigger("selection:update",{data:e})}))},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var o=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,o,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},r.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];Array.isArray(t)&&(t=t.map((function(e){return e.toString()}))),this.$element.val(t).trigger("input").trigger("change")},r.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(e,t,n,i,r){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if(t=t||{},"object"===typeof t)return this.each((function(){var i=e.extend(!0,{},t);new n(e(this),i)})),this;if("string"===typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,s)})),o.indexOf(t)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n})),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n}))},"0f88":function(e,t,n){var i,r=n("7726"),o=n("32e9"),s=n("ca5a"),a=s("typed_array"),l=s("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,h=0,d=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");while(h<d)(i=r[p[h++]])?(o(i.prototype,a,!0),o(i.prototype,l,!0)):u=!1;e.exports={ABV:c,CONSTR:u,TYPED:a,VIEW:l}},"0fc9":function(e,t,n){var i=n("3a38"),r=Math.max,o=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):o(e,t)}},"10ad":function(e,t,n){"use strict";var i,r=n("7726"),o=n("0a49")(0),s=n("2aba"),a=n("67ab"),l=n("7333"),c=n("643e"),u=n("d3f4"),h=n("b39a"),d=n("b39a"),p=!r.ActiveXObject&&"ActiveXObject"in r,f="WeakMap",m=a.getWeak,g=Object.isExtensible,y=c.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},_={get:function(e){if(u(e)){var t=m(e);return!0===t?y(h(this,f)).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(h(this,f),e,t)}},x=e.exports=n("e0b8")(f,v,_,c,!0,!0);d&&p&&(i=c.getConstructor(v,f),l(i.prototype,_),a.NEED=!0,o(["delete","has","get","set"],(function(e){var t=x.prototype,n=t[e];s(t,e,(function(t,r){if(u(t)&&!g(t)){this._f||(this._f=new i);var o=this._f[e](t,r);return"set"==e?this:o}return n.call(this,t,r)}))})))},1157:function(e,t,n){var i,r;
/*!
 * jQuery JavaScript Library v3.6.0
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-03-02T17:08Z
 */(function(t,n){"use strict";"object"===typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)})("undefined"!==typeof window?window:this,(function(n,o){"use strict";var s=[],a=Object.getPrototypeOf,l=s.slice,c=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},u=s.push,h=s.indexOf,d={},p=d.toString,f=d.hasOwnProperty,m=f.toString,g=m.call(Object),y={},v=function(e){return"function"===typeof e&&"number"!==typeof e.nodeType&&"function"!==typeof e.item},_=function(e){return null!=e&&e===e.window},x=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){n=n||x;var i,r,o=n.createElement("script");if(o.text=e,t)for(i in b)r=t[i]||t.getAttribute&&t.getAttribute(i),r&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?d[p.call(e)]||"object":typeof e}var S="3.6.0",E=function(e,t){return new E.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!v(e)&&!_(e)&&("array"===n||0===t||"number"===typeof t&&t>0&&t-1 in e)}E.fn=E.prototype={jquery:S,constructor:E,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:s.sort,splice:s.splice},E.extend=E.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"===typeof s&&(c=s,s=arguments[a]||{},a++),"object"===typeof s||v(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(E.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||E.isPlainObject(n)?n:{},r=!1,s[t]=E.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},E.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==p.call(e))&&(t=a(e),!t||(n=f.call(t,"constructor")&&t.constructor,"function"===typeof n&&m.call(n)===g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(k(e)){for(n=e.length;i<n;i++)if(!1===t.call(e[i],i,e[i]))break}else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(k(Object(e))?E.merge(n,"string"===typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:h.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,s=e.length,a=!n;o<s;o++)i=!t(e[o],o),i!==a&&r.push(e[o]);return r},map:function(e,t,n){var i,r,o=0,s=[];if(k(e))for(i=e.length;o<i;o++)r=t(e[o],o,n),null!=r&&s.push(r);else for(o in e)r=t(e[o],o,n),null!=r&&s.push(r);return c(s)},guid:1,support:y}),"function"===typeof Symbol&&(E.fn[Symbol.iterator]=s[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var C=
/*!
 * Sizzle CSS Selector Engine v2.3.6
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2021-02-16
 */
function(e){var t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x="sizzle"+1*new Date,b=e.document,w=0,T=0,S=le(),E=le(),k=le(),C=le(),A=function(e,t){return e===t&&(h=!0),0},I={}.hasOwnProperty,M=[],P=M.pop,D=M.push,L=M.push,O=M.slice,z=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",N="(?:\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\["+F+"*("+N+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+F+"*\\]",j=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",V=new RegExp(F+"+","g"),$=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),U=new RegExp("^"+F+"*,"+F+"*"),q=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),G=new RegExp(F+"|>"),H=new RegExp(j),W=new RegExp("^"+N+"$"),Z={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},se=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(M=O.call(b.childNodes),b.childNodes),M[b.childNodes.length].nodeType}catch(Ce){L={apply:M.length?function(e,t){D.apply(e,O.call(t))}:function(e,t){var n=e.length,i=0;while(e[n++]=t[i++]);e.length=n-1}}}function ae(e,t,i,r){var o,a,c,u,h,f,y,v=t&&t.ownerDocument,b=t?t.nodeType:9;if(i=i||[],"string"!==typeof e||!e||1!==b&&9!==b&&11!==b)return i;if(!r&&(d(t),t=t||p,m)){if(11!==b&&(h=J.exec(e)))if(o=h[1]){if(9===b){if(!(c=t.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(v&&(c=v.getElementById(o))&&_(t,c)&&c.id===o)return i.push(c),i}else{if(h[2])return L.apply(i,t.getElementsByTagName(e)),i;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!C[e+" "]&&(!g||!g.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===b&&(G.test(e)||q.test(e))){v=ee.test(e)&&ye(t.parentNode)||t,v===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(ie,re):t.setAttribute("id",u=x)),f=s(e),a=f.length;while(a--)f[a]=(u?"#"+u:":scope")+" "+_e(f[a]);y=f.join(",")}try{return L.apply(i,v.querySelectorAll(y)),i}catch(w){C(e,!0)}finally{u===x&&t.removeAttribute("id")}}}return l(e.replace($,"$1"),t,i,r)}function le(){var e=[];function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function ce(e){return e[x]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(Ce){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){var n=e.split("|"),r=n.length;while(r--)i.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,i){var r,o=e([],n.length,t),s=o.length;while(s--)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function ye(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},d=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:b;return s!=p&&9===s.nodeType&&s.documentElement?(p=s,f=p.documentElement,m=!o(p),b!=p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),"undefined"!==typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),n.getById?(i.filter["ID"]=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find["ID"]=function(e,t){if("undefined"!==typeof t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter["ID"]=function(e){var t=e.replace(te,ne);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find["ID"]=function(e,t){if("undefined"!==typeof t.getElementById&&m){var n,i,r,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];r=t.getElementsByName(e),i=0;while(o=r[i++])if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),i.find["TAG"]=n.getElementsByTagName?function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[r++])1===n.nodeType&&i.push(n);return i}return o},i.find["CLASS"]=n.getElementsByClassName&&function(e,t){if("undefined"!==typeof t.getElementsByClassName&&m)return t.getElementsByClassName(e)},y=[],g=[],(n.qsa=K.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+F+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),t=p.createElement("input"),t.setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=K.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",j)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=K.test(f.compareDocumentPosition),_=t||K.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return h=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!n.sortDetached&&t.compareDocumentPosition(e)===i?e==p||e.ownerDocument==b&&_(b,e)?-1:t==p||t.ownerDocument==b&&_(b,t)?1:u?z(u,e)-z(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e==p?-1:t==p?1:r?-1:o?1:u?z(u,e)-z(u,t):0;if(r===o)return de(e,t);n=e;while(n=n.parentNode)s.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(s[i]===a[i])i++;return i?de(s[i],a[i]):s[i]==b?-1:a[i]==b?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&m&&!C[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var i=v.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(Ce){C(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),_(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var r=i.attrHandle[t.toLowerCase()],o=r&&I.call(i.attrHandle,t.toLowerCase())?r(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ie,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,i=[],r=0,o=0;if(h=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(A),h){while(t=e[o++])t===e[o]&&(r=i.push(o));while(r--)e.splice(i[r],1)}return u=null,e},r=ae.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[i++])n+=r(t);return n},i=ae.selectors={cacheLength:50,createPseudo:ce,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Z["CHILD"].test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&S(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=ae.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(V," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,p,f,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!l&&!a,_=!1;if(g){if(o){while(m){d=t;while(d=d[m])if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){d=g,h=d[x]||(d[x]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),c=u[e]||[],p=c[0]===w&&c[1],_=p&&c[2],d=p&&g.childNodes[p];while(d=++p&&d&&d[m]||(_=p=0)||f.pop())if(1===d.nodeType&&++_&&d===t){u[e]=[w,p,_];break}}else if(v&&(d=t,h=d[x]||(d[x]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),c=u[e]||[],p=c[0]===w&&c[1],_=p),!1===_)while(d=++p&&d&&d[m]||(_=p=0)||f.pop())if((a?d.nodeName.toLowerCase()===y:1===d.nodeType)&&++_&&(v&&(h=d[x]||(d[x]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),u[e]=[w,_]),d===t))break;return _-=r,_===i||_%i===0&&_/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=z(e,o[s]),e[i]=!(n[i]=o[s])})):function(e){return r(e,0,n)}):r}},pseudos:{not:ce((function(e){var t=[],n=[],i=a(e.replace($,"$1"));return i[x]?ce((function(e,t,n,r){var o,s=i(e,null,r,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return ae(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:ce((function(e){return W.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos["empty"](e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e})),gt:ge((function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e}))}},i.pseudos["nth"]=i.pseudos["eq"],{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=fe(t);function ve(){}function _e(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function xe(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var c,u,h,d=[w,a];if(l){while(t=t[i])if((1===t.nodeType||s)&&e(t,n,l))return!0}else while(t=t[i])if(1===t.nodeType||s)if(h=t[x]||(t[x]={}),u=h[t.uniqueID]||(h[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[o])&&c[0]===w&&c[1]===a)return d[2]=c[2];if(u[o]=d,d[2]=e(t,n,l))return!0}return!1}}function be(e){return e.length>1?function(t,n,i){var r=e.length;while(r--)if(!e[r](t,n,i))return!1;return!0}:e[0]}function we(e,t,n){for(var i=0,r=t.length;i<r;i++)ae(e,t[i],n);return n}function Te(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function Se(e,t,n,i,r,o){return i&&!i[x]&&(i=Se(i)),r&&!r[x]&&(r=Se(r,o)),ce((function(o,s,a,l){var c,u,h,d=[],p=[],f=s.length,m=o||we(t||"*",a.nodeType?[a]:a,[]),g=!e||!o&&t?m:Te(m,d,e,a,l),y=n?r||(o?e:f||i)?[]:s:g;if(n&&n(g,y,a,l),i){c=Te(y,p),i(c,[],a,l),u=c.length;while(u--)(h=c[u])&&(y[p[u]]=!(g[p[u]]=h))}if(o){if(r||e){if(r){c=[],u=y.length;while(u--)(h=y[u])&&c.push(g[u]=h);r(null,y=[],c,l)}u=y.length;while(u--)(h=y[u])&&(c=r?z(o,h):d[u])>-1&&(o[c]=!(s[c]=h))}}else y=Te(y===s?y.splice(f,y.length):y),r?r(null,s,y,l):L.apply(s,y)}))}function Ee(e){for(var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,u=xe((function(e){return e===t}),a,!0),h=xe((function(e){return z(t,e)>-1}),a,!0),d=[function(e,n,i){var r=!s&&(i||n!==c)||((t=n).nodeType?u(e,n,i):h(e,n,i));return t=null,r}];l<o;l++)if(n=i.relative[e[l].type])d=[xe(be(d),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[x]){for(r=++l;r<o;r++)if(i.relative[e[r].type])break;return Se(l>1&&be(d),l>1&&_e(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace($,"$1"),n,l<r&&Ee(e.slice(l,r)),r<o&&Ee(e=e.slice(r)),r<o&&_e(e))}d.push(n)}return be(d)}function ke(e,t){var n=t.length>0,r=e.length>0,o=function(o,s,a,l,u){var h,f,g,y=0,v="0",_=o&&[],x=[],b=c,T=o||r&&i.find["TAG"]("*",u),S=w+=null==b?1:Math.random()||.1,E=T.length;for(u&&(c=s==p||s||u);v!==E&&null!=(h=T[v]);v++){if(r&&h){f=0,s||h.ownerDocument==p||(d(h),a=!m);while(g=e[f++])if(g(h,s||p,a)){l.push(h);break}u&&(w=S)}n&&((h=!g&&h)&&y--,o&&_.push(h))}if(y+=v,n&&v!==y){f=0;while(g=t[f++])g(_,x,s,a);if(o){if(y>0)while(v--)_[v]||x[v]||(x[v]=P.call(l));x=Te(x)}L.apply(l,x),u&&!o&&x.length>0&&y+t.length>1&&ae.uniqueSort(l)}return u&&(w=S,c=b),_};return n?ce(o):o}return ve.prototype=i.filters=i.pseudos,i.setFilters=new ve,s=ae.tokenize=function(e,t){var n,r,o,s,a,l,c,u=E[e+" "];if(u)return t?0:u.slice(0);a=e,l=[],c=i.preFilter;while(a){for(s in n&&!(r=U.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=q.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),i.filter)!(r=Z[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):E(e,l).slice(0)},a=ae.compile=function(e,t){var n,i=[],r=[],o=k[e+" "];if(!o){t||(t=s(e)),n=t.length;while(n--)o=Ee(t[n]),o[x]?i.push(o):r.push(o);o=k(e,ke(r,i)),o.selector=e}return o},l=ae.select=function(e,t,n,r){var o,l,c,u,h,d="function"===typeof e&&e,p=!r&&s(e=d.selector||e);if(n=n||[],1===p.length){if(l=p[0]=p[0].slice(0),l.length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&i.relative[l[1].type]){if(t=(i.find["ID"](c.matches[0].replace(te,ne),t)||[])[0],!t)return n;d&&(t=t.parentNode),e=e.slice(l.shift().value.length)}o=Z["needsContext"].test(e)?0:l.length;while(o--){if(c=l[o],i.relative[u=c.type])break;if((h=i.find[u])&&(r=h(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ye(t.parentNode)||t))){if(l.splice(o,1),e=r.length&&_e(l),!e)return L.apply(n,r),n;break}}}return(d||a(e,p))(r,t,!m,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!h,d(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||he(R,(function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null})),ae}(n);E.find=C,E.expr=C.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=C.uniqueSort,E.text=C.getText,E.isXMLDoc=C.isXML,E.contains=C.contains,E.escapeSelector=C.escape;var A=function(e,t,n){var i=[],r=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(r&&E(e).is(n))break;i.push(e)}return i},I=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},M=E.expr.match.needsContext;function P(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return v(t)?E.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?E.grep(e,(function(e){return h.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?E.find.matchesSelector(i,e)?[i]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!==typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t<i;t++)if(E.contains(r[t],this))return!0})));for(n=this.pushStack([]),t=0;t<i;t++)E.find(e,r[t],n);return i>1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"===typeof e&&M.test(e)?E(e):e||[],!1).length}});var O,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,R=E.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||O,"string"===typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:x,!0)),D.test(i[1])&&E.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=x.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)};R.prototype=E.fn,O=E(x);var F=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0}))},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!==typeof e&&E(e);if(!M.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"===typeof e?h.call(E(e),this[0]):h.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return I((e.parentNode||{}).firstChild,e)},children:function(e){return I(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(P(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,i){var r=E.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"===typeof i&&(r=E.filter(i,r)),this.length>1&&(N[e]||E.uniqueSort(r),F.test(e)&&r.reverse()),this.pushStack(r)}}));var j=/[^\x20\t\r\n\f]+/g;function V(e){var t={};return E.each(e.match(j)||[],(function(e,n){t[n]=!0})),t}function $(e){return e}function U(e){throw e}function q(e,t,n,i){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(n):e&&v(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"===typeof e?V(e):E.extend({},e);var t,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;s.length;a=-1){n=s.shift();while(++a<o.length)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1)}e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){E.each(n,(function(n,i){v(i)?e.unique&&c.has(i)||o.push(i):i&&i.length&&"string"!==T(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return E.each(arguments,(function(e,t){var n;while((n=E.inArray(t,o,n))>-1)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,i){var r=v(e[i[4]])&&e[i[4]];o[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,i,r){var o=0;function s(e,t,i,r){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(e<o)){if(n=i.apply(a,l),n===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"===typeof n||"function"===typeof n)&&n.then,v(c)?r?c.call(n,s(o,t,$,r),s(o,t,U,r)):(o++,c.call(n,s(o,t,$,r),s(o,t,U,r),s(o,t,$,t.notifyWith))):(i!==$&&(a=void 0,l=[n]),(r||t.resolveWith)(a,l))}},u=r?c:function(){try{c()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,u.stackTrace),e+1>=o&&(i!==U&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?u():(E.Deferred.getStackHook&&(u.stackTrace=E.Deferred.getStackHook()),n.setTimeout(u))}}return E.Deferred((function(n){t[0][3].add(s(0,n,v(r)?r:$,n.notifyWith)),t[1][3].add(s(0,n,v(e)?e:$)),t[2][3].add(s(0,n,v(i)?i:U))})).promise()},promise:function(e){return null!=e?E.extend(e,r):r}},o={};return E.each(t,(function(e,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add((function(){i=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=l.call(arguments),o=E.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?l.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(q(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||v(r[n]&&r[n].then)))return o.then();while(n--)q(r[n],s(n),o.reject);return o.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&G.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){n.setTimeout((function(){throw e}))};var H=E.Deferred();function W(){x.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),E.ready()}E.fn.ready=function(e){return H.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||H.resolveWith(x,[E]))}}),E.ready.then=H.then,"complete"===x.readyState||"loading"!==x.readyState&&!x.documentElement.doScroll?n.setTimeout(E.ready):(x.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var Z=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===T(n))for(a in r=!0,n)Z(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,v(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(E(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},X=/^-ms-/,Y=/-([a-z])/g;function Q(e,t){return t.toUpperCase()}function K(e){return e.replace(X,"ms-").replace(Y,Q)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ee(){this.expando=E.expando+ee.uid++}ee.uid=1,ee.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"===typeof t)r[K(t)]=n;else for(i in t)r[K(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"===typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){Array.isArray(t)?t=t.map(K):(t=K(t),t=t in i?[t]:t.match(j)||[]),n=t.length;while(n--)delete i[t[n]]}(void 0===t||E.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var te=new ee,ne=new ee,ie=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,re=/[A-Z]/g;function oe(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ie.test(e)?JSON.parse(e):e)}function se(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(re,"-$&").toLowerCase(),n=e.getAttribute(i),"string"===typeof n){try{n=oe(n)}catch(r){}ne.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return ne.hasData(e)||te.hasData(e)},data:function(e,t,n){return ne.access(e,t,n)},removeData:function(e,t){ne.remove(e,t)},_data:function(e,t,n){return te.access(e,t,n)},_removeData:function(e,t){te.remove(e,t)}}),E.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=ne.get(o),1===o.nodeType&&!te.get(o,"hasDataAttrs"))){n=s.length;while(n--)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=K(i.slice(5)),se(o,i,r[i])));te.set(o,"hasDataAttrs",!0)}return r}return"object"===typeof e?this.each((function(){ne.set(this,e)})):Z(this,(function(t){var n;if(o&&void 0===t)return n=ne.get(o,e),void 0!==n?n:(n=se(o,e),void 0!==n?n:void 0);this.each((function(){ne.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ne.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=te.get(e,t),n&&(!i||Array.isArray(n)?i=te.access(e,t,E.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),i=n.length,r=n.shift(),o=E._queueHooks(e,t),s=function(){E.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return te.get(e,n)||te.access(e,n,{empty:E.Callbacks("once memory").add((function(){te.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!==typeof e&&(t=e,e="fx",n--),arguments.length<n?E.queue(this[0],e):void 0===t?this:this.each((function(){var n=E.queue(this,e,t);E._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&E.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){E.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=E.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};"string"!==typeof e&&(t=e,e=void 0),e=e||"fx";while(s--)n=te.get(o[s],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,le=new RegExp("^(?:([+-])=|)("+ae+")([a-z%]*)$","i"),ce=["Top","Right","Bottom","Left"],ue=x.documentElement,he=function(e){return E.contains(e.ownerDocument,e)},de={composed:!0};ue.getRootNode&&(he=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(de)===e.ownerDocument});var pe=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&he(e)&&"none"===E.css(e,"display")};function fe(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return E.css(e,t,"")},l=a(),c=n&&n[3]||(E.cssNumber[t]?"":"px"),u=e.nodeType&&(E.cssNumber[t]||"px"!==c&&+l)&&le.exec(E.css(e,t));if(u&&u[3]!==c){l/=2,c=c||u[3],u=+l||1;while(s--)E.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,E.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}var me={};function ge(e){var t,n=e.ownerDocument,i=e.nodeName,r=me[i];return r||(t=n.body.appendChild(n.createElement(i)),r=E.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),me[i]=r,r)}function ye(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=te.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&pe(i)&&(r[o]=ge(i))):"none"!==n&&(r[o]="none",te.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}E.fn.extend({show:function(){return ye(this,!0)},hide:function(){return ye(this)},toggle:function(e){return"boolean"===typeof e?e?this.show():this.hide():this.each((function(){pe(this)?E(this).show():E(this).hide()}))}});var ve=/^(?:checkbox|radio)$/i,_e=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,xe=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=x.createDocumentFragment(),t=e.appendChild(x.createElement("div")),n=x.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),y.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="<option></option>",y.option=!!t.lastChild})();var be={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function we(e,t){var n;return n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&P(e,t)?E.merge([e],n):n}function Te(e,t){for(var n=0,i=e.length;n<i;n++)te.set(e[n],"globalEval",!t||te.get(t[n],"globalEval"))}be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,y.option||(be.optgroup=be.option=[1,"<select multiple='multiple'>","</select>"]);var Se=/<|&#?\w+;/;function Ee(e,t,n,i,r){for(var o,s,a,l,c,u,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if(o=e[p],o||0===o)if("object"===T(o))E.merge(d,o.nodeType?[o]:o);else if(Se.test(o)){s=s||h.appendChild(t.createElement("div")),a=(_e.exec(o)||["",""])[1].toLowerCase(),l=be[a]||be._default,s.innerHTML=l[1]+E.htmlPrefilter(o)+l[2],u=l[0];while(u--)s=s.lastChild;E.merge(d,s.childNodes),s=h.firstChild,s.textContent=""}else d.push(t.createTextNode(o));h.textContent="",p=0;while(o=d[p++])if(i&&E.inArray(o,i)>-1)r&&r.push(o);else if(c=he(o),s=we(h.appendChild(o),"script"),c&&Te(s),n){u=0;while(o=s[u++])xe.test(o.type||"")&&n.push(o)}return h}var ke=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ae(){return!1}function Ie(e,t){return e===Me()===("focus"===t)}function Me(){try{return x.activeElement}catch(e){}}function Pe(e,t,n,i,r,o){var s,a;if("object"===typeof t){for(a in"string"!==typeof n&&(i=i||n,n=void 0),t)Pe(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"===typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ae;else if(!r)return e;return 1===o&&(s=r,r=function(e){return E().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=E.guid++)),e.each((function(){E.event.add(this,t,r,i,n)}))}function De(e,t,n){n?(te.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var i,r,o=te.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=l.call(arguments),te.set(this,t,o),i=n(this,t),this[t](),r=te.get(this,t),o!==r||i?te.set(this,t,!1):r={},o!==r)return e.stopImmediatePropagation(),e.preventDefault(),r&&r.value}else o.length&&(te.set(this,t,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===te.get(e,t)&&E.event.add(e,t,Ce)}E.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,p,f,m,g=te.get(e);if(J(e)){n.handler&&(o=n,n=o.handler,r=o.selector),r&&E.find.matchesSelector(ue,r),n.guid||(n.guid=E.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return"undefined"!==typeof E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(j)||[""],c=t.length;while(c--)a=ke.exec(t[c])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p&&(h=E.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=E.event.special[p]||{},u=E.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&E.expr.match.needsContext.test(r),namespace:f.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),E.event.global[p]=!0)}},remove:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,p,f,m,g=te.hasData(e)&&te.get(e);if(g&&(l=g.events)){t=(t||"").match(j)||[""],c=t.length;while(c--)if(a=ke.exec(t[c])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){h=E.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;while(o--)u=d[o],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,g.handle)||E.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)E.event.remove(e,p+t[c],n,i,!0);E.isEmptyObject(l)&&te.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=new Array(arguments.length),l=E.event.fix(e),c=(te.get(this,"events")||Object.create(null))[l.type]||[],u=E.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){s=E.event.handlers.call(this,l,c),t=0;while((r=s[t++])&&!l.isPropagationStopped()){l.currentTarget=r.elem,n=0;while((o=r.handlers[n++])&&!l.isImmediatePropagationStopped())l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,i=((E.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a),void 0!==i&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()))}return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)i=t[n],r=i.selector+" ",void 0===s[r]&&(s[r]=i.needsContext?E(r,this).index(c)>-1:E.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(E.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ve.test(t.type)&&t.click&&P(t,"input")&&De(t,"click",Ce),!1},trigger:function(e){var t=this||e;return ve.test(t.type)&&t.click&&P(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return ve.test(t.type)&&t.click&&P(t,"input")&&te.get(t,"click")||P(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ae,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Ae,isPropagationStopped:Ae,isImmediatePropagationStopped:Ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(e,t){E.event.special[e]={setup:function(){return De(this,e,Ie),!1},trigger:function(){return De(this,e),!0},_default:function(){return!0},delegateType:t}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){E.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||E.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),E.fn.extend({on:function(e,t,n,i){return Pe(this,e,t,n,i)},one:function(e,t,n,i){return Pe(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,E(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"===typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!==typeof t||(n=t,t=void 0),!1===n&&(n=Ae),this.each((function(){E.event.remove(this,e,n,t)}))}});var Le=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,ze=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Re(e,t){return P(e,"table")&&P(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ne(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,i,r,o,s,a,l;if(1===t.nodeType){if(te.hasData(e)&&(o=te.get(e),l=o.events,l))for(r in te.remove(t,"handle events"),l)for(n=0,i=l[r].length;n<i;n++)E.event.add(t,r,l[r][n]);ne.hasData(e)&&(s=ne.access(e),a=E.extend({},s),ne.set(t,a))}}function je(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ve(e,t,n,i){t=c(t);var r,o,s,a,l,u,h=0,d=e.length,p=d-1,f=t[0],m=v(f);if(m||d>1&&"string"===typeof f&&!y.checkClone&&Oe.test(f))return e.each((function(r){var o=e.eq(r);m&&(t[0]=f.call(this,r,o.html())),Ve(o,t,n,i)}));if(d&&(r=Ee(t,e[0].ownerDocument,!1,e,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=E.map(we(r,"script"),Fe),a=s.length;h<d;h++)l=r,h!==p&&(l=E.clone(l,!0,!0),a&&E.merge(s,we(l,"script"))),n.call(e[h],l,h);if(a)for(u=s[s.length-1].ownerDocument,E.map(s,Ne),h=0;h<a;h++)l=s[h],xe.test(l.type||"")&&!te.access(l,"globalEval")&&E.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?E._evalUrl&&!l.noModule&&E._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u):w(l.textContent.replace(ze,""),l,u))}return e}function $e(e,t,n){for(var i,r=t?E.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||E.cleanData(we(i)),i.parentNode&&(n&&he(i)&&Te(we(i,"script")),i.parentNode.removeChild(i));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=he(e);if(!y.noCloneChecked&&(1===e.nodeType||11===e.nodeType)&&!E.isXMLDoc(e))for(s=we(a),o=we(e),i=0,r=o.length;i<r;i++)je(o[i],s[i]);if(t)if(n)for(o=o||we(e),s=s||we(a),i=0,r=o.length;i<r;i++)Be(o[i],s[i]);else Be(e,a);return s=we(a,"script"),s.length>0&&Te(s,!l&&we(e,"script")),a},cleanData:function(e){for(var t,n,i,r=E.event.special,o=0;void 0!==(n=e[o]);o++)if(J(n)){if(t=n[te.expando]){if(t.events)for(i in t.events)r[i]?E.event.remove(n,i):E.removeEvent(n,i,t.handle);n[te.expando]=void 0}n[ne.expando]&&(n[ne.expando]=void 0)}}}),E.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return Z(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.appendChild(e)}}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return Z(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"===typeof e&&!Le.test(e)&&!be[(_e.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(E.cleanData(we(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,(function(t){var n=this.parentNode;E.inArray(this,e)<0&&(E.cleanData(we(this)),n&&n.replaceChild(t,this))}),e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){E.fn[e]=function(e){for(var n,i=[],r=E(e),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),E(r[s])[t](n),u.apply(i,n.get());return this.pushStack(i)}}));var Ue=new RegExp("^("+ae+")(?!px)[a-z%]+$","i"),qe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ge=function(e,t,n){var i,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in i=n.call(e),t)e.style[r]=o[r];return i},He=new RegExp(ce.join("|"),"i");function We(e,t,n){var i,r,o,s,a=e.style;return n=n||qe(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||he(e)||(s=E.style(e,t)),!y.pixelBoxStyles()&&Ue.test(s)&&He.test(t)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}(function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ue.appendChild(c).appendChild(u);var e=n.getComputedStyle(u);i="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",s=36===t(e.right),r=36===t(e.width),u.style.position="absolute",o=12===t(u.offsetWidth/3),ue.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var i,r,o,s,a,l,c=x.createElement("div"),u=x.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===u.style.backgroundClip,E.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,i,r;return null==a&&(e=x.createElement("table"),t=x.createElement("tr"),i=x.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",ue.appendChild(e).appendChild(t).appendChild(i),r=n.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,ue.removeChild(e)),a}}))})();var Xe=["Webkit","Moz","ms"],Ye=x.createElement("div").style,Qe={};function Ke(e){var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;while(n--)if(e=Xe[n]+t,e in Ye)return e}function Je(e){var t=E.cssProps[e]||Qe[e];return t||(e in Ye?e:Qe[e]=Ke(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt=/^--/,nt={position:"absolute",visibility:"hidden",display:"block"},it={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var i=le.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ot(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=E.css(e,n+ce[s],!0,r)),i?("content"===n&&(l-=E.css(e,"padding"+ce[s],!0,r)),"margin"!==n&&(l-=E.css(e,"border"+ce[s]+"Width",!0,r))):(l+=E.css(e,"padding"+ce[s],!0,r),"padding"!==n?l+=E.css(e,"border"+ce[s]+"Width",!0,r):a+=E.css(e,"border"+ce[s]+"Width",!0,r));return!i&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function st(e,t,n){var i=qe(e),r=!y.boxSizingReliable()||n,o=r&&"border-box"===E.css(e,"boxSizing",!1,i),s=o,a=We(e,t,i),l="offset"+t[0].toUpperCase()+t.slice(1);if(Ue.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&o||!y.reliableTrDimensions()&&P(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,i))&&e.getClientRects().length&&(o="border-box"===E.css(e,"boxSizing",!1,i),s=l in e,s&&(a=e[l])),a=parseFloat(a)||0,a+ot(e,t,n||(o?"border":"content"),s,i,a)+"px"}function at(e,t,n,i,r){return new at.prototype.init(e,t,n,i,r)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=K(t),l=tt.test(t),c=e.style;if(l||(t=Je(a)),s=E.cssHooks[t]||E.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];o=typeof n,"string"===o&&(r=le.exec(n))&&r[1]&&(n=fe(e,t,r),o="number"),null!=n&&n===n&&("number"!==o||l||(n+=r&&r[3]||(E.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=K(t),l=tt.test(t);return l||(t=Je(a)),s=E.cssHooks[t]||E.cssHooks[a],s&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=We(e,t,i)),"normal"===r&&t in it&&(r=it[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,i){if(n)return!et.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?st(e,t,i):Ge(e,nt,(function(){return st(e,t,i)}))},set:function(e,n,i){var r,o=qe(e),s=!y.scrollboxSize()&&"absolute"===o.position,a=s||i,l=a&&"border-box"===E.css(e,"boxSizing",!1,o),c=i?ot(e,t,i,l,o):0;return l&&s&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ot(e,t,"border",!1,o)-.5)),c&&(r=le.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),rt(e,n,c)}}})),E.cssHooks.marginLeft=Ze(y.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"===typeof n?n.split(" "):[n];i<4;i++)r[e+ce[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(E.cssHooks[e+t].set=rt)})),E.fn.extend({css:function(e,t){return Z(this,(function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=qe(e),r=t.length;s<r;s++)o[t[s]]=E.css(e,t[s],!1,i);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)}),e,t,arguments.length>1)}}),E.Tween=at,at.prototype={constructor:at,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=at.prototype.init,E.fx.step={};var lt,ct,ut=/^(?:toggle|show|hide)$/,ht=/queueHooks$/;function dt(){ct&&(!1===x.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(dt):n.setTimeout(dt,E.fx.interval),E.fx.tick())}function pt(){return n.setTimeout((function(){lt=void 0})),lt=Date.now()}function ft(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=ce[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function mt(e,t,n){for(var i,r=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function gt(e,t,n){var i,r,o,s,a,l,c,u,h="width"in t||"height"in t,d=this,p={},f=e.style,m=e.nodeType&&pe(e),g=te.get(e,"fxshow");for(i in n.queue||(s=E._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,E.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[i],ut.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||E.style(e,i)}if(l=!E.isEmptyObject(t),l||!E.isEmptyObject(p))for(i in h&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=g&&g.display,null==c&&(c=te.get(e,"display")),u=E.css(e,"display"),"none"===u&&(c?u=c:(ye([e],!0),c=e.style.display||c,u=E.css(e,"display"),ye([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===E.css(e,"float")&&(l||(d.done((function(){f.display=c})),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=te.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&ye([e],!0),d.done((function(){for(i in m||ye([e]),te.remove(e,"fxshow"),p)E.style(e,i,p[i])}))),l=mt(m?g[i]:0,i,d),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}function yt(e,t){var n,i,r,o,s;for(n in e)if(i=K(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),s=E.cssHooks[i],s&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}function vt(e,t,n){var i,r,o=0,s=vt.prefilters.length,a=E.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=lt||pt(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,s=0,l=c.tweens.length;s<l;s++)c.tweens[s].run(o);return a.notifyWith(e,[c,o,n]),o<1&&l?n:(l||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:E.extend({},t),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:t,originalOptions:n,startTime:lt||pt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=E.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(yt(u,c.opts.specialEasing);o<s;o++)if(i=vt.prefilters[o].call(c,e,u,c.opts),i)return v(i.stop)&&(E._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return E.map(u,mt,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),E.fx.timer(E.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}E.Animation=E.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return fe(n.elem,e,le.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(j);for(var n,i=0,r=e.length;i<r;i++)n=e[i],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[gt],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),E.speed=function(e,t,n){var i=e&&"object"===typeof e?E.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return E.fx.off?i.duration=0:"number"!==typeof i.duration&&(i.duration in E.fx.speeds?i.duration=E.fx.speeds[i.duration]:i.duration=E.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&E.dequeue(this,i.queue)},i},E.fn.extend({fadeTo:function(e,t,n,i){return this.filter(pe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=E.isEmptyObject(e),o=E.speed(t,n,i),s=function(){var t=vt(this,E.extend({},e),o);(r||te.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!==typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=E.timers,s=te.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ht.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||E.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=te.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=E.timers,s=i?i.length:0;for(n.finish=!0,E.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(e,t){var n=E.fn[t];E.fn[t]=function(e,i,r){return null==e||"boolean"===typeof e?n.apply(this,arguments):this.animate(ft(t,!0),e,i,r)}})),E.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){E.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}})),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(lt=Date.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),lt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ct||(ct=!0,dt())},E.fx.stop=function(){ct=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,t){return e=E.fx&&E.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}}))},function(){var e=x.createElement("input"),t=x.createElement("select"),n=t.appendChild(x.createElement("option"));e.type="checkbox",y.checkOn=""!==e.value,y.optSelected=n.selected,e=x.createElement("input"),e.value="t",e.type="radio",y.radioValue="t"===e.value}();var _t,xt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return Z(this,E.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"===typeof e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(r=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?_t:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=E.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&P(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(j);if(r&&1===e.nodeType)while(n=r[i++])e.removeAttribute(n)}}),_t={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=xt[t]||E.find.attr;xt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=xt[s],xt[s]=r,r=null!=n(e,t,i)?s:null,xt[s]=o),r}}));var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){var t=e.match(j)||[];return t.join(" ")}function St(e){return e.getAttribute&&e.getAttribute("class")||""}function Et(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(j)||[]}E.fn.extend({prop:function(e,t){return Z(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,r=E.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(v(e))return this.each((function(t){E(this).addClass(e.call(this,t,St(this)))}));if(t=Et(e),t.length)while(n=this[l++])if(r=St(n),i=1===n.nodeType&&" "+Tt(r)+" ",i){s=0;while(o=t[s++])i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=Tt(i),r!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(v(e))return this.each((function(t){E(this).removeClass(e.call(this,t,St(this)))}));if(!arguments.length)return this.attr("class","");if(t=Et(e),t.length)while(n=this[l++])if(r=St(n),i=1===n.nodeType&&" "+Tt(r)+" ",i){s=0;while(o=t[s++])while(i.indexOf(" "+o+" ")>-1)i=i.replace(" "+o+" "," ");a=Tt(i),r!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"===typeof t&&i?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,St(this),t),t)})):this.each((function(){var t,r,o,s;if(i){r=0,o=E(this),s=Et(e);while(t=s[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||(t=St(this),t&&te.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":te.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;t=" "+e+" ";while(n=this[i++])if(1===n.nodeType&&(" "+Tt(St(n))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;E.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=v(e),this.each((function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,E(this).val()):e,null==r?r="":"number"===typeof r?r+="":Array.isArray(r)&&(r=E.map(r,(function(e){return null==e?"":e+""}))),t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=E.valHooks[r.type]||E.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"===typeof n?n.replace(kt,""):null==n?"":n)):void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:Tt(E.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i<l;i++)if(n=r[i],(n.selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(t=E(n).val(),s)return t;a.push(t)}return a},set:function(e,t){var n,i,r=e.options,o=E.makeArray(t),s=r.length;while(s--)i=r[s],(i.selected=E.inArray(E.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},y.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),y.focusin="onfocusin"in n;var Ct=/^(?:focusinfocus|focusoutblur)$/,At=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,i,r){var o,s,a,l,c,u,h,d,p=[i||x],m=f.call(e,"type")?e.type:e,g=f.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=i=i||x,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(m+E.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,e=e[E.expando]?e:new E.Event(m,"object"===typeof e&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:E.makeArray(t,[e]),h=E.event.special[m]||{},r||!h.trigger||!1!==h.trigger.apply(i,t))){if(!r&&!h.noBubble&&!_(i)){for(l=h.delegateType||m,Ct.test(l+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(i.ownerDocument||x)&&p.push(a.defaultView||a.parentWindow||n)}o=0;while((s=p[o++])&&!e.isPropagationStopped())d=s,e.type=o>1?l:h.bindType||m,u=(te.get(s,"events")||Object.create(null))[e.type]&&te.get(s,"handle"),u&&u.apply(s,t),u=c&&s[c],u&&u.apply&&J(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),t)||!J(i)||c&&v(i[m])&&!_(i)&&(a=i[c],a&&(i[c]=null),E.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,At),i[m](),e.isPropagationStopped()&&d.removeEventListener(m,At),E.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(e,t,n){var i=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(i,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),y.focusin||E.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){E.event.simulate(t,e.target,E.event.fix(e))};E.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,r=te.access(i,t);r||i.addEventListener(e,n,!0),te.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=te.access(i,t)-1;r?te.access(i,t,r):(i.removeEventListener(e,n,!0),te.remove(i,t))}}}));var It=n.location,Mt={guid:Date.now()},Pt=/\?/;E.parseXML=function(e){var t,i;if(!e||"string"!==typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||E.error("Invalid XML: "+(i?E.map(i.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Dt=/\[\]$/,Lt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,zt=/^(?:input|select|textarea|keygen)/i;function Rt(e,t,n,i){var r;if(Array.isArray(t))E.each(t,(function(t,r){n||Dt.test(e)?i(e,r):Rt(e+"["+("object"===typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==T(t))i(e,t);else for(r in t)Rt(e+"["+r+"]",t[r],n,i)}E.param=function(e,t){var n,i=[],r=function(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){r(this.name,this.value)}));else for(n in e)Rt(n,e[n],t,r);return i.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&zt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}})):{name:t.name,value:n.replace(Lt,"\r\n")}})).get()}});var Ft=/%20/g,Nt=/#.*$/,Bt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,$t=/^(?:GET|HEAD)$/,Ut=/^\/\//,qt={},Gt={},Ht="*/".concat("*"),Wt=x.createElement("a");function Zt(e){return function(t,n){"string"!==typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(j)||[];if(v(n))while(i=o[r++])"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Xt(e,t,n,i){var r={},o=e===Gt;function s(a){var l;return r[a]=!0,E.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!==typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Yt(e,t){var n,i,r=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&E.extend(!0,e,i),e}function Qt(e,t,n){var i,r,o,s,a=e.contents,l=e.dataTypes;while("*"===l[0])l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}function Kt(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];o=u.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift(),o)if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]],s)){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}Wt.href=It.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:Vt.test(It.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,E.ajaxSettings),t):Yt(E.ajaxSettings,e)},ajaxPrefilter:Zt(qt),ajaxTransport:Zt(Gt),ajax:function(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,s,a,l,c,u,h,d,p=E.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?E(f):E.event,g=E.Deferred(),y=E.Callbacks("once memory"),v=p.statusCode||{},_={},b={},w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=jt.exec(o))s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||w;return i&&i.abort(t),S(0,t),this}};if(g.promise(T),p.url=((e||p.url||It.href)+"").replace(Ut,It.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(j)||[""],null==p.crossDomain){l=x.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Wt.protocol+"//"+Wt.host!==l.protocol+"//"+l.host}catch(k){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!==typeof p.data&&(p.data=E.param(p.data,p.traditional)),Xt(qt,p,t,T),c)return T;for(h in u=E.event&&p.global,u&&0===E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!$t.test(p.type),r=p.url.replace(Nt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ft,"+")):(d=p.url.slice(r.length),p.data&&(p.processData||"string"===typeof p.data)&&(r+=(Pt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Bt,"$1"),d=(Pt.test(r)?"&":"?")+"_="+Mt.guid+++d),p.url=r+d),p.ifModified&&(E.lastModified[r]&&T.setRequestHeader("If-Modified-Since",E.lastModified[r]),E.etag[r]&&T.setRequestHeader("If-None-Match",E.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ht+"; q=0.01":""):p.accepts["*"]),p.headers)T.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,T,p)||c))return T.abort();if(w="abort",y.add(p.complete),T.done(p.success),T.fail(p.error),i=Xt(Gt,p,t,T),i){if(T.readyState=1,u&&m.trigger("ajaxSend",[T,p]),c)return T;p.async&&p.timeout>0&&(a=n.setTimeout((function(){T.abort("timeout")}),p.timeout));try{c=!1,i.send(_,S)}catch(k){if(c)throw k;S(-1,k)}}else S(-1,"No Transport");function S(e,t,s,l){var h,d,_,x,b,w=t;c||(c=!0,a&&n.clearTimeout(a),i=void 0,o=l||"",T.readyState=e>0?4:0,h=e>=200&&e<300||304===e,s&&(x=Qt(p,T,s)),!h&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),x=Kt(p,x,T,h),h?(p.ifModified&&(b=T.getResponseHeader("Last-Modified"),b&&(E.lastModified[r]=b),b=T.getResponseHeader("etag"),b&&(E.etag[r]=b)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=x.state,d=x.data,_=x.error,h=!_)):(_=w,!e&&w||(w="error",e<0&&(e=0))),T.status=e,T.statusText=(t||w)+"",h?g.resolveWith(f,[d,w,T]):g.rejectWith(f,[T,w,_]),T.statusCode(v),v=void 0,u&&m.trigger(h?"ajaxSuccess":"ajaxError",[T,p,h?d:_]),y.fireWith(f,[T,w]),u&&(m.trigger("ajaxComplete",[T,p]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,i,r){return v(n)&&(r=r||i,i=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:r,data:n,success:i},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},en=E.ajaxSettings.xhr();y.cors=!!en&&"withCredentials"in en,y.ajax=en=!!en,E.ajaxTransport((function(e){var t,i;if(y.cors||en&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!==typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Jt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!==typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&i()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=E("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),x.head.appendChild(t[0])},abort:function(){n&&n()}}}));var tn=[],nn=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||E.expando+"_"+Mt.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",(function(e,t,i){var r,o,s,a=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"===typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(nn,"$1"+r):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||E.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=n[r],n[r]=function(){s=arguments},i.always((function(){void 0===o?E(n).removeProp(r):n[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,tn.push(r)),s&&v(o)&&o(s[0]),s=o=void 0})),"script"})),y.createHTMLDocument=function(){var e=x.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),E.parseHTML=function(e,t,n){return"string"!==typeof e?[]:("boolean"===typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?(t=x.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=x.location.href,t.head.appendChild(i)):t=x),r=D.exec(e),o=!n&&[],r?[t.createElement(r[1])]:(r=Ee([e],t,o),o&&o.length&&E(o).remove(),E.merge([],r.childNodes)));var i,r,o},E.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=Tt(e.slice(a)),e=e.slice(0,a)),v(t)?(n=t,t=void 0):t&&"object"===typeof t&&(r="POST"),s.length>0&&E.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(i?E("<div>").append(E.parseHTML(e)).find(i):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},E.expr.pseudos.animated=function(e){return E.grep(E.timers,(function(t){return e===t.elem})).length},E.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c,u=E.css(e,"position"),h=E(e),d={};"static"===u&&(e.style.position="relative"),a=h.offset(),o=E.css(e,"top"),l=E.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(i=h.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),v(t)&&(t=t.call(e,n,E.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):h.css(d)}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){E.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===E.css(i,"position"))t=i.getBoundingClientRect();else{t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==i&&1===e.nodeType&&(r=E(e).offset(),r.top+=E.css(e,"borderTopWidth",!0),r.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-E.css(i,"marginTop",!0),left:t.left-r.left-E.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||ue}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;E.fn[e]=function(i){return Z(this,(function(e,i,r){var o;if(_(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r}),e,i,arguments.length)}})),E.each(["top","left"],(function(e,t){E.cssHooks[t]=Ze(y.pixelPosition,(function(e,n){if(n)return n=We(e,t),Ue.test(n)?E(e).position()[t]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){E.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!==typeof r),a=n||(!0===r||!0===o?"margin":"border");return Z(this,(function(t,n,r){var o;return _(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?E.css(t,n,a):E.style(t,n,r,a)}),t,s?r:void 0,s)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){E.fn[t]=function(e){return this.on(t,e)}})),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){E.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var rn=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,i,r;if("string"===typeof t&&(n=e[t],t=e,e=n),v(e))return i=l.call(arguments,2),r=function(){return e.apply(t||this,i.concat(l.call(arguments)))},r.guid=e.guid=e.guid||E.guid++,r},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=P,E.isFunction=v,E.isWindow=_,E.camelCase=K,E.type=T,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(rn,"")},i=[],r=function(){return E}.apply(t,i),void 0===r||(e.exports=r);var on=n.jQuery,sn=n.$;return E.noConflict=function(e){return n.$===E&&(n.$=sn),e&&n.jQuery===E&&(n.jQuery=on),E},"undefined"===typeof o&&(n.jQuery=n.$=E),E}))},1169:function(e,t,n){var i=n("2d95");e.exports=Array.isArray||function(e){return"Array"==i(e)}},1173:function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},"11e9":function(e,t,n){var i=n("52a7"),r=n("4630"),o=n("6821"),s=n("6a99"),a=n("69a8"),l=n("c69a"),c=Object.getOwnPropertyDescriptor;t.f=n("9e1e")?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(n){}if(a(e,t))return r(!i.f.call(e,t),e[t])}},1315:function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,n){return c=l()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=Function.bind.apply(e,i),o=new r;return n&&a(o,n.prototype),o},c.apply(null,arguments)}function u(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function h(e){var t="function"===typeof Map?new Map:void 0;return h=function(e){if(null===e||!u(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,e)},h(e)}function d(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function p(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function m(e){var t=0;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=p(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return t=e[Symbol.iterator](),t.next.bind(t)}Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(h(Error)),y=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return o(t,e),t}(g),v=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return o(t,e),t}(g),_=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return o(t,e),t}(g),x=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(g),b=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return o(t,e),t}(g),w=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(g),T=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(g),S="numeric",E="short",k="long",C={year:S,month:S,day:S},A={year:S,month:E,day:S},I={year:S,month:E,day:S,weekday:E},M={year:S,month:k,day:S},P={year:S,month:k,day:S,weekday:k},D={hour:S,minute:S},L={hour:S,minute:S,second:S},O={hour:S,minute:S,second:S,timeZoneName:E},z={hour:S,minute:S,second:S,timeZoneName:k},R={hour:S,minute:S,hour12:!1},F={hour:S,minute:S,second:S,hour12:!1},N={hour:S,minute:S,second:S,hour12:!1,timeZoneName:E},B={hour:S,minute:S,second:S,hour12:!1,timeZoneName:k},j={year:S,month:S,day:S,hour:S,minute:S},V={year:S,month:S,day:S,hour:S,minute:S,second:S},$={year:S,month:E,day:S,hour:S,minute:S},U={year:S,month:E,day:S,hour:S,minute:S,second:S},q={year:S,month:E,day:S,weekday:E,hour:S,minute:S},G={year:S,month:k,day:S,hour:S,minute:S,timeZoneName:E},H={year:S,month:k,day:S,hour:S,minute:S,second:S,timeZoneName:E},W={year:S,month:k,day:S,weekday:k,hour:S,minute:S,timeZoneName:k},Z={year:S,month:k,day:S,weekday:k,hour:S,minute:S,second:S,timeZoneName:k};function X(e){return"undefined"===typeof e}function Y(e){return"number"===typeof e}function Q(e){return"number"===typeof e&&e%1===0}function K(e){return"string"===typeof e}function J(e){return"[object Date]"===Object.prototype.toString.call(e)}function ee(){try{return"undefined"!==typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function te(){return!X(Intl.DateTimeFormat.prototype.formatToParts)}function ne(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ie(e){return Array.isArray(e)?e:[e]}function re(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function oe(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function se(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ae(e,t,n){return Q(e)&&e>=t&&e<=n}function le(e,t){return e-t*Math.floor(e/t)}function ce(e,t){void 0===t&&(t=2);var n,i=e<0?"-":"",r=i?-1*e:e;return n=r.toString().length<t?("0".repeat(t)+r).slice(-t):r.toString(),""+i+n}function ue(e){return X(e)||null===e||""===e?void 0:parseInt(e,10)}function he(e){if(!X(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function de(e,t,n){void 0===n&&(n=!1);var i=Math.pow(10,t),r=n?Math.trunc:Math.round;return r(e*i)/i}function pe(e){return e%4===0&&(e%100!==0||e%400===0)}function fe(e){return pe(e)?366:365}function me(e,t){var n=le(t-1,12)+1,i=e+(t-n)/12;return 2===n?pe(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ge(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function ye(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function ve(e){return e>99?e:e>60?1900+e:2e3+e}function _e(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=Object.assign({timeZoneName:t},o),a=ee();if(a&&te()){var l=new Intl.DateTimeFormat(n,s).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return l?l.value:null}if(a){var c=new Intl.DateTimeFormat(n,o).format(r),u=new Intl.DateTimeFormat(n,s).format(r),h=u.substring(c.length),d=h.replace(/^[, \u200e]+/,"");return d}return null}function xe(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0,r=n<0||Object.is(n,-0)?-i:i;return 60*n+r}function be(e){var t=Number(e);if("boolean"===typeof e||""===e||Number.isNaN(t))throw new w("Invalid unit value "+e);return t}function we(e,t,n){var i={};for(var r in e)if(se(e,r)){if(n.indexOf(r)>=0)continue;var o=e[r];if(void 0===o||null===o)continue;i[t(r)]=be(o)}return i}function Te(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+ce(n,2)+":"+ce(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+ce(n,2)+ce(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function Se(e){return oe(e,["hour","minute","second","millisecond"])}var Ee=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function ke(e){return JSON.stringify(e,Object.keys(e).sort())}var Ce=["January","February","March","April","May","June","July","August","September","October","November","December"],Ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ie=["J","F","M","A","M","J","J","A","S","O","N","D"];function Me(e){switch(e){case"narrow":return Ie;case"short":return Ae;case"long":return Ce;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Pe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],De=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Le=["M","T","W","T","F","S","S"];function Oe(e){switch(e){case"narrow":return Le;case"short":return De;case"long":return Pe;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var ze=["AM","PM"],Re=["Before Christ","Anno Domini"],Fe=["BC","AD"],Ne=["B","A"];function Be(e){switch(e){case"narrow":return Ne;case"short":return Fe;case"long":return Re;default:return null}}function je(e){return ze[e.hour<12?0:1]}function Ve(e,t){return Oe(t)[e.weekday-1]}function $e(e,t){return Me(t)[e.month-1]}function Ue(e,t){return Be(t)[e.year<0?0:1]}function qe(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+r[e][0];case-1:return s?"yesterday":"last "+r[e][0];case 0:return s?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,l=Math.abs(t),c=1===l,u=r[e],h=i?c?u[1]:u[2]||u[1]:c?r[e][0]:e;return a?l+" "+h+" ago":"in "+l+" "+h}function Ge(e){var t=oe(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]),n=ke(t),i="EEEE, LLLL d, yyyy, h:mm a";switch(n){case ke(C):return"M/d/yyyy";case ke(A):return"LLL d, yyyy";case ke(I):return"EEE, LLL d, yyyy";case ke(M):return"LLLL d, yyyy";case ke(P):return"EEEE, LLLL d, yyyy";case ke(D):return"h:mm a";case ke(L):return"h:mm:ss a";case ke(O):return"h:mm a";case ke(z):return"h:mm a";case ke(R):return"HH:mm";case ke(F):return"HH:mm:ss";case ke(N):return"HH:mm";case ke(B):return"HH:mm";case ke(j):return"M/d/yyyy, h:mm a";case ke($):return"LLL d, yyyy, h:mm a";case ke(G):return"LLLL d, yyyy, h:mm a";case ke(W):return i;case ke(V):return"M/d/yyyy, h:mm:ss a";case ke(U):return"LLL d, yyyy, h:mm:ss a";case ke(q):return"EEE, d LLL yyyy, h:mm a";case ke(H):return"LLLL d, yyyy, h:mm:ss a";case ke(Z):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return i}}function He(e,t){for(var n,i="",r=m(e);!(n=r()).done;){var o=n.value;o.literal?i+=o.val:i+=t(o.val)}return i}var We={D:C,DD:A,DDD:M,DDDD:P,t:D,tt:L,ttt:O,tttt:z,T:R,TT:F,TTT:N,TTTT:B,f:j,ff:$,fff:G,ffff:W,F:V,FF:U,FFF:H,FFFF:Z},Ze=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],o=0;o<e.length;o++){var s=e.charAt(o);"'"===s?(n.length>0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:!1,val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i,val:n}),r},e.macroTokenToFormatOpts=function(e){return We[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());var n=this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t));return n.format()},t.formatDateTime=function(e,t){void 0===t&&(t={});var n=this.loc.dtFormatter(e,Object.assign({},this.opts,t));return n.format()},t.formatDateTimeParts=function(e,t){void 0===t&&(t={});var n=this.loc.dtFormatter(e,Object.assign({},this.opts,t));return n.formatToParts()},t.resolvedOptions=function(e,t){void 0===t&&(t={});var n=this.loc.dtFormatter(e,Object.assign({},this.opts,t));return n.resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ce(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&te(),s=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},l=function(){return r?je(t):s({hour:"numeric",hour12:!0},"dayperiod")},c=function(e,n){return r?$e(t,e):s(n?{month:e}:{month:e,day:"numeric"},"month")},u=function(e,n){return r?Ve(t,e):s(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},h=function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n},d=function(e){return r?Ue(t,e):s({era:e},"era")},p=function(e){switch(e){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12===0?12:t.hour%12);case"hh":return i.num(t.hour%12===0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?s({day:"numeric"},"day"):i.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return o?s({month:"numeric"},"month"):i.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return o?s({year:"numeric"},"year"):i.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return h(e)}};return He(e.parseFormat(n),p)},t.formatDurationFromString=function(t,n){var i=this,r=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=function(e){return function(t){var n=r(t);return n?i.num(e.get(n),t.length):t}},s=e.parseFormat(n),a=s.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),l=t.shiftTo.apply(t,a.map(r).filter((function(e){return e})));return He(s,o(l))},e}(),Xe=function(){function e(e,t){this.reason=e,this.explanation=t}var t=e.prototype;return t.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Ye=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new T},t.formatOffset=function(e,t){throw new T},t.offset=function(e){throw new T},t.equals=function(e){throw new T},r(e,[{key:"type",get:function(){throw new T}},{key:"name",get:function(){throw new T}},{key:"universal",get:function(){throw new T}},{key:"isValid",get:function(){throw new T}}]),e}(),Qe=null,Ke=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){var n=t.format,i=t.locale;return _e(e,n,i)},n.formatOffset=function(e,t){return Te(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},r(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return ee()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Qe&&(Qe=new t),Qe}}]),t}(Ye),Je=RegExp("^"+Ee.source+"$"),et={};function tt(e){return et[e]||(et[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),et[e]}var nt={year:0,month:1,day:2,hour:3,minute:4,second:5};function it(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),r=i[1],o=i[2],s=i[3],a=i[4],l=i[5],c=i[6];return[s,r,o,a,l,c]}function rt(e,t){for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.type,a=o.value,l=nt[s];X(l)||(i[l]=parseInt(a,10))}return i}var ot={},st=function(e){function t(n){var i;return i=e.call(this)||this,i.zoneName=n,i.valid=t.isValidZone(n),i}o(t,e),t.create=function(e){return ot[e]||(ot[e]=new t(e)),ot[e]},t.resetCache=function(){ot={},et={}},t.isValidSpecifier=function(e){return!(!e||!e.match(Je))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(t){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){var n=t.format,i=t.locale;return _e(e,n,i,this.name)},n.formatOffset=function(e,t){return Te(this.offset(e),t)},n.offset=function(e){var t=new Date(e),n=tt(this.name),i=n.formatToParts?rt(n,t):it(n,t),r=i[0],o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],u=24===a?0:a,h=ge({year:r,month:o,day:s,hour:u,minute:l,second:c,millisecond:0}),d=+t,p=d%1e3;return d-=p>=0?p:1e3+p,(h-d)/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Ye),at=null,lt=function(e){function t(t){var n;return n=e.call(this)||this,n.fixed=t,n}o(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(xe(n[1],n[2]))}return null},r(t,null,[{key:"utcInstance",get:function(){return null===at&&(at=new t(0)),at}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return Te(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+Te(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Ye),ct=function(e){function t(t){var n;return n=e.call(this)||this,n.zoneName=t,n}o(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Ye);function ut(e,t){var n;if(X(e)||null===e)return t;if(e instanceof Ye)return e;if(K(e)){var i=e.toLowerCase();return"local"===i?t:"utc"===i||"gmt"===i?lt.utcInstance:null!=(n=st.parseGMTOffset(e))?lt.instance(n):st.isValidSpecifier(i)?st.create(e):lt.parseSpecifier(i)||new ct(e)}return Y(e)?lt.instance(e):"object"===typeof e&&e.offset&&"number"===typeof e.offset?e:new ct(e)}var ht=function(){return Date.now()},dt=null,pt=null,ft=null,mt=null,gt=!1,yt=function(){function e(){}return e.resetCaches=function(){zt.resetCache(),st.resetCache()},r(e,null,[{key:"now",get:function(){return ht},set:function(e){ht=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){dt=e?ut(e):null}},{key:"defaultZone",get:function(){return dt||Ke.instance}},{key:"defaultLocale",get:function(){return pt},set:function(e){pt=e}},{key:"defaultNumberingSystem",get:function(){return ft},set:function(e){ft=e}},{key:"defaultOutputCalendar",get:function(){return mt},set:function(e){mt=e}},{key:"throwOnInvalid",get:function(){return gt},set:function(e){gt=e}}]),e}(),vt={};function _t(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=vt[n];return i||(i=new Intl.DateTimeFormat(e,t),vt[n]=i),i}var xt={};function bt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=xt[n];return i||(i=new Intl.NumberFormat(e,t),xt[n]=i),i}var wt={};function Tt(e,t){void 0===t&&(t={});var n=t,i=(n.base,d(n,["base"])),r=JSON.stringify([e,i]),o=wt[r];return o||(o=new Intl.RelativeTimeFormat(e,t),wt[r]=o),o}var St=null;function Et(){if(St)return St;if(ee()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return St=e&&"und"!==e?e:"en-US",St}return St="en-US",St}function kt(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,i=e.substring(0,t);try{n=_t(e).resolvedOptions()}catch(a){n=_t(i).resolvedOptions()}var r=n,o=r.numberingSystem,s=r.calendar;return[i,o,s]}function Ct(e,t,n){return ee()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}function At(e){for(var t=[],n=1;n<=12;n++){var i=dr.utc(2016,n,1);t.push(e(i))}return t}function It(e){for(var t=[],n=1;n<=7;n++){var i=dr.utc(2016,11,13+n);t.push(e(i))}return t}function Mt(e,t,n,i,r){var o=e.listingMode(n);return"error"===o?null:"en"===o?i(t):r(t)}function Pt(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||ee()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var Dt=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&ee()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=bt(e,i)}}var t=e.prototype;return t.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}var n=this.floor?Math.floor(e):de(e,3);return ce(n,this.padTo)},e}(),Lt=function(){function e(e,t,n){var i;if(this.opts=n,this.hasIntl=ee(),e.zone.universal&&this.hasIntl){var r=e.offset/60*-1;r>=-14&&r<=12&&r%1===0?(i=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:dr.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);if(this.hasIntl){var o=Object.assign({},this.opts);i&&(o.timeZone=i),this.dtf=_t(t,o)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=Ge(this.opts),t=zt.create("en-US");return Ze.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&te()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),Ot=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&ne()&&(this.rtf=Tt(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):qe(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),zt=function(){function e(e,t,n,i){var r=kt(e),o=r[0],s=r[1],a=r[2];this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.intl=Ct(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,i,r){void 0===r&&(r=!1);var o=t||yt.defaultLocale,s=o||(r?"en-US":Et()),a=n||yt.defaultNumberingSystem,l=i||yt.defaultOutputCalendar;return new e(s,a,l,o)},e.resetCache=function(){St=null,vt={},xt={},wt={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,o=n.outputCalendar;return e.create(i,r,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=ee(),n=t&&te(),i=this.isEnglish(),r=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return n||i&&r||e?!n||i&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),Mt(this,e,n,Me,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return i.monthsCache[r][e]||(i.monthsCache[r][e]=At((function(e){return i.extract(e,n,"month")}))),i.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),Mt(this,e,n,Oe,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return i.weekdaysCache[r][e]||(i.weekdaysCache[r][e]=It((function(e){return i.extract(e,n,"weekday")}))),i.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),Mt(this,void 0,e,(function(){return ze}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[dr.utc(2016,11,13,9),dr.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),Mt(this,e,t,Be,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[dr.utc(-40,1,1),dr.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t),r=i.formatToParts(),o=r.find((function(e){return e.type.toLowerCase()===n}));return o?o.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new Dt(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new Lt(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new Ot(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||ee()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=Pt(this)),this.fastNumbersCached}}]),e}();function Rt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function Ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var i=t[0],r=t[1],o=t[2],s=n(e,o),a=s[0],l=s[1],c=s[2];return[Object.assign(i,a),r||l,c]}),[{},null,1]).slice(0,2)}}function Nt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],l=s[1],c=a.exec(e);if(c)return l(c)}return[null,null]}function Bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var i,r={};for(i=0;i<t.length;i++)r[t[i]]=ue(e[n+i]);return[r,null,n+i]}}var jt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Vt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,$t=RegExp(""+Vt.source+jt.source+"?"),Ut=RegExp("(?:T"+$t.source+")?"),qt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ht=/(\d{4})-?(\d{3})/,Wt=Bt("weekYear","weekNumber","weekDay"),Zt=Bt("year","ordinal"),Xt=/(\d{4})-(\d\d)-(\d\d)/,Yt=RegExp(Vt.source+" ?(?:"+jt.source+"|("+Ee.source+"))?"),Qt=RegExp("(?: "+Yt.source+")?");function Kt(e,t,n){var i=e[t];return X(i)?n:ue(i)}function Jt(e,t){var n={year:Kt(e,t),month:Kt(e,t+1,1),day:Kt(e,t+2,1)};return[n,null,t+3]}function en(e,t){var n={hours:Kt(e,t,0),minutes:Kt(e,t+1,0),seconds:Kt(e,t+2,0),milliseconds:he(e[t+3])};return[n,null,t+4]}function tn(e,t){var n=!e[t]&&!e[t+1],i=xe(e[t+1],e[t+2]),r=n?null:lt.instance(i);return[{},r,t+3]}function nn(e,t){var n=e[t]?st.create(e[t]):null;return[{},n,t+1]}var rn=RegExp("^T?"+Vt.source+"$"),on=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function sn(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u="-"===t[0],h=function(e){return e&&u?-e:e};return[{years:h(ue(n)),months:h(ue(i)),weeks:h(ue(r)),days:h(ue(o)),hours:h(ue(s)),minutes:h(ue(a)),seconds:h(ue(l)),milliseconds:h(he(c))}]}var an={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ln(e,t,n,i,r,o,s){var a={year:2===t.length?ve(ue(t)):ue(t),month:Ae.indexOf(n)+1,day:ue(i),hour:ue(r),minute:ue(o)};return s&&(a.second=ue(s)),e&&(a.weekday=e.length>3?Pe.indexOf(e)+1:De.indexOf(e)+1),a}var cn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function un(e){var t,n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],p=ln(n,o,r,i,s,a,l);return t=c?an[c]:u?0:xe(h,d),[p,new lt(t)]}function hn(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var dn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,pn=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,fn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function mn(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6],a=e[7],l=ln(t,r,i,n,o,s,a);return[l,lt.utcInstance]}function gn(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6],a=e[7],l=ln(t,a,n,i,r,o,s);return[l,lt.utcInstance]}var yn=Rt(qt,Ut),vn=Rt(Gt,Ut),_n=Rt(Ht,Ut),xn=Rt($t),bn=Ft(Jt,en,tn),wn=Ft(Wt,en,tn),Tn=Ft(Zt,en),Sn=Ft(en,tn);function En(e){return Nt(e,[yn,bn],[vn,wn],[_n,Tn],[xn,Sn])}function kn(e){return Nt(hn(e),[cn,un])}function Cn(e){return Nt(e,[dn,mn],[pn,mn],[fn,gn])}function An(e){return Nt(e,[on,sn])}var In=Ft(en);function Mn(e){return Nt(e,[rn,In])}var Pn=Rt(Xt,Qt),Dn=Rt(Yt),Ln=Ft(Jt,en,tn,nn),On=Ft(en,tn,nn);function zn(e){return Nt(e,[Pn,Ln],[Dn,On])}var Rn="Invalid Duration",Fn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Nn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Fn),Bn=365.2425,jn=30.436875,Vn=Object.assign({years:{quarters:4,months:12,weeks:Bn/7,days:Bn,hours:24*Bn,minutes:24*Bn*60,seconds:24*Bn*60*60,milliseconds:24*Bn*60*60*1e3},quarters:{months:3,weeks:Bn/28,days:Bn/4,hours:24*Bn/4,minutes:24*Bn*60/4,seconds:24*Bn*60*60/4,milliseconds:24*Bn*60*60*1e3/4},months:{weeks:jn/7,days:jn,hours:24*jn,minutes:24*jn*60,seconds:24*jn*60*60,milliseconds:24*jn*60*60*1e3}},Fn),$n=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Un=$n.slice(0).reverse();function qn(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Zn(i)}function Gn(e){return e<0?Math.floor(e):Math.ceil(e)}function Hn(e,t,n,i,r){var o=e[r][n],s=t[n]/o,a=Math.sign(s)===Math.sign(i[r]),l=!a&&0!==i[r]&&Math.abs(s)<=1?Gn(s):Math.trunc(s);i[r]+=l,t[n]-=l*o}function Wn(e,t){Un.reduce((function(n,i){return X(t[i])?n:(n&&Hn(e,t,n,t,i),i)}),null)}var Zn=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||zt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Vn:Nn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!==typeof t)throw new w("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:we(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:zt.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var i=An(t),r=i[0];if(r){var o=Object.assign(r,n);return e.fromObject(o)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var i=Mn(t),r=i[0];if(r){var o=Object.assign(r,n);return e.fromObject(o)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new w("need to specify a reason the Duration is invalid");var i=t instanceof Xe?t:new Xe(t,n);if(yt.throwOnInvalid)throw new _(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new b(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Ze.create(this.loc,n).formatDurationFromString(this,e):Rn},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=de(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=Xn(e),i={},r=m($n);!(t=r()).done;){var o=t.value;(se(n.values,o)||se(this.values,o))&&(i[o]=n.get(o)+this.get(o))}return qn(this,{values:i},!0)},t.minus=function(e){if(!this.isValid)return this;var t=Xn(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var r=i[n];t[r]=be(e(this.values[r],r))}return qn(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){if(!this.isValid)return this;var n=Object.assign(this.values,we(t,e.normalizeUnit,[]));return qn(this,{values:n})},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.conversionAccuracy,o=this.loc.clone({locale:n,numberingSystem:i}),s={loc:o};return r&&(s.conversionAccuracy=r),qn(this,s)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return Wn(this.matrix,e),qn(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));for(var r,o,s={},a={},l=this.toObject(),c=m($n);!(o=c()).done;){var u=o.value;if(n.indexOf(u)>=0){r=u;var h=0;for(var d in a)h+=this.matrix[d][u]*a[d],a[d]=0;Y(l[u])&&(h+=l[u]);var p=Math.trunc(h);for(var f in s[u]=p,a[u]=h-p,l)$n.indexOf(f)>$n.indexOf(u)&&Hn(this.matrix,l,f,s,u)}else Y(l[u])&&(a[u]=l[u])}for(var g in a)0!==a[g]&&(s[r]+=g===r?a[g]:a[g]/this.matrix[r][g]);return qn(this,{values:s},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return qn(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(var n,i=m($n);!(n=i()).done;){var r=n.value;if(!t(this.values[r],e.values[r]))return!1}return!0},r(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function Xn(e){if(Y(e))return Zn.fromMillis(e);if(Zn.isDuration(e))return e;if("object"===typeof e)return Zn.fromObject(e);throw new w("Unknown duration argument "+e+" of type "+typeof e)}var Yn="Invalid Interval";function Qn(e,t){return e&&e.isValid?t&&t.isValid?t<e?Kn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Kn.invalid("missing or invalid end"):Kn.invalid("missing or invalid start")}var Kn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new w("need to specify a reason the Interval is invalid");var i=t instanceof Xe?t:new Xe(t,n);if(yt.throwOnInvalid)throw new v(i);return new e({invalid:i})},e.fromDateTimes=function(t,n){var i=pr(t),r=pr(n),o=Qn(i,r);return null==o?new e({start:i,end:r}):o},e.after=function(t,n){var i=Xn(n),r=pr(t);return e.fromDateTimes(r,r.plus(i))},e.before=function(t,n){var i=Xn(n),r=pr(t);return e.fromDateTimes(r.minus(i),r)},e.fromISO=function(t,n){var i=(t||"").split("/",2),r=i[0],o=i[1];if(r&&o){var s,a,l,c;try{s=dr.fromISO(r,n),a=s.isValid}catch(o){a=!1}try{l=dr.fromISO(o,n),c=l.isValid}catch(o){c=!1}if(a&&c)return e.fromDateTimes(s,l);if(a){var u=Zn.fromISO(o,n);if(u.isValid)return e.after(s,u)}else if(c){var h=Zn.fromISO(r,n);if(h.isValid)return e.before(l,h)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,i=n.start,r=n.end;return this.isValid?e.fromDateTimes(i||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=i.map(pr).filter((function(e){return t.contains(e)})).sort(),s=[],a=this.s,l=0;while(a<this.e){var c=o[l]||this.e,u=+c>+this.e?this.e:c;s.push(e.fromDateTimes(a,u)),a=u,l+=1}return s},t.splitBy=function(t){var n=Xn(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];var i,r,o=this.s,s=[];while(o<this.e)i=o.plus(n),r=+i>+this.e?this.e:i,s.push(e.fromDateTimes(o,r)),o=r;return s},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e===+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e===+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>i?null:e.fromDateTimes(n,i)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},e.xor=function(t){for(var n,i,r=null,o=0,s=[],a=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),l=(n=Array.prototype).concat.apply(n,a),c=l.sort((function(e,t){return e.time-t.time})),u=m(c);!(i=u()).done;){var h=i.value;o+="s"===h.type?1:-1,1===o?r=h.time:(r&&+r!==+h.time&&s.push(e.fromDateTimes(r,h.time)),r=null)}return e.merge(s)},t.difference=function(){for(var t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.xor([this].concat(i)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":Yn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Yn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():Yn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):Yn},t.toFormat=function(e,t){var n=void 0===t?{}:t,i=n.separator,r=void 0===i?" – ":i;return this.isValid?""+this.s.toFormat(e)+r+this.e.toFormat(e):Yn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Zn.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},r(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),Jn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=yt.defaultZone);var t=dr.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return st.isValidSpecifier(e)&&st.isValidZone(e)},e.normalizeZone=function(e){return ut(e,yt.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.outputCalendar,l=void 0===a?"gregory":a;return zt.create(r,s,l).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.outputCalendar,l=void 0===a?"gregory":a;return zt.create(r,s,l).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o;return zt.create(r,s,null).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o;return zt.create(r,s,null).weekdays(e,!0)},e.meridiems=function(e){var t=void 0===e?{}:e,n=t.locale,i=void 0===n?null:n;return zt.create(i).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i;return zt.create(r,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(ee()){e=!0,t=te(),i=ne();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(r){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function ei(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=n(t)-n(e);return Math.floor(Zn.fromMillis(i).as("days"))}function ti(e,t,n){for(var i,r,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=ei(e,t);return(n-n%7)/7}],["days",ei]],s={},a=0,l=o;a<l.length;a++){var c=l[a],u=c[0],h=c[1];if(n.indexOf(u)>=0){var d;i=u;var p,f=h(e,t);if(r=e.plus((d={},d[u]=f,d)),r>t)e=e.plus((p={},p[u]=f-1,p)),f-=1;else e=r;s[u]=f}}return[e,s,r,i]}function ni(e,t,n,i){var r=ti(e,t,n),o=r[0],s=r[1],a=r[2],l=r[3],c=t-o,u=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===u.length){var h;if(a<t)a=o.plus((h={},h[l]=1,h));a!==o&&(s[l]=(s[l]||0)+c/(a-o))}var d,p=Zn.fromObject(Object.assign(s,i));return u.length>0?(d=Zn.fromMillis(c,i)).shiftTo.apply(d,u).plus(p):p}var ii={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[０-９]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ri={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},oi=ii.hanidec.replace(/[\[|\]]/g,"").split("");function si(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(ii.hanidec))t+=oi.indexOf(e[n]);else for(var r in ri){var o=ri[r],s=o[0],a=o[1];i>=s&&i<=a&&(t+=i-s)}}return parseInt(t,10)}return t}function ai(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+ii[n||"latn"]+t)}var li="missing Intl.DateTimeFormat.formatToParts support";function ci(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(si(n))}}}var ui=String.fromCharCode(160),hi="( |"+ui+")",di=new RegExp(hi,"g");function pi(e){return e.replace(/\./g,"\\.?").replace(di,hi)}function fi(e){return e.replace(/\./g,"").replace(di," ").toLowerCase()}function mi(e,t){return null===e?null:{regex:RegExp(e.map(pi).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return fi(i)===fi(e)}))+t}}}function gi(e,t){return{regex:e,deser:function(e){var t=e[1],n=e[2];return xe(t,n)},groups:t}}function yi(e){return{regex:e,deser:function(e){var t=e[0];return t}}}function vi(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function _i(e,t){var n=ai(t),i=ai(t,"{2}"),r=ai(t,"{3}"),o=ai(t,"{4}"),s=ai(t,"{6}"),a=ai(t,"{1,2}"),l=ai(t,"{1,3}"),c=ai(t,"{1,6}"),u=ai(t,"{1,9}"),h=ai(t,"{2,4}"),d=ai(t,"{4,6}"),p=function(e){return{regex:RegExp(vi(e.val)),deser:function(e){var t=e[0];return t},literal:!0}},f=function(f){if(e.literal)return p(f);switch(f.val){case"G":return mi(t.eras("short",!1),0);case"GG":return mi(t.eras("long",!1),0);case"y":return ci(c);case"yy":return ci(h,ve);case"yyyy":return ci(o);case"yyyyy":return ci(d);case"yyyyyy":return ci(s);case"M":return ci(a);case"MM":return ci(i);case"MMM":return mi(t.months("short",!0,!1),1);case"MMMM":return mi(t.months("long",!0,!1),1);case"L":return ci(a);case"LL":return ci(i);case"LLL":return mi(t.months("short",!1,!1),1);case"LLLL":return mi(t.months("long",!1,!1),1);case"d":return ci(a);case"dd":return ci(i);case"o":return ci(l);case"ooo":return ci(r);case"HH":return ci(i);case"H":return ci(a);case"hh":return ci(i);case"h":return ci(a);case"mm":return ci(i);case"m":return ci(a);case"q":return ci(a);case"qq":return ci(i);case"s":return ci(a);case"ss":return ci(i);case"S":return ci(l);case"SSS":return ci(r);case"u":return yi(u);case"a":return mi(t.meridiems(),0);case"kkkk":return ci(o);case"kk":return ci(h,ve);case"W":return ci(a);case"WW":return ci(i);case"E":case"c":return ci(n);case"EEE":return mi(t.weekdays("short",!1,!1),1);case"EEEE":return mi(t.weekdays("long",!1,!1),1);case"ccc":return mi(t.weekdays("short",!0,!1),1);case"cccc":return mi(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return gi(new RegExp("([+-]"+a.source+")(?::("+i.source+"))?"),2);case"ZZZ":return gi(new RegExp("([+-]"+a.source+")("+i.source+")?"),2);case"z":return yi(/[a-z_+-/]{1,256}?/i);default:return p(f)}},m=f(e)||{invalidReason:li};return m.token=e,m}var xi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function bi(e,t,n){var i=e.type,r=e.value;if("literal"===i)return{literal:!0,val:r};var o=n[i],s=xi[i];return"object"===typeof s&&(s=s[o]),s?{literal:!1,val:s}:void 0}function wi(e){var t=e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"");return["^"+t+"$",e]}function Ti(e,t,n){var i=e.match(t);if(i){var r={},o=1;for(var s in n)if(se(n,s)){var a=n[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(o,o+l))),o+=l}return[i,r]}return[i,{}]}function Si(e){var t,n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};t=X(e.Z)?X(e.z)?null:st.create(e.z):new lt(e.Z),X(e.q)||(e.M=3*(e.q-1)+1),X(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),X(e.u)||(e.S=he(e.u));var i=Object.keys(e).reduce((function(t,i){var r=n(i);return r&&(t[r]=e[i]),t}),{});return[i,t]}var Ei=null;function ki(){return Ei||(Ei=dr.fromMillis(1555555555555)),Ei}function Ci(e,t){if(e.literal)return e;var n=Ze.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Ze.create(t,n),r=i.formatDateTimeParts(ki()),o=r.map((function(e){return bi(e,t,n)}));return o.includes(void 0)?e:o}function Ai(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Ci(e,t)})))}function Ii(e,t,n){var i=Ai(Ze.parseFormat(n),e),r=i.map((function(t){return _i(t,e)})),o=r.find((function(e){return e.invalidReason}));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};var s=wi(r),a=s[0],l=s[1],c=RegExp(a,"i"),u=Ti(t,c,l),h=u[0],d=u[1],p=d?Si(d):[null,null],f=p[0],m=p[1];if(se(d,"a")&&se(d,"H"))throw new x("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:c,rawMatches:h,matches:d,result:f,zone:m}}function Mi(e,t,n){var i=Ii(e,t,n),r=i.result,o=i.zone,s=i.invalidReason;return[r,o,s]}var Pi=[0,31,59,90,120,151,181,212,243,273,304,334],Di=[0,31,60,91,121,152,182,213,244,274,305,335];function Li(e,t){return new Xe("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Oi(e,t,n){var i=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===i?7:i}function zi(e,t,n){return n+(pe(e)?Di:Pi)[t-1]}function Ri(e,t){var n=pe(e)?Di:Pi,i=n.findIndex((function(e){return e<t})),r=t-n[i];return{month:i+1,day:r}}function Fi(e){var t,n=e.year,i=e.month,r=e.day,o=zi(n,i,r),s=Oi(n,i,r),a=Math.floor((o-s+10)/7);return a<1?(t=n-1,a=ye(t)):a>ye(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:s},Se(e))}function Ni(e){var t,n=e.weekYear,i=e.weekNumber,r=e.weekday,o=Oi(n,1,4),s=fe(n),a=7*i+r-o-3;a<1?(t=n-1,a+=fe(t)):a>s?(t=n+1,a-=fe(n)):t=n;var l=Ri(t,a),c=l.month,u=l.day;return Object.assign({year:t,month:c,day:u},Se(e))}function Bi(e){var t=e.year,n=e.month,i=e.day,r=zi(t,n,i);return Object.assign({year:t,ordinal:r},Se(e))}function ji(e){var t=e.year,n=e.ordinal,i=Ri(t,n),r=i.month,o=i.day;return Object.assign({year:t,month:r,day:o},Se(e))}function Vi(e){var t=Q(e.weekYear),n=ae(e.weekNumber,1,ye(e.weekYear)),i=ae(e.weekday,1,7);return t?n?!i&&Li("weekday",e.weekday):Li("week",e.week):Li("weekYear",e.weekYear)}function $i(e){var t=Q(e.year),n=ae(e.ordinal,1,fe(e.year));return t?!n&&Li("ordinal",e.ordinal):Li("year",e.year)}function Ui(e){var t=Q(e.year),n=ae(e.month,1,12),i=ae(e.day,1,me(e.year,e.month));return t?n?!i&&Li("day",e.day):Li("month",e.month):Li("year",e.year)}function qi(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,o=ae(t,0,23)||24===t&&0===n&&0===i&&0===r,s=ae(n,0,59),a=ae(i,0,59),l=ae(r,0,999);return o?s?a?!l&&Li("millisecond",r):Li("second",i):Li("minute",n):Li("hour",t)}var Gi="Invalid DateTime",Hi=864e13;function Wi(e){return new Xe("unsupported zone",'the zone "'+e.name+'" is not supported')}function Zi(e){return null===e.weekData&&(e.weekData=Fi(e.c)),e.weekData}function Xi(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new dr(Object.assign({},n,t,{old:n}))}function Yi(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function Qi(e,t){e+=60*t*1e3;var n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Ki(e,t,n){return Yi(ge(e),t,n)}function Ji(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=Object.assign({},e.c,{year:i,month:r,day:Math.min(e.c.day,me(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=Zn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=ge(o),l=Yi(a,n,e.zone),c=l[0],u=l[1];return 0!==s&&(c+=s,u=e.zone.offset(c)),{ts:c,o:u}}function er(e,t,n,i,r){var o=n.setZone,s=n.zone;if(e&&0!==Object.keys(e).length){var a=t||s,l=dr.fromObject(Object.assign(e,n,{zone:a,setZone:void 0}));return o?l:l.setZone(s)}return dr.invalid(new Xe("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function tr(e,t,n){return void 0===n&&(n=!0),e.isValid?Ze.create(zt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function nr(e,t){var n=t.suppressSeconds,i=void 0!==n&&n,r=t.suppressMilliseconds,o=void 0!==r&&r,s=t.includeOffset,a=t.includePrefix,l=void 0!==a&&a,c=t.includeZone,u=void 0!==c&&c,h=t.spaceZone,d=void 0!==h&&h,p=t.format,f=void 0===p?"extended":p,m="basic"===f?"HHmm":"HH:mm";i&&0===e.second&&0===e.millisecond||(m+="basic"===f?"ss":":ss",o&&0===e.millisecond||(m+=".SSS")),(u||s)&&d&&(m+=" "),u?m+="z":s&&(m+="basic"===f?"ZZZ":"ZZ");var g=tr(e,m);return l&&(g="T"+g),g}var ir={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},or={ordinal:1,hour:0,minute:0,second:0,millisecond:0},sr=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lr=["year","ordinal","hour","minute","second","millisecond"];function cr(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new b(e);return t}function ur(e,t){for(var n,i=m(sr);!(n=i()).done;){var r=n.value;X(e[r])&&(e[r]=ir[r])}var o=Ui(e)||qi(e);if(o)return dr.invalid(o);var s=yt.now(),a=t.offset(s),l=Ki(e,a,t),c=l[0],u=l[1];return new dr({ts:c,zone:t,o:u})}function hr(e,t,n){var i=!!X(n.round)||n.round,r=function(e,r){e=de(e,i||n.calendary?0:2,!0);var o=t.loc.clone(n).relFormatter(n);return o.format(e,r)},o=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var s,a=m(n.units);!(s=a()).done;){var l=s.value,c=o(l);if(Math.abs(c)>=1)return r(c,l)}return r(0,n.units[n.units.length-1])}var dr=function(){function e(e){var t=e.zone||yt.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Xe("invalid input"):null)||(t.isValid?null:Wi(t));this.ts=X(e.ts)?yt.now():e.ts;var i=null,r=null;if(!n){var o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(t);if(o){var s=[e.old.c,e.old.o];i=s[0],r=s[1]}else{var a=t.offset(this.ts);i=Qi(this.ts,a),n=Number.isNaN(i.year)?new Xe("invalid input"):null,i=n?null:i,r=n?null:a}}this._zone=t,this.loc=e.loc||zt.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,i,r,o,s,a){return X(t)?new e({}):ur({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},yt.defaultZone)},e.utc=function(t,n,i,r,o,s,a){return X(t)?new e({ts:yt.now(),zone:lt.utcInstance}):ur({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},lt.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var i=J(t)?t.valueOf():NaN;if(Number.isNaN(i))return e.invalid("invalid input");var r=ut(n.zone,yt.defaultZone);return r.isValid?new e({ts:i,zone:r,loc:zt.fromObject(n)}):e.invalid(Wi(r))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),Y(t))return t<-Hi||t>Hi?e.invalid("Timestamp out of range"):new e({ts:t,zone:ut(n.zone,yt.defaultZone),loc:zt.fromObject(n)});throw new w("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),Y(t))return new e({ts:1e3*t,zone:ut(n.zone,yt.defaultZone),loc:zt.fromObject(n)});throw new w("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=ut(t.zone,yt.defaultZone);if(!n.isValid)return e.invalid(Wi(n));var i=yt.now(),r=n.offset(i),o=we(t,cr,["zone","locale","outputCalendar","numberingSystem"]),s=!X(o.ordinal),a=!X(o.year),l=!X(o.month)||!X(o.day),c=a||l,u=o.weekYear||o.weekNumber,h=zt.fromObject(t);if((c||s)&&u)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new x("Can't mix ordinal dates with month/day");var d,p,f=u||o.weekday&&!c,g=Qi(i,r);f?(d=ar,p=rr,g=Fi(g)):s?(d=lr,p=or,g=Bi(g)):(d=sr,p=ir);for(var y,v=!1,_=m(d);!(y=_()).done;){var b=y.value,w=o[b];X(w)?o[b]=v?p[b]:g[b]:v=!0}var T=f?Vi(o):s?$i(o):Ui(o),S=T||qi(o);if(S)return e.invalid(S);var E=f?Ni(o):s?ji(o):o,k=Ki(E,r,n),C=k[0],A=k[1],I=new e({ts:C,zone:n,o:A,loc:h});return o.weekday&&c&&t.weekday!==I.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+I.toISO()):I},e.fromISO=function(e,t){void 0===t&&(t={});var n=En(e),i=n[0],r=n[1];return er(i,r,t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=kn(e),i=n[0],r=n[1];return er(i,r,t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=Cn(e),i=n[0],r=n[1];return er(i,r,t,"HTTP",t)},e.fromFormat=function(t,n,i){if(void 0===i&&(i={}),X(t)||X(n))throw new w("fromFormat requires an input string and a format");var r=i,o=r.locale,s=void 0===o?null:o,a=r.numberingSystem,l=void 0===a?null:a,c=zt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),u=Mi(c,t,n),h=u[0],d=u[1],p=u[2];return p?e.invalid(p):er(h,d,i,"format "+n,t)},e.fromString=function(t,n,i){return void 0===i&&(i={}),e.fromFormat(t,n,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=zn(e),i=n[0],r=n[1];return er(i,r,t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new w("need to specify a reason the DateTime is invalid");var i=t instanceof Xe?t:new Xe(t,n);if(yt.throwOnInvalid)throw new y(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Ze.create(this.loc.clone(e),e).resolvedOptions(this),n=t.locale,i=t.numberingSystem,r=t.calendar;return{locale:n,numberingSystem:i,outputCalendar:r}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(lt.instance(e),t)},t.toLocal=function(){return this.setZone(yt.defaultZone)},t.setZone=function(t,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,s=i.keepCalendarTime,a=void 0!==s&&s;if(t=ut(t,yt.defaultZone),t.equals(this.zone))return this;if(t.isValid){var l=this.ts;if(o||a){var c=t.offset(this.ts),u=this.toObject(),h=Ki(u,c,t);l=h[0]}return Xi(this,{ts:l,zone:t})}return e.invalid(Wi(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar,o=this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r});return Xi(this,{loc:o})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=we(e,cr,[]),i=!X(n.weekYear)||!X(n.weekNumber)||!X(n.weekday);i?t=Ni(Object.assign(Fi(this.c),n)):X(n.ordinal)?(t=Object.assign(this.toObject(),n),X(n.day)&&(t.day=Math.min(me(t.year,t.month),t.day))):t=ji(Object.assign(Bi(this.c),n));var r=Ki(t,this.o,this.zone),o=r[0],s=r[1];return Xi(this,{ts:o,o:s})},t.plus=function(e){if(!this.isValid)return this;var t=Xn(e);return Xi(this,Ji(this,t))},t.minus=function(e){if(!this.isValid)return this;var t=Xn(e).negate();return Xi(this,Ji(this,t))},t.startOf=function(e){if(!this.isValid)return this;var t={},n=Zn.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if("weeks"===n&&(t.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Ze.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Gi},t.toLocaleString=function(e){return void 0===e&&(e=C),this.isValid?Ze.create(this.loc.clone(e),e).formatDateTime(this):Gi},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Ze.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=void 0===e?{}:e,n=t.format,i=void 0===n?"extended":n,r="basic"===i?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(r="+"+r),tr(this,r)},t.toISOWeekDate=function(){return tr(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.includeOffset,a=void 0===s||s,l=t.includePrefix,c=void 0!==l&&l,u=t.format,h=void 0===u?"extended":u;return nr(this,{suppressSeconds:o,suppressMilliseconds:i,includeOffset:a,includePrefix:c,format:h})},t.toRFC2822=function(){return tr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return tr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return tr(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone,o=void 0!==r&&r;return nr(this,{includeOffset:i,includeZone:o,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():Gi},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Zn.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),r=ie(t).map(Zn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,a=o?e:this,l=ni(s,a,r,i);return o?l.negate():l},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?Kn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;return hr(n,this.plus(i),Object.assign(t,{numeric:"always",units:["years","months","days","hours","minutes","seconds"]}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?hr(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new w("min requires all arguments be DateTimes");return re(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new w("max requires all arguments be DateTimes");return re(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var i=n,r=i.locale,o=void 0===r?null:r,s=i.numberingSystem,a=void 0===s?null:s,l=zt.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0});return Ii(l,e,t)},e.fromStringExplain=function(t,n,i){return void 0===i&&(i={}),e.fromFormatExplain(t,n,i)},r(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Zi(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Zi(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Zi(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Bi(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Jn.months("short",{locale:this.locale})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Jn.months("long",{locale:this.locale})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Jn.weekdays("short",{locale:this.locale})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Jn.weekdays("long",{locale:this.locale})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return pe(this.year)}},{key:"daysInMonth",get:function(){return me(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?fe(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ye(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return C}},{key:"DATE_MED",get:function(){return A}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return I}},{key:"DATE_FULL",get:function(){return M}},{key:"DATE_HUGE",get:function(){return P}},{key:"TIME_SIMPLE",get:function(){return D}},{key:"TIME_WITH_SECONDS",get:function(){return L}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return O}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return z}},{key:"TIME_24_SIMPLE",get:function(){return R}},{key:"TIME_24_WITH_SECONDS",get:function(){return F}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return B}},{key:"DATETIME_SHORT",get:function(){return j}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return $}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return U}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return q}},{key:"DATETIME_FULL",get:function(){return G}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return W}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return Z}}]),e}();function pr(e){if(dr.isDateTime(e))return e;if(e&&e.valueOf&&Y(e.valueOf()))return dr.fromJSDate(e);if(e&&"object"===typeof e)return dr.fromObject(e);throw new w("Unknown datetime argument: "+e+", of type "+typeof e)}var fr="1.26.0";t.DateTime=dr,t.Duration=Zn,t.FixedOffsetZone=lt,t.IANAZone=st,t.Info=Jn,t.Interval=Kn,t.InvalidZone=ct,t.LocalZone=Ke,t.Settings=yt,t.VERSION=fr,t.Zone=Ye},1495:function(e,t,n){var i=n("86cc"),r=n("cb7c"),o=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){r(e);var n,s=o(t),a=s.length,l=0;while(a>l)i.f(e,n=s[l++],t[n]);return e}},1654:function(e,t,n){"use strict";var i=n("71c1")(!0);n("30f1")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},1991:function(e,t,n){var i,r,o,s=n("9b43"),a=n("31f4"),l=n("fab2"),c=n("230e"),u=n("7726"),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,m=u.Dispatch,g=0,y={},v="onreadystatechange",_=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},x=function(e){_.call(e.data)};d&&p||(d=function(e){var t=[],n=1;while(arguments.length>n)t.push(arguments[n++]);return y[++g]=function(){a("function"==typeof e?e:Function(e),t)},i(g),g},p=function(e){delete y[e]},"process"==n("2d95")(h)?i=function(e){h.nextTick(s(_,e,1))}:m&&m.now?i=function(e){m.now(s(_,e,1))}:f?(r=new f,o=r.port2,r.port1.onmessage=x,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",x,!1)):i=v in c("script")?function(e){l.appendChild(c("script"))[v]=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(s(_,e,1),0)}),e.exports={set:d,clear:p}},"1af6":function(e,t,n){var i=n("63b6");i(i.S,"Array",{isArray:n("9003")})},"1bc3":function(e,t,n){var i=n("f772");e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"1c4c":function(e,t,n){"use strict";var i=n("9b43"),r=n("5ca1"),o=n("4bf8"),s=n("1fa8"),a=n("33a4"),l=n("9def"),c=n("f1ae"),u=n("27ee");r(r.S+r.F*!n("5cc5")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,h,d=o(e),p="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,y=0,v=u(d);if(g&&(m=i(m,f>2?arguments[2]:void 0,2)),void 0==v||p==Array&&a(v))for(t=l(d.length),n=new p(t);t>y;y++)c(n,y,g?m(d[y],y):d[y]);else for(h=v.call(d),n=new p;!(r=h.next()).done;y++)c(n,y,g?s(h,m,[r.value,y],!0):r.value);return n.length=y,n}})},"1d2b":function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},"1ec9":function(e,t,n){var i=n("f772"),r=n("e53d").document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},"1f2e":function(e,t,n){var i,r;
/*!
 * Outlayer v2.1.1
 * the brains and guts of a layout library
 * MIT license
 */(function(o,s){"use strict";i=[n("0949"),n("40ad"),n("6158"),n("28ad")],r=function(e,t,n,i){return s(o,e,t,n,i)}.apply(t,i),void 0===r||(e.exports=r)})(window,(function(e,t,n,i,r){"use strict";var o=e.console,s=e.jQuery,a=function(){},l=0,c={};function u(e,t){var n=i.getQueryElement(e);if(n){this.element=n,s&&(this.$element=s(this.element)),this.options=i.extend({},this.constructor.defaults),this.option(t);var r=++l;this.element.outlayerGUID=r,c[r]=this,this._create();var a=this._getOption("initLayout");a&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=r,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var h=u.prototype;function d(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}i.extend(h,t.prototype),h.option=function(e){i.extend(this.options,e)},h._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},h._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),i.extend(this.element.style,this.options.containerStyle);var e=this._getOption("resize");e&&this.bindResize()},h.reloadItems=function(){this.items=this._itemize(this.element.children)},h._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,i=[],r=0;r<t.length;r++){var o=t[r],s=new n(o,this);i.push(s)}return i},h._filterFindItemElements=function(e){return i.filterFindElements(e,this.options.itemSelector)},h.getItemElements=function(){return this.items.map((function(e){return e.element}))},h.layout=function(){this._resetLayout(),this._manageStamps();var e=this._getOption("layoutInstant"),t=void 0!==e?e:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},h._init=h.layout,h._resetLayout=function(){this.getSize()},h.getSize=function(){this.size=n(this.element)},h._getMeasurement=function(e,t){var i,r=this.options[e];r?("string"==typeof r?i=this.element.querySelector(r):r instanceof HTMLElement&&(i=r),this[e]=i?n(i)[t]:r):this[e]=0},h.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},h._getItemsForLayout=function(e){return e.filter((function(e){return!e.isIgnored}))},h._layoutItems=function(e,t){if(this._emitCompleteOnItems("layout",e),e&&e.length){var n=[];e.forEach((function(e){var i=this._getItemLayoutPosition(e);i.item=e,i.isInstant=t||e.isLayoutInstant,n.push(i)}),this),this._processLayoutQueue(n)}},h._getItemLayoutPosition=function(){return{x:0,y:0}},h._processLayoutQueue=function(e){this.updateStagger(),e.forEach((function(e,t){this._positionItem(e.item,e.x,e.y,e.isInstant,t)}),this)},h.updateStagger=function(){var e=this.options.stagger;if(null!==e&&void 0!==e)return this.stagger=f(e),this.stagger;this.stagger=0},h._positionItem=function(e,t,n,i,r){i?e.goTo(t,n):(e.stagger(r*this.stagger),e.moveTo(t,n))},h._postLayout=function(){this.resizeContainer()},h.resizeContainer=function(){var e=this._getOption("resizeContainer");if(e){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},h._getContainerSize=a,h._setContainerMeasure=function(e,t){if(void 0!==e){var n=this.size;n.isBorderBox&&(e+=t?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),e=Math.max(e,0),this.element.style[t?"width":"height"]=e+"px"}},h._emitCompleteOnItems=function(e,t){var n=this;function i(){n.dispatchEvent(e+"Complete",null,[t])}var r=t.length;if(t&&r){var o=0;t.forEach((function(t){t.once(e,s)}))}else i();function s(){o++,o==r&&i()}},h.dispatchEvent=function(e,t,n){var i=t?[t].concat(n):n;if(this.emitEvent(e,i),s)if(this.$element=this.$element||s(this.element),t){var r=s.Event(t);r.type=e,this.$element.trigger(r,n)}else this.$element.trigger(e,n)},h.ignore=function(e){var t=this.getItem(e);t&&(t.isIgnored=!0)},h.unignore=function(e){var t=this.getItem(e);t&&delete t.isIgnored},h.stamp=function(e){e=this._find(e),e&&(this.stamps=this.stamps.concat(e),e.forEach(this.ignore,this))},h.unstamp=function(e){e=this._find(e),e&&e.forEach((function(e){i.removeFrom(this.stamps,e),this.unignore(e)}),this)},h._find=function(e){if(e)return"string"==typeof e&&(e=this.element.querySelectorAll(e)),e=i.makeArray(e),e},h._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},h._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},h._manageStamp=a,h._getElementOffset=function(e){var t=e.getBoundingClientRect(),i=this._boundingRect,r=n(e),o={left:t.left-i.left-r.marginLeft,top:t.top-i.top-r.marginTop,right:i.right-t.right-r.marginRight,bottom:i.bottom-t.bottom-r.marginBottom};return o},h.handleEvent=i.handleEvent,h.bindResize=function(){e.addEventListener("resize",this),this.isResizeBound=!0},h.unbindResize=function(){e.removeEventListener("resize",this),this.isResizeBound=!1},h.onresize=function(){this.resize()},i.debounceMethod(u,"onresize",100),h.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},h.needsResizeLayout=function(){var e=n(this.element),t=this.size&&e;return t&&e.innerWidth!==this.size.innerWidth},h.addItems=function(e){var t=this._itemize(e);return t.length&&(this.items=this.items.concat(t)),t},h.appended=function(e){var t=this.addItems(e);t.length&&(this.layoutItems(t,!0),this.reveal(t))},h.prepended=function(e){var t=this._itemize(e);if(t.length){var n=this.items.slice(0);this.items=t.concat(n),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(n)}},h.reveal=function(e){if(this._emitCompleteOnItems("reveal",e),e&&e.length){var t=this.updateStagger();e.forEach((function(e,n){e.stagger(n*t),e.reveal()}))}},h.hide=function(e){if(this._emitCompleteOnItems("hide",e),e&&e.length){var t=this.updateStagger();e.forEach((function(e,n){e.stagger(n*t),e.hide()}))}},h.revealItemElements=function(e){var t=this.getItems(e);this.reveal(t)},h.hideItemElements=function(e){var t=this.getItems(e);this.hide(t)},h.getItem=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];if(n.element==e)return n}},h.getItems=function(e){e=i.makeArray(e);var t=[];return e.forEach((function(e){var n=this.getItem(e);n&&t.push(n)}),this),t},h.remove=function(e){var t=this.getItems(e);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach((function(e){e.remove(),i.removeFrom(this.items,e)}),this)},h.destroy=function(){var e=this.element.style;e.height="",e.position="",e.width="",this.items.forEach((function(e){e.destroy()})),this.unbindResize();var t=this.element.outlayerGUID;delete c[t],delete this.element.outlayerGUID,s&&s.removeData(this.element,this.constructor.namespace)},u.data=function(e){e=i.getQueryElement(e);var t=e&&e.outlayerGUID;return t&&c[t]},u.create=function(e,t){var n=d(u);return n.defaults=i.extend({},u.defaults),i.extend(n.defaults,t),n.compatOptions=i.extend({},u.compatOptions),n.namespace=e,n.data=u.data,n.Item=d(r),i.htmlInit(n,e),s&&s.bridget&&s.bridget(e,n),n};var p={ms:1,s:1e3};function f(e){if("number"==typeof e)return e;var t=e.match(/(^\d*\.?\d*)(\w*)/),n=t&&t[1],i=t&&t[2];if(!n.length)return 0;n=parseFloat(n);var r=p[i]||1;return n*r}return u.Item=r,u}))},"1fa8":function(e,t,n){var i=n("cb7c");e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(s){var o=e["return"];throw void 0!==o&&i(o.call(e)),s}}},"20fd":function(e,t,n){"use strict";var i=n("d9f6"),r=n("aebd");e.exports=function(e,t,n){t in e?i.f(e,t,r(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var i=n("2aba"),r=n("32e9"),o=n("79e5"),s=n("be13"),a=n("2b4c"),l=n("520a"),c=a("species"),u=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),h=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=a(e),p=!o((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),f=p?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](""),!t})):void 0;if(!p||!f||"replace"===e&&!u||"split"===e&&!h){var m=/./[d],g=n(s,d,""[e],(function(e,t,n,i,r){return t.exec===l?p&&!r?{done:!0,value:m.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}})),y=g[0],v=g[1];i(String.prototype,e,y),r(RegExp.prototype,d,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}}},"230e":function(e,t,n){var i=n("d3f4"),r=n("7726").document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},"23c6":function(e,t,n){var i=n("2d95"),r=n("2b4c")("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),r))?n:o?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},"241e":function(e,t,n){var i=n("25eb");e.exports=function(e){return Object(i(e))}},2444:function(e,t,n){"use strict";(function(t){var i=n("c532"),r=n("c8af"),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function a(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n("b50d")),e}var l={adapter:a(),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(o)})),e.exports=l}).call(this,n("f28c"))},"24c5":function(e,t,n){"use strict";var i,r,o,s,a=n("b8e3"),l=n("e53d"),c=n("d864"),u=n("40c3"),h=n("63b6"),d=n("f772"),p=n("79aa"),f=n("1173"),m=n("a22a"),g=n("f201"),y=n("4178").set,v=n("aba2")(),_=n("656e"),x=n("4439"),b=n("bc13"),w=n("cd78"),T="Promise",S=l.TypeError,E=l.process,k=E&&E.versions,C=k&&k.v8||"",A=l[T],I="process"==u(E),M=function(){},P=r=_.f,D=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n("5168")("species")]=function(e){e(M,M)};return(I||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==C.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(i){}}(),L=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){var i=e._v,r=1==e._s,o=0,s=function(t){var n,o,s,a=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{a?(r||(2==e._h&&F(e),e._h=1),!0===a?n=i:(u&&u.enter(),n=a(i),u&&(u.exit(),s=!0)),n===t.promise?c(S("Promise-chain cycle")):(o=L(n))?o.call(n,l,c):l(n)):c(i)}catch(h){u&&!s&&u.exit(),c(h)}};while(n.length>o)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&z(e)}))}},z=function(e){y.call(l,(function(){var t,n,i,r=e._v,o=R(e);if(o&&(t=x((function(){I?E.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),e._h=I||R(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(l,(function(){var t;I?E.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=L(e))?v((function(){var i={_w:n,_d:!1};try{t.call(e,c(B,i,1),c(N,i,1))}catch(r){N.call(i,r)}})):(n._v=e,n._s=1,O(n,!1))}catch(i){N.call({_w:n,_d:!1},i)}}};D||(A=function(e){f(this,A,T,"_h"),p(e),i.call(this);try{e(c(B,this,1),c(N,this,1))}catch(t){N.call(this,t)}},i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n("5c95")(A.prototype,{then:function(e,t){var n=P(g(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=I?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i;this.promise=e,this.resolve=c(B,e,1),this.reject=c(N,e,1)},_.f=P=function(e){return e===A||e===s?new o(e):r(e)}),h(h.G+h.W+h.F*!D,{Promise:A}),n("45f2")(A,T),n("4c95")(T),s=n("584a")[T],h(h.S+h.F*!D,T,{reject:function(e){var t=P(this),n=t.reject;return n(e),t.promise}}),h(h.S+h.F*(a||!D),T,{resolve:function(e){return w(a&&this===s?A:this,e)}}),h(h.S+h.F*!(D&&n("4ee1")((function(e){A.all(e)["catch"](M)}))),T,{all:function(e){var t=this,n=P(t),i=n.resolve,r=n.reject,o=x((function(){var n=[],o=0,s=1;m(e,!1,(function(e){var a=o++,l=!1;n.push(void 0),s++,t.resolve(e).then((function(e){l||(l=!0,n[a]=e,--s||i(n))}),r)})),--s||i(n)}));return o.e&&r(o.v),n.promise},race:function(e){var t=this,n=P(t),i=n.reject,r=x((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},"25eb":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},2621:function(e,t){t.f=Object.getOwnPropertySymbols},"27d6":function(e,t,n){var i;(function(){function r(e,t,n){return e.call.apply(e.bind,arguments)}function o(e,t,n){if(!e)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function s(e,t,n){return s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?r:o,s.apply(null,arguments)}var a=Date.now||function(){return+new Date};function l(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var c=!!window.FontFace;function u(e,t,n,i){if(t=e.c.createElement(t),n)for(var r in n)n.hasOwnProperty(r)&&("style"==r?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i&&t.appendChild(e.c.createTextNode(i)),t}function h(e,t,n){e=e.c.getElementsByTagName(t)[0],e||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function d(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t,n){t=t||[],n=n||[];for(var i=e.className.split(/\s+/),r=0;r<t.length;r+=1){for(var o=!1,s=0;s<i.length;s+=1)if(t[r]===i[s]){o=!0;break}o||i.push(t[r])}for(t=[],r=0;r<i.length;r+=1){for(o=!1,s=0;s<n.length;s+=1)if(i[r]===n[s]){o=!0;break}o||t.push(i[r])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function f(e,t){for(var n=e.className.split(/\s+/),i=0,r=n.length;i<r;i++)if(n[i]==t)return!0;return!1}function m(e){return e.o.location.hostname||e.a.location.hostname}function g(e,t,n){function i(){a&&r&&o&&(a(s),a=null)}t=u(e,"link",{rel:"stylesheet",href:t,media:"all"});var r=!1,o=!0,s=null,a=n||null;c?(t.onload=function(){r=!0,i()},t.onerror=function(){r=!0,s=Error("Stylesheet failed to load"),i()}):setTimeout((function(){r=!0,i()}),0),h(e,"head",t)}function y(e,t,n,i){var r=e.c.getElementsByTagName("head")[0];if(r){var o=u(e,"script",{src:t}),s=!1;return o.onload=o.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&r.removeChild(o))},r.appendChild(o),setTimeout((function(){s||(s=!0,n&&n(Error("Script load timeout")))}),i||5e3),o}return null}function v(){this.a=0,this.c=null}function _(e){return e.a++,function(){e.a--,b(e)}}function x(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function w(e){this.a=e||"-"}function T(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function S(e){return C(e)+" "+e.f+"00 300px "+E(e.c)}function E(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var i=e[n].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?t.push("'"+i+"'"):t.push(i)}return t.join(",")}function k(e){return e.a+e.f}function C(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function A(e){var t=4,n="n",i=null;return e&&((i=e.match(/(normal|oblique|italic)/i))&&i[1]&&(n=i[1].substr(0,1).toLowerCase()),(i=e.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?t=7:/[1-9]00/.test(i[1])&&(t=parseInt(i[1].substr(0,1),10)))),n+t}function I(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new w("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function M(e){e.g&&p(e.f,[e.a.c("wf","loading")]),D(e,"loading")}function P(e){if(e.g){var t=f(e.f,e.a.c("wf","active")),n=[],i=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),p(e.f,n,i)}D(e,"inactive")}function D(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,k(n)):e.h[t]())}function L(){this.c={}}function O(e,t,n){var i,r=[];for(i in t)if(t.hasOwnProperty(i)){var o=e.c[i];o&&r.push(o(t[i],n))}return r}function z(e,t){this.c=e,this.f=t,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function R(e){h(e.c,"body",e.a)}function F(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+E(e.c)+";font-style:"+C(e)+";font-weight:"+e.f+"00;"}function N(e,t,n,i,r,o){this.g=e,this.j=t,this.a=i,this.c=n,this.f=r||3e3,this.h=o||void 0}function B(e,t,n,i,r,o,s){this.v=e,this.B=t,this.c=n,this.a=i,this.s=s||"BESbswy",this.f={},this.w=r||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new z(this.c,this.s),this.h=new z(this.c,this.s),this.j=new z(this.c,this.s),this.m=new z(this.c,this.s),e=new T(this.a.c+",serif",k(this.a)),e=F(e),this.g.a.style.cssText=e,e=new T(this.a.c+",sans-serif",k(this.a)),e=F(e),this.h.a.style.cssText=e,e=new T("serif",k(this.a)),e=F(e),this.j.a.style.cssText=e,e=new T("sans-serif",k(this.a)),e=F(e),this.m.a.style.cssText=e,R(this.g),R(this.h),R(this.j),R(this.m)}w.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},N.prototype.start=function(){var e=this.c.o.document,t=this,n=a(),i=new Promise((function(i,r){function o(){a()-n>=t.f?r():e.fonts.load(S(t.a),t.h).then((function(e){1<=e.length?i():setTimeout(o,25)}),(function(){r()}))}o()})),r=null,o=new Promise((function(e,n){r=setTimeout(n,t.f)}));Promise.race([o,i]).then((function(){r&&(clearTimeout(r),r=null),t.g(t.a)}),(function(){t.j(t.a)}))};var j={D:"serif",C:"sans-serif"},V=null;function $(){if(null===V){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);V=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return V}function U(e,t,n){for(var i in j)if(j.hasOwnProperty(i)&&t===e.f[j[i]]&&n===e.f[j[i]])return!0;return!1}function q(e){var t,n=e.g.a.offsetWidth,i=e.h.a.offsetWidth;(t=n===e.f.serif&&i===e.f["sans-serif"])||(t=$()&&U(e,n,i)),t?a()-e.A>=e.w?$()&&U(e,n,i)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?H(e,e.v):H(e,e.B):G(e):H(e,e.v)}function G(e){setTimeout(s((function(){q(this)}),e),50)}function H(e,t){setTimeout(s((function(){d(this.g.a),d(this.h.a),d(this.j.a),d(this.m.a),t(this.a)}),e),0)}function W(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),q(this)};var Z=null;function X(e){0==--e.f&&e.j&&(e.m?(e=e.a,e.g&&p(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),D(e,"active")):P(e.a))}function Y(e){this.j=e,this.a=new L,this.h=0,this.f=this.g=!0}function Q(e,t,n,i,r){var o=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=r||null,a=i||{};if(0===n.length&&o)P(t.a);else{t.f+=n.length,o&&(t.j=o);var l,c=[];for(l=0;l<n.length;l++){var u=n[l],h=a[u.c],d=t.a,f=u;if(d.g&&p(d.f,[d.a.c("wf",f.c,k(f).toString(),"loading")]),D(d,"fontloading",f),d=null,null===Z)if(window.FontFace){f=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);Z=f?42<parseInt(f[1],10):!m}else Z=!1;d=Z?new N(s(t.g,t),s(t.h,t),t.c,u,t.s,h):new B(s(t.g,t),s(t.h,t),t.c,u,t.s,e,h),c.push(d)}for(l=0;l<c.length;l++)c[l].start()}}),0)}function K(e,t,n){var i=[],r=n.timeout;M(t);i=O(e.a,n,e.c);var o=new W(e.c,t,r);for(e.h=i.length,t=0,n=i.length;t<n;t++)i[t].load((function(t,n,i){Q(e,o,t,n,i)}))}function J(e,t){this.c=e,this.a=t}function ee(e,t){this.c=e,this.a=t}function te(e,t){this.c=e||ne,this.a=[],this.f=[],this.g=t||""}W.prototype.g=function(e){var t=this.a;t.g&&p(t.f,[t.a.c("wf",e.c,k(e).toString(),"active")],[t.a.c("wf",e.c,k(e).toString(),"loading"),t.a.c("wf",e.c,k(e).toString(),"inactive")]),D(t,"fontactive",e),this.m=!0,X(this)},W.prototype.h=function(e){var t=this.a;if(t.g){var n=f(t.f,t.a.c("wf",e.c,k(e).toString(),"active")),i=[],r=[t.a.c("wf",e.c,k(e).toString(),"loading")];n||i.push(t.a.c("wf",e.c,k(e).toString(),"inactive")),p(t.f,i,r)}D(t,"fontinactive",e),X(this)},Y.prototype.load=function(e){this.c=new l(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,K(this,new I(this.c,e),e)},J.prototype.load=function(e){function t(){if(o["__mti_fntLst"+i]){var n,r=o["__mti_fntLst"+i](),s=[];if(r)for(var a=0;a<r.length;a++){var l=r[a].fontfamily;void 0!=r[a].fontStyle&&void 0!=r[a].fontWeight?(n=r[a].fontStyle+r[a].fontWeight,s.push(new T(l,n))):s.push(new T(l))}e(s)}else setTimeout((function(){t()}),50)}var n=this,i=n.a.projectId,r=n.a.version;if(i){var o=n.c.o;y(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+i+".js"+(r?"?v="+r:""),(function(r){r?e([]):(o["__MonotypeConfiguration__"+i]=function(){return n.a},t())})).id="__MonotypeAPIScript__"+i}else e([])},ee.prototype.load=function(e){var t,n,i=this.a.urls||[],r=this.a.families||[],o=this.a.testStrings||{},s=new v;for(t=0,n=i.length;t<n;t++)g(this.c,i[t],_(s));var a=[];for(t=0,n=r.length;t<n;t++)if(i=r[t].split(":"),i[1])for(var l=i[1].split(","),c=0;c<l.length;c+=1)a.push(new T(i[0],l[c]));else a.push(new T(i[0]));x(s,(function(){e(a,o)}))};var ne="https://fonts.googleapis.com/css";function ie(e,t){for(var n=t.length,i=0;i<n;i++){var r=t[i].split(":");3==r.length&&e.f.push(r.pop());var o="";2==r.length&&""!=r[1]&&(o=":"),e.a.push(r.join(o))}}function re(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],i=0;i<t;i++)n.push(e.a[i].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}function oe(e){this.f=e,this.a=[],this.c={}}var se={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},ae={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},le={i:"i",italic:"i",n:"n",normal:"n"},ce=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function ue(e){for(var t=e.f.length,n=0;n<t;n++){var i=e.f[n].split(":"),r=i[0].replace(/\+/g," "),o=["n4"];if(2<=i.length){var s,a=i[1];if(s=[],a){a=a.split(",");for(var l=a.length,c=0;c<l;c++){var u;if(u=a[c],u.match(/^[\w-]+$/)){var h=ce.exec(u.toLowerCase());if(null==h)u="";else{if(u=h[2],u=null==u||""==u?"n":le[u],h=h[1],null==h||""==h)h="4";else{var d=ae[h];h=d||(isNaN(h)?"4":h.substr(0,1))}u=[u,h].join("")}}else u="";u&&s.push(u)}}0<s.length&&(o=s),3==i.length&&(i=i[2],s=[],i=i?i.split(","):s,0<i.length&&(i=se[i[0]])&&(e.c[r]=i))}for(e.c[r]||(i=se[r])&&(e.c[r]=i),i=0;i<o.length;i+=1)e.a.push(new T(r,o[i]))}}function he(e,t){this.c=e,this.a=t}var de={Arimo:!0,Cousine:!0,Tinos:!0};function pe(e,t){this.c=e,this.a=t}function fe(e,t){this.c=e,this.f=t,this.a=[]}he.prototype.load=function(e){var t=new v,n=this.c,i=new te(this.a.api,this.a.text),r=this.a.families;ie(i,r);var o=new oe(r);ue(o),g(n,re(i),_(t)),x(t,(function(){e(o.a,o.c,de)}))},pe.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?y(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var i=[],r=0;r<t.length;r+=2)for(var o=t[r],s=t[r+1],a=0;a<s.length;a++)i.push(new T(o,s[a]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(l){}e(i)}}),2e3):e([])},fe.prototype.load=function(e){var t=this.f.id,n=this.c.o,i=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var r=0,o=n.fonts.length;r<o;++r){var s=n.fonts[r];i.a.push(new T(s.name,A("font-weight:"+s.weight+";font-style:"+s.style)))}e(i.a)},y(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+m(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var me=new Y(window);me.a.c.custom=function(e,t){return new ee(t,e)},me.a.c.fontdeck=function(e,t){return new fe(t,e)},me.a.c.monotype=function(e,t){return new J(t,e)},me.a.c.typekit=function(e,t){return new pe(t,e)},me.a.c.google=function(e,t){return new he(t,e)};var ge={load:s(me.load,me)};i=function(){return ge}.call(t,n,t,e),void 0===i||(e.exports=i)})()},"27ee":function(e,t,n){var i=n("23c6"),r=n("2b4c")("iterator"),o=n("84f2");e.exports=n("8378").getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||o[i(e)]}},2877:function(e,t,n){"use strict";function i(e,t,n,i,r,o,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}n.d(t,"a",(function(){return i}))},"28a5":function(e,t,n){"use strict";var i=n("aae3"),r=n("cb7c"),o=n("ebd6"),s=n("0390"),a=n("9def"),l=n("5f1b"),c=n("520a"),u=n("79e5"),h=Math.min,d=[].push,p="split",f="length",m="lastIndex",g=4294967295,y=!u((function(){RegExp(g,"y")}));n("214f")("split",2,(function(e,t,n,u){var v;return v="c"=="abbc"[p](/(b)*/)[1]||4!="test"[p](/(?:)/,-1)[f]||2!="ab"[p](/(?:ab)*/)[f]||4!="."[p](/(.?)(.?)/)[f]||"."[p](/()()/)[f]>1||""[p](/.?/)[f]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!i(e))return n.call(r,e,t);var o,s,a,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,p=void 0===t?g:t>>>0,y=new RegExp(e.source,u+"g");while(o=c.call(y,r)){if(s=y[m],s>h&&(l.push(r.slice(h,o.index)),o[f]>1&&o.index<r[f]&&d.apply(l,o.slice(1)),a=o[0][f],h=s,l[f]>=p))break;y[m]===o.index&&y[m]++}return h===r[f]?!a&&y.test("")||l.push(""):l.push(r.slice(h)),l[f]>p?l.slice(0,p):l}:"0"[p](void 0,0)[f]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,i){var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r,i):v.call(String(r),n,i)},function(e,t){var i=u(v,e,this,t,v!==n);if(i.done)return i.value;var c=r(e),d=String(this),p=o(c,RegExp),f=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(y?"y":"g"),_=new p(y?c:"^(?:"+c.source+")",m),x=void 0===t?g:t>>>0;if(0===x)return[];if(0===d.length)return null===l(_,d)?[d]:[];var b=0,w=0,T=[];while(w<d.length){_.lastIndex=y?w:0;var S,E=l(_,y?d:d.slice(w));if(null===E||(S=h(a(_.lastIndex+(y?0:w)),d.length))===b)w=s(d,w,f);else{if(T.push(d.slice(b,w)),T.length===x)return T;for(var k=1;k<=E.length-1;k++)if(T.push(E[k]),T.length===x)return T;w=b=S}}return T.push(d.slice(b)),T}]}))},"28ad":function(e,t,n){var i,r,o;(function(s,a){r=[n("0949"),n("40ad")],i=a,o="function"===typeof i?i.apply(t,r):i,void 0===o||(e.exports=o)})(window,(function(e,t){"use strict";function n(e){for(var t in e)return!1;return null,!0}var i=document.documentElement.style,r="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:o,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function l(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var c=l.prototype=Object.create(e.prototype);function u(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}c.constructor=l,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.getSize=function(){this.size=t(this.element)},c.css=function(e){var t=this.element.style;for(var n in e){var i=a[n]||n;t[i]=e[n]}},c.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),i=e[t?"left":"right"],r=e[n?"top":"bottom"],o=parseFloat(i),s=parseFloat(r),a=this.layout.size;-1!=i.indexOf("%")&&(o=o/100*a.width),-1!=r.indexOf("%")&&(s=s/100*a.height),o=isNaN(o)?0:o,s=isNaN(s)?0:s,o-=t?a.paddingLeft:a.paddingRight,s-=n?a.paddingTop:a.paddingBottom,this.position.x=o,this.position.y=s},c.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),r=n?"paddingLeft":"paddingRight",o=n?"left":"right",s=n?"right":"left",a=this.position.x+e[r];t[o]=this.getXValue(a),t[s]="";var l=i?"paddingTop":"paddingBottom",c=i?"top":"bottom",u=i?"bottom":"top",h=this.position.y+e[l];t[c]=this.getYValue(h),t[u]="",this.css(t),this.emitEvent("layout",[this])},c.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},c.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},c._transitionTo=function(e,t){this.getPosition();var n=this.position.x,i=this.position.y,r=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!r||this.isTransitioning){var o=e-n,s=t-i,a={};a.transform=this.getTranslate(o,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},c.getTranslate=function(e,t){var n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop");return e=n?e:-e,t=i?t:-t,"translate3d("+e+"px, "+t+"px, 0)"},c.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},c._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},c.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);if(e.from){this.css(e.from);this.element.offsetHeight;null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var h="opacity,"+u(o);c.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:h,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1)}},c.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},c.onotransitionend=function(e){this.ontransitionend(e)};var d={"-webkit-transform":"transform"};c.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,i=d[e.propertyName]||e.propertyName;if(delete t.ingProperties[i],n(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[i]),i in t.onEnd){var r=t.onEnd[i];r.call(this),delete t.onEnd[i]}this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},c._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var p={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(p)},c.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={},n=this.getHideRevealTransitionEndProperty("visibleStyle");t[n]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},c.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={},n=this.getHideRevealTransitionEndProperty("hiddenStyle");t[n]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},l}))},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"2aba":function(e,t,n){var i=n("7726"),r=n("32e9"),o=n("69a8"),s=n("ca5a")("src"),a=n("fa5b"),l="toString",c=(""+a).split(l);n("8378").inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var l="function"==typeof n;l&&(o(n,"name")||r(n,"name",t)),e[t]!==n&&(l&&(o(n,s)||r(n,s,e[t]?""+e[t]:c.join(String(t)))),e===i?e[t]=n:a?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[s]||a.call(this)}))},"2aeb":function(e,t,n){var i=n("cb7c"),r=n("1495"),o=n("e11e"),s=n("613b")("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n("230e")("iframe"),i=o.length,r="<",s=">";t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+s+"document.F=Object"+r+"/script"+s),e.close(),c=e.F;while(i--)delete c[l][o[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=i(e),n=new a,a[l]=null,n[s]=e):n=c(),void 0===t?n:r(n,t)}},"2b4c":function(e,t,n){var i=n("5537")("wks"),r=n("ca5a"),o=n("7726").Symbol,s="function"==typeof o,a=e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:r)("Symbol."+e))};a.store=i},"2d00":function(e,t){e.exports=!1},"2d83":function(e,t,n){"use strict";var i=n("387f");e.exports=function(e,t,n,r,o){var s=new Error(e);return i(s,t,n,r,o)}},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2e08":function(e,t,n){var i=n("9def"),r=n("9744"),o=n("be13");e.exports=function(e,t,n,s){var a=String(o(e)),l=a.length,c=void 0===n?" ":String(n),u=i(t);if(u<=l||""==c)return a;var h=u-l,d=r.call(c,Math.ceil(h/c.length));return d.length>h&&(d=d.slice(0,h)),s?d+a:a+d}},"2e67":function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"2f21":function(e,t,n){var i,r;
/**
 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
 * Copyright (C) 2020 Oliver Nightingale
 * @license MIT
 */(function(){var o=function(e){var t=new o.Builder;return t.pipeline.add(o.trimmer,o.stopWordFilter,o.stemmer),t.searchPipeline.add(o.stemmer),e.call(t,t),t.build()};o.version="2.3.9"
/*!
 * lunr.utils
 * Copyright (C) 2020 Oliver Nightingale
 */,o.utils={},o.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),o.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},o.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),n=Object.keys(e),i=0;i<n.length;i++){var r=n[i],o=e[r];if(Array.isArray(o))t[r]=o.slice();else{if("string"!==typeof o&&"number"!==typeof o&&"boolean"!==typeof o)throw new TypeError("clone is not deep and does not support nested objects");t[r]=o}}return t},o.FieldRef=function(e,t,n){this.docRef=e,this.fieldName=t,this._stringValue=n},o.FieldRef.joiner="/",o.FieldRef.fromString=function(e){var t=e.indexOf(o.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var n=e.slice(0,t),i=e.slice(t+1);return new o.FieldRef(i,n,e)},o.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+o.FieldRef.joiner+this.docRef),this._stringValue}
/*!
 * lunr.Set
 * Copyright (C) 2020 Oliver Nightingale
 */,o.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},o.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},o.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},o.Set.prototype.contains=function(e){return!!this.elements[e]},o.Set.prototype.intersect=function(e){var t,n,i,r=[];if(e===o.Set.complete)return this;if(e===o.Set.empty)return e;this.length<e.length?(t=this,n=e):(t=e,n=this),i=Object.keys(t.elements);for(var s=0;s<i.length;s++){var a=i[s];a in n.elements&&r.push(a)}return new o.Set(r)},o.Set.prototype.union=function(e){return e===o.Set.complete?o.Set.complete:e===o.Set.empty?this:new o.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},o.idf=function(e,t){var n=0;for(var i in e)"_index"!=i&&(n+=Object.keys(e[i]).length);var r=(t-n+.5)/(n+.5);return Math.log(1+Math.abs(r))},o.Token=function(e,t){this.str=e||"",this.metadata=t||{}},o.Token.prototype.toString=function(){return this.str},o.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},o.Token.prototype.clone=function(e){return e=e||function(e){return e},new o.Token(e(this.str,this.metadata),this.metadata)}
/*!
 * lunr.tokenizer
 * Copyright (C) 2020 Oliver Nightingale
 */,o.tokenizer=function(e,t){if(null==e||void 0==e)return[];if(Array.isArray(e))return e.map((function(e){return new o.Token(o.utils.asString(e).toLowerCase(),o.utils.clone(t))}));for(var n=e.toString().toLowerCase(),i=n.length,r=[],s=0,a=0;s<=i;s++){var l=n.charAt(s),c=s-a;if(l.match(o.tokenizer.separator)||s==i){if(c>0){var u=o.utils.clone(t)||{};u["position"]=[a,c],u["index"]=r.length,r.push(new o.Token(n.slice(a,s),u))}a=s+1}}return r},o.tokenizer.separator=/[\s\-]+/
/*!
 * lunr.Pipeline
 * Copyright (C) 2020 Oliver Nightingale
 */,o.Pipeline=function(){this._stack=[]},o.Pipeline.registeredFunctions=Object.create(null),o.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&o.utils.warn("Overwriting existing registered function: "+t),e.label=t,o.Pipeline.registeredFunctions[e.label]=e},o.Pipeline.warnIfFunctionNotRegistered=function(e){var t=e.label&&e.label in this.registeredFunctions;t||o.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},o.Pipeline.load=function(e){var t=new o.Pipeline;return e.forEach((function(e){var n=o.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},o.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){o.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},o.Pipeline.prototype.after=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},o.Pipeline.prototype.before=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},o.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},o.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n<t;n++){for(var i=this._stack[n],r=[],o=0;o<e.length;o++){var s=i(e[o],o,e);if(null!==s&&void 0!==s&&""!==s)if(Array.isArray(s))for(var a=0;a<s.length;a++)r.push(s[a]);else r.push(s)}e=r}return e},o.Pipeline.prototype.runString=function(e,t){var n=new o.Token(e,t);return this.run([n]).map((function(e){return e.toString()}))},o.Pipeline.prototype.reset=function(){this._stack=[]},o.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return o.Pipeline.warnIfFunctionNotRegistered(e),e.label}))}
/*!
 * lunr.Vector
 * Copyright (C) 2020 Oliver Nightingale
 */,o.Vector=function(e){this._magnitude=0,this.elements=e||[]},o.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;var t=0,n=this.elements.length/2,i=n-t,r=Math.floor(i/2),o=this.elements[2*r];while(i>1){if(o<e&&(t=r),o>e&&(n=r),o==e)break;i=n-t,r=t+Math.floor(i/2),o=this.elements[2*r]}return o==e||o>e?2*r:o<e?2*(r+1):void 0},o.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},o.Vector.prototype.upsert=function(e,t,n){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=n(this.elements[i+1],t):this.elements.splice(i,0,e,t)},o.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,n=1;n<t;n+=2){var i=this.elements[n];e+=i*i}return this._magnitude=Math.sqrt(e)},o.Vector.prototype.dot=function(e){var t=0,n=this.elements,i=e.elements,r=n.length,o=i.length,s=0,a=0,l=0,c=0;while(l<r&&c<o)s=n[l],a=i[c],s<a?l+=2:s>a?c+=2:s==a&&(t+=n[l+1]*i[c+1],l+=2,c+=2);return t},o.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},o.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t<this.elements.length;t+=2,n++)e[n]=this.elements[t];return e},o.Vector.prototype.toJSON=function(){return this.elements}
/*!
 * lunr.stemmer
 * Copyright (C) 2020 Oliver Nightingale
 * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
 */,o.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",l="^("+r+")?"+o+r+o+r,c="^("+r+")?"+i,u=new RegExp(s),h=new RegExp(l),d=new RegExp(a),p=new RegExp(c),f=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,v=/.$/,_=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),b=new RegExp("^"+r+i+"[^aeiouwxy]$"),w=/^(.+?[^aeiou])y$/,T=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,S=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,E=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,k=/^(.+?)(s|t)(ion)$/,C=/^(.+?)e$/,A=/ll$/,I=new RegExp("^"+r+i+"[^aeiouwxy]$"),M=function(n){var i,r,o,s,a,l,c;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=f,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=g,a=y,s.test(n)){var M=s.exec(n);s=u,s.test(M[1])&&(s=v,n=n.replace(s,""))}else if(a.test(n)){M=a.exec(n);i=M[1],a=p,a.test(i)&&(n=i,a=_,l=x,c=b,a.test(n)?n+="e":l.test(n)?(s=v,n=n.replace(s,"")):c.test(n)&&(n+="e"))}if(s=w,s.test(n)){M=s.exec(n);i=M[1],n=i+"i"}if(s=T,s.test(n)){M=s.exec(n);i=M[1],r=M[2],s=u,s.test(i)&&(n=i+e[r])}if(s=S,s.test(n)){M=s.exec(n);i=M[1],r=M[2],s=u,s.test(i)&&(n=i+t[r])}if(s=E,a=k,s.test(n)){M=s.exec(n);i=M[1],s=h,s.test(i)&&(n=i)}else if(a.test(n)){M=a.exec(n);i=M[1]+M[2],a=h,a.test(i)&&(n=i)}if(s=C,s.test(n)){M=s.exec(n);i=M[1],s=h,a=d,l=I,(s.test(i)||a.test(i)&&!l.test(i))&&(n=i)}return s=A,a=h,s.test(n)&&a.test(n)&&(s=v,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return function(e){return e.update(M)}}(),o.Pipeline.registerFunction(o.stemmer,"stemmer")
/*!
 * lunr.stopWordFilter
 * Copyright (C) 2020 Oliver Nightingale
 */,o.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},o.stopWordFilter=o.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),o.Pipeline.registerFunction(o.stopWordFilter,"stopWordFilter")
/*!
 * lunr.trimmer
 * Copyright (C) 2020 Oliver Nightingale
 */,o.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},o.Pipeline.registerFunction(o.trimmer,"trimmer")
/*!
 * lunr.TokenSet
 * Copyright (C) 2020 Oliver Nightingale
 */,o.TokenSet=function(){this.final=!1,this.edges={},this.id=o.TokenSet._nextId,o.TokenSet._nextId+=1},o.TokenSet._nextId=1,o.TokenSet.fromArray=function(e){for(var t=new o.TokenSet.Builder,n=0,i=e.length;n<i;n++)t.insert(e[n]);return t.finish(),t.root},o.TokenSet.fromClause=function(e){return"editDistance"in e?o.TokenSet.fromFuzzyString(e.term,e.editDistance):o.TokenSet.fromString(e.term)},o.TokenSet.fromFuzzyString=function(e,t){var n=new o.TokenSet,i=[{node:n,editsRemaining:t,str:e}];while(i.length){var r=i.pop();if(r.str.length>0){var s,a=r.str.charAt(0);a in r.node.edges?s=r.node.edges[a]:(s=new o.TokenSet,r.node.edges[a]=s),1==r.str.length&&(s.final=!0),i.push({node:s,editsRemaining:r.editsRemaining,str:r.str.slice(1)})}if(0!=r.editsRemaining){if("*"in r.node.edges)var l=r.node.edges["*"];else{l=new o.TokenSet;r.node.edges["*"]=l}if(0==r.str.length&&(l.final=!0),i.push({node:l,editsRemaining:r.editsRemaining-1,str:r.str}),r.str.length>1&&i.push({node:r.node,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)}),1==r.str.length&&(r.node.final=!0),r.str.length>=1){if("*"in r.node.edges)var c=r.node.edges["*"];else{c=new o.TokenSet;r.node.edges["*"]=c}1==r.str.length&&(c.final=!0),i.push({node:c,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)})}if(r.str.length>1){var u,h=r.str.charAt(0),d=r.str.charAt(1);d in r.node.edges?u=r.node.edges[d]:(u=new o.TokenSet,r.node.edges[d]=u),1==r.str.length&&(u.final=!0),i.push({node:u,editsRemaining:r.editsRemaining-1,str:h+r.str.slice(2)})}}}return n},o.TokenSet.fromString=function(e){for(var t=new o.TokenSet,n=t,i=0,r=e.length;i<r;i++){var s=e[i],a=i==r-1;if("*"==s)t.edges[s]=t,t.final=a;else{var l=new o.TokenSet;l.final=a,t.edges[s]=l,t=l}}return n},o.TokenSet.prototype.toArray=function(){var e=[],t=[{prefix:"",node:this}];while(t.length){var n=t.pop(),i=Object.keys(n.node.edges),r=i.length;n.node.final&&(n.prefix.charAt(0),e.push(n.prefix));for(var o=0;o<r;o++){var s=i[o];t.push({prefix:n.prefix.concat(s),node:n.node.edges[s]})}}return e},o.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),n=t.length,i=0;i<n;i++){var r=t[i],o=this.edges[r];e=e+r+o.id}return e},o.TokenSet.prototype.intersect=function(e){var t=new o.TokenSet,n=void 0,i=[{qNode:e,output:t,node:this}];while(i.length){n=i.pop();for(var r=Object.keys(n.qNode.edges),s=r.length,a=Object.keys(n.node.edges),l=a.length,c=0;c<s;c++)for(var u=r[c],h=0;h<l;h++){var d=a[h];if(d==u||"*"==u){var p=n.node.edges[d],f=n.qNode.edges[u],m=p.final&&f.final,g=void 0;d in n.output.edges?(g=n.output.edges[d],g.final=g.final||m):(g=new o.TokenSet,g.final=m,n.output.edges[d]=g),i.push({qNode:f,output:g,node:p})}}}return t},o.TokenSet.Builder=function(){this.previousWord="",this.root=new o.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},o.TokenSet.Builder.prototype.insert=function(e){var t,n=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length;i++){if(e[i]!=this.previousWord[i])break;n++}this.minimize(n),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(i=n;i<e.length;i++){var r=new o.TokenSet,s=e[i];t.edges[s]=r,this.uncheckedNodes.push({parent:t,char:s,child:r}),t=r}t.final=!0,this.previousWord=e},o.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},o.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var n=this.uncheckedNodes[t],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}}
/*!
 * lunr.Index
 * Copyright (C) 2020 Oliver Nightingale
 */,o.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},o.Index.prototype.search=function(e){return this.query((function(t){var n=new o.QueryParser(e,t);n.parse()}))},o.Index.prototype.query=function(e){for(var t=new o.Query(this.fields),n=Object.create(null),i=Object.create(null),r=Object.create(null),s=Object.create(null),a=Object.create(null),l=0;l<this.fields.length;l++)i[this.fields[l]]=new o.Vector;e.call(t,t);for(l=0;l<t.clauses.length;l++){var c=t.clauses[l],u=null,h=o.Set.empty;u=c.usePipeline?this.pipeline.runString(c.term,{fields:c.fields}):[c.term];for(var d=0;d<u.length;d++){var p=u[d];c.term=p;var f=o.TokenSet.fromClause(c),m=this.tokenSet.intersect(f).toArray();if(0===m.length&&c.presence===o.Query.presence.REQUIRED){for(var g=0;g<c.fields.length;g++){var y=c.fields[g];s[y]=o.Set.empty}break}for(var v=0;v<m.length;v++){var _=m[v],x=this.invertedIndex[_],b=x._index;for(g=0;g<c.fields.length;g++){y=c.fields[g];var w=x[y],T=Object.keys(w),S=_+"/"+y,E=new o.Set(T);if(c.presence==o.Query.presence.REQUIRED&&(h=h.union(E),void 0===s[y]&&(s[y]=o.Set.complete)),c.presence!=o.Query.presence.PROHIBITED){if(i[y].upsert(b,c.boost,(function(e,t){return e+t})),!r[S]){for(var k=0;k<T.length;k++){var C,A=T[k],I=new o.FieldRef(A,y),M=w[A];void 0===(C=n[I])?n[I]=new o.MatchData(_,y,M):C.add(_,y,M)}r[S]=!0}}else void 0===a[y]&&(a[y]=o.Set.empty),a[y]=a[y].union(E)}}}if(c.presence===o.Query.presence.REQUIRED)for(g=0;g<c.fields.length;g++){y=c.fields[g];s[y]=s[y].intersect(h)}}var P=o.Set.complete,D=o.Set.empty;for(l=0;l<this.fields.length;l++){y=this.fields[l];s[y]&&(P=P.intersect(s[y])),a[y]&&(D=D.union(a[y]))}var L=Object.keys(n),O=[],z=Object.create(null);if(t.isNegated()){L=Object.keys(this.fieldVectors);for(l=0;l<L.length;l++){I=L[l];var R=o.FieldRef.fromString(I);n[I]=new o.MatchData}}for(l=0;l<L.length;l++){R=o.FieldRef.fromString(L[l]);var F=R.docRef;if(P.contains(F)&&!D.contains(F)){var N,B=this.fieldVectors[R],j=i[R.fieldName].similarity(B);if(void 0!==(N=z[F]))N.score+=j,N.matchData.combine(n[R]);else{var V={ref:F,score:j,matchData:n[R]};z[F]=V,O.push(V)}}}return O.sort((function(e,t){return t.score-e.score}))},o.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:o.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},o.Index.load=function(e){var t={},n={},i=e.fieldVectors,r=Object.create(null),s=e.invertedIndex,a=new o.TokenSet.Builder,l=o.Pipeline.load(e.pipeline);e.version!=o.version&&o.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+o.version+"' does not match serialized index '"+e.version+"'");for(var c=0;c<i.length;c++){var u=i[c],h=u[0],d=u[1];n[h]=new o.Vector(d)}for(c=0;c<s.length;c++){u=s[c];var p=u[0],f=u[1];a.insert(p),r[p]=f}return a.finish(),t.fields=e.fields,t.fieldVectors=n,t.invertedIndex=r,t.tokenSet=a.root,t.pipeline=l,new o.Index(t)}
/*!
 * lunr.Builder
 * Copyright (C) 2020 Oliver Nightingale
 */,o.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=o.tokenizer,this.pipeline=new o.Pipeline,this.searchPipeline=new o.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},o.Builder.prototype.ref=function(e){this._ref=e},o.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},o.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},o.Builder.prototype.k1=function(e){this._k1=e},o.Builder.prototype.add=function(e,t){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var r=0;r<i.length;r++){var s=i[r],a=this._fields[s].extractor,l=a?a(e):e[s],c=this.tokenizer(l,{fields:[s]}),u=this.pipeline.run(c),h=new o.FieldRef(n,s),d=Object.create(null);this.fieldTermFrequencies[h]=d,this.fieldLengths[h]=0,this.fieldLengths[h]+=u.length;for(var p=0;p<u.length;p++){var f=u[p];if(void 0==d[f]&&(d[f]=0),d[f]+=1,void 0==this.invertedIndex[f]){var m=Object.create(null);m["_index"]=this.termIndex,this.termIndex+=1;for(var g=0;g<i.length;g++)m[i[g]]=Object.create(null);this.invertedIndex[f]=m}void 0==this.invertedIndex[f][s][n]&&(this.invertedIndex[f][s][n]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var v=this.metadataWhitelist[y],_=f.metadata[v];void 0==this.invertedIndex[f][s][n][v]&&(this.invertedIndex[f][s][n][v]=[]),this.invertedIndex[f][s][n][v].push(_)}}}},o.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,n={},i={},r=0;r<t;r++){var s=o.FieldRef.fromString(e[r]),a=s.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[s]}var l=Object.keys(this._fields);for(r=0;r<l.length;r++){var c=l[r];n[c]=n[c]/i[c]}this.averageFieldLength=n},o.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),n=t.length,i=Object.create(null),r=0;r<n;r++){for(var s=o.FieldRef.fromString(t[r]),a=s.fieldName,l=this.fieldLengths[s],c=new o.Vector,u=this.fieldTermFrequencies[s],h=Object.keys(u),d=h.length,p=this._fields[a].boost||1,f=this._documents[s.docRef].boost||1,m=0;m<d;m++){var g,y,v,_=h[m],x=u[_],b=this.invertedIndex[_]._index;void 0===i[_]?(g=o.idf(this.invertedIndex[_],this.documentCount),i[_]=g):g=i[_],y=g*((this._k1+1)*x)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[a]))+x),y*=p,y*=f,v=Math.round(1e3*y)/1e3,c.insert(b,v)}e[s]=c}this.fieldVectors=e},o.Builder.prototype.createTokenSet=function(){this.tokenSet=o.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},o.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new o.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},o.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},o.MatchData=function(e,t,n){for(var i=Object.create(null),r=Object.keys(n||{}),o=0;o<r.length;o++){var s=r[o];i[s]=n[s].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)},o.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),n=0;n<t.length;n++){var i=t[n],r=Object.keys(e.metadata[i]);void 0==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var o=0;o<r.length;o++){var s=r[o],a=Object.keys(e.metadata[i][s]);void 0==this.metadata[i][s]&&(this.metadata[i][s]=Object.create(null));for(var l=0;l<a.length;l++){var c=a[l];void 0==this.metadata[i][s][c]?this.metadata[i][s][c]=e.metadata[i][s][c]:this.metadata[i][s][c]=this.metadata[i][s][c].concat(e.metadata[i][s][c])}}}},o.MatchData.prototype.add=function(e,t,n){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=n);if(t in this.metadata[e])for(var i=Object.keys(n),r=0;r<i.length;r++){var o=i[r];o in this.metadata[e][t]?this.metadata[e][t][o]=this.metadata[e][t][o].concat(n[o]):this.metadata[e][t][o]=n[o]}else this.metadata[e][t]=n},o.Query=function(e){this.clauses=[],this.allFields=e},o.Query.wildcard=new String("*"),o.Query.wildcard.NONE=0,o.Query.wildcard.LEADING=1,o.Query.wildcard.TRAILING=2,o.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},o.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=o.Query.wildcard.NONE),e.wildcard&o.Query.wildcard.LEADING&&e.term.charAt(0)!=o.Query.wildcard&&(e.term="*"+e.term),e.wildcard&o.Query.wildcard.TRAILING&&e.term.slice(-1)!=o.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=o.Query.presence.OPTIONAL),this.clauses.push(e),this},o.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=o.Query.presence.PROHIBITED)return!1;return!0},o.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,o.utils.clone(t))}),this),this;var n=t||{};return n.term=e.toString(),this.clause(n),this},o.QueryParseError=function(e,t,n){this.name="QueryParseError",this.message=e,this.start=t,this.end=n},o.QueryParseError.prototype=new Error,o.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},o.QueryLexer.prototype.run=function(){var e=o.QueryLexer.lexText;while(e)e=e(this)},o.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],e.push(this.str.slice(t,n)),t=n+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},o.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},o.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},o.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return o.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},o.QueryLexer.prototype.width=function(){return this.pos-this.start},o.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},o.QueryLexer.prototype.backup=function(){this.pos-=1},o.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{e=this.next(),t=e.charCodeAt(0)}while(t>47&&t<58);e!=o.QueryLexer.EOS&&this.backup()},o.QueryLexer.prototype.more=function(){return this.pos<this.length},o.QueryLexer.EOS="EOS",o.QueryLexer.FIELD="FIELD",o.QueryLexer.TERM="TERM",o.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",o.QueryLexer.BOOST="BOOST",o.QueryLexer.PRESENCE="PRESENCE",o.QueryLexer.lexField=function(e){return e.backup(),e.emit(o.QueryLexer.FIELD),e.ignore(),o.QueryLexer.lexText},o.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(o.QueryLexer.TERM)),e.ignore(),e.more())return o.QueryLexer.lexText},o.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.EDIT_DISTANCE),o.QueryLexer.lexText},o.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.BOOST),o.QueryLexer.lexText},o.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(o.QueryLexer.TERM)},o.QueryLexer.termSeparator=o.tokenizer.separator,o.QueryLexer.lexText=function(e){while(1){var t=e.next();if(t==o.QueryLexer.EOS)return o.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return o.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if(t.match(o.QueryLexer.termSeparator))return o.QueryLexer.lexTerm}else e.escapeCharacter()}},o.QueryParser=function(e,t){this.lexer=new o.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},o.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;var e=o.QueryParser.parseClause;while(e)e=e(this);return this.query},o.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},o.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},o.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},o.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(void 0!=t)switch(t.type){case o.QueryLexer.PRESENCE:return o.QueryParser.parsePresence;case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new o.QueryParseError(n,t.start,t.end)}},o.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(void 0!=t){switch(t.str){case"-":e.currentClause.presence=o.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=o.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new o.QueryParseError(n,t.start,t.end)}var i=e.peekLexeme();if(void 0==i){n="expecting term or field, found nothing";throw new o.QueryParseError(n,t.start,t.end)}switch(i.type){case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:n="expecting term or field, found '"+i.type+"'";throw new o.QueryParseError(n,i.start,i.end)}}},o.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(void 0!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+n;throw new o.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var r=e.peekLexeme();if(void 0==r){i="expecting term, found nothing";throw new o.QueryParseError(i,t.start,t.end)}switch(r.type){case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:i="expecting term, found '"+r.type+"'";throw new o.QueryParseError(i,r.start,r.end)}}},o.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(void 0!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(void 0!=n)switch(n.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new o.QueryParseError(i,n.start,n.end)}else e.nextClause()}},o.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(void 0!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new o.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=n;var r=e.peekLexeme();if(void 0!=r)switch(r.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+r.type+"'";throw new o.QueryParseError(i,r.start,r.end)}else e.nextClause()}},o.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(void 0!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="boost must be numeric";throw new o.QueryParseError(i,t.start,t.end)}e.currentClause.boost=n;var r=e.peekLexeme();if(void 0!=r)switch(r.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+r.type+"'";throw new o.QueryParseError(i,r.start,r.end)}else e.nextClause()}},function(o,s){i=s,r="function"===typeof i?i.call(t,n,t,e):i,void 0===r||(e.exports=r)}(0,(function(){return o}))})()},"2f213":function(e,t,n){"use strict";var i=n("79e5");e.exports=function(e,t){return!!e&&i((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},"2fdb":function(e,t,n){"use strict";var i=n("5ca1"),r=n("d2c8"),o="includes";i(i.P+i.F*n("5147")(o),"String",{includes:function(e){return!!~r(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},3024:function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"30b5":function(e,t,n){"use strict";var i=n("c532");function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var s=[];i.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"30f1":function(e,t,n){"use strict";var i=n("b8e3"),r=n("63b6"),o=n("9138"),s=n("35e8"),a=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),h=n("5168")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",f="keys",m="values",g=function(){return this};e.exports=function(e,t,n,y,v,_,x){l(n,t,y);var b,w,T,S=function(e){if(!d&&e in A)return A[e];switch(e){case f:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",k=v==m,C=!1,A=e.prototype,I=A[h]||A[p]||v&&A[v],M=I||S(v),P=v?k?S("entries"):M:void 0,D="Array"==t&&A.entries||I;if(D&&(T=u(D.call(new e)),T!==Object.prototype&&T.next&&(c(T,E,!0),i||"function"==typeof T[h]||s(T,h,g))),k&&I&&I.name!==m&&(C=!0,M=function(){return I.call(this)}),i&&!x||!d&&!C&&A[h]||s(A,h,M),a[t]=M,a[E]=g,v)if(b={values:k?M:S(m),keys:_?M:S(f),entries:P},x)for(w in b)w in A||o(A,w,b[w]);else r(r.P+r.F*(d||C),t,b);return b}},"31f4":function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"32e9":function(e,t,n){var i=n("86cc"),r=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var i=n("e53d").document;e.exports=i&&i.documentElement},"335c":function(e,t,n){var i=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"33a4":function(e,t,n){var i=n("84f2"),r=n("2b4c")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[r]===e)}},"34ef":function(e,t,n){n("ec30")("Uint8",1,(function(e){return function(t,n,i){return e(this,t,n,i)}}))},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var i=n("d9f6"),r=n("aebd");e.exports=n("8e60")?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},"36bd":function(e,t,n){"use strict";var i=n("4bf8"),r=n("77f1"),o=n("9def");e.exports=function(e){var t=i(this),n=o(t.length),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);while(c>a)t[a++]=e;return t}},"36c3":function(e,t,n){var i=n("335c"),r=n("25eb");e.exports=function(e){return i(r(e))}},3702:function(e,t,n){var i=n("481b"),r=n("5168")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[r]===e)}},"37c8":function(e,t,n){t.f=n("2b4c")},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"386d":function(e,t,n){"use strict";var i=n("cb7c"),r=n("83a1"),o=n("5f1b");n("214f")("search",1,(function(e,t,n,s){return[function(n){var i=e(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=s(n,e,this);if(t.done)return t.value;var a=i(e),l=String(this),c=a.lastIndex;r(c,0)||(a.lastIndex=0);var u=o(a,l);return r(a.lastIndex,c)||(a.lastIndex=c),null===u?-1:u.index}]}))},"387f":function(e,t,n){"use strict";e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},"38fd":function(e,t,n){var i=n("69a8"),r=n("4bf8"),o=n("613b")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},3934:function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}()},"3a38":function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"3a72":function(e,t,n){var i=n("7726"),r=n("8378"),o=n("2d00"),s=n("37c8"),a=n("86cc").f;e.exports=function(e){var t=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},"3b2b":function(e,t,n){var i=n("7726"),r=n("5dbc"),o=n("86cc").f,s=n("9093").f,a=n("aae3"),l=n("0bfb"),c=i.RegExp,u=c,h=c.prototype,d=/a/g,p=/a/g,f=new c(d)!==d;if(n("9e1e")&&(!f||n("79e5")((function(){return p[n("2b4c")("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")})))){c=function(e,t){var n=this instanceof c,i=a(e),o=void 0===t;return!n&&i&&e.constructor===c&&o?e:r(f?new u(i&&!o?e.source:e,t):u((i=e instanceof c)?e.source:e,i&&o?l.call(e):t),n?this:h,c)};for(var m=function(e){e in c||o(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},g=s(u),y=0;g.length>y;)m(g[y++]);h.constructor=c,c.prototype=h,n("2aba")(i,"RegExp",c)}n("7a56")("RegExp")},"3b8d":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("795b"),r=n.n(i);function o(e,t,n,i,o,s,a){try{var l=e[s](a),c=l.value}catch(u){return void n(u)}l.done?t(c):r.a.resolve(c).then(i,o)}function s(e){return function(){var t=this,n=arguments;return new r.a((function(i,r){var s=e.apply(t,n);function a(e){o(s,i,r,a,l,"next",e)}function l(e){o(s,i,r,a,l,"throw",e)}a(void 0)}))}}},"3c11":function(e,t,n){"use strict";var i=n("63b6"),r=n("584a"),o=n("e53d"),s=n("f201"),a=n("cd78");i(i.P+i.R,"Promise",{finally:function(e){var t=s(this,r.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return a(t,e()).then((function(){return n}))}:e,n?function(n){return a(t,e()).then((function(){throw n}))}:e)}})},"3f9b":function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=n("84d3"),r=n.n(i),o=n("bd7e"),s=n.n(o);const a={"column-width":"columnWidth","transition-duration":"transitionDuration","item-selector":"itemSelector","origin-left":"originLeft","origin-top":"originTop","fit-width":"fitWidth",stamp:"stamp",gutter:"gutter","percent-position":"percentPosition","horizontal-order":"horizontalOrder",stagger:"stagger","destroy-delay":"destroyDelay"},l="vuemasonry.itemAdded",c="vuemasonry.itemRemoved",u="vuemasonry.imageLoaded",h="vuemasonry.destroy",d=function(e){return"true"===(e+"").toLowerCase()},p=function(e){return isNaN(e)?e:parseInt(e)},f=function(e){const t={},n=Array.prototype.slice.call(e);return n.forEach((function(e){Object.keys(a).indexOf(e.name)>-1&&(e.name.indexOf("origin")>-1?t[a[e.name]]=d(e.value):"column-width"===e.name||"gutter"===e.name?t[a[e.name]]=p(e.value):t[a[e.name]]=e.value)})),t},m=function(){};m.install=function(e,t){const n=new e({}),i="VueMasonry";e.directive("masonry",{props:["transitionDuration"," itemSelector","destroyDelay"],inserted:function(t,o){if(!r.a)throw new Error("Masonry plugin is not defined. Please check it's connected and parsed correctly.");const s=f(t.attributes),a=new r.a(t,s),d=o.value||i,p=s["destroyDelay"]?parseInt(s["destroyDelay"],10):void 0,m=function(){a.reloadItems(),a.layout()};e.nextTick((function(){m()}));const g=function(e){m()},y=function(e){n.$off(`${l}__${d}`,g),n.$off(`${c}__${d}`,g),n.$off(`${u}__${d}`,g),n.$off(`${h}__${d}`,y);const t=p&&!Number.isNaN(p)?p:0;setTimeout((function(){a.destroy()}),t)};n.$on(`${l}__${d}`,g),n.$on(`${c}__${d}`,g),n.$on(`${u}__${d}`,g),n.$on(`${h}__${d}`,y)},unbind:function(e,t){const r=t.value||i;n.$emit(`${h}__${r}`)}}),e.directive("masonryTile",{inserted:function(e,t){const r=t.value||i;n.$emit(`${l}__${r}`,{element:e}),new s.a(e,(function(){n.$emit(`${u}__${r}`,{element:e})}))},unbind:function(e,t){const r=t.value||i;n.$emit(`${c}__${r}`,{element:e})}}),e.prototype.$redrawVueMasonry=function(e){const t=e||i;n.$emit(`${l}__${t}`)}}},"40ad":function(e,t,n){var i,r;
/*!
 * getSize v2.0.3
 * measure size of elements
 * MIT license
 */(function(o,s){i=s,r="function"===typeof i?i.call(t,n,t,e):i,void 0===r||(e.exports=r)})(window,(function(){"use strict";function e(e){var t=parseFloat(e),n=-1==e.indexOf("%")&&!isNaN(t);return n&&t}function t(){}var n="undefined"==typeof console?t:function(e){console.error(e)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=i.length;function o(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<r;t++){var n=i[t];e[n]=0}return e}function s(e){var t=getComputedStyle(e);return t||n("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var a,l=!1;function c(){if(!l){l=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var i=s(t);a=200==Math.round(e(i.width)),u.isBoxSizeOuter=a,n.removeChild(t)}}function u(t){if(c(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var n=s(t);if("none"==n.display)return o();var l={};l.width=t.offsetWidth,l.height=t.offsetHeight;for(var u=l.isBorderBox="border-box"==n.boxSizing,h=0;h<r;h++){var d=i[h],p=n[d],f=parseFloat(p);l[d]=isNaN(f)?0:f}var m=l.paddingLeft+l.paddingRight,g=l.paddingTop+l.paddingBottom,y=l.marginLeft+l.marginRight,v=l.marginTop+l.marginBottom,_=l.borderLeftWidth+l.borderRightWidth,x=l.borderTopWidth+l.borderBottomWidth,b=u&&a,w=e(n.width);!1!==w&&(l.width=w+(b?0:m+_));var T=e(n.height);return!1!==T&&(l.height=T+(b?0:g+x)),l.innerWidth=l.width-(m+_),l.innerHeight=l.height-(g+x),l.outerWidth=l.width+y,l.outerHeight=l.height+v,l}}return u}))},"40c3":function(e,t,n){var i=n("6b4c"),r=n("5168")("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),r))?n:o?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},4178:function(e,t,n){var i,r,o,s=n("d864"),a=n("3024"),l=n("32fc"),c=n("1ec9"),u=n("e53d"),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,m=u.Dispatch,g=0,y={},v="onreadystatechange",_=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},x=function(e){_.call(e.data)};d&&p||(d=function(e){var t=[],n=1;while(arguments.length>n)t.push(arguments[n++]);return y[++g]=function(){a("function"==typeof e?e:Function(e),t)},i(g),g},p=function(e){delete y[e]},"process"==n("6b4c")(h)?i=function(e){h.nextTick(s(_,e,1))}:m&&m.now?i=function(e){m.now(s(_,e,1))}:f?(r=new f,o=r.port2,r.port1.onmessage=x,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",x,!1)):i=v in c("script")?function(e){l.appendChild(c("script"))[v]=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(s(_,e,1),0)}),e.exports={set:d,clear:p}},"41a0":function(e,t,n){"use strict";var i=n("2aeb"),r=n("4630"),o=n("7f20"),s={};n("32e9")(s,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(s,{next:r(1,n)}),o(e,t+" Iterator")}},"43fc":function(e,t,n){"use strict";var i=n("63b6"),r=n("656e"),o=n("4439");i(i.S,"Promise",{try:function(e){var t=r.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},4439:function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},"454f":function(e,t,n){n("46a7");var i=n("584a").Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},"456d":function(e,t,n){var i=n("4bf8"),r=n("0d58");n("5eda")("keys",(function(){return function(e){return r(i(e))}}))},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"45f2":function(e,t,n){var i=n("d9f6").f,r=n("07e3"),o=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"467f":function(e,t,n){"use strict";var i=n("2d83");e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"46a7":function(e,t,n){var i=n("63b6");i(i.S+i.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},"47ee":function(e,t,n){var i=n("c3a1"),r=n("9aa9"),o=n("355d");e.exports=function(e){var t=i(e),n=r.f;if(n){var s,a=n(e),l=o.f,c=0;while(a.length>c)l.call(e,s=a[c++])&&t.push(s)}return t}},"481b":function(e,t){e.exports={}},4917:function(e,t,n){"use strict";var i=n("cb7c"),r=n("9def"),o=n("0390"),s=n("5f1b");n("214f")("match",1,(function(e,t,n,a){return[function(n){var i=e(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=a(n,e,this);if(t.done)return t.value;var l=i(e),c=String(this);if(!l.global)return s(l,c);var u=l.unicode;l.lastIndex=0;var h,d=[],p=0;while(null!==(h=s(l,c))){var f=String(h[0]);d[p]=f,""===f&&(l.lastIndex=o(c,r(l.lastIndex),u)),p++}return 0===p?null:d}]}))},"4a59":function(e,t,n){var i=n("9b43"),r=n("1fa8"),o=n("33a4"),s=n("cb7c"),a=n("9def"),l=n("27ee"),c={},u={};t=e.exports=function(e,t,n,h,d){var p,f,m,g,y=d?function(){return e}:l(e),v=i(n,h,t?2:1),_=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=a(e.length);p>_;_++)if(g=t?v(s(f=e[_])[0],f[1]):v(e[_]),g===c||g===u)return g}else for(m=y.call(e);!(f=m.next()).done;)if(g=r(m,v,f.value,t),g===c||g===u)return g};t.BREAK=c,t.RETURN=u},"4a7b":function(e,t,n){"use strict";var i=n("c532");e.exports=function(e,t){t=t||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function c(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(e[r],t[r])}i.forEach(r,(function(e){i.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),i.forEach(o,c),i.forEach(s,(function(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(void 0,t[r])})),i.forEach(a,(function(i){i in t?n[i]=l(e[i],t[i]):i in e&&(n[i]=l(void 0,e[i]))}));var u=r.concat(o).concat(s).concat(a),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return i.forEach(h,c),n}},"4bf8":function(e,t,n){var i=n("be13");e.exports=function(e){return Object(i(e))}},"4c95":function(e,t,n){"use strict";var i=n("e53d"),r=n("584a"),o=n("d9f6"),s=n("8e60"),a=n("5168")("species");e.exports=function(e){var t="function"==typeof r[e]?r[e]:i[e];s&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},"4ee1":function(e,t,n){var i=n("5168")("iterator"),r=!1;try{var o=[7][i]();o["return"]=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(s){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},e(o)}catch(s){}return n}},"4f7f":function(e,t,n){"use strict";var i=n("c26b"),r=n("b39a"),o="Set";e.exports=n("e0b8")(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return i.def(r(this,o),e=0===e?0:e,e)}},i)},"4fb8":function(e,t,n){(function(t){"object"==typeof navigator&&function(t,n){e.exports=n()}(0,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={addCSS:!0,thumbWidth:15,watch:!0};function a(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var l=function(e){return null!=e?e.constructor:null},c=function(e,t){return!!(e&&t&&e instanceof t)},u=function(e){return null==e},h=function(e){return l(e)===Object},d=function(e){return l(e)===String},p=function(e){return Array.isArray(e)},f=function(e){return c(e,NodeList)},m=d,g=p,y=f,v=function(e){return c(e,Element)},_=function(e){return c(e,Event)},x=function(e){return u(e)||(d(e)||p(e)||f(e))&&!e.length||h(e)&&!Object.keys(e).length};function b(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}var w=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),v(t)?this.element=t:m(t)&&(this.element=document.querySelector(t)),v(this.element)&&x(this.element.rangeTouch)&&(this.config=o({},s,{},n),this.init())}return function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!_(t))return null;var n,i=t.target,r=t.changedTouches[0],o=parseFloat(i.getAttribute("min"))||0,s=parseFloat(i.getAttribute("max"))||100,a=parseFloat(i.getAttribute("step"))||1,l=i.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(r.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*c:50<n&&(n+=2*(n-50)*c),o+b(n/100*(s-o),a)}},{key:"set",value:function(t){e.enabled&&_(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(x(t)||m(t)?i=Array.from(document.querySelectorAll(m(t)?t:'input[type="range"]')):v(t)?i=[t]:y(t)?i=Array.from(t):g(t)&&(i=t.filter(v)),x(i))return null;var r=o({},s,{},n);if(m(t)&&r.watch){var l=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){v(n)&&a(n,t)&&new e(n,r)}))}))}));l.observe(document.body,{childList:!0,subtree:!0})}return i.map((function(t){return new e(t,n)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const T=e=>null!=e?e.constructor:null,S=(e,t)=>Boolean(e&&t&&e instanceof t),E=e=>null==e,k=e=>T(e)===Object,C=e=>T(e)===String,A=e=>T(e)===Function,I=e=>Array.isArray(e),M=e=>S(e,NodeList),P=e=>E(e)||(C(e)||I(e)||M(e))&&!e.length||k(e)&&!Object.keys(e).length;var D=E,L=k,O=e=>T(e)===Number&&!Number.isNaN(e),z=C,R=e=>T(e)===Boolean,F=A,N=I,B=M,j=e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,V=e=>S(e,Event),$=e=>S(e,KeyboardEvent),U=e=>S(e,TextTrack)||!E(e)&&C(e.kind),q=e=>S(e,Promise)&&A(e.then),G=e=>{if(S(e,window.URL))return!0;if(!C(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://"+e);try{return!P(new URL(t).hostname)}catch(e){return!1}},H=P;const W=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find(t=>void 0!==e.style[t]);return!!z(n)&&t[n]})();function Z(e,t){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}},t)}const X={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Y(e,t){return t.split(".").reduce((e,t)=>e&&e[t],e)}function Q(e={},...t){if(!t.length)return e;const n=t.shift();return L(n)?(Object.keys(n).forEach(t=>{L(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),Q(e[t],n[t])):Object.assign(e,{[t]:n[t]})}),Q(e,...t)):e}function K(e,t){const n=e.length?e:[e];Array.from(n).reverse().forEach((e,n)=>{const i=n>0?t.cloneNode(!0):t,r=e.parentNode,o=e.nextSibling;i.appendChild(e),o?r.insertBefore(i,o):r.appendChild(i)})}function J(e,t){j(e)&&!H(t)&&Object.entries(t).filter(([,e])=>!D(e)).forEach(([t,n])=>e.setAttribute(t,n))}function ee(e,t,n){const i=document.createElement(e);return L(t)&&J(i,t),z(n)&&(i.innerText=n),i}function te(e,t,n,i){j(t)&&t.appendChild(ee(e,n,i))}function ne(e){B(e)||N(e)?Array.from(e).forEach(ne):j(e)&&j(e.parentNode)&&e.parentNode.removeChild(e)}function ie(e){if(!j(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function re(e,t){return j(t)&&j(t.parentNode)&&j(e)?(t.parentNode.replaceChild(e,t),e):null}function oe(e,t){if(!z(e)||H(e))return{};const n={},i=Q({},t);return e.split(",").forEach(e=>{const t=e.trim(),r=t.replace(".",""),o=t.replace(/[[\]]/g,"").split("="),[s]=o,a=o.length>1?o[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":z(i.class)?n.class=`${i.class} ${r}`:n.class=r;break;case"#":n.id=t.replace("#","");break;case"[":n[s]=a}}),Q(i,n)}function se(e,t){if(!j(e))return;let n=t;R(n)||(n=!e.hidden),e.hidden=n}function ae(e,t,n){if(B(e))return Array.from(e).map(e=>ae(e,t,n));if(j(e)){let i="toggle";return void 0!==n&&(i=n?"add":"remove"),e.classList[i](t),e.classList.contains(t)}return!1}function le(e,t){return j(e)&&e.classList.contains(t)}function ce(e,t){const{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function ue(e){return this.elements.container.querySelectorAll(e)}function he(e){return this.elements.container.querySelector(e)}function de(e=null,t=!1){j(e)&&(e.focus({preventScroll:!0}),t&&ae(e,this.config.classNames.tabFocus))}const pe={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},fe={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t,n){const i=X.isIPhone&&n&&fe.playsinline,r=fe[e]||"html5"!==t;return{api:r,ui:r&&fe.rangeInput&&("video"!==e||!X.isIPhone||i)}},pip:!(X.isIPhone||!F(ee("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||ee("video").disablePictureInPicture)),airplay:F(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(H(e))return!1;const[t]=e.split("/");let n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(pe).includes(n)&&(n+=`; codecs="${pe[e]}"`);try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==W,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},me=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})();function ge(e,t,n,i=!1,r=!0,o=!1){if(!e||!("addEventListener"in e)||H(t)||!F(n))return;const s=t.split(" ");let a=o;me&&(a={passive:r,capture:o}),s.forEach(t=>{this&&this.eventListeners&&i&&this.eventListeners.push({element:e,type:t,callback:n,options:a}),e[i?"addEventListener":"removeEventListener"](t,n,a)})}function ye(e,t="",n,i=!0,r=!1){ge.call(this,e,t,n,!0,i,r)}function ve(e,t="",n,i=!0,r=!1){ge.call(this,e,t,n,!1,i,r)}function _e(e,t="",n,i=!0,r=!1){const o=(...s)=>{ve(e,t,o,i,r),n.apply(this,s)};ge.call(this,e,t,o,!0,i,r)}function xe(e,t="",n=!1,i={}){if(!j(e)||H(t))return;const r=new CustomEvent(t,{bubbles:n,detail:{...i,plyr:this}});e.dispatchEvent(r)}function be(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:t,type:n,callback:i,options:r}=e;t.removeEventListener(n,i,r)}),this.eventListeners=[])}function we(){return new Promise(e=>this.ready?setTimeout(e,0):ye.call(this,this.elements.container,"ready",e)).then(()=>{})}function Te(e){q(e)&&e.then(null,()=>{})}function Se(e){return N(e)?e.filter((t,n)=>e.indexOf(t)===n):e}function Ee(e,t){return N(e)&&e.length?e.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):null}const ke=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((e,[t,n])=>({...e,[t/n]:[t,n]}),{});function Ce(e){return!!(N(e)||z(e)&&e.includes(":"))&&(N(e)?e:e.split(":")).map(Number).every(O)}function Ae(e){if(!N(e)||!e.every(O))return null;const[t,n]=e,i=(e,t)=>0===t?e:i(t,e%t),r=i(t,n);return[t/r,n/r]}function Ie(e){const t=e=>Ce(e)?e.split(":").map(Number):null;let n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!H(this.embed)&&N(this.embed.ratio)&&({ratio:n}=this.embed),null===n&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;n=Ae([e,t])}return n}function Me(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,n=Ie.call(this,e);if(!N(n))return{};const[i,r]=n,o=100/i*r;if(window.CSS&&window.CSS.supports(`aspect-ratio: ${i}/${r}`)?t.style.aspectRatio=`${i}/${r}`:t.style.paddingBottom=o+"%",this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-o)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.toggle(this.config.classNames.videoFixedRatio,null!==n);return{padding:o,ratio:n}}function Pe(e,t,n=.05){const i=e/t,r=Ee(Object.keys(ke),i);return Math.abs(r-i)<=n?ke[r]:[e,t]}const De={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const t=e.getAttribute("type");return!!H(t)||fe.mime.call(this,t)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:De.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,H(this.config.ratio)||Me.call(e),Object.defineProperty(e.media,"quality",{get(){const t=De.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&F(e.config.quality.onChange))e.config.quality.onChange(t);else{const n=De.getSources.call(e).find(e=>Number(e.getAttribute("size"))===t);if(!n)return;const{currentTime:i,paused:r,preload:o,readyState:s,playbackRate:a}=e.media;e.media.src=n.getAttribute("src"),("none"!==o||s)&&(e.once("loadedmetadata",()=>{e.speed=a,e.currentTime=i,r||Te(e.play())}),e.media.load())}xe.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(ne(De.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Le(e,...t){return H(e)?e:e.toString().replace(/{(\d+)}/g,(e,n)=>t[n].toString())}const Oe=(e="",t="",n="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString()),ze=(e="")=>e.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase());function Re(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Oe(t,"-"," "),t=Oe(t,"_"," "),t=ze(t),Oe(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}function Fe(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Ne={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Be={get(e="",t={}){if(H(e)||H(t))return"";let n=Y(t.i18n,e);if(H(n))return Object.keys(Ne).includes(e)?Ne[e]:"";const i={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(i).forEach(([e,t])=>{n=Oe(n,e,t)}),n}};class je{constructor(t){e(this,"get",e=>{if(!je.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(H(t))return null;const n=JSON.parse(t);return z(e)&&e.length?n[e]:n}),e(this,"set",e=>{if(!je.supported||!this.enabled)return;if(!L(e))return;let t=this.get();H(t)&&(t={}),Q(t,e),window.localStorage.setItem(this.key,JSON.stringify(t))}),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function Ve(e,t="text"){return new Promise((n,i)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if("text"===t)try{n(JSON.parse(i.responseText))}catch(e){n(i.responseText)}else n(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",e,!0),i.responseType=t,i.send()}catch(e){i(e)}})}function $e(e,t){if(!z(e))return;const n=z(t);let i=!1;const r=()=>null!==document.getElementById(t),o=(e,t)=>{e.innerHTML=t,n&&r()||document.body.insertAdjacentElement("afterbegin",e)};if(!n||!r()){const r=je.supported,s=document.createElement("div");if(s.setAttribute("hidden",""),n&&s.setAttribute("id",t),r){const e=window.localStorage.getItem("cache-"+t);if(i=null!==e,i){const t=JSON.parse(e);o(s,t.content)}}Ve(e).then(e=>{H(e)||(r&&window.localStorage.setItem("cache-"+t,JSON.stringify({content:e})),o(s,e))}).catch(()=>{})}}const Ue=e=>Math.trunc(e/60/60%60,10);function qe(e=0,t=!1,n=!1){if(!O(e))return qe(void 0,t,n);const i=e=>("0"+e).slice(-2);let r=Ue(e);const o=(s=e,Math.trunc(s/60%60,10));var s;const a=(e=>Math.trunc(e%60,10))(e);return r=t||r>0?r+":":"",`${n&&e>0?"-":""}${r}${i(o)}:${i(a)}`}const Ge={getIconUrl(){const e=new URL(this.config.iconUrl,window.location).host!==window.location.host||X.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements(){try{return this.elements.controls=he.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ue.call(this,this.config.selectors.buttons.play),pause:he.call(this,this.config.selectors.buttons.pause),restart:he.call(this,this.config.selectors.buttons.restart),rewind:he.call(this,this.config.selectors.buttons.rewind),fastForward:he.call(this,this.config.selectors.buttons.fastForward),mute:he.call(this,this.config.selectors.buttons.mute),pip:he.call(this,this.config.selectors.buttons.pip),airplay:he.call(this,this.config.selectors.buttons.airplay),settings:he.call(this,this.config.selectors.buttons.settings),captions:he.call(this,this.config.selectors.buttons.captions),fullscreen:he.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=he.call(this,this.config.selectors.progress),this.elements.inputs={seek:he.call(this,this.config.selectors.inputs.seek),volume:he.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:he.call(this,this.config.selectors.display.buffer),currentTime:he.call(this,this.config.selectors.display.currentTime),duration:he.call(this,this.config.selectors.display.duration)},j(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector("."+this.config.classNames.tooltip)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const n="http://www.w3.org/2000/svg",i=Ge.getIconUrl.call(this),r=`${i.cors?"":i.url}#${this.config.iconPrefix}`,o=document.createElementNS(n,"svg");J(o,Q(t,{"aria-hidden":"true",focusable:"false"}));const s=document.createElementNS(n,"use"),a=`${r}-${e}`;return"href"in s&&s.setAttributeNS("http://www.w3.org/1999/xlink","href",a),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.appendChild(s),o},createLabel(e,t={}){const n=Be.get(e,this.config);return ee("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},n)},createBadge(e){if(H(e))return null;const t=ee("span",{class:this.config.classNames.menu.value});return t.appendChild(ee("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const n=Q({},t);let i=Re(e);const r={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(e=>{Object.keys(n).includes(e)&&(r[e]=n[e],delete n[e])}),"button"!==r.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").some(e=>e===this.config.classNames.control)||Q(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case"play":r.toggle=!0,r.label="play",r.labelPressed="pause",r.icon="play",r.iconPressed="pause";break;case"mute":r.toggle=!0,r.label="mute",r.labelPressed="unmute",r.icon="volume",r.iconPressed="muted";break;case"captions":r.toggle=!0,r.label="enableCaptions",r.labelPressed="disableCaptions",r.icon="captions-off",r.iconPressed="captions-on";break;case"fullscreen":r.toggle=!0,r.label="enterFullscreen",r.labelPressed="exitFullscreen",r.icon="enter-fullscreen",r.iconPressed="exit-fullscreen";break;case"play-large":n.class+=` ${this.config.classNames.control}--overlaid`,i="play",r.label="play",r.icon="play";break;default:H(r.label)&&(r.label=i),H(r.icon)&&(r.icon=e)}const o=ee(r.element);return r.toggle?(o.appendChild(Ge.createIcon.call(this,r.iconPressed,{class:"icon--pressed"})),o.appendChild(Ge.createIcon.call(this,r.icon,{class:"icon--not-pressed"})),o.appendChild(Ge.createLabel.call(this,r.labelPressed,{class:"label--pressed"})),o.appendChild(Ge.createLabel.call(this,r.label,{class:"label--not-pressed"}))):(o.appendChild(Ge.createIcon.call(this,r.icon)),o.appendChild(Ge.createLabel.call(this,r.label))),Q(n,oe(this.config.selectors.buttons[i],n)),J(o,n),"play"===i?(N(this.elements.buttons[i])||(this.elements.buttons[i]=[]),this.elements.buttons[i].push(o)):this.elements.buttons[i]=o,o},createRange(e,t){const n=ee("input",Q(oe(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Be.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Ge.updateRangeFill.call(this,n),w.setup(n),n},createProgress(e,t){const n=ee("progress",Q(oe(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(ee("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],i=t?Be.get(t,this.config):"";n.innerText="% "+i.toLowerCase()}return this.elements.display[e]=n,n},createTime(e,t){const n=oe(this.config.selectors.display[e],t),i=ee("div",Q(n,{class:`${n.class?n.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Be.get(e,this.config)}),"00:00");return this.elements.display[e]=i,i},bindMenuItemShortcuts(e,t){ye.call(this,e,"keydown keyup",n=>{if(![32,38,39,40].includes(n.which))return;if(n.preventDefault(),n.stopPropagation(),"keydown"===n.type)return;const i=ce(e,'[role="menuitemradio"]');if(!i&&[32,39].includes(n.which))Ge.showMenuPanel.call(this,t,!0);else{let t;32!==n.which&&(40===n.which||i&&39===n.which?(t=e.nextElementSibling,j(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,j(t)||(t=e.parentNode.lastElementChild)),de.call(this,t,!0))}},!1),ye.call(this,e,"keyup",e=>{13===e.which&&Ge.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:t,type:n,title:i,badge:r=null,checked:o=!1}){const s=oe(this.config.selectors.inputs[n]),a=ee("button",Q(s,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${s.class?s.class:""}`.trim(),"aria-checked":o,value:e})),l=ee("span");l.innerHTML=i,j(r)&&l.appendChild(r),a.appendChild(l),Object.defineProperty(a,"checked",{enumerable:!0,get:()=>"true"===a.getAttribute("aria-checked"),set(e){e&&Array.from(a.parentNode.children).filter(e=>ce(e,'[role="menuitemradio"]')).forEach(e=>e.setAttribute("aria-checked","false")),a.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(a,"click keyup",t=>{if(!$(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),a.checked=!0,n){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}Ge.showMenuPanel.call(this,"home",$(t))}},n,!1),Ge.bindMenuItemShortcuts.call(this,a,n),t.appendChild(a)},formatTime(e=0,t=!1){return O(e)?qe(e,Ue(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){j(e)&&O(t)&&(e.innerText=Ge.formatTime(t,n))},updateVolume(){this.supported.ui&&(j(this.elements.inputs.volume)&&Ge.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),j(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){j(e)&&(e.value=t,Ge.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!V(e))return;let t=0;const n=(e,t)=>{const n=O(t)?t:0,i=j(e)?e:this.elements.display.buffer;if(j(i)){i.value=n;const e=i.getElementsByTagName("span")[0];j(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=this.currentTime,r=this.duration,t=0===i||0===r||Number.isNaN(i)||Number.isNaN(r)?0:(i/r*100).toFixed(2),"timeupdate"===e.type&&Ge.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":n(this.elements.display.buffer,100*this.buffered)}var i,r},updateRangeFill(e){const t=V(e)?e.target:e;if(j(t)&&"range"===t.getAttribute("type")){if(ce(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Ge.formatTime(this.currentTime),n=Ge.formatTime(this.duration),i=Be.get("seekLabel",this.config);t.setAttribute("aria-valuetext",i.replace("{currentTime}",e).replace("{duration}",n))}else if(ce(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",e.toFixed(1)+"%")}else t.setAttribute("aria-valuenow",t.value);X.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){if(!this.config.tooltips.seek||!j(this.elements.inputs.seek)||!j(this.elements.display.seekTooltip)||0===this.duration)return;const t=this.config.classNames.tooltip+"--visible",n=e=>ae(this.elements.display.seekTooltip,t,e);if(this.touch)return void n(!1);let i=0;const r=this.elements.progress.getBoundingClientRect();if(V(e))i=100/r.width*(e.pageX-r.left);else{if(!le(this.elements.display.seekTooltip,t))return;i=parseFloat(this.elements.display.seekTooltip.style.left,10)}i<0?i=0:i>100&&(i=100),Ge.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*i),this.elements.display.seekTooltip.style.left=i+"%",V(e)&&["mouseenter","mouseleave"].includes(e.type)&&n("mouseenter"===e.type)},timeUpdate(e){const t=!j(this.elements.display.duration)&&this.config.invertTime;Ge.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Ge.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return se(this.elements.display.currentTime,!0),void se(this.elements.progress,!0);j(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=j(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Ge.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Ge.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ge.updateSeekTooltip.call(this)},toggleMenuButton(e,t){se(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){const i=this.elements.settings.panels[e];let r=null,o=t;if("captions"===e)r=this.currentTrack;else{if(r=H(n)?this[e]:n,H(r)&&(r=this.config[e].default),!H(this.options[e])&&!this.options[e].includes(r))return void this.debug.warn(`Unsupported value of '${r}' for ${e}`);if(!this.config[e].options.includes(r))return void this.debug.warn(`Disabled value of '${r}' for ${e}`)}if(j(o)||(o=i&&i.querySelector('[role="menu"]')),!j(o))return;this.elements.settings.buttons[e].querySelector("."+this.config.classNames.menu.value).innerHTML=Ge.getLabel.call(this,e,r);const s=o&&o.querySelector(`[value="${r}"]`);j(s)&&(s.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?Be.get("normal",this.config):t+"&times;";case"quality":if(O(t)){const e=Be.get("qualityLabel."+t,this.config);return e.length?e:t+"p"}return ze(t);case"captions":return Ze.getLabel.call(this);default:return null}},setQualityMenu(e){if(!j(this.elements.settings.panels.quality))return;const t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');N(e)&&(this.options.quality=Se(e).filter(e=>this.config.quality.options.includes(e)));const i=!H(this.options.quality)&&this.options.quality.length>1;if(Ge.toggleMenuButton.call(this,t,i),ie(n),Ge.checkMenu.call(this),!i)return;const r=e=>{const t=Be.get("qualityBadge."+e,this.config);return t.length?Ge.createBadge.call(this,t):null};this.options.quality.sort((e,t)=>{const n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1}).forEach(e=>{Ge.createMenuItem.call(this,{value:e,list:n,type:t,title:Ge.getLabel.call(this,"quality",e),badge:r(e)})}),Ge.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!j(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Ze.getTracks.call(this),i=Boolean(n.length);if(Ge.toggleMenuButton.call(this,e,i),ie(t),Ge.checkMenu.call(this),!i)return;const r=n.map((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:Ze.getLabel.call(this,e),badge:e.language&&Ge.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"}));r.unshift({value:-1,checked:!this.captions.toggled,title:Be.get("disabled",this.config),list:t,type:"language"}),r.forEach(Ge.createMenuItem.bind(this)),Ge.updateSetting.call(this,e,t)},setSpeedMenu(){if(!j(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(e=>e>=this.minimumSpeed&&e<=this.maximumSpeed);const n=!H(this.options.speed)&&this.options.speed.length>1;Ge.toggleMenuButton.call(this,e,n),ie(t),Ge.checkMenu.call(this),n&&(this.options.speed.forEach(n=>{Ge.createMenuItem.call(this,{value:n,list:t,type:e,title:Ge.getLabel.call(this,"speed",n)})}),Ge.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!H(e)&&Object.values(e).some(e=>!e.hidden);se(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;j(n)||(n=Object.values(this.elements.settings.panels).find(e=>!e.hidden));const i=n.querySelector('[role^="menuitem"]');de.call(this,i,t)},toggleMenu(e){const{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!j(t)||!j(n))return;const{hidden:i}=t;let r=i;if(R(e))r=e;else if($(e)&&27===e.which)r=!1;else if(V(e)){const i=F(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(i);if(o||!o&&e.target!==n&&r)return}n.setAttribute("aria-expanded",r),se(t,!r),ae(this.elements.container,this.config.classNames.menu.open,r),r&&$(e)?Ge.focusFirstMenuItem.call(this,null,!0):r||i||de.call(this,n,$(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const n=t.scrollWidth,i=t.scrollHeight;return ne(t),{width:n,height:i}},showMenuPanel(e="",t=!1){const n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!j(n))return;const i=n.parentNode,r=Array.from(i.children).find(e=>!e.hidden);if(fe.transitions&&!fe.reducedMotion){i.style.width=r.scrollWidth+"px",i.style.height=r.scrollHeight+"px";const e=Ge.getMenuSize.call(this,n),t=e=>{e.target===i&&["width","height"].includes(e.propertyName)&&(i.style.width="",i.style.height="",ve.call(this,i,W,t))};ye.call(this,i,W,t),i.style.width=e.width+"px",i.style.height=e.height+"px"}se(r,!0),se(n,!1),Ge.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){const e=this.elements.buttons.download;j(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:n,createProgress:i,createRange:r,createTime:o,setQualityMenu:s,setSpeedMenu:a,showMenuPanel:l}=Ge;this.elements.controls=null,N(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));const c=ee("div",oe(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return Se(N(this.config.controls)?this.config.controls:[]).forEach(s=>{if("restart"===s&&c.appendChild(n.call(this,"restart",u)),"rewind"===s&&c.appendChild(n.call(this,"rewind",u)),"play"===s&&c.appendChild(n.call(this,"play",u)),"fast-forward"===s&&c.appendChild(n.call(this,"fast-forward",u)),"progress"===s){const t=ee("div",{class:u.class+" plyr__progress__container"}),n=ee("div",oe(this.config.selectors.progress));if(n.appendChild(r.call(this,"seek",{id:"plyr-seek-"+e.id})),n.appendChild(i.call(this,"buffer")),this.config.tooltips.seek){const e=ee("span",{class:this.config.classNames.tooltip},"00:00");n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===s&&c.appendChild(o.call(this,"currentTime",u)),"duration"===s&&c.appendChild(o.call(this,"duration",u)),"mute"===s||"volume"===s){let{volume:t}=this.elements;if(j(t)&&c.contains(t)||(t=ee("div",Q({},u,{class:(u.class+" plyr__volume").trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===s&&t.appendChild(n.call(this,"mute")),"volume"===s&&!X.isIos){const n={max:1,step:.05,value:this.config.volume};t.appendChild(r.call(this,"volume",Q(n,{id:"plyr-volume-"+e.id})))}}if("captions"===s&&c.appendChild(n.call(this,"captions",u)),"settings"===s&&!H(this.config.settings)){const i=ee("div",Q({},u,{class:(u.class+" plyr__menu").trim(),hidden:""}));i.appendChild(n.call(this,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id,"aria-expanded":!1}));const r=ee("div",{class:"plyr__menu__container",id:"plyr-settings-"+e.id,hidden:""}),o=ee("div"),s=ee("div",{id:`plyr-settings-${e.id}-home`}),a=ee("div",{role:"menu"});s.appendChild(a),o.appendChild(s),this.elements.settings.panels.home=s,this.config.settings.forEach(n=>{const i=ee("button",Q(oe(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,i,n),ye.call(this,i,"click",()=>{l.call(this,n,!1)});const r=ee("span",null,Be.get(n,this.config)),s=ee("span",{class:this.config.classNames.menu.value});s.innerHTML=e[n],r.appendChild(s),i.appendChild(r),a.appendChild(i);const c=ee("div",{id:`plyr-settings-${e.id}-${n}`,hidden:""}),u=ee("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});u.appendChild(ee("span",{"aria-hidden":!0},Be.get(n,this.config))),u.appendChild(ee("span",{class:this.config.classNames.hidden},Be.get("menuBack",this.config))),ye.call(this,c,"keydown",e=>{37===e.which&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))},!1),ye.call(this,u,"click",()=>{l.call(this,"home",!1)}),c.appendChild(u),c.appendChild(ee("div",{role:"menu"})),o.appendChild(c),this.elements.settings.buttons[n]=i,this.elements.settings.panels[n]=c}),r.appendChild(o),i.appendChild(r),c.appendChild(i),this.elements.settings.popup=r,this.elements.settings.menu=i}if("pip"===s&&fe.pip&&c.appendChild(n.call(this,"pip",u)),"airplay"===s&&fe.airplay&&c.appendChild(n.call(this,"airplay",u)),"download"===s){const e=Q({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!G(t)&&this.isEmbed&&Q(e,{icon:"logo-"+this.provider,label:this.provider}),c.appendChild(n.call(this,"download",e))}"fullscreen"===s&&c.appendChild(n.call(this,"fullscreen",u))}),this.isHTML5&&s.call(this,De.getQualityOptions.call(this)),a.call(this),c},inject(){if(this.config.loadSprite){const e=Ge.getIconUrl.call(this);e.cors&&$e(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let n,i=!0;if(F(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),j(this.config.controls)||z(this.config.controls)?e=this.config.controls:(e=Ge.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ze.getLabel.call(this)}),i=!1),i&&z(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach(([e,t])=>{n=Oe(n,`{${e}}`,t)}),n})(e)),z(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),j(n)||(n=this.elements.container),n[j(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),j(this.elements.controls)||Ge.findElements.call(this),!H(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:()=>le(e,t),set(n=!1){ae(e,t,n)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(t=>{N(t)||B(t)?Array.from(t).filter(Boolean).forEach(e):e(t)})}if(X.isEdge&&Z(n),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,i=ue.call(this,n);Array.from(i).forEach(e=>{ae(e,this.config.classNames.hidden,!1),ae(e,this.config.classNames.tooltip,!0)})}}};function He(e,t=!0){let n=e;if(t){const e=document.createElement("a");e.href=n,n=e.href}try{return new URL(n)}catch(e){return null}}function We(e){const t=new URLSearchParams;return L(e)&&Object.entries(e).forEach(([e,n])=>{t.set(e,n)}),t}const Ze={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!fe.textTracks)return void(N(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ge.setCaptionsMenu.call(this));var e,t;if(j(this.elements.captions)||(this.elements.captions=ee("div",oe(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,j(e)&&j(t)&&t.parentNode.insertBefore(e,t.nextSibling)),X.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach(e=>{const t=e.getAttribute("src"),n=He(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Ve(t,"blob").then(t=>{e.setAttribute("src",window.URL.createObjectURL(t))}).catch(()=>{ne(e)})})}const n=Se((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(e=>e.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&([i]=n);let r=this.storage.get("captions");if(R(r)||({active:r}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:r,language:i,languages:n}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";ye.call(this,this.media.textTracks,e,Ze.update.bind(this))}setTimeout(Ze.update.bind(this),0)},update(){const e=Ze.getTracks.call(this,!0),{active:t,language:n,meta:i,currentTrackNode:r}=this.captions,o=Boolean(e.find(e=>e.language===n));this.isHTML5&&this.isVideo&&e.filter(e=>!i.get(e)).forEach(e=>{this.debug.log("Track added",e),i.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),ye.call(this,e,"cuechange",()=>Ze.updateCues.call(this))}),(o&&this.language!==n||!e.includes(r))&&(Ze.setLanguage.call(this,n),Ze.toggle.call(this,t&&o)),ae(this.elements.container,this.config.classNames.captions.enabled,!H(e)),N(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ge.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:n}=this.captions,i=this.config.classNames.captions.active,r=D(e)?!n:e;if(r!==n){if(t||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!t){const e=Ze.getTracks.call(this),t=Ze.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Ze.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),ae(this.elements.container,i,r),this.captions.toggled=r,Ge.updateSetting.call(this,"captions"),xe.call(this,this.media,r?"captionsenabled":"captionsdisabled")}setTimeout(()=>{r&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,t=!0){const n=Ze.getTracks.call(this);if(-1!==e)if(O(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const i=n[e],{language:r}=i||{};this.captions.currentTrackNode=i,Ge.updateSetting.call(this,"captions"),t||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),xe.call(this,this.media,"languagechange")}Ze.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Ze.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Ze.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!z(e))return void this.debug.warn("Invalid language argument",e);const n=e.toLowerCase();this.captions.language=n;const i=Ze.getTracks.call(this),r=Ze.findTrack.call(this,[n]);Ze.set.call(this,i.indexOf(r),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(t=>!this.isHTML5||e||this.captions.meta.has(t)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(e,t=!1){const n=Ze.getTracks.call(this),i=e=>Number((this.captions.meta.get(e)||{}).default),r=Array.from(n).sort((e,t)=>i(t)-i(e));let o;return e.every(e=>(o=r.find(t=>t.language===e),!o)),o||(t?r[0]:void 0)},getCurrentTrack(){return Ze.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!U(t)&&fe.textTracks&&this.captions.toggled&&(t=Ze.getCurrentTrack.call(this)),U(t)?H(t.label)?H(t.language)?Be.get("enabled",this.config):e.language.toUpperCase():t.label:Be.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!j(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!D(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Ze.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map(e=>e.getCueAsHTML()).map(Fe)}const n=t.map(e=>e.trim()).join("\n");if(n!==this.elements.captions.innerHTML){ie(this.elements.captions);const e=ee("span",oe(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e),xe.call(this,this.media,"cuechange")}}},Xe={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.7/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Ye="picture-in-picture",Qe="inline",Ke={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Je="audio",et="video",tt=()=>{};class nt{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):tt}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):tt}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):tt}}class it{constructor(t){e(this,"onChange",()=>{if(!this.enabled)return;const e=this.player.elements.buttons.fullscreen;j(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;xe.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)}),e(this,"toggleFallback",(e=!1)=>{if(e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",ae(this.target,this.player.config.classNames.fullscreen.fallback,e),X.isIos){let t=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const i=z(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!i,i||(t.content+=","+n)):this.cleanupViewport&&(t.content=t.content.split(",").filter(e=>e.trim()!==n).join(","))}this.onChange()}),e(this,"trapFocus",e=>{if(X.isIos||!this.active||"Tab"!==e.key||9!==e.keyCode)return;const t=document.activeElement,n=ue.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[i]=n,r=n[n.length-1];t!==r||e.shiftKey?t===i&&e.shiftKey&&(r.focus(),e.preventDefault()):(i.focus(),e.preventDefault())}),e(this,"update",()=>{if(this.enabled){let e;e=this.forceFallback?"Fallback (forced)":it.native?"Native":"Fallback",this.player.debug.log(e+" fullscreen enabled")}else this.player.debug.log("Fullscreen not supported and fallback disabled");ae(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),e(this,"enter",()=>{this.enabled&&(X.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!it.native||this.forceFallback?this.toggleFallback(!0):this.prefix?H(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),e(this,"exit",()=>{if(this.enabled)if(X.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),Te(this.player.play());else if(!it.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!H(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),e(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=t,this.prefix=it.prefix,this.property=it.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){const{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(ce.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),ye.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":this.prefix+"fullscreenchange",()=>{this.onChange()}),ye.call(this.player,this.player.elements.container,"dblclick",e=>{j(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")}),ye.call(this,this.player.elements.container,"keydown",e=>this.trapFocus(e)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return it.native&&!this.forceFallback}static get prefix(){if(F(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!F(document[t+"ExitFullscreen"])&&!F(document[t+"CancelFullScreen"]))&&(e=t,!0)),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get enabled(){return(it.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!it.native||this.forceFallback)return le(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?document[`${this.prefix}${this.property}Element`]:document.fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return X.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function rt(e,t=1){return new Promise((n,i)=>{const r=new Image,o=()=>{delete r.onload,delete r.onerror,(r.naturalWidth>=t?n:i)(r)};Object.assign(r,{onload:o,onerror:o,src:e})})}const ot={addStyleHook(){ae(this.elements.container,this.config.selectors.container.replace(".",""),!0),ae(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void ot.toggleNativeControls.call(this,!0);j(this.elements.controls)||(Ge.inject.call(this),this.listeners.controls()),ot.toggleNativeControls.call(this),this.isHTML5&&Ze.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ge.updateVolume.call(this),Ge.timeUpdate.call(this),ot.checkPlaying.call(this),ae(this.elements.container,this.config.classNames.pip.supported,fe.pip&&this.isHTML5&&this.isVideo),ae(this.elements.container,this.config.classNames.airplay.supported,fe.airplay&&this.isHTML5),ae(this.elements.container,this.config.classNames.isIos,X.isIos),ae(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{xe.call(this,this.media,"ready")},0),ot.setTitle.call(this),this.poster&&ot.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&Ge.durationUpdate.call(this)},setTitle(){let e=Be.get("play",this.config);if(z(this.config.title)&&!H(this.config.title)&&(e+=", "+this.config.title),Array.from(this.elements.buttons.play||[]).forEach(t=>{t.setAttribute("aria-label",e)}),this.isEmbed){const e=he.call(this,"iframe");if(!j(e))return;const t=H(this.config.title)?"video":this.config.title,n=Be.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){ae(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),we.call(this).then(()=>rt(e)).catch(t=>{throw e===this.poster&&ot.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),ot.togglePoster.call(this,!0),e)))},checkPlaying(e){ae(this.elements.container,this.config.classNames.playing,this.playing),ae(this.elements.container,this.config.classNames.paused,this.paused),ae(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Be.get(this.playing?"pause":"play",this.config))}),V(e)&&"timeupdate"===e.type||ot.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{ae(this.elements.container,this.config.classNames.loading,this.loading),ot.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!H(e)&&z(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),H(this.media.style)&&this.media.removeAttribute("style")}};class st{constructor(t){e(this,"firstTouch",()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,ae(t.container,e.config.classNames.isTouch,!0)}),e(this,"setTabFocus",e=>{const{player:t}=this,{elements:n}=t;if(clearTimeout(this.focusTimer),"keydown"===e.type&&9!==e.which)return;"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);const i=e.timeStamp-this.lastKeyDown<=20;("focus"!==e.type||i)&&((()=>{const e=t.config.classNames.tabFocus;ae(ue.call(t,"."+e),e,!1)})(),"focusout"!==e.type&&(this.focusTimer=setTimeout(()=>{const e=document.activeElement;n.container.contains(e)&&ae(document.activeElement,t.config.classNames.tabFocus,!0)},10)))}),e(this,"global",(e=!0)=>{const{player:t}=this;t.config.keyboard.global&&ge.call(t,window,"keydown keyup",this.handleKey,e,!1),ge.call(t,document.body,"click",this.toggleMenu,e),_e.call(t,document.body,"touchstart",this.firstTouch),ge.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)}),e(this,"container",()=>{const{player:e}=this,{config:t,elements:n,timers:i}=e;!t.keyboard.global&&t.keyboard.focused&&ye.call(e,n.container,"keydown keyup",this.handleKey,!1),ye.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",t=>{const{controls:r}=n;r&&"enterfullscreen"===t.type&&(r.pressed=!1,r.hover=!1);let o=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(ot.toggleControls.call(e,!0),o=e.touch?3e3:2e3),clearTimeout(i.controls),i.controls=setTimeout(()=>ot.toggleControls.call(e,!1),o)});const r=t=>{if(!t)return Me.call(e);const i=n.container.getBoundingClientRect(),{width:r,height:o}=i;return Me.call(e,`${r}:${o}`)},o=()=>{clearTimeout(i.resized),i.resized=setTimeout(r,50)};ye.call(e,n.container,"enterfullscreen exitfullscreen",t=>{const{target:i,usingNative:s}=e.fullscreen;if(i!==n.container)return;if(!e.isEmbed&&H(e.config.ratio))return;const a="enterfullscreen"===t.type,{padding:l,ratio:c}=r(a);((t,n,i)=>{if(!e.isVimeo||e.config.vimeo.premium)return;const r=e.elements.wrapper.firstChild,[,o]=t,[s,a]=Ie.call(e);r.style.maxWidth=i?o/a*s+"px":null,r.style.margin=i?"0 auto":null})(c,0,a),a&&setTimeout(()=>Z(n.container),100),s||(a?ye.call(e,window,"resize",o):ve.call(e,window,"resize",o))})}),e(this,"media",()=>{const{player:e}=this,{elements:t}=e;if(ye.call(e,e.media,"timeupdate seeking seeked",t=>Ge.timeUpdate.call(e,t)),ye.call(e,e.media,"durationchange loadeddata loadedmetadata",t=>Ge.durationUpdate.call(e,t)),ye.call(e,e.media,"ended",()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())}),ye.call(e,e.media,"progress playing seeking seeked",t=>Ge.updateProgress.call(e,t)),ye.call(e,e.media,"volumechange",t=>Ge.updateVolume.call(e,t)),ye.call(e,e.media,"playing play pause ended emptied timeupdate",t=>ot.checkPlaying.call(e,t)),ye.call(e,e.media,"waiting canplay seeked playing",t=>ot.checkLoading.call(e,t)),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const n=he.call(e,"."+e.config.classNames.video);if(!j(n))return;ye.call(e,t.container,"click",i=>{([t.container,n].includes(i.target)||n.contains(i.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(i,e.restart,"restart"),this.proxy(i,()=>{Te(e.play())},"play")):this.proxy(i,()=>{Te(e.togglePlay())},"play")))})}e.supported.ui&&e.config.disableContextMenu&&ye.call(e,t.wrapper,"contextmenu",e=>{e.preventDefault()},!1),ye.call(e,e.media,"volumechange",()=>{e.storage.set({volume:e.volume,muted:e.muted})}),ye.call(e,e.media,"ratechange",()=>{Ge.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})}),ye.call(e,e.media,"qualitychange",t=>{Ge.updateSetting.call(e,"quality",null,t.detail.quality)}),ye.call(e,e.media,"ready qualitychange",()=>{Ge.setDownloadUrl.call(e)});const n=e.config.events.concat(["keyup","keydown"]).join(" ");ye.call(e,e.media,n,n=>{let{detail:i={}}=n;"error"===n.type&&(i=e.media.error),xe.call(e,t.container,n.type,!0,i)})}),e(this,"proxy",(e,t,n)=>{const{player:i}=this,r=i.config.listeners[n];let o=!0;F(r)&&(o=r.call(i,e)),!1!==o&&F(t)&&t.call(i,e)}),e(this,"bind",(e,t,n,i,r=!0)=>{const{player:o}=this,s=o.config.listeners[i],a=F(s);ye.call(o,e,t,e=>this.proxy(e,n,i),r&&!a)}),e(this,"controls",()=>{const{player:e}=this,{elements:t}=e,n=X.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach(t=>{this.bind(t,"click",()=>{Te(e.togglePlay())},"play")}),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",()=>{e.lastSeekTime=Date.now(),e.rewind()},"rewind"),this.bind(t.buttons.fastForward,"click",()=>{e.lastSeekTime=Date.now(),e.forward()},"fastForward"),this.bind(t.buttons.mute,"click",()=>{e.muted=!e.muted},"mute"),this.bind(t.buttons.captions,"click",()=>e.toggleCaptions()),this.bind(t.buttons.download,"click",()=>{xe.call(e,e.media,"download")},"download"),this.bind(t.buttons.fullscreen,"click",()=>{e.fullscreen.toggle()},"fullscreen"),this.bind(t.buttons.pip,"click",()=>{e.pip="toggle"},"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",t=>{t.stopPropagation(),t.preventDefault(),Ge.toggleMenu.call(e,t)},null,!1),this.bind(t.buttons.settings,"keyup",t=>{const n=t.which;[13,32].includes(n)&&(13!==n?(t.preventDefault(),t.stopPropagation(),Ge.toggleMenu.call(e,t)):Ge.focusFirstMenuItem.call(e,null,!0))},null,!1),this.bind(t.settings.menu,"keydown",t=>{27===t.which&&Ge.toggleMenu.call(e,t)}),this.bind(t.inputs.seek,"mousedown mousemove",e=>{const n=t.progress.getBoundingClientRect(),i=100/n.width*(e.pageX-n.left);e.currentTarget.setAttribute("seek-value",i)}),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",t=>{const n=t.currentTarget,i=t.keyCode?t.keyCode:t.which,r="play-on-seeked";if($(t)&&39!==i&&37!==i)return;e.lastSeekTime=Date.now();const o=n.hasAttribute(r),s=["mouseup","touchend","keyup"].includes(t.type);o&&s?(n.removeAttribute(r),Te(e.play())):!s&&e.playing&&(n.setAttribute(r,""),e.pause())}),X.isIos){const t=ue.call(e,'input[type="range"]');Array.from(t).forEach(e=>this.bind(e,n,e=>Z(e.target)))}this.bind(t.inputs.seek,n,t=>{const n=t.currentTarget;let i=n.getAttribute("seek-value");H(i)&&(i=n.value),n.removeAttribute("seek-value"),e.currentTime=i/n.max*e.duration},"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",t=>Ge.updateSeekTooltip.call(e,t)),this.bind(t.progress,"mousemove touchmove",t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)}),this.bind(t.progress,"mouseleave touchend click",()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)}),this.bind(t.progress,"mousedown touchstart",t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)}),this.bind(t.progress,"mouseup touchend",t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)}),X.isWebkit&&Array.from(ue.call(e,'input[type="range"]')).forEach(t=>{this.bind(t,"input",t=>Ge.updateRangeFill.call(e,t.target))}),e.config.toggleInvert&&!j(t.display.duration)&&this.bind(t.display.currentTime,"click",()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Ge.timeUpdate.call(e))}),this.bind(t.inputs.volume,n,t=>{e.volume=t.target.value},"volume"),this.bind(t.controls,"mouseenter mouseleave",n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type}),t.fullscreen&&Array.from(t.fullscreen.children).filter(e=>!e.contains(t.container)).forEach(n=>{this.bind(n,"mouseenter mouseleave",n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type})}),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)}),this.bind(t.controls,"focusin",()=>{const{config:n,timers:i}=e;ae(t.controls,n.classNames.noTransition,!0),ot.toggleControls.call(e,!0),setTimeout(()=>{ae(t.controls,n.classNames.noTransition,!1)},0);const r=this.touch?3e3:4e3;clearTimeout(i.controls),i.controls=setTimeout(()=>ot.toggleControls.call(e,!1),r)}),this.bind(t.inputs.volume,"wheel",t=>{const n=t.webkitDirectionInvertedFromDevice,[i,r]=[t.deltaX,-t.deltaY].map(e=>n?-e:e),o=Math.sign(Math.abs(i)>Math.abs(r)?i:r);e.increaseVolume(o/50);const{volume:s}=e.media;(1===o&&s<1||-1===o&&s>0)&&t.preventDefault()},"volume",!1)}),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,i=e.keyCode?e.keyCode:e.which,r="keydown"===e.type,o=r&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&O(i))if(r){const r=document.activeElement;if(j(r)){const{editable:i}=t.config.selectors,{seek:o}=n.inputs;if(r!==o&&ce(r,i))return;if(32===e.which&&ce(r,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:o||(t.currentTime=t.duration/10*(i-48));break;case 32:case 75:o||Te(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:o||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:o||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===i&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}toggleMenu(e){Ge.toggleMenu.call(this.player,e)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof t||"undefined"!=typeof self&&self;var at=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){},t={},n={},i={};function r(e,t){e=e.push?e:[e];var r,o,s,a=[],l=e.length,c=l;for(r=function(e,n){n.length&&a.push(e),--c||t(a)};l--;)o=e[l],(s=n[o])?r(o,s):(i[o]=i[o]||[]).push(r)}function o(e,t){if(e){var r=i[e];if(n[e]=t,r)for(;r.length;)r[0](e,t),r.splice(0,1)}}function s(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function a(t,n,i,r){var o,s,l=document,c=i.async,u=(i.numRetries||0)+1,h=i.before||e,d=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(d)?((s=l.createElement("link")).rel="stylesheet",s.href=p,(o="hideFocus"in s)&&s.relList&&(o=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(s=l.createElement("img")).src=p:((s=l.createElement("script")).src=t,s.async=void 0===c||c),s.onload=s.onerror=s.onbeforeload=function(e){var l=e.type[0];if(o)try{s.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((r+=1)<u)return a(t,n,i,r)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";n(t,l,e.defaultPrevented)},!1!==h(t,s)&&l.head.appendChild(s)}function l(e,t,n){var i,r,o=(e=e.push?e:[e]).length,s=o,l=[];for(i=function(e,n,i){if("e"==n&&l.push(e),"b"==n){if(!i)return;l.push(e)}--o||t(l)},r=0;r<s;r++)a(e[r],i,n)}function c(e,n,i){var r,a;if(n&&n.trim&&(r=n),a=(r?i:n)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,n){l(e,(function(e){s(a,e),t&&s({success:t,error:n},e),o(r,e)}),a)}if(a.returnPromise)return new Promise(c);c()}return c.ready=function(e,t){return r(e,(function(e){s(t,e)})),c},c.done=function(e){o(e,[])},c.reset=function(){t={},n={},i={}},c.isDefined=function(e){return e in t},c}()}));function lt(e){return new Promise((t,n)=>{at(e,{success:t,error:n})})}function ct(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,xe.call(this,this.media,e?"play":"pause"))}const ut={setup(){const e=this;ae(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Me.call(e),L(window.Vimeo)?ut.ready.call(e):lt(e.config.urls.vimeo.sdk).then(()=>{ut.ready.call(e)}).catch(t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready(){const e=this,t=e.config.vimeo,{premium:n,referrerPolicy:i,...r}=t;n&&Object.assign(r,{controls:!1,sidedock:!1});const o=We({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...r});let s=e.media.getAttribute("src");H(s)&&(s=e.media.getAttribute(e.config.attributes.embed.id));const a=H(l=s)?null:O(Number(l))?l:l.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:l;var l;const c=ee("iframe"),u=Le(e.config.urls.vimeo.iframe,a,o);if(c.setAttribute("src",u),c.setAttribute("allowfullscreen",""),c.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),H(i)||c.setAttribute("referrerPolicy",i),n||!t.customControls)c.setAttribute("data-poster",e.poster),e.media=re(c,e.media);else{const t=ee("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(c),e.media=re(t,e.media)}t.customControls||Ve(Le(e.config.urls.vimeo.api,u)).then(t=>{!H(t)&&t.thumbnail_url&&ot.setPoster.call(e,t.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(c,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(ct.call(e,!0),e.embed.play()),e.media.pause=()=>(ct.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(t){const{embed:n,media:i,paused:r,volume:o}=e,s=r&&!n.hasPlayed;i.seeking=!0,xe.call(e,i,"seeking"),Promise.resolve(s&&n.setVolume(0)).then(()=>n.setCurrentTime(t)).then(()=>s&&n.pause()).then(()=>s&&n.setVolume(o)).catch(()=>{})}});let d=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>d,set(t){e.embed.setPlaybackRate(t).then(()=>{d=t,xe.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:p}=e.config;Object.defineProperty(e.media,"volume",{get:()=>p,set(t){e.embed.setVolume(t).then(()=>{p=t,xe.call(e,e.media,"volumechange")})}});let{muted:f}=e.config;Object.defineProperty(e.media,"muted",{get:()=>f,set(t){const n=!!R(t)&&t;e.embed.setVolume(n?0:e.config.volume).then(()=>{f=n,xe.call(e,e.media,"volumechange")})}});let m,{loop:g}=e.config;Object.defineProperty(e.media,"loop",{get:()=>g,set(t){const n=R(t)?t:e.config.loop.active;e.embed.setLoop(n).then(()=>{g=n})}}),e.embed.getVideoUrl().then(t=>{m=t,Ge.setDownloadUrl.call(e)}).catch(e=>{this.debug.warn(e)}),Object.defineProperty(e.media,"currentSrc",{get:()=>m}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(t=>{const[n,i]=t;e.embed.ratio=Pe(n,i),Me.call(this)}),e.embed.setAutopause(e.config.autopause).then(t=>{e.config.autopause=t}),e.embed.getVideoTitle().then(t=>{e.config.title=t,ot.setTitle.call(this)}),e.embed.getCurrentTime().then(t=>{h=t,xe.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(t=>{e.media.duration=t,xe.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(t=>{e.media.textTracks=t,Ze.setup.call(e)}),e.embed.on("cuechange",({cues:t=[]})=>{const n=t.map(e=>function(e){const t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.innerText}(e.text));Ze.updateCues.call(e,n)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(t=>{ct.call(e,!t),t||xe.call(e,e.media,"playing")}),j(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{xe.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{xe.call(e,e.media,"playing")}),e.embed.on("play",()=>{ct.call(e,!0),xe.call(e,e.media,"playing")}),e.embed.on("pause",()=>{ct.call(e,!1)}),e.embed.on("timeupdate",t=>{e.media.seeking=!1,h=t.seconds,xe.call(e,e.media,"timeupdate")}),e.embed.on("progress",t=>{e.media.buffered=t.percent,xe.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&xe.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(t=>{t!==e.media.duration&&(e.media.duration=t,xe.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,xe.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,xe.call(e,e.media,"ended")}),e.embed.on("error",t=>{e.media.error=t,xe.call(e,e.media,"error")}),t.customControls&&setTimeout(()=>ot.build.call(e),0)}};function ht(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,xe.call(this,this.media,e?"play":"pause"))}function dt(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const pt={setup(){if(ae(this.elements.wrapper,this.config.classNames.embed,!0),L(window.YT)&&F(window.YT.Player))pt.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{F(e)&&e(),pt.ready.call(this)},lt(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(e){Ve(Le(this.config.urls.youtube.api,e)).then(e=>{if(L(e)){const{title:t,height:n,width:i}=e;this.config.title=t,ot.setTitle.call(this),this.embed.ratio=Pe(i,n)}Me.call(this)}).catch(()=>{Me.call(this)})},ready(){const e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(!H(n)&&n.startsWith("youtube-"))return;let i=e.media.getAttribute("src");H(i)&&(i=e.media.getAttribute(this.config.attributes.embed.id));const r=H(o=i)?null:o.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:o;var o;const s=ee("div",{id:`${e.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":t.customControls?e.poster:void 0});if(e.media=re(s,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${r}/${e}default.jpg`;rt(t("maxres"),121).catch(()=>rt(t("sd"),121)).catch(()=>rt(t("hq"))).then(t=>ot.setPoster.call(e,t.src)).then(t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:r,host:dt(t),playerVars:Q({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const n=t.data,i={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occured";e.media.error={code:n,message:i},xe.call(e,e.media,"error")}},onPlaybackRateChange(t){const n=t.target;e.media.playbackRate=n.getPlaybackRate(),xe.call(e,e.media,"ratechange")},onReady(n){if(F(e.media.play))return;const i=n.target;pt.getTitle.call(e,r),e.media.play=()=>{ht.call(e,!0),i.playVideo()},e.media.pause=()=>{ht.call(e,!1),i.pauseVideo()},e.media.stop=()=>{i.stopVideo()},e.media.duration=i.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(i.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,xe.call(e,e.media,"seeking"),i.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>i.getPlaybackRate(),set(e){i.setPlaybackRate(e)}});let{volume:o}=e.config;Object.defineProperty(e.media,"volume",{get:()=>o,set(t){o=t,i.setVolume(100*o),xe.call(e,e.media,"volumechange")}});let{muted:s}=e.config;Object.defineProperty(e.media,"muted",{get:()=>s,set(t){const n=R(t)?t:s;s=n,i[n?"mute":"unMute"](),i.setVolume(100*o),xe.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>i.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const a=i.getAvailablePlaybackRates();e.options.speed=a.filter(t=>e.config.speed.options.includes(t)),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),xe.call(e,e.media,"timeupdate"),xe.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=i.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&xe.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),xe.call(e,e.media,"canplaythrough"))},200),t.customControls&&setTimeout(()=>ot.build.call(e),50)},onStateChange(n){const i=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,xe.call(e,e.media,"seeked")),n.data){case-1:xe.call(e,e.media,"timeupdate"),e.media.buffered=i.getVideoLoadedFraction(),xe.call(e,e.media,"progress");break;case 0:ht.call(e,!1),e.media.loop?(i.stopVideo(),i.playVideo()):xe.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ht.call(e,!0),xe.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{xe.call(e,e.media,"timeupdate")},50),e.media.duration!==i.getDuration()&&(e.media.duration=i.getDuration(),xe.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ht.call(e,!1);break;case 3:xe.call(e,e.media,"waiting")}xe.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}},ft={setup(){this.media?(ae(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ae(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ae(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=ee("div",{class:this.config.classNames.video}),K(this.media,this.elements.wrapper),this.elements.poster=ee("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?De.setup.call(this):this.isYouTube?pt.setup.call(this):this.isVimeo&&ut.setup.call(this)):this.debug.warn("No media element found!")}};class mt{constructor(t){e(this,"load",()=>{this.enabled&&(L(window.google)&&L(window.google.ima)?this.ready():lt(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),e(this,"ready",()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),e(this,"setupIMA",()=>{this.elements.container=ee("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,e=>this.onAdsManagerLoaded(e),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e=>this.onAdError(e),!1),this.requestAds()}),e(this,"requestAds",()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}}),e(this,"pollCountdown",(e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const e=qe(Math.max(this.manager.getRemainingTime(),0)),t=`${Be.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)},100)}),e(this,"onAdsManagerLoaded",e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e=>this.onAdError(e)),Object.keys(google.ima.AdEvent.Type).forEach(e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],e=>this.onAdEvent(e))}),this.trigger("loaded")}),e(this,"addCuePoints",()=>{H(this.cuePoints)||this.cuePoints.forEach(e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(j(t)){const n=100/this.player.duration*e,i=ee("span",{class:this.player.config.classNames.cues});i.style.left=n.toString()+"%",t.appendChild(i)}}})}),e(this,"onAdEvent",e=>{const{container:t}=this.player.elements,n=e.getAd(),i=e.getAdData();switch((e=>{xe.call(this.player,this.player.media,"ads"+e.replace(/_/g,"").toLowerCase())})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:i.adError&&this.player.debug.warn("Non-fatal ad error: "+i.adError.getMessage())}}),e(this,"onAdError",e=>{this.cancel(),this.player.debug.warn("Ads error",e)}),e(this,"listeners",()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{t=this.player.currentTime}),this.player.on("seeked",()=>{const e=this.player.currentTime;H(this.cuePoints)||this.cuePoints.forEach((n,i)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(i,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)})}),e(this,"play",()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}}).catch(()=>{})}),e(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Te(this.player.media.play())}),e(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),e(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),e(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(e=>{this.on("loaded",e),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),e(this,"trigger",(e,...t)=>{const n=this.events[e];N(n)&&n.forEach(e=>{F(e)&&e.apply(this,t)})}),e(this,"on",(e,t)=>(N(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this)),e(this,"startSafetyTimer",(e,t)=>{this.player.debug.log("Safety timer invoked from: "+t),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},e)}),e(this,"clearSafetyTimer",e=>{D(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: "+e),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((e,t)=>{this.on("loaded",e),this.on("error",t)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!H(e.publisherId)||G(e.tagUrl))}get tagUrl(){const{config:e}=this;return G(e.tagUrl)?e.tagUrl:"https://go.aniview.com/api/adserver6/vast/?"+We({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}}const gt=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(e=>{const n={};e.split(/\r\n|\n|\r/).forEach(e=>{if(O(n.startTime)){if(!H(e.trim())&&H(n.text)){const t=e.trim().split("#xywh=");[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(","))}}else{const t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number("0."+t[4]),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number("0."+t[9]))}}),n.text&&t.push(n)}),t},yt=(e,t)=>{const n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n};class vt{constructor(t){e(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)})}),e(this,"getThumbnails",()=>new Promise(e=>{const{src:t}=this.player.config.previewThumbnails;if(H(t))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort((e,t)=>e.height-t.height),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(F(t))t(e=>{this.thumbnails=e,n()});else{const e=(z(t)?[t]:t).map(e=>this.getThumbnail(e));Promise.all(e).then(n)}})),e(this,"getThumbnail",e=>new Promise(t=>{Ve(e).then(n=>{const i={frames:gt(n),height:null,urlPrefix:""};i.frames[0].text.startsWith("/")||i.frames[0].text.startsWith("http://")||i.frames[0].text.startsWith("https://")||(i.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{i.height=r.naturalHeight,i.width=r.naturalWidth,this.thumbnails.push(i),t()},r.src=i.urlPrefix+i.frames[0].text})})),e(this,"startMove",e=>{if(this.loaded&&V(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{const t=this.player.elements.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);this.seekTime=this.player.media.duration*(n/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=qe(this.seekTime)}this.showImageAtCurrentTime()}}),e(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),e(this,"startScrubbing",e=>{(D(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),e(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):_e.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),e(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),e(this,"render",()=>{this.elements.thumb.container=ee("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=ee("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=ee("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=ee("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(e),j(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=ee("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),e(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),e(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex(e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime),t=e>=0;let n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach((t,i)=>{this.loadedImages.includes(t.frames[e].text)&&(n=i)}),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))}),e(this,"loadImage",(e=0)=>{const t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:i}=n,r=n.frames[t],o=n.frames[t].text,s=i+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,r,e,t,o,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const n=new Image;n.src=s,n.dataset.index=t,n.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log("Loading image: "+s),n.onload=()=>this.showImage(n,r,e,t,o,!0),this.loadingImage=n,this.removeOldImages(n)}}),e(this,"showImage",(e,t,n,i,r,o=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${i}. qual: ${n}. newimg: ${o}`),this.setImageSizeAndOffset(e,t),o&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(i,!0).then(this.preloadNearby(i,!1)).then(this.getHigherQuality(n,e,t,r))}),e(this,"removeOldImages",e=>{Array.from(this.currentImageContainer.children).forEach(t=>{if("img"!==t.tagName.toLowerCase())return;const n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout(()=>{e.removeChild(t),this.player.debug.log("Removing thumb: "+t.dataset.filename)},n)}})}),e(this,"preloadNearby",(e,t=!0)=>new Promise(n=>{setTimeout(()=>{const i=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===i){let r;r=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let o=!1;r.forEach(e=>{const t=e.text;if(t!==i&&!this.loadedImages.includes(t)){o=!0,this.player.debug.log("Preloading thumb filename: "+t);const{urlPrefix:e}=this.thumbnails[0],i=e+t,r=new Image;r.src=i,r.onload=()=>{this.player.debug.log("Preloaded thumb filename: "+t),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}}),o||n()}},300)})),e(this,"getHigherQuality",(e,t,n,i)=>{if(e<this.thumbnails.length-1){let r=t.naturalHeight;this.usingSprites&&(r=n.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===i&&(this.player.debug.log("Showing higher quality thumb for: "+i),this.loadImage(e+1))},300)}}),e(this,"toggleThumbContainer",(e=!1,t=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"toggleScrubbingContainer",(e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),e(this,"setThumbContainerSizeAndPos",()=>{if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){const e=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width=e+"px"}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){const e=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=e+"px"}}else{const e=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=this.thumbContainerHeight+"px",this.elements.thumb.imageContainer.style.width=e+"px"}this.setThumbContainerPos()}),e(this,"setThumbContainerPos",()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,i=t.left-e.left+10,r=t.right-e.left-n.clientWidth-10;let o=this.mousePosX-e.left-n.clientWidth/2;o<i&&(o=i),o>r&&(o=r),n.style.left=o+"px"}),e(this,"setScrubbingContainerSize",()=>{const{width:e,height:t}=yt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=e+"px",this.elements.scrubbing.container.style.height=t+"px"}),e(this,"setImageSizeAndOffset",(e,t)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`}),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=yt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const _t={insertElements(e,t){z(t)?te(e,this.media,{src:t}):N(t)&&t.forEach(t=>{te(e,this.media,t)})},change(e){Y(e,"sources.length")?(De.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],ne(this.media),this.media=null,j(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:n}=e,[{provider:i=Ke.html5,src:r}]=t,o="html5"===i?n:"div",s="html5"===i?{}:{src:r};Object.assign(this,{provider:i,type:n,supported:fe.check(n,i,this.config.playsinline),media:ee(o,s)}),this.elements.container.appendChild(this.media),R(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),H(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),ot.addStyleHook.call(this),this.isHTML5&&_t.insertElements.call(this,"source",t),this.config.title=e.title,ft.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&_t.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ot.build.call(this),this.isHTML5&&this.media.load(),H(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vt(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class xt{constructor(t,n){if(e(this,"play",()=>F(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Te(this.media.play())),this.media.play()):null),e(this,"pause",()=>this.playing&&F(this.media.pause)?this.media.pause():null),e(this,"togglePlay",e=>(R(e)?e:!this.playing)?this.play():this.pause()),e(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):F(this.media.stop)&&this.media.stop()}),e(this,"restart",()=>{this.currentTime=0}),e(this,"rewind",e=>{this.currentTime-=O(e)?e:this.config.seekTime}),e(this,"forward",e=>{this.currentTime+=O(e)?e:this.config.seekTime}),e(this,"increaseVolume",e=>{const t=this.media.muted?0:this.volume;this.volume=t+(O(e)?e:0)}),e(this,"decreaseVolume",e=>{this.increaseVolume(-e)}),e(this,"airplay",()=>{fe.airplay&&this.media.webkitShowPlaybackTargetPicker()}),e(this,"toggleControls",e=>{if(this.supported.ui&&!this.isAudio){const t=le(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,i=ae(this.elements.container,this.config.classNames.hideControls,n);if(i&&N(this.config.controls)&&this.config.controls.includes("settings")&&!H(this.config.settings)&&Ge.toggleMenu.call(this,!1),i!==t){const e=i?"controlshidden":"controlsshown";xe.call(this,this.media,e)}return!i}return!1}),e(this,"on",(e,t)=>{ye.call(this,this.elements.container,e,t)}),e(this,"once",(e,t)=>{_e.call(this,this.elements.container,e,t)}),e(this,"off",(e,t)=>{ve(this.elements.container,e,t)}),e(this,"destroy",(e,t=!1)=>{if(!this.ready)return;const n=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(ne(this.elements.buttons.play),ne(this.elements.captions),ne(this.elements.controls),ne(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),F(e)&&e()):(be.call(this),De.cancelRequests.call(this),re(this.elements.original,this.elements.container),xe.call(this,this.elements.original,"destroyed",!0),F(e)&&e.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(ot.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&F(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))}),e(this,"supports",e=>fe.mime.call(this,e)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=fe.touch,this.media=t,z(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||B(this.media)||N(this.media))&&(this.media=this.media[0]),this.config=Q({},Xe,xt.defaults,n||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new nt(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",fe),D(this.media)||!j(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!fe.check().api)return void this.debug.error("Setup failed: no support");const i=this.media.cloneNode(!0);i.autoplay=!1,this.elements.original=i;const r=this.media.tagName.toLowerCase();let o=null,s=null;switch(r){case"div":if(o=this.media.querySelector("iframe"),j(o)){if(s=He(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Ke.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Ke.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){const e=["1","true"];e.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(H(this.provider)||!Object.values(Ke).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=et;break;case"video":case"audio":this.type=r,this.provider=Ke.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=fe.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new st(this),this.storage=new je(this),this.media.plyr=this,j(this.elements.container)||(this.elements.container=ee("div",{tabindex:0}),K(this.media,this.elements.container)),ot.migrateStyles.call(this),ot.addStyleHook.call(this),ft.setup.call(this),this.config.debug&&ye.call(this,this.elements.container,this.config.events.join(" "),e=>{this.debug.log("event: "+e.type)}),this.fullscreen=new it(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ot.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new mt(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Te(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Ke.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Ke.youtube}get isVimeo(){return this.provider===Ke.vimeo}get isVideo(){return this.type===et}get isAudio(){return this.type===Je}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=O(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return O(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=O(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;z(t)&&(t=Number(t)),O(t)||(t=this.storage.get("volume")),O(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!H(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;R(t)||(t=this.storage.get("muted")),R(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;O(e)&&(t=e),O(t)||(t=this.storage.get("speed")),O(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;t=function(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}(t,n,i),this.config.speed.selected=t,setTimeout(()=>{this.media.playbackRate=t},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!H(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(O),r=!0;if(!n.includes(i)){const e=Ee(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${e} instead`),i=e,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=R(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){_t.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return G(e)?e:this.source}set download(e){G(e)&&(this.config.urls.download=e,Ge.setDownloadUrl.call(this))}set poster(e){this.isVideo?ot.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=Ae(Ie.call(this));return N(e)?e.join(":"):e}set ratio(e){this.isVideo?z(e)&&Ce(e)?(this.config.ratio=Ae(e),Me.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){const t=R(e)?e:this.config.autoplay;this.config.autoplay=t}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Ze.toggle.call(this,e,!1)}set currentTrack(e){Ze.set.call(this,e,!1)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Ze.setLanguage.call(this,e,!1)}get language(){return(Ze.getCurrentTrack.call(this)||{}).language}set pip(e){if(!fe.pip)return;const t=R(e)?e:!this.pip;F(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ye:Qe),F(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return fe.pip?H(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ye:null}static supported(e,t,n){return fe.check(e,t,n)}static loadSprite(e,t){return $e(e,t)}static setup(e,t={}){let n=null;return z(e)?n=Array.from(document.querySelectorAll(e)):B(e)?n=Array.from(e):N(e)&&(n=e.filter(j)),H(n)?null:n.map(e=>new xt(e,t))}}var bt;return xt.defaults=(bt=Xe,JSON.parse(JSON.stringify(bt))),xt}))}).call(this,n("c8ba"))},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var i=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,!"/./"[e](t)}catch(r){}}return!0}},5168:function(e,t,n){var i=n("dbdb")("wks"),r=n("62a0"),o=n("e53d").Symbol,s="function"==typeof o,a=e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:r)("Symbol."+e))};a.store=i},"520a":function(e,t,n){"use strict";var i=n("0bfb"),r=RegExp.prototype.exec,o=String.prototype.replace,s=r,a="lastIndex",l=function(){var e=/a/,t=/b*/g;return r.call(e,"a"),r.call(t,"a"),0!==e[a]||0!==t[a]}(),c=void 0!==/()??/.exec("")[1],u=l||c;u&&(s=function(e){var t,n,s,u,h=this;return c&&(n=new RegExp("^"+h.source+"$(?!\\s)",i.call(h))),l&&(t=h[a]),s=r.call(h,e),l&&s&&(h[a]=h.global?s.index+s[0].length:t),c&&s&&s.length>1&&o.call(s[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(s[u]=void 0)})),s}),e.exports=s},5270:function(e,t,n){"use strict";var i=n("c532"),r=n("c401"),o=n("2e67"),s=n("2444");function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){a(e),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||s.adapter;return t(e).then((function(t){return a(e),t.data=r(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"52a7":function(e,t){t.f={}.propertyIsEnumerable},"53e2":function(e,t,n){var i=n("07e3"),r=n("241e"),o=n("5559")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},"549b":function(e,t,n){"use strict";var i=n("d864"),r=n("63b6"),o=n("241e"),s=n("b0dc"),a=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");r(r.S+r.F*!n("4ee1")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,h,d=o(e),p="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,y=0,v=u(d);if(g&&(m=i(m,f>2?arguments[2]:void 0,2)),void 0==v||p==Array&&a(v))for(t=l(d.length),n=new p(t);t>y;y++)c(n,y,g?m(d[y],y):d[y]);else for(h=v.call(d),n=new p;!(r=h.next()).done;y++)c(n,y,g?s(h,m,[r.value,y],!0):r.value);return n.length=y,n}})},"551c":function(e,t,n){"use strict";var i,r,o,s,a=n("2d00"),l=n("7726"),c=n("9b43"),u=n("23c6"),h=n("5ca1"),d=n("d3f4"),p=n("d8e8"),f=n("f605"),m=n("4a59"),g=n("ebd6"),y=n("1991").set,v=n("8079")(),_=n("a5b8"),x=n("9c80"),b=n("a25f"),w=n("bcaa"),T="Promise",S=l.TypeError,E=l.process,k=E&&E.versions,C=k&&k.v8||"",A=l[T],I="process"==u(E),M=function(){},P=r=_.f,D=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(M,M)};return(I||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==C.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(i){}}(),L=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){var i=e._v,r=1==e._s,o=0,s=function(t){var n,o,s,a=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{a?(r||(2==e._h&&F(e),e._h=1),!0===a?n=i:(u&&u.enter(),n=a(i),u&&(u.exit(),s=!0)),n===t.promise?c(S("Promise-chain cycle")):(o=L(n))?o.call(n,l,c):l(n)):c(i)}catch(h){u&&!s&&u.exit(),c(h)}};while(n.length>o)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&z(e)}))}},z=function(e){y.call(l,(function(){var t,n,i,r=e._v,o=R(e);if(o&&(t=x((function(){I?E.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),e._h=I||R(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(l,(function(){var t;I?E.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=L(e))?v((function(){var i={_w:n,_d:!1};try{t.call(e,c(B,i,1),c(N,i,1))}catch(r){N.call(i,r)}})):(n._v=e,n._s=1,O(n,!1))}catch(i){N.call({_w:n,_d:!1},i)}}};D||(A=function(e){f(this,A,T,"_h"),p(e),i.call(this);try{e(c(B,this,1),c(N,this,1))}catch(t){N.call(this,t)}},i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n("dcbc")(A.prototype,{then:function(e,t){var n=P(g(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=I?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i;this.promise=e,this.resolve=c(B,e,1),this.reject=c(N,e,1)},_.f=P=function(e){return e===A||e===s?new o(e):r(e)}),h(h.G+h.W+h.F*!D,{Promise:A}),n("7f20")(A,T),n("7a56")(T),s=n("8378")[T],h(h.S+h.F*!D,T,{reject:function(e){var t=P(this),n=t.reject;return n(e),t.promise}}),h(h.S+h.F*(a||!D),T,{resolve:function(e){return w(a&&this===s?A:this,e)}}),h(h.S+h.F*!(D&&n("5cc5")((function(e){A.all(e)["catch"](M)}))),T,{all:function(e){var t=this,n=P(t),i=n.resolve,r=n.reject,o=x((function(){var n=[],o=0,s=1;m(e,!1,(function(e){var a=o++,l=!1;n.push(void 0),s++,t.resolve(e).then((function(e){l||(l=!0,n[a]=e,--s||i(n))}),r)})),--s||i(n)}));return o.e&&r(o.v),n.promise},race:function(e){var t=this,n=P(t),i=n.reject,r=x((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},5537:function(e,t,n){var i=n("8378"),r=n("7726"),o="__core-js_shared__",s=r[o]||(r[o]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var i=n("dbdb")("keys"),r=n("62a0");e.exports=function(e){return i[e]||(i[e]=r(e))}},"55dd":function(e,t,n){"use strict";var i=n("5ca1"),r=n("d8e8"),o=n("4bf8"),s=n("79e5"),a=[].sort,l=[1,2,3];i(i.P+i.F*(s((function(){l.sort(void 0)}))||!s((function(){l.sort(null)}))||!n("2f213")(a)),"Array",{sort:function(e){return void 0===e?a.call(o(this)):a.call(o(this),r(e))}})},"584a":function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"589d":function(e,t,n){var i,r;/*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */(function(e){"use strict";if(!e.jQuery){var t=function(e,n){return new t.fn.init(e,n)};t.isWindow=function(e){return e&&e===e.window},t.type=function(e){return e?"object"===typeof e||"function"===typeof e?i[o.call(e)]||"object":typeof e:e+""},t.isArray=Array.isArray||function(e){return"array"===t.type(e)},t.isPlainObject=function(e){var n;if(!e||"object"!==t.type(e)||e.nodeType||t.isWindow(e))return!1;try{if(e.constructor&&!r.call(e,"constructor")&&!r.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}for(n in e);return void 0===n||r.call(e,n)},t.each=function(e,t,n){var i,r=0,o=e.length,s=l(e);if(n){if(s){for(;r<o;r++)if(i=t.apply(e[r],n),!1===i)break}else for(r in e)if(e.hasOwnProperty(r)&&(i=t.apply(e[r],n),!1===i))break}else if(s){for(;r<o;r++)if(i=t.call(e[r],r,e[r]),!1===i)break}else for(r in e)if(e.hasOwnProperty(r)&&(i=t.call(e[r],r,e[r]),!1===i))break;return e},t.data=function(e,i,r){if(void 0===r){var o=e[t.expando],s=o&&n[o];if(void 0===i)return s;if(s&&i in s)return s[i]}else if(void 0!==i){var a=e[t.expando]||(e[t.expando]=++t.uuid);return n[a]=n[a]||{},n[a][i]=r,r}},t.removeData=function(e,i){var r=e[t.expando],o=r&&n[r];o&&(i?t.each(i,(function(e,t){delete o[t]})):delete n[r])},t.extend=function(){var e,n,i,r,o,s,a=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"===typeof a&&(u=a,a=arguments[l]||{},l++),"object"!==typeof a&&"function"!==t.type(a)&&(a={}),l===c&&(a=this,l--);l<c;l++)if(o=arguments[l])for(r in o)o.hasOwnProperty(r)&&(e=a[r],i=o[r],a!==i&&(u&&i&&(t.isPlainObject(i)||(n=t.isArray(i)))?(n?(n=!1,s=e&&t.isArray(e)?e:[]):s=e&&t.isPlainObject(e)?e:{},a[r]=t.extend(u,s,i)):void 0!==i&&(a[r]=i)));return a},t.queue=function(e,n,i){function r(e,t){var n=t||[];return e&&(l(Object(e))?function(e,t){var n=+t.length,i=0,r=e.length;while(i<n)e[r++]=t[i++];if(n!==n)while(void 0!==t[i])e[r++]=t[i++];e.length=r}(n,"string"===typeof e?[e]:e):[].push.call(n,e)),n}if(e){n=(n||"fx")+"queue";var o=t.data(e,n);return i?(!o||t.isArray(i)?o=t.data(e,n,r(i)):o.push(i),o):o||[]}},t.dequeue=function(e,n){t.each(e.nodeType?[e]:e,(function(e,i){n=n||"fx";var r=t.queue(i,n),o=r.shift();"inprogress"===o&&(o=r.shift()),o&&("fx"===n&&r.unshift("inprogress"),o.call(i,(function(){t.dequeue(i,n)})))}))},t.fn=t.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(e){var t=e.offsetParent;while(t&&"html"!==t.nodeName.toLowerCase()&&t.style&&"static"===t.style.position.toLowerCase())t=t.offsetParent;return t||document}var n=this[0],i=e(n),r=this.offset(),o=/^(?:body|html)$/i.test(i.nodeName)?{top:0,left:0}:t(i).offset();return r.top-=parseFloat(n.style.marginTop)||0,r.left-=parseFloat(n.style.marginLeft)||0,i.style&&(o.top+=parseFloat(i.style.borderTopWidth)||0,o.left+=parseFloat(i.style.borderLeftWidth)||0),{top:r.top-o.top,left:r.left-o.left}}};var n={};t.expando="velocity"+(new Date).getTime(),t.uuid=0;for(var i={},r=i.hasOwnProperty,o=i.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),a=0;a<s.length;a++)i["[object "+s[a]+"]"]=s[a].toLowerCase();t.fn.init.prototype=t.fn,e.Velocity={Utilities:t}}function l(e){var n=e.length,i=t.type(e);return"function"!==i&&!t.isWindow(e)&&(!(1!==e.nodeType||!n)||("array"===i||0===n||"number"===typeof n&&n>0&&n-1 in e))}})(window),function(o){"use strict";"object"===typeof e.exports?e.exports=o():(i=o,r="function"===typeof i?i.call(t,n,t,e):i,void 0===r||(e.exports=r))}((function(){"use strict";return function(e,t,n,i){var r=function(){if(n.documentMode)return n.documentMode;for(var e=7;e>4;e--){var t=n.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]><span></span><![endif]--\x3e",t.getElementsByTagName("span").length)return t=null,e}return i}(),o=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var n,i=(new Date).getTime();return n=Math.max(0,16-(i-e)),e=i+n,setTimeout((function(){t(i+n)}),n)}}(),s=function(){var e=t.performance||{};if("function"!==typeof e.now){var n=e.timing&&e.timing.navigationStart?e.timing.navigationStart:(new Date).getTime();e.now=function(){return(new Date).getTime()-n}}return e}();function a(e){var t=-1,n=e?e.length:0,i=[];while(++t<n){var r=e[t];r&&i.push(r)}return i}var l=function(){var e=Array.prototype.slice;try{return e.call(n.documentElement),e}catch(t){return function(t,n){var i=this.length;if("number"!==typeof t&&(t=0),"number"!==typeof n&&(n=i),this.slice)return e.call(this,t,n);var r,o=[],s=t>=0?t:Math.max(0,i+t),a=n<0?i+n:Math.min(n,i),l=a-s;if(l>0)if(o=new Array(l),this.charAt)for(r=0;r<l;r++)o[r]=this.charAt(s+r);else for(r=0;r<l;r++)o[r]=this[s+r];return o}}}(),c=function(){return Array.prototype.includes?function(e,t){return e.includes(t)}:Array.prototype.indexOf?function(e,t){return e.indexOf(t)>=0}:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1}};function u(e){return d.isWrapped(e)?e=l.call(e):d.isNode(e)&&(e=[e]),e}var h,d={isNumber:function(e){return"number"===typeof e},isString:function(e){return"string"===typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isWrapped:function(e){return e&&e!==t&&d.isNumber(e.length)&&!d.isString(e)&&!d.isFunction(e)&&!d.isNode(e)&&(0===e.length||d.isNode(e[0]))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}},p=!1;if(e.fn&&e.fn.jquery?(h=e,p=!0):h=t.Velocity.Utilities,r<=8&&!p)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(!(r<=7)){var f=400,m="swing",g={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t.navigator.userAgent),isAndroid:/Android/i.test(t.navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(t.navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(t.navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:h,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:f,easing:m,begin:i,complete:i,progress:i,display:i,visibility:i,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(e){h.data(e,"velocity",{isSVG:d.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:2},debug:!1,timestamp:!0,pauseAll:function(e){var t=(new Date).getTime();h.each(g.State.calls,(function(t,n){if(n){if(e!==i&&(n[2].queue!==e||!1===n[2].queue))return!0;n[5]={resume:!1}}})),h.each(g.State.delayedElements,(function(e,n){n&&T(n,t)}))},resumeAll:function(e){var t=(new Date).getTime();h.each(g.State.calls,(function(t,n){if(n){if(e!==i&&(n[2].queue!==e||!1===n[2].queue))return!0;n[5]&&(n[5].resume=!0)}})),h.each(g.State.delayedElements,(function(e,n){n&&S(n,t)}))}};t.pageYOffset!==i?(g.State.scrollAnchor=t,g.State.scrollPropertyLeft="pageXOffset",g.State.scrollPropertyTop="pageYOffset"):(g.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,g.State.scrollPropertyLeft="scrollLeft",g.State.scrollPropertyTop="scrollTop");var y=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,i){var r={x:t.x+i.dx*n,v:t.v+i.dv*n,tension:t.tension,friction:t.friction};return{dx:r.v,dv:e(r)}}function n(n,i){var r={dx:n.v,dv:e(n)},o=t(n,.5*i,r),s=t(n,.5*i,o),a=t(n,i,s),l=1/6*(r.dx+2*(o.dx+s.dx)+a.dx),c=1/6*(r.dv+2*(o.dv+s.dv)+a.dv);return n.x=n.x+l*i,n.v=n.v+c*i,n}return function e(t,i,r){var o,s,a,l={x:-1,v:0,tension:null,friction:null},c=[0],u=0,h=1e-4,d=.016;t=parseFloat(t)||500,i=parseFloat(i)||20,r=r||null,l.tension=t,l.friction=i,o=null!==r,o?(u=e(t,i),s=u/r*d):s=d;while(1)if(a=n(a||l,s),c.push(1+a.x),u+=16,!(Math.abs(a.x)>h&&Math.abs(a.v)>h))break;return o?function(e){return c[e*(c.length-1)|0]}:u}}();g.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],(function(e,t){g.Easings[t[0]]=k.apply(null,t[1])}));var v=g.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<v.Lists.colors.length;e++){var t="color"===v.Lists.colors[e]?"0 0 0 1":"255 255 255 1";v.Hooks.templates[v.Lists.colors[e]]=["Red Green Blue Alpha",t]}var n,i,o;if(r)for(n in v.Hooks.templates)if(v.Hooks.templates.hasOwnProperty(n)){i=v.Hooks.templates[n],o=i[0].split(" ");var s=i[1].match(v.RegEx.valueSplit);"Color"===o[0]&&(o.push(o.shift()),s.push(s.shift()),v.Hooks.templates[n]=[o.join(" "),s.join(" ")])}for(n in v.Hooks.templates)if(v.Hooks.templates.hasOwnProperty(n))for(var a in i=v.Hooks.templates[n],o=i[0].split(" "),o)if(o.hasOwnProperty(a)){var l=n+o[a],c=a;v.Hooks.registered[l]=[n,c]}},getRoot:function(e){var t=v.Hooks.registered[e];return t?t[0]:e},getUnit:function(e,t){var n=(e.substr(t||0,5).match(/^[a-z%]+/)||[])[0]||"";return n&&c(v.Lists.units,n)?n:""},fixColors:function(e){return e.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,(function(e,t,n){return v.Lists.colorNames.hasOwnProperty(n)?(t||"rgba(")+v.Lists.colorNames[n]+(t?"":",1)"):t+n}))},cleanRootPropertyValue:function(e,t){return v.RegEx.valueUnwrap.test(t)&&(t=t.match(v.RegEx.valueUnwrap)[1]),v.Values.isCSSNullValue(t)&&(t=v.Hooks.templates[e][1]),t},extractValue:function(e,t){var n=v.Hooks.registered[e];if(n){var i=n[0],r=n[1];return t=v.Hooks.cleanRootPropertyValue(i,t),t.toString().match(v.RegEx.valueSplit)[r]}return t},injectValue:function(e,t,n){var i=v.Hooks.registered[e];if(i){var r,o,s=i[0],a=i[1];return n=v.Hooks.cleanRootPropertyValue(s,n),r=n.toString().match(v.RegEx.valueSplit),r[a]=t,o=r.join(" "),o}return n}},Normalizations:{registered:{clip:function(e,t,n){switch(e){case"name":return"clip";case"extract":var i;return v.RegEx.wrappedValueAlreadyExtracted.test(n)?i=n:(i=n.toString().match(v.RegEx.valueUnwrap),i=i?i[1].replace(/,(\s+)?/g," "):n),i;case"inject":return"rect("+n+")"}},blur:function(e,t,n){switch(e){case"name":return g.State.isFirefox?"filter":"-webkit-filter";case"extract":var i=parseFloat(n);if(!i&&0!==i){var r=n.toString().match(/blur\(([0-9]+[A-z]+)\)/i);i=r?r[1]:0}return i;case"inject":return parseFloat(n)?"blur("+n+")":"none"}},opacity:function(e,t,n){if(r<=8)switch(e){case"name":return"filter";case"extract":var i=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=i?i[1]/100:1,n;case"inject":return t.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(e){case"name":return"opacity";case"extract":return n;case"inject":return n}}},register:function(){r&&!(r>9)||g.State.isGingerbread||(v.Lists.transformsBase=v.Lists.transformsBase.concat(v.Lists.transforms3D));for(var e=0;e<v.Lists.transformsBase.length;e++)(function(){var t=v.Lists.transformsBase[e];v.Normalizations.registered[t]=function(e,n,r){switch(e){case"name":return"transform";case"extract":return w(n)===i||w(n).transformCache[t]===i?/^scale/i.test(t)?1:0:w(n).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(r);break;case"scal":case"scale":g.State.isAndroid&&w(n).transformCache[t]===i&&r<1&&(r=1),o=!/(\d)$/i.test(r);break;case"skew":o=!/(deg|\d)$/i.test(r);break;case"rotate":o=!/(deg|\d)$/i.test(r);break}return o||(w(n).transformCache[t]="("+r+")"),w(n).transformCache[t]}}})();for(var t=0;t<v.Lists.colors.length;t++)(function(){var e=v.Lists.colors[t];v.Normalizations.registered[e]=function(t,n,o){switch(t){case"name":return e;case"extract":var s;if(v.RegEx.wrappedValueAlreadyExtracted.test(o))s=o;else{var a,l={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(o)?a=l[o]!==i?l[o]:l.black:v.RegEx.isHex.test(o)?a="rgb("+v.Values.hexToRgb(o).join(" ")+")":/^rgba?\(/i.test(o)||(a=l.black),s=(a||o).toString().match(v.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!r||r>8)&&3===s.split(" ").length&&(s+=" 1"),s;case"inject":return/^rgb/.test(o)?o:(r<=8?4===o.split(" ").length&&(o=o.split(/\s+/).slice(0,3).join(" ")):3===o.split(" ").length&&(o+=" 1"),(r<=8?"rgb":"rgba")+"("+o.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}})();function n(e,t,n){var i="border-box"===v.getPropertyValue(t,"boxSizing").toString().toLowerCase();if(i===(n||!1)){var r,o,s=0,a="width"===e?["Left","Right"]:["Top","Bottom"],l=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(r=0;r<l.length;r++)o=parseFloat(v.getPropertyValue(t,l[r])),isNaN(o)||(s+=o);return n?-s:s}return 0}function o(e,t){return function(i,r,o){switch(i){case"name":return e;case"extract":return parseFloat(o)+n(e,r,t);case"inject":return parseFloat(o)-n(e,r,t)+"px"}}}v.Normalizations.registered.innerWidth=o("width",!0),v.Normalizations.registered.innerHeight=o("height",!0),v.Normalizations.registered.outerWidth=o("width"),v.Normalizations.registered.outerHeight=o("height")}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(r||g.State.isAndroid&&!g.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(g.State.prefixMatches[e])return[g.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],n=0,i=t.length;n<i;n++){var r;if(r=0===n?e:t[n]+e.replace(/^\w/,(function(e){return e.toUpperCase()})),d.isString(g.State.prefixElement.style[r]))return g.State.prefixMatches[e]=r,[r,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t,n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return e=e.replace(n,(function(e,t,n,i){return t+t+n+n+i+i})),t=i.exec(e),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return!e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){if(e)if(e.classList)e.classList.add(t);else if(d.isString(e.className))e.className+=(e.className.length?" ":"")+t;else{var n=e.getAttribute(r<=7?"className":"class")||"";e.setAttribute("class",n+(n?" ":"")+t)}},removeClass:function(e,t){if(e)if(e.classList)e.classList.remove(t);else if(d.isString(e.className))e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ");else{var n=e.getAttribute(r<=7?"className":"class")||"";e.setAttribute("class",n.replace(new RegExp("(^|s)"+t.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(e,n,o,s){function a(e,n){var o=0;if(r<=8)o=h.css(e,n);else{var l=!1;/^(width|height)$/.test(n)&&0===v.getPropertyValue(e,"display")&&(l=!0,v.setPropertyValue(e,"display",v.Values.getDisplayType(e)));var c,u=function(){l&&v.setPropertyValue(e,"display","none")};if(!s){if("height"===n&&"border-box"!==v.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var d=e.offsetHeight-(parseFloat(v.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(v.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(v.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(v.getPropertyValue(e,"paddingBottom"))||0);return u(),d}if("width"===n&&"border-box"!==v.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(v.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(v.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(v.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(v.getPropertyValue(e,"paddingRight"))||0);return u(),p}}c=w(e)===i?t.getComputedStyle(e,null):w(e).computedStyle?w(e).computedStyle:w(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===n&&(n="borderTopColor"),o=9===r&&"filter"===n?c.getPropertyValue(n):c[n],""!==o&&null!==o||(o=e.style[n]),u()}if("auto"===o&&/^(top|right|bottom|left)$/i.test(n)){var f=a(e,"position");("fixed"===f||"absolute"===f&&/top|left/i.test(n))&&(o=h(e).position()[n]+"px")}return o}var l;if(v.Hooks.registered[n]){var c=n,u=v.Hooks.getRoot(c);o===i&&(o=v.getPropertyValue(e,v.Names.prefixCheck(u)[0])),v.Normalizations.registered[u]&&(o=v.Normalizations.registered[u]("extract",e,o)),l=v.Hooks.extractValue(c,o)}else if(v.Normalizations.registered[n]){var d,p;d=v.Normalizations.registered[n]("name",e),"transform"!==d&&(p=a(e,v.Names.prefixCheck(d)[0]),v.Values.isCSSNullValue(p)&&v.Hooks.templates[n]&&(p=v.Hooks.templates[n][1])),l=v.Normalizations.registered[n]("extract",e,p)}if(!/^[\d-]/.test(l)){var f=w(e);if(f&&f.isSVG&&v.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=e.getBBox()[n]}catch(m){l=0}else l=e.getAttribute(n);else l=a(e,v.Names.prefixCheck(n)[0])}return v.Values.isCSSNullValue(l)&&(l=0),g.debug>=2&&console.log("Get "+n+": "+l),l},setPropertyValue:function(e,n,i,o,s){var a=n;if("scroll"===n)s.container?s.container["scroll"+s.direction]=i:"Left"===s.direction?t.scrollTo(i,s.alternateValue):t.scrollTo(s.alternateValue,i);else if(v.Normalizations.registered[n]&&"transform"===v.Normalizations.registered[n]("name",e))v.Normalizations.registered[n]("inject",e,i),a="transform",i=w(e).transformCache[n];else{if(v.Hooks.registered[n]){var l=n,c=v.Hooks.getRoot(n);o=o||v.getPropertyValue(e,c),i=v.Hooks.injectValue(l,i,o),n=c}if(v.Normalizations.registered[n]&&(i=v.Normalizations.registered[n]("inject",e,i),n=v.Normalizations.registered[n]("name",e)),a=v.Names.prefixCheck(n)[0],r<=8)try{e.style[a]=i}catch(h){g.debug&&console.log("Browser does not support ["+i+"] for ["+a+"]")}else{var u=w(e);u&&u.isSVG&&v.Names.SVGAttribute(n)?e.setAttribute(n,i):e.style[a]=i}g.debug>=2&&console.log("Set "+n+" ("+a+"): "+i)}return[a,i]},flushTransformCache:function(e){var t="",n=w(e);if((r||g.State.isAndroid&&!g.State.isChrome)&&n&&n.isSVG){var i=function(t){return parseFloat(v.getPropertyValue(e,t))},o={translate:[i("translateX"),i("translateY")],skewX:[i("skewX")],skewY:[i("skewY")],scale:1!==i("scale")?[i("scale"),i("scale")]:[i("scaleX"),i("scaleY")],rotate:[i("rotateZ"),0,0]};h.each(w(e).transformCache,(function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),o[e]&&(t+=e+"("+o[e].join(" ")+") ",delete o[e])}))}else{var s,a;h.each(w(e).transformCache,(function(n){if(s=w(e).transformCache[n],"transformPerspective"===n)return a=s,!0;9===r&&"rotateZ"===n&&(n="rotate"),t+=n+s+" "})),a&&(t="perspective"+a+" "+t)}v.setPropertyValue(e,"transform",t)}};v.Hooks.register(),v.Normalizations.register(),g.hook=function(e,t,n){var r;return e=u(e),h.each(e,(function(e,o){if(w(o)===i&&g.init(o),n===i)r===i&&(r=v.getPropertyValue(o,t));else{var s=v.setPropertyValue(o,t,n);"transform"===s[0]&&g.CSS.flushTransformCache(o),r=s}})),r};var _=function(){var e;function r(){return o?x.promise||null:s}var o,s,a,l,p,m,y=arguments[0]&&(arguments[0].p||h.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||d.isString(arguments[0].properties));d.isWrapped(this)?(o=!1,a=0,l=this,s=this):(o=!0,a=1,l=y?arguments[0].elements||arguments[0].e:arguments[0]);var x={promise:null,resolver:null,rejecter:null};if(o&&g.Promise&&(x.promise=new g.Promise((function(e,t){x.resolver=e,x.rejecter=t}))),y?(p=arguments[0].properties||arguments[0].p,m=arguments[0].options||arguments[0].o):(p=arguments[a],m=arguments[a+1]),l=u(l),l){var b,E=l.length,k=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(p)&&!h.isPlainObject(m)){var M=a+1;m={};for(var P=M;P<arguments.length;P++)d.isArray(arguments[P])||!/^(fast|normal|slow)$/i.test(arguments[P])&&!/^\d/.test(arguments[P])?d.isString(arguments[P])||d.isArray(arguments[P])?m.easing=arguments[P]:d.isFunction(arguments[P])&&(m.complete=arguments[P]):m.duration=arguments[P]}switch(p){case"scroll":b="scroll";break;case"reverse":b="reverse";break;case"pause":var D=(new Date).getTime();return h.each(l,(function(e,t){T(t,D)})),h.each(g.State.calls,(function(e,t){var n=!1;t&&h.each(t[1],(function(e,r){var o=m===i?"":m;return!0!==o&&t[2].queue!==o&&(m!==i||!1!==t[2].queue)||(h.each(l,(function(e,i){if(i===r)return t[5]={resume:!1},n=!0,!1})),!n&&void 0)}))})),r();case"resume":return h.each(l,(function(e,t){S(t,D)})),h.each(g.State.calls,(function(e,t){var n=!1;t&&h.each(t[1],(function(e,r){var o=m===i?"":m;return!0!==o&&t[2].queue!==o&&(m!==i||!1!==t[2].queue)||(!t[5]||(h.each(l,(function(e,i){if(i===r)return t[5].resume=!0,n=!0,!1})),!n&&void 0))}))})),r();case"finish":case"finishAll":case"stop":h.each(l,(function(e,t){w(t)&&w(t).delayTimer&&(clearTimeout(w(t).delayTimer.setTimeout),w(t).delayTimer.next&&w(t).delayTimer.next(),delete w(t).delayTimer),"finishAll"!==p||!0!==m&&!d.isString(m)||(h.each(h.queue(t,d.isString(m)?m:""),(function(e,t){d.isFunction(t)&&t()})),h.queue(t,d.isString(m)?m:"",[]))}));var L=[];return h.each(g.State.calls,(function(e,t){t&&h.each(t[1],(function(n,r){var o=m===i?"":m;if(!0!==o&&t[2].queue!==o&&(m!==i||!1!==t[2].queue))return!0;h.each(l,(function(n,i){if(i===r)if((!0===m||d.isString(m))&&(h.each(h.queue(i,d.isString(m)?m:""),(function(e,t){d.isFunction(t)&&t(null,!0)})),h.queue(i,d.isString(m)?m:"",[])),"stop"===p){var s=w(i);s&&s.tweensContainer&&(!0===o||""===o)&&h.each(s.tweensContainer,(function(e,t){t.endValue=t.currentValue})),L.push(e)}else"finish"!==p&&"finishAll"!==p||(t[2].duration=1)}))}))})),"stop"===p&&(h.each(L,(function(e,t){I(t,!0)})),x.promise&&x.resolver(l)),r();default:if(!h.isPlainObject(p)||d.isEmptyObject(p)){if(d.isString(p)&&g.Redirects[p]){e=h.extend({},m);var O=e.duration,z=e.delay||0;return!0===e.backwards&&(l=h.extend(!0,[],l).reverse()),h.each(l,(function(t,n){parseFloat(e.stagger)?e.delay=z+parseFloat(e.stagger)*t:d.isFunction(e.stagger)&&(e.delay=z+e.stagger.call(n,t,E)),e.drag&&(e.duration=parseFloat(O)||(/^(callout|transition)/.test(p)?1e3:f),e.duration=Math.max(e.duration*(e.backwards?1-t/E:(t+1)/E),.75*e.duration,200)),g.Redirects[p].call(n,n,e||{},t,E,l,x.promise?x:i)})),r()}var R="Velocity: First argument ("+p+") was not a property map, a known action, or a registered redirect. Aborting.";return x.promise?x.rejecter(new Error(R)):t.console&&console.log(R),r()}b="start"}var F={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},N=[];h.each(l,(function(e,t){d.isNode(t)&&$(t,e)})),e=h.extend({},g.defaults,m),e.loop=parseInt(e.loop,10);var B=2*e.loop-1;if(e.loop)for(var j=0;j<B;j++){var V={delay:e.delay,progress:e.progress};j===B-1&&(V.display=e.display,V.visibility=e.visibility,V.complete=e.complete),_(l,"reverse",V)}return r()}function $(e,r){var o,s=h.extend({},g.defaults,m),a={};switch(w(e)===i&&g.init(e),parseFloat(s.delay)&&!1!==s.queue&&h.queue(e,s.queue,(function(t,n){if(!0===n)return!0;g.velocityQueueEntryFlag=!0;var i=g.State.delayedElements.count++;g.State.delayedElements[i]=e;var r=function(e){return function(){g.State.delayedElements[e]=!1,t()}}(i);w(e).delayBegin=(new Date).getTime(),w(e).delay=parseFloat(s.delay),w(e).delayTimer={setTimeout:setTimeout(t,parseFloat(s.delay)),next:r}})),s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=f;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}function u(u){var f,y;if(s.begin&&0===k)try{s.begin.call(l,l)}catch(Z){setTimeout((function(){throw Z}),1)}if("scroll"===b){var _,T,S,I=/^x$/i.test(s.axis)?"Left":"Top",M=parseFloat(s.offset)||0;s.container?d.isWrapped(s.container)||d.isNode(s.container)?(s.container=s.container[0]||s.container,_=s.container["scroll"+I],S=_+h(e).position()[I.toLowerCase()]+M):s.container=null:(_=g.State.scrollAnchor[g.State["scrollProperty"+I]],T=g.State.scrollAnchor[g.State["scrollProperty"+("Left"===I?"Top":"Left")]],S=h(e).offset()[I.toLowerCase()]+M),a={scroll:{rootPropertyValue:!1,startValue:_,currentValue:_,endValue:S,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:I,alternateValue:T}},element:e},g.debug&&console.log("tweensContainer (scroll): ",a.scroll,e)}else if("reverse"===b){if(f=w(e),!f)return;if(!f.tweensContainer)return void h.dequeue(e,s.queue);for(var P in"none"===f.opts.display&&(f.opts.display="auto"),"hidden"===f.opts.visibility&&(f.opts.visibility="visible"),f.opts.loop=!1,f.opts.begin=null,f.opts.complete=null,m.easing||delete s.easing,m.duration||delete s.duration,s=h.extend({},f.opts,s),y=h.extend(!0,{},f?f.tweensContainer:null),y)if(y.hasOwnProperty(P)&&"element"!==P){var D=y[P].startValue;y[P].startValue=y[P].currentValue=y[P].endValue,y[P].endValue=D,d.isEmptyObject(m)||(y[P].easing=s.easing),g.debug&&console.log("reverse tweensContainer ("+P+"): "+JSON.stringify(y[P]),e)}a=y}else if("start"===b){f=w(e),f&&f.tweensContainer&&!0===f.isAnimating&&(y=f.tweensContainer);var L=function(t,n){var i,o,a;return d.isFunction(t)&&(t=t.call(e,r,E)),d.isArray(t)?(i=t[0],!d.isArray(t[1])&&/^[\d-]/.test(t[1])||d.isFunction(t[1])||v.RegEx.isHex.test(t[1])?a=t[1]:d.isString(t[1])&&!v.RegEx.isHex.test(t[1])&&g.Easings[t[1]]||d.isArray(t[1])?(o=n?t[1]:C(t[1],s.duration),a=t[2]):a=t[1]||t[2]):i=t,n||(o=o||s.easing),d.isFunction(i)&&(i=i.call(e,r,E)),d.isFunction(a)&&(a=a.call(e,r,E)),[i||0,o,a]},O=function(r,l){var c,u=v.Hooks.getRoot(r),p=!1,m=l[0],_=l[1],x=l[2];if(f&&f.isSVG||"tween"===u||!1!==v.Names.prefixCheck(u)[1]||v.Normalizations.registered[u]!==i){(s.display!==i&&null!==s.display&&"none"!==s.display||s.visibility!==i&&"hidden"!==s.visibility)&&/opacity|filter/.test(r)&&!x&&0!==m&&(x=0),s._cacheValues&&y&&y[r]?(x===i&&(x=y[r].endValue+y[r].unitType),p=f.rootPropertyValueCache[u]):v.Hooks.registered[r]?x===i?(p=v.getPropertyValue(e,u),x=v.getPropertyValue(e,r,p)):p=v.Hooks.templates[u][1]:x===i&&(x=v.getPropertyValue(e,r));var b,w,T,S=!1,E=function(e,t){var n,i;return i=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,(function(e){return n=e,""})),n||(n=v.Values.getUnitType(e)),[i,n]};if(x!==m&&d.isString(x)&&d.isString(m)){c="";var k=0,C=0,A=[],I=[],M=0,P=0,D=0;x=v.Hooks.fixColors(x),m=v.Hooks.fixColors(m);while(k<x.length&&C<m.length){var L=x[k],O=m[C];if(/[\d\.-]/.test(L)&&/[\d\.-]/.test(O)){var z=L,R=O,N=".",B=".";while(++k<x.length){if(L=x[k],L===N)N="..";else if(!/\d/.test(L))break;z+=L}while(++C<m.length){if(O=m[C],O===B)B="..";else if(!/\d/.test(O))break;R+=O}var j=v.Hooks.getUnit(x,k),V=v.Hooks.getUnit(m,C);if(k+=j.length,C+=V.length,j===V)z===R?c+=z+j:(c+="{"+A.length+(P?"!":"")+"}"+j,A.push(parseFloat(z)),I.push(parseFloat(R)));else{var $=parseFloat(z),U=parseFloat(R);c+=(M<5?"calc":"")+"("+($?"{"+A.length+(P?"!":"")+"}":"0")+j+" + "+(U?"{"+(A.length+($?1:0))+(P?"!":"")+"}":"0")+V+")",$&&(A.push($),I.push(0)),U&&(A.push(0),I.push(U))}}else{if(L!==O){M=0;break}c+=L,k++,C++,0===M&&"c"===L||1===M&&"a"===L||2===M&&"l"===L||3===M&&"c"===L||M>=4&&"("===L?M++:(M&&M<5||M>=4&&")"===L&&--M<5)&&(M=0),0===P&&"r"===L||1===P&&"g"===L||2===P&&"b"===L||3===P&&"a"===L||P>=3&&"("===L?(3===P&&"a"===L&&(D=1),P++):D&&","===L?++D>3&&(P=D=0):(D&&P<(D?5:4)||P>=(D?4:3)&&")"===L&&--P<(D?5:4))&&(P=D=0)}}k===x.length&&C===m.length||(g.debug&&console.error('Trying to pattern match mis-matched strings ["'+m+'", "'+x+'"]'),c=i),c&&(A.length?(g.debug&&console.log('Pattern found "'+c+'" -> ',A,I,"["+x+","+m+"]"),x=A,m=I,w=T=""):c=i)}c||(b=E(r,x),x=b[0],T=b[1],b=E(r,m),m=b[0].replace(/^([+-\/*])=/,(function(e,t){return S=t,""})),w=b[1],x=parseFloat(x)||0,m=parseFloat(m)||0,"%"===w&&(/^(fontSize|lineHeight)$/.test(r)?(m/=100,w="em"):/^scale/.test(r)?(m/=100,w=""):/(Red|Green|Blue)$/i.test(r)&&(m=m/100*255,w="")));var q=function(){var i={myParent:e.parentNode||n.body,position:v.getPropertyValue(e,"position"),fontSize:v.getPropertyValue(e,"fontSize")},r=i.position===F.lastPosition&&i.myParent===F.lastParent,o=i.fontSize===F.lastFontSize;F.lastParent=i.myParent,F.lastPosition=i.position,F.lastFontSize=i.fontSize;var s=100,a={};if(o&&r)a.emToPx=F.lastEmToPx,a.percentToPxWidth=F.lastPercentToPxWidth,a.percentToPxHeight=F.lastPercentToPxHeight;else{var l=f&&f.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");g.init(l),i.myParent.appendChild(l),h.each(["overflow","overflowX","overflowY"],(function(e,t){g.CSS.setPropertyValue(l,t,"hidden")})),g.CSS.setPropertyValue(l,"position",i.position),g.CSS.setPropertyValue(l,"fontSize",i.fontSize),g.CSS.setPropertyValue(l,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],(function(e,t){g.CSS.setPropertyValue(l,t,s+"%")})),g.CSS.setPropertyValue(l,"paddingLeft",s+"em"),a.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(v.getPropertyValue(l,"width",null,!0))||1)/s,a.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(v.getPropertyValue(l,"height",null,!0))||1)/s,a.emToPx=F.lastEmToPx=(parseFloat(v.getPropertyValue(l,"paddingLeft"))||1)/s,i.myParent.removeChild(l)}return null===F.remToPx&&(F.remToPx=parseFloat(v.getPropertyValue(n.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(t.innerWidth)/100,F.vhToPx=parseFloat(t.innerHeight)/100),a.remToPx=F.remToPx,a.vwToPx=F.vwToPx,a.vhToPx=F.vhToPx,g.debug>=1&&console.log("Unit ratios: "+JSON.stringify(a),e),a};if(/[\/*]/.test(S))w=T;else if(T!==w&&0!==x)if(0===m)w=T;else{o=o||q();var G=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(T){case"%":x*="x"===G?o.percentToPxWidth:o.percentToPxHeight;break;case"px":break;default:x*=o[T+"ToPx"]}switch(w){case"%":x*=1/("x"===G?o.percentToPxWidth:o.percentToPxHeight);break;case"px":break;default:x*=1/o[w+"ToPx"]}}switch(S){case"+":m=x+m;break;case"-":m=x-m;break;case"*":m*=x;break;case"/":m=x/m;break}a[r]={rootPropertyValue:p,startValue:x,currentValue:x,endValue:m,unitType:w,easing:_},c&&(a[r].pattern=c),g.debug&&console.log("tweensContainer ("+r+"): "+JSON.stringify(a[r]),e)}else g.debug&&console.log("Skipping ["+u+"] due to a lack of browser support.")};for(var z in p)if(p.hasOwnProperty(z)){var R=v.Names.camelCase(z),B=L(p[z]);if(c(v.Lists.colors,R)){var j=B[0],V=B[1],$=B[2];if(v.RegEx.isHex.test(j)){for(var U=["Red","Green","Blue"],q=v.Values.hexToRgb(j),G=$?v.Values.hexToRgb($):i,H=0;H<U.length;H++){var W=[q[H]];V&&W.push(V),G!==i&&W.push(G[H]),O(R+U[H],W)}continue}}O(R,B)}a.element=e}a.element&&(v.Values.addClass(e,"velocity-animating"),N.push(a),f=w(e),f&&(""===s.queue&&(f.tweensContainer=a,f.opts=s),f.isAnimating=!0),k===E-1?(g.State.calls.push([N,l,s,null,x.resolver,null,0]),!1===g.State.isTicking&&(g.State.isTicking=!0,A())):k++)}if(!1!==g.mock&&(!0===g.mock?s.duration=s.delay=1:(s.duration*=parseFloat(g.mock)||1,s.delay*=parseFloat(g.mock)||1)),s.easing=C(s.easing,s.duration),s.begin&&!d.isFunction(s.begin)&&(s.begin=null),s.progress&&!d.isFunction(s.progress)&&(s.progress=null),s.complete&&!d.isFunction(s.complete)&&(s.complete=null),s.display!==i&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=g.CSS.Values.getDisplayType(e))),s.visibility!==i&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&g.State.isMobile&&!g.State.isGingerbread,!1===s.queue)if(s.delay){var y=g.State.delayedElements.count++;g.State.delayedElements[y]=e;var _=function(e){return function(){g.State.delayedElements[e]=!1,u()}}(y);w(e).delayBegin=(new Date).getTime(),w(e).delay=parseFloat(s.delay),w(e).delayTimer={setTimeout:setTimeout(u,parseFloat(s.delay)),next:_}}else u();else h.queue(e,s.queue,(function(e,t){if(!0===t)return x.promise&&x.resolver(l),!0;g.velocityQueueEntryFlag=!0,u(e)}));""!==s.queue&&"fx"!==s.queue||"inprogress"===h.queue(e)[0]||h.dequeue(e)}x.promise&&(p&&m&&!1===m.promiseRejectEmpty?x.resolver():x.rejecter())};g=h.extend(_,g),g.animate=_;var x=t.requestAnimationFrame||o;if(!g.State.isMobile&&n.hidden!==i){var b=function(){n.hidden?(x=function(e){return setTimeout((function(){e(!0)}),16)},A()):x=t.requestAnimationFrame||o};b(),n.addEventListener("visibilitychange",b)}return e.Velocity=g,e!==t&&(e.fn.velocity=_,e.fn.velocity.defaults=g.defaults),h.each(["Down","Up"],(function(e,t){g.Redirects["slide"+t]=function(e,n,r,o,s,a){var l=h.extend({},n),c=l.begin,u=l.complete,d={},p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===i&&(l.display="Down"===t?"inline"===g.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){for(var n in 0===r&&c&&c.call(s,s),p)if(p.hasOwnProperty(n)){d[n]=e.style[n];var i=v.getPropertyValue(e,n);p[n]="Down"===t?[i,0]:[0,i]}d.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in d)d.hasOwnProperty(t)&&(e.style[t]=d[t]);r===o-1&&(u&&u.call(s,s),a&&a.resolver(s))},g(e,p,l)}})),h.each(["In","Out"],(function(e,t){g.Redirects["fade"+t]=function(e,n,r,o,s,a){var l=h.extend({},n),c=l.complete,u={opacity:"In"===t?1:0};0!==r&&(l.begin=null),l.complete=r!==o-1?null:function(){c&&c.call(s,s),a&&a.resolver(s)},l.display===i&&(l.display="In"===t?"auto":"none"),g(this,u,l)}})),g}function w(e){var t=h.data(e,"velocity");return null===t?i:t}function T(e,t){var n=w(e);n&&n.delayTimer&&!n.delayPaused&&(n.delayRemaining=n.delay-t+n.delayBegin,n.delayPaused=!0,clearTimeout(n.delayTimer.setTimeout))}function S(e,t){var n=w(e);n&&n.delayTimer&&n.delayPaused&&(n.delayPaused=!1,n.delayTimer.setTimeout=setTimeout(n.delayTimer.next,n.delayRemaining))}function E(e){return function(t){return Math.round(t*e)*(1/e)}}function k(e,n,i,r){var o=4,s=.001,a=1e-7,l=10,c=11,u=1/(c-1),h="Float32Array"in t;if(4!==arguments.length)return!1;for(var d=0;d<4;++d)if("number"!==typeof arguments[d]||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;e=Math.min(e,1),i=Math.min(i,1),e=Math.max(e,0),i=Math.max(i,0);var p=h?new Float32Array(c):new Array(c);function f(e,t){return 1-3*t+3*e}function m(e,t){return 3*t-6*e}function g(e){return 3*e}function y(e,t,n){return((f(t,n)*e+m(t,n))*e+g(t))*e}function v(e,t,n){return 3*f(t,n)*e*e+2*m(t,n)*e+g(t)}function _(t,n){for(var r=0;r<o;++r){var s=v(n,e,i);if(0===s)return n;var a=y(n,e,i)-t;n-=a/s}return n}function x(){for(var t=0;t<c;++t)p[t]=y(t*u,e,i)}function b(t,n,r){var o,s,c=0;do{s=n+(r-n)/2,o=y(s,e,i)-t,o>0?r=s:n=s}while(Math.abs(o)>a&&++c<l);return s}function w(t){for(var n=0,r=1,o=c-1;r!==o&&p[r]<=t;++r)n+=u;--r;var a=(t-p[r])/(p[r+1]-p[r]),l=n+a*u,h=v(l,e,i);return h>=s?_(t,l):0===h?l:b(t,n,n+u)}var T=!1;function S(){T=!0,e===n&&i===r||x()}var E=function(t){return T||S(),e===n&&i===r?t:0===t?0:1===t?1:y(w(t),n,r)};E.getControlPoints=function(){return[{x:e,y:n},{x:i,y:r}]};var k="generateBezier("+[e,n,i,r]+")";return E.toString=function(){return k},E}function C(e,t){var n=e;return d.isString(e)?g.Easings[e]||(n=!1):n=d.isArray(e)&&1===e.length?E.apply(null,e):d.isArray(e)&&2===e.length?y.apply(null,e.concat([t])):!(!d.isArray(e)||4!==e.length)&&k.apply(null,e),!1===n&&(n=g.Easings[g.defaults.easing]?g.defaults.easing:m),n}function A(e){if(e){var t=g.timestamp&&!0!==e?e:s.now(),n=g.State.calls.length;n>1e4&&(g.State.calls=a(g.State.calls),n=g.State.calls.length);for(var o=0;o<n;o++)if(g.State.calls[o]){var l=g.State.calls[o],c=l[0],u=l[2],p=l[3],f=!p,m=null,y=l[5],_=l[6];if(p||(p=g.State.calls[o][3]=t-16),y){if(!0!==y.resume)continue;p=l[3]=Math.round(t-_-16),l[5]=null}_=l[6]=t-p;for(var b=Math.min(_/u.duration,1),T=0,S=c.length;T<S;T++){var E=c[T],k=E.element;if(w(k)){var C=!1;if(u.display!==i&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var M=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];h.each(M,(function(e,t){v.setPropertyValue(k,"display",t)}))}v.setPropertyValue(k,"display",u.display)}for(var P in u.visibility!==i&&"hidden"!==u.visibility&&v.setPropertyValue(k,"visibility",u.visibility),E)if(E.hasOwnProperty(P)&&"element"!==P){var D,L=E[P],O=d.isString(L.easing)?g.Easings[L.easing]:L.easing;if(d.isString(L.pattern)){var z=1===b?function(e,t,n){var i=L.endValue[t];return n?Math.round(i):i}:function(e,t,n){var i=L.startValue[t],r=L.endValue[t]-i,o=i+r*O(b,u,r);return n?Math.round(o):o};D=L.pattern.replace(/{(\d+)(!)?}/g,z)}else if(1===b)D=L.endValue;else{var R=L.endValue-L.startValue;D=L.startValue+R*O(b,u,R)}if(!f&&D===L.currentValue)continue;if(L.currentValue=D,"tween"===P)m=D;else{var F;if(v.Hooks.registered[P]){F=v.Hooks.getRoot(P);var N=w(k).rootPropertyValueCache[F];N&&(L.rootPropertyValue=N)}var B=v.setPropertyValue(k,P,L.currentValue+(r<9&&0===parseFloat(D)?"":L.unitType),L.rootPropertyValue,L.scrollData);v.Hooks.registered[P]&&(v.Normalizations.registered[F]?w(k).rootPropertyValueCache[F]=v.Normalizations.registered[F]("extract",null,B[1]):w(k).rootPropertyValueCache[F]=B[1]),"transform"===B[0]&&(C=!0)}}u.mobileHA&&w(k).transformCache.translate3d===i&&(w(k).transformCache.translate3d="(0px, 0px, 0px)",C=!0),C&&v.flushTransformCache(k)}}u.display!==i&&"none"!==u.display&&(g.State.calls[o][2].display=!1),u.visibility!==i&&"hidden"!==u.visibility&&(g.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(l[1],l[1],b,Math.max(0,p+u.duration-t),p,m),1===b&&I(o)}}g.State.isTicking&&x(A)}function I(e,t){if(!g.State.calls[e])return!1;for(var n=g.State.calls[e][0],r=g.State.calls[e][1],o=g.State.calls[e][2],s=g.State.calls[e][4],a=!1,l=0,c=n.length;l<c;l++){var u=n[l].element;t||o.loop||("none"===o.display&&v.setPropertyValue(u,"display",o.display),"hidden"===o.visibility&&v.setPropertyValue(u,"visibility",o.visibility));var d=w(u);if(!0!==o.loop&&(h.queue(u)[1]===i||!/\.velocityQueueEntryFlag/i.test(h.queue(u)[1]))&&d){d.isAnimating=!1,d.rootPropertyValueCache={};var p=!1;h.each(v.Lists.transforms3D,(function(e,t){var n=/^scale/.test(t)?1:0,r=d.transformCache[t];d.transformCache[t]!==i&&new RegExp("^\\("+n+"[^.]").test(r)&&(p=!0,delete d.transformCache[t])})),o.mobileHA&&(p=!0,delete d.transformCache.translate3d),p&&v.flushTransformCache(u),v.Values.removeClass(u,"velocity-animating")}if(!t&&o.complete&&!o.loop&&l===c-1)try{o.complete.call(r,r)}catch(y){setTimeout((function(){throw y}),1)}s&&!0!==o.loop&&s(r),d&&!0===o.loop&&!t&&(h.each(d.tweensContainer,(function(e,t){if(/^rotate/.test(e)&&(parseFloat(t.startValue)-parseFloat(t.endValue))%360===0){var n=t.startValue;t.startValue=t.endValue,t.endValue=n}/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)})),g(u,"reverse",{loop:!0,delay:o.delay})),!1!==o.queue&&h.dequeue(u,o.queue)}g.State.calls[e]=!1;for(var f=0,m=g.State.calls.length;f<m;f++)if(!1!==g.State.calls[f]){a=!0;break}!1===a&&(g.State.isTicking=!1,delete g.State.calls,g.State.calls=[])}jQuery.fn.velocity=jQuery.fn.animate}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)}))},"5abe":function(e,t){(function(e,t){"use strict";if("IntersectionObserver"in e&&"IntersectionObserverEntry"in e&&"intersectionRatio"in e.IntersectionObserverEntry.prototype)"isIntersecting"in e.IntersectionObserverEntry.prototype||Object.defineProperty(e.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var n=[];r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(e){var t=this._observationTargets.some((function(t){return t.element==e}));if(!t){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},r.prototype._parseRootMargin=function(e){var t=e||"0px",n=t.split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(a(e,"resize",this._checkForIntersections,!0),a(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,l(e,"resize",this._checkForIntersections,!0),l(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():h();this._observationTargets.forEach((function(n){var r=n.element,s=u(r),a=this._rootContainsTarget(r),l=n.entry,c=e&&a&&this._computeTargetAndRootIntersection(r,t),h=n.entry=new i({time:o(),target:r,boundingClientRect:s,rootBounds:t,intersectionRect:c});l?e&&a?this._hasCrossedThreshold(l,h)&&this._queuedEntries.push(h):l&&l.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,i){if("none"!=e.getComputedStyle(n).display){var r=u(n),o=r,s=p(n),a=!1;while(!a){var l=null,h=1==s.nodeType?e.getComputedStyle(s):{};if("none"==h.display)return;if(s==this.root||s==t?(a=!0,l=i):s!=t.body&&s!=t.documentElement&&"visible"!=h.overflow&&(l=u(s)),l&&(o=c(l,o),!o))break;s=p(s)}return o}},r.prototype._getRootRect=function(){var e;if(this.root)e=u(this.root);else{var n=t.documentElement,i=t.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!==o<i)return!0}},r.prototype._rootIsInDom=function(){return!this.root||d(t,this.root)},r.prototype._rootContainsTarget=function(e){return d(this.root||t,e)},r.prototype._registerInstance=function(){n.indexOf(this)<0&&n.push(this)},r.prototype._unregisterInstance=function(){var e=n.indexOf(this);-1!=e&&n.splice(e,1)},e.IntersectionObserver=r,e.IntersectionObserverEntry=i}function i(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||h(),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,i=this.intersectionRect,r=i.width*i.height;this.intersectionRatio=n?Number((r/n).toFixed(4)):this.isIntersecting?1:0}function r(e,t){var n=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=s(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" ")}function o(){return e.performance&&performance.now&&performance.now()}function s(e,t){var n=null;return function(){n||(n=setTimeout((function(){e(),n=null}),t))}}function a(e,t,n,i){"function"==typeof e.addEventListener?e.addEventListener(t,n,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function l(e,t,n,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function c(e,t){var n=Math.max(e.top,t.top),i=Math.min(e.bottom,t.bottom),r=Math.max(e.left,t.left),o=Math.min(e.right,t.right),s=o-r,a=i-n;return s>=0&&a>=0&&{top:n,bottom:i,left:r,right:o,width:s,height:a}}function u(e){var t;try{t=e.getBoundingClientRect()}catch(n){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):h()}function h(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e,t){var n=t;while(n){if(n==e)return!0;n=p(n)}return!1}function p(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t}})(window,document)},"5b4e":function(e,t,n){var i=n("36c3"),r=n("b447"),o=n("0fc9");e.exports=function(e){return function(t,n,s){var a,l=i(t),c=r(l.length),u=o(s,c);if(e&&n!=n){while(c>u)if(a=l[u++],a!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"5c95":function(e,t,n){var i=n("35e8");e.exports=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:i(e,r,t[r]);return e}},"5ca1":function(e,t,n){var i=n("7726"),r=n("8378"),o=n("32e9"),s=n("2aba"),a=n("9b43"),l="prototype",c=function(e,t,n){var u,h,d,p,f=e&c.F,m=e&c.G,g=e&c.S,y=e&c.P,v=e&c.B,_=m?i:g?i[t]||(i[t]={}):(i[t]||{})[l],x=m?r:r[t]||(r[t]={}),b=x[l]||(x[l]={});for(u in m&&(n=t),n)h=!f&&_&&void 0!==_[u],d=(h?_:n)[u],p=v&&h?a(d,i):y&&"function"==typeof d?a(Function.call,d):d,_&&s(_,u,d,e&c.U),x[u]!=d&&o(x,u,p),y&&b[u]!=d&&(b[u]=d)};i.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5cc5":function(e,t,n){var i=n("2b4c")("iterator"),r=!1;try{var o=[7][i]();o["return"]=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(s){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},e(o)}catch(s){}return n}},"5d58":function(e,t,n){e.exports=n("d8d6")},"5dbc":function(e,t,n){var i=n("d3f4"),r=n("8b97").set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&i(o)&&r&&r(e,o),e}},"5df3":function(e,t,n){"use strict";var i=n("02f4")(!0);n("01f9")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))},"5eda":function(e,t,n){var i=n("5ca1"),r=n("8378"),o=n("79e5");e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*o((function(){n(1)})),"Object",s)}},"5f02":function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},"5f1b":function(e,t,n){"use strict";var i=n("23c6"),r=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var o=n.call(e,t);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},"5f60":function(e,t,n){"use strict";const i=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],r={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"===typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:e=>"undefined"!==typeof console&&console.warn(e),getWeek:e=>{const t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:e=>{const t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};var s=o;const a=(e,t=2)=>("000"+e).slice(-1*t),l=e=>!0===e?1:0;function c(e,t){let n;return function(){clearTimeout(n),n=setTimeout(()=>e.apply(this,arguments),t)}}const u=e=>e instanceof Array?e:[e];function h(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){const i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function p(e){while(e.firstChild)e.removeChild(e.firstChild)}function f(e,t){return t(e)?e:e.parentNode?f(e.parentNode,t):void 0}function m(e,t){const n=d("div","numInputWrapper"),i=d("input","numInput "+e),r=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(const s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(r),n.appendChild(o),n}function g(e){try{if("function"===typeof e.composedPath){const t=e.composedPath();return t[0]}return e.target}catch(t){return e.target}}const y=()=>{},v=(e,t,n)=>n.months[t?"shorthand":"longhand"][e],_={D:y,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:(e,t)=>{e.setHours(parseFloat(t))},H:(e,t)=>{e.setHours(parseFloat(t))},J:(e,t)=>{e.setDate(parseFloat(t))},K:(e,t,n)=>{e.setHours(e.getHours()%12+12*l(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:(e,t)=>{e.setSeconds(parseFloat(t))},U:(e,t)=>new Date(1e3*parseFloat(t)),W:function(e,t,n){const i=parseInt(t),r=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+n.firstDayOfWeek),r},Y:(e,t)=>{e.setFullYear(parseFloat(t))},Z:(e,t)=>new Date(t),d:(e,t)=>{e.setDate(parseFloat(t))},h:(e,t)=>{e.setHours(parseFloat(t))},i:(e,t)=>{e.setMinutes(parseFloat(t))},j:(e,t)=>{e.setDate(parseFloat(t))},l:y,m:(e,t)=>{e.setMonth(parseFloat(t)-1)},n:(e,t)=>{e.setMonth(parseFloat(t)-1)},s:(e,t)=>{e.setSeconds(parseFloat(t))},u:(e,t)=>new Date(parseFloat(t)),w:y,y:(e,t)=>{e.setFullYear(2e3+parseFloat(t))}},x={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},b={Z:e=>e.toISOString(),D:function(e,t,n){return t.weekdays.shorthand[b.w(e,t,n)]},F:function(e,t,n){return v(b.n(e,t,n)-1,!1,t)},G:function(e,t,n){return a(b.h(e,t,n))},H:e=>a(e.getHours()),J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:(e,t)=>t.amPM[l(e.getHours()>11)],M:function(e,t){return v(e.getMonth(),!0,t)},S:e=>a(e.getSeconds()),U:e=>e.getTime()/1e3,W:function(e,t,n){return n.getWeek(e)},Y:e=>a(e.getFullYear(),4),d:e=>a(e.getDate()),h:e=>e.getHours()%12?e.getHours()%12:12,i:e=>a(e.getMinutes()),j:e=>e.getDate(),l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:e=>a(e.getMonth()+1),n:e=>e.getMonth()+1,s:e=>e.getSeconds(),u:e=>e.getTime(),w:e=>e.getDay(),y:e=>String(e.getFullYear()).substring(2)},w=({config:e=r,l10n:t=o,isMobile:n=!1})=>(i,r,o)=>{const s=o||t;return void 0===e.formatDate||n?r.split("").map((t,n,r)=>b[t]&&"\\"!==r[n-1]?b[t](i,s,e):"\\"!==t?t:"").join(""):e.formatDate(i,r,s)},T=({config:e=r,l10n:t=o})=>(n,i,o,s)=>{if(0!==n&&!n)return;const a=s||t;let l;const c=n;if(n instanceof Date)l=new Date(n.getTime());else if("string"!==typeof n&&void 0!==n.toFixed)l=new Date(n);else if("string"===typeof n){const t=i||(e||r).dateFormat,s=String(n).trim();if("today"===s)l=new Date,o=!0;else if(/Z$/.test(s)||/GMT$/.test(s))l=new Date(n);else if(e&&e.parseDate)l=e.parseDate(n,t);else{l=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);let i,r=[];for(let e=0,o=0,s="";e<t.length;e++){const c=t[e],u="\\"===c,h="\\"===t[e-1]||u;if(x[c]&&!h){s+=x[c];const e=new RegExp(s).exec(n);e&&(i=!0)&&r["Y"!==c?"push":"unshift"]({fn:_[c],val:e[++o]})}else u||(s+=".");r.forEach(({fn:e,val:t})=>l=e(l,t,a)||l)}l=i?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===o&&l.setHours(0,0,0,0),l;e.errorHandler(new Error("Invalid date provided: "+c))};function S(e,t,n=!0){return!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}const E=(e,t,n)=>e>Math.min(t,n)&&e<Math.max(t,n),k={DAY:864e5};function C(e){let t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){const r=e.minDate.getHours(),o=e.minDate.getMinutes(),s=e.minDate.getSeconds();t<r&&(t=r),t===r&&n<o&&(n=o),t===r&&n===o&&i<s&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){const r=e.maxDate.getHours(),o=e.maxDate.getMinutes();t=Math.min(t,r),t===r&&(n=Math.min(o,n)),t===r&&n===o&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}n("716d");const A=300;function I(e,t){const n={config:Object.assign(Object.assign({},r),P.defaultConfig),l10n:s};function o(){n.utils={getDaysInMonth(e=n.currentMonth,t=n.currentYear){return 1===e&&(t%4===0&&t%100!==0||t%400===0)?29:n.l10n.daysInMonth[e]}}}function y(){n.element=n.input=e,n.isOpen=!1,xe(),we(),ze(),Oe(),o(),n.isMobile||U(),B(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&O(n.config.noCalendar?n.latestSelectedDateObj:void 0),qe(!1)),b();const t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&t&&Te(),Ne("onReady")}function _(e){return e.bind(n)}function b(){const e=n.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){const t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+"px",n.calendarContainer.style.width=t+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function I(e){if(0===n.selectedDates.length){const e=void 0===n.config.minDate||S(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),t=C(n.config);e.setHours(t.hours,t.minutes,t.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==e&&"blur"!==e.type&&He(e);const t=n._input.value;L(),qe(),n._input.value!==t&&n._debouncedChange()}function M(e,t){return e%12+12*l(t===n.l10n.amPM[1])}function D(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function L(){if(void 0===n.hourElement||void 0===n.minuteElement)return;let e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,i=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(e=M(e,n.amPM.textContent));const r=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.minDate,!0),o=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.maxDate,!0);if(o){const r=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;e=Math.min(e,r.getHours()),e===r.getHours()&&(t=Math.min(t,r.getMinutes())),t===r.getMinutes()&&(i=Math.min(i,r.getSeconds()))}if(r){const r=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;e=Math.max(e,r.getHours()),e===r.getHours()&&t<r.getMinutes()&&(t=r.getMinutes()),t===r.getMinutes()&&(i=Math.max(i,r.getSeconds()))}z(e,t,i)}function O(e){const t=e||n.latestSelectedDateObj;t&&z(t.getHours(),t.getMinutes(),t.getSeconds())}function z(e,t,i){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(e%24,t,i||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=a(n.config.time_24hr?e:(12+e)%12+12*l(e%12===0)),n.minuteElement.value=a(t),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[l(e>=12)]),void 0!==n.secondElement&&(n.secondElement.value=a(i)))}function R(e){const t=g(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&he(n)}function F(e,t,i,r){return t instanceof Array?t.forEach(t=>F(e,t,i,r)):e instanceof Array?e.forEach(e=>F(e,t,i,r)):(e.addEventListener(t,i,r),void n._handlers.push({remove:()=>e.removeEventListener(t,i)}))}function N(){Ne("onChange")}function B(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(e=>{Array.prototype.forEach.call(n.element.querySelectorAll(`[data-${e}]`),t=>F(t,"click",n[e]))}),n.isMobile)return void Re();const e=c(ye,50);if(n._debouncedChange=c(N,A),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&F(n.daysContainer,"mouseover",e=>{"range"===n.config.mode&&ge(g(e))}),F(window.document.body,"keydown",me),n.config.inline||n.config.static||F(window,"resize",e),void 0!==window.ontouchstart?F(window.document,"touchstart",ue):F(window.document,"mousedown",ue),F(window.document,"focus",ue,{capture:!0}),!0===n.config.clickOpens&&(F(n._input,"focus",n.open),F(n._input,"click",n.open)),void 0!==n.daysContainer&&(F(n.monthNav,"click",Ge),F(n.monthNav,["keyup","increment"],R),F(n.daysContainer,"click",Ae)),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){const e=e=>g(e).select();F(n.timeContainer,["increment"],I),F(n.timeContainer,"blur",I,{capture:!0}),F(n.timeContainer,"click",V),F([n.hourElement,n.minuteElement],["focus","click"],e),void 0!==n.secondElement&&F(n.secondElement,"focus",()=>n.secondElement&&n.secondElement.select()),void 0!==n.amPM&&F(n.amPM,"click",e=>{I(e),N()})}n.config.allowInput&&F(n._input,"blur",fe)}function j(e,t){const i=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),r=n.currentYear,o=n.currentMonth;try{void 0!==i&&(n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth())}catch(s){s.message="Invalid date supplied: "+i,n.config.errorHandler(s)}t&&n.currentYear!==r&&(Ne("onYearChange"),Q()),!t||n.currentYear===r&&n.currentMonth===o||Ne("onMonthChange"),n.redraw()}function V(e){const t=g(e);~t.className.indexOf("arrow")&&$(e,t.classList.contains("arrowUp")?1:-1)}function $(e,t,n){const i=e&&g(e),r=n||i&&i.parentNode&&i.parentNode.firstChild,o=Be("increment");o.delta=t,r&&r.dispatchEvent(o)}function U(){const e=window.document.createDocumentFragment();if(n.calendarContainer=d("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild(ee()),n.innerContainer=d("div","flatpickr-innerContainer"),n.config.weekNumbers){const{weekWrapper:e,weekNumbers:t}=re();n.innerContainer.appendChild(e),n.weekNumbers=t,n.weekWrapper=e}n.rContainer=d("div","flatpickr-rContainer"),n.rContainer.appendChild(ne()),n.daysContainer||(n.daysContainer=d("div","flatpickr-days"),n.daysContainer.tabIndex=-1),Y(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(te()),h(n.calendarContainer,"rangeMode","range"===n.config.mode),h(n.calendarContainer,"animate",!0===n.config.animate),h(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);const t=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!t&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){const e=d("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(e,n.element),e.appendChild(n.element),n.altInput&&e.appendChild(n.altInput),e.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function q(e,t,i,r){const o=de(t,!0),s=d("span","flatpickr-day "+e,t.getDate().toString());return s.dateObj=t,s.$i=r,s.setAttribute("aria-label",n.formatDate(t,n.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===S(t,n.now)&&(n.todayDateElem=s,s.classList.add("today"),s.setAttribute("aria-current","date")),o?(s.tabIndex=-1,je(t)&&(s.classList.add("selected"),n.selectedDateElem=s,"range"===n.config.mode&&(h(s,"startRange",n.selectedDates[0]&&0===S(t,n.selectedDates[0],!0)),h(s,"endRange",n.selectedDates[1]&&0===S(t,n.selectedDates[1],!0)),"nextMonthDay"===e&&s.classList.add("inRange")))):s.classList.add("flatpickr-disabled"),"range"===n.config.mode&&Ve(t)&&!je(t)&&s.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&i%7===1&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(t)+"</span>"),Ne("onDayCreate",s),s}function G(e){e.focus(),"range"===n.config.mode&&ge(e)}function H(e){const t=e>0?0:n.config.showMonths-1,i=e>0?n.config.showMonths:-1;for(let r=t;r!=i;r+=e){const t=n.daysContainer.children[r],i=e>0?0:t.children.length-1,o=e>0?t.children.length:-1;for(let n=i;n!=o;n+=e){const e=t.children[n];if(-1===e.className.indexOf("hidden")&&de(e.dateObj))return e}}}function W(e,t){const i=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,r=t>0?n.config.showMonths:-1,o=t>0?1:-1;for(let s=i-n.currentMonth;s!=r;s+=o){const r=n.daysContainer.children[s],a=i-n.currentMonth===s?e.$i+t:t<0?r.children.length-1:0,l=r.children.length;for(let n=a;n>=0&&n<l&&n!=(t>0?l:-1);n+=o){const i=r.children[n];if(-1===i.className.indexOf("hidden")&&de(i.dateObj)&&Math.abs(e.$i-n)>=Math.abs(t))return G(i)}}n.changeMonth(o),Z(H(o),0)}function Z(e,t){const i=pe(document.activeElement||document.body),r=void 0!==e?e:i?document.activeElement:void 0!==n.selectedDateElem&&pe(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&pe(n.todayDateElem)?n.todayDateElem:H(t>0?1:-1);void 0===r?n._input.focus():i?W(r,t):G(r)}function X(e,t){const i=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,r=n.utils.getDaysInMonth((t-1+12)%12,e),o=n.utils.getDaysInMonth(t,e),s=window.document.createDocumentFragment(),a=n.config.showMonths>1,l=a?"prevMonthDay hidden":"prevMonthDay",c=a?"nextMonthDay hidden":"nextMonthDay";let u=r+1-i,h=0;for(;u<=r;u++,h++)s.appendChild(q(l,new Date(e,t-1,u),u,h));for(u=1;u<=o;u++,h++)s.appendChild(q("",new Date(e,t,u),u,h));for(let d=o+1;d<=42-i&&(1===n.config.showMonths||h%7!==0);d++,h++)s.appendChild(q(c,new Date(e,t+1,d%o),d,h));const p=d("div","dayContainer");return p.appendChild(s),p}function Y(){if(void 0===n.daysContainer)return;p(n.daysContainer),n.weekNumbers&&p(n.weekNumbers);const e=document.createDocumentFragment();for(let t=0;t<n.config.showMonths;t++){const i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+t),e.appendChild(X(i.getFullYear(),i.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&ge()}function Q(){if(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)return;const e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth())&&!(void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(let t=0;t<12;t++){if(!e(t))continue;const i=d("option","flatpickr-monthDropdown-month");i.value=new Date(n.currentYear,t).getMonth().toString(),i.textContent=v(t,n.config.shorthandCurrentMonth,n.l10n),i.tabIndex=-1,n.currentMonth===t&&(i.selected=!0),n.monthsDropdownContainer.appendChild(i)}}function K(){const e=d("div","flatpickr-month"),t=window.document.createDocumentFragment();let i;n.config.showMonths>1||"static"===n.config.monthSelectorType?i=d("span","cur-month"):(n.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),F(n.monthsDropdownContainer,"change",e=>{const t=g(e),i=parseInt(t.value,10);n.changeMonth(i-n.currentMonth),Ne("onMonthChange")}),Q(),i=n.monthsDropdownContainer);const r=m("cur-year",{tabindex:"-1"}),o=r.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());const s=d("div","flatpickr-current-month");return s.appendChild(i),s.appendChild(r),t.appendChild(s),e.appendChild(t),{container:e,yearElement:o,monthElement:i}}function J(){p(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(let e=n.config.showMonths;e--;){const e=K();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function ee(){return n.monthNav=d("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=d("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=d("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,J(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:()=>n.__hidePrevMonthArrow,set(e){n.__hidePrevMonthArrow!==e&&(h(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:()=>n.__hideNextMonthArrow,set(e){n.__hideNextMonthArrow!==e&&(h(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],$e(),n.monthNav}function te(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");const e=C(n.config);n.timeContainer=d("div","flatpickr-time"),n.timeContainer.tabIndex=-1;const t=d("span","flatpickr-time-separator",":"),i=m("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=i.getElementsByTagName("input")[0];const r=m("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=r.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=a(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:D(e.hours)),n.minuteElement.value=a(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(i),n.timeContainer.appendChild(t),n.timeContainer.appendChild(r),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");const t=m("flatpickr-second");n.secondElement=t.getElementsByTagName("input")[0],n.secondElement.value=a(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(t)}return n.config.time_24hr||(n.amPM=d("span","flatpickr-am-pm",n.l10n.amPM[l((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function ne(){n.weekdayContainer?p(n.weekdayContainer):n.weekdayContainer=d("div","flatpickr-weekdays");for(let e=n.config.showMonths;e--;){const e=d("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return ie(),n.weekdayContainer}function ie(){if(!n.weekdayContainer)return;const e=n.l10n.firstDayOfWeek;let t=[...n.l10n.weekdays.shorthand];e>0&&e<t.length&&(t=[...t.splice(e,t.length),...t.splice(0,e)]);for(let i=n.config.showMonths;i--;)n.weekdayContainer.children[i].innerHTML=`\n      <span class='flatpickr-weekday'>\n        ${t.join("</span><span class='flatpickr-weekday'>")}\n      </span>\n      `}function re(){n.calendarContainer.classList.add("hasWeeks");const e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",n.l10n.weekAbbreviation));const t=d("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}function oe(e,t=!0){const i=t?e:e-n.currentMonth;i<0&&!0===n._hidePrevMonthArrow||i>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=i,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Ne("onYearChange"),Q()),Y(),Ne("onMonthChange"),$e())}function se(e=!0,t=!0){if(n.input.value="",void 0!==n.altInput&&(n.altInput.value=""),void 0!==n.mobileInput&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),!0===n.config.enableTime){const{hours:e,minutes:t,seconds:i}=C(n.config);z(e,t,i)}n.redraw(),e&&Ne("onChange")}function ae(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active")),Ne("onClose")}function le(){void 0!==n.config&&Ne("onDestroy");for(let e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){const e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){while(e.firstChild)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(e=>{try{delete n[e]}catch(t){}})}function ce(e){return!(!n.config.appendTo||!n.config.appendTo.contains(e))||n.calendarContainer.contains(e)}function ue(e){if(n.isOpen&&!n.config.inline){const t=g(e),i=ce(t),r=t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)),o="blur"===e.type?r&&e.relatedTarget&&!ce(e.relatedTarget):!r&&!i&&!ce(e.relatedTarget),s=!n.config.ignoredFocusElements.some(e=>e.contains(t));o&&s&&(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&I(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&(n.clear(!1),n.redraw()))}}function he(e){if(!e||n.config.minDate&&e<n.config.minDate.getFullYear()||n.config.maxDate&&e>n.config.maxDate.getFullYear())return;const t=e,i=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),i&&(n.redraw(),Ne("onYearChange"),Q())}function de(e,t=!0){var i;const r=n.parseDate(e,void 0,t);if(n.config.minDate&&r&&S(r,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&r&&S(r,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===r)return!1;const o=!!n.config.enable,s=null!==(i=n.config.enable)&&void 0!==i?i:n.config.disable;for(let a,l=0;l<s.length;l++){if(a=s[l],"function"===typeof a&&a(r))return o;if(a instanceof Date&&void 0!==r&&a.getTime()===r.getTime())return o;if("string"===typeof a){const e=n.parseDate(a,void 0,!0);return e&&e.getTime()===r.getTime()?o:!o}if("object"===typeof a&&void 0!==r&&a.from&&a.to&&r.getTime()>=a.from.getTime()&&r.getTime()<=a.to.getTime())return o}return!o}function pe(e){return void 0!==n.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function fe(e){const t=e.target===n._input;!t||!(n.selectedDates.length>0||n._input.value.length>0)||e.relatedTarget&&ce(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function me(t){const i=g(t),r=n.config.wrap?e.contains(i):i===n._input,o=n.config.allowInput,s=n.isOpen&&(!o||!r),a=n.config.inline&&r&&!o;if(13===t.keyCode&&r){if(o)return n.setDate(n._input.value,!0,i===n.altInput?n.config.altFormat:n.config.dateFormat),i.blur();n.open()}else if(ce(i)||s||a){const e=!!n.timeContainer&&n.timeContainer.contains(i);switch(t.keyCode){case 13:e?(t.preventDefault(),I(),Ce()):Ae(t);break;case 27:t.preventDefault(),Ce();break;case 8:case 46:r&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(e||r)n.hourElement&&n.hourElement.focus();else if(t.preventDefault(),void 0!==n.daysContainer&&(!1===o||document.activeElement&&pe(document.activeElement))){const e=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),oe(e),Z(H(1),0)):Z(void 0,e)}break;case 38:case 40:t.preventDefault();const s=40===t.keyCode?1:-1;n.daysContainer&&void 0!==i.$i||i===n.input||i===n.altInput?t.ctrlKey?(t.stopPropagation(),he(n.currentYear-s),Z(H(1),0)):e||Z(void 0,7*s):i===n.currentYearElement?he(n.currentYear-s):n.config.enableTime&&(!e&&n.hourElement&&n.hourElement.focus(),I(t),n._debouncedChange());break;case 9:if(e){const e=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(e=>e),r=e.indexOf(i);if(-1!==r){const i=e[r+(t.shiftKey?-1:1)];t.preventDefault(),(i||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(i)&&t.shiftKey&&(t.preventDefault(),n._input.focus());break;default:break}}if(void 0!==n.amPM&&i===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],L(),qe();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],L(),qe();break}(r||ce(i))&&Ne("onKeyDown",t)}function ge(e){if(1!==n.selectedDates.length||e&&(!e.classList.contains("flatpickr-day")||e.classList.contains("flatpickr-disabled")))return;const t=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),i=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,n.selectedDates[0].getTime()),o=Math.max(t,n.selectedDates[0].getTime());let s=!1,a=0,l=0;for(let n=r;n<o;n+=k.DAY)de(new Date(n),!0)||(s=s||n>r&&n<o,n<i&&(!a||n>a)?a=n:n>i&&(!l||n<l)&&(l=n));for(let c=0;c<n.config.showMonths;c++){const r=n.daysContainer.children[c];for(let o=0,c=r.children.length;o<c;o++){const c=r.children[o],u=c.dateObj,h=u.getTime(),d=a>0&&h<a||l>0&&h>l;d?(c.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(e=>{c.classList.remove(e)})):s&&!d||(["startRange","inRange","endRange","notAllowed"].forEach(e=>{c.classList.remove(e)}),void 0!==e&&(e.classList.add(t<=n.selectedDates[0].getTime()?"startRange":"endRange"),i<t&&h===i?c.classList.add("startRange"):i>t&&h===i&&c.classList.add("endRange"),h>=a&&(0===l||h<=l)&&E(h,i,t)&&c.classList.add("inRange")))}}}function ye(){!n.isOpen||n.config.static||n.config.inline||Te()}function ve(e,t=n._positionElement){if(!0===n.isMobile){if(e){e.preventDefault();const t=g(e);t&&t.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void Ne("onOpen")}if(n._input.disabled||n.config.inline)return;const i=n.isOpen;n.isOpen=!0,i||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),Ne("onOpen"),Te(t)),!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout(()=>n.hourElement.select(),50))}function _e(e){return t=>{const i=n.config[`_${e}Date`]=n.parseDate(t,n.config.dateFormat),r=n.config[`_${"min"===e?"max":"min"}Date`];void 0!==i&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(e=>de(e)),n.selectedDates.length||"min"!==e||O(i),qe()),n.daysContainer&&(ke(),void 0!==i?n.currentYearElement[e]=i.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!r&&void 0!==i&&r.getFullYear()===i.getFullYear())}}function xe(){const o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],s=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),a={};n.config.parseDate=s.parseDate,n.config.formatDate=s.formatDate,Object.defineProperty(n.config,"enable",{get:()=>n.config._enable,set:e=>{n.config._enable=Le(e)}}),Object.defineProperty(n.config,"disable",{get:()=>n.config._disable,set:e=>{n.config._disable=Le(e)}});const l="time"===s.mode;if(!s.dateFormat&&(s.enableTime||l)){const e=P.defaultConfig.dateFormat||r.dateFormat;a.dateFormat=s.noCalendar||l?"H:i"+(s.enableSeconds?":S":""):e+" H:i"+(s.enableSeconds?":S":"")}if(s.altInput&&(s.enableTime||l)&&!s.altFormat){const e=P.defaultConfig.altFormat||r.altFormat;a.altFormat=s.noCalendar||l?"h:i"+(s.enableSeconds?":S K":" K"):e+` h:i${s.enableSeconds?":S":""} K`}Object.defineProperty(n.config,"minDate",{get:()=>n.config._minDate,set:_e("min")}),Object.defineProperty(n.config,"maxDate",{get:()=>n.config._maxDate,set:_e("max")});const c=e=>t=>{n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")};Object.defineProperty(n.config,"minTime",{get:()=>n.config._minTime,set:c("min")}),Object.defineProperty(n.config,"maxTime",{get:()=>n.config._maxTime,set:c("max")}),"time"===s.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,a,s);for(let e=0;e<o.length;e++)n.config[o[e]]=!0===n.config[o[e]]||"true"===n.config[o[e]];i.filter(e=>void 0!==n.config[e]).forEach(e=>{n.config[e]=u(n.config[e]||[]).map(_)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let e=0;e<n.config.plugins.length;e++){const t=n.config.plugins[e](n)||{};for(const e in t)i.indexOf(e)>-1?n.config[e]=u(t[e]).map(_).concat(n.config[e]):"undefined"===typeof s[e]&&(n.config[e]=t[e])}s.altInputClass||(n.config.altInputClass=be().className+" "+n.config.altInputClass),Ne("onParseConfig")}function be(){return n.config.wrap?e.querySelector("[data-input]"):e}function we(){"object"!==typeof n.config.locale&&"undefined"===typeof P.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Object.assign(Object.assign({},P.l10ns.default),"object"===typeof n.config.locale?n.config.locale:"default"!==n.config.locale?P.l10ns[n.config.locale]:void 0),x.K=`(${n.l10n.amPM[0]}|${n.l10n.amPM[1]}|${n.l10n.amPM[0].toLowerCase()}|${n.l10n.amPM[1].toLowerCase()})`;const i=Object.assign(Object.assign({},t),JSON.parse(JSON.stringify(e.dataset||{})));void 0===i.time_24hr&&void 0===P.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=w(n),n.parseDate=T({config:n.config,l10n:n.l10n})}function Te(e){if("function"===typeof n.config.position)return void n.config.position(n,e);if(void 0===n.calendarContainer)return;Ne("onPreCalendarPosition");const t=e||n._positionElement,i=Array.prototype.reduce.call(n.calendarContainer.children,(e,t)=>e+t.offsetHeight,0),r=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),s=o[0],a=o.length>1?o[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===s||"below"!==s&&c<i&&l.top>i,d=window.pageYOffset+l.top+(u?-i-2:t.offsetHeight+2);if(h(n.calendarContainer,"arrowTop",!u),h(n.calendarContainer,"arrowBottom",u),n.config.inline)return;let p=window.pageXOffset+l.left,f=!1,m=!1;"center"===a?(p-=(r-l.width)/2,f=!0):"right"===a&&(p-=r-l.width,m=!0),h(n.calendarContainer,"arrowLeft",!f&&!m),h(n.calendarContainer,"arrowCenter",f),h(n.calendarContainer,"arrowRight",m);const g=window.document.body.offsetWidth-(window.pageXOffset+l.right),y=p+r>window.document.body.offsetWidth,v=g+r>window.document.body.offsetWidth;if(h(n.calendarContainer,"rightMost",y),!n.config.static)if(n.calendarContainer.style.top=d+"px",y)if(v){const e=Se();if(void 0===e)return;const t=window.document.body.offsetWidth,i=Math.max(0,t/2-r/2),o=".flatpickr-calendar.centerMost:before",s=".flatpickr-calendar.centerMost:after",a=e.cssRules.length,c=`{left:${l.left}px;right:auto;}`;h(n.calendarContainer,"rightMost",!1),h(n.calendarContainer,"centerMost",!0),e.insertRule(`${o},${s}${c}`,a),n.calendarContainer.style.left=i+"px",n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=g+"px";else n.calendarContainer.style.left=p+"px",n.calendarContainer.style.right="auto"}function Se(){let e=null;for(let n=0;n<document.styleSheets.length;n++){const i=document.styleSheets[n];try{i.cssRules}catch(t){continue}e=i;break}return null!=e?e:Ee()}function Ee(){const e=document.createElement("style");return document.head.appendChild(e),e.sheet}function ke(){n.config.noCalendar||n.isMobile||(Q(),$e(),Y())}function Ce(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function Ae(e){e.preventDefault(),e.stopPropagation();const t=e=>e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed"),i=f(g(e),t);if(void 0===i)return;const r=i,o=n.latestSelectedDateObj=new Date(r.dateObj.getTime()),s=(o.getMonth()<n.currentMonth||o.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){const e=je(o);e?n.selectedDates.splice(parseInt(e),1):n.selectedDates.push(o)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=o,n.selectedDates.push(o),0!==S(o,n.selectedDates[0],!0)&&n.selectedDates.sort((e,t)=>e.getTime()-t.getTime()));if(L(),s){const e=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),e&&(Ne("onYearChange"),Q()),Ne("onMonthChange")}if($e(),Y(),qe(),s||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():G(r),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){const e="single"===n.config.mode&&!n.config.enableTime,t="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(e||t)&&Ce()}N()}n.parseDate=T({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=F,n._setHoursFromDate=O,n._positionCalendar=Te,n.changeMonth=oe,n.changeYear=he,n.clear=se,n.close=ae,n._createElement=d,n.destroy=le,n.isEnabled=de,n.jumpToDate=j,n.open=ve,n.redraw=ke,n.set=Me,n.setDate=De,n.toggle=Fe;const Ie={locale:[we,ie],showMonths:[J,b,ne],minDate:[j],maxDate:[j],clickOpens:[()=>{!0===n.config.clickOpens?(F(n._input,"focus",n.open),F(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function Me(e,t){if(null!==e&&"object"===typeof e){Object.assign(n.config,e);for(const t in e)void 0!==Ie[t]&&Ie[t].forEach(e=>e())}else n.config[e]=t,void 0!==Ie[e]?Ie[e].forEach(e=>e()):i.indexOf(e)>-1&&(n.config[e]=u(t));n.redraw(),qe(!0)}function Pe(e,t){let i=[];if(e instanceof Array)i=e.map(e=>n.parseDate(e,t));else if(e instanceof Date||"number"===typeof e)i=[n.parseDate(e,t)];else if("string"===typeof e)switch(n.config.mode){case"single":case"time":i=[n.parseDate(e,t)];break;case"multiple":i=e.split(n.config.conjunction).map(e=>n.parseDate(e,t));break;case"range":i=e.split(n.l10n.rangeSeparator).map(e=>n.parseDate(e,t));break;default:break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?i:i.filter(e=>e instanceof Date&&de(e,!1)),"range"===n.config.mode&&n.selectedDates.sort((e,t)=>e.getTime()-t.getTime())}function De(e,t=!1,i=n.config.dateFormat){if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);Pe(e,i),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),j(void 0,t),O(),0===n.selectedDates.length&&n.clear(!1),qe(t),t&&Ne("onChange")}function Le(e){return e.slice().map(e=>"string"===typeof e||"number"===typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"===typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e).filter(e=>e)}function Oe(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;const e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&Pe(e,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function ze(){n.input=be(),n.input?(n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=d(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),n._positionElement=n.config.positionElement||n._input):n.config.errorHandler(new Error("Invalid input element specified"))}function Re(){const e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=d("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}F(n.mobileInput,"change",e=>{n.setDate(g(e).value,!1,n.mobileFormatStr),Ne("onChange"),Ne("onClose")})}function Fe(e){if(!0===n.isOpen)return n.close();n.open(e)}function Ne(e,t){if(void 0===n.config)return;const i=n.config[e];if(void 0!==i&&i.length>0)for(let r=0;i[r]&&r<i.length;r++)i[r](n.selectedDates,n.input.value,n,t);"onChange"===e&&(n.input.dispatchEvent(Be("change")),n.input.dispatchEvent(Be("input")))}function Be(e){const t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function je(e){for(let t=0;t<n.selectedDates.length;t++)if(0===S(n.selectedDates[t],e))return""+t;return!1}function Ve(e){return!("range"!==n.config.mode||n.selectedDates.length<2)&&(S(e,n.selectedDates[0])>=0&&S(e,n.selectedDates[1])<=0)}function $e(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((e,t)=>{const i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+t),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=v(i.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=i.getMonth().toString(),e.value=i.getFullYear().toString()}),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Ue(e){return n.selectedDates.map(t=>n.formatDate(t,e)).filter((e,t,i)=>"range"!==n.config.mode||n.config.enableTime||i.indexOf(e)===t).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function qe(e=!0){void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Ue(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Ue(n.config.altFormat)),!1!==e&&Ne("onValueUpdate")}function Ge(e){const t=g(e),i=n.prevMonthNav.contains(t),r=n.nextMonthNav.contains(t);i||r?oe(i?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function He(e){e.preventDefault();const t="keydown"===e.type,i=g(e),r=i;void 0!==n.amPM&&i===n.amPM&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]);const o=parseFloat(r.getAttribute("min")),s=parseFloat(r.getAttribute("max")),c=parseFloat(r.getAttribute("step")),u=parseInt(r.value,10),h=e.delta||(t?38===e.which?1:-1:0);let d=u+c*h;if("undefined"!==typeof r.value&&2===r.value.length){const e=r===n.hourElement,t=r===n.minuteElement;d<o?(d=s+d+l(!e)+(l(e)&&l(!n.amPM)),t&&$(void 0,-1,n.hourElement)):d>s&&(d=r===n.hourElement?d-s-l(!n.amPM):o,t&&$(void 0,1,n.hourElement)),n.amPM&&e&&(1===c?d+u===23:Math.abs(d-u)>c)&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]),r.value=a(d)}}return y(),n}function M(e,t){const n=Array.prototype.slice.call(e).filter(e=>e instanceof HTMLElement),i=[];for(let o=0;o<n.length;o++){const e=n[o];try{if(null!==e.getAttribute("data-fp-omit"))continue;void 0!==e._flatpickr&&(e._flatpickr.destroy(),e._flatpickr=void 0),e._flatpickr=I(e,t||{}),i.push(e._flatpickr)}catch(r){console.error(r)}}return 1===i.length?i[0]:i}"undefined"!==typeof HTMLElement&&"undefined"!==typeof HTMLCollection&&"undefined"!==typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return M(this,e)},HTMLElement.prototype.flatpickr=function(e){return M([this],e)});var P=function(e,t){return"string"===typeof e?M(window.document.querySelectorAll(e),t):e instanceof Node?M([e],t):M(e,t)};P.defaultConfig={},P.l10ns={en:Object.assign({},s),default:Object.assign({},s)},P.localize=e=>{P.l10ns.default=Object.assign(Object.assign({},P.l10ns.default),e)},P.setDefaults=e=>{P.defaultConfig=Object.assign(Object.assign({},P.defaultConfig),e)},P.parseDate=T({}),P.formatDate=w({}),P.compareDates=S,"undefined"!==typeof jQuery&&"undefined"!==typeof jQuery.fn&&(jQuery.fn.flatpickr=function(e){return M(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"===typeof e?parseInt(e,10):e))},"undefined"!==typeof window&&(window.flatpickr=P);t["a"]=P},"613b":function(e,t,n){var i=n("5537")("keys"),r=n("ca5a");e.exports=function(e){return i[e]||(i[e]=r(e))}},6158:function(e,t,n){var i,r;(function(o,s){i=[n("c745")],r=function(e){return s(o,e)}.apply(t,i),void 0===r||(e.exports=r)})(window,(function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},i=Array.prototype.slice;n.makeArray=function(e){if(Array.isArray(e))return e;if(null===e||void 0===e)return[];var t="object"==typeof e&&"number"==typeof e.length;return t?i.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){while(e.parentNode&&e!=document.body)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,i){e=n.makeArray(e);var r=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(i){t(e,i)&&r.push(e);for(var n=e.querySelectorAll(i),o=0;o<n.length;o++)r.push(n[o])}else r.push(e)})),r},n.debounceMethod=function(e,t,n){n=n||100;var i=e.prototype[t],r=t+"Timeout";e.prototype[t]=function(){var e=this[r];clearTimeout(e);var t=arguments,o=this;this[r]=setTimeout((function(){i.apply(o,t),delete o[r]}),n)}},n.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},n.toDashed=function(e){return e.replace(/(.)([A-Z])/g,(function(e,t,n){return t+"-"+n})).toLowerCase()};var r=e.console;return n.htmlInit=function(t,i){n.docReady((function(){var o=n.toDashed(i),s="data-"+o,a=document.querySelectorAll("["+s+"]"),l=document.querySelectorAll(".js-"+o),c=n.makeArray(a).concat(n.makeArray(l)),u=s+"-options",h=e.jQuery;c.forEach((function(e){var n,o=e.getAttribute(s)||e.getAttribute(u);try{n=o&&JSON.parse(o)}catch(l){return void(r&&r.error("Error parsing "+s+" on "+e.className+": "+l))}var a=new t(e,n);h&&h.data(e,i,a)}))}))},n}))},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},"63b6":function(e,t,n){var i=n("e53d"),r=n("584a"),o=n("d864"),s=n("35e8"),a=n("07e3"),l="prototype",c=function(e,t,n){var u,h,d,p=e&c.F,f=e&c.G,m=e&c.S,g=e&c.P,y=e&c.B,v=e&c.W,_=f?r:r[t]||(r[t]={}),x=_[l],b=f?i:m?i[t]:(i[t]||{})[l];for(u in f&&(n=t),n)h=!p&&b&&void 0!==b[u],h&&a(_,u)||(d=h?b[u]:n[u],_[u]=f&&"function"!=typeof b[u]?n[u]:y&&h?o(d,i):v&&b[u]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(d):g&&"function"==typeof d?o(Function.call,d):d,g&&((_.virtual||(_.virtual={}))[u]=d,e&c.R&&x&&!x[u]&&s(x,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"643e":function(e,t,n){"use strict";var i=n("dcbc"),r=n("67ab").getWeak,o=n("cb7c"),s=n("d3f4"),a=n("f605"),l=n("4a59"),c=n("0a49"),u=n("69a8"),h=n("b39a"),d=c(5),p=c(6),f=0,m=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},y=function(e,t){return d(e.a,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var c=e((function(e,i){a(e,c,t,"_i"),e._t=t,e._i=f++,e._l=void 0,void 0!=i&&l(i,n,e[o],e)}));return i(c.prototype,{delete:function(e){if(!s(e))return!1;var n=r(e);return!0===n?m(h(this,t))["delete"](e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!s(e))return!1;var n=r(e);return!0===n?m(h(this,t)).has(e):n&&u(n,this._i)}}),c},def:function(e,t,n){var i=r(o(t),!0);return!0===i?m(e).set(t,n):i[e._i]=n,e},ufstore:m}},"656e":function(e,t,n){"use strict";var i=n("79aa");function r(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new r(e)}},6718:function(e,t,n){var i=n("e53d"),r=n("584a"),o=n("b8e3"),s=n("ccb9"),a=n("d9f6").f;e.exports=function(e){var t=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},6762:function(e,t,n){"use strict";var i=n("5ca1"),r=n("c366")(!0);i(i.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67ab":function(e,t,n){var i=n("ca5a")("meta"),r=n("d3f4"),o=n("69a8"),s=n("86cc").f,a=0,l=Object.isExtensible||function(){return!0},c=!n("79e5")((function(){return l(Object.preventExtensions({}))})),u=function(e){s(e,i,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i},d=function(e,t){if(!o(e,i)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[i].w},p=function(e){return c&&f.NEED&&l(e)&&!o(e,i)&&u(e),e},f=e.exports={KEY:i,NEED:!1,fastKey:h,getWeak:d,onFreeze:p}},"67bb":function(e,t,n){e.exports=n("f921")},6821:function(e,t,n){var i=n("626a"),r=n("be13");e.exports=function(e){return i(r(e))}},"696e":function(e,t,n){n("c207"),n("1654"),n("6c1c"),n("24c5"),n("3c11"),n("43fc"),e.exports=n("584a").Promise},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"69d3":function(e,t,n){n("6718")("asyncIterator")},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"6abf":function(e,t,n){var i=n("e6f3"),r=n("1691").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6b54":function(e,t,n){"use strict";n("3846");var i=n("cb7c"),r=n("0bfb"),o=n("9e1e"),s="toString",a=/./[s],l=function(e){n("2aba")(RegExp.prototype,s,e,!0)};n("79e5")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?l((function(){var e=i(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?r.call(e):void 0)})):a.name!=s&&l((function(){return a.call(this)}))},"6c1c":function(e,t,n){n("c367");for(var i=n("e53d"),r=n("35e8"),o=n("481b"),s=n("5168")("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<a.length;l++){var c=a[l],u=i[c],h=u&&u.prototype;h&&!h[s]&&r(h,s,c),o[c]=o.Array}},"716d":function(e,t,n){"use strict";"function"!==typeof Object.assign&&(Object.assign=function(e,...t){if(!e)throw TypeError("Cannot convert undefined or null to object");for(const n of t)n&&Object.keys(n).forEach(t=>e[t]=n[t]);return e})},"71c1":function(e,t,n){var i=n("3a38"),r=n("25eb");e.exports=function(e){return function(t,n){var o,s,a=String(r(t)),l=i(n),c=a.length;return l<0||l>=c?e?"":void 0:(o=a.charCodeAt(l),o<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):o:e?a.slice(l,l+2):s-56320+(o-55296<<10)+65536)}}},7333:function(e,t,n){"use strict";var i=n("9e1e"),r=n("0d58"),o=n("2621"),s=n("52a7"),a=n("4bf8"),l=n("626a"),c=Object.assign;e.exports=!c||n("79e5")((function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=i}))?function(e,t){var n=a(e),c=arguments.length,u=1,h=o.f,d=s.f;while(c>u){var p,f=l(arguments[u++]),m=h?r(f).concat(h(f)):r(f),g=m.length,y=0;while(g>y)p=m[y++],i&&!d.call(f,p)||(n[p]=f[p])}return n}:c},7514:function(e,t,n){"use strict";var i=n("5ca1"),r=n("0a49")(5),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),i(i.P+i.F*s,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(o)},"75fc":function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("a745"),r=n.n(i),o=n("db2a");function s(e){if(r()(e))return Object(o["a"])(e)}var a=n("67bb"),l=n.n(a),c=n("5d58"),u=n.n(c),h=n("774e"),d=n.n(h);function p(e){if("undefined"!==typeof l.a&&null!=e[u.a]||null!=e["@@iterator"])return d()(e)}var f=n("e630");function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return s(e)||p(e)||Object(f["a"])(e)||m()}},7618:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("67bb"),r=n.n(i),o=n("5d58"),s=n.n(o);function a(e){return a="function"===typeof r.a&&"symbol"===typeof s.a?function(e){return typeof e}:function(e){return e&&"function"===typeof r.a&&e.constructor===r.a&&e!==r.a.prototype?"symbol":typeof e},a(e)}},"765d":function(e,t,n){n("6718")("observable")},"768b":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n("a745"),r=n.n(i);function o(e){if(r()(e))return e}var s=n("67bb"),a=n.n(s),l=n("5d58"),c=n.n(l);function u(e,t){var n=e&&("undefined"!==typeof a.a&&e[c.a]||e["@@iterator"]);if(null!=n){var i,r,o=[],s=!0,l=!1;try{for(n=n.call(e);!(s=(i=n.next()).done);s=!0)if(o.push(i.value),t&&o.length===t)break}catch(u){l=!0,r=u}finally{try{s||null==n["return"]||n["return"]()}finally{if(l)throw r}}return o}}var h=n("e630");function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){return o(e)||u(e,t)||Object(h["a"])(e,t)||d()}},7707:function(e,t,n){(function(){"use strict";function t(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n=e.HTMLElement||e.Element,i=468,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=a(e.navigator.userAgent)?1:0;e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?g.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):r.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var e=arguments[0].left,t=arguments[0].top;g.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var n=f(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(g.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(e){var t=["MSIE ","Trident/","Edge/"];return new RegExp(t.join("|")).test(e)}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return.5*(1-Math.cos(Math.PI*e))}function u(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function p(e){var t=h(e,"Y")&&d(e,"Y"),n=h(e,"X")&&d(e,"X");return t||n}function f(e){while(e!==t.body&&!1===p(e))e=e.parentNode||e.host;return e}function m(t){var n,r,s,a=o(),l=(a-t.startTime)/i;l=l>1?1:l,n=c(l),r=t.startX+(t.x-t.startX)*n,s=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,s),r===t.x&&s===t.y||e.requestAnimationFrame(m.bind(e,t))}function g(n,i,s){var a,c,u,h,d=o();n===t.body?(a=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,h=r.scroll):(a=n,c=n.scrollLeft,u=n.scrollTop,h=l),m({scrollable:a,method:h,startTime:d,startX:c,startY:u,x:i,y:s})}}e.exports={polyfill:t}})()},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(e,t,n){e.exports=n("d2d5")},"77f1":function(e,t,n){var i=n("4588"),r=Math.max,o=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):o(e,t)}},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")((function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"795b":function(e,t,n){e.exports=n("696e")},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7a56":function(e,t,n){"use strict";var i=n("7726"),r=n("86cc"),o=n("9e1e"),s=n("2b4c")("species");e.exports=function(e){var t=i[e];o&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},"7a77":function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},"7aac":function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?function(){return{write:function(e,t,n,r,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(r)&&a.push("path="+r),i.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7bbc":function(e,t,n){var i=n("6821"),r=n("9093").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return r(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?a(e):r(i(e))}},"7cd6":function(e,t,n){var i=n("40c3"),r=n("5168")("iterator"),o=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||o[i(e)]}},"7cdf":function(e,t,n){var i=n("5ca1");i(i.S,"Number",{isInteger:n("9c12")})},"7e90":function(e,t,n){var i=n("d9f6"),r=n("e4ae"),o=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){r(e);var n,s=o(t),a=s.length,l=0;while(a>l)i.f(e,n=s[l++],t[n]);return e}},"7f20":function(e,t,n){var i=n("86cc").f,r=n("69a8"),o=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},"7f7f":function(e,t,n){var i=n("86cc").f,r=Function.prototype,o=/^\s*function ([^ (]*)/,s="name";s in r||n("9e1e")&&i(r,s,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},8079:function(e,t,n){var i=n("7726"),r=n("1991").set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n("2d95")(s);e.exports=function(){var e,t,n,c=function(){var i,r;l&&(i=s.domain)&&i.exit();while(e){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var r={fn:i,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},8378:function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"83a1":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},"83b9":function(e,t,n){"use strict";var i=n("d925"),r=n("e683");e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},8436:function(e,t){e.exports=function(){}},"84d3":function(e,t,n){var i,r,o;
/*!
 * Masonry v4.2.2
 * Cascading grid layout library
 * https://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */(function(s,a){r=[n("1f2e"),n("40ad")],i=a,o="function"===typeof i?i.apply(t,r):i,void 0===o||(e.exports=o)})(window,(function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var i=n.prototype;return i._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e<this.cols;e++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},i.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var e=this.items[0],n=e&&e.element;this.columnWidth=n&&t(n).outerWidth||this.containerWidth}var i=this.columnWidth+=this.gutter,r=this.containerWidth+this.gutter,o=r/i,s=i-r%i,a=s&&s<1?"round":"floor";o=Math[a](o),this.cols=Math.max(o,1)},i.getContainerWidth=function(){var e=this._getOption("fitWidth"),n=e?this.element.parentNode:this.element,i=t(n);this.containerWidth=i&&i.innerWidth},i._getItemLayoutPosition=function(e){e.getSize();var t=e.size.outerWidth%this.columnWidth,n=t&&t<1?"round":"ceil",i=Math[n](e.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);for(var r=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",o=this[r](i,e),s={x:this.columnWidth*o.col,y:o.y},a=o.y+e.size.outerHeight,l=i+o.col,c=o.col;c<l;c++)this.colYs[c]=a;return s},i._getTopColPosition=function(e){var t=this._getTopColGroup(e),n=Math.min.apply(Math,t);return{col:t.indexOf(n),y:n}},i._getTopColGroup=function(e){if(e<2)return this.colYs;for(var t=[],n=this.cols+1-e,i=0;i<n;i++)t[i]=this._getColGroupY(i,e);return t},i._getColGroupY=function(e,t){if(t<2)return this.colYs[e];var n=this.colYs.slice(e,e+t);return Math.max.apply(Math,n)},i._getHorizontalColPosition=function(e,t){var n=this.horizontalColIndex%this.cols,i=e>1&&n+e>this.cols;n=i?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},i._manageStamp=function(e){var n=t(e),i=this._getElementOffset(e),r=this._getOption("originLeft"),o=r?i.left:i.right,s=o+n.outerWidth,a=Math.floor(o/this.columnWidth);a=Math.max(0,a);var l=Math.floor(s/this.columnWidth);l-=s%this.columnWidth?0:1,l=Math.min(this.cols-1,l);for(var c=this._getOption("originTop"),u=(c?i.top:i.bottom)+n.outerHeight,h=a;h<=l;h++)this.colYs[h]=Math.max(u,this.colYs[h])},i._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},i._getContainerFitWidth=function(){var e=0,t=this.cols;while(--t){if(0!==this.colYs[t])break;e++}return(this.cols-e)*this.columnWidth-this.gutter},i.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n}))},"84f2":function(e,t){e.exports={}},"85f2":function(e,t,n){e.exports=n("454f")},"86cc":function(e,t,n){var i=n("cb7c"),r=n("c69a"),o=n("6a99"),s=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"8a81":function(e,t,n){"use strict";var i=n("7726"),r=n("69a8"),o=n("9e1e"),s=n("5ca1"),a=n("2aba"),l=n("67ab").KEY,c=n("79e5"),u=n("5537"),h=n("7f20"),d=n("ca5a"),p=n("2b4c"),f=n("37c8"),m=n("3a72"),g=n("d4c0"),y=n("1169"),v=n("cb7c"),_=n("d3f4"),x=n("4bf8"),b=n("6821"),w=n("6a99"),T=n("4630"),S=n("2aeb"),E=n("7bbc"),k=n("11e9"),C=n("2621"),A=n("86cc"),I=n("0d58"),M=k.f,P=A.f,D=E.f,L=i.Symbol,O=i.JSON,z=O&&O.stringify,R="prototype",F=p("_hidden"),N=p("toPrimitive"),B={}.propertyIsEnumerable,j=u("symbol-registry"),V=u("symbols"),$=u("op-symbols"),U=Object[R],q="function"==typeof L&&!!C.f,G=i.QObject,H=!G||!G[R]||!G[R].findChild,W=o&&c((function(){return 7!=S(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=M(U,t);i&&delete U[t],P(e,t,n),i&&e!==U&&P(U,t,i)}:P,Z=function(e){var t=V[e]=S(L[R]);return t._k=e,t},X=q&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},Y=function(e,t,n){return e===U&&Y($,t,n),v(e),t=w(t,!0),v(n),r(V,t)?(n.enumerable?(r(e,F)&&e[F][t]&&(e[F][t]=!1),n=S(n,{enumerable:T(0,!1)})):(r(e,F)||P(e,F,T(1,{})),e[F][t]=!0),W(e,t,n)):P(e,t,n)},Q=function(e,t){v(e);var n,i=g(t=b(t)),r=0,o=i.length;while(o>r)Y(e,n=i[r++],t[n]);return e},K=function(e,t){return void 0===t?S(e):Q(S(e),t)},J=function(e){var t=B.call(this,e=w(e,!0));return!(this===U&&r(V,e)&&!r($,e))&&(!(t||!r(this,e)||!r(V,e)||r(this,F)&&this[F][e])||t)},ee=function(e,t){if(e=b(e),t=w(t,!0),e!==U||!r(V,t)||r($,t)){var n=M(e,t);return!n||!r(V,t)||r(e,F)&&e[F][t]||(n.enumerable=!0),n}},te=function(e){var t,n=D(b(e)),i=[],o=0;while(n.length>o)r(V,t=n[o++])||t==F||t==l||i.push(t);return i},ne=function(e){var t,n=e===U,i=D(n?$:b(e)),o=[],s=0;while(i.length>s)!r(V,t=i[s++])||n&&!r(U,t)||o.push(V[t]);return o};q||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call($,n),r(this,F)&&r(this[F],e)&&(this[F][e]=!1),W(this,e,T(1,n))};return o&&H&&W(U,e,{configurable:!0,set:t}),Z(e)},a(L[R],"toString",(function(){return this._k})),k.f=ee,A.f=Y,n("9093").f=E.f=te,n("52a7").f=J,C.f=ne,o&&!n("2d00")&&a(U,"propertyIsEnumerable",J,!0),f.f=function(e){return Z(p(e))}),s(s.G+s.W+s.F*!q,{Symbol:L});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ie.length>re;)p(ie[re++]);for(var oe=I(p.store),se=0;oe.length>se;)m(oe[se++]);s(s.S+s.F*!q,"Symbol",{for:function(e){return r(j,e+="")?j[e]:j[e]=L(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!q,"Object",{create:K,defineProperty:Y,defineProperties:Q,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:ne});var ae=c((function(){C.f(1)}));s(s.S+s.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(x(e))}}),O&&s(s.S+s.F*(!q||c((function(){var e=L();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))}))),"JSON",{stringify:function(e){var t,n,i=[e],r=1;while(arguments.length>r)i.push(arguments[r++]);if(n=t=i[1],(_(t)||void 0!==e)&&!X(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),i[1]=t,z.apply(O,i)}}),L[R][N]||n("32e9")(L[R],N,L[R].valueOf),h(L,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},"8b97":function(e,t,n){var i=n("d3f4"),r=n("cb7c"),o=function(e,t){if(r(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(r){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:o}},"8df4":function(e,t,n){"use strict";var i=n("7a77");function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r((function(t){e=t}));return{token:t,cancel:e}},e.exports=r},"8e60":function(e,t,n){e.exports=!n("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8f60":function(e,t,n){"use strict";var i=n("a159"),r=n("aebd"),o=n("45f2"),s={};n("35e8")(s,n("5168")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(s,{next:r(1,n)}),o(e,t+" Iterator")}},9003:function(e,t,n){var i=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==i(e)}},9093:function(e,t,n){var i=n("ce10"),r=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},9138:function(e,t,n){e.exports=n("35e8")},"96cf":function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(D){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=t&&t.prototype instanceof g?t:g,o=Object.create(r.prototype),s=new I(i||[]);return o._invoke=E(e,n,s),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(D){return{type:"throw",arg:D}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",f="completed",m={};function g(){}function y(){}function v(){}var _={};_[o]=function(){return this};var x=Object.getPrototypeOf,b=x&&x(x(M([])));b&&b!==n&&i.call(b,o)&&(_=b);var w=v.prototype=g.prototype=Object.create(_);function T(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,o,s,a){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"===typeof h&&i.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(h).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(l.arg)}var r;function o(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}this._invoke=o}function E(e,t,n){var i=h;return function(r,o){if(i===p)throw new Error("Generator is already running");if(i===f){if("throw"===r)throw o;return P()}n.method=r,n.arg=o;while(1){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=u(e,t,n);if("normal"===l.type){if(i=n.done?f:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=f,n.method="throw",n.arg=l.arg)}}}function k(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator["return"]&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,m;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function M(e){if(e){var n=e[o];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,s=function n(){while(++r<e.length)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=w.constructor=v,v.constructor=y,y.displayName=l(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,a,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},T(S.prototype),S.prototype[s]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new S(c(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},T(w),l(w,a,"Generator"),w[o]=function(){return this},w.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){while(t.length){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=M,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return a.type="throw",a.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;A(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:M(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=i}catch(r){Function("r","regeneratorRuntime = r")(i)}},9744:function(e,t,n){"use strict";var i=n("4588"),r=n("be13");e.exports=function(e){var t=String(r(this)),n="",o=i(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},"9c12":function(e,t,n){var i=n("d3f4"),r=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&r(e)===e}},"9c6c":function(e,t,n){var i=n("2b4c")("unscopables"),r=Array.prototype;void 0==r[i]&&n("32e9")(r,i,{}),e.exports=function(e){r[i][e]=!0}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},"9def":function(e,t,n){var i=n("4588"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a026:function(e,t,n){"use strict";(function(e){
/*!
 * Vue.js v2.6.12
 * (c) 2014-2020 Evan You
 * Released under the MIT License.
 */
var n=Object.freeze({});function i(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(e){return!0===e}function s(e){return!1===e}function a(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function l(e){return null!==e&&"object"===typeof e}var c=Object.prototype.toString;function u(e){return"[object Object]"===c.call(e)}function h(e){return"[object RegExp]"===c.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return r(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function f(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),i=e.split(","),r=0;r<i.length;r++)n[i[r]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var y=g("slot,component",!0),v=g("key,ref,slot,slot-scope,is");function _(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var x=Object.prototype.hasOwnProperty;function b(e,t){return x.call(e,t)}function w(e){var t=Object.create(null);return function(n){var i=t[n];return i||(t[n]=e(n))}}var T=/-(\w)/g,S=w((function(e){return e.replace(T,(function(e,t){return t?t.toUpperCase():""}))})),E=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),k=/\B([A-Z])/g,C=w((function(e){return e.replace(k,"-$1").toLowerCase()}));function A(e,t){function n(n){var i=arguments.length;return i?i>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function I(e,t){return e.bind(t)}var M=Function.prototype.bind?I:A;function P(e,t){t=t||0;var n=e.length-t,i=new Array(n);while(n--)i[n]=e[n+t];return i}function D(e,t){for(var n in t)e[n]=t[n];return e}function L(e){for(var t={},n=0;n<e.length;n++)e[n]&&D(t,e[n]);return t}function O(e,t,n){}var z=function(e,t,n){return!1},R=function(e){return e};function F(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}function N(e,t){if(e===t)return!0;var n=l(e),i=l(t);if(!n||!i)return!n&&!i&&String(e)===String(t);try{var r=Array.isArray(e),o=Array.isArray(t);if(r&&o)return e.length===t.length&&e.every((function(e,n){return N(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(r||o)return!1;var s=Object.keys(e),a=Object.keys(t);return s.length===a.length&&s.every((function(n){return N(e[n],t[n])}))}catch(c){return!1}}function B(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function j(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var V="data-server-rendered",$=["component","directive","filter"],U=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],q={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:z,isReservedAttr:z,isUnknownElement:z,getTagNamespace:O,parsePlatformTagName:R,mustUseProp:z,async:!0,_lifecycleHooks:U},G=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function H(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function W(e,t,n,i){Object.defineProperty(e,t,{value:n,enumerable:!!i,writable:!0,configurable:!0})}var Z=new RegExp("[^"+G.source+".$_\\d]");function X(e){if(!Z.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}var Y,Q="__proto__"in{},K="undefined"!==typeof window,J="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,ee=J&&WXEnvironment.platform.toLowerCase(),te=K&&window.navigator.userAgent.toLowerCase(),ne=te&&/msie|trident/.test(te),ie=te&&te.indexOf("msie 9.0")>0,re=te&&te.indexOf("edge/")>0,oe=(te&&te.indexOf("android"),te&&/iphone|ipad|ipod|ios/.test(te)||"ios"===ee),se=(te&&/chrome\/\d+/.test(te),te&&/phantomjs/.test(te),te&&te.match(/firefox\/(\d+)/)),ae={}.watch,le=!1;if(K)try{var ce={};Object.defineProperty(ce,"passive",{get:function(){le=!0}}),window.addEventListener("test-passive",null,ce)}catch(Qc){}var ue=function(){return void 0===Y&&(Y=!K&&!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),Y},he=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function de(e){return"function"===typeof e&&/native code/.test(e.toString())}var pe,fe="undefined"!==typeof Symbol&&de(Symbol)&&"undefined"!==typeof Reflect&&de(Reflect.ownKeys);pe="undefined"!==typeof Set&&de(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var me=O,ge=0,ye=function(){this.id=ge++,this.subs=[]};ye.prototype.addSub=function(e){this.subs.push(e)},ye.prototype.removeSub=function(e){_(this.subs,e)},ye.prototype.depend=function(){ye.target&&ye.target.addDep(this)},ye.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t<n;t++)e[t].update()},ye.target=null;var ve=[];function _e(e){ve.push(e),ye.target=e}function xe(){ve.pop(),ye.target=ve[ve.length-1]}var be=function(e,t,n,i,r,o,s,a){this.tag=e,this.data=t,this.children=n,this.text=i,this.elm=r,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},we={child:{configurable:!0}};we.child.get=function(){return this.componentInstance},Object.defineProperties(be.prototype,we);var Te=function(e){void 0===e&&(e="");var t=new be;return t.text=e,t.isComment=!0,t};function Se(e){return new be(void 0,void 0,void 0,String(e))}function Ee(e){var t=new be(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ke=Array.prototype,Ce=Object.create(ke),Ae=["push","pop","shift","unshift","splice","sort","reverse"];Ae.forEach((function(e){var t=ke[e];W(Ce,e,(function(){var n=[],i=arguments.length;while(i--)n[i]=arguments[i];var r,o=t.apply(this,n),s=this.__ob__;switch(e){case"push":case"unshift":r=n;break;case"splice":r=n.slice(2);break}return r&&s.observeArray(r),s.dep.notify(),o}))}));var Ie=Object.getOwnPropertyNames(Ce),Me=!0;function Pe(e){Me=e}var De=function(e){this.value=e,this.dep=new ye,this.vmCount=0,W(e,"__ob__",this),Array.isArray(e)?(Q?Le(e,Ce):Oe(e,Ce,Ie),this.observeArray(e)):this.walk(e)};function Le(e,t){e.__proto__=t}function Oe(e,t,n){for(var i=0,r=n.length;i<r;i++){var o=n[i];W(e,o,t[o])}}function ze(e,t){var n;if(l(e)&&!(e instanceof be))return b(e,"__ob__")&&e.__ob__ instanceof De?n=e.__ob__:Me&&!ue()&&(Array.isArray(e)||u(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new De(e)),t&&n&&n.vmCount++,n}function Re(e,t,n,i,r){var o=new ye,s=Object.getOwnPropertyDescriptor(e,t);if(!s||!1!==s.configurable){var a=s&&s.get,l=s&&s.set;a&&!l||2!==arguments.length||(n=e[t]);var c=!r&&ze(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return ye.target&&(o.depend(),c&&(c.dep.depend(),Array.isArray(t)&&Be(t))),t},set:function(t){var i=a?a.call(e):n;t===i||t!==t&&i!==i||a&&!l||(l?l.call(e,t):n=t,c=!r&&ze(t),o.notify())}})}}function Fe(e,t,n){if(Array.isArray(e)&&d(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var i=e.__ob__;return e._isVue||i&&i.vmCount?n:i?(Re(i.value,t,n),i.dep.notify(),n):(e[t]=n,n)}function Ne(e,t){if(Array.isArray(e)&&d(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||b(e,t)&&(delete e[t],n&&n.dep.notify())}}function Be(e){for(var t=void 0,n=0,i=e.length;n<i;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&Be(t)}De.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Re(e,t[n])},De.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)ze(e[t])};var je=q.optionMergeStrategies;function Ve(e,t){if(!t)return e;for(var n,i,r,o=fe?Reflect.ownKeys(t):Object.keys(t),s=0;s<o.length;s++)n=o[s],"__ob__"!==n&&(i=e[n],r=t[n],b(e,n)?i!==r&&u(i)&&u(r)&&Ve(i,r):Fe(e,n,r));return e}function $e(e,t,n){return n?function(){var i="function"===typeof t?t.call(n,n):t,r="function"===typeof e?e.call(n,n):e;return i?Ve(i,r):r}:t?e?function(){return Ve("function"===typeof t?t.call(this,this):t,"function"===typeof e?e.call(this,this):e)}:t:e}function Ue(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?qe(n):n}function qe(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}function Ge(e,t,n,i){var r=Object.create(e||null);return t?D(r,t):r}je.data=function(e,t,n){return n?$e(e,t,n):t&&"function"!==typeof t?e:$e(e,t)},U.forEach((function(e){je[e]=Ue})),$.forEach((function(e){je[e+"s"]=Ge})),je.watch=function(e,t,n,i){if(e===ae&&(e=void 0),t===ae&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var r={};for(var o in D(r,e),t){var s=r[o],a=t[o];s&&!Array.isArray(s)&&(s=[s]),r[o]=s?s.concat(a):Array.isArray(a)?a:[a]}return r},je.props=je.methods=je.inject=je.computed=function(e,t,n,i){if(!e)return t;var r=Object.create(null);return D(r,e),t&&D(r,t),r},je.provide=$e;var He=function(e,t){return void 0===t?e:t};function We(e,t){var n=e.props;if(n){var i,r,o,s={};if(Array.isArray(n)){i=n.length;while(i--)r=n[i],"string"===typeof r&&(o=S(r),s[o]={type:null})}else if(u(n))for(var a in n)r=n[a],o=S(a),s[o]=u(r)?r:{type:r};else 0;e.props=s}}function Ze(e,t){var n=e.inject;if(n){var i=e.inject={};if(Array.isArray(n))for(var r=0;r<n.length;r++)i[n[r]]={from:n[r]};else if(u(n))for(var o in n){var s=n[o];i[o]=u(s)?D({from:o},s):{from:s}}else 0}}function Xe(e){var t=e.directives;if(t)for(var n in t){var i=t[n];"function"===typeof i&&(t[n]={bind:i,update:i})}}function Ye(e,t,n){if("function"===typeof t&&(t=t.options),We(t,n),Ze(t,n),Xe(t),!t._base&&(t.extends&&(e=Ye(e,t.extends,n)),t.mixins))for(var i=0,r=t.mixins.length;i<r;i++)e=Ye(e,t.mixins[i],n);var o,s={};for(o in e)a(o);for(o in t)b(e,o)||a(o);function a(i){var r=je[i]||He;s[i]=r(e[i],t[i],n,i)}return s}function Qe(e,t,n,i){if("string"===typeof n){var r=e[t];if(b(r,n))return r[n];var o=S(n);if(b(r,o))return r[o];var s=E(o);if(b(r,s))return r[s];var a=r[n]||r[o]||r[s];return a}}function Ke(e,t,n,i){var r=t[e],o=!b(n,e),s=n[e],a=nt(Boolean,r.type);if(a>-1)if(o&&!b(r,"default"))s=!1;else if(""===s||s===C(e)){var l=nt(String,r.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=Je(i,r,e);var c=Me;Pe(!0),ze(s),Pe(c)}return s}function Je(e,t,n){if(b(t,"default")){var i=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"===typeof i&&"Function"!==et(t.type)?i.call(e):i}}function et(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function tt(e,t){return et(e)===et(t)}function nt(e,t){if(!Array.isArray(t))return tt(t,e)?0:-1;for(var n=0,i=t.length;n<i;n++)if(tt(t[n],e))return n;return-1}function it(e,t,n){_e();try{if(t){var i=t;while(i=i.$parent){var r=i.$options.errorCaptured;if(r)for(var o=0;o<r.length;o++)try{var s=!1===r[o].call(i,e,t,n);if(s)return}catch(Qc){ot(Qc,i,"errorCaptured hook")}}}ot(e,t,n)}finally{xe()}}function rt(e,t,n,i,r){var o;try{o=n?e.apply(t,n):e.call(t),o&&!o._isVue&&p(o)&&!o._handled&&(o.catch((function(e){return it(e,i,r+" (Promise/async)")})),o._handled=!0)}catch(Qc){it(Qc,i,r)}return o}function ot(e,t,n){if(q.errorHandler)try{return q.errorHandler.call(null,e,t,n)}catch(Qc){Qc!==e&&st(Qc,null,"config.errorHandler")}st(e,t,n)}function st(e,t,n){if(!K&&!J||"undefined"===typeof console)throw e;console.error(e)}var at,lt=!1,ct=[],ut=!1;function ht(){ut=!1;var e=ct.slice(0);ct.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!==typeof Promise&&de(Promise)){var dt=Promise.resolve();at=function(){dt.then(ht),oe&&setTimeout(O)},lt=!0}else if(ne||"undefined"===typeof MutationObserver||!de(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())at="undefined"!==typeof setImmediate&&de(setImmediate)?function(){setImmediate(ht)}:function(){setTimeout(ht,0)};else{var pt=1,ft=new MutationObserver(ht),mt=document.createTextNode(String(pt));ft.observe(mt,{characterData:!0}),at=function(){pt=(pt+1)%2,mt.data=String(pt)},lt=!0}function gt(e,t){var n;if(ct.push((function(){if(e)try{e.call(t)}catch(Qc){it(Qc,t,"nextTick")}else n&&n(t)})),ut||(ut=!0,at()),!e&&"undefined"!==typeof Promise)return new Promise((function(e){n=e}))}var yt=new pe;function vt(e){_t(e,yt),yt.clear()}function _t(e,t){var n,i,r=Array.isArray(e);if(!(!r&&!l(e)||Object.isFrozen(e)||e instanceof be)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(r){n=e.length;while(n--)_t(e[n],t)}else{i=Object.keys(e),n=i.length;while(n--)_t(e[i[n]],t)}}}var xt=w((function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var i="!"===e.charAt(0);return e=i?e.slice(1):e,{name:e,once:n,capture:i,passive:t}}));function bt(e,t){function n(){var e=arguments,i=n.fns;if(!Array.isArray(i))return rt(i,null,arguments,t,"v-on handler");for(var r=i.slice(),o=0;o<r.length;o++)rt(r[o],null,e,t,"v-on handler")}return n.fns=e,n}function wt(e,t,n,r,s,a){var l,c,u,h;for(l in e)c=e[l],u=t[l],h=xt(l),i(c)||(i(u)?(i(c.fns)&&(c=e[l]=bt(c,a)),o(h.once)&&(c=e[l]=s(h.name,c,h.capture)),n(h.name,c,h.capture,h.passive,h.params)):c!==u&&(u.fns=c,e[l]=u));for(l in t)i(e[l])&&(h=xt(l),r(h.name,t[l],h.capture))}function Tt(e,t,n){var s;e instanceof be&&(e=e.data.hook||(e.data.hook={}));var a=e[t];function l(){n.apply(this,arguments),_(s.fns,l)}i(a)?s=bt([l]):r(a.fns)&&o(a.merged)?(s=a,s.fns.push(l)):s=bt([a,l]),s.merged=!0,e[t]=s}function St(e,t,n){var o=t.options.props;if(!i(o)){var s={},a=e.attrs,l=e.props;if(r(a)||r(l))for(var c in o){var u=C(c);Et(s,l,c,u,!0)||Et(s,a,c,u,!1)}return s}}function Et(e,t,n,i,o){if(r(t)){if(b(t,n))return e[n]=t[n],o||delete t[n],!0;if(b(t,i))return e[n]=t[i],o||delete t[i],!0}return!1}function kt(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function Ct(e){return a(e)?[Se(e)]:Array.isArray(e)?It(e):void 0}function At(e){return r(e)&&r(e.text)&&s(e.isComment)}function It(e,t){var n,s,l,c,u=[];for(n=0;n<e.length;n++)s=e[n],i(s)||"boolean"===typeof s||(l=u.length-1,c=u[l],Array.isArray(s)?s.length>0&&(s=It(s,(t||"")+"_"+n),At(s[0])&&At(c)&&(u[l]=Se(c.text+s[0].text),s.shift()),u.push.apply(u,s)):a(s)?At(c)?u[l]=Se(c.text+s):""!==s&&u.push(Se(s)):At(s)&&At(c)?u[l]=Se(c.text+s.text):(o(e._isVList)&&r(s.tag)&&i(s.key)&&r(t)&&(s.key="__vlist"+t+"_"+n+"__"),u.push(s)));return u}function Mt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function Pt(e){var t=Dt(e.$options.inject,e);t&&(Pe(!1),Object.keys(t).forEach((function(n){Re(e,n,t[n])})),Pe(!0))}function Dt(e,t){if(e){for(var n=Object.create(null),i=fe?Reflect.ownKeys(e):Object.keys(e),r=0;r<i.length;r++){var o=i[r];if("__ob__"!==o){var s=e[o].from,a=t;while(a){if(a._provided&&b(a._provided,s)){n[o]=a._provided[s];break}a=a.$parent}if(!a)if("default"in e[o]){var l=e[o].default;n[o]="function"===typeof l?l.call(t):l}else 0}}return n}}function Lt(e,t){if(!e||!e.length)return{};for(var n={},i=0,r=e.length;i<r;i++){var o=e[i],s=o.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,o.context!==t&&o.fnContext!==t||!s||null==s.slot)(n.default||(n.default=[])).push(o);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(Ot)&&delete n[c];return n}function Ot(e){return e.isComment&&!e.asyncFactory||" "===e.text}function zt(e,t,i){var r,o=Object.keys(t).length>0,s=e?!!e.$stable:!o,a=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&i&&i!==n&&a===i.$key&&!o&&!i.$hasNormal)return i;for(var l in r={},e)e[l]&&"$"!==l[0]&&(r[l]=Rt(t,l,e[l]))}else r={};for(var c in t)c in r||(r[c]=Ft(t,c));return e&&Object.isExtensible(e)&&(e._normalized=r),W(r,"$stable",s),W(r,"$key",a),W(r,"$hasNormal",o),r}function Rt(e,t,n){var i=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:Ct(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:i,enumerable:!0,configurable:!0}),i}function Ft(e,t){return function(){return e[t]}}function Nt(e,t){var n,i,o,s,a;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),i=0,o=e.length;i<o;i++)n[i]=t(e[i],i);else if("number"===typeof e)for(n=new Array(e),i=0;i<e;i++)n[i]=t(i+1,i);else if(l(e))if(fe&&e[Symbol.iterator]){n=[];var c=e[Symbol.iterator](),u=c.next();while(!u.done)n.push(t(u.value,n.length)),u=c.next()}else for(s=Object.keys(e),n=new Array(s.length),i=0,o=s.length;i<o;i++)a=s[i],n[i]=t(e[a],a,i);return r(n)||(n=[]),n._isVList=!0,n}function Bt(e,t,n,i){var r,o=this.$scopedSlots[e];o?(n=n||{},i&&(n=D(D({},i),n)),r=o(n)||t):r=this.$slots[e]||t;var s=n&&n.slot;return s?this.$createElement("template",{slot:s},r):r}function jt(e){return Qe(this.$options,"filters",e,!0)||R}function Vt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function $t(e,t,n,i,r){var o=q.keyCodes[t]||n;return r&&i&&!q.keyCodes[t]?Vt(r,i):o?Vt(o,e):i?C(i)!==t:void 0}function Ut(e,t,n,i,r){if(n)if(l(n)){var o;Array.isArray(n)&&(n=L(n));var s=function(s){if("class"===s||"style"===s||v(s))o=e;else{var a=e.attrs&&e.attrs.type;o=i||q.mustUseProp(t,a,s)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=S(s),c=C(s);if(!(l in o)&&!(c in o)&&(o[s]=n[s],r)){var u=e.on||(e.on={});u["update:"+s]=function(e){n[s]=e}}};for(var a in n)s(a)}else;return e}function qt(e,t){var n=this._staticTrees||(this._staticTrees=[]),i=n[e];return i&&!t||(i=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),Ht(i,"__static__"+e,!1)),i}function Gt(e,t,n){return Ht(e,"__once__"+t+(n?"_"+n:""),!0),e}function Ht(e,t,n){if(Array.isArray(e))for(var i=0;i<e.length;i++)e[i]&&"string"!==typeof e[i]&&Wt(e[i],t+"_"+i,n);else Wt(e,t,n)}function Wt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Zt(e,t){if(t)if(u(t)){var n=e.on=e.on?D({},e.on):{};for(var i in t){var r=n[i],o=t[i];n[i]=r?[].concat(r,o):o}}else;return e}function Xt(e,t,n,i){t=t||{$stable:!n};for(var r=0;r<e.length;r++){var o=e[r];Array.isArray(o)?Xt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return i&&(t.$key=i),t}function Yt(e,t){for(var n=0;n<t.length;n+=2){var i=t[n];"string"===typeof i&&i&&(e[t[n]]=t[n+1])}return e}function Qt(e,t){return"string"===typeof e?t+e:e}function Kt(e){e._o=Gt,e._n=m,e._s=f,e._l=Nt,e._t=Bt,e._q=N,e._i=B,e._m=qt,e._f=jt,e._k=$t,e._b=Ut,e._v=Se,e._e=Te,e._u=Xt,e._g=Zt,e._d=Yt,e._p=Qt}function Jt(e,t,i,r,s){var a,l=this,c=s.options;b(r,"_uid")?(a=Object.create(r),a._original=r):(a=r,r=r._original);var u=o(c._compiled),h=!u;this.data=e,this.props=t,this.children=i,this.parent=r,this.listeners=e.on||n,this.injections=Dt(c.inject,r),this.slots=function(){return l.$slots||zt(e.scopedSlots,l.$slots=Lt(i,r)),l.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return zt(e.scopedSlots,this.slots())}}),u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=zt(e.scopedSlots,this.$slots)),c._scopeId?this._c=function(e,t,n,i){var o=pn(a,e,t,n,i,h);return o&&!Array.isArray(o)&&(o.fnScopeId=c._scopeId,o.fnContext=r),o}:this._c=function(e,t,n,i){return pn(a,e,t,n,i,h)}}function en(e,t,i,o,s){var a=e.options,l={},c=a.props;if(r(c))for(var u in c)l[u]=Ke(u,c,t||n);else r(i.attrs)&&nn(l,i.attrs),r(i.props)&&nn(l,i.props);var h=new Jt(i,l,s,o,e),d=a.render.call(null,h._c,h);if(d instanceof be)return tn(d,i,h.parent,a,h);if(Array.isArray(d)){for(var p=Ct(d)||[],f=new Array(p.length),m=0;m<p.length;m++)f[m]=tn(p[m],i,h.parent,a,h);return f}}function tn(e,t,n,i,r){var o=Ee(e);return o.fnContext=n,o.fnOptions=i,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function nn(e,t){for(var n in t)e[S(n)]=t[n]}Kt(Jt.prototype);var rn={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;rn.prepatch(n,n)}else{var i=e.componentInstance=an(e,Dn);i.$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions,i=t.componentInstance=e.componentInstance;Fn(i,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,Vn(n,"mounted")),e.data.keepAlive&&(t._isMounted?ei(n):Bn(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?jn(t,!0):t.$destroy())}},on=Object.keys(rn);function sn(e,t,n,s,a){if(!i(e)){var c=n.$options._base;if(l(e)&&(e=c.extend(e)),"function"===typeof e){var u;if(i(e.cid)&&(u=e,e=Tn(u,c),void 0===e))return wn(u,t,n,s,a);t=t||{},Ti(e),r(t.model)&&un(e.options,t);var h=St(t,e,a);if(o(e.options.functional))return en(e,h,t,n,s);var d=t.on;if(t.on=t.nativeOn,o(e.options.abstract)){var p=t.slot;t={},p&&(t.slot=p)}ln(t);var f=e.options.name||a,m=new be("vue-component-"+e.cid+(f?"-"+f:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:h,listeners:d,tag:a,children:s},u);return m}}}function an(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},i=e.data.inlineTemplate;return r(i)&&(n.render=i.render,n.staticRenderFns=i.staticRenderFns),new e.componentOptions.Ctor(n)}function ln(e){for(var t=e.hook||(e.hook={}),n=0;n<on.length;n++){var i=on[n],r=t[i],o=rn[i];r===o||r&&r._merged||(t[i]=r?cn(o,r):o)}}function cn(e,t){var n=function(n,i){e(n,i),t(n,i)};return n._merged=!0,n}function un(e,t){var n=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var o=t.on||(t.on={}),s=o[i],a=t.model.callback;r(s)?(Array.isArray(s)?-1===s.indexOf(a):s!==a)&&(o[i]=[a].concat(s)):o[i]=a}var hn=1,dn=2;function pn(e,t,n,i,r,s){return(Array.isArray(n)||a(n))&&(r=i,i=n,n=void 0),o(s)&&(r=dn),fn(e,t,n,i,r)}function fn(e,t,n,i,o){if(r(n)&&r(n.__ob__))return Te();if(r(n)&&r(n.is)&&(t=n.is),!t)return Te();var s,a,l;(Array.isArray(i)&&"function"===typeof i[0]&&(n=n||{},n.scopedSlots={default:i[0]},i.length=0),o===dn?i=Ct(i):o===hn&&(i=kt(i)),"string"===typeof t)?(a=e.$vnode&&e.$vnode.ns||q.getTagNamespace(t),s=q.isReservedTag(t)?new be(q.parsePlatformTagName(t),n,i,void 0,void 0,e):n&&n.pre||!r(l=Qe(e.$options,"components",t))?new be(t,n,i,void 0,void 0,e):sn(l,n,e,i,t)):s=sn(t,n,e,i);return Array.isArray(s)?s:r(s)?(r(a)&&mn(s,a),r(n)&&gn(n),s):Te()}function mn(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),r(e.children))for(var s=0,a=e.children.length;s<a;s++){var l=e.children[s];r(l.tag)&&(i(l.ns)||o(n)&&"svg"!==l.tag)&&mn(l,t,n)}}function gn(e){l(e.style)&&vt(e.style),l(e.class)&&vt(e.class)}function yn(e){e._vnode=null,e._staticTrees=null;var t=e.$options,i=e.$vnode=t._parentVnode,r=i&&i.context;e.$slots=Lt(t._renderChildren,r),e.$scopedSlots=n,e._c=function(t,n,i,r){return pn(e,t,n,i,r,!1)},e.$createElement=function(t,n,i,r){return pn(e,t,n,i,r,!0)};var o=i&&i.data;Re(e,"$attrs",o&&o.attrs||n,null,!0),Re(e,"$listeners",t._parentListeners||n,null,!0)}var vn,_n=null;function xn(e){Kt(e.prototype),e.prototype.$nextTick=function(e){return gt(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,i=n.render,r=n._parentVnode;r&&(t.$scopedSlots=zt(r.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=r;try{_n=t,e=i.call(t._renderProxy,t.$createElement)}catch(Qc){it(Qc,t,"render"),e=t._vnode}finally{_n=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof be||(e=Te()),e.parent=r,e}}function bn(e,t){return(e.__esModule||fe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),l(e)?t.extend(e):e}function wn(e,t,n,i,r){var o=Te();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:i,tag:r},o}function Tn(e,t){if(o(e.error)&&r(e.errorComp))return e.errorComp;if(r(e.resolved))return e.resolved;var n=_n;if(n&&r(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),o(e.loading)&&r(e.loadingComp))return e.loadingComp;if(n&&!r(e.owners)){var s=e.owners=[n],a=!0,c=null,u=null;n.$on("hook:destroyed",(function(){return _(s,n)}));var h=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0,null!==c&&(clearTimeout(c),c=null),null!==u&&(clearTimeout(u),u=null))},d=j((function(n){e.resolved=bn(n,t),a?s.length=0:h(!0)})),f=j((function(t){r(e.errorComp)&&(e.error=!0,h(!0))})),m=e(d,f);return l(m)&&(p(m)?i(e.resolved)&&m.then(d,f):p(m.component)&&(m.component.then(d,f),r(m.error)&&(e.errorComp=bn(m.error,t)),r(m.loading)&&(e.loadingComp=bn(m.loading,t),0===m.delay?e.loading=!0:c=setTimeout((function(){c=null,i(e.resolved)&&i(e.error)&&(e.loading=!0,h(!1))}),m.delay||200)),r(m.timeout)&&(u=setTimeout((function(){u=null,i(e.resolved)&&f(null)}),m.timeout)))),a=!1,e.loading?e.loadingComp:e.resolved}}function Sn(e){return e.isComment&&e.asyncFactory}function En(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(r(n)&&(r(n.componentOptions)||Sn(n)))return n}}function kn(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Mn(e,t)}function Cn(e,t){vn.$on(e,t)}function An(e,t){vn.$off(e,t)}function In(e,t){var n=vn;return function i(){var r=t.apply(null,arguments);null!==r&&n.$off(e,i)}}function Mn(e,t,n){vn=e,wt(t,n||{},Cn,An,In,e),vn=void 0}function Pn(e){var t=/^hook:/;e.prototype.$on=function(e,n){var i=this;if(Array.isArray(e))for(var r=0,o=e.length;r<o;r++)i.$on(e[r],n);else(i._events[e]||(i._events[e]=[])).push(n),t.test(e)&&(i._hasHookEvent=!0);return i},e.prototype.$once=function(e,t){var n=this;function i(){n.$off(e,i),t.apply(n,arguments)}return i.fn=t,n.$on(e,i),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var i=0,r=e.length;i<r;i++)n.$off(e[i],t);return n}var o,s=n._events[e];if(!s)return n;if(!t)return n._events[e]=null,n;var a=s.length;while(a--)if(o=s[a],o===t||o.fn===t){s.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?P(n):n;for(var i=P(arguments,1),r='event handler for "'+e+'"',o=0,s=n.length;o<s;o++)rt(n[o],t,i,t,r)}return t}}var Dn=null;function Ln(e){var t=Dn;return Dn=e,function(){Dn=t}}function On(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){while(n.$options.abstract&&n.$parent)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function zn(e){e.prototype._update=function(e,t){var n=this,i=n.$el,r=n._vnode,o=Ln(n);n._vnode=e,n.$el=r?n.__patch__(r,e):n.__patch__(n.$el,e,t,!1),o(),i&&(i.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Vn(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||_(t.$children,e),e._watcher&&e._watcher.teardown();var n=e._watchers.length;while(n--)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Vn(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}function Rn(e,t,n){var i;return e.$el=t,e.$options.render||(e.$options.render=Te),Vn(e,"beforeMount"),i=function(){e._update(e._render(),n)},new ri(e,i,O,{before:function(){e._isMounted&&!e._isDestroyed&&Vn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Vn(e,"mounted")),e}function Fn(e,t,i,r,o){var s=r.data.scopedSlots,a=e.$scopedSlots,l=!!(s&&!s.$stable||a!==n&&!a.$stable||s&&e.$scopedSlots.$key!==s.$key),c=!!(o||e.$options._renderChildren||l);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o,e.$attrs=r.data.attrs||n,e.$listeners=i||n,t&&e.$options.props){Pe(!1);for(var u=e._props,h=e.$options._propKeys||[],d=0;d<h.length;d++){var p=h[d],f=e.$options.props;u[p]=Ke(p,f,t,e)}Pe(!0),e.$options.propsData=t}i=i||n;var m=e.$options._parentListeners;e.$options._parentListeners=i,Mn(e,i,m),c&&(e.$slots=Lt(o,r.context),e.$forceUpdate())}function Nn(e){while(e&&(e=e.$parent))if(e._inactive)return!0;return!1}function Bn(e,t){if(t){if(e._directInactive=!1,Nn(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Bn(e.$children[n]);Vn(e,"activated")}}function jn(e,t){if((!t||(e._directInactive=!0,!Nn(e)))&&!e._inactive){e._inactive=!0;for(var n=0;n<e.$children.length;n++)jn(e.$children[n]);Vn(e,"deactivated")}}function Vn(e,t){_e();var n=e.$options[t],i=t+" hook";if(n)for(var r=0,o=n.length;r<o;r++)rt(n[r],e,null,e,i);e._hasHookEvent&&e.$emit("hook:"+t),xe()}var $n=[],Un=[],qn={},Gn=!1,Hn=!1,Wn=0;function Zn(){Wn=$n.length=Un.length=0,qn={},Gn=Hn=!1}var Xn=0,Yn=Date.now;if(K&&!ne){var Qn=window.performance;Qn&&"function"===typeof Qn.now&&Yn()>document.createEvent("Event").timeStamp&&(Yn=function(){return Qn.now()})}function Kn(){var e,t;for(Xn=Yn(),Hn=!0,$n.sort((function(e,t){return e.id-t.id})),Wn=0;Wn<$n.length;Wn++)e=$n[Wn],e.before&&e.before(),t=e.id,qn[t]=null,e.run();var n=Un.slice(),i=$n.slice();Zn(),ti(n),Jn(i),he&&q.devtools&&he.emit("flush")}function Jn(e){var t=e.length;while(t--){var n=e[t],i=n.vm;i._watcher===n&&i._isMounted&&!i._isDestroyed&&Vn(i,"updated")}}function ei(e){e._inactive=!1,Un.push(e)}function ti(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Bn(e[t],!0)}function ni(e){var t=e.id;if(null==qn[t]){if(qn[t]=!0,Hn){var n=$n.length-1;while(n>Wn&&$n[n].id>e.id)n--;$n.splice(n+1,0,e)}else $n.push(e);Gn||(Gn=!0,gt(Kn))}}var ii=0,ri=function(e,t,n,i,r){this.vm=e,r&&(e._watcher=this),e._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ii,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new pe,this.newDepIds=new pe,this.expression="","function"===typeof t?this.getter=t:(this.getter=X(t),this.getter||(this.getter=O)),this.value=this.lazy?void 0:this.get()};ri.prototype.get=function(){var e;_e(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(Qc){if(!this.user)throw Qc;it(Qc,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&vt(e),xe(),this.cleanupDeps()}return e},ri.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},ri.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},ri.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():ni(this)},ri.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(Qc){it(Qc,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},ri.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ri.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},ri.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var oi={enumerable:!0,configurable:!0,get:O,set:O};function si(e,t,n){oi.get=function(){return this[t][n]},oi.set=function(e){this[t][n]=e},Object.defineProperty(e,n,oi)}function ai(e){e._watchers=[];var t=e.$options;t.props&&li(e,t.props),t.methods&&gi(e,t.methods),t.data?ci(e):ze(e._data={},!0),t.computed&&di(e,t.computed),t.watch&&t.watch!==ae&&yi(e,t.watch)}function li(e,t){var n=e.$options.propsData||{},i=e._props={},r=e.$options._propKeys=[],o=!e.$parent;o||Pe(!1);var s=function(o){r.push(o);var s=Ke(o,t,n,e);Re(i,o,s),o in e||si(e,"_props",o)};for(var a in t)s(a);Pe(!0)}function ci(e){var t=e.$options.data;t=e._data="function"===typeof t?ui(t,e):t||{},u(t)||(t={});var n=Object.keys(t),i=e.$options.props,r=(e.$options.methods,n.length);while(r--){var o=n[r];0,i&&b(i,o)||H(o)||si(e,"_data",o)}ze(t,!0)}function ui(e,t){_e();try{return e.call(t,t)}catch(Qc){return it(Qc,t,"data()"),{}}finally{xe()}}var hi={lazy:!0};function di(e,t){var n=e._computedWatchers=Object.create(null),i=ue();for(var r in t){var o=t[r],s="function"===typeof o?o:o.get;0,i||(n[r]=new ri(e,s||O,O,hi)),r in e||pi(e,r,o)}}function pi(e,t,n){var i=!ue();"function"===typeof n?(oi.get=i?fi(t):mi(n),oi.set=O):(oi.get=n.get?i&&!1!==n.cache?fi(t):mi(n.get):O,oi.set=n.set||O),Object.defineProperty(e,t,oi)}function fi(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ye.target&&t.depend(),t.value}}function mi(e){return function(){return e.call(this,this)}}function gi(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?O:M(t[n],e)}function yi(e,t){for(var n in t){var i=t[n];if(Array.isArray(i))for(var r=0;r<i.length;r++)vi(e,n,i[r]);else vi(e,n,i)}}function vi(e,t,n,i){return u(n)&&(i=n,n=n.handler),"string"===typeof n&&(n=e[n]),e.$watch(t,n,i)}function _i(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Fe,e.prototype.$delete=Ne,e.prototype.$watch=function(e,t,n){var i=this;if(u(t))return vi(i,e,t,n);n=n||{},n.user=!0;var r=new ri(i,e,t,n);if(n.immediate)try{t.call(i,r.value)}catch(o){it(o,i,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}var xi=0;function bi(e){e.prototype._init=function(e){var t=this;t._uid=xi++,t._isVue=!0,e&&e._isComponent?wi(t,e):t.$options=Ye(Ti(t.constructor),e||{},t),t._renderProxy=t,t._self=t,On(t),kn(t),yn(t),Vn(t,"beforeCreate"),Pt(t),ai(t),Mt(t),Vn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}function wi(e,t){var n=e.$options=Object.create(e.constructor.options),i=t._parentVnode;n.parent=t.parent,n._parentVnode=i;var r=i.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function Ti(e){var t=e.options;if(e.super){var n=Ti(e.super),i=e.superOptions;if(n!==i){e.superOptions=n;var r=Si(e);r&&D(e.extendOptions,r),t=e.options=Ye(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function Si(e){var t,n=e.options,i=e.sealedOptions;for(var r in n)n[r]!==i[r]&&(t||(t={}),t[r]=n[r]);return t}function Ei(e){this._init(e)}function ki(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=P(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function Ci(e){e.mixin=function(e){return this.options=Ye(this.options,e),this}}function Ai(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,i=n.cid,r=e._Ctor||(e._Ctor={});if(r[i])return r[i];var o=e.name||n.options.name;var s=function(e){this._init(e)};return s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.cid=t++,s.options=Ye(n.options,e),s["super"]=n,s.options.props&&Ii(s),s.options.computed&&Mi(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,$.forEach((function(e){s[e]=n[e]})),o&&(s.options.components[o]=s),s.superOptions=n.options,s.extendOptions=e,s.sealedOptions=D({},s.options),r[i]=s,s}}function Ii(e){var t=e.options.props;for(var n in t)si(e.prototype,"_props",n)}function Mi(e){var t=e.options.computed;for(var n in t)pi(e.prototype,n,t[n])}function Pi(e){$.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function Di(e){return e&&(e.Ctor.options.name||e.tag)}function Li(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!h(e)&&e.test(t)}function Oi(e,t){var n=e.cache,i=e.keys,r=e._vnode;for(var o in n){var s=n[o];if(s){var a=Di(s.componentOptions);a&&!t(a)&&zi(n,o,i,r)}}}function zi(e,t,n,i){var r=e[t];!r||i&&r.tag===i.tag||r.componentInstance.$destroy(),e[t]=null,_(n,t)}bi(Ei),_i(Ei),Pn(Ei),zn(Ei),xn(Ei);var Ri=[String,RegExp,Array],Fi={name:"keep-alive",abstract:!0,props:{include:Ri,exclude:Ri,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)zi(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Oi(e,(function(e){return Li(t,e)}))})),this.$watch("exclude",(function(t){Oi(e,(function(e){return!Li(t,e)}))}))},render:function(){var e=this.$slots.default,t=En(e),n=t&&t.componentOptions;if(n){var i=Di(n),r=this,o=r.include,s=r.exclude;if(o&&(!i||!Li(o,i))||s&&i&&Li(s,i))return t;var a=this,l=a.cache,c=a.keys,u=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;l[u]?(t.componentInstance=l[u].componentInstance,_(c,u),c.push(u)):(l[u]=t,c.push(u),this.max&&c.length>parseInt(this.max)&&zi(l,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Ni={KeepAlive:Fi};function Bi(e){var t={get:function(){return q}};Object.defineProperty(e,"config",t),e.util={warn:me,extend:D,mergeOptions:Ye,defineReactive:Re},e.set=Fe,e.delete=Ne,e.nextTick=gt,e.observable=function(e){return ze(e),e},e.options=Object.create(null),$.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,Ni),ki(e),Ci(e),Ai(e),Pi(e)}Bi(Ei),Object.defineProperty(Ei.prototype,"$isServer",{get:ue}),Object.defineProperty(Ei.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ei,"FunctionalRenderContext",{value:Jt}),Ei.version="2.6.12";var ji=g("style,class"),Vi=g("input,textarea,option,select,progress"),$i=function(e,t,n){return"value"===n&&Vi(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Ui=g("contenteditable,draggable,spellcheck"),qi=g("events,caret,typing,plaintext-only"),Gi=function(e,t){return Yi(t)||"false"===t?"false":"contenteditable"===e&&qi(t)?t:"true"},Hi=g("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"),Wi="http://www.w3.org/1999/xlink",Zi=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Xi=function(e){return Zi(e)?e.slice(6,e.length):""},Yi=function(e){return null==e||!1===e};function Qi(e){var t=e.data,n=e,i=e;while(r(i.componentInstance))i=i.componentInstance._vnode,i&&i.data&&(t=Ki(i.data,t));while(r(n=n.parent))n&&n.data&&(t=Ki(t,n.data));return Ji(t.staticClass,t.class)}function Ki(e,t){return{staticClass:er(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function Ji(e,t){return r(e)||r(t)?er(e,tr(t)):""}function er(e,t){return e?t?e+" "+t:e:t||""}function tr(e){return Array.isArray(e)?nr(e):l(e)?ir(e):"string"===typeof e?e:""}function nr(e){for(var t,n="",i=0,o=e.length;i<o;i++)r(t=tr(e[i]))&&""!==t&&(n&&(n+=" "),n+=t);return n}function ir(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}var rr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},or=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),sr=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),ar=function(e){return"pre"===e},lr=function(e){return or(e)||sr(e)};function cr(e){return sr(e)?"svg":"math"===e?"math":void 0}var ur=Object.create(null);function hr(e){if(!K)return!0;if(lr(e))return!1;if(e=e.toLowerCase(),null!=ur[e])return ur[e];var t=document.createElement(e);return e.indexOf("-")>-1?ur[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ur[e]=/HTMLUnknownElement/.test(t.toString())}var dr=g("text,number,password,search,email,tel,url");function pr(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function fr(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function mr(e,t){return document.createElementNS(rr[e],t)}function gr(e){return document.createTextNode(e)}function yr(e){return document.createComment(e)}function vr(e,t,n){e.insertBefore(t,n)}function _r(e,t){e.removeChild(t)}function xr(e,t){e.appendChild(t)}function br(e){return e.parentNode}function wr(e){return e.nextSibling}function Tr(e){return e.tagName}function Sr(e,t){e.textContent=t}function Er(e,t){e.setAttribute(t,"")}var kr=Object.freeze({createElement:fr,createElementNS:mr,createTextNode:gr,createComment:yr,insertBefore:vr,removeChild:_r,appendChild:xr,parentNode:br,nextSibling:wr,tagName:Tr,setTextContent:Sr,setStyleScope:Er}),Cr={create:function(e,t){Ar(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Ar(e,!0),Ar(t))},destroy:function(e){Ar(e,!0)}};function Ar(e,t){var n=e.data.ref;if(r(n)){var i=e.context,o=e.componentInstance||e.elm,s=i.$refs;t?Array.isArray(s[n])?_(s[n],o):s[n]===o&&(s[n]=void 0):e.data.refInFor?Array.isArray(s[n])?s[n].indexOf(o)<0&&s[n].push(o):s[n]=[o]:s[n]=o}}var Ir=new be("",{},[]),Mr=["create","activate","update","remove","destroy"];function Pr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&r(e.data)===r(t.data)&&Dr(e,t)||o(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&i(t.asyncFactory.error))}function Dr(e,t){if("input"!==e.tag)return!0;var n,i=r(n=e.data)&&r(n=n.attrs)&&n.type,o=r(n=t.data)&&r(n=n.attrs)&&n.type;return i===o||dr(i)&&dr(o)}function Lr(e,t,n){var i,o,s={};for(i=t;i<=n;++i)o=e[i].key,r(o)&&(s[o]=i);return s}function Or(e){var t,n,s={},l=e.modules,c=e.nodeOps;for(t=0;t<Mr.length;++t)for(s[Mr[t]]=[],n=0;n<l.length;++n)r(l[n][Mr[t]])&&s[Mr[t]].push(l[n][Mr[t]]);function u(e){return new be(c.tagName(e).toLowerCase(),{},[],void 0,e)}function h(e,t){function n(){0===--n.listeners&&d(e)}return n.listeners=t,n}function d(e){var t=c.parentNode(e);r(t)&&c.removeChild(t,e)}function p(e,t,n,i,s,a,l){if(r(e.elm)&&r(a)&&(e=a[l]=Ee(e)),e.isRootInsert=!s,!f(e,t,n,i)){var u=e.data,h=e.children,d=e.tag;r(d)?(e.elm=e.ns?c.createElementNS(e.ns,d):c.createElement(d,e),w(e),_(e,h,t),r(u)&&b(e,t),v(n,e.elm,i)):o(e.isComment)?(e.elm=c.createComment(e.text),v(n,e.elm,i)):(e.elm=c.createTextNode(e.text),v(n,e.elm,i))}}function f(e,t,n,i){var s=e.data;if(r(s)){var a=r(e.componentInstance)&&s.keepAlive;if(r(s=s.hook)&&r(s=s.init)&&s(e,!1),r(e.componentInstance))return m(e,t),v(n,e.elm,i),o(a)&&y(e,t,n,i),!0}}function m(e,t){r(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,x(e)?(b(e,t),w(e)):(Ar(e),t.push(e))}function y(e,t,n,i){var o,a=e;while(a.componentInstance)if(a=a.componentInstance._vnode,r(o=a.data)&&r(o=o.transition)){for(o=0;o<s.activate.length;++o)s.activate[o](Ir,a);t.push(a);break}v(n,e.elm,i)}function v(e,t,n){r(e)&&(r(n)?c.parentNode(n)===e&&c.insertBefore(e,t,n):c.appendChild(e,t))}function _(e,t,n){if(Array.isArray(t)){0;for(var i=0;i<t.length;++i)p(t[i],n,e.elm,null,!0,t,i)}else a(e.text)&&c.appendChild(e.elm,c.createTextNode(String(e.text)))}function x(e){while(e.componentInstance)e=e.componentInstance._vnode;return r(e.tag)}function b(e,n){for(var i=0;i<s.create.length;++i)s.create[i](Ir,e);t=e.data.hook,r(t)&&(r(t.create)&&t.create(Ir,e),r(t.insert)&&n.push(e))}function w(e){var t;if(r(t=e.fnScopeId))c.setStyleScope(e.elm,t);else{var n=e;while(n)r(t=n.context)&&r(t=t.$options._scopeId)&&c.setStyleScope(e.elm,t),n=n.parent}r(t=Dn)&&t!==e.context&&t!==e.fnContext&&r(t=t.$options._scopeId)&&c.setStyleScope(e.elm,t)}function T(e,t,n,i,r,o){for(;i<=r;++i)p(n[i],o,e,t,!1,n,i)}function S(e){var t,n,i=e.data;if(r(i))for(r(t=i.hook)&&r(t=t.destroy)&&t(e),t=0;t<s.destroy.length;++t)s.destroy[t](e);if(r(t=e.children))for(n=0;n<e.children.length;++n)S(e.children[n])}function E(e,t,n){for(;t<=n;++t){var i=e[t];r(i)&&(r(i.tag)?(k(i),S(i)):d(i.elm))}}function k(e,t){if(r(t)||r(e.data)){var n,i=s.remove.length+1;for(r(t)?t.listeners+=i:t=h(e.elm,i),r(n=e.componentInstance)&&r(n=n._vnode)&&r(n.data)&&k(n,t),n=0;n<s.remove.length;++n)s.remove[n](e,t);r(n=e.data.hook)&&r(n=n.remove)?n(e,t):t()}else d(e.elm)}function C(e,t,n,o,s){var a,l,u,h,d=0,f=0,m=t.length-1,g=t[0],y=t[m],v=n.length-1,_=n[0],x=n[v],b=!s;while(d<=m&&f<=v)i(g)?g=t[++d]:i(y)?y=t[--m]:Pr(g,_)?(I(g,_,o,n,f),g=t[++d],_=n[++f]):Pr(y,x)?(I(y,x,o,n,v),y=t[--m],x=n[--v]):Pr(g,x)?(I(g,x,o,n,v),b&&c.insertBefore(e,g.elm,c.nextSibling(y.elm)),g=t[++d],x=n[--v]):Pr(y,_)?(I(y,_,o,n,f),b&&c.insertBefore(e,y.elm,g.elm),y=t[--m],_=n[++f]):(i(a)&&(a=Lr(t,d,m)),l=r(_.key)?a[_.key]:A(_,t,d,m),i(l)?p(_,o,e,g.elm,!1,n,f):(u=t[l],Pr(u,_)?(I(u,_,o,n,f),t[l]=void 0,b&&c.insertBefore(e,u.elm,g.elm)):p(_,o,e,g.elm,!1,n,f)),_=n[++f]);d>m?(h=i(n[v+1])?null:n[v+1].elm,T(e,h,n,f,v,o)):f>v&&E(t,d,m)}function A(e,t,n,i){for(var o=n;o<i;o++){var s=t[o];if(r(s)&&Pr(e,s))return o}}function I(e,t,n,a,l,u){if(e!==t){r(t.elm)&&r(a)&&(t=a[l]=Ee(t));var h=t.elm=e.elm;if(o(e.isAsyncPlaceholder))r(t.asyncFactory.resolved)?D(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(o(t.isStatic)&&o(e.isStatic)&&t.key===e.key&&(o(t.isCloned)||o(t.isOnce)))t.componentInstance=e.componentInstance;else{var d,p=t.data;r(p)&&r(d=p.hook)&&r(d=d.prepatch)&&d(e,t);var f=e.children,m=t.children;if(r(p)&&x(t)){for(d=0;d<s.update.length;++d)s.update[d](e,t);r(d=p.hook)&&r(d=d.update)&&d(e,t)}i(t.text)?r(f)&&r(m)?f!==m&&C(h,f,m,n,u):r(m)?(r(e.text)&&c.setTextContent(h,""),T(h,null,m,0,m.length-1,n)):r(f)?E(f,0,f.length-1):r(e.text)&&c.setTextContent(h,""):e.text!==t.text&&c.setTextContent(h,t.text),r(p)&&r(d=p.hook)&&r(d=d.postpatch)&&d(e,t)}}}function M(e,t,n){if(o(n)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i<t.length;++i)t[i].data.hook.insert(t[i])}var P=g("attrs,class,staticClass,staticStyle,key");function D(e,t,n,i){var s,a=t.tag,l=t.data,c=t.children;if(i=i||l&&l.pre,t.elm=e,o(t.isComment)&&r(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(r(l)&&(r(s=l.hook)&&r(s=s.init)&&s(t,!0),r(s=t.componentInstance)))return m(t,n),!0;if(r(a)){if(r(c))if(e.hasChildNodes())if(r(s=l)&&r(s=s.domProps)&&r(s=s.innerHTML)){if(s!==e.innerHTML)return!1}else{for(var u=!0,h=e.firstChild,d=0;d<c.length;d++){if(!h||!D(h,c[d],n,i)){u=!1;break}h=h.nextSibling}if(!u||h)return!1}else _(t,c,n);if(r(l)){var p=!1;for(var f in l)if(!P(f)){p=!0,b(t,n);break}!p&&l["class"]&&vt(l["class"])}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,a){if(!i(t)){var l=!1,h=[];if(i(e))l=!0,p(t,h);else{var d=r(e.nodeType);if(!d&&Pr(e,t))I(e,t,h,null,null,a);else{if(d){if(1===e.nodeType&&e.hasAttribute(V)&&(e.removeAttribute(V),n=!0),o(n)&&D(e,t,h))return M(t,h,!0),e;e=u(e)}var f=e.elm,m=c.parentNode(f);if(p(t,h,f._leaveCb?null:m,c.nextSibling(f)),r(t.parent)){var g=t.parent,y=x(t);while(g){for(var v=0;v<s.destroy.length;++v)s.destroy[v](g);if(g.elm=t.elm,y){for(var _=0;_<s.create.length;++_)s.create[_](Ir,g);var b=g.data.hook.insert;if(b.merged)for(var w=1;w<b.fns.length;w++)b.fns[w]()}else Ar(g);g=g.parent}}r(m)?E([e],0,0):r(e.tag)&&S(e)}}return M(t,h,l),t.elm}r(e)&&S(e)}}var zr={create:Rr,update:Rr,destroy:function(e){Rr(e,Ir)}};function Rr(e,t){(e.data.directives||t.data.directives)&&Fr(e,t)}function Fr(e,t){var n,i,r,o=e===Ir,s=t===Ir,a=Br(e.data.directives,e.context),l=Br(t.data.directives,t.context),c=[],u=[];for(n in l)i=a[n],r=l[n],i?(r.oldValue=i.value,r.oldArg=i.arg,Vr(r,"update",t,e),r.def&&r.def.componentUpdated&&u.push(r)):(Vr(r,"bind",t,e),r.def&&r.def.inserted&&c.push(r));if(c.length){var h=function(){for(var n=0;n<c.length;n++)Vr(c[n],"inserted",t,e)};o?Tt(t,"insert",h):h()}if(u.length&&Tt(t,"postpatch",(function(){for(var n=0;n<u.length;n++)Vr(u[n],"componentUpdated",t,e)})),!o)for(n in a)l[n]||Vr(a[n],"unbind",e,e,s)}var Nr=Object.create(null);function Br(e,t){var n,i,r=Object.create(null);if(!e)return r;for(n=0;n<e.length;n++)i=e[n],i.modifiers||(i.modifiers=Nr),r[jr(i)]=i,i.def=Qe(t.$options,"directives",i.name,!0);return r}function jr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Vr(e,t,n,i,r){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,i,r)}catch(Qc){it(Qc,n.context,"directive "+e.name+" "+t+" hook")}}var $r=[Cr,zr];function Ur(e,t){var n=t.componentOptions;if((!r(n)||!1!==n.Ctor.options.inheritAttrs)&&(!i(e.data.attrs)||!i(t.data.attrs))){var o,s,a,l=t.elm,c=e.data.attrs||{},u=t.data.attrs||{};for(o in r(u.__ob__)&&(u=t.data.attrs=D({},u)),u)s=u[o],a=c[o],a!==s&&qr(l,o,s);for(o in(ne||re)&&u.value!==c.value&&qr(l,"value",u.value),c)i(u[o])&&(Zi(o)?l.removeAttributeNS(Wi,Xi(o)):Ui(o)||l.removeAttribute(o))}}function qr(e,t,n){e.tagName.indexOf("-")>-1?Gr(e,t,n):Hi(t)?Yi(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Ui(t)?e.setAttribute(t,Gi(t,n)):Zi(t)?Yi(n)?e.removeAttributeNS(Wi,Xi(t)):e.setAttributeNS(Wi,t,n):Gr(e,t,n)}function Gr(e,t,n){if(Yi(n))e.removeAttribute(t);else{if(ne&&!ie&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var i=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",i)};e.addEventListener("input",i),e.__ieph=!0}e.setAttribute(t,n)}}var Hr={create:Ur,update:Ur};function Wr(e,t){var n=t.elm,o=t.data,s=e.data;if(!(i(o.staticClass)&&i(o.class)&&(i(s)||i(s.staticClass)&&i(s.class)))){var a=Qi(t),l=n._transitionClasses;r(l)&&(a=er(a,tr(l))),a!==n._prevClass&&(n.setAttribute("class",a),n._prevClass=a)}}var Zr,Xr,Yr,Qr,Kr,Jr,eo={create:Wr,update:Wr},to=/[\w).+\-_$\]]/;function no(e){var t,n,i,r,o,s=!1,a=!1,l=!1,c=!1,u=0,h=0,d=0,p=0;for(i=0;i<e.length;i++)if(n=t,t=e.charCodeAt(i),s)39===t&&92!==n&&(s=!1);else if(a)34===t&&92!==n&&(a=!1);else if(l)96===t&&92!==n&&(l=!1);else if(c)47===t&&92!==n&&(c=!1);else if(124!==t||124===e.charCodeAt(i+1)||124===e.charCodeAt(i-1)||u||h||d){switch(t){case 34:a=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:d++;break;case 41:d--;break;case 91:h++;break;case 93:h--;break;case 123:u++;break;case 125:u--;break}if(47===t){for(var f=i-1,m=void 0;f>=0;f--)if(m=e.charAt(f)," "!==m)break;m&&to.test(m)||(c=!0)}}else void 0===r?(p=i+1,r=e.slice(0,i).trim()):g();function g(){(o||(o=[])).push(e.slice(p,i).trim()),p=i+1}if(void 0===r?r=e.slice(0,i).trim():0!==p&&g(),o)for(i=0;i<o.length;i++)r=io(r,o[i]);return r}function io(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var i=t.slice(0,n),r=t.slice(n+1);return'_f("'+i+'")('+e+(")"!==r?","+r:r)}function ro(e,t){console.error("[Vue compiler]: "+e)}function oo(e,t){return e?e.map((function(e){return e[t]})).filter((function(e){return e})):[]}function so(e,t,n,i,r){(e.props||(e.props=[])).push(yo({name:t,value:n,dynamic:r},i)),e.plain=!1}function ao(e,t,n,i,r){var o=r?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[]);o.push(yo({name:t,value:n,dynamic:r},i)),e.plain=!1}function lo(e,t,n,i){e.attrsMap[t]=n,e.attrsList.push(yo({name:t,value:n},i))}function co(e,t,n,i,r,o,s,a){(e.directives||(e.directives=[])).push(yo({name:t,rawName:n,value:i,arg:r,isDynamicArg:o,modifiers:s},a)),e.plain=!1}function uo(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function ho(e,t,i,r,o,s,a,l){var c;r=r||n,r.right?l?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete r.right):r.middle&&(l?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),r.capture&&(delete r.capture,t=uo("!",t,l)),r.once&&(delete r.once,t=uo("~",t,l)),r.passive&&(delete r.passive,t=uo("&",t,l)),r.native?(delete r.native,c=e.nativeEvents||(e.nativeEvents={})):c=e.events||(e.events={});var u=yo({value:i.trim(),dynamic:l},a);r!==n&&(u.modifiers=r);var h=c[t];Array.isArray(h)?o?h.unshift(u):h.push(u):c[t]=h?o?[u,h]:[h,u]:u,e.plain=!1}function po(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}function fo(e,t,n){var i=mo(e,":"+t)||mo(e,"v-bind:"+t);if(null!=i)return no(i);if(!1!==n){var r=mo(e,t);if(null!=r)return JSON.stringify(r)}}function mo(e,t,n){var i;if(null!=(i=e.attrsMap[t]))for(var r=e.attrsList,o=0,s=r.length;o<s;o++)if(r[o].name===t){r.splice(o,1);break}return n&&delete e.attrsMap[t],i}function go(e,t){for(var n=e.attrsList,i=0,r=n.length;i<r;i++){var o=n[i];if(t.test(o.name))return n.splice(i,1),o}}function yo(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function vo(e,t,n){var i=n||{},r=i.number,o=i.trim,s="$$v",a=s;o&&(a="(typeof "+s+" === 'string'? "+s+".trim(): "+s+")"),r&&(a="_n("+a+")");var l=_o(t,a);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ("+s+") {"+l+"}"}}function _o(e,t){var n=xo(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function xo(e){if(e=e.trim(),Zr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<Zr-1)return Qr=e.lastIndexOf("."),Qr>-1?{exp:e.slice(0,Qr),key:'"'+e.slice(Qr+1)+'"'}:{exp:e,key:null};Xr=e,Qr=Kr=Jr=0;while(!wo())Yr=bo(),To(Yr)?Eo(Yr):91===Yr&&So(Yr);return{exp:e.slice(0,Kr),key:e.slice(Kr+1,Jr)}}function bo(){return Xr.charCodeAt(++Qr)}function wo(){return Qr>=Zr}function To(e){return 34===e||39===e}function So(e){var t=1;Kr=Qr;while(!wo())if(e=bo(),To(e))Eo(e);else if(91===e&&t++,93===e&&t--,0===t){Jr=Qr;break}}function Eo(e){var t=e;while(!wo())if(e=bo(),e===t)break}var ko,Co="__r",Ao="__c";function Io(e,t,n){n;var i=t.value,r=t.modifiers,o=e.tag,s=e.attrsMap.type;if(e.component)return vo(e,i,r),!1;if("select"===o)Do(e,i,r);else if("input"===o&&"checkbox"===s)Mo(e,i,r);else if("input"===o&&"radio"===s)Po(e,i,r);else if("input"===o||"textarea"===o)Lo(e,i,r);else{if(!q.isReservedTag(o))return vo(e,i,r),!1}return!0}function Mo(e,t,n){var i=n&&n.number,r=fo(e,"value")||"null",o=fo(e,"true-value")||"true",s=fo(e,"false-value")||"false";so(e,"checked","Array.isArray("+t+")?_i("+t+","+r+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),ho(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+s+");if(Array.isArray($$a)){var $$v="+(i?"_n("+r+")":r)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+_o(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+_o(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+_o(t,"$$c")+"}",null,!0)}function Po(e,t,n){var i=n&&n.number,r=fo(e,"value")||"null";r=i?"_n("+r+")":r,so(e,"checked","_q("+t+","+r+")"),ho(e,"change",_o(t,r),null,!0)}function Do(e,t,n){var i=n&&n.number,r='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(i?"_n(val)":"val")+"})",o="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",s="var $$selectedVal = "+r+";";s=s+" "+_o(t,o),ho(e,"change",s,null,!0)}function Lo(e,t,n){var i=e.attrsMap.type,r=n||{},o=r.lazy,s=r.number,a=r.trim,l=!o&&"range"!==i,c=o?"change":"range"===i?Co:"input",u="$event.target.value";a&&(u="$event.target.value.trim()"),s&&(u="_n("+u+")");var h=_o(t,u);l&&(h="if($event.target.composing)return;"+h),so(e,"value","("+t+")"),ho(e,c,h,null,!0),(a||s)&&ho(e,"blur","$forceUpdate()")}function Oo(e){if(r(e[Co])){var t=ne?"change":"input";e[t]=[].concat(e[Co],e[t]||[]),delete e[Co]}r(e[Ao])&&(e.change=[].concat(e[Ao],e.change||[]),delete e[Ao])}function zo(e,t,n){var i=ko;return function r(){var o=t.apply(null,arguments);null!==o&&No(e,r,n,i)}}var Ro=lt&&!(se&&Number(se[1])<=53);function Fo(e,t,n,i){if(Ro){var r=Xn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=r||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}ko.addEventListener(e,t,le?{capture:n,passive:i}:n)}function No(e,t,n,i){(i||ko).removeEventListener(e,t._wrapper||t,n)}function Bo(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=e.data.on||{};ko=t.elm,Oo(n),wt(n,r,Fo,No,zo,t.context),ko=void 0}}var jo,Vo={create:Bo,update:Bo};function $o(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,o,s=t.elm,a=e.data.domProps||{},l=t.data.domProps||{};for(n in r(l.__ob__)&&(l=t.data.domProps=D({},l)),a)n in l||(s[n]="");for(n in l){if(o=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===a[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=o;var c=i(o)?"":String(o);Uo(s,c)&&(s.value=c)}else if("innerHTML"===n&&sr(s.tagName)&&i(s.innerHTML)){jo=jo||document.createElement("div"),jo.innerHTML="<svg>"+o+"</svg>";var u=jo.firstChild;while(s.firstChild)s.removeChild(s.firstChild);while(u.firstChild)s.appendChild(u.firstChild)}else if(o!==a[n])try{s[n]=o}catch(Qc){}}}}function Uo(e,t){return!e.composing&&("OPTION"===e.tagName||qo(e,t)||Go(e,t))}function qo(e,t){var n=!0;try{n=document.activeElement!==e}catch(Qc){}return n&&e.value!==t}function Go(e,t){var n=e.value,i=e._vModifiers;if(r(i)){if(i.number)return m(n)!==m(t);if(i.trim)return n.trim()!==t.trim()}return n!==t}var Ho={create:$o,update:$o},Wo=w((function(e){var t={},n=/;(?![^(]*\))/g,i=/:(.+)/;return e.split(n).forEach((function(e){if(e){var n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Zo(e){var t=Xo(e.style);return e.staticStyle?D(e.staticStyle,t):t}function Xo(e){return Array.isArray(e)?L(e):"string"===typeof e?Wo(e):e}function Yo(e,t){var n,i={};if(t){var r=e;while(r.componentInstance)r=r.componentInstance._vnode,r&&r.data&&(n=Zo(r.data))&&D(i,n)}(n=Zo(e.data))&&D(i,n);var o=e;while(o=o.parent)o.data&&(n=Zo(o.data))&&D(i,n);return i}var Qo,Ko=/^--/,Jo=/\s*!important$/,es=function(e,t,n){if(Ko.test(t))e.style.setProperty(t,n);else if(Jo.test(n))e.style.setProperty(C(t),n.replace(Jo,""),"important");else{var i=ns(t);if(Array.isArray(n))for(var r=0,o=n.length;r<o;r++)e.style[i]=n[r];else e.style[i]=n}},ts=["Webkit","Moz","ms"],ns=w((function(e){if(Qo=Qo||document.createElement("div").style,e=S(e),"filter"!==e&&e in Qo)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<ts.length;n++){var i=ts[n]+t;if(i in Qo)return i}}));function is(e,t){var n=t.data,o=e.data;if(!(i(n.staticStyle)&&i(n.style)&&i(o.staticStyle)&&i(o.style))){var s,a,l=t.elm,c=o.staticStyle,u=o.normalizedStyle||o.style||{},h=c||u,d=Xo(t.data.style)||{};t.data.normalizedStyle=r(d.__ob__)?D({},d):d;var p=Yo(t,!0);for(a in h)i(p[a])&&es(l,a,"");for(a in p)s=p[a],s!==h[a]&&es(l,a,null==s?"":s)}}var rs={create:is,update:is},os=/\s+/;function ss(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(os).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function as(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(os).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var n=" "+(e.getAttribute("class")||"")+" ",i=" "+t+" ";while(n.indexOf(i)>=0)n=n.replace(i," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function ls(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&D(t,cs(e.name||"v")),D(t,e),t}return"string"===typeof e?cs(e):void 0}}var cs=w((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),us=K&&!ie,hs="transition",ds="animation",ps="transition",fs="transitionend",ms="animation",gs="animationend";us&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ps="WebkitTransition",fs="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ms="WebkitAnimation",gs="webkitAnimationEnd"));var ys=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function vs(e){ys((function(){ys(e)}))}function _s(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),ss(e,t))}function xs(e,t){e._transitionClasses&&_(e._transitionClasses,t),as(e,t)}function bs(e,t,n){var i=Ts(e,t),r=i.type,o=i.timeout,s=i.propCount;if(!r)return n();var a=r===hs?fs:gs,l=0,c=function(){e.removeEventListener(a,u),n()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),o+1),e.addEventListener(a,u)}var ws=/\b(transform|all)(,|$)/;function Ts(e,t){var n,i=window.getComputedStyle(e),r=(i[ps+"Delay"]||"").split(", "),o=(i[ps+"Duration"]||"").split(", "),s=Ss(r,o),a=(i[ms+"Delay"]||"").split(", "),l=(i[ms+"Duration"]||"").split(", "),c=Ss(a,l),u=0,h=0;t===hs?s>0&&(n=hs,u=s,h=o.length):t===ds?c>0&&(n=ds,u=c,h=l.length):(u=Math.max(s,c),n=u>0?s>c?hs:ds:null,h=n?n===hs?o.length:l.length:0);var d=n===hs&&ws.test(i[ps+"Property"]);return{type:n,timeout:u,propCount:h,hasTransform:d}}function Ss(e,t){while(e.length<t.length)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return Es(t)+Es(e[n])})))}function Es(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function ks(e,t){var n=e.elm;r(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=ls(e.data.transition);if(!i(o)&&!r(n._enterCb)&&1===n.nodeType){var s=o.css,a=o.type,c=o.enterClass,u=o.enterToClass,h=o.enterActiveClass,d=o.appearClass,p=o.appearToClass,f=o.appearActiveClass,g=o.beforeEnter,y=o.enter,v=o.afterEnter,_=o.enterCancelled,x=o.beforeAppear,b=o.appear,w=o.afterAppear,T=o.appearCancelled,S=o.duration,E=Dn,k=Dn.$vnode;while(k&&k.parent)E=k.context,k=k.parent;var C=!E._isMounted||!e.isRootInsert;if(!C||b||""===b){var A=C&&d?d:c,I=C&&f?f:h,M=C&&p?p:u,P=C&&x||g,D=C&&"function"===typeof b?b:y,L=C&&w||v,O=C&&T||_,z=m(l(S)?S.enter:S);0;var R=!1!==s&&!ie,F=Is(D),N=n._enterCb=j((function(){R&&(xs(n,M),xs(n,I)),N.cancelled?(R&&xs(n,A),O&&O(n)):L&&L(n),n._enterCb=null}));e.data.show||Tt(e,"insert",(function(){var t=n.parentNode,i=t&&t._pending&&t._pending[e.key];i&&i.tag===e.tag&&i.elm._leaveCb&&i.elm._leaveCb(),D&&D(n,N)})),P&&P(n),R&&(_s(n,A),_s(n,I),vs((function(){xs(n,A),N.cancelled||(_s(n,M),F||(As(z)?setTimeout(N,z):bs(n,a,N)))}))),e.data.show&&(t&&t(),D&&D(n,N)),R||F||N()}}}function Cs(e,t){var n=e.elm;r(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var o=ls(e.data.transition);if(i(o)||1!==n.nodeType)return t();if(!r(n._leaveCb)){var s=o.css,a=o.type,c=o.leaveClass,u=o.leaveToClass,h=o.leaveActiveClass,d=o.beforeLeave,p=o.leave,f=o.afterLeave,g=o.leaveCancelled,y=o.delayLeave,v=o.duration,_=!1!==s&&!ie,x=Is(p),b=m(l(v)?v.leave:v);0;var w=n._leaveCb=j((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),_&&(xs(n,u),xs(n,h)),w.cancelled?(_&&xs(n,c),g&&g(n)):(t(),f&&f(n)),n._leaveCb=null}));y?y(T):T()}function T(){w.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),d&&d(n),_&&(_s(n,c),_s(n,h),vs((function(){xs(n,c),w.cancelled||(_s(n,u),x||(As(b)?setTimeout(w,b):bs(n,a,w)))}))),p&&p(n,w),_||x||w())}}function As(e){return"number"===typeof e&&!isNaN(e)}function Is(e){if(i(e))return!1;var t=e.fns;return r(t)?Is(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Ms(e,t){!0!==t.data.show&&ks(t)}var Ps=K?{create:Ms,activate:Ms,remove:function(e,t){!0!==e.data.show?Cs(e,t):t()}}:{},Ds=[Hr,eo,Vo,Ho,rs,Ps],Ls=Ds.concat($r),Os=Or({nodeOps:kr,modules:Ls});ie&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&$s(e,"input")}));var zs={inserted:function(e,t,n,i){"select"===n.tag?(i.elm&&!i.elm._vOptions?Tt(n,"postpatch",(function(){zs.componentUpdated(e,t,n)})):Rs(e,t,n.context),e._vOptions=[].map.call(e.options,Bs)):("textarea"===n.tag||dr(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",js),e.addEventListener("compositionend",Vs),e.addEventListener("change",Vs),ie&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Rs(e,t,n.context);var i=e._vOptions,r=e._vOptions=[].map.call(e.options,Bs);if(r.some((function(e,t){return!N(e,i[t])}))){var o=e.multiple?t.value.some((function(e){return Ns(e,r)})):t.value!==t.oldValue&&Ns(t.value,r);o&&$s(e,"change")}}}};function Rs(e,t,n){Fs(e,t,n),(ne||re)&&setTimeout((function(){Fs(e,t,n)}),0)}function Fs(e,t,n){var i=t.value,r=e.multiple;if(!r||Array.isArray(i)){for(var o,s,a=0,l=e.options.length;a<l;a++)if(s=e.options[a],r)o=B(i,Bs(s))>-1,s.selected!==o&&(s.selected=o);else if(N(Bs(s),i))return void(e.selectedIndex!==a&&(e.selectedIndex=a));r||(e.selectedIndex=-1)}}function Ns(e,t){return t.every((function(t){return!N(t,e)}))}function Bs(e){return"_value"in e?e._value:e.value}function js(e){e.target.composing=!0}function Vs(e){e.target.composing&&(e.target.composing=!1,$s(e.target,"input"))}function $s(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Us(e){return!e.componentInstance||e.data&&e.data.transition?e:Us(e.componentInstance._vnode)}var qs={bind:function(e,t,n){var i=t.value;n=Us(n);var r=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;i&&r?(n.data.show=!0,ks(n,(function(){e.style.display=o}))):e.style.display=i?o:"none"},update:function(e,t,n){var i=t.value,r=t.oldValue;if(!i!==!r){n=Us(n);var o=n.data&&n.data.transition;o?(n.data.show=!0,i?ks(n,(function(){e.style.display=e.__vOriginalDisplay})):Cs(n,(function(){e.style.display="none"}))):e.style.display=i?e.__vOriginalDisplay:"none"}},unbind:function(e,t,n,i,r){r||(e.style.display=e.__vOriginalDisplay)}},Gs={model:zs,show:qs},Hs={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 Ws(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ws(En(t.children)):e}function Zs(e){var t={},n=e.$options;for(var i in n.propsData)t[i]=e[i];var r=n._parentListeners;for(var o in r)t[S(o)]=r[o];return t}function Xs(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function Ys(e){while(e=e.parent)if(e.data.transition)return!0}function Qs(e,t){return t.key===e.key&&t.tag===e.tag}var Ks=function(e){return e.tag||Sn(e)},Js=function(e){return"show"===e.name},ea={name:"transition",props:Hs,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(Ks),n.length)){0;var i=this.mode;0;var r=n[0];if(Ys(this.$vnode))return r;var o=Ws(r);if(!o)return r;if(this._leaving)return Xs(e,r);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=Zs(this),c=this._vnode,u=Ws(c);if(o.data.directives&&o.data.directives.some(Js)&&(o.data.show=!0),u&&u.data&&!Qs(o,u)&&!Sn(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var h=u.data.transition=D({},l);if("out-in"===i)return this._leaving=!0,Tt(h,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Xs(e,r);if("in-out"===i){if(Sn(o))return c;var d,p=function(){d()};Tt(l,"afterEnter",p),Tt(l,"enterCancelled",p),Tt(h,"delayLeave",(function(e){d=e}))}}return r}}},ta=D({tag:String,moveClass:String},Hs);delete ta.mode;var na={props:ta,beforeMount:function(){var e=this,t=this._update;this._update=function(n,i){var r=Ln(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,r(),t.call(e,n,i)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],s=Zs(this),a=0;a<r.length;a++){var l=r[a];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))o.push(l),n[l.key]=l,(l.data||(l.data={})).transition=s;else;}if(i){for(var c=[],u=[],h=0;h<i.length;h++){var d=i[h];d.data.transition=s,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?c.push(d):u.push(d)}this.kept=e(t,null,c),this.removed=u}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(ia),e.forEach(ra),e.forEach(oa),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,i=n.style;_s(n,t),i.transform=i.WebkitTransform=i.transitionDuration="",n.addEventListener(fs,n._moveCb=function e(i){i&&i.target!==n||i&&!/transform$/.test(i.propertyName)||(n.removeEventListener(fs,e),n._moveCb=null,xs(n,t))})}})))},methods:{hasMove:function(e,t){if(!us)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){as(n,e)})),ss(n,t),n.style.display="none",this.$el.appendChild(n);var i=Ts(n);return this.$el.removeChild(n),this._hasMove=i.hasTransform}}};function ia(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ra(e){e.data.newPos=e.elm.getBoundingClientRect()}function oa(e){var t=e.data.pos,n=e.data.newPos,i=t.left-n.left,r=t.top-n.top;if(i||r){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+i+"px,"+r+"px)",o.transitionDuration="0s"}}var sa={Transition:ea,TransitionGroup:na};Ei.config.mustUseProp=$i,Ei.config.isReservedTag=lr,Ei.config.isReservedAttr=ji,Ei.config.getTagNamespace=cr,Ei.config.isUnknownElement=hr,D(Ei.options.directives,Gs),D(Ei.options.components,sa),Ei.prototype.__patch__=K?Os:O,Ei.prototype.$mount=function(e,t){return e=e&&K?pr(e):void 0,Rn(this,e,t)},K&&setTimeout((function(){q.devtools&&he&&he.emit("init",Ei)}),0);var aa=/\{\{((?:.|\r?\n)+?)\}\}/g,la=/[-.*+?^${}()|[\]\/\\]/g,ca=w((function(e){var t=e[0].replace(la,"\\$&"),n=e[1].replace(la,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));function ua(e,t){var n=t?ca(t):aa;if(n.test(e)){var i,r,o,s=[],a=[],l=n.lastIndex=0;while(i=n.exec(e)){r=i.index,r>l&&(a.push(o=e.slice(l,r)),s.push(JSON.stringify(o)));var c=no(i[1].trim());s.push("_s("+c+")"),a.push({"@binding":c}),l=r+i[0].length}return l<e.length&&(a.push(o=e.slice(l)),s.push(JSON.stringify(o))),{expression:s.join("+"),tokens:a}}}function ha(e,t){t.warn;var n=mo(e,"class");n&&(e.staticClass=JSON.stringify(n));var i=fo(e,"class",!1);i&&(e.classBinding=i)}function da(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}var pa={staticKeys:["staticClass"],transformNode:ha,genData:da};function fa(e,t){t.warn;var n=mo(e,"style");n&&(e.staticStyle=JSON.stringify(Wo(n)));var i=fo(e,"style",!1);i&&(e.styleBinding=i)}function ma(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}var ga,ya={staticKeys:["staticStyle"],transformNode:fa,genData:ma},va={decode:function(e){return ga=ga||document.createElement("div"),ga.innerHTML=e,ga.textContent}},_a=g("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),xa=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ba=g("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"),wa=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ta=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Sa="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+G.source+"]*",Ea="((?:"+Sa+"\\:)?"+Sa+")",ka=new RegExp("^<"+Ea),Ca=/^\s*(\/?)>/,Aa=new RegExp("^<\\/"+Ea+"[^>]*>"),Ia=/^<!DOCTYPE [^>]+>/i,Ma=/^<!\--/,Pa=/^<!\[/,Da=g("script,style,textarea",!0),La={},Oa={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},za=/&(?:lt|gt|quot|amp|#39);/g,Ra=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Fa=g("pre,textarea",!0),Na=function(e,t){return e&&Fa(e)&&"\n"===t[0]};function Ba(e,t){var n=t?Ra:za;return e.replace(n,(function(e){return Oa[e]}))}function ja(e,t){var n,i,r=[],o=t.expectHTML,s=t.isUnaryTag||z,a=t.canBeLeftOpenTag||z,l=0;while(e){if(n=e,i&&Da(i)){var c=0,u=i.toLowerCase(),h=La[u]||(La[u]=new RegExp("([\\s\\S]*?)(</"+u+"[^>]*>)","i")),d=e.replace(h,(function(e,n,i){return c=i.length,Da(u)||"noscript"===u||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Na(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-d.length,e=d,k(u,l-c,l)}else{var p=e.indexOf("<");if(0===p){if(Ma.test(e)){var f=e.indexOf("--\x3e");if(f>=0){t.shouldKeepComment&&t.comment(e.substring(4,f),l,l+f+3),T(f+3);continue}}if(Pa.test(e)){var m=e.indexOf("]>");if(m>=0){T(m+2);continue}}var g=e.match(Ia);if(g){T(g[0].length);continue}var y=e.match(Aa);if(y){var v=l;T(y[0].length),k(y[1],v,l);continue}var _=S();if(_){E(_),Na(_.tagName,e)&&T(1);continue}}var x=void 0,b=void 0,w=void 0;if(p>=0){b=e.slice(p);while(!Aa.test(b)&&!ka.test(b)&&!Ma.test(b)&&!Pa.test(b)){if(w=b.indexOf("<",1),w<0)break;p+=w,b=e.slice(p)}x=e.substring(0,p)}p<0&&(x=e),x&&T(x.length),t.chars&&x&&t.chars(x,l-x.length,l)}if(e===n){t.chars&&t.chars(e);break}}function T(t){l+=t,e=e.substring(t)}function S(){var t=e.match(ka);if(t){var n,i,r={tagName:t[1],attrs:[],start:l};T(t[0].length);while(!(n=e.match(Ca))&&(i=e.match(Ta)||e.match(wa)))i.start=l,T(i[0].length),i.end=l,r.attrs.push(i);if(n)return r.unarySlash=n[1],T(n[0].length),r.end=l,r}}function E(e){var n=e.tagName,l=e.unarySlash;o&&("p"===i&&ba(n)&&k(i),a(n)&&i===n&&k(n));for(var c=s(n)||!!l,u=e.attrs.length,h=new Array(u),d=0;d<u;d++){var p=e.attrs[d],f=p[3]||p[4]||p[5]||"",m="a"===n&&"href"===p[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;h[d]={name:p[1],value:Ba(f,m)}}c||(r.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:h,start:e.start,end:e.end}),i=n),t.start&&t.start(n,h,c,e.start,e.end)}function k(e,n,o){var s,a;if(null==n&&(n=l),null==o&&(o=l),e){for(a=e.toLowerCase(),s=r.length-1;s>=0;s--)if(r[s].lowerCasedTag===a)break}else s=0;if(s>=0){for(var c=r.length-1;c>=s;c--)t.end&&t.end(r[c].tag,n,o);r.length=s,i=s&&r[s-1].tag}else"br"===a?t.start&&t.start(e,[],!0,n,o):"p"===a&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}k()}var Va,$a,Ua,qa,Ga,Ha,Wa,Za,Xa=/^@|^v-on:/,Ya=/^v-|^@|^:|^#/,Qa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ka=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ja=/^\(|\)$/g,el=/^\[.*\]$/,tl=/:(.*)$/,nl=/^:|^\.|^v-bind:/,il=/\.[^.\]]+(?=[^\]]*$)/g,rl=/^v-slot(:|$)|^#/,ol=/[\r\n]/,sl=/\s+/g,al=w(va.decode),ll="_empty_";function cl(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Ml(t),rawAttrsMap:{},parent:n,children:[]}}function ul(e,t){Va=t.warn||ro,Ha=t.isPreTag||z,Wa=t.mustUseProp||z,Za=t.getTagNamespace||z;var n=t.isReservedTag||z;(function(e){return!!e.component||!n(e.tag)}),Ua=oo(t.modules,"transformNode"),qa=oo(t.modules,"preTransformNode"),Ga=oo(t.modules,"postTransformNode"),$a=t.delimiters;var i,r,o=[],s=!1!==t.preserveWhitespace,a=t.whitespace,l=!1,c=!1;function u(e){if(h(e),l||e.processed||(e=pl(e,t)),o.length||e===i||i.if&&(e.elseif||e.else)&&bl(i,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)_l(e,r);else{if(e.slotScope){var n=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[n]=e}r.children.push(e),e.parent=r}e.children=e.children.filter((function(e){return!e.slotScope})),h(e),e.pre&&(l=!1),Ha(e.tag)&&(c=!1);for(var s=0;s<Ga.length;s++)Ga[s](e,t)}function h(e){var t;if(!c)while((t=e.children[e.children.length-1])&&3===t.type&&" "===t.text)e.children.pop()}return ja(e,{warn:Va,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,s,a,h){var d=r&&r.ns||Za(e);ne&&"svg"===d&&(n=zl(n));var p=cl(e,n,r);d&&(p.ns=d),Dl(p)&&!ue()&&(p.forbidden=!0);for(var f=0;f<qa.length;f++)p=qa[f](p,t)||p;l||(hl(p),p.pre&&(l=!0)),Ha(p.tag)&&(c=!0),l?dl(p):p.processed||(gl(p),vl(p),wl(p)),i||(i=p),s?u(p):(r=p,o.push(p))},end:function(e,t,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],u(i)},chars:function(e,t,n){if(r&&(!ne||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,o,u=r.children;if(e=c||e.trim()?Pl(r)?e:al(e):u.length?a?"condense"===a&&ol.test(e)?"":" ":s?" ":"":"",e)c||"condense"!==a||(e=e.replace(sl," ")),!l&&" "!==e&&(i=ua(e,$a))?o={type:2,expression:i.expression,tokens:i.tokens,text:e}:" "===e&&u.length&&" "===u[u.length-1].text||(o={type:3,text:e}),o&&u.push(o)}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};0,r.children.push(i)}}}),i}function hl(e){null!=mo(e,"v-pre")&&(e.pre=!0)}function dl(e){var t=e.attrsList,n=t.length;if(n)for(var i=e.attrs=new Array(n),r=0;r<n;r++)i[r]={name:t[r].name,value:JSON.stringify(t[r].value)},null!=t[r].start&&(i[r].start=t[r].start,i[r].end=t[r].end);else e.pre||(e.plain=!0)}function pl(e,t){fl(e),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,ml(e),Tl(e),El(e),kl(e);for(var n=0;n<Ua.length;n++)e=Ua[n](e,t)||e;return Cl(e),e}function fl(e){var t=fo(e,"key");t&&(e.key=t)}function ml(e){var t=fo(e,"ref");t&&(e.ref=t,e.refInFor=Al(e))}function gl(e){var t;if(t=mo(e,"v-for")){var n=yl(t);n&&D(e,n)}}function yl(e){var t=e.match(Qa);if(t){var n={};n.for=t[2].trim();var i=t[1].trim().replace(Ja,""),r=i.match(Ka);return r?(n.alias=i.replace(Ka,"").trim(),n.iterator1=r[1].trim(),r[2]&&(n.iterator2=r[2].trim())):n.alias=i,n}}function vl(e){var t=mo(e,"v-if");if(t)e.if=t,bl(e,{exp:t,block:e});else{null!=mo(e,"v-else")&&(e.else=!0);var n=mo(e,"v-else-if");n&&(e.elseif=n)}}function _l(e,t){var n=xl(t.children);n&&n.if&&bl(n,{exp:e.elseif,block:e})}function xl(e){var t=e.length;while(t--){if(1===e[t].type)return e[t];e.pop()}}function bl(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function wl(e){var t=mo(e,"v-once");null!=t&&(e.once=!0)}function Tl(e){var t;"template"===e.tag?(t=mo(e,"scope"),e.slotScope=t||mo(e,"slot-scope")):(t=mo(e,"slot-scope"))&&(e.slotScope=t);var n=fo(e,"slot");if(n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||ao(e,"slot",n,po(e,"slot"))),"template"===e.tag){var i=go(e,rl);if(i){0;var r=Sl(i),o=r.name,s=r.dynamic;e.slotTarget=o,e.slotTargetDynamic=s,e.slotScope=i.value||ll}}else{var a=go(e,rl);if(a){0;var l=e.scopedSlots||(e.scopedSlots={}),c=Sl(a),u=c.name,h=c.dynamic,d=l[u]=cl("template",[],e);d.slotTarget=u,d.slotTargetDynamic=h,d.children=e.children.filter((function(e){if(!e.slotScope)return e.parent=d,!0})),d.slotScope=a.value||ll,e.children=[],e.plain=!1}}}function Sl(e){var t=e.name.replace(rl,"");return t||"#"!==e.name[0]&&(t="default"),el.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function El(e){"slot"===e.tag&&(e.slotName=fo(e,"name"))}function kl(e){var t;(t=fo(e,"is"))&&(e.component=t),null!=mo(e,"inline-template")&&(e.inlineTemplate=!0)}function Cl(e){var t,n,i,r,o,s,a,l,c=e.attrsList;for(t=0,n=c.length;t<n;t++){if(i=r=c[t].name,o=c[t].value,Ya.test(i))if(e.hasBindings=!0,s=Il(i.replace(Ya,"")),s&&(i=i.replace(il,"")),nl.test(i))i=i.replace(nl,""),o=no(o),l=el.test(i),l&&(i=i.slice(1,-1)),s&&(s.prop&&!l&&(i=S(i),"innerHtml"===i&&(i="innerHTML")),s.camel&&!l&&(i=S(i)),s.sync&&(a=_o(o,"$event"),l?ho(e,'"update:"+('+i+")",a,null,!1,Va,c[t],!0):(ho(e,"update:"+S(i),a,null,!1,Va,c[t]),C(i)!==S(i)&&ho(e,"update:"+C(i),a,null,!1,Va,c[t])))),s&&s.prop||!e.component&&Wa(e.tag,e.attrsMap.type,i)?so(e,i,o,c[t],l):ao(e,i,o,c[t],l);else if(Xa.test(i))i=i.replace(Xa,""),l=el.test(i),l&&(i=i.slice(1,-1)),ho(e,i,o,s,!1,Va,c[t],l);else{i=i.replace(Ya,"");var u=i.match(tl),h=u&&u[1];l=!1,h&&(i=i.slice(0,-(h.length+1)),el.test(h)&&(h=h.slice(1,-1),l=!0)),co(e,i,r,o,h,l,s,c[t])}else ao(e,i,JSON.stringify(o),c[t]),!e.component&&"muted"===i&&Wa(e.tag,e.attrsMap.type,i)&&so(e,i,"true",c[t])}}function Al(e){var t=e;while(t){if(void 0!==t.for)return!0;t=t.parent}return!1}function Il(e){var t=e.match(il);if(t){var n={};return t.forEach((function(e){n[e.slice(1)]=!0})),n}}function Ml(e){for(var t={},n=0,i=e.length;n<i;n++)t[e[n].name]=e[n].value;return t}function Pl(e){return"script"===e.tag||"style"===e.tag}function Dl(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}var Ll=/^xmlns:NS\d+/,Ol=/^NS\d+:/;function zl(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];Ll.test(i.name)||(i.name=i.name.replace(Ol,""),t.push(i))}return t}function Rl(e,t){if("input"===e.tag){var n,i=e.attrsMap;if(!i["v-model"])return;if((i[":type"]||i["v-bind:type"])&&(n=fo(e,"type")),i.type||n||!i["v-bind"]||(n="("+i["v-bind"]+").type"),n){var r=mo(e,"v-if",!0),o=r?"&&("+r+")":"",s=null!=mo(e,"v-else",!0),a=mo(e,"v-else-if",!0),l=Fl(e);gl(l),lo(l,"type","checkbox"),pl(l,t),l.processed=!0,l.if="("+n+")==='checkbox'"+o,bl(l,{exp:l.if,block:l});var c=Fl(e);mo(c,"v-for",!0),lo(c,"type","radio"),pl(c,t),bl(l,{exp:"("+n+")==='radio'"+o,block:c});var u=Fl(e);return mo(u,"v-for",!0),lo(u,":type",n),pl(u,t),bl(l,{exp:r,block:u}),s?l.else=!0:a&&(l.elseif=a),l}}}function Fl(e){return cl(e.tag,e.attrsList.slice(),e.parent)}var Nl={preTransformNode:Rl},Bl=[pa,ya,Nl];function jl(e,t){t.value&&so(e,"textContent","_s("+t.value+")",t)}function Vl(e,t){t.value&&so(e,"innerHTML","_s("+t.value+")",t)}var $l,Ul,ql={model:Io,text:jl,html:Vl},Gl={expectHTML:!0,modules:Bl,directives:ql,isPreTag:ar,isUnaryTag:_a,mustUseProp:$i,canBeLeftOpenTag:xa,isReservedTag:lr,getTagNamespace:cr,staticKeys:F(Bl)},Hl=w(Zl);function Wl(e,t){e&&($l=Hl(t.staticKeys||""),Ul=t.isReservedTag||z,Xl(e),Yl(e,!1))}function Zl(e){return g("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}function Xl(e){if(e.static=Ql(e),1===e.type){if(!Ul(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var i=e.children[t];Xl(i),i.static||(e.static=!1)}if(e.ifConditions)for(var r=1,o=e.ifConditions.length;r<o;r++){var s=e.ifConditions[r].block;Xl(s),s.static||(e.static=!1)}}}function Yl(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,i=e.children.length;n<i;n++)Yl(e.children[n],t||!!e.for);if(e.ifConditions)for(var r=1,o=e.ifConditions.length;r<o;r++)Yl(e.ifConditions[r].block,t)}}function Ql(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||y(e.tag)||!Ul(e.tag)||Kl(e)||!Object.keys(e).every($l))))}function Kl(e){while(e.parent){if(e=e.parent,"template"!==e.tag)return!1;if(e.for)return!0}return!1}var Jl=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,ec=/\([^)]*?\);*$/,tc=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,nc={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ic={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"]},rc=function(e){return"if("+e+")return null;"},oc={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:rc("$event.target !== $event.currentTarget"),ctrl:rc("!$event.ctrlKey"),shift:rc("!$event.shiftKey"),alt:rc("!$event.altKey"),meta:rc("!$event.metaKey"),left:rc("'button' in $event && $event.button !== 0"),middle:rc("'button' in $event && $event.button !== 1"),right:rc("'button' in $event && $event.button !== 2")};function sc(e,t){var n=t?"nativeOn:":"on:",i="",r="";for(var o in e){var s=ac(e[o]);e[o]&&e[o].dynamic?r+=o+","+s+",":i+='"'+o+'":'+s+","}return i="{"+i.slice(0,-1)+"}",r?n+"_d("+i+",["+r.slice(0,-1)+"])":n+i}function ac(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return ac(e)})).join(",")+"]";var t=tc.test(e.value),n=Jl.test(e.value),i=tc.test(e.value.replace(ec,""));if(e.modifiers){var r="",o="",s=[];for(var a in e.modifiers)if(oc[a])o+=oc[a],nc[a]&&s.push(a);else if("exact"===a){var l=e.modifiers;o+=rc(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else s.push(a);s.length&&(r+=lc(s)),o&&(r+=o);var c=t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":i?"return "+e.value:e.value;return"function($event){"+r+c+"}"}return t||n?e.value:"function($event){"+(i?"return "+e.value:e.value)+"}"}function lc(e){return"if(!$event.type.indexOf('key')&&"+e.map(cc).join("&&")+")return null;"}function cc(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=nc[e],i=ic[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(i)+")"}function uc(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}}function hc(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}}var dc={on:uc,bind:hc,cloak:O},pc=function(e){this.options=e,this.warn=e.warn||ro,this.transforms=oo(e.modules,"transformCode"),this.dataGenFns=oo(e.modules,"genData"),this.directives=D(D({},dc),e.directives);var t=e.isReservedTag||z;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function fc(e,t){var n=new pc(t),i=e?mc(e,n):'_c("div")';return{render:"with(this){return "+i+"}",staticRenderFns:n.staticRenderFns}}function mc(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return gc(e,t);if(e.once&&!e.onceProcessed)return yc(e,t);if(e.for&&!e.forProcessed)return xc(e,t);if(e.if&&!e.ifProcessed)return vc(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return Oc(e,t);var n;if(e.component)n=zc(e.component,e,t);else{var i;(!e.plain||e.pre&&t.maybeComponent(e))&&(i=bc(e,t));var r=e.inlineTemplate?null:Ac(e,t,!0);n="_c('"+e.tag+"'"+(i?","+i:"")+(r?","+r:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return Ac(e,t)||"void 0"}function gc(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+mc(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function yc(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return vc(e,t);if(e.staticInFor){var n="",i=e.parent;while(i){if(i.for){n=i.key;break}i=i.parent}return n?"_o("+mc(e,t)+","+t.onceId+++","+n+")":mc(e,t)}return gc(e,t)}function vc(e,t,n,i){return e.ifProcessed=!0,_c(e.ifConditions.slice(),t,n,i)}function _c(e,t,n,i){if(!e.length)return i||"_e()";var r=e.shift();return r.exp?"("+r.exp+")?"+o(r.block)+":"+_c(e,t,n,i):""+o(r.block);function o(e){return n?n(e,t):e.once?yc(e,t):mc(e,t)}}function xc(e,t,n,i){var r=e.for,o=e.alias,s=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(i||"_l")+"(("+r+"),function("+o+s+a+"){return "+(n||mc)(e,t)+"})"}function bc(e,t){var n="{",i=wc(e,t);i&&(n+=i+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var r=0;r<t.dataGenFns.length;r++)n+=t.dataGenFns[r](e);if(e.attrs&&(n+="attrs:"+Rc(e.attrs)+","),e.props&&(n+="domProps:"+Rc(e.props)+","),e.events&&(n+=sc(e.events,!1)+","),e.nativeEvents&&(n+=sc(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=Sc(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=Tc(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Rc(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function wc(e,t){var n=e.directives;if(n){var i,r,o,s,a="directives:[",l=!1;for(i=0,r=n.length;i<r;i++){o=n[i],s=!0;var c=t.directives[o.name];c&&(s=!!c(e,o,t.warn)),s&&(l=!0,a+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return l?a.slice(0,-1)+"]":void 0}}function Tc(e,t){var n=e.children[0];if(n&&1===n.type){var i=fc(n,t.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}function Sc(e,t,n){var i=e.for||Object.keys(t).some((function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||kc(n)})),r=!!e.if;if(!i){var o=e.parent;while(o){if(o.slotScope&&o.slotScope!==ll||o.for){i=!0;break}o.if&&(r=!0),o=o.parent}}var s=Object.keys(t).map((function(e){return Cc(t[e],n)})).join(",");return"scopedSlots:_u(["+s+"]"+(i?",null,true":"")+(!i&&r?",null,false,"+Ec(s):"")+")"}function Ec(e){var t=5381,n=e.length;while(n)t=33*t^e.charCodeAt(--n);return t>>>0}function kc(e){return 1===e.type&&("slot"===e.tag||e.children.some(kc))}function Cc(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return vc(e,t,Cc,"null");if(e.for&&!e.forProcessed)return xc(e,t,Cc);var i=e.slotScope===ll?"":String(e.slotScope),r="function("+i+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(Ac(e,t)||"undefined")+":undefined":Ac(e,t)||"undefined":mc(e,t))+"}",o=i?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+r+o+"}"}function Ac(e,t,n,i,r){var o=e.children;if(o.length){var s=o[0];if(1===o.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=n?t.maybeComponent(s)?",1":",0":"";return""+(i||mc)(s,t)+a}var l=n?Ic(o,t.maybeComponent):0,c=r||Pc;return"["+o.map((function(e){return c(e,t)})).join(",")+"]"+(l?","+l:"")}}function Ic(e,t){for(var n=0,i=0;i<e.length;i++){var r=e[i];if(1===r.type){if(Mc(r)||r.ifConditions&&r.ifConditions.some((function(e){return Mc(e.block)}))){n=2;break}(t(r)||r.ifConditions&&r.ifConditions.some((function(e){return t(e.block)})))&&(n=1)}}return n}function Mc(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function Pc(e,t){return 1===e.type?mc(e,t):3===e.type&&e.isComment?Lc(e):Dc(e)}function Dc(e){return"_v("+(2===e.type?e.expression:Fc(JSON.stringify(e.text)))+")"}function Lc(e){return"_e("+JSON.stringify(e.text)+")"}function Oc(e,t){var n=e.slotName||'"default"',i=Ac(e,t),r="_t("+n+(i?","+i:""),o=e.attrs||e.dynamicAttrs?Rc((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:S(e.name),value:e.value,dynamic:e.dynamic}}))):null,s=e.attrsMap["v-bind"];return!o&&!s||i||(r+=",null"),o&&(r+=","+o),s&&(r+=(o?"":",null")+","+s),r+")"}function zc(e,t,n){var i=t.inlineTemplate?null:Ac(t,n,!0);return"_c("+e+","+bc(t,n)+(i?","+i:"")+")"}function Rc(e){for(var t="",n="",i=0;i<e.length;i++){var r=e[i],o=Fc(r.value);r.dynamic?n+=r.name+","+o+",":t+='"'+r.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function Fc(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function Nc(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),O}}function Bc(e){var t=Object.create(null);return function(n,i,r){i=D({},i);i.warn;delete i.warn;var o=i.delimiters?String(i.delimiters)+n:n;if(t[o])return t[o];var s=e(n,i);var a={},l=[];return a.render=Nc(s.render,l),a.staticRenderFns=s.staticRenderFns.map((function(e){return Nc(e,l)})),t[o]=a}}function jc(e){return function(t){function n(n,i){var r=Object.create(t),o=[],s=[],a=function(e,t,n){(n?s:o).push(e)};if(i)for(var l in i.modules&&(r.modules=(t.modules||[]).concat(i.modules)),i.directives&&(r.directives=D(Object.create(t.directives||null),i.directives)),i)"modules"!==l&&"directives"!==l&&(r[l]=i[l]);r.warn=a;var c=e(n.trim(),r);return c.errors=o,c.tips=s,c}return{compile:n,compileToFunctions:Bc(n)}}}var Vc,$c=jc((function(e,t){var n=ul(e.trim(),t);!1!==t.optimize&&Wl(n,t);var i=fc(n,t);return{ast:n,render:i.render,staticRenderFns:i.staticRenderFns}})),Uc=$c(Gl),qc=(Uc.compile,Uc.compileToFunctions);function Gc(e){return Vc=Vc||document.createElement("div"),Vc.innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',Vc.innerHTML.indexOf("&#10;")>0}var Hc=!!K&&Gc(!1),Wc=!!K&&Gc(!0),Zc=w((function(e){var t=pr(e);return t&&t.innerHTML})),Xc=Ei.prototype.$mount;function Yc(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}Ei.prototype.$mount=function(e,t){if(e=e&&pr(e),e===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var i=n.template;if(i)if("string"===typeof i)"#"===i.charAt(0)&&(i=Zc(i));else{if(!i.nodeType)return this;i=i.innerHTML}else e&&(i=Yc(e));if(i){0;var r=qc(i,{outputSourceRange:!1,shouldDecodeNewlines:Hc,shouldDecodeNewlinesForHref:Wc,delimiters:n.delimiters,comments:n.comments},this),o=r.render,s=r.staticRenderFns;n.render=o,n.staticRenderFns=s}}return Xc.call(this,e,t)},Ei.compile=qc,t["a"]=Ei}).call(this,n("c8ba"))},a159:function(e,t,n){var i=n("e4ae"),r=n("7e90"),o=n("1691"),s=n("5559")("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n("1ec9")("iframe"),i=o.length,r="<",s=">";t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+s+"document.F=Object"+r+"/script"+s),e.close(),c=e.F;while(i--)delete c[l][o[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=i(e),n=new a,a[l]=null,n[s]=e):n=c(),void 0===t?n:r(n,t)}},a22a:function(e,t,n){var i=n("d864"),r=n("b0dc"),o=n("3702"),s=n("e4ae"),a=n("b447"),l=n("7cd6"),c={},u={};t=e.exports=function(e,t,n,h,d){var p,f,m,g,y=d?function(){return e}:l(e),v=i(n,h,t?2:1),_=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=a(e.length);p>_;_++)if(g=t?v(s(f=e[_])[0],f[1]):v(e[_]),g===c||g===u)return g}else for(m=y.call(e);!(f=m.next()).done;)if(g=r(m,v,f.value,t),g===c||g===u)return g};t.BREAK=c,t.RETURN=u},a25f:function(e,t,n){var i=n("7726"),r=i.navigator;e.exports=r&&r.userAgent||""},a481:function(e,t,n){"use strict";var i=n("cb7c"),r=n("4bf8"),o=n("9def"),s=n("4588"),a=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,h=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};n("214f")("replace",2,(function(e,t,n,m){return[function(i,r){var o=e(this),s=void 0==i?void 0:i[t];return void 0!==s?s.call(i,o,r):n.call(String(o),i,r)},function(e,t){var r=m(n,e,this,t);if(r.done)return r.value;var h=i(e),d=String(this),p="function"===typeof t;p||(t=String(t));var y=h.global;if(y){var v=h.unicode;h.lastIndex=0}var _=[];while(1){var x=l(h,d);if(null===x)break;if(_.push(x),!y)break;var b=String(x[0]);""===b&&(h.lastIndex=a(d,o(h.lastIndex),v))}for(var w="",T=0,S=0;S<_.length;S++){x=_[S];for(var E=String(x[0]),k=c(u(s(x.index),d.length),0),C=[],A=1;A<x.length;A++)C.push(f(x[A]));var I=x.groups;if(p){var M=[E].concat(C,k,d);void 0!==I&&M.push(I);var P=String(t.apply(void 0,M))}else P=g(E,d,k,C,I,t);k>=T&&(w+=d.slice(T,k)+P,T=k+E.length)}return w+d.slice(T)}];function g(e,t,i,o,s,a){var l=i+e.length,c=o.length,u=p;return void 0!==s&&(s=r(s),u=d),n.call(a,u,(function(n,r){var a;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(l);case"<":a=s[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>c){var d=h(u/10);return 0===d?n:d<=c?void 0===o[d-1]?r.charAt(1):o[d-1]+r.charAt(1):n}a=o[u-1]}return void 0===a?"":a}))}}))},a5b8:function(e,t,n){"use strict";var i=n("d8e8");function r(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new r(e)}},a745:function(e,t,n){e.exports=n("f410")},aa77:function(e,t,n){var i=n("5ca1"),r=n("be13"),o=n("79e5"),s=n("fdef"),a="["+s+"]",l="​",c=RegExp("^"+a+a+"*"),u=RegExp(a+a+"*$"),h=function(e,t,n){var r={},a=o((function(){return!!s[e]()||l[e]()!=l})),c=r[e]=a?t(d):s[e];n&&(r[n]=c),i(i.P+i.F*a,"String",r)},d=h.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=h},aae3:function(e,t,n){var i=n("d3f4"),r=n("2d95"),o=n("2b4c")("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==r(e))}},aba2:function(e,t,n){var i=n("e53d"),r=n("4178").set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n("6b4c")(s);e.exports=function(){var e,t,n,c=function(){var i,r;l&&(i=s.domain)&&i.exit();while(e){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var r={fn:i,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},ac4d:function(e,t,n){n("3a72")("asyncIterator")},ac6a:function(e,t,n){for(var i=n("cadf"),r=n("0d58"),o=n("2aba"),s=n("7726"),a=n("32e9"),l=n("84f2"),c=n("2b4c"),u=c("iterator"),h=c("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=r(p),m=0;m<f.length;m++){var g,y=f[m],v=p[y],_=s[y],x=_&&_.prototype;if(x&&(x[u]||a(x,u,d),x[h]||a(x,h,y),l[y]=d,v))for(g in i)x[g]||o(x,g,i[g],!0)}},ac6d:function(e,t,n){},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},b0b4:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("85f2"),r=n.n(i);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r()(e,i.key,i)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}},b0c5:function(e,t,n){"use strict";var i=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},b0dc:function(e,t,n){var i=n("e4ae");e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(s){var o=e["return"];throw void 0!==o&&i(o.call(e)),s}}},b39a:function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},b447:function(e,t,n){var i=n("3a38"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},b50d:function(e,t,n){"use strict";var i=n("c532"),r=n("467f"),o=n("7aac"),s=n("30b5"),a=n("83b9"),l=n("c345"),c=n("3934"),u=n("2d83");e.exports=function(e){return new Promise((function(t,n){var h=e.data,d=e.headers;i.isFormData(h)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(f+":"+m)}var g=a(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,o=e.responseType&&"text"!==e.responseType?p.response:p.responseText,s={data:o,status:p.status,statusText:p.statusText,headers:i,config:e,request:p};r(t,n,s),p=null}},p.onabort=function(){p&&(n(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,"ECONNABORTED",p)),p=null},i.isStandardBrowserEnv()){var y=(e.withCredentials||c(g))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&i.forEach(d,(function(e,t){"undefined"===typeof h&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(v){if("json"!==e.responseType)throw v}"function"===typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),h||(h=null),p.send(h)}))}},b8e3:function(e,t){e.exports=!0},ba92:function(e,t,n){"use strict";var i=n("4bf8"),r=n("77f1"),o=n("9def");e.exports=[].copyWithin||function(e,t){var n=i(this),s=o(n.length),a=r(e,s),l=r(t,s),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?s:r(c,s))-l,s-a),h=1;l<a&&a<l+u&&(h=-1,l+=u-1,a+=u-1);while(u-- >0)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},bc13:function(e,t,n){var i=n("e53d"),r=i.navigator;e.exports=r&&r.userAgent||""},bc3a:function(e,t,n){e.exports=n("cee4")},bcaa:function(e,t,n){var i=n("cb7c"),r=n("d3f4"),o=n("a5b8");e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=o.f(e),s=n.resolve;return s(t),n.promise}},bd7e:function(e,t,n){var i,r;
/*!
 * imagesLoaded v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */(function(o,s){"use strict";i=[n("0949")],r=function(e){return s(o,e)}.apply(t,i),void 0===r||(e.exports=r)})("undefined"!==typeof window?window:this,(function(e,t){"use strict";var n=e.jQuery,i=e.console;function r(e,t){for(var n in t)e[n]=t[n];return e}var o=Array.prototype.slice;function s(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?o.call(e):[e]}function a(e,t,o){if(!(this instanceof a))return new a(e,t,o);var l=e;"string"==typeof e&&(l=document.querySelectorAll(e)),l?(this.elements=s(l),this.options=r({},this.options),"function"==typeof t?o=t:r(this.options,t),o&&this.on("always",o),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))):i.error("Bad element for imagesLoaded "+(l||e))}a.prototype=Object.create(t.prototype),a.prototype.options={},a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},a.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&l[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var o=e.querySelectorAll(this.options.background);for(i=0;i<o.length;i++){var s=o[i];this.addElementBackgroundImages(s)}}}};var l={1:!0,9:!0,11:!0};function c(e){this.img=e}function u(e,t){this.url=e,this.element=t,this.img=new Image}return a.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t){var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(t.backgroundImage);while(null!==i){var r=i&&i[2];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}}},a.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},a.prototype.addBackground=function(e,t){var n=new u(e,t);this.images.push(n)},a.prototype.check=function(){var e=this;function t(t,n,i){setTimeout((function(){e.progress(t,n,i)}))}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach((function(e){e.once("progress",t),e.check()})):this.complete()},a.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+n,e,t)},a.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},c.prototype=Object.create(t.prototype),c.prototype.check=function(){var e=this.getIsImageComplete();e?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},c.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},c.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},c.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},u.prototype=Object.create(c.prototype),u.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},u.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},u.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},a.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(n=t,n.fn.imagesLoaded=function(e,t){var i=new a(this,e,t);return i.jqDeferred.promise(n(this))})},a.makeJQueryPlugin(),a}))},bd86:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("85f2"),r=n.n(i);function o(e,t,n){return t in e?r()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},bf0b:function(e,t,n){var i=n("355d"),r=n("aebd"),o=n("36c3"),s=n("1bc3"),a=n("07e3"),l=n("794b"),c=Object.getOwnPropertyDescriptor;t.f=n("8e60")?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(n){}if(a(e,t))return r(!i.f.call(e,t),e[t])}},c207:function(e,t){},c26b:function(e,t,n){"use strict";var i=n("86cc").f,r=n("2aeb"),o=n("dcbc"),s=n("9b43"),a=n("f605"),l=n("4a59"),c=n("01f9"),u=n("d53b"),h=n("7a56"),d=n("9e1e"),p=n("67ab").fastKey,f=n("b39a"),m=d?"_s":"size",g=function(e,t){var n,i=p(t);if("F"!==i)return e._i[i];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,i){a(e,u,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=i&&l(i,n,e[c],e)}));return o(u.prototype,{clear:function(){for(var e=f(this,t),n=e._i,i=e._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete n[i.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=f(this,t),i=g(n,e);if(i){var r=i.n,o=i.p;delete n._i[i.i],i.r=!0,o&&(o.n=r),r&&(r.p=o),n._f==i&&(n._f=r),n._l==i&&(n._l=o),n[m]--}return!!i},forEach:function(e){f(this,t);var n,i=s(e,arguments.length>1?arguments[1]:void 0,3);while(n=n?n.n:this._f){i(n.v,n.k,this);while(n&&n.r)n=n.p}},has:function(e){return!!g(f(this,t),e)}}),d&&i(u.prototype,"size",{get:function(){return f(this,t)[m]}}),u},def:function(e,t,n){var i,r,o=g(e,t);return o?o.v=n:(e._l=o={i:r=p(t,!0),k:t,v:n,p:i=e._l,n:void 0,r:!1},e._f||(e._f=o),i&&(i.n=o),e[m]++,"F"!==r&&(e._i[r]=o)),e},getEntry:g,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=f(e,t),this._k=n,this._l=void 0}),(function(){var e=this,t=e._k,n=e._l;while(n&&n.r)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?u(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,u(1))}),n?"entries":"values",!n,!0),h(t)}}},c345:function(e,t,n){"use strict";var i=n("c532"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(i.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),n=i.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},c366:function(e,t,n){var i=n("6821"),r=n("9def"),o=n("77f1");e.exports=function(e){return function(t,n,s){var a,l=i(t),c=r(l.length),u=o(s,c);if(e&&n!=n){while(c>u)if(a=l[u++],a!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},c367:function(e,t,n){"use strict";var i=n("8436"),r=n("50ed"),o=n("481b"),s=n("36c3");e.exports=n("30f1")(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},c3a1:function(e,t,n){var i=n("e6f3"),r=n("1691");e.exports=Object.keys||function(e){return i(e,r)}},c401:function(e,t,n){"use strict";var i=n("c532");e.exports=function(e,t,n){return i.forEach(n,(function(n){e=n(e,t)})),e}},c532:function(e,t,n){"use strict";var i=n("1d2b"),r=Object.prototype.toString;function o(e){return"[object Array]"===r.call(e)}function s(e){return"undefined"===typeof e}function a(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"[object ArrayBuffer]"===r.call(e)}function c(e){return"undefined"!==typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function h(e){return"string"===typeof e}function d(e){return"number"===typeof e}function p(e){return null!==e&&"object"===typeof e}function f(e){if("[object Object]"!==r.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function m(e){return"[object Date]"===r.call(e)}function g(e){return"[object File]"===r.call(e)}function y(e){return"[object Blob]"===r.call(e)}function v(e){return"[object Function]"===r.call(e)}function _(e){return p(e)&&v(e.pipe)}function x(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function b(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function T(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function S(){var e={};function t(t,n){f(e[n])&&f(t)?e[n]=S(e[n],t):f(t)?e[n]=S({},t):o(t)?e[n]=t.slice():e[n]=t}for(var n=0,i=arguments.length;n<i;n++)T(arguments[n],t);return e}function E(e,t,n){return T(t,(function(t,r){e[r]=n&&"function"===typeof t?i(t,n):t})),e}function k(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}e.exports={isArray:o,isArrayBuffer:l,isBuffer:a,isFormData:c,isArrayBufferView:u,isString:h,isNumber:d,isObject:p,isPlainObject:f,isUndefined:s,isDate:m,isFile:g,isBlob:y,isFunction:v,isStream:_,isURLSearchParams:x,isStandardBrowserEnv:w,forEach:T,merge:S,extend:E,trim:b,stripBOM:k}},c5f6:function(e,t,n){"use strict";var i=n("7726"),r=n("69a8"),o=n("2d95"),s=n("5dbc"),a=n("6a99"),l=n("79e5"),c=n("9093").f,u=n("11e9").f,h=n("86cc").f,d=n("aa77").trim,p="Number",f=i[p],m=f,g=f.prototype,y=o(n("2aeb")(g))==p,v="trim"in String.prototype,_=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=v?t.trim():d(t,3);var n,i,r,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+t}for(var s,l=t.slice(2),c=0,u=l.length;c<u;c++)if(s=l.charCodeAt(c),s<48||s>r)return NaN;return parseInt(l,i)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof f&&(y?l((function(){g.valueOf.call(n)})):o(n)!=p)?s(new m(_(t)),n,f):_(t)};for(var x,b=n("9e1e")?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)r(m,x=b[w])&&!r(f,x)&&h(f,x,u(m,x));f.prototype=g,g.constructor=f,n("2aba")(i,p,f)}},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c745:function(e,t,n){var i,r;(function(o,s){"use strict";i=s,r="function"===typeof i?i.call(t,n,t,e):i,void 0===r||(e.exports=r)})(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n<t.length;n++){var i=t[n],r=i+"MatchesSelector";if(e[r])return r}}();return function(t,n){return t[e](n)}}))},c8af:function(e,t,n){"use strict";var i=n("c532");e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},c8b5:function(e,t,n){var i;
/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */(function(r,o,s,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),h="function",d=Math.round,p=Math.abs,f=Date.now;function m(e,t,n){return setTimeout(w(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(y(e,n[t],n),!0)}function y(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a){i=0;while(i<e.length)t.call(n,e[i],i,e),i++}else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function v(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}l="function"!==typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var _=v((function(e,t,n){var i=Object.keys(t),r=0;while(r<i.length)(!n||n&&e[i[r]]===a)&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),x=v((function(e,t){return _(e,t,!0)}),"merge","Use `assign`.");function b(e,t,n){var i,r=t.prototype;i=e.prototype=Object.create(r),i.constructor=e,i._super=r,n&&l(i,n)}function w(e,t){return function(){return e.apply(t,arguments)}}function T(e,t){return typeof e==h?e.apply(t&&t[0]||a,t):e}function S(e,t){return e===a?t:e}function E(e,t,n){y(I(t),(function(t){e.addEventListener(t,n,!1)}))}function k(e,t,n){y(I(t),(function(t){e.removeEventListener(t,n,!1)}))}function C(e,t){while(e){if(e==t)return!0;e=e.parentNode}return!1}function A(e,t){return e.indexOf(t)>-1}function I(e){return e.trim().split(/\s+/g)}function M(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);var i=0;while(i<e.length){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function P(e){return Array.prototype.slice.call(e,0)}function D(e,t,n){var i=[],r=[],o=0;while(o<e.length){var s=t?e[o][t]:e[o];M(r,s)<0&&i.push(e[o]),r[o]=s,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function L(e,t){var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;while(o<c.length){if(n=c[o],i=n?n+r:t,i in e)return i;o++}return a}var O=1;function z(){return O++}function R(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}var F=/mobile|tablet|ip(ad|hone|od)|android/i,N="ontouchstart"in r,B=L(r,"PointerEvent")!==a,j=N&&F.test(navigator.userAgent),V="touch",$="pen",U="mouse",q="kinect",G=25,H=1,W=2,Z=4,X=8,Y=1,Q=2,K=4,J=8,ee=16,te=Q|K,ne=J|ee,ie=te|ne,re=["x","y"],oe=["clientX","clientY"];function se(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){T(e.options.enable,[e])&&n.handler(t)},this.init()}function ae(e){var t,n=e.options.inputClass;return t=n||(B?Ae:j?Re:N?je:Te),new t(e,le)}function le(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&H&&i-r===0,s=t&(Z|X)&&i-r===0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,ce(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ce(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=de(t)),r>1&&!n.firstMultiple?n.firstMultiple=de(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,l=t.center=pe(i);t.timeStamp=f(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=ye(a,l),t.distance=ge(a,l),ue(n,t),t.offsetDirection=me(t.deltaX,t.deltaY);var c=fe(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=p(c.x)>p(c.y)?c.x:c.y,t.scale=s?_e(s.pointers,i):1,t.rotation=s?ve(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,he(n,t);var u=e.element;C(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}function ue(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==H&&o.eventType!==Z||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function he(e,t){var n,i,r,o,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=X&&(l>G||s.velocity===a)){var c=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,h=fe(l,c,u);i=h.x,r=h.y,n=p(h.x)>p(h.y)?h.x:h.y,o=me(c,u),e.lastInterval=t}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}function de(e){var t=[],n=0;while(n<e.pointers.length)t[n]={clientX:d(e.pointers[n].clientX),clientY:d(e.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:t,center:pe(t),deltaX:e.deltaX,deltaY:e.deltaY}}function pe(e){var t=e.length;if(1===t)return{x:d(e[0].clientX),y:d(e[0].clientY)};var n=0,i=0,r=0;while(r<t)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:d(n/t),y:d(i/t)}}function fe(e,t,n){return{x:t/e||0,y:n/e||0}}function me(e,t){return e===t?Y:p(e)>=p(t)?e<0?Q:K:t<0?J:ee}function ge(e,t,n){n||(n=re);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function ye(e,t,n){n||(n=re);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function ve(e,t){return ye(t[1],t[0],oe)+ye(e[1],e[0],oe)}function _e(e,t){return ge(t[0],t[1],oe)/ge(e[0],e[1],oe)}se.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(R(this.element),this.evWin,this.domHandler)}};var xe={mousedown:H,mousemove:W,mouseup:Z},be="mousedown",we="mousemove mouseup";function Te(){this.evEl=be,this.evWin=we,this.pressed=!1,se.apply(this,arguments)}b(Te,se,{handler:function(e){var t=xe[e.type];t&H&&0===e.button&&(this.pressed=!0),t&W&&1!==e.which&&(t=Z),this.pressed&&(t&Z&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:U,srcEvent:e}))}});var Se={pointerdown:H,pointermove:W,pointerup:Z,pointercancel:X,pointerout:X},Ee={2:V,3:$,4:U,5:q},ke="pointerdown",Ce="pointermove pointerup pointercancel";function Ae(){this.evEl=ke,this.evWin=Ce,se.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(ke="MSPointerDown",Ce="MSPointerMove MSPointerUp MSPointerCancel"),b(Ae,se,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Se[i],o=Ee[e.pointerType]||e.pointerType,s=o==V,a=M(t,e.pointerId,"pointerId");r&H&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):r&(Z|X)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var Ie={touchstart:H,touchmove:W,touchend:Z,touchcancel:X},Me="touchstart",Pe="touchstart touchmove touchend touchcancel";function De(){this.evTarget=Me,this.evWin=Pe,this.started=!1,se.apply(this,arguments)}function Le(e,t){var n=P(e.touches),i=P(e.changedTouches);return t&(Z|X)&&(n=D(n.concat(i),"identifier",!0)),[n,i]}b(De,se,{handler:function(e){var t=Ie[e.type];if(t===H&&(this.started=!0),this.started){var n=Le.call(this,e,t);t&(Z|X)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:V,srcEvent:e})}}});var Oe={touchstart:H,touchmove:W,touchend:Z,touchcancel:X},ze="touchstart touchmove touchend touchcancel";function Re(){this.evTarget=ze,this.targetIds={},se.apply(this,arguments)}function Fe(e,t){var n=P(e.touches),i=this.targetIds;if(t&(H|W)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=P(e.changedTouches),a=[],l=this.target;if(o=n.filter((function(e){return C(e.target,l)})),t===H){r=0;while(r<o.length)i[o[r].identifier]=!0,r++}r=0;while(r<s.length)i[s[r].identifier]&&a.push(s[r]),t&(Z|X)&&delete i[s[r].identifier],r++;return a.length?[D(o.concat(a),"identifier",!0),a]:void 0}b(Re,se,{handler:function(e){var t=Oe[e.type],n=Fe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:V,srcEvent:e})}});var Ne=2500,Be=25;function je(){se.apply(this,arguments);var e=w(this.handler,this);this.touch=new Re(this.manager,e),this.mouse=new Te(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Ve(e,t){e&H?(this.primaryTouch=t.changedPointers[0].identifier,$e.call(this,t)):e&(Z|X)&&$e.call(this,t)}function $e(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)};setTimeout(r,Ne)}}function Ue(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),s=Math.abs(n-r.y);if(o<=Be&&s<=Be)return!0}return!1}b(je,se,{handler:function(e,t,n){var i=n.pointerType==V,r=n.pointerType==U;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Ve.call(this,t,n);else if(r&&Ue.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var qe=L(u.style,"touchAction"),Ge=qe!==a,He="compute",We="auto",Ze="manipulation",Xe="none",Ye="pan-x",Qe="pan-y",Ke=tt();function Je(e,t){this.manager=e,this.set(t)}function et(e){if(A(e,Xe))return Xe;var t=A(e,Ye),n=A(e,Qe);return t&&n?Xe:t||n?t?Ye:Qe:A(e,Ze)?Ze:We}function tt(){if(!Ge)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||r.CSS.supports("touch-action",n)})),e}Je.prototype={set:function(e){e==He&&(e=this.compute()),Ge&&this.manager.element.style&&Ke[e]&&(this.manager.element.style[qe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return y(this.manager.recognizers,(function(t){T(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),et(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=A(i,Xe)&&!Ke[Xe],o=A(i,Qe)&&!Ke[Qe],s=A(i,Ye)&&!Ke[Ye];if(r){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}if(!s||!o)return r||o&&n&te||s&&n&ne?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var nt=1,it=2,rt=4,ot=8,st=ot,at=16,lt=32;function ct(e){this.options=l({},this.defaults,e||{}),this.id=z(),this.manager=null,this.options.enable=S(this.options.enable,!0),this.state=nt,this.simultaneous={},this.requireFail=[]}function ut(e){return e&at?"cancel":e&ot?"end":e&rt?"move":e&it?"start":""}function ht(e){return e==ee?"down":e==J?"up":e==Q?"left":e==K?"right":""}function dt(e,t){var n=t.manager;return n?n.get(e):e}function pt(){ct.apply(this,arguments)}function ft(){pt.apply(this,arguments),this.pX=null,this.pY=null}function mt(){pt.apply(this,arguments)}function gt(){ct.apply(this,arguments),this._timer=null,this._input=null}function yt(){pt.apply(this,arguments)}function vt(){pt.apply(this,arguments)}function _t(){ct.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function xt(e,t){return t=t||{},t.recognizers=S(t.recognizers,xt.defaults.preset),new Tt(e,t)}ct.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(g(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=dt(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return g(e,"dropRecognizeWith",this)||(e=dt(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(g(e,"requireFailure",this))return this;var t=this.requireFail;return e=dt(e,this),-1===M(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(g(e,"dropRequireFailure",this))return this;e=dt(e,this);var t=M(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<ot&&i(t.options.event+ut(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=ot&&i(t.options.event+ut(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=lt},canEmit:function(){var e=0;while(e<this.requireFail.length){if(!(this.requireFail[e].state&(lt|nt)))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!T(this.options.enable,[this,t]))return this.reset(),void(this.state=lt);this.state&(st|at|lt)&&(this.state=nt),this.state=this.process(t),this.state&(it|rt|ot|at)&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},b(pt,ct,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(it|rt),r=this.attrTest(e);return i&&(n&X||!r)?t|at:i||r?n&Z?t|ot:t&it?t|rt:it:lt}}),b(ft,pt,{defaults:{event:"pan",threshold:10,pointers:1,direction:ie},getTouchAction:function(){var e=this.options.direction,t=[];return e&te&&t.push(Qe),e&ne&&t.push(Ye),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,s=e.deltaY;return r&t.direction||(t.direction&te?(r=0===o?Y:o<0?Q:K,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===s?Y:s<0?J:ee,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return pt.prototype.attrTest.call(this,e)&&(this.state&it||!(this.state&it)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ht(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(mt,pt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&it)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),b(gt,ct,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[We]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(Z|X)&&!r)this.reset();else if(e.eventType&H)this.reset(),this._timer=m((function(){this.state=st,this.tryEmit()}),t.time,this);else if(e.eventType&Z)return st;return lt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===st&&(e&&e.eventType&Z?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),b(yt,pt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&it)}}),b(vt,pt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:te|ne,pointers:1},getTouchAction:function(){return ft.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(te|ne)?t=e.overallVelocity:n&te?t=e.overallVelocityX:n&ne&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&p(t)>this.options.velocity&&e.eventType&Z},emit:function(e){var t=ht(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(_t,ct,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ze]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&H&&0===this.count)return this.failTimeout();if(i&&r&&n){if(e.eventType!=Z)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||ge(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e;var a=this.count%t.taps;if(0===a)return this.hasRequireFailures()?(this._timer=m((function(){this.state=st,this.tryEmit()}),t.interval,this),it):st}return lt},failTimeout:function(){return this._timer=m((function(){this.state=lt}),this.options.interval,this),lt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==st&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),xt.VERSION="2.0.7",xt.defaults={domEvents:!1,touchAction:He,enable:!0,inputTarget:null,inputClass:null,preset:[[yt,{enable:!1}],[mt,{enable:!1},["rotate"]],[vt,{direction:te}],[ft,{direction:te},["swipe"]],[_t],[_t,{event:"doubletap",taps:2},["tap"]],[gt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var bt=1,wt=2;function Tt(e,t){this.options=l({},xt.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ae(this),this.touchAction=new Je(this,this.options.touchAction),St(this,!0),y(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function St(e,t){var n,i=e.element;i.style&&(y(e.options.cssProps,(function(r,o){n=L(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}function Et(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}Tt.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?wt:bt},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&st)&&(r=t.curRecognizer=null);var o=0;while(o<i.length)n=i[o],t.stopped===wt||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(it|rt|ot)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof ct)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(g(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(g(e,"remove",this))return this;if(e=this.get(e),e){var t=this.recognizers,n=M(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var n=this.handlers;return y(I(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==a){var n=this.handlers;return y(I(e),(function(e){t?n[e]&&n[e].splice(M(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&Et(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};var i=0;while(i<n.length)n[i](t),i++}},destroy:function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(xt,{INPUT_START:H,INPUT_MOVE:W,INPUT_END:Z,INPUT_CANCEL:X,STATE_POSSIBLE:nt,STATE_BEGAN:it,STATE_CHANGED:rt,STATE_ENDED:ot,STATE_RECOGNIZED:st,STATE_CANCELLED:at,STATE_FAILED:lt,DIRECTION_NONE:Y,DIRECTION_LEFT:Q,DIRECTION_RIGHT:K,DIRECTION_UP:J,DIRECTION_DOWN:ee,DIRECTION_HORIZONTAL:te,DIRECTION_VERTICAL:ne,DIRECTION_ALL:ie,Manager:Tt,Input:se,TouchAction:Je,TouchInput:Re,MouseInput:Te,PointerEventInput:Ae,TouchMouseInput:je,SingleTouchInput:De,Recognizer:ct,AttrRecognizer:pt,Tap:_t,Pan:ft,Swipe:vt,Pinch:mt,Rotate:yt,Press:gt,on:E,off:k,each:y,merge:x,extend:_,assign:l,inherit:b,bindFn:w,prefixed:L});var kt="undefined"!==typeof r?r:"undefined"!==typeof self?self:{};kt.Hammer=xt,i=function(){return xt}.call(t,n,t,e),i===a||(e.exports=i)})(window,document)},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}e.exports=n},ca5a:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},cadf:function(e,t,n){"use strict";var i=n("9c6c"),r=n("d53b"),o=n("84f2"),s=n("6821");e.exports=n("01f9")(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},cb7c:function(e,t,n){var i=n("d3f4");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},ccb9:function(e,t,n){t.f=n("5168")},cd1c:function(e,t,n){var i=n("e853");e.exports=function(e,t){return new(i(e))(t)}},cd78:function(e,t,n){var i=n("e4ae"),r=n("f772"),o=n("656e");e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=o.f(e),s=n.resolve;return s(t),n.promise}},ce10:function(e,t,n){var i=n("69a8"),r=n("6821"),o=n("c366")(!1),s=n("613b")("IE_PROTO");e.exports=function(e,t){var n,a=r(e),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);while(t.length>l)i(a,n=t[l++])&&(~o(c,n)||c.push(n));return c}},cee4:function(e,t,n){"use strict";var i=n("c532"),r=n("1d2b"),o=n("0a06"),s=n("4a7b"),a=n("2444");function l(e){var t=new o(e),n=r(o.prototype.request,t);return i.extend(n,o.prototype,t),i.extend(n,t),n}var c=l(a);c.Axios=o,c.create=function(e){return l(s(c.defaults,e))},c.Cancel=n("7a77"),c.CancelToken=n("8df4"),c.isCancel=n("2e67"),c.all=function(e){return Promise.all(e)},c.spread=n("0df6"),c.isAxiosError=n("5f02"),e.exports=c,e.exports.default=c},d225:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i}))},d2c8:function(e,t,n){var i=n("aae3"),r=n("be13");e.exports=function(e,t,n){if(i(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},d2d5:function(e,t,n){n("1654"),n("549b"),e.exports=n("584a").Array.from},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d4c0:function(e,t,n){var i=n("0d58"),r=n("2621"),o=n("52a7");e.exports=function(e){var t=i(e),n=r.f;if(n){var s,a=n(e),l=o.f,c=0;while(a.length>c)l.call(e,s=a[c++])&&t.push(s)}return t}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d864:function(e,t,n){var i=n("79aa");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},d8d6:function(e,t,n){n("1654"),n("6c1c"),e.exports=n("ccb9").f("iterator")},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},d925:function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},d9f6:function(e,t,n){var i=n("e4ae"),r=n("794b"),o=n("1bc3"),s=Object.defineProperty;t.f=n("8e60")?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},db2a:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}n.d(t,"a",(function(){return i}))},dbdb:function(e,t,n){var i=n("584a"),r=n("e53d"),o="__core-js_shared__",s=r[o]||(r[o]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("b8e3")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},dcbc:function(e,t,n){var i=n("2aba");e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},e0b8:function(e,t,n){"use strict";var i=n("7726"),r=n("5ca1"),o=n("2aba"),s=n("dcbc"),a=n("67ab"),l=n("4a59"),c=n("f605"),u=n("d3f4"),h=n("79e5"),d=n("5cc5"),p=n("7f20"),f=n("5dbc");e.exports=function(e,t,n,m,g,y){var v=i[e],_=v,x=g?"set":"add",b=_&&_.prototype,w={},T=function(e){var t=b[e];o(b,e,"delete"==e||"has"==e?function(e){return!(y&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(y||b.forEach&&!h((function(){(new _).entries().next()})))){var S=new _,E=S[x](y?{}:-0,1)!=S,k=h((function(){S.has(1)})),C=d((function(e){new _(e)})),A=!y&&h((function(){var e=new _,t=5;while(t--)e[x](t,t);return!e.has(-0)}));C||(_=t((function(t,n){c(t,_,e);var i=f(new v,t,_);return void 0!=n&&l(n,g,i[x],i),i})),_.prototype=b,b.constructor=_),(k||A)&&(T("delete"),T("has"),g&&T("get")),(A||E)&&T(x),y&&b.clear&&delete b.clear}else _=m.getConstructor(t,e,g,x),s(_.prototype,n),a.NEED=!0;return p(_,e),w[e]=_,r(r.G+r.W+r.F*(_!=v),w),y||m.setStrong(_,e,g),_}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e192:function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e,t,n;function i(i,r){if(e)if(t){var o="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/api/#transpiling-v2'); }; var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk); self.onerror = null;",s={};e(s),n=r(s),"undefined"!==typeof window&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else t=r;else e=r}i(["exports"],(function(e){var t="2.3.1",n=i;function i(e,t,n,i){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=n,this.p2y=i}i.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},i.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},i.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},i.prototype.solveCurveX=function(e,t){var n,i,r,o,s;for(void 0===t&&(t=1e-6),r=e,s=0;s<8;s++){if(o=this.sampleCurveX(r)-e,Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r-=o/a}if((r=e)<(n=0))return n;if(r>(i=1))return i;for(;n<i;){if(o=this.sampleCurveX(r),Math.abs(o-e)<t)return r;e>o?n=r:i=r,r=.5*(i-n)+n}return r},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var r=o;function o(e,t){this.x=e,this.y=t}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),i=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),i=Math.sin(e),r=t.y+i*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-i*(this.y-t.y),this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var s="undefined"!=typeof self?self:{};const a=Math.pow(2,53)-1,l=Math.PI/180,c=180/Math.PI;function u(e){return e*l}const h=[[0,0],[1,0],[1,1],[0,1]];function d(e){if(e<=0)return 0;if(e>=1)return 1;const t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function p(e,t,i,r){const o=new n(e,t,i,r);return function(e){return o.solve(e)}}const f=p(.25,.1,.25,1);function m(e,t,n){return Math.min(n,Math.max(t,e))}function g(e,t,n){const i=n-t,r=((e-t)%i+i)%i+t;return r===t?n:r}function y(e,t,n){if(!e.length)return n(null,[]);let i=e.length;const r=new Array(e.length);let o=null;e.forEach((e,s)=>{t(e,(e,t)=>{e&&(o=e),r[s]=t,0==--i&&n(o,r)})})}function v(e){const t=[];for(const n in e)t.push(e[n]);return t}function _(e,...t){for(const n of t)for(const t in n)e[t]=n[t];return e}let x=1;function b(){return x++}function w(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function T(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function S(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function E(e,t){e.forEach(e=>{t[e]&&(t[e]=t[e].bind(t))})}function k(e,t){return-1!==e.indexOf(t,e.length-t.length)}function C(e,t,n){const i={};for(const r in e)i[r]=t.call(n||this,e[r],r,e);return i}function A(e,t,n){const i={};for(const r in e)t.call(n||this,e[r],r,e)&&(i[r]=e[r]);return i}function I(e){return Array.isArray(e)?e.map(I):"object"==typeof e&&e?C(e,I):e}const M={};function P(e){M[e]||("undefined"!=typeof console&&console.warn(e),M[e]=!0)}function D(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function L(e){let t=0;for(let n,i,r=0,o=e.length,s=o-1;r<o;s=r++)n=e[r],i=e[s],t+=(i.x-n.x)*(n.y+i.y);return t}function O(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function z(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,n,i,r)=>{const o=i||r;return t[n]=!o||o.toLowerCase(),""}),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let R,F,N,B=null;function j(e){if(null==B){const t=e.navigator?e.navigator.userAgent:null;B=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return B}function V(e){try{const t=s[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}const $={now:()=>void 0!==N?N:s.performance.now(),setNow(e){N=e},restoreNow(){N=void 0},frame(e){const t=s.requestAnimationFrame(e);return{cancel:()=>s.cancelAnimationFrame(t)}},getImageData(e,t=0){const n=s.document.createElement("canvas"),i=n.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,i.drawImage(e,0,0,e.width,e.height),i.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(R||(R=s.document.createElement("a")),R.href=e,R.href),get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return!!s.matchMedia&&(null==F&&(F=s.matchMedia("(prefers-reduced-motion: reduce)")),F.matches)}};let U;const q={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==U){const e=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{U=null!=Object({NODE_ENV:"production",BASE_URL:"/site/themes/blueorigin/dist/"}).API_URL_REGEX?new RegExp(Object({NODE_ENV:"production",BASE_URL:"/site/themes/blueorigin/dist/"}).API_URL_REGEX):e}catch(t){U=e}}return U},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},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},G={supported:!1,testSupport:function(e){!Z&&W&&(X?Y(e):H=e)}};let H,W,Z=!1,X=!1;function Y(e){const t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,W),e.isContextLost())return;G.supported=!0}catch(e){}e.deleteTexture(t),Z=!0}s.document&&(W=s.document.createElement("img"),W.onload=function(){H&&Y(H),H=null,X=!0},W.onerror=function(){Z=!0,H=null},W.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Q="01",K="NO_ACCESS_TOKEN";function J(e){return 0===e.indexOf("mapbox:")}function ee(e){return q.API_URL_REGEX.test(e)}const te=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ne(e){const t=e.match(te);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function ie(e){const t=e.params.length?"?"+e.params.join("&"):"";return`${e.protocol}://${e.authority}${e.path}${t}`}function re(e){if(!e)return null;const t=e.split(".");if(!t||3!==t.length)return null;try{return JSON.parse(decodeURIComponent(s.atob(t[1]).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(e){return null}}class oe{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const t=re(q.ACCESS_TOKEN);let n="";return n=t&&t.u?s.btoa(encodeURIComponent(t.u).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(Number("0x"+t)))):q.ACCESS_TOKEN||"",e?`mapbox.eventData.${e}:${n}`:"mapbox.eventData:"+n}fetchEventData(){const e=V("localStorage"),t=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{const e=s.localStorage.getItem(t);e&&(this.eventData=JSON.parse(e));const i=s.localStorage.getItem(n);i&&(this.anonId=i)}catch(e){P("Unable to read from LocalStorage")}}saveEventData(){const e=V("localStorage"),t=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{s.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){P("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,n,i,r){if(!q.EVENTS_URL)return;const o=ne(q.EVENTS_URL);o.params.push("access_token="+(r||q.ACCESS_TOKEN||""));const s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:t,skuId:Q,userId:this.anonId},a=n?_(s,n):s,l={url:ie(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=ke(l,e=>{this.pendingRequest=null,i(e),this.saveEventData(),this.processRequests(r)})}queueRequest(e,t){this.queue.push(e),this.processRequests(t)}}const se=new class extends oe{constructor(e){super("appUserTurnstile"),this._customAccessToken=e}postTurnstileEvent(e,t){q.EVENTS_URL&&q.ACCESS_TOKEN&&Array.isArray(e)&&e.some(e=>J(e)||ee(e))&&this.queueRequest(Date.now(),t)}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const t=re(q.ACCESS_TOKEN),n=t?t.u:q.ACCESS_TOKEN;let i=n!==this.eventData.tokenU;S(this.anonId)||(this.anonId=w(),i=!0);const r=this.queue.shift();if(this.eventData.lastSuccess){const e=new Date(this.eventData.lastSuccess),t=new Date(r),n=(r-this.eventData.lastSuccess)/864e5;i=i||n>=1||n<-1||e.getDate()!==t.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(r,{"enabled.telemetry":!1},e=>{e||(this.eventData.lastSuccess=r,this.eventData.tokenU=n)},e)}},ae=se.postTurnstileEvent.bind(se),le=new class extends oe{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(e,t,n,i){this.skuToken=t,this.errorCb=i,q.EVENTS_URL&&(n||q.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},n):this.errorCb(new Error(K)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:n}=this.queue.shift();t&&this.success[t]||(this.anonId||this.fetchEventData(),S(this.anonId)||(this.anonId=w()),this.postEvent(n,{skuToken:this.skuToken},e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e))}},ce=le.postMapLoadEvent.bind(le),ue=new class extends oe{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(e,t,n,i){if(!q.API_URL||!q.SESSION_PATH)return;const r=ne(q.API_URL+q.SESSION_PATH);r.params.push("sku="+(t||"")),r.params.push("access_token="+(i||q.ACCESS_TOKEN||""));const o={url:ie(r),headers:{"Content-Type":"text/plain"}};this.pendingRequest=Ce(o,e=>{this.pendingRequest=null,n(e),this.saveEventData(),this.processRequests(i)})}getSessionAPI(e,t,n,i){this.skuToken=t,this.errorCb=i,q.SESSION_PATH&&q.API_URL&&(n||q.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},n):this.errorCb(new Error(K)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:n}=this.queue.shift();t&&this.success[t]||this.getSession(n,this.skuToken,e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e)}},he=ue.getSessionAPI.bind(ue),de=new Set,pe="mapbox-tiles";let fe,me,ge=500,ye=50;function ve(){s.caches&&!fe&&(fe=s.caches.open(pe))}function _e(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}let xe=1/0;const be={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(be);class we extends Error{constructor(e,t,n){401===t&&ee(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),super(e),this.status=t,this.url=n}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const Te=O()?()=>self.worker&&self.worker.referrer:()=>("blob:"===s.location.protocol?s.parent:s).location.href,Se=function(e,t){if(!(/^file:/.test(n=e.url)||/^file:/.test(Te())&&!/^\w+:/.test(n))){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return function(e,t){const n=new s.AbortController,i=new s.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Te(),signal:n.signal});let r=!1,o=!1;const a=(l=i.url).indexOf("sku=")>0&&ee(l);var l;"json"===e.type&&i.headers.set("Accept","application/json");const c=(n,r,l)=>{if(o)return;if(n&&"SecurityError"!==n.message&&P(n),r&&l)return u(r);const c=Date.now();s.fetch(i).then(n=>{if(n.ok){const e=a?n.clone():null;return u(n,e,c)}return t(new we(n.statusText,n.status,e.url))}).catch(e=>{20!==e.code&&t(new Error(e.message))})},u=(n,a,l)=>{("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then(e=>{o||(a&&l&&function(e,t,n){if(ve(),!fe)return;const i={status:t.status,statusText:t.statusText,headers:new s.Headers};t.headers.forEach((e,t)=>i.headers.set(t,e));const r=z(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&i.headers.set("Expires",new Date(n+1e3*r["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-n<42e4||function(e,t){if(void 0===me)try{new Response(new ReadableStream),me=!0}catch(e){me=!1}me?t(e.body):e.blob().then(t)}(t,t=>{const n=new s.Response(t,i);ve(),fe&&fe.then(t=>t.put(_e(e.url),n)).catch(e=>P(e.message))}))}(i,a,l),r=!0,t(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))}).catch(e=>{o||t(new Error(e.message))})};return a?function(e,t){if(ve(),!fe)return t(null);const n=_e(e.url);fe.then(e=>{e.match(n).then(i=>{const r=function(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")||0),n=z(e.headers.get("Cache-Control")||"");return t>Date.now()&&!n["no-cache"]}(i);e.delete(n),r&&e.put(n,i.clone()),t(null,i,r)}).catch(t)}).catch(t)}(i,c):c(null,null),{cancel:()=>{o=!0,r||n.abort()}}}(e,t);if(O()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var n;return function(e,t){const n=new s.XMLHttpRequest;n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer");for(const i in e.headers)n.setRequestHeader(i,e.headers[i]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{t(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let i=n.response;if("json"===e.type)try{i=JSON.parse(n.response)}catch(e){return t(e)}t(null,i,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else t(new we(n.statusText,n.status,e.url))},n.send(e.body),{cancel:()=>n.abort()}}(e,t)},Ee=function(e,t){return Se(_(e,{type:"arrayBuffer"}),t)},ke=function(e,t){return Se(_(e,{method:"POST"}),t)},Ce=function(e,t){return Se(_(e,{method:"GET"}),t)};function Ae(e){const t=s.document.createElement("a");return t.href=e,t.protocol===s.document.location.protocol&&t.host===s.document.location.host}const Ie="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Me,Pe;Me=[],Pe=0;const De=function(e,t){if(G.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Pe>=q.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return Me.push(n),n}Pe++;let n=!1;const i=()=>{if(!n)for(n=!0,Pe--;Me.length&&Pe<q.MAX_PARALLEL_IMAGE_REQUESTS;){const e=Me.shift(),{requestParameters:t,callback:n,cancelled:i}=e;i||(e.cancel=De(t,n).cancel)}},r=Ee(e,(e,n,r,o)=>{i(),e?t(e):n&&(s.createImageBitmap?function(e,t){const n=new s.Blob([new Uint8Array(e)],{type:"image/png"});s.createImageBitmap(n).then(e=>{t(null,e)}).catch(e=>{t(new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(n,(e,n)=>t(e,n,r,o)):function(e,t){const n=new s.Image,i=s.URL;n.onload=()=>{t(null,n),i.revokeObjectURL(n.src),n.onload=null,s.requestAnimationFrame(()=>{n.src=Ie})},n.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const r=new s.Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?i.createObjectURL(r):Ie}(n,(e,n)=>t(e,n,r,o)))});return{cancel:()=>{r.cancel(),i()}}};function Le(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function Oe(e,t,n){if(n&&n[e]){const i=n[e].indexOf(t);-1!==i&&n[e].splice(i,1)}}class ze{constructor(e,t={}){_(this,t),this.type=e}}class Re extends ze{constructor(e,t={}){super("error",_({error:e},t))}}class Fe{on(e,t){return this._listeners=this._listeners||{},Le(e,t,this._listeners),this}off(e,t){return Oe(e,t,this._listeners),Oe(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},Le(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){"string"==typeof e&&(e=new ze(e,t||{}));const n=e.type;if(this.listens(n)){e.target=this;const t=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const n of t)n.call(this,e);const i=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const o of i)Oe(n,o,this._oneTimeListeners),o.call(this,e);const r=this._eventedParent;r&&(_(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),r.fire(e))}else e instanceof Re&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var Ne={$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"},terrain:{type:"terrain"},fog:{type:"fog"},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:{},sky:{}},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_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{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","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"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},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,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},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,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_sky"],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","feature"]},"property-type":"cross-faded-data-driven"},"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"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-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"}}};class Be{constructor(e,t,n,i){this.message=(e?e+": ":"")+n,i&&(this.identifier=i),null!=t&&t.__line__&&(this.line=t.__line__)}}function je(e){const t=e.value;return t?[new Be(e.key,t,"constants have been deprecated as of v8")]:[]}function Ve(e,...t){for(const n of t)for(const t in n)e[t]=n[t];return e}function $e(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Ue(e){if(Array.isArray(e))return e.map(Ue);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const n in e)t[n]=Ue(e[n]);return t}return $e(e)}class qe extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class Ge{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[n,i]of t)this.bindings[n]=i}concat(e){return new Ge(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const He={kind:"null"},We={kind:"number"},Ze={kind:"string"},Xe={kind:"boolean"},Ye={kind:"color"},Qe={kind:"object"},Ke={kind:"value"},Je={kind:"collator"},et={kind:"formatted"},tt={kind:"resolvedImage"};function nt(e,t){return{kind:"array",itemType:e,N:t}}function it(e){if("array"===e.kind){const t=it(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const rt=[He,We,Ze,Xe,Ye,et,Qe,nt(Ke),tt];function ot(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!ot(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of rt)if(!ot(e,t))return null}return`Expected ${it(e)} but found ${it(t)} instead.`}function st(e,t){return t.some(t=>t.kind===e.kind)}function at(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function lt(e){var t={exports:{}};return e(t,t.exports),t.exports}var ct=lt((function(e,t){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(e){return(e=Math.round(e))<0?0:e>255?255:e}function r(e){return i("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function o(e){return(t="%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))<0?0:t>1?1:t;var t}function s(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{t.parseCSSColor=function(e){var t,a=e.replace(/ /g,"").toLowerCase();if(a in n)return n[a].slice();if("#"===a[0])return 4===a.length?(t=parseInt(a.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===a.length&&(t=parseInt(a.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=a.indexOf("("),c=a.indexOf(")");if(-1!==l&&c+1===a.length){var u=a.substr(0,l),h=a.substr(l+1,c-(l+1)).split(","),d=1;switch(u){case"rgba":if(4!==h.length)return null;d=o(h.pop());case"rgb":return 3!==h.length?null:[r(h[0]),r(h[1]),r(h[2]),d];case"hsla":if(4!==h.length)return null;d=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,f=o(h[1]),m=o(h[2]),g=m<=.5?m*(f+1):m+f-m*f,y=2*m-g;return[i(255*s(y,g,p+1/3)),i(255*s(y,g,p)),i(255*s(y,g,p-1/3)),d];default:return null}}return null}}catch(e){}}));class ut{constructor(e,t,n,i=1){this.r=e,this.g=t,this.b=n,this.a=i}static parse(e){if(!e)return;if(e instanceof ut)return e;if("string"!=typeof e)return;const t=ct.parseCSSColor(e);return t?new ut(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,n,i]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(n)},${i})`}toArray(){const{r:e,g:t,b:n,a:i}=this;return 0===i?[0,0,0,0]:[255*e/i,255*t/i,255*n/i,i]}}ut.black=new ut(0,0,0,1),ut.white=new ut(1,1,1,1),ut.transparent=new ut(0,0,0,0),ut.red=new ut(1,0,0,1),ut.blue=new ut(0,0,1,1);class ht{constructor(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class dt{constructor(e,t,n,i,r){this.text=e,this.image=t,this.scale=n,this.fontStack=i,this.textColor=r}}class pt{constructor(e){this.sections=e}static fromString(e){return new pt([new dt(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof pt?e:pt.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const n={};t.fontStack&&(n["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(n["font-scale"]=t.scale),t.textColor&&(n["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(n)}return e}}class ft{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new ft({name:e,available:!1}):null}serialize(){return["image",this.name]}}function mt(e,t,n,i){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,n,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[e,t,n,i]:[e,t,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function gt(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ut)return!0;if(e instanceof ht)return!0;if(e instanceof pt)return!0;if(e instanceof ft)return!0;if(Array.isArray(e)){for(const t of e)if(!gt(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!gt(e[t]))return!1;return!0}return!1}function yt(e){if(null===e)return He;if("string"==typeof e)return Ze;if("boolean"==typeof e)return Xe;if("number"==typeof e)return We;if(e instanceof ut)return Ye;if(e instanceof ht)return Je;if(e instanceof pt)return et;if(e instanceof ft)return tt;if(Array.isArray(e)){const t=e.length;let n;for(const i of e){const e=yt(i);if(n){if(n===e)continue;n=Ke;break}n=e}return nt(n||Ke,t)}return Qe}function vt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof ut||e instanceof pt||e instanceof ft?e.toString():JSON.stringify(e)}class _t{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!gt(e[1]))return t.error("invalid value");const n=e[1];let i=yt(n);const r=t.expectedType;return"array"!==i.kind||0!==i.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(i=r),new _t(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ut?["rgba"].concat(this.value.toArray()):this.value instanceof pt?this.value.serialize():this.value}}class xt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const bt={string:Ze,number:We,boolean:Xe,object:Qe};class wt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let n,i=1;const r=e[0];if("array"===r){let r,o;if(e.length>2){const n=e[1];if("string"!=typeof n||!(n in bt)||"object"===n)return t.error('The item type argument of "array" must be one of string, number, boolean',1);r=bt[n],i++}else r=Ke;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],i++}n=nt(r,o)}else n=bt[r];const o=[];for(;i<e.length;i++){const n=t.parse(e[i],i,Ke);if(!n)return null;o.push(n)}return new wt(n,o)}evaluate(e){for(let t=0;t<this.args.length;t++){const n=this.args[t].evaluate(e);if(!ot(this.type,yt(n)))return n;if(t===this.args.length-1)throw new xt(`Expected value to be of type ${it(this.type)}, but found ${it(yt(n))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const n=e.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){t.push(n.kind);const i=e.N;("number"==typeof i||this.args.length>1)&&t.push(i)}}return t.concat(this.args.map(e=>e.serialize()))}}class Tt{constructor(e){this.type=et,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");const i=[];let r=!1;for(let o=1;o<=e.length-1;++o){const n=e[o];if(r&&"object"==typeof n&&!Array.isArray(n)){r=!1;let e=null;if(n["font-scale"]&&(e=t.parse(n["font-scale"],1,We),!e))return null;let o=null;if(n["text-font"]&&(o=t.parse(n["text-font"],1,nt(Ze)),!o))return null;let s=null;if(n["text-color"]&&(s=t.parse(n["text-color"],1,Ye),!s))return null;const a=i[i.length-1];a.scale=e,a.font=o,a.textColor=s}else{const n=t.parse(e[o],1,Ke);if(!n)return null;const s=n.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,i.push({content:n,scale:null,font:null,textColor:null})}}return new Tt(i)}evaluate(e){return new pt(this.sections.map(t=>{const n=t.content.evaluate(e);return yt(n)===tt?new dt("",n,null,null,null):new dt(vt(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const n={};t.scale&&(n["font-scale"]=t.scale.serialize()),t.font&&(n["text-font"]=t.font.serialize()),t.textColor&&(n["text-color"]=t.textColor.serialize()),e.push(n)}return e}}class St{constructor(e){this.type=tt,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,Ze);return n?new St(n):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),n=ft.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Et={"to-boolean":Xe,"to-color":Ye,"to-number":We,"to-string":Ze};class kt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");const i=Et[n],r=[];for(let o=1;o<e.length;o++){const n=t.parse(e[o],o,Ke);if(!n)return null;r.push(n)}return new kt(i,r)}evaluate(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){let t,n;for(const i of this.args){if(t=i.evaluate(e),n=null,t instanceof ut)return t;if("string"==typeof t){const n=e.parseColor(t);if(n)return n}else if(Array.isArray(t)&&(n=t.length<3||t.length>4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:mt(t[0],t[1],t[2],t[3]),!n))return new ut(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new xt(n||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const n of this.args){if(t=n.evaluate(e),null===t)return 0;const i=Number(t);if(!isNaN(i))return i}throw new xt(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?pt.fromString(vt(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?ft.fromString(vt(this.args[0].evaluate(e))):vt(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if("formatted"===this.type.kind)return new Tt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new St(this.args[0]).serialize();const e=["to-"+this.type.kind];return this.eachChild(t=>{e.push(t.serialize())}),e}}const Ct=["Unknown","Point","LineString","Polygon"];class At{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Ct[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=ut.parse(e)),t}}class It{constructor(e,t,n,i){this.name=e,this.type=t,this._evaluate=n,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const n=e[0],i=It.definitions[n];if(!i)return t.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const r=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=o.filter(([t])=>!Array.isArray(t)||t.length===e.length-1);let a=null;for(const[l,c]of s){a=new Kt(t.registry,t.path,null,t.scope);const i=[];let o=!1;for(let t=1;t<e.length;t++){const n=e[t],r=Array.isArray(l)?l[t-1]:l.type,s=a.parse(n,1+i.length,r);if(!s){o=!0;break}i.push(s)}if(!o)if(Array.isArray(l)&&l.length!==i.length)a.error(`Expected ${l.length} arguments, but found ${i.length} instead.`);else{for(let e=0;e<i.length;e++){const t=Array.isArray(l)?l[e]:l.type,n=i[e];a.concat(e+1).checkSubtype(t,n.type)}if(0===a.errors.length)return new It(n,r,c,i)}}if(1===s.length)t.errors.push(...a.errors);else{const n=(s.length?s:o).map(([e])=>{return t=e,Array.isArray(t)?`(${t.map(it).join(", ")})`:`(${it(t.type)}...)`;var t}).join(" | "),i=[];for(let r=1;r<e.length;r++){const n=t.parse(e[r],1+i.length);if(!n)return null;i.push(it(n.type))}t.error(`Expected arguments of type ${n}, but found (${i.join(", ")}) instead.`)}return null}static register(e,t){It.definitions=t;for(const n in t)e[n]=It}}class Mt{constructor(e,t,n){this.type=Je,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");const n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");const i=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Xe);if(!i)return null;const r=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Xe);if(!r)return null;let o=null;return n.locale&&(o=t.parse(n.locale,1,Ze),!o)?null:new Mt(i,r,o)}evaluate(e){return new ht(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const Pt=8192;function Dt(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Lt(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Ot(e,t){const n=(180+e[0])/360,i=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,r=Math.pow(2,t.z);return[Math.round(n*r*Pt),Math.round(i*r*Pt)]}function zt(e,t,n){const i=e[0]-t[0],r=e[1]-t[1],o=e[0]-n[0],s=e[1]-n[1];return i*s-o*r==0&&i*o<=0&&r*s<=0}function Rt(e,t){let n=!1;for(let s=0,a=t.length;s<a;s++){const a=t[s];for(let t=0,s=a.length;t<s-1;t++){if(zt(e,a[t],a[t+1]))return!1;(r=a[t])[1]>(i=e)[1]!=(o=a[t+1])[1]>i[1]&&i[0]<(o[0]-r[0])*(i[1]-r[1])/(o[1]-r[1])+r[0]&&(n=!n)}}var i,r,o;return n}function Ft(e,t){for(let n=0;n<t.length;n++)if(Rt(e,t[n]))return!0;return!1}function Nt(e,t,n,i){const r=i[0]-n[0],o=i[1]-n[1],s=(e[0]-n[0])*o-r*(e[1]-n[1]),a=(t[0]-n[0])*o-r*(t[1]-n[1]);return s>0&&a<0||s<0&&a>0}function Bt(e,t,n){for(const c of n)for(let n=0;n<c.length-1;++n)if(0!=(a=[(s=c[n+1])[0]-(o=c[n])[0],s[1]-o[1]])[0]*(l=[(r=t)[0]-(i=e)[0],r[1]-i[1]])[1]-a[1]*l[0]&&Nt(i,r,o,s)&&Nt(o,s,i,r))return!0;var i,r,o,s,a,l;return!1}function jt(e,t){for(let n=0;n<e.length;++n)if(!Rt(e[n],t))return!1;for(let n=0;n<e.length-1;++n)if(Bt(e[n],e[n+1],t))return!1;return!0}function Vt(e,t){for(let n=0;n<t.length;n++)if(jt(e,t[n]))return!0;return!1}function $t(e,t,n){const i=[];for(let r=0;r<e.length;r++){const o=[];for(let i=0;i<e[r].length;i++){const s=Ot(e[r][i],n);Dt(t,s),o.push(s)}i.push(o)}return i}function Ut(e,t,n){const i=[];for(let r=0;r<e.length;r++){const o=$t(e[r],t,n);i.push(o)}return i}function qt(e,t,n,i){if(e[0]<n[0]||e[0]>n[2]){const t=.5*i;let r=e[0]-n[0]>t?-i:n[0]-e[0]>t?i:0;0===r&&(r=e[0]-n[2]>t?-i:n[2]-e[0]>t?i:0),e[0]+=r}Dt(t,e)}function Gt(e,t,n,i){const r=Math.pow(2,i.z)*Pt,o=[i.x*Pt,i.y*Pt],s=[];for(const a of e)for(const e of a){const i=[e.x+o[0],e.y+o[1]];qt(i,t,n,r),s.push(i)}return s}function Ht(e,t,n,i){const r=Math.pow(2,i.z)*Pt,o=[i.x*Pt,i.y*Pt],s=[];for(const l of e){const e=[];for(const n of l){const i=[n.x+o[0],n.y+o[1]];Dt(t,i),e.push(i)}s.push(e)}if(t[2]-t[0]<=r/2){(a=t)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const e of s)for(const i of e)qt(i,t,n,r)}var a;return s}class Wt{constructor(e,t){this.type=Xe,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(gt(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e<t.features.length;++e){const n=t.features[e].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new Wt(t,t.features[e].geometry)}else if("Feature"===t.type){const e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new Wt(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new Wt(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){const n=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=e.canonicalID();if("Polygon"===t.type){const o=$t(t.coordinates,i,r),s=Gt(e.geometry(),n,i,r);if(!Lt(n,i))return!1;for(const e of s)if(!Rt(e,o))return!1}if("MultiPolygon"===t.type){const o=Ut(t.coordinates,i,r),s=Gt(e.geometry(),n,i,r);if(!Lt(n,i))return!1;for(const e of s)if(!Ft(e,o))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){const n=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=e.canonicalID();if("Polygon"===t.type){const o=$t(t.coordinates,i,r),s=Ht(e.geometry(),n,i,r);if(!Lt(n,i))return!1;for(const e of s)if(!jt(e,o))return!1}if("MultiPolygon"===t.type){const o=Ut(t.coordinates,i,r),s=Ht(e.geometry(),n,i,r);if(!Lt(n,i))return!1;for(const e of s)if(!Vt(e,o))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}function Zt(e){if(e instanceof It){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Wt)return!1;let t=!0;return e.eachChild(e=>{t&&!Zt(e)&&(t=!1)}),t}function Xt(e){if(e instanceof It&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!Xt(e)&&(t=!1)}),t}function Yt(e,t){if(e instanceof It&&t.indexOf(e.name)>=0)return!1;let n=!0;return e.eachChild(e=>{n&&!Yt(e,t)&&(n=!1)}),n}class Qt{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const n=e[1];return t.scope.has(n)?new Qt(n,t.scope.get(n)):t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class Kt{constructor(e,t=[],n,i=new Ge,r=[]){this.registry=e,this.path=t,this.key=t.map(e=>`[${e}]`).join(""),this.scope=i,this.errors=r,this.expectedType=n}parse(e,t,n,i,r={}){return t?this.concat(t,n,i)._parse(e,r):this._parse(e,r)}_parse(e,t){function n(e,t,n){return"assert"===n?new wt(t,[e]):"coerce"===n?new kt(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const r=this.registry[i];if(r){let i=r.parse(e,this);if(!i)return null;if(this.expectedType){const e=this.expectedType,r=i.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==r.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==r.kind&&"string"!==r.kind){if(this.checkSubtype(e,r))return null}else i=n(i,e,t.typeAnnotation||"coerce");else i=n(i,e,t.typeAnnotation||"assert")}if(!(i instanceof _t)&&"resolvedImage"!==i.type.kind&&Jt(i)){const t=new At;try{i=new _t(i.type,i.evaluate(t))}catch(e){return this.error(e.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,n){const i="number"==typeof e?this.path.concat(e):this.path,r=n?this.scope.concat(n):this.scope;return new Kt(this.registry,i,t||null,r,this.errors)}error(e,...t){const n=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new qe(n,e))}checkSubtype(e,t){const n=ot(e,t);return n&&this.error(n),n}}function Jt(e){if(e instanceof Qt)return Jt(e.boundExpression);if(e instanceof It&&"error"===e.name)return!1;if(e instanceof Mt)return!1;if(e instanceof Wt)return!1;const t=e instanceof kt||e instanceof wt;let n=!0;return e.eachChild(e=>{n=t?n&&Jt(e):n&&e instanceof _t}),!!n&&Zt(e)&&Yt(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"])}function en(e,t){const n=e.length-1;let i,r,o=0,s=n,a=0;for(;o<=s;)if(a=Math.floor((o+s)/2),i=e[a],r=e[a+1],i<=t){if(a===n||t<r)return a;o=a+1}else{if(!(i>t))throw new xt("Input is not a number.");s=a-1}return 0}class tn{constructor(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[i,r]of n)this.labels.push(i),this.outputs.push(r)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const n=t.parse(e[1],1,We);if(!n)return null;const i=[];let r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(let o=1;o<e.length;o+=2){const n=1===o?-1/0:e[o],s=e[o+1],a=o,l=o+1;if("number"!=typeof n)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(i.length&&i[i.length-1][0]>=n)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const c=t.parse(s,l,r);if(!c)return null;r=r||c.type,i.push([n,c])}return new tn(r,n,i)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return n[0].evaluate(e);const r=t.length;return i>=t[r-1]?n[r-1].evaluate(e):n[en(t,i)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}function nn(e,t,n){return e*(1-n)+t*n}var rn=Object.freeze({__proto__:null,number:nn,color:function(e,t,n){return new ut(nn(e.r,t.r,n),nn(e.g,t.g,n),nn(e.b,t.b,n),nn(e.a,t.a,n))},array:function(e,t,n){return e.map((e,i)=>nn(e,t[i],n))}});const on=.95047,sn=1.08883,an=4/29,ln=6/29,cn=3*ln*ln,un=Math.PI/180,hn=180/Math.PI;function dn(e){return e>.008856451679035631?Math.pow(e,1/3):e/cn+an}function pn(e){return e>ln?e*e*e:cn*(e-an)}function fn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function mn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gn(e){const t=mn(e.r),n=mn(e.g),i=mn(e.b),r=dn((.4124564*t+.3575761*n+.1804375*i)/on),o=dn((.2126729*t+.7151522*n+.072175*i)/1);return{l:116*o-16,a:500*(r-o),b:200*(o-dn((.0193339*t+.119192*n+.9503041*i)/sn)),alpha:e.a}}function yn(e){let t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,i=isNaN(e.b)?t:t-e.b/200;return t=1*pn(t),n=on*pn(n),i=sn*pn(i),new ut(fn(3.2404542*n-1.5371385*t-.4985314*i),fn(-.969266*n+1.8760108*t+.041556*i),fn(.0556434*n-.2040259*t+1.0572252*i),e.alpha)}function vn(e,t,n){const i=t-e;return e+n*(i>180||i<-180?i-360*Math.round(i/360):i)}const _n={forward:gn,reverse:yn,interpolate:function(e,t,n){return{l:nn(e.l,t.l,n),a:nn(e.a,t.a,n),b:nn(e.b,t.b,n),alpha:nn(e.alpha,t.alpha,n)}}},xn={forward:function(e){const{l:t,a:n,b:i}=gn(e),r=Math.atan2(i,n)*hn;return{h:r<0?r+360:r,c:Math.sqrt(n*n+i*i),l:t,alpha:e.a}},reverse:function(e){const t=e.h*un,n=e.c;return yn({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},interpolate:function(e,t,n){return{h:vn(e.h,t.h,n),c:nn(e.c,t.c,n),l:nn(e.l,t.l,n),alpha:nn(e.alpha,t.alpha,n)}}};var bn=Object.freeze({__proto__:null,lab:_n,hcl:xn});class wn{constructor(e,t,n,i,r){this.type=e,this.operator=t,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(const[o,s]of r)this.labels.push(o),this.outputs.push(s)}static interpolationFactor(e,t,i,r){let o=0;if("exponential"===e.name)o=Tn(t,e.base,i,r);else if("linear"===e.name)o=Tn(t,1,i,r);else if("cubic-bezier"===e.name){const s=e.controlPoints;o=new n(s[0],s[1],s[2],s[3]).solve(Tn(t,1,i,r))}return o}static parse(e,t){let[n,i,r,...o]=e;if(!Array.isArray(i)||0===i.length)return t.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){const e=i[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return t.error("Unknown interpolation type "+String(i[0]),1,0);{const e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(r=t.parse(r,2,We),!r)return null;const s=[];let a=null;"interpolate-hcl"===n||"interpolate-lab"===n?a=Ye:t.expectedType&&"value"!==t.expectedType.kind&&(a=t.expectedType);for(let l=0;l<o.length;l+=2){const e=o[l],n=o[l+1],i=l+3,r=l+4;if("number"!=typeof e)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',i);if(s.length&&s[s.length-1][0]>=e)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const c=t.parse(n,r,a);if(!c)return null;a=a||c.type,s.push([e,c])}return"number"===a.kind||"color"===a.kind||"array"===a.kind&&"number"===a.itemType.kind&&"number"==typeof a.N?new wn(a,n,i,r,s):t.error(`Type ${it(a)} is not interpolatable.`)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return n[0].evaluate(e);const r=t.length;if(i>=t[r-1])return n[r-1].evaluate(e);const o=en(t,i),s=wn.interpolationFactor(this.interpolation,i,t[o],t[o+1]),a=n[o].evaluate(e),l=n[o+1].evaluate(e);return"interpolate"===this.operator?rn[this.type.kind.toLowerCase()](a,l,s):"interpolate-hcl"===this.operator?xn.reverse(xn.interpolate(xn.forward(a),xn.forward(l),s)):_n.reverse(_n.interpolate(_n.forward(a),_n.forward(l),s))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let n=0;n<this.labels.length;n++)t.push(this.labels[n],this.outputs[n].serialize());return t}}function Tn(e,t,n,i){const r=i-n,o=e-n;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}class Sn{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let n=null;const i=t.expectedType;i&&"value"!==i.kind&&(n=i);const r=[];for(const s of e.slice(1)){const e=t.parse(s,1+r.length,n,void 0,{typeAnnotation:"omit"});if(!e)return null;n=n||e.type,r.push(e)}const o=i&&r.some(e=>ot(i,e.type));return new Sn(o?Ke:n,r)}evaluate(e){let t,n=null,i=0;for(const r of this.args)if(i++,n=r.evaluate(e),n&&n instanceof ft&&!n.available&&(t||(t=n.name),n=null,i===this.args.length&&(n=t)),null!==n)break;return n}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}class En{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const n=[];for(let r=1;r<e.length-1;r+=2){const i=e[r];if("string"!=typeof i)return t.error(`Expected string, but found ${typeof i} instead.`,r);if(/[^a-zA-Z0-9_]/.test(i))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);const o=t.parse(e[r+1],r+1);if(!o)return null;n.push([i,o])}const i=t.parse(e[e.length-1],e.length-1,t.expectedType,n);return i?new En(n,i):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[t,n]of this.bindings)e.push(t,n.serialize());return e.push(this.result.serialize()),e}}class kn{constructor(e,t,n){this.type=e,this.index=t,this.input=n}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,We),i=t.parse(e[2],2,nt(t.expectedType||Ke));return n&&i?new kn(i.type.itemType,n,i):null}evaluate(e){const t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new xt(`Array index out of bounds: ${t} < 0.`);if(t>=n.length)throw new xt(`Array index out of bounds: ${t} > ${n.length-1}.`);if(t!==Math.floor(t))throw new xt(`Array index must be an integer, but found ${t} instead.`);return n[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Cn{constructor(e,t){this.type=Xe,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,Ke),i=t.parse(e[2],2,Ke);return n&&i?st(n.type,[Xe,Ze,We,He,Ke])?new Cn(n,i):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${it(n.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!at(t,["boolean","string","number","null"]))throw new xt(`Expected first argument to be of type boolean, string, number or null, but found ${it(yt(t))} instead.`);if(!at(n,["string","array"]))throw new xt(`Expected second argument to be of type array or string, but found ${it(yt(n))} instead.`);return n.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class An{constructor(e,t,n){this.type=We,this.needle=e,this.haystack=t,this.fromIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,Ke),i=t.parse(e[2],2,Ke);if(!n||!i)return null;if(!st(n.type,[Xe,Ze,We,He,Ke]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${it(n.type)} instead`);if(4===e.length){const r=t.parse(e[3],3,We);return r?new An(n,i,r):null}return new An(n,i)}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!at(t,["boolean","string","number","null"]))throw new xt(`Expected first argument to be of type boolean, string, number or null, but found ${it(yt(t))} instead.`);if(!at(n,["string","array"]))throw new xt(`Expected second argument to be of type array or string, but found ${it(yt(n))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return n.indexOf(t,i)}return n.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class In{constructor(e,t,n,i,r,o){this.inputType=e,this.type=t,this.input=n,this.cases=i,this.outputs=r,this.otherwise=o}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let n,i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);const r={},o=[];for(let l=2;l<e.length-1;l+=2){let s=e[l];const a=e[l+1];Array.isArray(s)||(s=[s]);const c=t.concat(l);if(0===s.length)return c.error("Expected at least one branch label.");for(const e of s){if("number"!=typeof e&&"string"!=typeof e)return c.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,yt(e)))return null}else n=yt(e);if(void 0!==r[String(e)])return c.error("Branch labels must be unique.");r[String(e)]=o.length}const u=t.parse(a,l,i);if(!u)return null;i=i||u.type,o.push(u)}const s=t.parse(e[1],1,Ke);if(!s)return null;const a=t.parse(e[e.length-1],e.length-1,i);return a?"value"!==s.type.kind&&t.concat(1).checkSubtype(n,s.type)?null:new In(n,i,s,r,o,a):null}evaluate(e){const t=this.input.evaluate(e);return(yt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),n=[],i={};for(const o of t){const e=i[this.cases[o]];void 0===e?(i[this.cases[o]]=n.length,n.push([this.cases[o],[o]])):n[e][1].push(o)}const r=e=>"number"===this.inputType.kind?Number(e):e;for(const[o,s]of n)e.push(1===s.length?r(s[0]):s.map(r)),e.push(this.outputs[o].serialize());return e.push(this.otherwise.serialize()),e}}class Mn{constructor(e,t,n){this.type=e,this.branches=t,this.otherwise=n}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const i=[];for(let o=1;o<e.length-1;o+=2){const r=t.parse(e[o],o,Xe);if(!r)return null;const s=t.parse(e[o+1],o+1,n);if(!s)return null;i.push([r,s]),n=n||s.type}const r=t.parse(e[e.length-1],e.length-1,n);return r?new Mn(n,i,r):null}evaluate(e){for(const[t,n]of this.branches)if(t.evaluate(e))return n.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,n]of this.branches)e(t),e(n);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}class Pn{constructor(e,t,n,i){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,Ke),i=t.parse(e[2],2,We);if(!n||!i)return null;if(!st(n.type,[nt(Ke),Ze,Ke]))return t.error(`Expected first argument to be of type array or string, but found ${it(n.type)} instead`);if(4===e.length){const r=t.parse(e[3],3,We);return r?new Pn(n.type,n,i,r):null}return new Pn(n.type,n,i)}evaluate(e){const t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!at(t,["string","array"]))throw new xt(`Expected first argument to be of type array or string, but found ${it(yt(t))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return t.slice(n,i)}return t.slice(n)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function Dn(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Ln(e,t,n,i){return 0===i.compare(t,n)}function On(e,t,n){const i="=="!==e&&"!="!==e;return class r{constructor(e,t,n){this.type=Xe,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const n=e[0];let o=t.parse(e[1],1,Ke);if(!o)return null;if(!Dn(n,o.type))return t.concat(1).error(`"${n}" comparisons are not supported for type '${it(o.type)}'.`);let s=t.parse(e[2],2,Ke);if(!s)return null;if(!Dn(n,s.type))return t.concat(2).error(`"${n}" comparisons are not supported for type '${it(s.type)}'.`);if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return t.error(`Cannot compare types '${it(o.type)}' and '${it(s.type)}'.`);i&&("value"===o.type.kind&&"value"!==s.type.kind?o=new wt(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new wt(o.type,[s])));let a=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return t.error("Cannot use collator to compare non-string types.");if(a=t.parse(e[3],3,Je),!a)return null}return new r(o,s,a)}evaluate(r){const o=this.lhs.evaluate(r),s=this.rhs.evaluate(r);if(i&&this.hasUntypedArgument){const t=yt(o),n=yt(s);if(t.kind!==n.kind||"string"!==t.kind&&"number"!==t.kind)throw new xt(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${n.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const e=yt(o),n=yt(s);if("string"!==e.kind||"string"!==n.kind)return t(r,o,s)}return this.collator?n(r,o,s,this.collator.evaluate(r)):t(r,o,s)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild(e=>{t.push(e.serialize())}),t}}}const zn=On("==",(function(e,t,n){return t===n}),Ln),Rn=On("!=",(function(e,t,n){return t!==n}),(function(e,t,n,i){return!Ln(0,t,n,i)})),Fn=On("<",(function(e,t,n){return t<n}),(function(e,t,n,i){return i.compare(t,n)<0})),Nn=On(">",(function(e,t,n){return t>n}),(function(e,t,n,i){return i.compare(t,n)>0})),Bn=On("<=",(function(e,t,n){return t<=n}),(function(e,t,n,i){return i.compare(t,n)<=0})),jn=On(">=",(function(e,t,n){return t>=n}),(function(e,t,n,i){return i.compare(t,n)>=0}));class Vn{constructor(e,t,n,i,r){this.type=Ze,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=r}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,We);if(!n)return null;const i=e[2];if("object"!=typeof i||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let r=null;if(i.locale&&(r=t.parse(i.locale,1,Ze),!r))return null;let o=null;if(i.currency&&(o=t.parse(i.currency,1,Ze),!o))return null;let s=null;if(i["min-fraction-digits"]&&(s=t.parse(i["min-fraction-digits"],1,We),!s))return null;let a=null;return i["max-fraction-digits"]&&(a=t.parse(i["max-fraction-digits"],1,We),!a)?null:new Vn(n,r,o,s,a)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class $n{constructor(e){this.type=We,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error(`Expected argument of type string or array, but found ${it(n.type)} instead.`):new $n(n):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new xt(`Expected value to be of type string or array, but found ${it(yt(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}const Un={"==":zn,"!=":Rn,">":Nn,"<":Fn,">=":jn,"<=":Bn,array:wt,at:kn,boolean:wt,case:Mn,coalesce:Sn,collator:Mt,format:Tt,image:St,in:Cn,"index-of":An,interpolate:wn,"interpolate-hcl":wn,"interpolate-lab":wn,length:$n,let:En,literal:_t,match:In,number:wt,"number-format":Vn,object:wt,slice:Pn,step:tn,string:wt,"to-boolean":kt,"to-color":kt,"to-number":kt,"to-string":kt,var:Qt,within:Wt};function qn(e,[t,n,i,r]){t=t.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);const o=r?r.evaluate(e):1,s=mt(t,n,i,o);if(s)throw new xt(s);return new ut(t/255*o,n/255*o,i/255*o,o)}function Gn(e,t){return e in t}function Hn(e,t){const n=t[e];return void 0===n?null:n}function Wn(e){return{type:e}}function Zn(e){return{result:"success",value:e}}function Xn(e){return{result:"error",value:e}}function Yn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Qn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Kn(e){return!!e.expression&&e.expression.interpolated}function Jn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ei(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function ti(e){return e}function ni(e,t){const n="color"===t.type,i=e.stops&&"object"==typeof e.stops[0][0],r=i||!(i||void 0!==e.property),o=e.type||(Kn(t)?"exponential":"interval");if(n&&((e=Ve({},e)).stops&&(e.stops=e.stops.map(e=>[e[0],ut.parse(e[1])])),e.default=ut.parse(e.default?e.default:t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!bn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);let s,a,l;if("exponential"===o)s=si;else if("interval"===o)s=oi;else if("categorical"===o){s=ri,a=Object.create(null);for(const t of e.stops)a[t[0]]=t[1];l=typeof e.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);s=ai}if(i){const n={},i=[];for(let t=0;t<e.stops.length;t++){const r=e.stops[t],o=r[0].zoom;void 0===n[o]&&(n[o]={zoom:o,type:e.type,property:e.property,default:e.default,stops:[]},i.push(o)),n[o].stops.push([r[0].value,r[1]])}const r=[];for(const e of i)r.push([n[e].zoom,ni(n[e],t)]);const o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:wn.interpolationFactor.bind(void 0,o),zoomStops:r.map(e=>e[0]),evaluate:({zoom:n},i)=>si({stops:r,base:e.base},t,n).evaluate(n,i)}}if(r){const n="exponential"===o?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:n,interpolationFactor:wn.interpolationFactor.bind(void 0,n),zoomStops:e.stops.map(e=>e[0]),evaluate:({zoom:n})=>s(e,t,n,a,l)}}return{kind:"source",evaluate(n,i){const r=i&&i.properties?i.properties[e.property]:void 0;return void 0===r?ii(e.default,t.default):s(e,t,r,a,l)}}}function ii(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function ri(e,t,n,i,r){return ii(typeof n===r?i[n]:void 0,e.default,t.default)}function oi(e,t,n){if("number"!==Jn(n))return ii(e.default,t.default);const i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];const r=en(e.stops.map(e=>e[0]),n);return e.stops[r][1]}function si(e,t,n){const i=void 0!==e.base?e.base:1;if("number"!==Jn(n))return ii(e.default,t.default);const r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];const o=en(e.stops.map(e=>e[0]),n),s=function(e,t,n,i){const r=i-n,o=e-n;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}(n,i,e.stops[o][0],e.stops[o+1][0]),a=e.stops[o][1],l=e.stops[o+1][1];let c=rn[t.type]||ti;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=bn[e.colorSpace];c=(e,n)=>t.reverse(t.interpolate(t.forward(e),t.forward(n),s))}return"function"==typeof a.evaluate?{evaluate(...e){const t=a.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==n)return c(t,n,s)}}:c(a,l,s)}function ai(e,t,n){return"color"===t.type?n=ut.parse(n):"formatted"===t.type?n=pt.fromString(n.toString()):"resolvedImage"===t.type?n=ft.fromString(n.toString()):Jn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0),ii(n,e.default,t.default)}It.register(Un,{error:[{kind:"error"},[Ze],(e,[t])=>{throw new xt(t.evaluate(e))}],typeof:[Ze,[Ke],(e,[t])=>it(yt(t.evaluate(e)))],"to-rgba":[nt(We,4),[Ye],(e,[t])=>t.evaluate(e).toArray()],rgb:[Ye,[We,We,We],qn],rgba:[Ye,[We,We,We,We],qn],has:{type:Xe,overloads:[[[Ze],(e,[t])=>Gn(t.evaluate(e),e.properties())],[[Ze,Qe],(e,[t,n])=>Gn(t.evaluate(e),n.evaluate(e))]]},get:{type:Ke,overloads:[[[Ze],(e,[t])=>Hn(t.evaluate(e),e.properties())],[[Ze,Qe],(e,[t,n])=>Hn(t.evaluate(e),n.evaluate(e))]]},"feature-state":[Ke,[Ze],(e,[t])=>Hn(t.evaluate(e),e.featureState||{})],properties:[Qe,[],e=>e.properties()],"geometry-type":[Ze,[],e=>e.geometryType()],id:[Ke,[],e=>e.id()],zoom:[We,[],e=>e.globals.zoom],"heatmap-density":[We,[],e=>e.globals.heatmapDensity||0],"line-progress":[We,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[We,[],e=>e.globals.skyRadialProgress||0],accumulated:[Ke,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[We,Wn(We),(e,t)=>{let n=0;for(const i of t)n+=i.evaluate(e);return n}],"*":[We,Wn(We),(e,t)=>{let n=1;for(const i of t)n*=i.evaluate(e);return n}],"-":{type:We,overloads:[[[We,We],(e,[t,n])=>t.evaluate(e)-n.evaluate(e)],[[We],(e,[t])=>-t.evaluate(e)]]},"/":[We,[We,We],(e,[t,n])=>t.evaluate(e)/n.evaluate(e)],"%":[We,[We,We],(e,[t,n])=>t.evaluate(e)%n.evaluate(e)],ln2:[We,[],()=>Math.LN2],pi:[We,[],()=>Math.PI],e:[We,[],()=>Math.E],"^":[We,[We,We],(e,[t,n])=>Math.pow(t.evaluate(e),n.evaluate(e))],sqrt:[We,[We],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[We,[We],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[We,[We],(e,[t])=>Math.log(t.evaluate(e))],log2:[We,[We],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[We,[We],(e,[t])=>Math.sin(t.evaluate(e))],cos:[We,[We],(e,[t])=>Math.cos(t.evaluate(e))],tan:[We,[We],(e,[t])=>Math.tan(t.evaluate(e))],asin:[We,[We],(e,[t])=>Math.asin(t.evaluate(e))],acos:[We,[We],(e,[t])=>Math.acos(t.evaluate(e))],atan:[We,[We],(e,[t])=>Math.atan(t.evaluate(e))],min:[We,Wn(We),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[We,Wn(We),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[We,[We],(e,[t])=>Math.abs(t.evaluate(e))],round:[We,[We],(e,[t])=>{const n=t.evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[We,[We],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[We,[We],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[Xe,[Ze,Ke],(e,[t,n])=>e.properties()[t.value]===n.value],"filter-id-==":[Xe,[Ke],(e,[t])=>e.id()===t.value],"filter-type-==":[Xe,[Ze],(e,[t])=>e.geometryType()===t.value],"filter-<":[Xe,[Ze,Ke],(e,[t,n])=>{const i=e.properties()[t.value],r=n.value;return typeof i==typeof r&&i<r}],"filter-id-<":[Xe,[Ke],(e,[t])=>{const n=e.id(),i=t.value;return typeof n==typeof i&&n<i}],"filter->":[Xe,[Ze,Ke],(e,[t,n])=>{const i=e.properties()[t.value],r=n.value;return typeof i==typeof r&&i>r}],"filter-id->":[Xe,[Ke],(e,[t])=>{const n=e.id(),i=t.value;return typeof n==typeof i&&n>i}],"filter-<=":[Xe,[Ze,Ke],(e,[t,n])=>{const i=e.properties()[t.value],r=n.value;return typeof i==typeof r&&i<=r}],"filter-id-<=":[Xe,[Ke],(e,[t])=>{const n=e.id(),i=t.value;return typeof n==typeof i&&n<=i}],"filter->=":[Xe,[Ze,Ke],(e,[t,n])=>{const i=e.properties()[t.value],r=n.value;return typeof i==typeof r&&i>=r}],"filter-id->=":[Xe,[Ke],(e,[t])=>{const n=e.id(),i=t.value;return typeof n==typeof i&&n>=i}],"filter-has":[Xe,[Ke],(e,[t])=>t.value in e.properties()],"filter-has-id":[Xe,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[Xe,[nt(Ze)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[Xe,[nt(Ke)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[Xe,[Ze,nt(Ke)],(e,[t,n])=>n.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[Xe,[Ze,nt(Ke)],(e,[t,n])=>function(e,t,n,i){for(;n<=i;){const r=n+i>>1;if(t[r]===e)return!0;t[r]>e?i=r-1:n=r+1}return!1}(e.properties()[t.value],n.value,0,n.value.length-1)],all:{type:Xe,overloads:[[[Xe,Xe],(e,[t,n])=>t.evaluate(e)&&n.evaluate(e)],[Wn(Xe),(e,t)=>{for(const n of t)if(!n.evaluate(e))return!1;return!0}]]},any:{type:Xe,overloads:[[[Xe,Xe],(e,[t,n])=>t.evaluate(e)||n.evaluate(e)],[Wn(Xe),(e,t)=>{for(const n of t)if(n.evaluate(e))return!0;return!1}]]},"!":[Xe,[Xe],(e,[t])=>!t.evaluate(e)],"is-supported-script":[Xe,[Ze],(e,[t])=>{const n=e.globals&&e.globals.isSupportedScript;return!n||n(t.evaluate(e))}],upcase:[Ze,[Ze],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[Ze,[Ze],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[Ze,Wn(Ke),(e,t)=>t.map(t=>vt(t.evaluate(e))).join("")],"resolved-locale":[Ze,[Je],(e,[t])=>t.evaluate(e).resolvedLocale()]});class li{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new At,this._defaultValue=t?function(e){return"color"===e.type&&ei(e.default)?new ut(0,0,0,0):"color"===e.type?ut.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,n,i,r,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=i,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,t,n,i,r,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new xt(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function ci(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Un}function ui(e,t){const n=new Kt(Un,[],t?function(e){const t={color:Ye,string:Ze,number:We,enum:Ze,boolean:Xe,formatted:et,resolvedImage:tt};return"array"===e.type?nt(t[e.value]||Ke,e.length):t[e.type]}(t):void 0),i=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return i?Zn(new li(i,t)):Xn(n.errors)}class hi{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Xt(t.expression)}evaluateWithoutErrorHandling(e,t,n,i,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,i,r,o)}evaluate(e,t,n,i,r,o){return this._styleExpression.evaluate(e,t,n,i,r,o)}}class di{constructor(e,t,n,i){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Xt(t.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,t,n,i,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,i,r,o)}evaluate(e,t,n,i,r,o){return this._styleExpression.evaluate(e,t,n,i,r,o)}interpolationFactor(e,t,n){return this.interpolationType?wn.interpolationFactor(this.interpolationType,e,t,n):0}}function pi(e,t){if("error"===(e=ui(e,t)).result)return e;const n=e.value.expression,i=Zt(n);if(!i&&!Yn(t))return Xn([new qe("","data expressions not supported")]);const r=Yt(n,["zoom"]);if(!r&&!Qn(t))return Xn([new qe("","zoom expressions not supported")]);const o=mi(n);return o||r?o instanceof qe?Xn([o]):o instanceof wn&&!Kn(t)?Xn([new qe("",'"interpolate" expressions cannot be used with this property')]):Zn(o?new di(i?"camera":"composite",e.value,o.labels,o instanceof wn?o.interpolation:void 0):new hi(i?"constant":"source",e.value)):Xn([new qe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class fi{constructor(e,t){this._parameters=e,this._specification=t,Ve(this,ni(this._parameters,this._specification))}static deserialize(e){return new fi(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function mi(e){let t=null;if(e instanceof En)t=mi(e.result);else if(e instanceof Sn){for(const n of e.args)if(t=mi(n),t)break}else(e instanceof tn||e instanceof wn)&&e.input instanceof It&&"zoom"===e.input.name&&(t=e);return t instanceof qe||e.eachChild(e=>{const n=mi(e);n instanceof qe?t=n:!t&&n?t=new qe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new qe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function gi(e){const t=e.key,n=e.value,i=e.valueSpec||{},r=e.objectElementValidators||{},o=e.style,s=e.styleSpec;let a=[];const l=Jn(n);if("object"!==l)return[new Be(t,n,`object expected, ${l} found`)];for(const c in n){const e=c.split(".")[0],l=i[e]||i["*"];let u;if(r[e])u=r[e];else if(i[e])u=Gi;else if(r["*"])u=r["*"];else{if(!i["*"]){a.push(new Be(t,n[c],`unknown property "${c}"`));continue}u=Gi}a=a.concat(u({key:(t?t+".":t)+c,value:n[c],valueSpec:l,style:o,styleSpec:s,object:n,objectKey:c},n))}for(const c in i)r[c]||i[c].required&&void 0===i[c].default&&void 0===n[c]&&a.push(new Be(t,n,`missing required property "${c}"`));return a}function yi(e){const t=e.value,n=e.valueSpec,i=e.style,r=e.styleSpec,o=e.key,s=e.arrayElementValidator||Gi;if("array"!==Jn(t))return[new Be(o,t,`array expected, ${Jn(t)} found`)];if(n.length&&t.length!==n.length)return[new Be(o,t,`array length ${n.length} expected, length ${t.length} found`)];if(n["min-length"]&&t.length<n["min-length"])return[new Be(o,t,`array length at least ${n["min-length"]} expected, length ${t.length} found`)];let a={type:n.value,values:n.values,minimum:n.minimum,maximum:n.maximum};r.$version<7&&(a.function=n.function),"object"===Jn(n.value)&&(a=n.value);let l=[];for(let c=0;c<t.length;c++)l=l.concat(s({array:t,arrayIndex:c,value:t[c],valueSpec:a,style:i,styleSpec:r,key:`${o}[${c}]`}));return l}function vi(e){const t=e.key,n=e.value,i=e.valueSpec;let r=Jn(n);if("number"===r&&n!=n&&(r="NaN"),"number"!==r)return[new Be(t,n,`number expected, ${r} found`)];if("minimum"in i){let r=i.minimum;if("array"===Jn(i.minimum)&&(r=i.minimum[e.arrayIndex]),n<r)return[new Be(t,n,`${n} is less than the minimum value ${r}`)]}if("maximum"in i){let r=i.maximum;if("array"===Jn(i.maximum)&&(r=i.maximum[e.arrayIndex]),n>r)return[new Be(t,n,`${n} is greater than the maximum value ${r}`)]}return[]}function _i(e){const t=e.valueSpec,n=$e(e.value.type);let i,r,o,s={};const a="categorical"!==n&&void 0===e.value.property,l=!a,c="array"===Jn(e.value.stops)&&"array"===Jn(e.value.stops[0])&&"object"===Jn(e.value.stops[0][0]),u=gi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===n)return[new Be(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const i=e.value;return t=t.concat(yi({key:e.key,value:i,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Jn(i)&&0===i.length&&t.push(new Be(e.key,i,"array must have at least one stop")),t},default:function(e){return Gi({key:e.key,value:e.value,valueSpec:t,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===n&&a&&u.push(new Be(e.key,e.value,'missing required property "property"')),"identity"===n||e.value.stops||u.push(new Be(e.key,e.value,'missing required property "stops"')),"exponential"===n&&e.valueSpec.expression&&!Kn(e.valueSpec)&&u.push(new Be(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Yn(e.valueSpec)?u.push(new Be(e.key,e.value,"property functions not supported")):a&&!Qn(e.valueSpec)&&u.push(new Be(e.key,e.value,"zoom functions not supported"))),"categorical"!==n&&!c||void 0!==e.value.property||u.push(new Be(e.key,e.value,'"property" property is required')),u;function h(e){let n=[];const i=e.value,a=e.key;if("array"!==Jn(i))return[new Be(a,i,`array expected, ${Jn(i)} found`)];if(2!==i.length)return[new Be(a,i,`array length 2 expected, length ${i.length} found`)];if(c){if("object"!==Jn(i[0]))return[new Be(a,i,`object expected, ${Jn(i[0])} found`)];if(void 0===i[0].zoom)return[new Be(a,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new Be(a,i,"object stop key must have value")];if(o&&o>$e(i[0].zoom))return[new Be(a,i[0].zoom,"stop zoom values must appear in ascending order")];$e(i[0].zoom)!==o&&(o=$e(i[0].zoom),r=void 0,s={}),n=n.concat(gi({key:a+"[0]",value:i[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:vi,value:d}}))}else n=n.concat(d({key:a+"[0]",value:i[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},i));return ci(Ue(i[1]))?n.concat([new Be(a+"[1]",i[1],"expressions are not allowed in function stops.")]):n.concat(Gi({key:a+"[1]",value:i[1],valueSpec:t,style:e.style,styleSpec:e.styleSpec}))}function d(e,o){const a=Jn(e.value),l=$e(e.value),c=null!==e.value?e.value:o;if(i){if(a!==i)return[new Be(e.key,c,`${a} stop domain type must match previous stop domain type ${i}`)]}else i=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new Be(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==n){let i=`number expected, ${a} found`;return Yn(t)&&void 0===n&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(e.key,c,i)]}return"categorical"!==n||"number"!==a||isFinite(l)&&Math.floor(l)===l?"categorical"!==n&&"number"===a&&void 0!==r&&l<r?[new Be(e.key,c,"stop domain values must appear in ascending order")]:(r=l,"categorical"===n&&l in s?[new Be(e.key,c,"stop domain values must be unique")]:(s[l]=!0,[])):[new Be(e.key,c,"integer expected, found "+l)]}}function xi(e){const t=("property"===e.expressionContext?pi:ui)(Ue(e.value),e.valueSpec);if("error"===t.result)return t.value.map(t=>new Be(`${e.key}${t.key}`,e.value,t.message));const n=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!n.outputDefined())return[new Be(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!Xt(n))return[new Be(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!Xt(n))return[new Be(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!Yt(n,["zoom","feature-state"]))return[new Be(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!Zt(n))return[new Be(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function bi(e){const t=e.key,n=e.value,i=e.valueSpec,r=[];return Array.isArray(i.values)?-1===i.values.indexOf($e(n))&&r.push(new Be(t,n,`expected one of [${i.values.join(", ")}], ${JSON.stringify(n)} found`)):-1===Object.keys(i.values).indexOf($e(n))&&r.push(new Be(t,n,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(n)} found`)),r}function wi(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!wi(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}const Ti={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Si(e){if(null==e)return{filter:()=>!0,needGeometry:!1};wi(e)||(e=Ci(e));const t=ui(e,Ti);if("error"===t.result)throw new Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,n,i)=>t.value.evaluate(e,n,{},i),needGeometry:ki(e)}}function Ei(e,t){return e<t?-1:e>t?1:0}function ki(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t<e.length;t++)if(ki(e[t]))return!0;return!1}function Ci(e){if(!e)return!0;const t=e[0];return e.length<=1?"any"!==t:"=="===t?Ai(e[1],e[2],"=="):"!="===t?Pi(Ai(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?Ai(e[1],e[2],t):"any"===t?(n=e.slice(1),["any"].concat(n.map(Ci))):"all"===t?["all"].concat(e.slice(1).map(Ci)):"none"===t?["all"].concat(e.slice(1).map(Ci).map(Pi)):"in"===t?Ii(e[1],e.slice(2)):"!in"===t?Pi(Ii(e[1],e.slice(2))):"has"===t?Mi(e[1]):"!has"===t?Pi(Mi(e[1])):"within"!==t||e;var n}function Ai(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function Ii(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(Ei)]]:["filter-in-small",e,["literal",t]]}}function Mi(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Pi(e){return["!",e]}function Di(e){return wi(Ue(e.value))?xi(Ve({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Li(e)}function Li(e){const t=e.value,n=e.key;if("array"!==Jn(t))return[new Be(n,t,`array expected, ${Jn(t)} found`)];const i=e.styleSpec;let r,o=[];if(t.length<1)return[new Be(n,t,"filter array must have at least 1 element")];switch(o=o.concat(bi({key:n+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),$e(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===$e(t[1])&&o.push(new Be(n,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&o.push(new Be(n,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(r=Jn(t[1]),"string"!==r&&o.push(new Be(n+"[1]",t[1],`string expected, ${r} found`)));for(let s=2;s<t.length;s++)r=Jn(t[s]),"$type"===$e(t[1])?o=o.concat(bi({key:`${n}[${s}]`,value:t[s],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&o.push(new Be(`${n}[${s}]`,t[s],`string, number, or boolean expected, ${r} found`));break;case"any":case"all":case"none":for(let i=1;i<t.length;i++)o=o.concat(Li({key:`${n}[${i}]`,value:t[i],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=Jn(t[1]),2!==t.length?o.push(new Be(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):"string"!==r&&o.push(new Be(n+"[1]",t[1],`string expected, ${r} found`));break;case"within":r=Jn(t[1]),2!==t.length?o.push(new Be(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):"object"!==r&&o.push(new Be(n+"[1]",t[1],`object expected, ${r} found`))}return o}function Oi(e,t){const n=e.key,i=e.style,r=e.styleSpec,o=e.value,s=e.objectKey,a=r[`${t}_${e.layerType}`];if(!a)return[];const l=s.match(/^(.*)-transition$/);if("paint"===t&&l&&a[l[1]]&&a[l[1]].transition)return Gi({key:n,value:o,valueSpec:r.transition,style:i,styleSpec:r});const c=e.valueSpec||a[s];if(!c)return[new Be(n,o,`unknown property "${s}"`)];let u;if("string"===Jn(o)&&Yn(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Be(n,o,`"${s}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(u[1])} }\`.`)];const h=[];return"symbol"===e.layerType&&("text-field"===s&&i&&!i.glyphs&&h.push(new Be(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===s&&ei(Ue(o))&&"identity"===$e(o.type)&&h.push(new Be(n,o,'"text-font" does not support identity functions'))),h.concat(Gi({key:e.key,value:o,valueSpec:c,style:i,styleSpec:r,expressionContext:"property",propertyType:t,propertyKey:s}))}function zi(e){return Oi(e,"paint")}function Ri(e){return Oi(e,"layout")}function Fi(e){let t=[];const n=e.value,i=e.key,r=e.style,o=e.styleSpec;n.type||n.ref||t.push(new Be(i,n,'either "type" or "ref" is required'));let s=$e(n.type);const a=$e(n.ref);if(n.id){const o=$e(n.id);for(let s=0;s<e.arrayIndex;s++){const e=r.layers[s];$e(e.id)===o&&t.push(new Be(i,n.id,`duplicate layer id "${n.id}", previously used at line ${e.id.__line__}`))}}if("ref"in n){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in n&&t.push(new Be(i,n[e],`"${e}" is prohibited for ref layers`))}),r.layers.forEach(t=>{$e(t.id)===a&&(e=t)}),e?e.ref?t.push(new Be(i,n.ref,"ref cannot reference another ref layer")):s=$e(e.type):t.push(new Be(i,n.ref,`ref layer "${a}" not found`))}else if("background"!==s&&"sky"!==s)if(n.source){const e=r.sources&&r.sources[n.source],o=e&&$e(e.type);e?"vector"===o&&"raster"===s?t.push(new Be(i,n.source,`layer "${n.id}" requires a raster source`)):"raster"===o&&"raster"!==s?t.push(new Be(i,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==o||n["source-layer"]?"raster-dem"===o&&"hillshade"!==s?t.push(new Be(i,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===o&&e.lineMetrics||t.push(new Be(i,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Be(i,n,`layer "${n.id}" must specify a "source-layer"`)):t.push(new Be(i,n.source,`source "${n.source}" not found`))}else t.push(new Be(i,n,'missing required property "source"'));return t=t.concat(gi({key:i,value:n,valueSpec:o.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Gi({key:i+".type",value:n.type,valueSpec:o.layer.type,style:e.style,styleSpec:e.styleSpec,object:n,objectKey:"type"}),filter:Di,layout:e=>gi({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>Ri(Ve({layerType:s},e))}}),paint:e=>gi({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>zi(Ve({layerType:s},e))}})}})),t}function Ni(e){const t=e.value,n=e.key,i=Jn(t);return"string"!==i?[new Be(n,t,`string expected, ${i} found`)]:[]}const Bi={promoteId:function({key:e,value:t}){if("string"===Jn(t))return Ni({key:e,value:t});{const n=[];for(const i in t)n.push(...Ni({key:`${e}.${i}`,value:t[i]}));return n}}};function ji(e){const t=e.value,n=e.key,i=e.styleSpec,r=e.style;if(!t.type)return[new Be(n,t,'"type" is required')];const o=$e(t.type);let s;switch(o){case"vector":case"raster":case"raster-dem":return s=gi({key:n,value:t,valueSpec:i["source_"+o.replace("-","_")],style:e.style,styleSpec:i,objectElementValidators:Bi}),s;case"geojson":if(s=gi({key:n,value:t,valueSpec:i.source_geojson,style:r,styleSpec:i,objectElementValidators:Bi}),t.cluster)for(const e in t.clusterProperties){const[i,r]=t.clusterProperties[e],o="string"==typeof i?[i,["accumulated"],["get",e]]:i;s.push(...xi({key:`${n}.${e}.map`,value:r,expressionContext:"cluster-map"})),s.push(...xi({key:`${n}.${e}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return s;case"video":return gi({key:n,value:t,valueSpec:i.source_video,style:r,styleSpec:i});case"image":return gi({key:n,value:t,valueSpec:i.source_image,style:r,styleSpec:i});case"canvas":return[new Be(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return bi({key:n+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:r,styleSpec:i})}}function Vi(e){const t=e.value,n=e.styleSpec,i=n.light,r=e.style;let o=[];const s=Jn(t);if(void 0===t)return o;if("object"!==s)return o=o.concat([new Be("light",t,`object expected, ${s} found`)]),o;for(const a in t){const e=a.match(/^(.*)-transition$/);o=o.concat(e&&i[e[1]]&&i[e[1]].transition?Gi({key:a,value:t[a],valueSpec:n.transition,style:r,styleSpec:n}):i[a]?Gi({key:a,value:t[a],valueSpec:i[a],style:r,styleSpec:n}):[new Be(a,t[a],`unknown property "${a}"`)])}return o}function $i(e){const t=e.value,n=e.key,i=e.style,r=e.styleSpec,o=r.terrain;let s=[];const a=Jn(t);if(void 0===t)return s;if("object"!==a)return s=s.concat([new Be("terrain",t,`object expected, ${a} found`)]),s;for(const l in t){const e=l.match(/^(.*)-transition$/);s=s.concat(e&&o[e[1]]&&o[e[1]].transition?Gi({key:l,value:t[l],valueSpec:r.transition,style:i,styleSpec:r}):o[l]?Gi({key:l,value:t[l],valueSpec:o[l],style:i,styleSpec:r}):[new Be(l,t[l],`unknown property "${l}"`)])}if(t.source){const e=i.sources&&i.sources[t.source],r=e&&$e(e.type);e?"raster-dem"!==r&&s.push(new Be(n,t.source,`terrain cannot be used with a source of type ${r}, it only be used with a "raster-dem" source type`)):s.push(new Be(n,t.source,`source "${t.source}" not found`))}else s.push(new Be(n,t,'terrain is missing required property "source"'));return s}function Ui(e){const t=e.value,n=e.style,i=e.styleSpec,r=i.fog;let o=[];const s=Jn(t);if(void 0===t)return o;if("object"!==s)return o=o.concat([new Be("fog",t,`object expected, ${s} found`)]),o;for(const a in t){const e=a.match(/^(.*)-transition$/);o=o.concat(e&&r[e[1]]&&r[e[1]].transition?Gi({key:a,value:t[a],valueSpec:i.transition,style:n,styleSpec:i}):r[a]?Gi({key:a,value:t[a],valueSpec:r[a],style:n,styleSpec:i}):[new Be(a,t[a],`unknown property "${a}"`)])}return o}const qi={"*":()=>[],array:yi,boolean:function(e){const t=e.value,n=e.key,i=Jn(t);return"boolean"!==i?[new Be(n,t,`boolean expected, ${i} found`)]:[]},number:vi,color:function(e){const t=e.key,n=e.value,i=Jn(n);return"string"!==i?[new Be(t,n,`color expected, ${i} found`)]:null===ct.parseCSSColor(n)?[new Be(t,n,`color expected, "${n}" found`)]:[]},constants:je,enum:bi,filter:Di,function:_i,layer:Fi,object:gi,source:ji,light:Vi,terrain:$i,fog:Ui,string:Ni,formatted:function(e){return 0===Ni(e).length?[]:xi(e)},resolvedImage:function(e){return 0===Ni(e).length?[]:xi(e)}};function Gi(e){const t=e.value,n=e.valueSpec,i=e.styleSpec;return n.expression&&ei($e(t))?_i(e):n.expression&&ci(Ue(t))?xi(e):n.type&&qi[n.type]?qi[n.type](e):gi(Ve({},e,{valueSpec:n.type?i[n.type]:n}))}function Hi(e){const t=e.value,n=e.key,i=Ni(e);return i.length||(-1===t.indexOf("{fontstack}")&&i.push(new Be(n,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&i.push(new Be(n,t,'"glyphs" url must include a "{range}" token'))),i}function Wi(e,t=Ne){let n=[];return n=n.concat(Gi({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Hi,"*":()=>[]}})),e.constants&&(n=n.concat(je({key:"constants",value:e.constants,style:e,styleSpec:t}))),Zi(n)}function Zi(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function Xi(e){return function(...t){return Zi(e.apply(this,t))}}Wi.source=Xi(ji),Wi.light=Xi(Vi),Wi.terrain=Xi($i),Wi.fog=Xi(Ui),Wi.layer=Xi(Fi),Wi.filter=Xi(Di),Wi.paintProperty=Xi(zi),Wi.layoutProperty=Xi(Ri);const Yi=Wi,Qi=Yi.light,Ki=Yi.fog,Ji=Yi.paintProperty,er=Yi.layoutProperty;function tr(e,t){let n=!1;if(t&&t.length)for(const i of t)e.fire(new Re(new Error(i.message))),n=!0;return n}var nr=ir;function ir(e,t,n){var i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],this.d=(t=r[1])+2*(n=r[2]);for(var o=0;o<this.d*this.d;o++){var s=r[3+o],a=r[3+o+1];i.push(s===a?null:r.subarray(s,a))}var l=r[3+i.length+1];this.keys=r.subarray(r[3+i.length],l),this.bboxes=r.subarray(l),this.insert=this._insertReadonly}else{this.d=t+2*n;for(var c=0;c<this.d*this.d;c++)i.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=n,this.scale=t/e,this.uid=0;var u=n/t*e;this.min=-u,this.max=e+u}ir.prototype.insert=function(e,t,n,i,r){this._forEachCell(t,n,i,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)},ir.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ir.prototype._insertCell=function(e,t,n,i,r,o){this.cells[r].push(o)},ir.prototype.query=function(e,t,n,i,r){var o=this.min,s=this.max;if(e<=o&&t<=o&&s<=n&&s<=i&&!r)return Array.prototype.slice.call(this.keys);var a=[];return this._forEachCell(e,t,n,i,this._queryCell,a,{},r),a},ir.prototype._queryCell=function(e,t,n,i,r,o,s,a){var l=this.cells[r];if(null!==l)for(var c=this.keys,u=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===s[d]){var p=4*d;(a?a(u[p+0],u[p+1],u[p+2],u[p+3]):e<=u[p+2]&&t<=u[p+3]&&n>=u[p+0]&&i>=u[p+1])?(s[d]=!0,o.push(c[d])):s[d]=!1}}},ir.prototype._forEachCell=function(e,t,n,i,r,o,s,a){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(n),h=this._convertToCellCoord(i),d=l;d<=u;d++)for(var p=c;p<=h;p++){var f=this.d*p+d;if((!a||a(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&r.call(this,e,t,n,i,f,o,s,a))return}},ir.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},ir.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},ir.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var r=new Int32Array(t+n+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,s=0;s<e.length;s++){var a=e[s];r[3+s]=o,r.set(a,o),o+=a.length}return r[3+e.length]=o,r.set(this.keys,o),r[3+e.length+1]=o+=this.keys.length,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer};const{ImageData:rr,ImageBitmap:or}=s,sr={};function ar(e,t,n={}){Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),sr[e]={klass:t,omit:n.omit||[],shallow:n.shallow||[]}}ar("Object",Object),nr.serialize=function(e,t){const n=e.toArrayBuffer();return t&&t.push(n),{buffer:n}},nr.deserialize=function(e){return new nr(e.buffer)},ar("Grid",nr),ar("Color",ut),ar("Error",Error),ar("ResolvedImage",ft),ar("StylePropertyFunction",fi),ar("StyleExpression",li,{omit:["_evaluator"]}),ar("ZoomDependentExpression",di),ar("ZoomConstantExpression",hi),ar("CompoundExpression",It,{omit:["_evaluate"]});for(const Id in Un)Un[Id]._classRegistryKey||ar("Expression_"+Id,Un[Id]);function lr(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function cr(e){return or&&e instanceof or}function ur(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(lr(e)||cr(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){const n=e;return t&&t.push(n.buffer),n}if(e instanceof rr)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){const n=[];for(const i of e)n.push(ur(i,t));return n}if("object"==typeof e){const n=e.constructor,i=n._classRegistryKey;if(!i)throw new Error("can't serialize object of unregistered class");const r=n.serialize?n.serialize(e,t):{};if(!n.serialize){for(const n in e){if(!e.hasOwnProperty(n))continue;if(sr[i].omit.indexOf(n)>=0)continue;const o=e[n];r[n]=sr[i].shallow.indexOf(n)>=0?o:ur(o,t)}e instanceof Error&&(r.message=e.message)}if(r.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==i&&(r.$name=i),r}throw new Error("can't serialize object of type "+typeof e)}function hr(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||lr(e)||cr(e)||ArrayBuffer.isView(e)||e instanceof rr)return e;if(Array.isArray(e))return e.map(hr);if("object"==typeof e){const t=e.$name||"Object",{klass:n}=sr[t];if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);const i=Object.create(n.prototype);for(const r of Object.keys(e)){if("$name"===r)continue;const n=e[r];i[r]=sr[t].shallow.indexOf(r)>=0?n:hr(n)}return i}throw new Error("can't deserialize object of type "+typeof e)}class dr{constructor(){this.first=!0}update(e,t){const n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=n,!0))}}const pr=e=>e>=1536&&e<=1791,fr=e=>e>=1872&&e<=1919,mr=e=>e>=2208&&e<=2303,gr=e=>e>=11904&&e<=12031,yr=e=>e>=12032&&e<=12255,vr=e=>e>=12272&&e<=12287,_r=e=>e>=12288&&e<=12351,xr=e=>e>=12352&&e<=12447,br=e=>e>=12448&&e<=12543,wr=e=>e>=12544&&e<=12591,Tr=e=>e>=12704&&e<=12735,Sr=e=>e>=12736&&e<=12783,Er=e=>e>=12784&&e<=12799,kr=e=>e>=12800&&e<=13055,Cr=e=>e>=13056&&e<=13311,Ar=e=>e>=13312&&e<=19903,Ir=e=>e>=19968&&e<=40959,Mr=e=>e>=40960&&e<=42127,Pr=e=>e>=42128&&e<=42191,Dr=e=>e>=44032&&e<=55215,Lr=e=>e>=63744&&e<=64255,Or=e=>e>=64336&&e<=65023,zr=e=>e>=65040&&e<=65055,Rr=e=>e>=65072&&e<=65103,Fr=e=>e>=65104&&e<=65135,Nr=e=>e>=65136&&e<=65279,Br=e=>e>=65280&&e<=65519;function jr(e){for(const t of e)if(Ur(t.charCodeAt(0)))return!0;return!1}function Vr(e){for(const t of e)if(!$r(t.charCodeAt(0)))return!1;return!0}function $r(e){return!(pr(e)||fr(e)||mr(e)||Or(e)||Nr(e))}function Ur(e){return!(746!==e&&747!==e&&(e<4352||!(Tr(e)||wr(e)||Rr(e)&&!(e>=65097&&e<=65103)||Lr(e)||Cr(e)||gr(e)||Sr(e)||!(!_r(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Ar(e)||Ir(e)||kr(e)||(e=>e>=12592&&e<=12687)(e)||(e=>e>=43360&&e<=43391)(e)||(e=>e>=55216&&e<=55295)(e)||(e=>e>=4352&&e<=4607)(e)||Dr(e)||xr(e)||vr(e)||(e=>e>=12688&&e<=12703)(e)||yr(e)||Er(e)||br(e)&&12540!==e||!(!Br(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Fr(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(e=>e>=5120&&e<=5759)(e)||(e=>e>=6320&&e<=6399)(e)||zr(e)||(e=>e>=19904&&e<=19967)(e)||Mr(e)||Pr(e))))}function qr(e){return!(Ur(e)||function(e){return!!((e=>e>=128&&e<=255)(e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||(e=>e>=8192&&e<=8303)(e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||(e=>e>=8448&&e<=8527)(e)||(e=>e>=8528&&e<=8591)(e)||(e=>e>=8960&&e<=9215)(e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||(e=>e>=9216&&e<=9279)(e)&&9251!==e||(e=>e>=9280&&e<=9311)(e)||(e=>e>=9312&&e<=9471)(e)||(e=>e>=9632&&e<=9727)(e)||(e=>e>=9728&&e<=9983)(e)&&!(e>=9754&&e<=9759)||(e=>e>=11008&&e<=11263)(e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||_r(e)||br(e)||(e=>e>=57344&&e<=63743)(e)||Rr(e)||Fr(e)||Br(e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Gr(e){return e>=1424&&e<=2303||Or(e)||Nr(e)}function Hr(e,t){return!(!t&&Gr(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||(e=>e>=6016&&e<=6143)(e))}function Wr(e){for(const t of e)if(Gr(t.charCodeAt(0)))return!0;return!1}const Zr="deferred",Xr="loading",Yr="loaded";let Qr=null,Kr="unavailable",Jr=null;const eo=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(Kr="error"),Qr&&Qr(e)};function to(){no.fire(new ze("pluginStateChange",{pluginStatus:Kr,pluginURL:Jr}))}const no=new Fe,io=function(){return Kr},ro=function(){if(Kr!==Zr||!Jr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Kr=Xr,to(),Jr&&Ee({url:Jr},e=>{e?eo(e):(Kr=Yr,to())})},oo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Kr===Yr||null!=oo.applyArabicShaping,isLoading:()=>Kr===Xr,setState(e){Kr=e.pluginStatus,Jr=e.pluginURL},isParsed:()=>null!=oo.applyArabicShaping&&null!=oo.processBidirectionalText&&null!=oo.processStyledBidirectionalText,getPluginURL:()=>Jr};class so{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new dr,this.transition={})}isSupportedScript(e){return function(e,t){for(const n of e)if(!Hr(n.charCodeAt(0),t))return!1;return!0}(e,oo.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,t=e-Math.floor(e),n=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}}}class ao{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(ei(e))return new fi(e,t);if(ci(e)){const n=pi(e,t);if("error"===n.result)throw new Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));return n.value}{let n=e;return"string"==typeof e&&"color"===t.type&&(n=ut.parse(e)),{kind:"constant",evaluate:()=>n}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)}}class lo{constructor(e){this.property=e,this.value=new ao(e,void 0)}transitioned(e,t){return new uo(this.property,this.value,t,_({},e.transition,this.transition),e.now)}untransitioned(){return new uo(this.property,this.value,null,{},0)}}class co{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return I(this._values[e].value.value)}setValue(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new lo(this._values[e].property)),this._values[e].value=new ao(this._values[e].property,null===t?void 0:I(t))}getTransition(e){return I(this._values[e].transition)}setTransition(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new lo(this._values[e].property)),this._values[e].transition=I(t)||void 0}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n);const i=this.getTransition(t);void 0!==i&&(e[t+"-transition"]=i)}return e}transitioned(e,t){const n=new ho(this._properties);for(const i of Object.keys(this._values))n._values[i]=this._values[i].transitioned(e,t._values[i]);return n}untransitioned(){const e=new ho(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class uo{constructor(e,t,n,i,r){const o=i.delay||0,s=i.duration||0;r=r||0,this.property=e,this.value=t,this.begin=r+o,this.end=this.begin+s,e.specification.transition&&(i.delay||i.duration)&&(this.prior=n)}possiblyEvaluate(e,t,n){const i=e.now||0,r=this.value.possiblyEvaluate(e,t,n),o=this.prior;if(o){if(i>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(i<this.begin)return o.possiblyEvaluate(e,t,n);{const s=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(e,t,n),r,d(s))}}return r}}class ho{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,n){const i=new mo(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].possiblyEvaluate(e,t,n);return i}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class po{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}getValue(e){return I(this._values[e].value)}setValue(e,t){this._values[e]=new ao(this._values[e].property,null===t?void 0:I(t))}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n)}return e}possiblyEvaluate(e,t,n){const i=new mo(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].possiblyEvaluate(e,t,n);return i}}class fo{constructor(e,t,n){this.property=e,this.value=t,this.parameters=n}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,n,i){return this.property.evaluate(this.value,this.parameters,e,t,n,i)}}class mo{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class go{constructor(e){this.specification=e}possiblyEvaluate(e,t){return e.expression.evaluate(t)}interpolate(e,t,n){const i=rn[this.specification.type];return i?i(e,t,n):e}}class yo{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,n,i){return new fo(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},n,i)}:e.expression,t)}interpolate(e,t,n){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new fo(this,{kind:"constant",value:void 0},e.parameters);const i=rn[this.specification.type];return i?new fo(this,{kind:"constant",value:i(e.value.value,t.value.value,n)},e.parameters):e}evaluate(e,t,n,i,r,o){return"constant"===e.kind?e.value:e.evaluate(t,n,i,r,o)}}class vo extends yo{possiblyEvaluate(e,t,n,i){if(void 0===e.value)return new fo(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){const r=e.expression.evaluate(t,null,{},n,i),o="resolvedImage"===e.property.specification.type&&"string"!=typeof r?r.name:r,s=this._calculate(o,o,o,t);return new fo(this,{kind:"constant",value:s},t)}if("camera"===e.expression.kind){const n=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new fo(this,{kind:"constant",value:n},t)}return new fo(this,e.expression,t)}evaluate(e,t,n,i,r,o){if("source"===e.kind){const s=e.evaluate(t,n,i,r,o);return this._calculate(s,s,s,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},n,i),e.evaluate({zoom:Math.floor(t.zoom)},n,i),e.evaluate({zoom:Math.floor(t.zoom)+1},n,i),t):e.value}_calculate(e,t,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t,other:n}:{from:n,to:t,other:e}}interpolate(e){return e}}class _o{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,i){if(void 0!==e.value){if("constant"===e.expression.kind){const r=e.expression.evaluate(t,null,{},n,i);return this._calculate(r,r,r,t)}return this._calculate(e.expression.evaluate(new so(Math.floor(t.zoom-1),t)),e.expression.evaluate(new so(Math.floor(t.zoom),t)),e.expression.evaluate(new so(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}}interpolate(e){return e}}class xo{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,i){return!!e.expression.evaluate(t,null,{},n,i)}interpolate(){return!1}}class bo{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const t in e){const n=e[t];n.specification.overridable&&this.overridableProperties.push(t);const i=this.defaultPropertyValues[t]=new ao(n,void 0),r=this.defaultTransitionablePropertyValues[t]=new lo(n);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}}function wo(e,t){return 256*(e=m(Math.floor(e),0,255))+m(Math.floor(t),0,255)}ar("DataDrivenProperty",yo),ar("DataConstantProperty",go),ar("CrossFadedDataDrivenProperty",vo),ar("CrossFadedProperty",_o),ar("ColorRampProperty",xo);const To={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class So{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Eo{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ko(e,t=1){let n=0,i=0;return{members:e.map(e=>{const r=To[e.type].BYTES_PER_ELEMENT,o=n=Co(n,Math.max(t,r)),s=e.components||1;return i=Math.max(i,r),n+=r*s,{name:e.name,type:e.type,components:s,offset:o}}),size:Co(n,Math.max(i,t)),alignment:t}}function Co(e,t){return Math.ceil(e/t)*t}class Ao extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const i=2*e;return this.int16[i+0]=t,this.int16[i+1]=n,e}}Ao.prototype.bytesPerElement=4,ar("StructArrayLayout2i4",Ao);class Io extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,i){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n,i)}emplace(e,t,n,i,r){const o=4*e;return this.int16[o+0]=t,this.int16[o+1]=n,this.int16[o+2]=i,this.int16[o+3]=r,e}}Io.prototype.bytesPerElement=8,ar("StructArrayLayout4i8",Io);class Mo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o,s){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,i,r,o,s)}emplace(e,t,n,i,r,o,s,a){const l=6*e,c=12*e,u=3*e;return this.int16[l+0]=t,this.int16[l+1]=n,this.uint8[c+4]=i,this.uint8[c+5]=r,this.uint8[c+6]=o,this.uint8[c+7]=s,this.float32[u+2]=a,e}}Mo.prototype.bytesPerElement=12,ar("StructArrayLayout2i4ub1f12",Mo);class Po extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const i=2*e;return this.float32[i+0]=t,this.float32[i+1]=n,e}}Po.prototype.bytesPerElement=8,ar("StructArrayLayout2f8",Po);class Do extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o,s,a,l,c){const u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,i,r,o,s,a,l,c)}emplace(e,t,n,i,r,o,s,a,l,c,u){const h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=n,this.uint16[h+2]=i,this.uint16[h+3]=r,this.uint16[h+4]=o,this.uint16[h+5]=s,this.uint16[h+6]=a,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}Do.prototype.bytesPerElement=20,ar("StructArrayLayout10ui20",Do);class Lo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o,s,a){const l=this.length;return this.resize(l+1),this.emplace(l,e,t,n,i,r,o,s,a)}emplace(e,t,n,i,r,o,s,a,l){const c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=n,this.uint16[c+2]=i,this.uint16[c+3]=r,this.uint16[c+4]=o,this.uint16[c+5]=s,this.uint16[c+6]=a,this.uint16[c+7]=l,e}}Lo.prototype.bytesPerElement=16,ar("StructArrayLayout8ui16",Lo);class Oo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o,s,a,l,c,u,h){const d=this.length;return this.resize(d+1),this.emplace(d,e,t,n,i,r,o,s,a,l,c,u,h)}emplace(e,t,n,i,r,o,s,a,l,c,u,h,d){const p=12*e;return this.int16[p+0]=t,this.int16[p+1]=n,this.int16[p+2]=i,this.int16[p+3]=r,this.uint16[p+4]=o,this.uint16[p+5]=s,this.uint16[p+6]=a,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=d,e}}Oo.prototype.bytesPerElement=24,ar("StructArrayLayout4i4ui4i24",Oo);class zo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n)}emplace(e,t,n,i){const r=3*e;return this.float32[r+0]=t,this.float32[r+1]=n,this.float32[r+2]=i,e}}zo.prototype.bytesPerElement=12,ar("StructArrayLayout3f12",zo);class Ro extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ro.prototype.bytesPerElement=4,ar("StructArrayLayout1ul4",Ro);class Fo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o,s,a,l,c){const u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,i,r,o,s,a,l,c)}emplace(e,t,n,i,r,o,s,a,l,c,u){const h=16*e,d=8*e;return this.int16[h+0]=t,this.int16[h+1]=n,this.float32[d+1]=i,this.float32[d+2]=r,this.float32[d+3]=o,this.float32[d+4]=s,this.int16[h+10]=a,this.uint32[d+6]=l,this.uint16[h+14]=c,this.uint16[h+15]=u,e}}Fo.prototype.bytesPerElement=32,ar("StructArrayLayout2i4f1i1ul2ui32",Fo);class No extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r,o){const s=this.length;return this.resize(s+1),this.emplace(s,e,t,n,i,r,o)}emplace(e,t,n,i,r,o,s){const a=6*e;return this.int16[a+0]=t,this.int16[a+1]=n,this.int16[a+2]=i,this.int16[a+3]=r,this.int16[a+4]=o,this.int16[a+5]=s,e}}No.prototype.bytesPerElement=12,ar("StructArrayLayout2i2i2i12",No);class Bo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,i,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,i,r)}emplace(e,t,n,i,r,o){const s=4*e,a=8*e;return this.float32[s+0]=t,this.float32[s+1]=n,this.float32[s+2]=i,this.int16[a+6]=r,this.int16[a+7]=o,e}}Bo.prototype.bytesPerElement=16,ar("StructArrayLayout2f1f2i16",Bo);class jo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,i){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n,i)}emplace(e,t,n,i,r){const o=12*e,s=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=n,this.float32[s+1]=i,this.float32[s+2]=r,e}}jo.prototype.bytesPerElement=12,ar("StructArrayLayout2ub2f12",jo);class Vo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n)}emplace(e,t,n,i){const r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,this.uint16[r+2]=i,e}}Vo.prototype.bytesPerElement=6,ar("StructArrayLayout3ui6",Vo);class $o extends Eo{_refreshViews(){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)}emplaceBack(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g){const y=this.length;return this.resize(y+1),this.emplace(y,e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g)}emplace(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y){const v=24*e,_=12*e,x=48*e;return this.int16[v+0]=t,this.int16[v+1]=n,this.uint16[v+2]=i,this.uint16[v+3]=r,this.uint32[_+2]=o,this.uint32[_+3]=s,this.uint32[_+4]=a,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[_+7]=h,this.float32[_+8]=d,this.uint8[x+36]=p,this.uint8[x+37]=f,this.uint8[x+38]=m,this.uint32[_+10]=g,this.int16[v+22]=y,e}}$o.prototype.bytesPerElement=48,ar("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$o);class Uo extends Eo{_refreshViews(){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)}emplaceBack(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x,b,w,T,S,E,k){const C=this.length;return this.resize(C+1),this.emplace(C,e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x,b,w,T,S,E,k)}emplace(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x,b,w,T,S,E,k,C){const A=32*e,I=16*e;return this.int16[A+0]=t,this.int16[A+1]=n,this.int16[A+2]=i,this.int16[A+3]=r,this.int16[A+4]=o,this.int16[A+5]=s,this.int16[A+6]=a,this.int16[A+7]=l,this.uint16[A+8]=c,this.uint16[A+9]=u,this.uint16[A+10]=h,this.uint16[A+11]=d,this.uint16[A+12]=p,this.uint16[A+13]=f,this.uint16[A+14]=m,this.uint16[A+15]=g,this.uint16[A+16]=y,this.uint16[A+17]=v,this.uint16[A+18]=_,this.uint16[A+19]=x,this.uint16[A+20]=b,this.uint16[A+21]=w,this.uint16[A+22]=T,this.uint32[I+12]=S,this.float32[I+13]=E,this.float32[I+14]=k,this.float32[I+15]=C,e}}Uo.prototype.bytesPerElement=64,ar("StructArrayLayout8i15ui1ul3f64",Uo);class qo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}qo.prototype.bytesPerElement=4,ar("StructArrayLayout1f4",qo);class Go extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n)}emplace(e,t,n,i){const r=3*e;return this.int16[r+0]=t,this.int16[r+1]=n,this.int16[r+2]=i,e}}Go.prototype.bytesPerElement=6,ar("StructArrayLayout3i6",Go);class Ho extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,i){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n,i)}emplace(e,t,n,i,r){const o=6*e;return this.uint32[3*e+0]=t,this.uint16[o+2]=n,this.uint16[o+3]=i,this.uint16[o+4]=r,e}}Ho.prototype.bytesPerElement=12,ar("StructArrayLayout1ul3ui12",Ho);class Wo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const i=2*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,e}}Wo.prototype.bytesPerElement=4,ar("StructArrayLayout2ui4",Wo);class Zo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}Zo.prototype.bytesPerElement=2,ar("StructArrayLayout1ui2",Zo);class Xo extends Eo{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,i){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n,i)}emplace(e,t,n,i,r){const o=4*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=i,this.float32[o+3]=r,e}}Xo.prototype.bytesPerElement=16,ar("StructArrayLayout4f16",Xo);class Yo extends So{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.float32[this._pos4+1]}get y1(){return this._structArray.float32[this._pos4+2]}get x2(){return this._structArray.float32[this._pos4+3]}get y2(){return this._structArray.float32[this._pos4+4]}get padding(){return this._structArray.int16[this._pos2+10]}get featureIndex(){return this._structArray.uint32[this._pos4+6]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+14]}get bucketIndex(){return this._structArray.uint16[this._pos2+15]}get anchorPoint(){return new r(this.anchorPointX,this.anchorPointY)}}Yo.prototype.size=32;class Qo extends Fo{get(e){return new Yo(this,e)}}ar("CollisionBoxArray",Qo);class Ko extends So{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ko.prototype.size=48;class Jo extends $o{get(e){return new Ko(this,e)}}ar("PlacedSymbolArray",Jo);class es extends So{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textOffset0(){return this._structArray.float32[this._pos4+13]}get textOffset1(){return this._structArray.float32[this._pos4+14]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+15]}}es.prototype.size=64;class ts extends Uo{get(e){return new es(this,e)}}ar("SymbolInstanceArray",ts);class ns extends qo{getoffsetX(e){return this.float32[1*e+0]}}ar("GlyphOffsetArray",ns);class is extends Go{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}ar("SymbolLineVertexArray",is);class rs extends So{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}rs.prototype.size=12;class os extends Ho{get(e){return new rs(this,e)}}ar("FeatureIndexArray",os);class ss extends So{get a_centroid_pos0(){return this._structArray.uint16[this._pos2+0]}get a_centroid_pos1(){return this._structArray.uint16[this._pos2+1]}}ss.prototype.size=4;class as extends Wo{get(e){return new ss(this,e)}}ar("FillExtrusionCentroidArray",as);const ls=ko([{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"}]),cs=ko([{name:"a_dash_to",components:4,type:"Uint16"},{name:"a_dash_from",components:4,type:"Uint16"}]);var us=lt((function(e){e.exports=function(e,t){var n,i,r,o,s,a,l,c;for(i=e.length-(n=3&e.length),r=t,s=3432918353,a=461845907,c=0;c<i;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}})),hs=lt((function(e){e.exports=function(e,t){for(var n,i=e.length,r=t^i,o=0;i>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0}})),ds=us,ps=hs;ds.murmur3=us,ds.murmur2=ps;class fs{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,n,i){this.ids.push(ms(e)),this.positions.push(t,n,i)}getPositions(e){const t=ms(e);let n=0,i=this.ids.length-1;for(;n<i;){const e=n+i>>1;this.ids[e]>=t?i=e:n=e+1}const r=[];for(;this.ids[n]===t;)r.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return r}static serialize(e,t){const n=new Float64Array(e.ids),i=new Uint32Array(e.positions);return gs(n,i,0,n.length-1),t&&t.push(n.buffer,i.buffer),{ids:n,positions:i}}static deserialize(e){const t=new fs;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function ms(e){const t=+e;return!isNaN(t)&&t<=a?t:ds(String(e))}function gs(e,t,n,i){for(;n<i;){const r=e[n+i>>1];let o=n-1,s=i+1;for(;;){do{o++}while(e[o]<r);do{s--}while(e[s]>r);if(o>=s)break;ys(e,o,s),ys(t,3*o,3*s),ys(t,3*o+1,3*s+1),ys(t,3*o+2,3*s+2)}s-n<i-s?(gs(e,t,n,s),n=s+1):(gs(e,t,s+1,i),i=s)}}function ys(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}ar("FeaturePositionMap",fs);class vs{constructor(e,t){this.gl=e.gl,this.location=t}}class _s extends vs{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}}class xs extends vs{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}}class bs extends vs{constructor(e,t){super(e,t),this.current=ut.transparent}set(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}}const ws=new Float32Array(16),Ts=new Float32Array(9);function Ss(e){return[wo(255*e.r,255*e.g),wo(255*e.b,255*e.a)]}class Es{constructor(e,t,n){this.value=e,this.uniformNames=t.map(e=>"u_"+e),this.type=n}setUniform(e,t,n){e.set(n.constantOr(this.value))}getBinding(e,t,n){return"color"===this.type?new bs(e,t):new _s(e,t)}}class ks{constructor(e,t){this.uniformNames=t.map(e=>"u_"+e),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tl.concat(t.br),this.patternTo=e.tl.concat(e.br)}setUniform(e,t,n,i){const r="u_pattern_to"===i||"u_dash_to"===i?this.patternTo:"u_pattern_from"===i||"u_dash_from"===i?this.patternFrom:"u_pixel_ratio_to"===i?this.pixelRatioTo:"u_pixel_ratio_from"===i?this.pixelRatioFrom:null;r&&e.set(r)}getBinding(e,t,n){return"u_pattern_from"===n||"u_pattern_to"===n||"u_dash_from"===n||"u_dash_to"===n?new xs(e,t):new _s(e,t)}}class Cs{constructor(e,t,n,i){this.expression=e,this.type=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===n?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,n,i,r){const o=this.paintVertexArray.length,s=this.expression.evaluate(new so(0),t,{},i,[],r);this.paintVertexArray.resize(e),this._setPaintValue(o,e,s)}updatePaintArray(e,t,n,i){const r=this.expression.evaluate({zoom:0},n,i);this._setPaintValue(e,t,r)}_setPaintValue(e,t,n){if("color"===this.type){const i=Ss(n);for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,i[0],i[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class As{constructor(e,t,n,i,r,o){this.expression=e,this.uniformNames=t.map(e=>`u_${e}_t`),this.type=n,this.useIntegerZoom=i,this.zoom=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===n?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,t,n,i,r){const o=this.expression.evaluate(new so(this.zoom),t,{},i,[],r),s=this.expression.evaluate(new so(this.zoom+1),t,{},i,[],r),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,o,s)}updatePaintArray(e,t,n,i){const r=this.expression.evaluate({zoom:this.zoom},n,i),o=this.expression.evaluate({zoom:this.zoom+1},n,i);this._setPaintValue(e,t,r,o)}_setPaintValue(e,t,n,i){if("color"===this.type){const r=Ss(n),o=Ss(i);for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r[0],r[1],o[0],o[1])}else{for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,n,i);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(i))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){const n=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,i=m(this.expression.interpolationFactor(n,this.zoom,this.zoom+1),0,1);e.set(i)}getBinding(e,t,n){return new _s(e,t)}}class Is{constructor(e,t,n,i,r,o,s){this.expression=e,this.type=n,this.useIntegerZoom=i,this.zoom=r,this.layerId=s,this.paintVertexAttributes=("array"===n?cs:ls).members;for(let a=0;a<t.length;++a);this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o}populatePaintArray(e,t,n){const i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(i,e,t.patterns&&t.patterns[this.layerId],n)}updatePaintArray(e,t,n,i,r){this._setPaintValues(e,t,n.patterns&&n.patterns[this.layerId],r)}_setPaintValues(e,t,n,i){if(!i||!n)return;const{min:r,mid:o,max:s}=n,a=i[r],l=i[o],c=i[s];if(a&&l&&c)for(let u=e;u<t;u++)this._setPaintValue(this.zoomInPaintVertexArray,u,l,a),this._setPaintValue(this.zoomOutPaintVertexArray,u,l,c)}_setPaintValue(e,t,n,i){e.emplace(t,n.tl[0],n.tl[1],n.br[0],n.br[1],i.tl[0],i.tl[1],i.br[0],i.br[1],n.pixelRatio,i.pixelRatio)}upload(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Ms{constructor(e,t,n=(()=>!0)){this.binders={},this._buffers=[];const i=[];for(const r in e.paint._values){if(!n(r))continue;const o=e.paint.get(r);if(!(o instanceof fo&&Yn(o.property.specification)))continue;const s=Ls(r,e.type),a=o.value,l=o.property.specification.type,c=o.property.useIntegerZoom,u=o.property.specification["property-type"],h="cross-faded"===u||"cross-faded-data-driven"===u,d="line-dasharray"===String(r)&&"constant"!==e.layout.get("line-cap").value.kind;if("constant"!==a.kind||d)if("source"===a.kind||d||h){const n=Rs(r,l,"source");this.binders[r]=h?new Is(a,s,l,c,t,n,e.id):new Cs(a,s,l,n),i.push("/a_"+r)}else{const e=Rs(r,l,"composite");this.binders[r]=new As(a,s,l,c,t,e),i.push("/z_"+r)}else this.binders[r]=h?new ks(a.value,s):new Es(a.value,s,l),i.push("/u_"+r)}this.cacheKey=i.sort().join("")}getMaxValue(e){const t=this.binders[e];return t instanceof Cs||t instanceof As?t.maxValue:0}populatePaintArrays(e,t,n,i,r){for(const o in this.binders){const s=this.binders[o];(s instanceof Cs||s instanceof As||s instanceof Is)&&s.populatePaintArray(e,t,n,i,r)}}setConstantPatternPositions(e,t){for(const n in this.binders){const i=this.binders[n];i instanceof ks&&i.setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,n,i,r){let o=!1;for(const s in e){const a=t.getPositions(s);for(const t of a){const a=n.feature(t.index);for(const n in this.binders){const l=this.binders[n];if((l instanceof Cs||l instanceof As||l instanceof Is)&&!0===l.expression.isStateDependent){const c=i.paint.get(n);l.expression=c.value,l.updatePaintArray(t.start,t.end,a,e[s],r),o=!0}}}}return o}defines(){const e=[];for(const t in this.binders){const n=this.binders[t];(n instanceof Es||n instanceof ks)&&e.push(...n.uniformNames.map(e=>"#define HAS_UNIFORM_"+e))}return e}getBinderAttributes(){const e=[];for(const t in this.binders){const n=this.binders[t];if(n instanceof Cs||n instanceof As||n instanceof Is)for(let t=0;t<n.paintVertexAttributes.length;t++)e.push(n.paintVertexAttributes[t].name)}return e}getBinderUniforms(){const e=[];for(const t in this.binders){const n=this.binders[t];if(n instanceof Es||n instanceof ks||n instanceof As)for(const t of n.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const n=[];for(const i in this.binders){const r=this.binders[i];if(r instanceof Es||r instanceof ks||r instanceof As)for(const o of r.uniformNames)if(t[o]){const s=r.getBinding(e,t[o],o);n.push({name:o,property:i,binding:s})}}return n}setUniforms(e,t,n,i){for(const{name:r,property:o,binding:s}of t)this.binders[o].setUniform(s,i,n.get(o),r)}updatePaintBuffers(e){this._buffers=[];for(const t in this.binders){const n=this.binders[t];if(e&&n instanceof Is){const t=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(n instanceof Cs||n instanceof As)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}}upload(e){for(const t in this.binders){const n=this.binders[t];(n instanceof Cs||n instanceof As||n instanceof Is)&&n.upload(e)}this.updatePaintBuffers()}destroy(){for(const e in this.binders){const t=this.binders[e];(t instanceof Cs||t instanceof As||t instanceof Is)&&t.destroy()}}}class Ps{constructor(e,t,n=(()=>!0)){this.programConfigurations={};for(const i of e)this.programConfigurations[i.id]=new Ms(i,t,n);this.needsUpload=!1,this._featureMap=new fs,this._bufferOffset=0}populatePaintArrays(e,t,n,i,r,o){for(const s in this.programConfigurations)this.programConfigurations[s].populatePaintArrays(e,t,i,r,o);void 0!==t.id&&this._featureMap.add(t.id,n,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,n,i){for(const r of n)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}const Ds={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"line-dasharray":["dash_to","dash_from"]};function Ls(e,t){return Ds[e]||[e.replace(t+"-","").replace(/-/g,"_")]}const Os={"line-pattern":{source:Do,composite:Do},"fill-pattern":{source:Do,composite:Do},"fill-extrusion-pattern":{source:Do,composite:Do},"line-dasharray":{source:Lo,composite:Lo}},zs={color:{source:Po,composite:Xo},number:{source:qo,composite:Po}};function Rs(e,t,n){const i=Os[e];return i&&i[n]||zs[t][n]}ar("ConstantBinder",Es),ar("CrossFadedConstantBinder",ks),ar("SourceExpressionBinder",Cs),ar("CrossFadedCompositeBinder",Is),ar("CompositeExpressionBinder",As),ar("ProgramConfiguration",Ms,{omit:["_buffers"]}),ar("ProgramConfigurationSet",Ps);const Fs="-transition";class Ns extends Fe{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&"sky"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new po(t.layout)),t.paint)){this._transitionablePaint=new co(t.paint);for(const t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(const t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new mo(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,n={}){null!=t&&this._validate(er,`layers.${this.id}.layout.${e}`,e,t,n)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return k(e,Fs)?this._transitionablePaint.getTransition(e.slice(0,-Fs.length)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,n={}){if(null!=t&&this._validate(Ji,`layers.${this.id}.paint.${e}`,e,t,n))return!1;if(k(e,Fs))return this._transitionablePaint.setTransition(e.slice(0,-Fs.length),t||void 0),!1;{const n=this._transitionablePaint._values[e],i="cross-faded-data-driven"===n.property.specification["property-type"],r=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);const s=this._transitionablePaint._values[e].value;return s.isDataDriven()||r||i||this._handleOverridablePaintPropertyUpdate(e,o,s)}}_handleSpecialPaintPropertyUpdate(e){}getProgramIds(){return null}getProgramConfiguration(e){return null}_handleOverridablePaintPropertyUpdate(e,t,n){return!1}isHidden(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){const e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),A(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,n,i,r={}){return(!r||!1!==r.validate)&&tr(this,e.call(Yi,{key:t,layerType:this.type,objectKey:n,value:i,styleSpec:Ne,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const t=this.paint.get(e);if(t instanceof fo&&Yn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}const Bs=ko([{name:"a_pos",components:2,type:"Int16"}],4),{members:js}=Bs;class Vs{constructor(e=[]){this.segments=e}prepareSegment(e,t,n,i){let r=this.segments[this.segments.length-1];return e>Vs.MAX_VERTEX_ARRAY_LENGTH&&P(`Max vertices per segment is ${Vs.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!r||r.vertexLength+e>Vs.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==i)&&(r={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==i&&(r.sortKey=i),this.segments.push(r)),r}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,n,i){return new Vs([{vertexOffset:e,primitiveOffset:t,vertexLength:n,primitiveLength:i,vaos:{},sortKey:0}])}}Vs.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ar("SegmentVector",Vs);var $s=8192;const Us=Math.pow(2,14)-1,qs=-Us-1;function Gs(e){const t=$s/e.extent,n=e.loadGeometry();for(let i=0;i<n.length;i++){const e=n[i];for(let n=0;n<e.length;n++){const i=e[n],r=Math.round(i.x*t),o=Math.round(i.y*t);i.x=m(r,qs,Us),i.y=m(o,qs,Us),(r<i.x||r>i.x+1||o<i.y||o>i.y+1)&&P("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return n}function Hs(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Gs(e):[]}}function Ws(e,t,n,i,r){e.emplaceBack(2*t+(i+1)/2,2*n+(r+1)/2)}class Zs{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Ao,this.indexArray=new Vo,this.segments=new Vs,this.programConfigurations=new Ps(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){const i=this.layers[0],r=[];let o=null;"circle"===i.type&&(o=i.layout.get("circle-sort-key"));for(const{feature:s,id:a,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,t=Hs(s,e);if(!this.layers[0]._featureFilter.filter(new so(this.zoom),t,n))continue;const i=o?o.evaluate(t,{},n):void 0,u={id:a,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:e?t.geometry:Gs(s),patterns:{},sortKey:i};r.push(u)}o&&r.sort((e,t)=>e.sortKey-t.sortKey);for(const s of r){const{geometry:i,index:r,sourceLayerIndex:o}=s,a=e[r].feature;this.addFeature(s,i,r,n),t.featureIndex.insert(a,i,r,o,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,js),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,n,i){for(const r of t)for(const t of r){const n=t.x,i=t.y;if(n<0||n>=$s||i<0||i>=$s)continue;const r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),o=r.vertexLength;Ws(this.layoutVertexArray,n,i,-1,-1),Ws(this.layoutVertexArray,n,i,1,-1),Ws(this.layoutVertexArray,n,i,1,1),Ws(this.layoutVertexArray,n,i,-1,1),this.indexArray.emplaceBack(o,o+1,o+2),this.indexArray.emplaceBack(o,o+3,o+2),r.vertexLength+=4,r.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},i)}}function Xs(e,t){for(let n=0;n<e.length;n++)if(ra(t,e[n]))return!0;for(let n=0;n<t.length;n++)if(ra(e,t[n]))return!0;return!!Js(e,t)}function Ys(e,t,n){return!!ra(e,t)||!!ta(t,e,n)}function Qs(e,t){if(1===e.length)return ia(t,e[0]);for(let n=0;n<t.length;n++){const i=t[n];for(let t=0;t<i.length;t++)if(ra(e,i[t]))return!0}for(let n=0;n<e.length;n++)if(ia(t,e[n]))return!0;for(let n=0;n<t.length;n++)if(Js(e,t[n]))return!0;return!1}function Ks(e,t,n){if(e.length>1){if(Js(e,t))return!0;for(let i=0;i<t.length;i++)if(ta(t[i],e,n))return!0}for(let i=0;i<e.length;i++)if(ta(e[i],t,n))return!0;return!1}function Js(e,t){if(0===e.length||0===t.length)return!1;for(let n=0;n<e.length-1;n++){const i=e[n],r=e[n+1];for(let e=0;e<t.length-1;e++)if(ea(i,r,t[e],t[e+1]))return!0}return!1}function ea(e,t,n,i){return D(e,n,i)!==D(t,n,i)&&D(e,t,n)!==D(e,t,i)}function ta(e,t,n){const i=n*n;if(1===t.length)return e.distSqr(t[0])<i;for(let r=1;r<t.length;r++)if(na(e,t[r-1],t[r])<i)return!0;return!1}function na(e,t,n){const i=t.distSqr(n);if(0===i)return e.distSqr(t);const r=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/i;return e.distSqr(r<0?t:r>1?n:n.sub(t)._mult(r)._add(t))}function ia(e,t){let n,i,r,o=!1;for(let s=0;s<e.length;s++){n=e[s];for(let e=0,s=n.length-1;e<n.length;s=e++)i=n[e],r=n[s],i.y>t.y!=r.y>t.y&&t.x<(r.x-i.x)*(t.y-i.y)/(r.y-i.y)+i.x&&(o=!o)}return o}function ra(e,t){let n=!1;for(let i=0,r=e.length-1;i<e.length;r=i++){const o=e[i],s=e[r];o.y>t.y!=s.y>t.y&&t.x<(s.x-o.x)*(t.y-o.y)/(s.y-o.y)+o.x&&(n=!n)}return n}function oa(e,t,n,i,o){for(const r of e)if(t<=r.x&&n<=r.y&&i>=r.x&&o>=r.y)return!0;const s=[new r(t,n),new r(t,o),new r(i,o),new r(i,n)];if(e.length>2)for(const r of s)if(ra(e,r))return!0;for(let r=0;r<e.length-1;r++)if(sa(e[r],e[r+1],s))return!0;return!1}function sa(e,t,n){const i=n[0],r=n[2];if(e.x<i.x&&t.x<i.x||e.x>r.x&&t.x>r.x||e.y<i.y&&t.y<i.y||e.y>r.y&&t.y>r.y)return!1;const o=D(e,t,n[0]);return o!==D(e,t,n[1])||o!==D(e,t,n[2])||o!==D(e,t,n[3])}function aa(e,t,n){const i=t.paint.get(e).value;return"constant"===i.kind?i.value:n.programConfigurations.get(t.id).getMaxValue(e)}function la(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ca(e,t,n,i,o){if(!t[0]&&!t[1])return e;const s=r.convert(t)._mult(o);"viewport"===n&&s._rotate(-i);const a=[];for(let r=0;r<e.length;r++)a.push(e[r].sub(s));return a}function ua(e,t,n,i){const o=r.convert(e)._mult(i);return"viewport"===t&&o._rotate(-n),o}ar("CircleBucket",Zs,{omit:["layers"]});const ha=new bo({"circle-sort-key":new yo(Ne.layout_circle["circle-sort-key"])});var da={paint:new bo({"circle-radius":new yo(Ne.paint_circle["circle-radius"]),"circle-color":new yo(Ne.paint_circle["circle-color"]),"circle-blur":new yo(Ne.paint_circle["circle-blur"]),"circle-opacity":new yo(Ne.paint_circle["circle-opacity"]),"circle-translate":new go(Ne.paint_circle["circle-translate"]),"circle-translate-anchor":new go(Ne.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new go(Ne.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new go(Ne.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new yo(Ne.paint_circle["circle-stroke-width"]),"circle-stroke-color":new yo(Ne.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new yo(Ne.paint_circle["circle-stroke-opacity"])}),layout:ha},pa="undefined"!=typeof Float32Array?Float32Array:Array;function fa(){var e=new pa(9);return pa!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ma(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ga(e,t,n){var i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],p=t[10],f=t[11],m=t[12],g=t[13],y=t[14],v=t[15],_=n[0],x=n[1],b=n[2],w=n[3];return e[0]=_*i+x*a+b*h+w*m,e[1]=_*r+x*l+b*d+w*g,e[2]=_*o+x*c+b*p+w*y,e[3]=_*s+x*u+b*f+w*v,e[4]=(_=n[4])*i+(x=n[5])*a+(b=n[6])*h+(w=n[7])*m,e[5]=_*r+x*l+b*d+w*g,e[6]=_*o+x*c+b*p+w*y,e[7]=_*s+x*u+b*f+w*v,e[8]=(_=n[8])*i+(x=n[9])*a+(b=n[10])*h+(w=n[11])*m,e[9]=_*r+x*l+b*d+w*g,e[10]=_*o+x*c+b*p+w*y,e[11]=_*s+x*u+b*f+w*v,e[12]=(_=n[12])*i+(x=n[13])*a+(b=n[14])*h+(w=n[15])*m,e[13]=_*r+x*l+b*d+w*g,e[14]=_*o+x*c+b*p+w*y,e[15]=_*s+x*u+b*f+w*v,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var ya=ga;function va(){var e=new pa(3);return pa!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _a(e){return Math.hypot(e[0],e[1],e[2])}function xa(e,t,n){var i=new pa(3);return i[0]=e,i[1]=t,i[2]=n,i}function ba(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function wa(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function Ta(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e}function Sa(e,t){var n=t[0],i=t[1],r=t[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function Ea(e,t,n){var i=n[0],r=n[1],o=n[2],s=t[0],a=t[1],l=t[2],c=r*l-o*a,u=o*s-i*l,h=i*a-r*s,d=r*h-o*u,p=o*c-i*h,f=i*u-r*c,m=2*n[3];return u*=m,h*=m,p*=2,f*=2,e[0]=s+(c*=m)+(d*=2),e[1]=a+u+p,e[2]=l+h+f,e}var ka,Ca=ba,Aa=wa,Ia=_a;function Ma(e,t,n){var i=t[0],r=t[1],o=t[2],s=t[3];return e[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*s,e[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*s,e[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*s,e[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*s,e}function Pa(){var e=new pa(4);return pa!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Da(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function La(e,t,n){n*=.5;var i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=i*l+s*a,e[1]=r*l+o*a,e[2]=o*l-r*a,e[3]=s*l-i*a,e}function Oa(e,t,n){const i=Ma([],[e.x,e.y,t,1],n);return new r(i[0]/i[3],i[1]/i[3])}va(),ka=new pa(4),pa!=Float32Array&&(ka[0]=0,ka[1]=0,ka[2]=0,ka[3]=0),va(),xa(1,0,0),xa(0,1,0),Pa(),Pa(),fa();const za=xa(0,0,0),Ra=xa(0,0,1);function Fa(e,t){const n=va();return za[2]=t,e.intersectsPlane(za,Ra,n),new r(n[0],n[1])}class Na extends Zs{}function Ba(e,{width:t,height:n},i,r){if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==t*n*i)throw new RangeError("mismatched image size")}else r=new Uint8Array(t*n*i);return e.width=t,e.height=n,e.data=r,e}function ja(e,{width:t,height:n},i){if(t===e.width&&n===e.height)return;const r=Ba({},{width:t,height:n},i);Va(e,r,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,n)},i),e.width=t,e.height=n,e.data=r.data}function Va(e,t,n,i,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||n.x>e.width-r.width||n.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||i.x>t.width-r.width||i.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");const s=e.data,a=t.data;for(let l=0;l<r.height;l++){const c=((n.y+l)*e.width+n.x)*o,u=((i.y+l)*t.width+i.x)*o;for(let e=0;e<r.width*o;e++)a[u+e]=s[c+e]}return t}ar("HeatmapBucket",Na,{omit:["layers"]});class $a{constructor(e,t){Ba(this,e,1,t)}resize(e){ja(this,e,1)}clone(){return new $a({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,n,i,r){Va(e,t,n,i,r,1)}}class Ua{constructor(e,t){Ba(this,e,4,t)}resize(e){ja(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new Ua({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,n,i,r){Va(e,t,n,i,r,4)}}ar("AlphaImage",$a),ar("RGBAImage",Ua);var qa={paint:new bo({"heatmap-radius":new yo(Ne.paint_heatmap["heatmap-radius"]),"heatmap-weight":new yo(Ne.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new go(Ne.paint_heatmap["heatmap-intensity"]),"heatmap-color":new xo(Ne.paint_heatmap["heatmap-color"]),"heatmap-opacity":new go(Ne.paint_heatmap["heatmap-opacity"])})};function Ga(e){const t={},n=e.resolution||256,i=e.clips?e.clips.length:1,r=e.image||new Ua({width:n,height:i}),o=(n,i,o)=>{t[e.evaluationKey]=o;const s=e.expression.evaluate(t);r.data[n+i+0]=Math.floor(255*s.r/s.a),r.data[n+i+1]=Math.floor(255*s.g/s.a),r.data[n+i+2]=Math.floor(255*s.b/s.a),r.data[n+i+3]=Math.floor(255*s.a)};if(e.clips)for(let s=0,a=0;s<i;++s,a+=4*n)for(let t=0,i=0;t<n;t++,i+=4){const r=t/(n-1),{start:l,end:c}=e.clips[s];o(a,i,l*(1-r)+c*r)}else for(let s=0,a=0;s<n;s++,a+=4)o(0,a,s/(n-1));return r}var Ha={paint:new bo({"hillshade-illumination-direction":new go(Ne.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new go(Ne.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new go(Ne.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new go(Ne.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new go(Ne.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new go(Ne.paint_hillshade["hillshade-accent-color"])})};const Wa=ko([{name:"a_pos",components:2,type:"Int16"}],4),{members:Za}=Wa;var Xa=Qa,Ya=Qa;function Qa(e,t,n){n=n||2;var i,r,o,s,a,l,c,u=t&&t.length,h=u?t[0]*n:e.length,d=Ka(e,0,h,n,!0),p=[];if(!d||d.next===d.prev)return p;if(u&&(d=function(e,t,n,i){var r,o,s,a=[];for(r=0,o=t.length;r<o;r++)(s=Ka(e,t[r]*i,r<o-1?t[r+1]*i:e.length,i,!1))===s.next&&(s.steiner=!0),a.push(cl(s));for(a.sort(ol),r=0;r<a.length;r++)sl(a[r],n),n=Ja(n,n.next);return n}(e,t,d,n)),e.length>80*n){i=o=e[0],r=s=e[1];for(var f=n;f<h;f+=n)(a=e[f])<i&&(i=a),(l=e[f+1])<r&&(r=l),a>o&&(o=a),l>s&&(s=l);c=0!==(c=Math.max(o-i,s-r))?1/c:0}return el(d,p,n,i,r,c),p}function Ka(e,t,n,i,r){var o,s;if(r===wl(e,t,n,i)>0)for(o=t;o<n;o+=i)s=_l(o,e[o],e[o+1],s);else for(o=n-i;o>=t;o-=i)s=_l(o,e[o],e[o+1],s);return s&&pl(s,s.next)&&(xl(s),s=s.next),s}function Ja(e,t){if(!e)return e;t||(t=e);var n,i=e;do{if(n=!1,i.steiner||!pl(i,i.next)&&0!==dl(i.prev,i,i.next))i=i.next;else{if(xl(i),(i=t=i.prev)===i.next)break;n=!0}}while(n||i!==t);return t}function el(e,t,n,i,r,o,s){if(e){!s&&o&&function(e,t,n,i){var r=e;do{null===r.z&&(r.z=ll(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){var t,n,i,r,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,i=n,a=0,t=0;t<c&&(a++,i=i.nextZ);t++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(s>1)}(r)}(e,i,r,o);for(var a,l,c=e;e.prev!==e.next;)if(a=e.prev,l=e.next,o?nl(e,i,r,o):tl(e))t.push(a.i/n),t.push(e.i/n),t.push(l.i/n),xl(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?el(e=il(Ja(e),t,n),t,n,i,r,o,2):2===s&&rl(e,t,n,i,r,o):el(Ja(e),t,n,i,r,o,1);break}}}function tl(e){var t=e.prev,n=e,i=e.next;if(dl(t,n,i)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(ul(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&dl(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function nl(e,t,n,i){var r=e.prev,o=e,s=e.next;if(dl(r,o,s)>=0)return!1;for(var a=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,l=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,c=ll(r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,t,n,i),u=ll(a,l,t,n,i),h=e.prevZ,d=e.nextZ;h&&h.z>=c&&d&&d.z<=u;){if(h!==e.prev&&h!==e.next&&ul(r.x,r.y,o.x,o.y,s.x,s.y,h.x,h.y)&&dl(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,d!==e.prev&&d!==e.next&&ul(r.x,r.y,o.x,o.y,s.x,s.y,d.x,d.y)&&dl(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;h&&h.z>=c;){if(h!==e.prev&&h!==e.next&&ul(r.x,r.y,o.x,o.y,s.x,s.y,h.x,h.y)&&dl(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;d&&d.z<=u;){if(d!==e.prev&&d!==e.next&&ul(r.x,r.y,o.x,o.y,s.x,s.y,d.x,d.y)&&dl(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function il(e,t,n){var i=e;do{var r=i.prev,o=i.next.next;!pl(r,o)&&fl(r,i,i.next,o)&&yl(r,o)&&yl(o,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(o.i/n),xl(i),xl(i.next),i=e=o),i=i.next}while(i!==e);return Ja(i)}function rl(e,t,n,i,r,o){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&hl(s,a)){var l=vl(s,a);return s=Ja(s,s.next),l=Ja(l,l.next),el(s,t,n,i,r,o),void el(l,t,n,i,r,o)}a=a.next}s=s.next}while(s!==e)}function ol(e,t){return e.x-t.x}function sl(e,t){if(t=function(e,t){var n,i=t,r=e.x,o=e.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s){if(s=a,a===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!n)return null;if(r===s)return n;var l,c=n,u=n.x,h=n.y,d=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&ul(o<h?r:s,o,u,h,o<h?s:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),yl(i,e)&&(l<d||l===d&&(i.x>n.x||i.x===n.x&&al(n,i)))&&(n=i,d=l)),i=i.next}while(i!==c);return n}(e,t)){var n=vl(t,e);Ja(t,t.next),Ja(n,n.next)}}function al(e,t){return dl(e.prev,e,t.prev)<0&&dl(t.next,e,e.next)<0}function ll(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function cl(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function ul(e,t,n,i,r,o,s,a){return(r-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(i-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function hl(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&fl(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(yl(e,t)&&yl(t,e)&&function(e,t){var n=e,i=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}(e,t)&&(dl(e.prev,e,t.prev)||dl(e,t.prev,t))||pl(e,t)&&dl(e.prev,e,e.next)>0&&dl(t.prev,t,t.next)>0)}function dl(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function pl(e,t){return e.x===t.x&&e.y===t.y}function fl(e,t,n,i){var r=gl(dl(e,t,n)),o=gl(dl(e,t,i)),s=gl(dl(n,i,e)),a=gl(dl(n,i,t));return r!==o&&s!==a||!(0!==r||!ml(e,n,t))||!(0!==o||!ml(e,i,t))||!(0!==s||!ml(n,e,i))||!(0!==a||!ml(n,t,i))}function ml(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function gl(e){return e>0?1:e<0?-1:0}function yl(e,t){return dl(e.prev,e,e.next)<0?dl(e,t,e.next)>=0&&dl(e,e.prev,t)>=0:dl(e,t,e.prev)<0||dl(e,e.next,t)<0}function vl(e,t){var n=new bl(e.i,e.x,e.y),i=new bl(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function _l(e,t,n,i){var r=new bl(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function xl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bl(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function wl(e,t,n,i){for(var r=0,o=t,s=n-i;o<n;o+=i)r+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return r}function Tl(e,t,n,i,r){Sl(e,t,n||0,i||e.length-1,r||kl)}function Sl(e,t,n,i,r){for(;i>n;){if(i-n>600){var o=i-n+1,s=t-n+1,a=Math.log(o),l=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1);Sl(e,t,Math.max(n,Math.floor(t-s*l/o+c)),Math.min(i,Math.floor(t+(o-s)*l/o+c)),r)}var u=e[t],h=n,d=i;for(El(e,n,t),r(e[i],u)>0&&El(e,n,i);h<d;){for(El(e,h,d),h++,d--;r(e[h],u)<0;)h++;for(;r(e[d],u)>0;)d--}0===r(e[n],u)?El(e,n,d):El(e,++d,i),d<=t&&(n=d+1),t<=d&&(i=d-1)}}function El(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function kl(e,t){return e<t?-1:e>t?1:0}function Cl(e,t){const n=e.length;if(n<=1)return[e];const i=[];let r,o;for(let s=0;s<n;s++){const t=L(e[s]);0!==t&&(e[s].area=Math.abs(t),void 0===o&&(o=t<0),o===t<0?(r&&i.push(r),r=[e[s]]):r.push(e[s]))}if(r&&i.push(r),t>1)for(let s=0;s<i.length;s++)i[s].length<=t||(Tl(i[s],t,1,i[s].length-1,Al),i[s]=i[s].slice(0,t));return i}function Al(e,t){return t.area-e.area}function Il(e,t,n){const i=n.patternDependencies;let r=!1;for(const o of t){const t=o.paint.get(e+"-pattern");t.isConstant()||(r=!0);const n=t.constantOr(null);n&&(r=!0,i[n.to]=!0,i[n.from]=!0)}return r}function Ml(e,t,n,i,r){const o=r.patternDependencies;for(const s of t){const t=s.paint.get(e+"-pattern").value;if("constant"!==t.kind){let e=t.evaluate({zoom:i-1},n,{},r.availableImages),a=t.evaluate({zoom:i},n,{},r.availableImages),l=t.evaluate({zoom:i+1},n,{},r.availableImages);e=e&&e.name?e.name:e,a=a&&a.name?a.name:a,l=l&&l.name?l.name:l,o[e]=!0,o[a]=!0,o[l]=!0,n.patterns[s.id]={min:e,mid:a,max:l}}}return n}Qa.deviation=function(e,t,n,i){var r=t&&t.length,o=Math.abs(wl(e,0,r?t[0]*n:e.length,n));if(r)for(var s=0,a=t.length;s<a;s++)o-=Math.abs(wl(e,t[s]*n,s<a-1?t[s+1]*n:e.length,n));var l=0;for(s=0;s<i.length;s+=3){var c=i[s]*n,u=i[s+1]*n,h=i[s+2]*n;l+=Math.abs((e[c]-e[h])*(e[u+1]-e[c+1])-(e[c]-e[u])*(e[h+1]-e[c+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},Qa.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},i=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var s=0;s<t;s++)n.vertices.push(e[r][o][s]);r>0&&n.holes.push(i+=e[r-1].length)}return n},Xa.default=Ya;class Pl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ao,this.indexArray=new Vo,this.indexArray2=new Wo,this.programConfigurations=new Ps(e.layers,e.zoom),this.segments=new Vs,this.segments2=new Vs,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){this.hasPattern=Il("fill",this.layers,t);const i=this.layers[0].layout.get("fill-sort-key"),r=[];for(const{feature:o,id:s,index:a,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=Hs(o,e);if(!this.layers[0]._featureFilter.filter(new so(this.zoom),c,n))continue;const u=i?i.evaluate(c,{},n,t.availableImages):void 0,h={id:s,properties:o.properties,type:o.type,sourceLayerIndex:l,index:a,geometry:e?c.geometry:Gs(o),patterns:{},sortKey:u};r.push(h)}i&&r.sort((e,t)=>e.sortKey-t.sortKey);for(const o of r){const{geometry:i,index:r,sourceLayerIndex:s}=o;if(this.hasPattern){const e=Ml("fill",this.layers,o,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(o,i,r,n,{});t.featureIndex.insert(e[r].feature,i,r,s,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Za),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,n,i,r){for(const o of Cl(t,500)){let e=0;for(const a of o)e+=a.length;const t=this.segments.prepareSegment(e,this.layoutVertexArray,this.indexArray),n=t.vertexLength,i=[],r=[];for(const a of o){if(0===a.length)continue;a!==o[0]&&r.push(i.length/2);const e=this.segments2.prepareSegment(a.length,this.layoutVertexArray,this.indexArray2),t=e.vertexLength;this.layoutVertexArray.emplaceBack(a[0].x,a[0].y),this.indexArray2.emplaceBack(t+a.length-1,t),i.push(a[0].x),i.push(a[0].y);for(let n=1;n<a.length;n++)this.layoutVertexArray.emplaceBack(a[n].x,a[n].y),this.indexArray2.emplaceBack(t+n-1,t+n),i.push(a[n].x),i.push(a[n].y);e.vertexLength+=a.length,e.primitiveLength+=a.length}const s=Xa(i,r);for(let o=0;o<s.length;o+=3)this.indexArray.emplaceBack(n+s[o],n+s[o+1],n+s[o+2]);t.vertexLength+=e,t.primitiveLength+=s.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,r,i)}}ar("FillBucket",Pl,{omit:["layers","patternFeatures"]});const Dl=new bo({"fill-sort-key":new yo(Ne.layout_fill["fill-sort-key"])});var Ll={paint:new bo({"fill-antialias":new go(Ne.paint_fill["fill-antialias"]),"fill-opacity":new yo(Ne.paint_fill["fill-opacity"]),"fill-color":new yo(Ne.paint_fill["fill-color"]),"fill-outline-color":new yo(Ne.paint_fill["fill-outline-color"]),"fill-translate":new go(Ne.paint_fill["fill-translate"]),"fill-translate-anchor":new go(Ne.paint_fill["fill-translate-anchor"]),"fill-pattern":new vo(Ne.paint_fill["fill-pattern"])}),layout:Dl};const Ol=ko([{name:"a_pos_normal_ed",components:4,type:"Int16"}]),zl=ko([{name:"a_centroid_pos",components:2,type:"Uint16"}]),{members:Rl}=Ol;var Fl=Nl;function Nl(e,t,n,i,r){this.properties={},this.extent=n,this.type=0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=r,e.readFields(Bl,this,t)}function Bl(e,t,n){1==e?t.id=n.readVarint():2==e?function(e,t){for(var n=e.readVarint()+e.pos;e.pos<n;){var i=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[i]=r}}(n,t):3==e?t.type=n.readVarint():4==e&&(t._geometry=n.pos)}function jl(e){for(var t,n,i=0,r=0,o=e.length,s=o-1;r<o;s=r++)i+=((n=e[s]).x-(t=e[r]).x)*(t.y+n.y);return i}Nl.types=["Unknown","Point","LineString","Polygon"],Nl.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,n=e.readVarint()+e.pos,i=1,o=0,s=0,a=0,l=[];e.pos<n;){if(o<=0){var c=e.readVarint();i=7&c,o=c>>3}if(o--,1===i||2===i)s+=e.readSVarint(),a+=e.readSVarint(),1===i&&(t&&l.push(t),t=[]),t.push(new r(s,a));else{if(7!==i)throw new Error("unknown command "+i);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Nl.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,i=0,r=0,o=0,s=1/0,a=-1/0,l=1/0,c=-1/0;e.pos<t;){if(i<=0){var u=e.readVarint();n=7&u,i=u>>3}if(i--,1===n||2===n)(r+=e.readSVarint())<s&&(s=r),r>a&&(a=r),(o+=e.readSVarint())<l&&(l=o),o>c&&(c=o);else if(7!==n)throw new Error("unknown command "+n)}return[s,l,a,c]},Nl.prototype.toGeoJSON=function(e,t,n){var i,r,o=this.extent*Math.pow(2,n),s=this.extent*e,a=this.extent*t,l=this.loadGeometry(),c=Nl.types[this.type];function u(e){for(var t=0;t<e.length;t++){var n=e[t];e[t]=[360*(n.x+s)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(n.y+a)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(i=0;i<l.length;i++)h[i]=l[i][0];u(l=h);break;case 2:for(i=0;i<l.length;i++)u(l[i]);break;case 3:for(l=function(e){var t=e.length;if(t<=1)return[e];for(var n,i,r=[],o=0;o<t;o++){var s=jl(e[o]);0!==s&&(void 0===i&&(i=s<0),i===s<0?(n&&r.push(n),n=[e[o]]):n.push(e[o]))}return n&&r.push(n),r}(l),i=0;i<l.length;i++)for(r=0;r<l[i].length;r++)u(l[i][r])}1===l.length?l=l[0]:c="Multi"+c;var d={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var Vl=$l;function $l(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(Ul,this,t),this.length=this._features.length}function Ul(e,t,n){15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){for(var t=null,n=e.readVarint()+e.pos;e.pos<n;){var i=e.readVarint()>>3;t=1===i?e.readString():2===i?e.readFloat():3===i?e.readDouble():4===i?e.readVarint64():5===i?e.readVarint():6===i?e.readSVarint():7===i?e.readBoolean():null}return t}(n))}function ql(e,t,n){if(3===e){var i=new Vl(n,n.readVarint()+n.pos);i.length&&(t[i.name]=i)}}$l.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Fl(this._pbf,t,this.extent,this._keys,this._values)};var Gl={VectorTile:function(e,t){this.layers=e.readFields(ql,{},t)},VectorTileFeature:Fl,VectorTileLayer:Vl};const Hl=Gl.VectorTileFeature.types,Wl=Math.pow(2,13);function Zl(e,t,n,i,r,o,s,a){e.emplaceBack((t<<1)+s,(n<<1)+o,(Math.floor(i*Wl)<<1)+r,Math.round(a))}class Xl{constructor(){this.acc=new r(0,0),this.polyCount=[]}startRing(e){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new r(e.x,e.y),this.max=new r(e.x,e.y))}append(e,t){this.currentPolyCount.edges++,this.acc._add(e);let n=!!this.borders;const i=this.min,r=this.max;e.x<i.x?(i.x=e.x,n=!0):e.x>r.x&&(r.x=e.x,n=!0),e.y<i.y?(i.y=e.y,n=!0):e.y>r.y&&(r.y=e.y,n=!0),((0===e.x||e.x===$s)&&e.x===t.x)!=((0===e.y||e.y===$s)&&e.y===t.y)&&this.processBorderOverlap(e,t),n&&this.checkBorderIntersection(e,t)}checkBorderIntersection(e,t){t.x<0!=e.x<0&&this.addBorderIntersection(0,nn(t.y,e.y,(0-t.x)/(e.x-t.x))),t.x>$s!=e.x>$s&&this.addBorderIntersection(1,nn(t.y,e.y,($s-t.x)/(e.x-t.x))),t.y<0!=e.y<0&&this.addBorderIntersection(2,nn(t.x,e.x,(0-t.y)/(e.y-t.y))),t.y>$s!=e.y>$s&&this.addBorderIntersection(3,nn(t.x,e.x,($s-t.y)/(e.y-t.y)))}addBorderIntersection(e,t){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const n=this.borders[e];t<n[0]&&(n[0]=t),t>n[1]&&(n[1]=t)}processBorderOverlap(e,t){if(e.x===t.x){if(e.y===t.y)return;const n=0===e.x?0:1;this.addBorderIntersection(n,t.y),this.addBorderIntersection(n,e.y)}else{const n=0===e.y?2:3;this.addBorderIntersection(n,t.x),this.addBorderIntersection(n,e.x)}}centroid(){const e=this.polyCount.reduce((e,t)=>e+t.edges,0);return 0!==e?this.acc.div(e)._round():new r(0,0)}span(){return new r(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((e,t)=>e+ +(t[0]!==Number.MAX_VALUE),0)}}class Yl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Io,this.centroidVertexArray=new as,this.indexArray=new Vo,this.programConfigurations=new Ps(e.layers,e.zoom),this.segments=new Vs,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.enableTerrain=e.enableTerrain}populate(e,t,n){this.features=[],this.hasPattern=Il("fill-extrusion",this.layers,t),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDone=[!1,!1,!1,!1],this.tileToMeter=function(e){const t=Math.exp(Math.PI*(1-e.y/(1<<e.z)*2));return 80150034*t/(t*t+1)/$s/(1<<e.z)}(n);for(const{feature:i,id:r,index:o,sourceLayerIndex:s}of e){const e=this.layers[0]._featureFilter.needGeometry,a=Hs(i,e);if(!this.layers[0]._featureFilter.filter(new so(this.zoom),a,n))continue;const l={id:r,sourceLayerIndex:s,index:o,geometry:e?a.geometry:Gs(i),properties:i.properties,type:i.type,patterns:{}},c=this.layoutVertexArray.length;this.hasPattern?this.features.push(Ml("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,o,n,{}),t.featureIndex.insert(i,l.geometry,o,s,this.index,c)}this.sortBorders()}addFeatures(e,t,n){for(const i of this.features){const{geometry:e}=i;this.addFeature(i,e,i.index,t,n)}this.sortBorders()}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Rl),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}uploadCentroid(e){0!==this.centroidVertexArray.length&&(this.centroidVertexBuffer?this.needsCentroidUpdate&&this.centroidVertexBuffer.updateData(this.centroidVertexArray):this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,zl.members,!0),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,n,i,r){const o=this.enableTerrain&&e.properties&&"Polygon"===Hl[e.type]?new Xl:null;for(const a of Cl(t,500)){let t=0,n=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);if(0===a.length||(s=a[0]).every(e=>e.x<=0)||s.every(e=>e.x>=$s)||s.every(e=>e.y<=0)||s.every(e=>e.y>=$s))continue;for(let e=0;e<a.length;e++){const i=a[e];if(0===i.length)continue;t+=i.length;let r=0;o&&o.startRing(i[0]);for(let e=0;e<i.length;e++){const t=i[e];if(e>=1){const s=i[e-1];if(!Ql(t,s)){o&&o.append(t,s),n.vertexLength+4>Vs.MAX_VERTEX_ARRAY_LENGTH&&(n=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const e=t.sub(s)._perp(),i=e.x/(Math.abs(e.x)+Math.abs(e.y)),a=e.y>0?1:0,l=s.dist(t);r+l>32768&&(r=0),Zl(this.layoutVertexArray,t.x,t.y,i,a,0,0,r),Zl(this.layoutVertexArray,t.x,t.y,i,a,0,1,r),r+=l,Zl(this.layoutVertexArray,s.x,s.y,i,a,0,0,r),Zl(this.layoutVertexArray,s.x,s.y,i,a,0,1,r);const c=n.vertexLength;this.indexArray.emplaceBack(c,c+2,c+1),this.indexArray.emplaceBack(c+1,c+2,c+3),n.vertexLength+=4,n.primitiveLength+=2}}}}if(n.vertexLength+t>Vs.MAX_VERTEX_ARRAY_LENGTH&&(n=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray)),"Polygon"!==Hl[e.type])continue;const i=[],r=[],l=n.vertexLength;for(let e=0;e<a.length;e++){const t=a[e];if(0!==t.length){t!==a[0]&&r.push(i.length/2);for(let e=0;e<t.length;e++){const n=t[e];Zl(this.layoutVertexArray,n.x,n.y,0,0,1,1,0),i.push(n.x),i.push(n.y),o&&o.currentPolyCount.top++}}}const c=Xa(i,r);for(let e=0;e<c.length;e+=3)this.indexArray.emplaceBack(l+c[e],l+c[e+2],l+c[e+1]);n.primitiveLength+=c.length/3,n.vertexLength+=t}var s;if(o&&o.polyCount.length>0){if(o.borders){o.vertexArrayOffset=this.centroidVertexArray.length;const e=o.borders,t=this.featuresOnBorder.push(o)-1;for(let n=0;n<4;n++)e[n][0]!==Number.MAX_VALUE&&this.borders[n].push(t)}this.encodeCentroid(o.borders?void 0:o.centroid(),o)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,r,i)}sortBorders(){for(let e=0;e<4;e++)this.borders[e].sort((t,n)=>this.featuresOnBorder[t].borders[e][0]-this.featuresOnBorder[n].borders[e][0])}encodeCentroid(e,t,n=!0){let i,r;if(e)if(0!==e.y){const n=t.span()._mult(this.tileToMeter);i=(Math.max(e.x,1)<<3)+Math.min(7,Math.round(n.x/10)),r=(Math.max(e.y,1)<<3)+Math.min(7,Math.round(n.y/10))}else i=Math.ceil(7*(e.x+450)),r=0;else i=0,r=+n;let o=n?this.centroidVertexArray.length:t.vertexArrayOffset;for(const s of t.polyCount){n&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*s.edges+s.top);for(let e=0;e<2*s.edges;e++)this.centroidVertexArray.emplace(o++,0,r),this.centroidVertexArray.emplace(o++,i,r);for(let e=0;e<s.top;e++)this.centroidVertexArray.emplace(o++,i,r)}}}function Ql(e,t){return e.x===t.x&&(e.x<0||e.x>$s)||e.y===t.y&&(e.y<0||e.y>$s)}ar("FillExtrusionBucket",Yl,{omit:["layers","features"]}),ar("PartMetadata",Xl);var Kl={paint:new bo({"fill-extrusion-opacity":new go(Ne["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new yo(Ne["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new go(Ne["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new go(Ne["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new vo(Ne["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new yo(Ne["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new yo(Ne["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new go(Ne["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function Jl(e,t){return e.x*t.x+e.y*t.y}function ec(e,t){if(1===e.length){let n=0;const i=t[n++];let r;for(;!r||i.equals(r);)if(r=t[n++],!r)return 1/0;for(;n<t.length;n++){const o=t[n],s=e[0],a=r.sub(i),l=o.sub(i),c=s.sub(i),u=Jl(a,a),h=Jl(a,l),d=Jl(l,l),p=Jl(c,a),f=Jl(c,l),m=u*d-h*h,g=(d*p-h*f)/m,y=(u*f-h*p)/m,v=i.z*(1-g-y)+r.z*g+o.z*y;if(isFinite(v))return v}return 1/0}{let e=1/0;for(const n of t)e=Math.min(e,n.z);return e}}function tc(e){const t=new r(e[0],e[1]);return t.z=e[2],t}function nc(e,t,n,i,r,o,s,a){const l=s*r.getElevationAt(e,t,!0,!0),c=0!==o[0],u=c?0===o[1]?s*(o[0]/7-450):s*function(e,t,n){const i=Math.floor(t[0]/8),r=Math.floor(t[1]/8),o=10*(t[0]-8*i),s=10*(t[1]-8*r),a=e.getElevationAt(i,r,!0,!0),l=e.getMeterToDEM(n),c=Math.floor(.5*(o*l-1)),u=Math.floor(.5*(s*l-1)),h=e.tileCoordToPixel(i,r),d=2*c+1,p=2*u+1,f=function(e,t,n,i,r){return[e.getElevationAtPixel(t,n,!0),e.getElevationAtPixel(t+r,n,!0),e.getElevationAtPixel(t,n+r,!0),e.getElevationAtPixel(t+i,n+r,!0)]}(e,h.x-c,h.y-u,d,p),m=Math.abs(f[0]-f[1]),g=Math.abs(f[2]-f[3]),y=Math.abs(f[0]-f[2])+Math.abs(f[1]-f[3]),v=Math.min(.25,.5*l*(m+g)/d),_=Math.min(.25,.5*l*y/p);return a+Math.max(v*o,_*s)}(r,o,a):l;return{base:l+(0===n)?-1:n,top:c?Math.max(u+i,l+n+2):l+i}}const ic=ko([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"},{name:"a_linesofar",components:1,type:"Float32"}],4),{members:rc}=ic,oc=ko([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:sc}=oc,ac=Gl.VectorTileFeature.types,lc=Math.cos(Math.PI/180*37.5);class cc{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new Mo,this.layoutVertexArray2=new Po,this.indexArray=new Vo,this.programConfigurations=new Ps(e.layers,e.zoom),this.segments=new Vs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){this.hasPattern=Il("line",this.layers,t);const i=this.layers[0].layout.get("line-sort-key"),r=[];for(const{feature:l,id:c,index:u,sourceLayerIndex:h}of e){const e=this.layers[0]._featureFilter.needGeometry,t=Hs(l,e);if(!this.layers[0]._featureFilter.filter(new so(this.zoom),t,n))continue;const o=i?i.evaluate(t,{},n):void 0,s={id:c,properties:l.properties,type:l.type,sourceLayerIndex:h,index:u,geometry:e?t.geometry:Gs(l),patterns:{},sortKey:o};r.push(s)}i&&r.sort((e,t)=>e.sortKey-t.sortKey);const{lineAtlas:o,featureIndex:s}=t,a=this.addConstantDashes(o);for(const l of r){const{geometry:i,index:r,sourceLayerIndex:c}=l;if(a&&this.addFeatureDashes(l,o),this.hasPattern){const e=Ml("line",this.layers,l,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(l,i,r,n,o.positions);s.insert(e[r].feature,i,r,c,this.index)}}addConstantDashes(e){let t=!1;for(const n of this.layers){const i=n.paint.get("line-dasharray").value,r=n.layout.get("line-cap").value;if("constant"!==i.kind||"constant"!==r.kind)t=!0;else{const t=r.value,n=i.value;if(!n)continue;e.addDash(n.from,t),e.addDash(n.to,t),n.other&&e.addDash(n.other,t)}}return t}addFeatureDashes(e,t){const n=this.zoom;for(const i of this.layers){const r=i.paint.get("line-dasharray").value,o=i.layout.get("line-cap").value;if("constant"===r.kind&&"constant"===o.kind)continue;let s,a,l,c,u,h;if("constant"===r.kind){const e=r.value;if(!e)continue;s=e.other||e.to,a=e.to,l=e.from}else s=r.evaluate({zoom:n-1},e),a=r.evaluate({zoom:n},e),l=r.evaluate({zoom:n+1},e);"constant"===o.kind?c=u=h=o.value:(c=o.evaluate({zoom:n-1},e),u=o.evaluate({zoom:n},e),h=o.evaluate({zoom:n+1},e)),t.addDash(s,c),t.addDash(a,u),t.addDash(l,h);const d=t.getKey(s,c),p=t.getKey(a,u),f=t.getKey(l,h);e.patterns[i.id]={min:d,mid:p,max:f}}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,sc)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,rc),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,n,i,r){const o=this.layers[0].layout,s=o.get("line-join").evaluate(e,{}),a=o.get("line-cap").evaluate(e,{}),l=o.get("line-miter-limit"),c=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const u of t)this.addLine(u,e,s,a,l,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,r,i)}addLine(e,t,n,i,r,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const s="Polygon"===ac[t.type];let a=e.length;for(;a>=2&&e[a-1].equals(e[a-2]);)a--;let l=0;for(;l<a-1&&e[l].equals(e[l+1]);)l++;if(a<(s?3:2))return;"bevel"===n&&(r=1.05);const c=this.overscaling<=16?122880/(512*this.overscaling):0,u=this.segments.prepareSegment(10*a,this.layoutVertexArray,this.indexArray);let h,d,p,f,m;this.e1=this.e2=-1,s&&(h=e[a-2],m=e[l].sub(h)._unit()._perp());for(let g=l;g<a;g++){if(p=g===a-1?s?e[l+1]:void 0:e[g+1],p&&e[g].equals(p))continue;m&&(f=m),h&&(d=h),h=e[g],m=p?p.sub(h)._unit()._perp():f,f=f||m;let t=f.add(m);0===t.x&&0===t.y||t._unit();const y=f.x*m.x+f.y*m.y,v=t.x*m.x+t.y*m.y,_=0!==v?1/v:1/0,x=2*Math.sqrt(2-2*v),b=v<lc&&d&&p,w=f.x*m.y-f.y*m.x>0;if(b&&g>l){const e=h.dist(d);if(e>2*c){const t=h.sub(h.sub(d)._mult(c/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,f,0,0,u),d=t}}const T=d&&p;let S=T?n:s?"butt":i;if(T&&"round"===S&&(_<o?S="miter":_<=2&&(S="fakeround")),"miter"===S&&_>r&&(S="bevel"),"bevel"===S&&(_>2&&(S="flipbevel"),_<r&&(S="miter")),d&&this.updateDistance(d,h),"miter"===S)t._mult(_),this.addCurrentVertex(h,t,0,0,u);else if("flipbevel"===S){if(_>100)t=m.mult(-1);else{const e=_*f.add(m).mag()/f.sub(m).mag();t._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(h,t,0,0,u),this.addCurrentVertex(h,t.mult(-1),0,0,u)}else if("bevel"===S||"fakeround"===S){const e=-Math.sqrt(_*_-1),t=w?e:0,n=w?0:e;if(d&&this.addCurrentVertex(h,f,t,n,u),"fakeround"===S){const e=Math.round(180*x/Math.PI/20);for(let t=1;t<e;t++){let n=t/e;if(.5!==n){const e=n-.5;n+=n*e*(n-1)*((1.0904+y*(y*(3.55645-1.43519*y)-3.2452))*e*e+(.848013+y*(.215638*y-1.06021)))}const i=m.sub(f)._mult(n)._add(f)._unit()._mult(w?-1:1);this.addHalfVertex(h,i.x,i.y,!1,w,0,u)}}p&&this.addCurrentVertex(h,m,-t,-n,u)}else if("butt"===S)this.addCurrentVertex(h,t,0,0,u);else if("square"===S){const e=d?1:-1;d||this.addCurrentVertex(h,t,e,e,u),this.addCurrentVertex(h,t,0,0,u),d&&this.addCurrentVertex(h,t,e,e,u)}else"round"===S&&(d&&(this.addCurrentVertex(h,f,0,0,u),this.addCurrentVertex(h,f,1,1,u,!0)),p&&(this.addCurrentVertex(h,m,-1,-1,u,!0),this.addCurrentVertex(h,m,0,0,u)));if(b&&g<a-1){const e=h.dist(p);if(e>2*c){const t=h.add(p.sub(h)._mult(c/e)._round());this.updateDistance(h,t),this.addCurrentVertex(t,m,0,0,u),h=t}}}}addCurrentVertex(e,t,n,i,r,o=!1){const s=t.y*i-t.x,a=-t.y-t.x*i;this.addHalfVertex(e,t.x+t.y*n,t.y-t.x*n,o,!1,n,r),this.addHalfVertex(e,s,a,o,!0,-i,r)}addHalfVertex({x:e,y:t},n,i,r,o,s,a){this.layoutVertexArray.emplaceBack((e<<1)+(r?1:0),(t<<1)+(o?1:0),Math.round(63*n)+128,Math.round(63*i)+128,1+(0===s?0:s<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length);const l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),o?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const e=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=e*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}ar("LineBucket",cc,{omit:["layers","patternFeatures"]});const uc=new bo({"line-cap":new yo(Ne.layout_line["line-cap"]),"line-join":new yo(Ne.layout_line["line-join"]),"line-miter-limit":new go(Ne.layout_line["line-miter-limit"]),"line-round-limit":new go(Ne.layout_line["line-round-limit"]),"line-sort-key":new yo(Ne.layout_line["line-sort-key"])});var hc={paint:new bo({"line-opacity":new yo(Ne.paint_line["line-opacity"]),"line-color":new yo(Ne.paint_line["line-color"]),"line-translate":new go(Ne.paint_line["line-translate"]),"line-translate-anchor":new go(Ne.paint_line["line-translate-anchor"]),"line-width":new yo(Ne.paint_line["line-width"]),"line-gap-width":new yo(Ne.paint_line["line-gap-width"]),"line-offset":new yo(Ne.paint_line["line-offset"]),"line-blur":new yo(Ne.paint_line["line-blur"]),"line-dasharray":new vo(Ne.paint_line["line-dasharray"]),"line-pattern":new vo(Ne.paint_line["line-pattern"]),"line-gradient":new xo(Ne.paint_line["line-gradient"])}),layout:uc};const dc=new class extends yo{possiblyEvaluate(e,t){return t=new so(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,n,i){return t=_({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,n,i)}}(hc.paint.properties["line-width"].specification);function pc(e,t){return t>0?t+2*e:e}dc.useIntegerZoom=!0;const fc=ko([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),mc=ko([{name:"a_projected_pos",components:3,type:"Float32"}],4);ko([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const gc=ko([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),yc=ko([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);ko([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const vc=ko([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),_c=ko([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ko([{name:"triangle",components:3,type:"Uint16"}]),ko([{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"}]),ko([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),ko([{type:"Float32",name:"offsetX"}]),ko([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var xc=24;const bc=128;function wc(e,t){const{expression:n}=t;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new so(e+1))};if("source"===n.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:i}=n;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const s=t[r],a=t[o];return"composite"===n.kind?{kind:"composite",minZoom:s,maxZoom:a,interpolationType:i}:{kind:"camera",minZoom:s,maxZoom:a,minSize:n.evaluate(new so(s)),maxSize:n.evaluate(new so(a)),interpolationType:i}}}function Tc(e,{uSize:t,uSizeT:n},{lowerSize:i,upperSize:r}){return"source"===e.kind?i/bc:"composite"===e.kind?nn(i/bc,r/bc,n):t}function Sc(e,t){let n=0,i=0;if("constant"===e.kind)i=e.layoutSize;else if("source"!==e.kind){const{interpolationType:r,minZoom:o,maxZoom:s}=e,a=r?m(wn.interpolationFactor(r,t,o,s),0,1):0;"camera"===e.kind?i=nn(e.minSize,e.maxSize,a):n=a}return{uSizeT:n,uSize:i}}var Ec=Object.freeze({__proto__:null,getSizeData:wc,evaluateSizeForFeature:Tc,evaluateSizeForZoom:Sc,SIZE_PACK_FACTOR:bc});function kc(e,t,n){return e.sections.forEach(e=>{e.text=function(e,t,n){const i=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===i?e=e.toLocaleUpperCase():"lowercase"===i&&(e=e.toLocaleLowerCase()),oo.applyArabicShaping&&(e=oo.applyArabicShaping(e)),e}(e.text,t,n)}),e}const Cc={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var Ac=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<<a)-1,c=l>>1,u=-7,h=n?r-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),o-=c}return(p?-1:1)*s*Math.pow(2,o-i)},Ic=function(e,t,n,i,r,o){var s,a,l,c=8*o-r-1,u=(1<<c)-1,h=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[n+p]=255&a,p+=f,a/=256,r-=8);for(s=s<<r|a,c+=r;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*m},Mc=Pc;function Pc(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Pc.Varint=0,Pc.Fixed64=1,Pc.Bytes=2,Pc.Fixed32=5;var Dc=4294967296,Lc=1/Dc,Oc="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function zc(e){return e.type===Pc.Bytes?e.readVarint()+e.pos:e.pos+1}function Rc(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Fc(e,t,n){var i=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;r>=e;r--)n.buf[r+i]=n.buf[r]}function Nc(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function Bc(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function jc(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function Vc(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function $c(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function Uc(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function qc(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function Gc(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function Hc(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function Wc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Zc(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function Xc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Yc(e,t,n){1===e&&n.readMessage(Qc,t)}function Qc(e,t,n){if(3===e){const{id:e,bitmap:i,width:r,height:o,left:s,top:a,advance:l}=n.readMessage(Kc,{});t.push({id:e,bitmap:new $a({width:r+6,height:o+6},i),metrics:{width:r,height:o,left:s,top:a,advance:l}})}}function Kc(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function Jc(e){let t=0,n=0;for(const s of e)t+=s.w*s.h,n=Math.max(n,s.w);e.sort((e,t)=>t.h-e.h);const i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}];let r=0,o=0;for(const s of e)for(let e=i.length-1;e>=0;e--){const t=i[e];if(!(s.w>t.w||s.h>t.h)){if(s.x=t.x,s.y=t.y,o=Math.max(o,s.y+s.h),r=Math.max(r,s.x+s.w),s.w===t.w&&s.h===t.h){const t=i.pop();e<i.length&&(i[e]=t)}else s.h===t.h?(t.x+=s.w,t.w-=s.w):s.w===t.w?(t.y+=s.h,t.h-=s.h):(i.push({x:t.x+s.w,y:t.y,w:t.w-s.w,h:s.h}),t.y+=s.h,t.h-=s.h);break}}return{w:r,h:o,fill:t/(r*o)||0}}Pc.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,e(r,t,this),this.pos===o&&this.skip(i)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Wc(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Xc(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Wc(this.buf,this.pos)+Wc(this.buf,this.pos+4)*Dc;return this.pos+=8,e},readSFixed64:function(){var e=Wc(this.buf,this.pos)+Xc(this.buf,this.pos+4)*Dc;return this.pos+=8,e},readFloat:function(){var e=Ac(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Ac(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,i=this.buf;return t=127&(n=i[this.pos++]),n<128?t:(t|=(127&(n=i[this.pos++]))<<7,n<128?t:(t|=(127&(n=i[this.pos++]))<<14,n<128?t:(t|=(127&(n=i[this.pos++]))<<21,n<128?t:function(e,t,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return Rc(e,i,t);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return Rc(e,i,t);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return Rc(e,i,t);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return Rc(e,i,t);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return Rc(e,i,t);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return Rc(e,i,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=i[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Oc?function(e,t,n){return Oc.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var i="",r=t;r<n;){var o,s,a,l=e[r],c=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=e[r+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(s=e[r+2],128==(192&(o=e[r+1]))&&128==(192&s)&&((c=(15&l)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(s=e[r+2],a=e[r+3],128==(192&(o=e[r+1]))&&128==(192&s)&&128==(192&a)&&((c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,i+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),i+=String.fromCharCode(c),r+=u}return i}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Pc.Bytes)return e.push(this.readVarint(t));var n=zc(this);for(e=e||[];this.pos<n;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==Pc.Bytes)return e.push(this.readSVarint());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==Pc.Bytes)return e.push(this.readBoolean());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==Pc.Bytes)return e.push(this.readFloat());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==Pc.Bytes)return e.push(this.readDouble());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==Pc.Bytes)return e.push(this.readFixed32());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==Pc.Bytes)return e.push(this.readSFixed32());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==Pc.Bytes)return e.push(this.readFixed64());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==Pc.Bytes)return e.push(this.readSFixed64());var t=zc(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===Pc.Varint)for(;this.buf[this.pos++]>127;);else if(t===Pc.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Pc.Fixed32)this.pos+=4;else{if(t!==Pc.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Zc(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Zc(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Zc(this.buf,-1&e,this.pos),Zc(this.buf,Math.floor(e*Lc),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Zc(this.buf,-1&e,this.pos),Zc(this.buf,Math.floor(e*Lc),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,i;if(e>=0?(n=e%4294967296|0,i=e/4294967296|0):(i=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,i=i+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,n.buf[n.pos]=127&(e>>>=7)}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(i,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var i,r,o=0;o<t.length;o++){if((i=t.charCodeAt(o))>55295&&i<57344){if(!r){i>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):r=i;continue}if(i<56320){e[n++]=239,e[n++]=191,e[n++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(e[n++]=239,e[n++]=191,e[n++]=189,r=null);i<128?e[n++]=i:(i<2048?e[n++]=i>>6|192:(i<65536?e[n++]=i>>12|224:(e[n++]=i>>18|240,e[n++]=i>>12&63|128),e[n++]=i>>6&63|128),e[n++]=63&i|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&Fc(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),Ic(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Ic(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var i=this.pos-n;i>=128&&Fc(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(e,t,n){this.writeTag(e,Pc.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Nc,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Bc,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,$c,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,jc,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Vc,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Uc,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,qc,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Gc,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Hc,t)},writeBytesField:function(e,t){this.writeTag(e,Pc.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Pc.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Pc.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Pc.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Pc.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Pc.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Pc.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Pc.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Pc.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Pc.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};class eu{constructor(e,{pixelRatio:t,version:n,stretchX:i,stretchY:r,content:o}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=i,this.stretchY=r,this.content=o,this.version=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class tu{constructor(e,t){const n={},i={};this.haveRenderCallbacks=[];const r=[];this.addImages(e,n,r),this.addImages(t,i,r);const{w:o,h:s}=Jc(r),a=new Ua({width:o||1,height:s||1});for(const l in e){const t=e[l],i=n[l].paddedRect;Ua.copy(t.data,a,{x:0,y:0},{x:i.x+1,y:i.y+1},t.data)}for(const l in t){const e=t[l],n=i[l].paddedRect,r=n.x+1,o=n.y+1,s=e.data.width,c=e.data.height;Ua.copy(e.data,a,{x:0,y:0},{x:r,y:o},e.data),Ua.copy(e.data,a,{x:0,y:c-1},{x:r,y:o-1},{width:s,height:1}),Ua.copy(e.data,a,{x:0,y:0},{x:r,y:o+c},{width:s,height:1}),Ua.copy(e.data,a,{x:s-1,y:0},{x:r-1,y:o},{width:1,height:c}),Ua.copy(e.data,a,{x:0,y:0},{x:r+s,y:o},{width:1,height:c})}this.image=a,this.iconPositions=n,this.patternPositions=i}addImages(e,t,n){for(const i in e){const r=e[i],o={x:0,y:0,w:r.data.width+2,h:r.data.height+2};n.push(o),t[i]=new eu(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(e,t){e.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const n in e.updatedImages)this.patchUpdatedImage(this.iconPositions[n],e.getImage(n),t),this.patchUpdatedImage(this.patternPositions[n],e.getImage(n),t)}patchUpdatedImage(e,t,n){if(!e||!t)return;if(e.version===t.version)return;e.version=t.version;const[i,r]=e.tl;n.update(t.data,void 0,{x:i,y:r})}}ar("ImagePosition",eu),ar("ImageAtlas",tu);const nu={horizontal:1,vertical:2,horizontalOnly:3},iu=-17;class ru{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const n=new ru;return n.scale=e||1,n.fontStack=t,n}static forImage(e){const t=new ru;return t.imageName=e,t}}class ou{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const n=new ou;for(let i=0;i<e.sections.length;i++){const r=e.sections[i];r.image?n.addImageSection(r):n.addTextSection(r,t)}return n}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=function(e){let t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n+1)||null,r=e.charCodeAt(n-1)||null;t+=i&&qr(i)&&!Cc[e[n+1]]||r&&qr(r)&&!Cc[e[n-1]]||!Cc[e[n]]?e[n]:Cc[e[n]]}return t}(this.text)}trim(){let e=0;for(let n=0;n<this.text.length&&au[this.text.charCodeAt(n)];n++)e++;let t=this.text.length;for(let n=this.text.length-1;n>=0&&n>=e&&au[this.text.charCodeAt(n)];n--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const n=new ou;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(ru.forText(e.scale,e.fontStack||t));const n=this.sections.length-1;for(let i=0;i<e.text.length;++i)this.sectionIndex.push(n)}addImageSection(e){const t=e.image?e.image.name:"";if(0===t.length)return void P("Can't add FormattedSection with an empty image.");const n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(ru.forImage(t)),this.sectionIndex.push(this.sections.length-1)):P("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function su(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m){const g=ou.fromFeature(e,r);let y;h===nu.vertical&&g.verticalizePunctuation();const{processBidirectionalText:v,processStyledBidirectionalText:_}=oo;if(v&&1===g.sections.length){y=[];const e=v(g.toString(),fu(g,c,o,t,i,p,f));for(const t of e){const e=new ou;e.text=t,e.sections=g.sections;for(let n=0;n<t.length;n++)e.sectionIndex.push(0);y.push(e)}}else if(_){y=[];const e=_(g.text,g.sectionIndex,fu(g,c,o,t,i,p,f));for(const t of e){const e=new ou;e.text=t[0],e.sectionIndex=t[1],e.sections=g.sections,y.push(e)}}else y=function(e,t){const n=[],i=e.text;let r=0;for(const o of t)n.push(e.substring(r,o)),r=o;return r<i.length&&n.push(e.substring(r,i.length)),n}(g,fu(g,c,o,t,i,p,f));const x=[],b={positionedLines:x,text:g.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:h,iconsInText:!1,verticalizable:!1};return function(e,t,n,i,r,o,s,a,l,c,u,h){let d=0,p=iu,f=0,m=0;const g="right"===a?1:"left"===a?0:.5;let y=0;for(const w of r){w.trim();const r=w.getMaxScale(),s=(r-1)*xc,a={positionedGlyphs:[],lineOffset:0};e.positionedLines[y]=a;const _=a.positionedGlyphs;let x=0;if(!w.length()){p+=o,++y;continue}for(let o=0;o<w.length();o++){const a=w.getSection(o),f=w.getSectionIndex(o),m=w.getCharCode(o);let g=0,y=null,b=null,T=null,S=xc;const E=!(l===nu.horizontal||!u&&!Ur(m)||u&&(au[m]||(v=m,pr(v)||fr(v)||mr(v)||Or(v)||Nr(v))));if(a.imageName){const t=i[a.imageName];if(!t)continue;T=a.imageName,e.iconsInText=e.iconsInText||!0,b=t.paddedRect;const n=t.displaySize;a.scale=a.scale*xc/h,y={width:n[0],height:n[1],left:1,top:-3,advance:E?n[1]:n[0],localGlyph:!1},g=s+(xc-n[1]*a.scale),S=y.advance;const o=E?n[0]*a.scale-xc*r:n[1]*a.scale-xc*r;o>0&&o>x&&(x=o)}else{const e=n[a.fontStack],i=e&&e[m];if(i&&i.rect)b=i.rect,y=i.metrics;else{const e=t[a.fontStack],n=e&&e[m];if(!n)continue;y=n.metrics}g=(r-a.scale)*xc}E?(e.verticalizable=!0,_.push({glyph:m,imageName:T,x:d,y:p+g,vertical:E,scale:a.scale,localGlyph:y.localGlyph,fontStack:a.fontStack,sectionIndex:f,metrics:y,rect:b}),d+=S*a.scale+c):(_.push({glyph:m,imageName:T,x:d,y:p+g,vertical:E,scale:a.scale,localGlyph:y.localGlyph,fontStack:a.fontStack,sectionIndex:f,metrics:y,rect:b}),d+=y.advance*a.scale+c)}0!==_.length&&(f=Math.max(d-c,f),gu(_,0,_.length-1,g,x)),d=0;const b=o*r+x;a.lineOffset=Math.max(x,s),p+=b,m=Math.max(b,m),++y}var v;const _=p-iu,{horizontalAlign:x,verticalAlign:b}=mu(s);(function(e,t,n,i,r,o,s,a,l){const c=(t-n)*r;let u=0;u=o!==s?-a*i-iu:(-i*l+.5)*s;for(const h of e)for(const e of h.positionedGlyphs)e.x+=c,e.y+=u})(e.positionedLines,g,x,b,f,m,o,_,r.length),e.top+=-b*_,e.bottom=e.top+_,e.left+=-x*f,e.right=e.left+f}(b,t,n,i,y,s,a,l,h,c,d,m),!function(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(x)&&b}const au={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},lu={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function cu(e,t,n,i,r,o){if(t.imageName){const e=i[t.imageName];return e?e.displaySize[0]*t.scale*xc/o+r:0}{const i=n[t.fontStack],o=i&&i[e];return o?o.metrics.advance*t.scale+r:0}}function uu(e,t,n,i){const r=Math.pow(e-t,2);return i?e<t?r/2:2*r:r+Math.abs(n)*n}function hu(e,t,n){let i=0;return 10===e&&(i-=1e4),n&&(i+=150),40!==e&&65288!==e||(i+=50),41!==t&&65289!==t||(i+=50),i}function du(e,t,n,i,r,o){let s=null,a=uu(t,n,r,o);for(const l of i){const e=uu(t-l.x,n,r,o)+l.badness;e<=a&&(s=l,a=e)}return{index:e,x:t,priorBreak:s,badness:a}}function pu(e){return e?pu(e.priorBreak).concat(e.index):[]}function fu(e,t,n,i,r,o,s){if("point"!==o)return[];if(!e)return[];const a=[],l=function(e,t,n,i,r,o){let s=0;for(let a=0;a<e.length();a++){const n=e.getSection(a);s+=cu(e.getCharCode(a),n,i,r,t,o)}return s/Math.max(1,Math.ceil(s/n))}(e,t,n,i,r,s),c=e.text.indexOf("​")>=0;let u=0;for(let d=0;d<e.length();d++){const n=e.getSection(d),o=e.getCharCode(d);if(au[o]||(u+=cu(o,n,i,r,t,s)),d<e.length()-1){const t=!((h=o)<11904||!(Tr(h)||wr(h)||Rr(h)||Lr(h)||Cr(h)||gr(h)||Sr(h)||_r(h)||Ar(h)||Ir(h)||kr(h)||Br(h)||xr(h)||vr(h)||yr(h)||Er(h)||br(h)||zr(h)||Pr(h)||Mr(h)));(lu[o]||t||n.imageName)&&a.push(du(d+1,u,l,a,hu(o,e.getCharCode(d+1),t&&c),!1))}}var h;return pu(du(e.length(),u,l,a,0,!0))}function mu(e){let t=.5,n=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:t,verticalAlign:n}}function gu(e,t,n,i,r){if(!i&&!r)return;const o=e[n],s=(e[n].x+o.metrics.advance*o.scale)*i;for(let a=t;a<=n;a++)e[a].x-=s,e[a].y+=r}function yu(e,t,n){const{horizontalAlign:i,verticalAlign:r}=mu(n),o=t[0]-e.displaySize[0]*i,s=t[1]-e.displaySize[1]*r;return{image:e,top:s,bottom:s+e.displaySize[1],left:o,right:o+e.displaySize[0]}}function vu(e,t,n,i,r,o){const s=e.image;let a;if(s.content){const e=s.content,t=s.pixelRatio||1;a=[e[0]/t,e[1]/t,s.displaySize[0]-e[2]/t,s.displaySize[1]-e[3]/t]}const l=t.left*o,c=t.right*o;let u,h,d,p;"width"===n||"both"===n?(p=r[0]+l-i[3],h=r[0]+c+i[1]):(p=r[0]+(l+c-s.displaySize[0])/2,h=p+s.displaySize[0]);const f=t.top*o,m=t.bottom*o;return"height"===n||"both"===n?(u=r[1]+f-i[0],d=r[1]+m+i[2]):(u=r[1]+(f+m-s.displaySize[1])/2,d=u+s.displaySize[1]),{image:s,top:u,right:h,bottom:d,left:p,collisionPadding:a}}class _u extends r{constructor(e,t,n,i){super(e,t),this.angle=n,void 0!==i&&(this.segment=i)}clone(){return new _u(this.x,this.y,this.angle,this.segment)}}function xu(e,t,n,i,r){if(void 0===t.segment)return!0;let o=t,s=t.segment+1,a=0;for(;a>-n/2;){if(s--,s<0)return!1;a-=e[s].dist(o),o=e[s]}a+=e[s].dist(e[s+1]),s++;const l=[];let c=0;for(;a<n/2;){const t=e[s],n=e[s+1];if(!n)return!1;let o=e[s-1].angleTo(t)-t.angleTo(n);for(o=Math.abs((o+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:a,angleDelta:o}),c+=o;a-l[0].distance>i;)c-=l.shift().angleDelta;if(c>r)return!1;s++,a+=t.dist(n)}return!0}function bu(e){let t=0;for(let n=0;n<e.length-1;n++)t+=e[n].dist(e[n+1]);return t}function wu(e,t,n){return e?.6*t*n:0}function Tu(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function Su(e,t,n,i,r,o){const s=wu(n,r,o),a=Tu(n,i)*o;let l=0;const c=bu(e)/2;for(let u=0;u<e.length-1;u++){const n=e[u],i=e[u+1],r=n.dist(i);if(l+r>c){const o=(c-l)/r,h=nn(n.x,i.x,o),d=nn(n.y,i.y,o),p=new _u(h,d,i.angleTo(n),u);return p._round(),!s||xu(e,p,a,s,t)?p:void 0}l+=r}}function Eu(e,t,n,i,r,o,s,a,l){const c=wu(i,o,s),u=Tu(i,r),h=u*s,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),ku(e,d?t/2*a%t:(u/2+2*o)*s*a%t,t,c,n,h,d,!1,l)}function ku(e,t,n,i,r,o,s,a,l){const c=o/2,u=bu(e);let h=0,d=t-n,p=[];for(let f=0;f<e.length-1;f++){const t=e[f],s=e[f+1],a=t.dist(s),m=s.angleTo(t);for(;d+n<h+a;){d+=n;const g=(d-h)/a,y=nn(t.x,s.x,g),v=nn(t.y,s.y,g);if(y>=0&&y<l&&v>=0&&v<l&&d-c>=0&&d+c<=u){const t=new _u(y,v,m,f);t._round(),i&&!xu(e,t,o,i,r)||p.push(t)}}h+=a}return a||p.length||s||(p=ku(e,h/2,n,i,r,o,s,!0,l)),p}function Cu(e,t,n,i,o){const s=[];for(let a=0;a<e.length;a++){const l=e[a];let c;for(let e=0;e<l.length-1;e++){let a=l[e],u=l[e+1];a.x<t&&u.x<t||(a.x<t?a=new r(t,a.y+(t-a.x)/(u.x-a.x)*(u.y-a.y))._round():u.x<t&&(u=new r(t,a.y+(t-a.x)/(u.x-a.x)*(u.y-a.y))._round()),a.y<n&&u.y<n||(a.y<n?a=new r(a.x+(n-a.y)/(u.y-a.y)*(u.x-a.x),n)._round():u.y<n&&(u=new r(a.x+(n-a.y)/(u.y-a.y)*(u.x-a.x),n)._round()),a.x>=i&&u.x>=i||(a.x>=i?a=new r(i,a.y+(i-a.x)/(u.x-a.x)*(u.y-a.y))._round():u.x>=i&&(u=new r(i,a.y+(i-a.x)/(u.x-a.x)*(u.y-a.y))._round()),a.y>=o&&u.y>=o||(a.y>=o?a=new r(a.x+(o-a.y)/(u.y-a.y)*(u.x-a.x),o)._round():u.y>=o&&(u=new r(a.x+(o-a.y)/(u.y-a.y)*(u.x-a.x),o)._round()),c&&a.equals(c[c.length-1])||(c=[a],s.push(c)),c.push(u)))))}}return s}ar("Anchor",_u);var Au=Pu,Iu=Pu,Mu=1e20;function Pu(e,t,n,i,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=i||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=n||8;var s=this.size=this.fontSize+2*this.buffer,a=s+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=s,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Uint16Array(a),this.useMetrics=void 0!==this.ctx.measureText("A").actualBoundingBoxLeft,this.middle=Math.round(s/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function Du(e,t,n,i,r,o){for(var s=0;s<t;s++)Lu(e,s,t,n,i,r,o);for(var a=0;a<n;a++)Lu(e,a*t,1,t,i,r,o)}function Lu(e,t,n,i,r,o,s){var a,l,c,u;for(o[0]=0,s[0]=-Mu,s[1]=Mu,a=0;a<i;a++)r[a]=e[t+a*n];for(a=1,l=0,c=0;a<i;a++){do{c=(r[a]-r[u=o[l]]+a*a-u*u)/(a-u)/2}while(c<=s[l]&&--l>-1);o[++l]=a,s[l]=c,s[l+1]=Mu}for(a=0,l=0;a<i;a++){for(;s[l+1]<a;)l++;e[t+a*n]=r[u=o[l]]+(a-u)*(a-u)}}Pu.prototype._draw=function(e,t){var n,i,r,o,s,a,l,c,u,h=this.ctx.measureText(e),d=h.width,p=2*this.buffer;t&&this.useMetrics?(s=Math.floor(h.actualBoundingBoxAscent),c=this.buffer+Math.ceil(h.actualBoundingBoxAscent),a=this.buffer,l=this.buffer,n=(i=Math.min(this.size,Math.ceil(h.actualBoundingBoxRight-h.actualBoundingBoxLeft)))+p,r=(o=Math.min(this.size-a,Math.ceil(h.actualBoundingBoxAscent+h.actualBoundingBoxDescent)))+p,this.ctx.textBaseline="alphabetic"):(n=i=this.size,r=o=this.size,s=19*this.fontSize/24,a=l=0,c=this.middle,this.ctx.textBaseline="middle"),i&&o&&(this.ctx.clearRect(l,a,i,o),this.ctx.fillText(e,this.buffer,c),u=this.ctx.getImageData(l,a,i,o));var f=new Uint8ClampedArray(n*r);return function(e,t,n,i,r,o,s){o.fill(Mu,0,t*n),s.fill(0,0,t*n);for(var a=(t-i)/2,l=0;l<r;l++)for(var c=0;c<i;c++){var u=(l+a)*t+c+a,h=e.data[4*(l*i+c)+3]/255;if(1===h)o[u]=0,s[u]=Mu;else if(0===h)o[u]=Mu,s[u]=0;else{var d=Math.max(0,.5-h),p=Math.max(0,h-.5);o[u]=d*d,s[u]=p*p}}}(u,n,r,i,o,this.gridOuter,this.gridInner),Du(this.gridOuter,n,r,this.f,this.v,this.z),Du(this.gridInner,n,r,this.f,this.v,this.z),function(e,t,n,i,r,o,s){for(var a=0;a<t*n;a++){var l=Math.sqrt(i[a])-Math.sqrt(r[a]);e[a]=Math.round(255-255*(l/o+s))}}(f,n,r,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:f,metrics:{width:i,height:o,sdfWidth:n,sdfHeight:r,top:s,left:0,advance:d}}},Pu.prototype.draw=function(e){return this._draw(e,!1).data},Pu.prototype.drawWithMetrics=function(e){return this._draw(e,!0)},Au.default=Iu;const Ou={none:0,ideographs:1,all:2};class zu{constructor(e,t,n){this.requestManager=e,this.localGlyphMode=t,this.localFontFamily=n,this.entries={},this.localGlyphs={200:{},400:{},500:{},900:{}}}setURL(e){this.url=e}getGlyphs(e,t){const n=[];for(const i in e)for(const t of e[i])n.push({stack:i,id:t});y(n,({stack:e,id:t},n)=>{let i=this.entries[e];i||(i=this.entries[e]={glyphs:{},requests:{},ranges:{}});let r=i.glyphs[t];if(void 0!==r)return void n(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(i,e,t),r)return i.glyphs[t]=r,void n(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void n(new Error("glyphs > 65535 not supported"));if(i.ranges[o])return void n(null,{stack:e,id:t,glyph:r});let s=i.requests[o];s||(s=i.requests[o]=[],zu.loadGlyphRange(e,o,this.url,this.requestManager,(e,t)=>{if(t){for(const e in t)this._doesCharSupportLocalGlyph(+e)||(i.glyphs[+e]=t[+e]);i.ranges[o]=!0}for(const n of s)n(e,t);delete i.requests[o]})),s.push((i,r)=>{i?n(i):r&&n(null,{stack:e,id:t,glyph:r[t]||null})})},(e,n)=>{if(e)t(e);else if(n){const e={};for(const{stack:t,id:i,glyph:r}of n)(e[t]||(e[t]={}))[i]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}})}_doesCharSupportLocalGlyph(e){return this.localGlyphMode!==Ou.none&&(this.localGlyphMode===Ou.all?!!this.localFontFamily:!!this.localFontFamily&&(Ir(e)||Dr(e)||xr(e)||br(e)))}_tinySDF(e,t,n){const i=this.localFontFamily;if(!i)return;if(!this._doesCharSupportLocalGlyph(n))return;let r=e.tinySDF;if(!r){let n="400";/bold/i.test(t)?n="900":/medium/i.test(t)?n="500":/light/i.test(t)&&(n="200"),r=e.tinySDF=new zu.TinySDF(48,6,16,.25,i,n)}if(this.localGlyphs[r.fontWeight][n])return this.localGlyphs[r.fontWeight][n];const{data:o,metrics:s}=r.drawWithMetrics(String.fromCharCode(n)),{sdfWidth:a,sdfHeight:l,width:c,height:u,left:h,top:d,advance:p}=s;return this.localGlyphs[r.fontWeight][n]={id:n,bitmap:new $a({width:a,height:l},o),metrics:{width:c/2,height:u/2,left:h/2,top:d/2-27,advance:p/2,localGlyph:!0}}}}function Ru(e,t,n,i){const o=[],s=e.image,a=s.pixelRatio,l=s.paddedRect.w-2,c=s.paddedRect.h-2,u=e.right-e.left,h=e.bottom-e.top,d=s.stretchX||[[0,l]],p=s.stretchY||[[0,c]],f=(e,t)=>e+t[1]-t[0],m=d.reduce(f,0),g=p.reduce(f,0),y=l-m,v=c-g;let _=0,x=m,b=0,w=g,T=0,S=y,E=0,k=v;if(s.content&&i){const e=s.content;_=Fu(d,0,e[0]),b=Fu(p,0,e[1]),x=Fu(d,e[0],e[2]),w=Fu(p,e[1],e[3]),T=e[0]-_,E=e[1]-b,S=e[2]-e[0]-x,k=e[3]-e[1]-w}const C=(i,o,l,c)=>{const d=Bu(i.stretch-_,x,u,e.left),p=ju(i.fixed-T,S,i.stretch,m),f=Bu(o.stretch-b,w,h,e.top),y=ju(o.fixed-E,k,o.stretch,g),v=Bu(l.stretch-_,x,u,e.left),C=ju(l.fixed-T,S,l.stretch,m),A=Bu(c.stretch-b,w,h,e.top),I=ju(c.fixed-E,k,c.stretch,g),M=new r(d,f),P=new r(v,f),D=new r(v,A),L=new r(d,A),O=new r(p/a,y/a),z=new r(C/a,I/a),R=t*Math.PI/180;if(R){const e=Math.sin(R),t=Math.cos(R),n=[t,-e,e,t];M._matMult(n),P._matMult(n),L._matMult(n),D._matMult(n)}const F=i.stretch+i.fixed,N=o.stretch+o.fixed;return{tl:M,tr:P,bl:L,br:D,tex:{x:s.paddedRect.x+1+F,y:s.paddedRect.y+1+N,w:l.stretch+l.fixed-F,h:c.stretch+c.fixed-N},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:z,minFontScaleX:S/a/u,minFontScaleY:k/a/h,isSDF:n}};if(i&&(s.stretchX||s.stretchY)){const e=Nu(d,y,m),t=Nu(p,v,g);for(let n=0;n<e.length-1;n++){const i=e[n],r=e[n+1];for(let e=0;e<t.length-1;e++)o.push(C(i,t[e],r,t[e+1]))}}else o.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:c+1}));return o}function Fu(e,t,n){let i=0;for(const r of e)i+=Math.max(t,Math.min(n,r[1]))-Math.max(t,Math.min(n,r[0]));return i}function Nu(e,t,n){const i=[{fixed:-1,stretch:0}];for(const[r,o]of e){const e=i[i.length-1];i.push({fixed:r-e.stretch,stretch:e.stretch}),i.push({fixed:r-e.stretch,stretch:e.stretch+(o-r)})}return i.push({fixed:t+1,stretch:n}),i}function Bu(e,t,n,i){return e/t*n+i}function ju(e,t,n,i){return e-t*n/i}zu.loadGlyphRange=function(e,t,n,i,r){const o=256*t,s=o+255,a=i.transformRequest(i.normalizeGlyphsURL(n).replace("{fontstack}",e).replace("{range}",`${o}-${s}`),be.Glyphs);Ee(a,(e,t)=>{if(e)r(e);else if(t){const e={};for(const n of function(e){return new Mc(e).readFields(Yc,[])}(t))e[n.id]=n;r(null,e)}})},zu.TinySDF=Au;class Vu{constructor(e=[],t=$u){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,i=t[e];for(;e>0;){const r=e-1>>1,o=t[r];if(n(i,o)>=0)break;t[e]=o,e=r}t[e]=i}_down(e){const{data:t,compare:n}=this,i=this.length>>1,r=t[e];for(;e<i;){let i=1+(e<<1),o=t[i];const s=i+1;if(s<this.length&&n(t[s],o)<0&&(i=s,o=t[s]),n(o,r)>=0)break;t[e]=o,e=i}t[e]=r}}function $u(e,t){return e<t?-1:e>t?1:0}function Uu(e,t=1,n=!1){let i=1/0,o=1/0,s=-1/0,a=-1/0;const l=e[0];for(let r=0;r<l.length;r++){const e=l[r];(!r||e.x<i)&&(i=e.x),(!r||e.y<o)&&(o=e.y),(!r||e.x>s)&&(s=e.x),(!r||e.y>a)&&(a=e.y)}const c=Math.min(s-i,a-o);let u=c/2;const h=new Vu([],qu);if(0===c)return new r(i,o);for(let r=i;r<s;r+=c)for(let t=o;t<a;t+=c)h.push(new Gu(r+u,t+u,u,e));let d=function(e){let t=0,n=0,i=0;const r=e[0];for(let o=0,s=r.length,a=s-1;o<s;a=o++){const e=r[o],s=r[a],l=e.x*s.y-s.x*e.y;n+=(e.x+s.x)*l,i+=(e.y+s.y)*l,t+=3*l}return new Gu(n/t,i/t,0,e)}(e),p=h.length;for(;h.length;){const i=h.pop();(i.d>d.d||!d.d)&&(d=i,n&&console.log("found best %d after %d probes",Math.round(1e4*i.d)/1e4,p)),i.max-d.d<=t||(u=i.h/2,h.push(new Gu(i.p.x-u,i.p.y-u,u,e)),h.push(new Gu(i.p.x+u,i.p.y-u,u,e)),h.push(new Gu(i.p.x-u,i.p.y+u,u,e)),h.push(new Gu(i.p.x+u,i.p.y+u,u,e)),p+=4)}return n&&(console.log("num probes: "+p),console.log("best distance: "+d.d)),d.p}function qu(e,t){return t.max-e.max}function Gu(e,t,n,i){this.p=new r(e,t),this.h=n,this.d=function(e,t){let n=!1,i=1/0;for(let r=0;r<t.length;r++){const o=t[r];for(let t=0,r=o.length,s=r-1;t<r;s=t++){const r=o[t],a=o[s];r.y>e.y!=a.y>e.y&&e.x<(a.x-r.x)*(e.y-r.y)/(a.y-r.y)+r.x&&(n=!n),i=Math.min(i,na(e,r,a))}}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}const Hu=Number.POSITIVE_INFINITY;function Wu(e,t){return t[1]!==Hu?function(e,t,n){let i=0,r=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":r=n-7;break;case"bottom-right":case"bottom-left":case"bottom":r=7-n}switch(e){case"top-right":case"bottom-right":case"right":i=-t;break;case"top-left":case"bottom-left":case"left":i=t}return[i,r]}(e,t[0],t[1]):function(e,t){let n=0,i=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":i=r-7;break;case"bottom-right":case"bottom-left":i=7-r;break;case"bottom":i=7-t;break;case"top":i=t-7}switch(e){case"top-right":case"bottom-right":n=-r;break;case"top-left":case"bottom-left":n=r;break;case"left":n=t;break;case"right":n=-t}return[n,i]}(e,t[0])}function Zu(e,t,n,i,r,o,s,a){e.createArrays(),e.tilePixelRatio=$s/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;const l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:n}=e.textSizeData;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new so(t),s),c["text-size"].possiblyEvaluate(new so(n),s)]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:n}=e.iconSizeData;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new so(t),s),c["icon-size"].possiblyEvaluate(new so(n),s)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new so(a+1),s),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new so(a+1),s),u.textMaxSize=c["text-size"].possiblyEvaluate(new so(18),s);const h="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),d=l.get("text-keep-upright"),p=l.get("text-size");for(const f of e.features){const o=l.get("text-font").evaluate(f,{},s).join(","),a=p.evaluate(f,{},s),c=u.layoutTextSize.evaluate(f,{},s),m=(u.layoutIconSize.evaluate(f,{},s),{horizontal:{},vertical:void 0}),g=f.text;let y,v=[0,0];if(g){const i=g.toString(),u=l.get("text-letter-spacing").evaluate(f,{},s)*xc,p=l.get("text-line-height").evaluate(f,{},s)*xc,y=Vr(i)?u:0,_=l.get("text-anchor").evaluate(f,{},s),x=l.get("text-variable-anchor");if(!x){const e=l.get("text-radial-offset").evaluate(f,{},s);v=e?Wu(_,[e*xc,Hu]):l.get("text-offset").evaluate(f,{},s).map(e=>e*xc)}let b=h?"center":l.get("text-justify").evaluate(f,{},s);const w=l.get("symbol-placement"),T="point"===w?l.get("text-max-width").evaluate(f,{},s)*xc:0,S=()=>{e.allowVerticalPlacement&&jr(i)&&(m.vertical=su(g,t,n,r,o,T,p,_,"left",y,v,nu.vertical,!0,w,c,a))};if(!h&&x){const e="auto"===b?x.map(e=>Xu(e)):[b];let i=!1;for(let s=0;s<e.length;s++){const l=e[s];if(!m.horizontal[l])if(i)m.horizontal[l]=m.horizontal[0];else{const e=su(g,t,n,r,o,T,p,"center",l,y,v,nu.horizontal,!1,w,c,a);e&&(m.horizontal[l]=e,i=1===e.positionedLines.length)}}S()}else{"auto"===b&&(b=Xu(_));const e=su(g,t,n,r,o,T,p,_,b,y,v,nu.horizontal,!1,w,c,a);e&&(m.horizontal[b]=e),S(),jr(i)&&h&&d&&(m.vertical=su(g,t,n,r,o,T,p,_,b,y,v,nu.vertical,!1,w,c,a))}}let _=!1;if(f.icon&&f.icon.name){const t=i[f.icon.name];t&&(y=yu(r[f.icon.name],l.get("icon-offset").evaluate(f,{},s),l.get("icon-anchor").evaluate(f,{},s)),_=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&P("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==l.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const x=Ju(m.horizontal)||m.vertical;e.iconsInText||(e.iconsInText=!!x&&x.iconsInText),(x||y)&&Yu(e,f,m,y,i,u,c,0,v,_,s)}o&&e.generateCollisionDebugBuffers(a,e.collisionBoxArray)}function Xu(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Yu(e,t,n,i,r,o,s,a,l,c,h){let d=o.textMaxSize.evaluate(t,{},h);void 0===d&&(d=s);const p=e.layers[0].layout,f=p.get("icon-offset").evaluate(t,{},h),m=Ju(n.horizontal),g=s/24,y=e.tilePixelRatio*d/24,v=e.tilePixelRatio*p.get("symbol-spacing"),_=p.get("text-padding")*e.tilePixelRatio,x=p.get("icon-padding")*e.tilePixelRatio,b=u(p.get("text-max-angle")),w="map"===p.get("text-rotation-alignment")&&"point"!==p.get("symbol-placement"),T="map"===p.get("icon-rotation-alignment")&&"point"!==p.get("symbol-placement"),S=p.get("symbol-placement"),E=v/2,k=p.get("icon-text-fit");let C;i&&"none"!==k&&(e.allowVerticalPlacement&&n.vertical&&(C=vu(i,n.vertical,k,p.get("icon-text-fit-padding"),f,g)),m&&(i=vu(i,m,k,p.get("icon-text-fit-padding"),f,g)));const A=(a,u)=>{u.x<0||u.x>=$s||u.y<0||u.y>=$s||function(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y,v,_,x,b,w,T){const S=e.addToLineVertexArray(t,n);let E,k,C,A,I,M,D,L=0,O=0,z=0,R=0,F=-1,N=-1;const B={};let j=ds(""),V=0,$=0;if(void 0===a._unevaluatedLayout.getValue("text-radial-offset")?[V,$]=a.layout.get("text-offset").evaluate(_,{},w).map(e=>e*xc):(V=a.layout.get("text-radial-offset").evaluate(_,{},w)*xc,$=Hu),e.allowVerticalPlacement&&i.vertical){const e=i.vertical;if(p)M=th(e),s&&(D=th(s));else{const n=a.layout.get("text-rotate").evaluate(_,{},w)+90;C=eh(l,t,c,u,h,e,d,n),s&&(A=eh(l,t,c,u,h,s,g,n))}}if(r){const n=a.layout.get("icon-rotate").evaluate(_,{},w),i="none"!==a.layout.get("icon-text-fit"),o=Ru(r,n,b,i),d=s?Ru(s,n,b,i):void 0;k=eh(l,t,c,u,h,r,g,n),L=4*o.length;const p=e.iconSizeData;let f=null;"source"===p.kind?(f=[bc*a.layout.get("icon-size").evaluate(_,{},w)],f[0]>Qu&&P(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')):"composite"===p.kind&&(f=[bc*x.compositeIconSizes[0].evaluate(_,{},w),bc*x.compositeIconSizes[1].evaluate(_,{},w)],(f[0]>Qu||f[1]>Qu)&&P(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')),e.addSymbols(e.icon,o,f,v,y,_,!1,t,S.lineStartIndex,S.lineLength,-1,w),F=e.icon.placedSymbolArray.length-1,d&&(O=4*d.length,e.addSymbols(e.icon,d,f,v,y,_,nu.vertical,t,S.lineStartIndex,S.lineLength,-1,w),N=e.icon.placedSymbolArray.length-1)}for(const P in i.horizontal){const n=i.horizontal[P];E||(j=ds(n.text),p?I=th(n):E=eh(l,t,c,u,h,n,d,a.layout.get("text-rotate").evaluate(_,{},w)));const r=1===n.positionedLines.length;if(z+=Ku(e,t,n,o,a,p,_,f,S,i.vertical?nu.horizontal:nu.horizontalOnly,r?Object.keys(i.horizontal):[P],B,F,x,w),r)break}i.vertical&&(R+=Ku(e,t,i.vertical,o,a,p,_,f,S,nu.vertical,["vertical"],B,N,x,w));let U=-1;const q=(e,t)=>e?Math.max(e,t):t;U=q(I,U),U=q(M,U),U=q(D,U);const G=U>-1?1:0;G&&(U*=T/xc),e.glyphOffsetArray.length>=uh.MAX_GLYPHS&&P("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,F,N,j,void 0!==E?E:e.collisionBoxArray.length,void 0!==E?E+1:e.collisionBoxArray.length,void 0!==C?C:e.collisionBoxArray.length,void 0!==C?C+1:e.collisionBoxArray.length,void 0!==k?k:e.collisionBoxArray.length,void 0!==k?k+1:e.collisionBoxArray.length,A||e.collisionBoxArray.length,A?A+1:e.collisionBoxArray.length,c,z,R,L,O,G,0,V,$,U)}(e,u,a,n,i,r,C,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,w,l,0,x,T,f,t,o,c,h,s)};if("line"===S)for(const u of Cu(t.geometry,0,0,$s,$s)){const t=Eu(u,v,b,n.vertical||m,i,24,y,e.overscaling,$s);for(const n of t){const t=m;t&&nh(e,t.text,E,n)||A(u,n)}}else if("line-center"===S){for(const u of t.geometry)if(u.length>1){const e=Su(u,b,n.vertical||m,i,24,y);e&&A(u,e)}}else if("Polygon"===t.type)for(const u of Cl(t.geometry,0)){const e=Uu(u,16);A(u[0],new _u(e.x,e.y,0))}else if("LineString"===t.type)for(const u of t.geometry)A(u,new _u(u[0].x,u[0].y,0));else if("Point"===t.type)for(const u of t.geometry)for(const e of u)A([e],new _u(e.x,e.y,0))}const Qu=32640;function Ku(e,t,n,i,o,s,a,l,c,u,h,d,p,f,m){const g=function(e,t,n,i,o,s,a,l){const c=i.layout.get("text-rotate").evaluate(s,{})*Math.PI/180,u=[];for(const h of t.positionedLines)for(const e of h.positionedGlyphs){if(!e.rect)continue;const i=e.rect||{};let s=4,d=!0,p=1,f=0;const m=(o||l)&&e.vertical,g=e.metrics.advance*e.scale/2;if(l&&t.verticalizable){const t=(e.scale-1)*xc,n=(xc-e.metrics.width*e.scale)/2;f=h.lineOffset/2-(e.imageName?-n:t)}if(e.imageName){const t=a[e.imageName];d=t.sdf,p=t.pixelRatio,s=1/p}const y=o?[e.x+g,e.y]:[0,0];let v=o?[0,0]:[e.x+g+n[0],e.y+n[1]-f],_=[0,0];m&&(_=v,v=[0,0]);const x=(e.metrics.left-s)*e.scale-g+v[0],b=(-e.metrics.top-s)*e.scale+v[1],w=x+i.w*e.scale/(p*(e.localGlyph?2:1)),T=b+i.h*e.scale/(p*(e.localGlyph?2:1)),S=new r(x,b),E=new r(w,b),k=new r(x,T),C=new r(w,T);if(m){const t=new r(-g,g-iu),n=-Math.PI/2,i=12-g,o=new r(22-i,-(e.imageName?i:0)),s=new r(..._);S._rotateAround(n,t)._add(o)._add(s),E._rotateAround(n,t)._add(o)._add(s),k._rotateAround(n,t)._add(o)._add(s),C._rotateAround(n,t)._add(o)._add(s)}if(c){const e=Math.sin(c),t=Math.cos(c),n=[t,-e,e,t];S._matMult(n),E._matMult(n),k._matMult(n),C._matMult(n)}const A=new r(0,0),I=new r(0,0);u.push({tl:S,tr:E,bl:k,br:C,tex:i,writingMode:t.writingMode,glyphOffset:y,sectionIndex:e.sectionIndex,isSDF:d,pixelOffsetTL:A,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0})}return u}(0,n,l,o,s,a,i,e.allowVerticalPlacement),y=e.textSizeData;let v=null;"source"===y.kind?(v=[bc*o.layout.get("text-size").evaluate(a,{},m)],v[0]>Qu&&P(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')):"composite"===y.kind&&(v=[bc*f.compositeTextSizes[0].evaluate(a,{},m),bc*f.compositeTextSizes[1].evaluate(a,{},m)],(v[0]>Qu||v[1]>Qu)&&P(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')),e.addSymbols(e.text,g,v,l,s,a,u,t,c.lineStartIndex,c.lineLength,p,m);for(const r of h)d[r]=e.text.placedSymbolArray.length-1;return 4*g.length}function Ju(e){for(const t in e)return e[t];return null}function eh(e,t,n,i,o,s,a,l){let c=s.top,h=s.bottom,d=s.left,p=s.right;const f=s.collisionPadding;if(f&&(d-=f[0],c-=f[1],p+=f[2],h+=f[3]),l){const e=new r(d,c),t=new r(p,c),n=new r(d,h),i=new r(p,h),o=u(l);e._rotate(o),t._rotate(o),n._rotate(o),i._rotate(o),d=Math.min(e.x,t.x,n.x,i.x),p=Math.max(e.x,t.x,n.x,i.x),c=Math.min(e.y,t.y,n.y,i.y),h=Math.max(e.y,t.y,n.y,i.y)}return e.emplaceBack(t.x,t.y,d,c,p,h,a,n,i,o),e.length-1}function th(e){e.collisionPadding&&(e.top-=e.collisionPadding[1],e.bottom+=e.collisionPadding[3]);const t=e.bottom-e.top;return t>0?Math.max(10,t):null}function nh(e,t,n,i){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(i.dist(e[t])<n)return!0}else r[t]=[];return r[t].push(i),!1}const ih=Gl.VectorTileFeature.types,rh=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function oh(e,t,n,i,r,o,s,a,l,c,u,h,d){const p=a?Math.min(Qu,Math.round(a[0])):0,f=a?Math.min(Qu,Math.round(a[1])):0;e.emplaceBack(t,n,Math.round(32*i),Math.round(32*r),o,s,(p<<1)+(l?1:0),f,16*c,16*u,256*h,256*d)}function sh(e,t,n){e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n)}function ah(e){for(const t of e.sections)if(Wr(t.text))return!0;return!1}class lh{constructor(e){this.layoutVertexArray=new Oo,this.indexArray=new Vo,this.programConfigurations=e,this.segments=new Vs,this.dynamicLayoutVertexArray=new zo,this.opacityVertexArray=new Ro,this.placedSymbolArray=new Jo}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,n,i){this.isEmpty()||(n&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,fc.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,mc.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,rh,!0),this.opacityVertexBuffer.itemSize=1),(n||i)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}ar("SymbolBuffers",lh);class ch{constructor(e,t,n){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new n,this.segments=new Vs,this.collisionVertexArray=new jo,this.collisionVertexArrayExt=new zo}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,gc.members,!0),this.collisionVertexBufferExt=e.createVertexBuffer(this.collisionVertexArrayExt,yc.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}ar("CollisionBuffers",ch);class uh{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ma([]),this.placementViewportMatrix=ma([]);const t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=wc(this.zoom,t["text-size"]),this.iconSizeData=wc(this.zoom,t["icon-size"]);const n=this.layers[0].layout,i=n.get("symbol-sort-key"),r=n.get("symbol-z-order");this.canOverlap=n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==r&&void 0!==i.constantOr(1),this.sortFeaturesByY=("viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map(e=>nu[e])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=e.sourceID}createArrays(){this.text=new lh(new Ps(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new lh(new Ps(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new ns,this.lineVertexArray=new is,this.symbolInstances=new ts}calculateGlyphDependencies(e,t,n,i,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(n||i)&&r){const n=Cc[e.charAt(o)];n&&(t[n.charCodeAt(0)]=!0)}}populate(e,t,n){const i=this.layers[0],r=i.layout,o=r.get("text-font"),s=r.get("text-field"),a=r.get("icon-image"),l=("constant"!==s.value.kind||s.value.value instanceof pt&&!s.value.value.isEmpty()||s.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),c="constant"!==a.value.kind||!!a.value.value||Object.keys(a.parameters).length>0,u=r.get("symbol-sort-key");if(this.features=[],!l&&!c)return;const h=t.iconDependencies,d=t.glyphDependencies,p=t.availableImages,f=new so(this.zoom);for(const{feature:m,id:g,index:y,sourceLayerIndex:v}of e){const e=i._featureFilter.needGeometry,t=Hs(m,e);if(!i._featureFilter.filter(f,t,n))continue;let s,a;if(e||(t.geometry=Gs(m)),l){const e=i.getValueAndResolveTokens("text-field",t,n,p),r=pt.factory(e);ah(r)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===io()||this.hasRTLText&&oo.isParsed())&&(s=kc(r,i,t))}if(c){const e=i.getValueAndResolveTokens("icon-image",t,n,p);a=e instanceof ft?e:ft.fromString(e)}if(!s&&!a)continue;const _=this.sortFeaturesByKey?u.evaluate(t,{},n):void 0;if(this.features.push({id:g,text:s,icon:a,index:y,sourceLayerIndex:v,geometry:t.geometry,properties:m.properties,type:ih[m.type],sortKey:_}),a&&(h[a.name]=!0),s){const e=o.evaluate(t,{},n).join(","),i="map"===r.get("text-rotation-alignment")&&"point"!==r.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(nu.vertical)>=0;for(const t of s.sections)if(t.image)h[t.image.name]=!0;else{const n=jr(s.toString()),r=t.fontStack||e,o=d[r]=d[r]||{};this.calculateGlyphDependencies(t.text,o,i,this.allowVerticalPlacement,n)}}}"line"===r.get("symbol-placement")&&(this.features=function(e){const t={},n={},i=[];let r=0;function o(t){i.push(e[t]),r++}function s(e,t,r){const o=n[e];return delete n[e],n[t]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(r[0]),o}function a(e,n,r){const o=t[n];return delete t[n],t[e]=o,i[o].geometry[0].shift(),i[o].geometry[0]=r[0].concat(i[o].geometry[0]),o}function l(e,t,n){const i=n?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:${i.y}`}for(let c=0;c<e.length;c++){const u=e[c],h=u.geometry,d=u.text?u.text.toString():null;if(!d){o(c);continue}const p=l(d,h),f=l(d,h,!0);if(p in n&&f in t&&n[p]!==t[f]){const e=a(p,f,h),r=s(p,f,i[e].geometry);delete t[p],delete n[f],n[l(d,i[r].geometry,!0)]=r,i[e].geometry=null}else p in n?s(p,f,h):f in t?a(p,f,h):(o(c),t[p]=r-1,n[f]=r-1)}return i.filter(e=>e.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){const n=this.lineVertexArray.length;if(void 0!==e.segment){let n=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]);const r={};for(let o=e.segment+1;o<t.length;o++)r[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:n},o<t.length-1&&(n+=t[o+1].dist(t[o]));for(let o=e.segment||0;o>=0;o--)r[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:i},o>0&&(i+=t[o-1].dist(t[o]));for(let e=0;e<t.length;e++){const t=r[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}addSymbols(e,t,n,i,r,o,s,a,l,c,u,h){const d=e.indexArray,p=e.layoutVertexArray,f=e.segments.prepareSegment(4*t.length,p,d,this.canOverlap?o.sortKey:void 0),m=this.glyphOffsetArray.length,g=f.vertexLength,y=this.allowVerticalPlacement&&s===nu.vertical?Math.PI/2:0,v=o.text&&o.text.sections;for(let _=0;_<t.length;_++){const{tl:i,tr:r,bl:s,br:l,tex:c,pixelOffsetTL:u,pixelOffsetBR:m,minFontScaleX:g,minFontScaleY:x,glyphOffset:b,isSDF:w,sectionIndex:T}=t[_],S=f.vertexLength,E=b[1];oh(p,a.x,a.y,i.x,E+i.y,c.x,c.y,n,w,u.x,u.y,g,x),oh(p,a.x,a.y,r.x,E+r.y,c.x+c.w,c.y,n,w,m.x,u.y,g,x),oh(p,a.x,a.y,s.x,E+s.y,c.x,c.y+c.h,n,w,u.x,m.y,g,x),oh(p,a.x,a.y,l.x,E+l.y,c.x+c.w,c.y+c.h,n,w,m.x,m.y,g,x),sh(e.dynamicLayoutVertexArray,a,y),d.emplaceBack(S,S+1,S+2),d.emplaceBack(S+1,S+2,S+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(b[0]),_!==t.length-1&&T===t[_+1].sectionIndex||e.programConfigurations.populatePaintArrays(p.length,o,o.index,{},h,v&&v[T])}e.placedSymbolArray.emplaceBack(a.x,a.y,m,this.glyphOffsetArray.length-m,g,l,c,a.segment,n?n[0]:0,n?n[1]:0,i[0],i[1],s,0,!1,0,u)}_commitLayoutVertex(e,t,n,i,r){e.emplaceBack(t.x,t.y,n,i,Math.round(r.x),Math.round(r.y))}_addCollisionDebugVertices(e,t,n,i,o){const s=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),a=s.vertexLength,l=o.anchorX,c=o.anchorY;for(let r=0;r<4;r++)n.collisionVertexArray.emplaceBack(0,0,0,0);n.collisionVertexArrayExt.emplaceBack(t,-e.padding,-e.padding),n.collisionVertexArrayExt.emplaceBack(t,e.padding,-e.padding),n.collisionVertexArrayExt.emplaceBack(t,e.padding,e.padding),n.collisionVertexArrayExt.emplaceBack(t,-e.padding,e.padding),this._commitLayoutVertex(n.layoutVertexArray,i,l,c,new r(e.x1,e.y1)),this._commitLayoutVertex(n.layoutVertexArray,i,l,c,new r(e.x2,e.y1)),this._commitLayoutVertex(n.layoutVertexArray,i,l,c,new r(e.x2,e.y2)),this._commitLayoutVertex(n.layoutVertexArray,i,l,c,new r(e.x1,e.y2)),s.vertexLength+=4;const u=n.indexArray;u.emplaceBack(a,a+1),u.emplaceBack(a+1,a+2),u.emplaceBack(a+2,a+3),u.emplaceBack(a+3,a),s.primitiveLength+=4}_addTextDebugCollisionBoxes(e,t,n,i,r,o){for(let s=i;s<r;s++){const i=n.get(s),r=this.getSymbolInstanceTextSize(e,o,t,s);this._addCollisionDebugVertices(i,r,this.textCollisionBox,i.anchorPoint,o)}}_addIconDebugCollisionBoxes(e,t,n,i,r,o){for(let s=i;s<r;s++){const i=n.get(s),r=this.getSymbolInstanceIconSize(e,t,s);this._addCollisionDebugVertices(i,r,this.iconCollisionBox,i.anchorPoint,o)}}generateCollisionDebugBuffers(e,t){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ch(No,vc.members,Wo),this.iconCollisionBox=new ch(No,vc.members,Wo);const n=Sc(this.iconSizeData,e),i=Sc(this.textSizeData,e);for(let r=0;r<this.symbolInstances.length;r++){const o=this.symbolInstances.get(r);this._addTextDebugCollisionBoxes(i,e,t,o.textBoxStartIndex,o.textBoxEndIndex,o),this._addTextDebugCollisionBoxes(i,e,t,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._addIconDebugCollisionBoxes(n,e,t,o.iconBoxStartIndex,o.iconBoxEndIndex,o),this._addIconDebugCollisionBoxes(n,e,t,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex,o)}}getSymbolInstanceTextSize(e,t,n,i){const r=this.text.placedSymbolArray.get(t.rightJustifiedTextSymbolIndex>=0?t.rightJustifiedTextSymbolIndex:t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.leftJustifiedTextSymbolIndex>=0?t.leftJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex>=0?t.verticalPlacedTextSymbolIndex:i),o=Tc(this.textSizeData,e,r)/xc;return this.tilePixelRatio*o}getSymbolInstanceIconSize(e,t,n){const i=this.icon.placedSymbolArray.get(n),r=Tc(this.iconSizeData,e,i);return this.tilePixelRatio*r}_commitDebugCollisionVertexUpdate(e,t,n){e.emplaceBack(t,-n,-n),e.emplaceBack(t,n,-n),e.emplaceBack(t,n,n),e.emplaceBack(t,-n,n)}_updateTextDebugCollisionBoxes(e,t,n,i,r,o){for(let s=i;s<r;s++){const i=n.get(s),r=this.getSymbolInstanceTextSize(e,o,t,s);this._commitDebugCollisionVertexUpdate(this.textCollisionBox.collisionVertexArrayExt,r,i.padding)}}_updateIconDebugCollisionBoxes(e,t,n,i,r){for(let o=i;o<r;o++){const i=n.get(o),r=this.getSymbolInstanceIconSize(e,t,o);this._commitDebugCollisionVertexUpdate(this.iconCollisionBox.collisionVertexArrayExt,r,i.padding)}}updateCollisionDebugBuffers(e,t){if(!this.hasDebugData())return;this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexArrayExt.clear(),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexArrayExt.clear();const n=Sc(this.iconSizeData,e),i=Sc(this.textSizeData,e);for(let r=0;r<this.symbolInstances.length;r++){const o=this.symbolInstances.get(r);this._updateTextDebugCollisionBoxes(i,e,t,o.textBoxStartIndex,o.textBoxEndIndex,o),this._updateTextDebugCollisionBoxes(i,e,t,o.verticalTextBoxStartIndex,o.verticalTextBoxEndIndex,o),this._updateIconDebugCollisionBoxes(n,e,t,o.iconBoxStartIndex,o.iconBoxEndIndex),this._updateIconDebugCollisionBoxes(n,e,t,o.verticalIconBoxStartIndex,o.verticalIconBoxEndIndex)}this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexBufferExt&&this.textCollisionBox.collisionVertexBufferExt.updateData(this.textCollisionBox.collisionVertexArrayExt),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexBufferExt&&this.iconCollisionBox.collisionVertexBufferExt.updateData(this.iconCollisionBox.collisionVertexArrayExt)}_deserializeCollisionBoxesForSymbol(e,t,n,i,r,o,s,a,l){const c={};for(let u=t;u<n;u++){const t=e.get(u);c.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,padding:t.padding,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.textFeatureIndex=t.featureIndex;break}for(let u=i;u<r;u++){const t=e.get(u);c.verticalTextBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,padding:t.padding,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.verticalTextFeatureIndex=t.featureIndex;break}for(let u=o;u<s;u++){const t=e.get(u);c.iconBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,padding:t.padding,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.iconFeatureIndex=t.featureIndex;break}for(let u=a;u<l;u++){const t=e.get(u);c.verticalIconBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,padding:t.padding,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.verticalIconFeatureIndex=t.featureIndex;break}return c}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){const n=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){const n=e.placedSymbolArray.get(t),i=n.vertexStartIndex+4*n.numGlyphs;for(let r=n.vertexStartIndex;r<i;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)}getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const t=Math.sin(e),n=Math.cos(e),i=[],r=[],o=[];for(let s=0;s<this.symbolInstances.length;++s){o.push(s);const e=this.symbolInstances.get(s);i.push(0|Math.round(t*e.anchorX+n*e.anchorY)),r.push(e.featureIndex)}return o.sort((e,t)=>i[e]-i[t]||r[t]-r[e]),o}addToSortKeyRanges(e,t){const n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===t?n.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const e of this.symbolInstanceIndexes){const t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach((e,t,n)=>{e>=0&&n.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)}),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}ar("SymbolBucket",uh,{omit:["layers","collisionBoxArray","features","compareText"]}),uh.MAX_GLYPHS=65535,uh.addDynamicAttributes=sh;const hh=new bo({"symbol-placement":new go(Ne.layout_symbol["symbol-placement"]),"symbol-spacing":new go(Ne.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new go(Ne.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new yo(Ne.layout_symbol["symbol-sort-key"]),"symbol-z-order":new go(Ne.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new go(Ne.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new go(Ne.layout_symbol["icon-ignore-placement"]),"icon-optional":new go(Ne.layout_symbol["icon-optional"]),"icon-rotation-alignment":new go(Ne.layout_symbol["icon-rotation-alignment"]),"icon-size":new yo(Ne.layout_symbol["icon-size"]),"icon-text-fit":new go(Ne.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new go(Ne.layout_symbol["icon-text-fit-padding"]),"icon-image":new yo(Ne.layout_symbol["icon-image"]),"icon-rotate":new yo(Ne.layout_symbol["icon-rotate"]),"icon-padding":new go(Ne.layout_symbol["icon-padding"]),"icon-keep-upright":new go(Ne.layout_symbol["icon-keep-upright"]),"icon-offset":new yo(Ne.layout_symbol["icon-offset"]),"icon-anchor":new yo(Ne.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new go(Ne.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new go(Ne.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new go(Ne.layout_symbol["text-rotation-alignment"]),"text-field":new yo(Ne.layout_symbol["text-field"]),"text-font":new yo(Ne.layout_symbol["text-font"]),"text-size":new yo(Ne.layout_symbol["text-size"]),"text-max-width":new yo(Ne.layout_symbol["text-max-width"]),"text-line-height":new yo(Ne.layout_symbol["text-line-height"]),"text-letter-spacing":new yo(Ne.layout_symbol["text-letter-spacing"]),"text-justify":new yo(Ne.layout_symbol["text-justify"]),"text-radial-offset":new yo(Ne.layout_symbol["text-radial-offset"]),"text-variable-anchor":new go(Ne.layout_symbol["text-variable-anchor"]),"text-anchor":new yo(Ne.layout_symbol["text-anchor"]),"text-max-angle":new go(Ne.layout_symbol["text-max-angle"]),"text-writing-mode":new go(Ne.layout_symbol["text-writing-mode"]),"text-rotate":new yo(Ne.layout_symbol["text-rotate"]),"text-padding":new go(Ne.layout_symbol["text-padding"]),"text-keep-upright":new go(Ne.layout_symbol["text-keep-upright"]),"text-transform":new yo(Ne.layout_symbol["text-transform"]),"text-offset":new yo(Ne.layout_symbol["text-offset"]),"text-allow-overlap":new go(Ne.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new go(Ne.layout_symbol["text-ignore-placement"]),"text-optional":new go(Ne.layout_symbol["text-optional"])});var dh={paint:new bo({"icon-opacity":new yo(Ne.paint_symbol["icon-opacity"]),"icon-color":new yo(Ne.paint_symbol["icon-color"]),"icon-halo-color":new yo(Ne.paint_symbol["icon-halo-color"]),"icon-halo-width":new yo(Ne.paint_symbol["icon-halo-width"]),"icon-halo-blur":new yo(Ne.paint_symbol["icon-halo-blur"]),"icon-translate":new go(Ne.paint_symbol["icon-translate"]),"icon-translate-anchor":new go(Ne.paint_symbol["icon-translate-anchor"]),"text-opacity":new yo(Ne.paint_symbol["text-opacity"]),"text-color":new yo(Ne.paint_symbol["text-color"],{runtimeType:Ye,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new yo(Ne.paint_symbol["text-halo-color"]),"text-halo-width":new yo(Ne.paint_symbol["text-halo-width"]),"text-halo-blur":new yo(Ne.paint_symbol["text-halo-blur"]),"text-translate":new go(Ne.paint_symbol["text-translate"]),"text-translate-anchor":new go(Ne.paint_symbol["text-translate-anchor"])}),layout:hh};class ph{constructor(e){this.type=e.property.overrides?e.property.overrides.runtimeType:He,this.defaultValue=e}evaluate(e){if(e.formattedSection){const t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ar("FormatSectionOverride",ph,{omit:["defaultValue"]});class fh extends Ns{constructor(e){super(e,dh)}recalculate(e,t){if(super.recalculate(e,t),"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")){const e=this.layout.get("text-writing-mode");if(e){const t=[];for(const n of e)t.indexOf(n)<0&&t.push(n);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,n,i){const r=this.layout.get(e).evaluate(t,{},n,i),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||ci(o.value)||!r?r:function(e,t){return t.replace(/{([^{}]+)}/g,(t,n)=>n in e?String(e[n]):"")}(t.properties,r)}createBucket(e){return new uh(e)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const e of dh.paint.overridableProperties){if(!fh.hasPaintOverride(this.layout,e))continue;const t=this.paint.get(e),n=new ph(t),i=new li(n,t.property.specification);let r=null;r="constant"===t.value.kind||"source"===t.value.kind?new hi("source",i):new di("composite",i,t.value.zoomStops,t.value._interpolationType),this.paint._values[e]=new fo(t.property,r,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,n){return!(!this.layout||t.isDataDriven()||n.isDataDriven())&&fh.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){const n=e.get("text-field"),i=dh.paint.properties[t];let r=!1;const o=e=>{for(const t of e)if(i.overrides&&i.overrides.hasOverride(t))return void(r=!0)};if("constant"===n.value.kind&&n.value.value instanceof pt)o(n.value.value.sections);else if("source"===n.value.kind){const e=t=>{r||(t instanceof _t&&yt(t.value)===et?o(t.value.sections):t instanceof Tt?o(t.sections):t.eachChild(e))},t=n.value;t._styleExpression&&e(t._styleExpression.expression)}return r}getProgramConfiguration(e){return new Ms(this,e)}}var mh={paint:new bo({"background-color":new go(Ne.paint_background["background-color"]),"background-pattern":new _o(Ne.paint_background["background-pattern"]),"background-opacity":new go(Ne.paint_background["background-opacity"])})},gh={paint:new bo({"raster-opacity":new go(Ne.paint_raster["raster-opacity"]),"raster-hue-rotate":new go(Ne.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new go(Ne.paint_raster["raster-brightness-min"]),"raster-brightness-max":new go(Ne.paint_raster["raster-brightness-max"]),"raster-saturation":new go(Ne.paint_raster["raster-saturation"]),"raster-contrast":new go(Ne.paint_raster["raster-contrast"]),"raster-resampling":new go(Ne.paint_raster["raster-resampling"]),"raster-fade-duration":new go(Ne.paint_raster["raster-fade-duration"])})};class yh extends Ns{constructor(e){super(e,{}),this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){}serialize(){}onAdd(e){this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)}onRemove(e){this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)}}var vh={paint:new bo({"sky-type":new go(Ne.paint_sky["sky-type"]),"sky-atmosphere-sun":new go(Ne.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new go(Ne.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new go(Ne.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new go(Ne.paint_sky["sky-gradient-radius"]),"sky-gradient":new xo(Ne.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new go(Ne.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new go(Ne.paint_sky["sky-atmosphere-color"]),"sky-opacity":new go(Ne.paint_sky["sky-opacity"])})};function _h(e,t,n){const i=xa(0,0,1),r=Da(Pa());return function(e,t,n){n*=.5;var i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l-o*a,e[1]=r*l+s*a,e[2]=o*l+i*a,e[3]=s*l-r*a}(r,r,n?-u(e)+Math.PI:u(e)),La(r,r,-u(t)),Ea(i,i,r),Sa(i,i)}const xh={circle:class extends Ns{constructor(e){super(e,da)}createBucket(e){return new Zs(e)}queryRadius(e){const t=e;return aa("circle-radius",this,t)+aa("circle-stroke-width",this,t)+la(this.paint.get("circle-translate"))}queryIntersectsFeature(e,t,n,i,r,o,s,a){const l="map"===this.paint.get("circle-pitch-alignment");if(l&&e.queryGeometry.isAboveHorizon)return!1;const c=ua(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,e.pixelToTileUnitsFactor),u=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),h=l?u*e.pixelToTileUnitsFactor:u;for(const d of i)for(const t of d){const n=t.add(c),i=a&&o.elevation?o.elevation.exaggeration()*a.getElevationAt(n.x,n.y,!0):0,r=l?n:Oa(n,i,s),u=l?e.tilespaceRays.map(e=>Fa(e,i)):e.queryGeometry.screenGeometry;let d=h;const p=Ma([],[t.x,t.y,i,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?d*=p[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(d*=o.cameraToCenterDistance/p[3]),Ys(u,r,d))return!0}return!1}getProgramIds(){return["circle"]}getProgramConfiguration(e){return new Ms(this,e)}},heatmap:class extends Ns{createBucket(e){return new Na(e)}constructor(e){super(e,qa),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ga({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(e){return new Ms(this,e)}},hillshade:class extends Ns{constructor(e){super(e,Ha)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}getProgramConfiguration(e){return new Ms(this,e)}},fill:class extends Ns{constructor(e){super(e,Ll)}getProgramIds(){const e=this.paint.get("fill-pattern"),t=e&&e.constantOr(1),n=[t?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&n.push(t&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),n}getProgramConfiguration(e){return new Ms(this,e)}recalculate(e,t){super.recalculate(e,t);const n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new Pl(e)}queryRadius(){return la(this.paint.get("fill-translate"))}queryIntersectsFeature(e,t,n,i,r,o){return!e.queryGeometry.isAboveHorizon&&Qs(ca(e.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,e.pixelToTileUnitsFactor),i)}isTileClipped(){return!0}},"fill-extrusion":class extends Ns{constructor(e){super(e,Kl)}createBucket(e){return new Yl(e)}queryRadius(){return la(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(e){return new Ms(this,e)}queryIntersectsFeature(e,t,n,i,o,s,a,l,c){const u=ua(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),s.angle,e.pixelToTileUnitsFactor),h=this.paint.get("fill-extrusion-height").evaluate(t,n),d=this.paint.get("fill-extrusion-base").evaluate(t,n),p=[0,0],f=l&&s.elevation,m=s.elevation?s.elevation.exaggeration():1;if(f){const t=e.tile.getBucket(this).centroidVertexArray,n=c+1;if(n<t.length){const e=t.get(n);p[0]=e.a_centroid_pos0,p[1]=e.a_centroid_pos1}}if(0===p[0]&&1===p[1])return!1;const g=function(e,t,n,i,o,s,a,l,c){return s?function(e,t,n,i,r,o,s,a,l){const c=[],u=[],h=[0,0,0,1];for(const d of e){const e=[],p=[];for(const c of d){const u=c.x+i.x,d=c.y+i.y,f=nc(u,d,t,n,o,s,a,l);h[0]=u,h[1]=d,h[2]=f.base,h[3]=1,Ma(h,h,r),h[3]=Math.max(h[3],1e-5);const m=tc([h[0]/h[3],h[1]/h[3],h[2]/h[3]]);h[0]=u,h[1]=d,h[2]=f.top,h[3]=1,Ma(h,h,r),h[3]=Math.max(h[3],1e-5);const g=tc([h[0]/h[3],h[1]/h[3],h[2]/h[3]]);e.push(m),p.push(g)}c.push(e),u.push(p)}return[c,u]}(e,t,n,i,o,s,a,l,c):function(e,t,n,i,o){const s=[],a=[],l=o[8]*t,c=o[9]*t,u=o[10]*t,h=o[11]*t,d=o[8]*n,p=o[9]*n,f=o[10]*n,m=o[11]*n;for(const g of e){const e=[],t=[];for(const n of g){const s=n.x+i.x,a=n.y+i.y,g=o[0]*s+o[4]*a+o[12],y=o[1]*s+o[5]*a+o[13],v=o[2]*s+o[6]*a+o[14],_=o[3]*s+o[7]*a+o[15],x=g+l,b=y+c,w=v+u,T=Math.max(_+h,1e-5),S=g+d,E=y+p,k=v+f,C=Math.max(_+m,1e-5),A=new r(x/T,b/T);A.z=w/T,e.push(A);const I=new r(S/C,E/C);I.z=k/C,t.push(I)}s.push(e),a.push(t)}return[s,a]}(e,t,n,i,o)}(i,d,h,u,a,f?l:null,p,m,s.center.lat),y=e.queryGeometry;return function(e,t,n){let i=1/0;Qs(n,t)&&(i=ec(n,t[0]));for(let r=0;r<t.length;r++){const o=t[r],s=e[r];for(let e=0;e<o.length-1;e++){const t=o[e],r=[t,o[e+1],s[e+1],s[e],t];Xs(n,r)&&(i=Math.min(i,ec(n,r)))}}return i!==1/0&&i}(g[0],g[1],y.isPointQuery()?y.screenBounds:y.screenGeometry)}},line:class extends Ns{constructor(e){super(e,hc),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){const e=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=e._styleExpression&&e._styleExpression.expression instanceof tn,this.gradientVersion=(this.gradientVersion+1)%a}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=dc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new cc(e)}getProgramIds(){const e=this.paint.get("line-dasharray"),t=this.paint.get("line-pattern").constantOr(1),n=this.paint.get("line-gradient");return[t?"linePattern":e?"lineSDF":n?"lineGradient":"line"]}getProgramConfiguration(e){return new Ms(this,e)}queryRadius(e){const t=e,n=pc(aa("line-width",this,t),aa("line-gap-width",this,t)),i=aa("line-offset",this,t);return n/2+Math.abs(i)+la(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,n,i,o,s){if(e.queryGeometry.isAboveHorizon)return!1;const a=ca(e.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),s.angle,e.pixelToTileUnitsFactor),l=e.pixelToTileUnitsFactor/2*pc(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),c=this.paint.get("line-offset").evaluate(t,n);return c&&(i=function(e,t){const n=[],i=new r(0,0);for(let r=0;r<e.length;r++){const o=e[r],s=[];for(let e=0;e<o.length;e++){const n=o[e-1],r=o[e],a=o[e+1],l=0===e?i:r.sub(n)._unit()._perp(),c=e===o.length-1?i:a.sub(r)._unit()._perp(),u=l._add(c)._unit();u._mult(1/(u.x*c.x+u.y*c.y)),s.push(u._mult(t)._add(r))}n.push(s)}return n}(i,c*e.pixelToTileUnitsFactor)),function(e,t,n){for(let i=0;i<t.length;i++){const r=t[i];if(e.length>=3)for(let t=0;t<r.length;t++)if(ra(e,r[t]))return!0;if(Ks(e,r,n))return!0}return!1}(a,i,l)}isTileClipped(){return!0}},symbol:fh,background:class extends Ns{constructor(e){super(e,mh)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}},raster:class extends Ns{constructor(e){super(e,gh)}getProgramIds(){return["raster"]}},sky:class extends Ns{constructor(e){super(e,vh),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"sky-gradient"===e?this._updateColorRamp():"sky-atmosphere-sun"!==e&&"sky-atmosphere-halo-color"!==e&&"sky-atmosphere-color"!==e&&"sky-atmosphere-sun-intensity"!==e||(this._skyboxInvalidated=!0)}_updateColorRamp(){this.colorRamp=Ga({expression:this._transitionablePaint._values["sky-gradient"].value.expression,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(e){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const t=e.style.light.properties.get("position");return this._lightPosition.azimuthal!==t.azimuthal||this._lightPosition.polar!==t.polar}}getCenter(e,t){const n=this.paint.get("sky-type");if("atmosphere"===n){const n=this.paint.get("sky-atmosphere-sun"),i=!n,r=e.style.light,o=r.properties.get("position");return i&&"viewport"===r.properties.get("anchor")&&P("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),i?_h(o.azimuthal,90-o.polar,t):_h(n[0],90-n[1],t)}if("gradient"===n){const e=this.paint.get("sky-gradient-center");return _h(e[0],90-e[1],t)}}is3D(){return!1}isSky(){return!0}markSkyboxValid(e){this._skyboxInvalidated=!1,this._lightPosition=e.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const e=this.paint.get("sky-type");return"atmosphere"===e?["skyboxCapture","skybox"]:"gradient"===e?["skyboxGradient"]:null}}},{HTMLImageElement:bh,HTMLCanvasElement:wh,HTMLVideoElement:Th,ImageData:Sh,ImageBitmap:Eh}=s;class kh{constructor(e,t,n,i){this.context=e,this.format=n,this.texture=e.gl.createTexture(),this.update(t,i)}update(e,t,n){const{width:i,height:r}=e,o=!(this.size&&this.size[0]===i&&this.size[1]===r||n),{context:s}=this,{gl:a}=s;if(this.useMipmap=Boolean(t&&t.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!t||!1!==t.premultiply)),o)this.size=[i,r],e instanceof bh||e instanceof wh||e instanceof Th||e instanceof Sh||Eh&&e instanceof Eh?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,e):a.texImage2D(a.TEXTURE_2D,0,this.format,i,r,0,this.format,a.UNSIGNED_BYTE,e.data);else{const{x:t,y:o}=n||{x:0,y:0};e instanceof bh||e instanceof wh||e instanceof Th||e instanceof Sh||Eh&&e instanceof Eh?a.texSubImage2D(a.TEXTURE_2D,0,t,o,a.RGBA,a.UNSIGNED_BYTE,e):a.texSubImage2D(a.TEXTURE_2D,0,t,o,i,r,a.RGBA,a.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)}bind(e,t,n){const{context:i}=this,{gl:r}=i;r.bindTexture(r.TEXTURE_2D,this.texture),n!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=r.LINEAR),e!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n||e),this.filter=e),t!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}class Ch{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof Ih?new Ih(e.lng,e.lat):Ih.convert(e),this}setSouthWest(e){return this._sw=e instanceof Ih?new Ih(e.lng,e.lat):Ih.convert(e),this}extend(e){const t=this._sw,n=this._ne;let i,r;if(e instanceof Ih)i=e,r=e;else{if(!(e instanceof Ch))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Ch.convert(e)):this.extend(Ih.convert(e)):this;if(i=e._sw,r=e._ne,!i||!r)return this}return t||n?(t.lng=Math.min(i.lng,t.lng),t.lat=Math.min(i.lat,t.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new Ih(i.lng,i.lat),this._ne=new Ih(r.lng,r.lat)),this}getCenter(){return new Ih((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Ih(this.getWest(),this.getNorth())}getSouthEast(){return new Ih(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:n}=Ih.convert(e);let i=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=t&&t>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i}static convert(e){return!e||e instanceof Ch?e:new Ch(e)}}const Ah=6371008.8;class Ih{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ih(g(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const t=Math.PI/180,n=this.lat*t,i=e.lat*t,r=Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((e.lng-this.lng)*t);return Ah*Math.acos(Math.min(r,1))}toBounds(e=0){const t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new Ch(new Ih(this.lng-n,this.lat-t),new Ih(this.lng+n,this.lat+t))}static convert(e){if(e instanceof Ih)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Ih(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Ih(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const Mh=2*Math.PI*Ah;function Ph(e){return Mh*Math.cos(e*Math.PI/180)}function Dh(e){return(180+e)/360}function Lh(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Oh(e,t){return e/Ph(t)}function zh(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function Rh(e,t){return e*Ph(zh(t))}class Fh{constructor(e,t,n=0){this.x=+e,this.y=+t,this.z=+n}static fromLngLat(e,t=0){const n=Ih.convert(e);return new Fh(Dh(n.lng),Lh(n.lat),Oh(t,n.lat))}toLngLat(){return new Ih(360*this.x-180,zh(this.y))}toAltitude(){return Rh(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Mh*(e=zh(this.y),1/Math.cos(e*Math.PI/180));var e}}class Nh{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.image=new $a({width:e,height:t}),this.positions={},this.uploaded=!1}getDash(e,t){const n=this.getKey(e,t);return this.positions[n]}trim(){const e=this.width,t=this.height=T(this.nextRow);this.image.resize({width:e,height:t})}getKey(e,t){return e.join(",")+t}getDashRanges(e,t,n){const i=[];let r=e.length%2==1?-e[e.length-1]*n:0,o=e[0]*n,s=!0;i.push({left:r,right:o,isDash:s,zeroLength:0===e[0]});let a=e[0];for(let l=1;l<e.length;l++){s=!s;const t=e[l];r=a*n,a+=t,o=a*n,i.push({left:r,right:o,isDash:s,zeroLength:0===t})}return i}addRoundDash(e,t,n){const i=t/2;for(let r=-n;r<=n;r++){const t=this.width*(this.nextRow+n+r);let o=0,s=e[o];for(let a=0;a<this.width;a++){a/s.right>1&&(s=e[++o]);const l=Math.abs(a-s.left),c=Math.abs(a-s.right),u=Math.min(l,c);let h;const d=r/n*(i+1);if(s.isDash){const e=i-Math.abs(d);h=Math.sqrt(u*u+e*e)}else h=i-Math.sqrt(u*u+d*d);this.image.data[t+a]=Math.max(0,Math.min(255,h+128))}}}addRegularDash(e,t){for(let a=e.length-1;a>=0;--a){const t=e[a],n=e[a+1];t.zeroLength?e.splice(a,1):n&&n.isDash===t.isDash&&(n.left=t.left,e.splice(a,1))}const n=e[0],i=e[e.length-1];n.isDash===i.isDash&&(n.left=i.left-this.width,i.right=n.right+this.width);const r=this.width*this.nextRow;let o=0,s=e[o];for(let a=0;a<this.width;a++){a/s.right>1&&(s=e[++o]);const n=Math.abs(a-s.left),i=Math.abs(a-s.right),l=Math.min(n,i);this.image.data[r+a]=Math.max(0,Math.min(255,(s.isDash?l:-l)+t+128))}}addDash(e,t){const n=this.getKey(e,t);if(this.positions[n])return this.positions[n];const i="round"===t,r=i?7:0,o=2*r+1;if(this.nextRow+o>this.height)return P("LineAtlas out of space"),null;0===e.length&&e.push(1);let s=0;for(let c=0;c<e.length;c++)e[c]<0&&(P("Negative value is found in line dasharray, replacing values with 0"),e[c]=0),s+=e[c];if(0!==s){const n=this.width/s,o=this.getDashRanges(e,this.width,n);i?this.addRoundDash(o,n,r):this.addRegularDash(o,"square"===t?.5*n:0)}const a=this.nextRow+r;this.nextRow+=o;const l={tl:[a,r],br:[s,0]};return this.positions[n]=l,l}}ar("LineAtlas",Nh);class Bh{constructor(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const jh=s.performance;function Vh(e){const t=e?e.url.toString():void 0;return jh.getEntriesByName(t)}class $h{constructor(){this.tasks={},this.taskQueue=[],E(["process"],this),this.invoker=new Bh(this.process),this.nextId=0}add(e,t){const n=this.nextId++,i=function({type:e,isSymbolTile:t,zoom:n}){return n=n||0,"message"===e?0:"maybePrepare"!==e||t?"parseTile"!==e||t?"parseTile"===e&&t?300-n:"maybePrepare"===e&&t?400-n:500:200-n:100-n}(t);if(0===i){O();try{e()}finally{}return{cancel:()=>{}}}return this.tasks[n]={fn:e,metadata:t,priority:i,id:n},this.taskQueue.push(n),this.invoker.trigger(),{cancel:()=>{delete this.tasks[n]}}}process(){O();try{if(this.taskQueue=this.taskQueue.filter(e=>!!this.tasks[e]),!this.taskQueue.length)return;const e=this.pick();if(null===e)return;const t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),!t)return;t.fn()}finally{}}pick(){let e=null,t=1/0;for(let i=0;i<this.taskQueue.length;i++){const n=this.tasks[this.taskQueue[i]];n.priority<t&&(t=n.priority,e=i)}if(null===e)return null;const n=this.taskQueue[e];return this.taskQueue.splice(e,1),n}remove(){this.invoker.remove()}}function Uh(e,t,n){var i=2*Math.PI*6378137/256/Math.pow(2,n);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}class qh{constructor(e,t,n){this.z=e,this.x=t,this.y=n,this.key=Wh(0,e,e,t,n)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t){const n=(r=this.y,o=this.z,s=Uh(256*(i=this.x),256*(r=Math.pow(2,o)-r-1),o),a=Uh(256*(i+1),256*(r+1),o),s[0]+","+s[1]+","+a[0]+","+a[1]);var i,r,o,s,a;const l=function(e,t,n){let i,r="";for(let o=e;o>0;o--)i=1<<o-1,r+=(t&i?1:0)+(n&i?2:0);return r}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",n)}getTilePoint(e){const t=Math.pow(2,this.z);return new r((e.x*t-this.x)*$s,(e.y*t-this.y)*$s)}getTileVec3(e){const t=Math.pow(2,this.z);return xa((e.x*t-this.x)*$s,(e.y*t-this.y)*$s,Rh(e.z,e.y))}toString(){return`${this.z}/${this.x}/${this.y}`}}class Gh{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Wh(e,t.z,t.z,t.x,t.y)}}class Hh{constructor(e,t,n,i,r){this.overscaledZ=e,this.wrap=t,this.canonical=new qh(n,+i,+r),this.key=0===t&&e===n?this.canonical.key:Wh(t,e,n,i,r)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){const t=this.canonical.z-e;return e>this.canonical.z?new Hh(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Hh(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t=!0){if(this.overscaledZ===e&&t)return this.key;if(e>this.canonical.z)return Wh(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y);{const n=this.canonical.z-e;return Wh(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)}}isChildOf(e){if(e.wrap!==this.wrap)return!1;const t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new Hh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const t=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new Hh(t,this.wrap,t,n,i),new Hh(t,this.wrap,t,n+1,i),new Hh(t,this.wrap,t,n,i+1),new Hh(t,this.wrap,t,n+1,i+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new Hh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new Hh(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Gh(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new Fh(e.x-this.wrap,e.y))}getTileVec3(e){return this.canonical.getTileVec3(new Fh(e.x-this.wrap,e.y,e.z))}}function Wh(e,t,n,i,r){const o=1<<Math.min(n,22);let s=o*(r%o)+i%o;return e&&n<22&&(s+=o*o*((e<0?-2*e-1:2*e)%(1<<2*(22-n)))),16*(32*s+n)+(t-n)}ar("CanonicalTileID",qh),ar("OverscaledTileID",Hh,{omit:["projMatrix"]});class Zh{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){const n=e[t];this._stringToNumber[n]=t,this._numberToString[t]=n}}encode(e){return this._stringToNumber[e]}decode(e){return this._numberToString[e]}}class Xh{constructor(e,t,n,i,r){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=n,e._y=i,this.properties=e.properties,this.id=r}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}var Yh=ko([{name:"a_pos",type:"Int16",components:2}]);class Qh{constructor(e,t,n){this.tileID=e,this.uid=b(),this.uses=0,this.tileSize=t,this.tileZoom=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const t=e+this.timeAdded;t<$.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}loadVectorData(e,t,n){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){const n={};if(!t)return n;for(const i of e){const e=i.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length){i.layers=e,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0]));for(const t of e)n[t.id]=i}}return n}(e.buckets,t.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const t=this.buckets[e];if(t instanceof uh){if(this.hasSymbolBuckets=!0,!n)break;t.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const t=this.buckets[e];if(t instanceof uh&&t.hasRTLText){this.hasRTLText=!0,oo.isLoading()||oo.isLoaded()||"deferred"!==io()||ro();break}}this.queryPadding=0;for(const e in this.buckets){const n=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(e).queryRadius(n))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),e.lineAtlas&&(this.lineAtlas=e.lineAtlas)}else this.collisionBoxArray=new Qo}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const n in this.buckets){const t=this.buckets[n];t.uploadPending()&&t.upload(e)}const t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new kh(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new kh(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new kh(e,this.lineAtlas.image,t.ALPHA),this.lineAtlas.uploaded=!0)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,n,i,r,o,s,a){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:i,pixelPosMatrix:s,transform:o,params:r},e,t,n):{}}querySourceFeatures(e,t){const n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;const i=n.loadVTLayers(),r=t?t.sourceLayer:"",o=i._geojsonTileLayer||i[r];if(!o)return;const s=Si(t&&t.filter),{z:a,x:l,y:c}=this.tileID.canonical,u={z:a,x:l,y:c};for(let h=0;h<o.length;h++){const t=o.feature(h);if(s.needGeometry){const e=Hs(t,!0);if(!s.filter(new so(this.tileID.overscaledZ),e,this.tileID.canonical))continue}else if(!s.filter(new so(this.tileID.overscaledZ),t))continue;const i=n.getId(t,r),d=new Xh(t,a,l,c,i);d.tile=u,e.push(d)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const t=this.expirationTime;if(e.cacheControl){const t=z(e.cacheControl);t["max-age"]&&(this.expirationTime=Date.now()+1e3*t["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const e=Date.now();let n=!1;if(this.expirationTime>e)n=!1;else if(t)if(this.expirationTime<t)n=!0;else{const i=this.expirationTime-t;i?this.expirationTime=e+Math.max(i,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(e,t){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(e).length)return;const n=this.latestFeatureIndex.loadVTLayers();for(const i in this.buckets){if(!t.style.hasLayer(i))continue;const r=this.buckets[i],o=r.layers[0].sourceLayer||"_geojsonTileLayer",s=n[o],a=e[o];if(!s||!a||0===Object.keys(a).length)continue;r.update(a,s,this.imageAtlas&&this.imageAtlas.patternPositions||{});const l=t&&t.style&&t.style.getLayer(i);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(r)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<$.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=$.now()+e}setDependencies(e,t){const n={};for(const i of t)n[i]=!0;this.dependencies[e]=n}hasDependency(e,t){for(const n of e){const e=this.dependencies[n];if(e)for(const n of t)if(e[n])return!0}return!1}clearQueryDebugViz(){}}class Kh{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,t,n){const i=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][i]=this.stateChanges[e][i]||{},_(this.stateChanges[e][i],n),null===this.deletedStates[e]){this.deletedStates[e]={};for(const t in this.state[e])t!==i&&(this.deletedStates[e][t]=null)}else if(this.deletedStates[e]&&null===this.deletedStates[e][i]){this.deletedStates[e][i]={};for(const t in this.state[e][i])n[t]||(this.deletedStates[e][i][t]=null)}else for(const r in n)this.deletedStates[e]&&this.deletedStates[e][i]&&null===this.deletedStates[e][i][r]&&delete this.deletedStates[e][i][r]}removeFeatureState(e,t,n){if(null===this.deletedStates[e])return;const i=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},n&&void 0!==t)null!==this.deletedStates[e][i]&&(this.deletedStates[e][i]=this.deletedStates[e][i]||{},this.deletedStates[e][i][n]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][i])for(n in this.deletedStates[e][i]={},this.stateChanges[e][i])this.deletedStates[e][i][n]=null;else this.deletedStates[e][i]=null;else this.deletedStates[e]=null}getState(e,t){const n=String(t),i=_({},(this.state[e]||{})[n],(this.stateChanges[e]||{})[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){const n=this.deletedStates[e][t];if(null===n)return{};for(const e in n)delete i[e]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,t){const n={};for(const i in this.stateChanges){this.state[i]=this.state[i]||{};const e={};for(const t in this.stateChanges[i])this.state[i][t]||(this.state[i][t]={}),_(this.state[i][t],this.stateChanges[i][t]),e[t]=this.state[i][t];n[i]=e}for(const i in this.deletedStates){this.state[i]=this.state[i]||{};const e={};if(null===this.deletedStates[i])for(const t in this.state[i])e[t]={},this.state[i][t]={};else for(const t in this.deletedStates[i]){if(null===this.deletedStates[i][t])this.state[i][t]={};else for(const e of Object.keys(this.deletedStates[i][t]))delete this.state[i][t][e];e[t]=this.state[i][t]}n[i]=n[i]||{},_(n[i],e)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(const i in e)e[i].setFeatureState(n,t)}}class Jh{constructor(e){this.size=e,this.minimums=[],this.maximums=[],this.leaves=[]}getElevation(e,t){const n=this.toIdx(e,t);return{min:this.minimums[n],max:this.maximums[n]}}isLeaf(e,t){return this.leaves[this.toIdx(e,t)]}toIdx(e,t){return t*this.size+e}}function ed(e,t,n,i){let r=0,o=Number.MAX_VALUE;for(let s=0;s<3;s++)if(Math.abs(i[s])<1e-15){if(n[s]<e[s]||n[s]>t[s])return null}else{const a=1/i[s];let l=(e[s]-n[s])*a,c=(t[s]-n[s])*a;if(l>c){const e=l;l=c,c=e}if(l>r&&(r=l),c<o&&(o=c),r>o)return null}return r}function td(e,t,n,i,r,o,s,a,l,c,u){const h=i-e,d=r-t,p=o-n,f=s-e,m=a-t,g=l-n,y=u[1]*g-u[2]*m,v=u[2]*f-u[0]*g,_=u[0]*m-u[1]*f,x=h*y+d*v+p*_;if(Math.abs(x)<1e-15)return null;const b=1/x,w=c[0]-e,T=c[1]-t,S=c[2]-n,E=(w*y+T*v+S*_)*b;if(E<0||E>1)return null;const k=T*p-S*d,C=S*h-w*p,A=w*d-T*h,I=(u[0]*k+u[1]*C+u[2]*A)*b;return I<0||E+I>1?null:(f*k+m*C+g*A)*b}function nd(e,t,n){return(e-t)/(n-t)}function id(e,t,n,i,r,o,s,a,l){const c=1<<n,u=o-i,h=s-r,d=(e+1)/c*u+i,p=(t+0)/c*h+r,f=(t+1)/c*h+r;a[0]=(e+0)/c*u+i,a[1]=p,l[0]=d,l[1]=f}class rd{constructor(e){if(this.maximums=[],this.minimums=[],this.leaves=[],this.childOffsets=[],this.nodeCount=0,this.dem=e,this._siblingOffset=[[0,0],[1,0],[0,1],[1,1]],!this.dem)return;const t=function(e){const t=Math.ceil(Math.log2(e.dim/8)),n=[];let i=Math.ceil(Math.pow(2,t));const r=1/i,o=(e,t,n,i,r)=>{const o=i?1:0,s=(e+1)*n-o,a=t*n,l=(t+1)*n-o;r[0]=e*n,r[1]=a,r[2]=s,r[3]=l};let s=new Jh(i);const a=[];for(let l=0;l<i*i;l++){o(l%i,Math.floor(l/i),r,!1,a);const t=sd(a[0],a[1],e),n=sd(a[2],a[1],e),c=sd(a[2],a[3],e),u=sd(a[0],a[3],e);s.minimums.push(Math.min(t,n,c,u)),s.maximums.push(Math.max(t,n,c,u)),s.leaves.push(1)}for(n.push(s),i/=2;i>=1;i/=2){const e=n[n.length-1];s=new Jh(i);for(let t=0;t<i*i;t++){o(t%i,Math.floor(t/i),2,!0,a);const n=e.getElevation(a[0],a[1]),r=e.getElevation(a[2],a[1]),l=e.getElevation(a[2],a[3]),c=e.getElevation(a[0],a[3]),u=e.isLeaf(a[0],a[1]),h=e.isLeaf(a[2],a[1]),d=e.isLeaf(a[2],a[3]),p=e.isLeaf(a[0],a[3]),f=Math.min(n.min,r.min,l.min,c.min),m=Math.max(n.max,r.max,l.max,c.max),g=u&&h&&d&&p;s.maximums.push(m),s.minimums.push(f),s.leaves.push(m-f<=5&&g?1:0)}n.push(s)}return n}(this.dem),n=t.length-1,i=t[n];this._addNode(i.minimums[0],i.maximums[0],i.leaves[0]),this._construct(t,0,0,n,0)}raycastRoot(e,t,n,i,r,o,s=1){return ed([e,t,-100],[n,i,this.maximums[0]*s],r,o)}raycast(e,t,n,i,r,o,s=1){if(!this.nodeCount)return null;const a=this.raycastRoot(e,t,n,i,r,o,s);if(null==a)return null;const l=[],c=[],u=[],h=[],d=[{idx:0,t:a,nodex:0,nodey:0,depth:0}];for(;d.length>0;){const{idx:a,t:p,nodex:f,nodey:m,depth:g}=d.pop();if(this.leaves[a]){id(f,m,g,e,t,n,i,u,h);const a=1<<g,l=(f+0)/a,c=(f+1)/a,d=(m+0)/a,y=(m+1)/a,v=sd(l,d,this.dem)*s,_=sd(c,d,this.dem)*s,x=sd(c,y,this.dem)*s,b=sd(l,y,this.dem)*s,w=td(u[0],u[1],v,h[0],u[1],_,h[0],h[1],x,r,o),T=td(h[0],h[1],x,u[0],h[1],b,u[0],u[1],v,r,o),S=Math.min(null!==w?w:Number.MAX_VALUE,null!==T?T:Number.MAX_VALUE);if(S!==Number.MAX_VALUE)return S;{const e=Ta([],r,o,p);if(od(v,_,b,x,nd(e[0],u[0],h[0]),nd(e[1],u[1],h[1]))>=e[2])return p}continue}let y=0;for(let d=0;d<this._siblingOffset.length;d++){id((f<<1)+this._siblingOffset[d][0],(m<<1)+this._siblingOffset[d][1],g+1,e,t,n,i,u,h),u[2]=-100,h[2]=this.maximums[this.childOffsets[a]+d]*s;const p=ed(u,h,r,o);if(null!=p){const e=p;l[d]=e;let t=!1;for(let n=0;n<y&&!t;n++)e>=l[c[n]]&&(c.splice(n,0,d),t=!0);t||(c[y]=d),y++}}for(let e=0;e<y;e++){const t=c[e];d.push({idx:this.childOffsets[a]+t,t:l[t],nodex:(f<<1)+this._siblingOffset[t][0],nodey:(m<<1)+this._siblingOffset[t][1],depth:g+1})}}return null}_addNode(e,t,n){return this.minimums.push(e),this.maximums.push(t),this.leaves.push(n),this.childOffsets.push(0),this.nodeCount++}_construct(e,t,n,i,r){if(1===e[i].isLeaf(t,n))return;this.childOffsets[r]||(this.childOffsets[r]=this.nodeCount);const o=i-1,s=e[o];let a,l=0;for(let c=0;c<this._siblingOffset.length;c++){const e=2*t+this._siblingOffset[c][0],i=2*n+this._siblingOffset[c][1],r=s.getElevation(e,i),o=s.isLeaf(e,i),u=this._addNode(r.min,r.max,o);o&&(l|=1<<c),a||(a=u)}for(let c=0;c<this._siblingOffset.length;c++)l&1<<c||this._construct(e,2*t+this._siblingOffset[c][0],2*n+this._siblingOffset[c][1],o,a+c)}}function od(e,t,n,i,r,o){return nn(nn(e,n,o),nn(t,i,o),r)}function sd(e,t,n){const i=n.dim,r=m(e*i-.5,0,i-1),o=m(t*i-.5,0,i-1),s=Math.floor(r),a=Math.floor(o),l=Math.min(s+1,i-1),c=Math.min(a+1,i-1);return od(n.get(s,a),n.get(l,a),n.get(s,c),n.get(l,c),r-s,o-a)}const ad={mapbox:[6553.6,25.6,.1,1e4],terrarium:[256,1,1/256,32768]};class ld{get tree(){return this._tree||this._buildQuadTree(),this._tree}constructor(e,t,n,i=!1,r=!1){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return P(`"${n}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=t.height;const o=this.dim=t.height-2;if(this.data=new Uint32Array(t.data.buffer),this.encoding=n||"mapbox",this.borderReady=i,!i){for(let e=0;e<o;e++)this.data[this._idx(-1,e)]=this.data[this._idx(0,e)],this.data[this._idx(o,e)]=this.data[this._idx(o-1,e)],this.data[this._idx(e,-1)]=this.data[this._idx(e,0)],this.data[this._idx(e,o)]=this.data[this._idx(e,o-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(o,-1)]=this.data[this._idx(o-1,0)],this.data[this._idx(-1,o)]=this.data[this._idx(0,o-1)],this.data[this._idx(o,o)]=this.data[this._idx(o-1,o-1)],r&&this._buildQuadTree()}}_buildQuadTree(){this._tree=new rd(this)}get(e,t,n=!1){const i=new Uint8Array(this.data.buffer);n&&(e=m(e,-1,this.dim),t=m(t,-1,this.dim));const r=4*this._idx(e,t);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(i[r],i[r+1],i[r+2])}static getUnpackVector(e){return ad[e]}get unpackVector(){return ad[this.encoding]}_idx(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}_unpackMapbox(e,t,n){return(256*e*256+256*t+n)/10-1e4}_unpackTerrarium(e,t,n){return 256*e+t+n/256-32768}static pack(e,t){const n=[0,0,0,0],i=ld.getUnpackVector(t);let r=Math.floor((e+i[3])/i[2]);return n[2]=r%256,r=Math.floor(r/256),n[1]=r%256,r=Math.floor(r/256),n[0]=r,n}getPixels(){return new Ua({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let i=t*this.dim,r=t*this.dim+this.dim,o=n*this.dim,s=n*this.dim+this.dim;switch(t){case-1:i=r-1;break;case 1:r=i+1}switch(n){case-1:o=s-1;break;case 1:s=o+1}const a=-t*this.dim,l=-n*this.dim;for(let c=o;c<s;c++)for(let t=i;t<r;t++)this.data[this._idx(t,c)]=e.data[this._idx(t+a,c+l)]}onDeserialize(){this._tree&&(this._tree.dem=this)}}ar("DEMData",ld),ar("DemMinMaxQuadTree",rd,{omit:["dem"]});class cd{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(const e in this.data)for(const t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,n){const i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);const r={value:t,timeout:void 0};if(void 0!==n&&(r.timeout=setTimeout(()=>{this.remove(e,r)},n)),this.data[i].push(r),this.order.push(i),this.order.length>this.max){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){const t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;const n=e.wrapped().key,i=void 0===t?0:this.data[n].indexOf(t),r=this.data[n][i];return this.data[n].splice(i,1),r.timeout&&clearTimeout(r.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(r.value),this.order.splice(this.order.indexOf(n),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){const t=[];for(const n in this.data)for(const i of this.data[n])e(i.value)||t.push(i);for(const n of t)this.remove(n.value.tileID,n)}}class ud{constructor(e,t,n){this.func=e,this.mask=t,this.range=n}}ud.ReadOnly=!1,ud.ReadWrite=!0,ud.disabled=new ud(519,ud.ReadOnly,[0,1]);const hd=7680;class dd{constructor(e,t,n,i,r,o){this.test=e,this.ref=t,this.mask=n,this.fail=i,this.depthFail=r,this.pass=o}}dd.disabled=new dd({func:519,mask:0},0,0,hd,hd,hd);class pd{constructor(e,t,n){this.blendFunction=e,this.blendColor=t,this.mask=n}}pd.Replace=[1,0],pd.disabled=new pd(pd.Replace,ut.transparent,[!1,!1,!1,!1]),pd.unblended=new pd(pd.Replace,ut.transparent,[!0,!0,!0,!0]),pd.alphaBlended=new pd([1,771],ut.transparent,[!0,!0,!0,!0]);const fd=1029,md=2305;class gd{constructor(e,t,n){this.enable=e,this.mode=t,this.frontFace=n}}gd.disabled=new gd(!1,fd,md),gd.backCCW=new gd(!0,fd,md),gd.backCW=new gd(!0,fd,2304),gd.frontCW=new gd(!0,1028,2304),gd.frontCCW=new gd(!0,1028,md);class yd extends Fe{constructor(e,t,n){super(),this.id=e,this._onlySymbols=n,t.on("data",e=>{"source"===e.dataType&&"metadata"===e.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))}),t.on("error",()=>{this._sourceErrored=!0}),this._source=t,this._tiles={},this._cache=new cd(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Kh}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const e in this._tiles){const t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(e,t){return e.isSymbolTile=this._onlySymbols,this._source.loadTile(e,t)}_unloadTile(e){if(this._source.unloadTile)return this._source.unloadTile(e,()=>{})}_abortTile(e){if(this._source.abortTile)return this._source.abortTile(e,()=>{})}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const t in this._tiles){const n=this._tiles[t];n.upload(e),n.prepare(this.map.style.imageManager)}}getIds(){return v(this._tiles).map(e=>e.tileID).sort(vd).map(e=>e.key)}getRenderableIds(e){const t=[];for(const n in this._tiles)this._isIdRenderable(+n,e)&&t.push(this._tiles[n]);return e?t.sort((e,t)=>{const n=e.tileID,i=t.tileID,o=new r(n.canonical.x,n.canonical.y)._rotate(this.transform.angle),s=new r(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return n.overscaledZ-i.overscaledZ||s.y-o.y||s.x-o.x}).map(e=>e.tileID.key):t.map(e=>e.tileID).sort(vd).map(e=>e.key)}hasRenderableParent(e){const t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(+e,"reloading")}}_reloadTile(e,t){const n=this._tiles[e];n&&("loading"!==n.state&&(n.state=t),this._loadTile(n,this._tileLoaded.bind(this,n,e,t)))}_tileLoaded(e,t,n,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new Re(i,{tile:e})):this.update(this.transform));e.timeAdded=$.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(t,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new ze("data",{dataType:"source",tile:e,coord:e.tileID,sourceCacheId:this.id}))}_backfillDEM(e){const t=this.getRenderableIds();for(let i=0;i<t.length;i++){const r=t[i];if(e.neighboringTiles&&e.neighboringTiles[r]){const t=this.getTileByID(r);n(e,t),n(t,e)}}function n(e,t){if(!e.dem||e.dem.borderReady)return;e.needsHillshadePrepare=!0,e.needsDEMTextureUpload=!0;let n=t.tileID.canonical.x-e.tileID.canonical.x;const i=t.tileID.canonical.y-e.tileID.canonical.y,r=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===n&&0===i||Math.abs(i)>1||(Math.abs(n)>1&&(1===Math.abs(n+r)?n+=r:1===Math.abs(n-r)&&(n-=r)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,i),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,n,i){for(const r in this._tiles){let o=this._tiles[r];if(i[r]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>n)continue;let s=o.tileID;for(;o&&o.tileID.overscaledZ>t+1;){const e=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[e.key],o&&o.hasData()&&(s=e)}let a=s;for(;a.overscaledZ>t;)if(a=a.scaledTo(a.overscaledZ-1),e[a.key]){i[s.key]=s;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){const n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(let n=e.overscaledZ-1;n>=t;n--){const t=e.scaledTo(n),i=this._getLoadedTile(t);if(i)return i}}_getLoadedTile(e){const t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(this._source.reparseOverscaled?e.wrapped().key:e.canonical.key)}updateCacheSize(e,t){t=t||this._source.tileSize;const n=Math.ceil(e.width/t)+1,i=Math.ceil(e.height/t)+1,r=Math.floor(n*i*5),o="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(o)}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){const e={};for(const n in this._tiles){const i=this._tiles[n];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),e[i.tileID.key]=i}this._tiles=e;for(const t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(const t in this._tiles)this._setTileReloadTimer(+t,this._tiles[t])}}update(e,t,n){if(this.transform=e,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage)return;if(this.usedForTerrain&&!n)return;let i;this.updateCacheSize(e,t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new Hh(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=e.coveringTiles({tileSize:t||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!n,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[];const r=this._updateRetainedTiles(i);if(_d(this._source.type)&&0!==i.length){const e={},t={},n=Object.keys(r);for(const i of n){const n=r[i],o=this._tiles[i];if(!o||o.fadeEndTime&&o.fadeEndTime<=$.now())continue;const s=this.findLoadedParent(n,Math.max(n.overscaledZ-yd.maxOverzooming,this._source.minzoom));s&&(this._addTile(s.tileID),e[s.tileID.key]=s.tileID),t[i]=n}const o=i[i.length-1].overscaledZ;for(const i in this._tiles){const e=this._tiles[i];if(r[i]||!e.hasData())continue;let n=e.tileID;for(;n.overscaledZ>o;){n=n.scaledTo(n.overscaledZ-1);const o=this._tiles[n.key];if(o&&o.hasData()&&t[n.key]){r[i]=e.tileID;break}}}for(const i in e)r[i]||(this._coveredTiles[i]=!0,r[i]=e[i])}for(const s in r)this._tiles[s].clearFadeHold();const o=function(e,t){const n=[];for(const i in e)i in t||n.push(i);return n}(this._tiles,r);for(const s of o){const e=this._tiles[s];e.hasSymbolBuckets&&!e.holdingForFade()?e.setHoldDuration(this.map._fadeDuration):e.hasSymbolBuckets&&!e.symbolFadeFinished()||this._removeTile(+s)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(+e)}_updateRetainedTiles(e){const t={};if(0===e.length)return t;const n={},i=e[e.length-1].overscaledZ,r=e[0].overscaledZ,o=Math.max(r-yd.maxOverzooming,this._source.minzoom),s=Math.max(r+yd.maxUnderzooming,this._source.minzoom),a={};for(const l of e){const e=this._addTile(l);t[l.key]=l,e.hasData()||i<this._source.maxzoom&&(a[l.key]=l)}this._retainLoadedChildren(a,i,s,t);for(const l of e){let e=this._tiles[l.key];if(e.hasData())continue;if(l.canonical.z>=this._source.maxzoom){const e=l.children(this._source.maxzoom)[0],n=this.getTile(e);if(n&&n.hasData()){t[e.key]=e;continue}}else{const e=l.children(this._source.maxzoom);if(t[e[0].key]&&t[e[1].key]&&t[e[2].key]&&t[e[3].key])continue}let i=e.wasRequested();for(let r=l.overscaledZ-1;r>=o;--r){const o=l.scaledTo(r);if(n[o.key])break;if(n[o.key]=!0,e=this.getTile(o),!e&&i&&(e=this._addTile(o)),e&&(t[o.key]=o,i=e.wasRequested(),e.hasData()))break}}return t}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const t=[];let n,i=this._tiles[e].tileID;for(;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){n=this._loadedParentTiles[i.key];break}t.push(i.key);const e=i.scaledTo(i.overscaledZ-1);if(n=this._getLoadedTile(e),n)break;i=e}for(const e of t)this._loadedParentTiles[e]=n}}_addTile(e){let t=this._tiles[e.key];if(t)return t;t=this._cache.getAndRemove(e),t&&(this._setTileReloadTimer(e.key,t),t.tileID=e,this._state.initializeTileState(t,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,t)));const n=Boolean(t);return n||(t=new Qh(e,this._source.tileSize*e.overscaleFactor(),this.transform.tileZoom),this._loadTile(t,this._tileLoaded.bind(this,t,e.key,t.state))),t?(t.uses++,this._tiles[e.key]=t,n||this._source.fire(new ze("dataloading",{tile:t,coord:t.tileID,dataType:"source"})),t):null}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const n=t.getExpiryTimeout();n&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},n))}_removeTile(e){const t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(+e);this._cache.reset()}tilesIn(e,t,n){const i=[],r=this.transform;if(!r)return i;for(const o in this._tiles){const s=this._tiles[o];if(n&&s.clearQueryDebugViz(),s.holdingForFade())continue;const a=e.containsTile(s,r,t);a&&i.push(a)}return i}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map(e=>this._tiles[e].tileID);for(const n of t)n.projMatrix=this.transform.calculateProjMatrix(n.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(_d(this._source.type))for(const e in this._tiles){const t=this._tiles[e];if(void 0!==t.fadeEndTime&&t.fadeEndTime>=$.now())return!0}return!1}setFeatureState(e,t,n){this._state.updateState(e=e||"_geojsonTileLayer",t,n)}removeFeatureState(e,t,n){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,n)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,n){const i=this._tiles[e];i&&i.setDependencies(t,n)}reloadTilesForDependencies(e,t){for(const n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(+n,"reloading");this._cache.filter(n=>!n.hasDependency(e,t))}}function vd(e,t){const n=Math.abs(2*e.wrap)-+(e.wrap<0),i=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function _d(e){return"raster"===e||"image"===e||"video"===e}yd.maxOverzooming=10,yd.maxUnderzooming=3;class xd{constructor(e,t,n){this._demTile=e,this._dem=this._demTile.dem,this._scale=t,this._offset=n}static create(e,t,n){const i=n||e.findDEMTileFor(t);if(!i||!i.dem)return;const r=i.dem,o=i.tileID,s=1<<t.canonical.z-o.canonical.z;return new xd(i,i.tileSize/$s/s,[(t.canonical.x/s-o.canonical.x)*r.dim,(t.canonical.y/s-o.canonical.y)*r.dim])}tileCoordToPixel(e,t){const n=t*this._scale+this._offset[1],i=Math.floor(e*this._scale+this._offset[0]),o=Math.floor(n);return new r(i,o)}getElevationAt(e,t,n,i){const r=e*this._scale+this._offset[0],o=t*this._scale+this._offset[1],s=Math.floor(r),a=Math.floor(o),l=this._dem;return i=!!i,n?nn(nn(l.get(s,a,i),l.get(s,a+1,i),o-a),nn(l.get(s+1,a,i),l.get(s+1,a+1,i),o-a),r-s):l.get(s,a,i)}getElevationAtPixel(e,t,n){return this._dem.get(e,t,!!n)}getMeterToDEM(e){return(1<<this._demTile.tileID.canonical.z)*Oh(1,e)*this._dem.stride}}class bd{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nr($s,16,0),this.featureIndexArray=new os,this.promoteId=t}insert(e,t,n,i,r,o=0){const s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,i,r,o);const a=this.grid;for(let l=0;l<t.length;l++){const e=t[l],n=[1/0,1/0,-1/0,-1/0];for(let t=0;t<e.length;t++){const i=e[t];n[0]=Math.min(n[0],i.x),n[1]=Math.min(n[1],i.y),n[2]=Math.max(n[2],i.x),n[3]=Math.max(n[3],i.y)}n[0]<$s&&n[1]<$s&&n[2]>=0&&n[3]>=0&&a.insert(s,n[0],n[1],n[2],n[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Gl.VectorTile(new Mc(this.rawTileData)).layers,this.sourceLayerCoder=new Zh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,n,i){this.loadVTLayers();const r=e.params||{},o=Si(r.filter),s=e.tileResult,a=e.transform,l=s.bufferedTilespaceBounds,c=this.grid.query(l.min.x,l.min.y,l.max.x,l.max.y,(e,t,n,i)=>oa(s.bufferedTilespaceGeometry,e,t,n,i));c.sort(Td);let u=null;a.elevation&&c.length>0&&(u=xd.create(a.elevation,this.tileID));const h={};let d;for(let p=0;p<c.length;p++){const a=c[p];if(a===d)continue;d=a;const l=this.featureIndexArray.get(a);let f=null;this.loadMatchingFeature(h,l,o,r.layers,r.availableImages,t,n,i,(t,n,i,r=0)=>(f||(f=Gs(t)),n.queryIntersectsFeature(s,t,i,f,this.z,e.transform,e.pixelPosMatrix,u,r)))}return h}loadMatchingFeature(e,t,n,i,r,o,s,a,l){const{featureIndex:c,bucketIndex:u,sourceLayerIndex:h,layoutVertexArrayOffset:d}=t,p=this.bucketLayerIDs[u];if(i&&!function(e,t){for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>=0)return!0;return!1}(i,p))return;const f=this.sourceLayerCoder.decode(h),m=this.vtLayers[f].feature(c);if(n.needGeometry){const e=Hs(m,!0);if(!n.filter(new so(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!n.filter(new so(this.tileID.overscaledZ),m))return;const g=this.getId(m,f);for(let y=0;y<p.length;y++){const t=p[y];if(i&&i.indexOf(t)<0)continue;const n=o[t];if(!n)continue;let u={};void 0!==g&&a&&(u=a.getState(n.sourceLayer||"_geojsonTileLayer",g));const h=_({},s[t]);h.paint=wd(h.paint,n.paint,m,u,r),h.layout=wd(h.layout,n.layout,m,u,r);const f=!l||l(m,n,u,d);if(!f)continue;const v=new Xh(m,this.z,this.x,this.y,g);v.layer=h;let x=e[t];void 0===x&&(x=e[t]=[]),x.push({featureIndex:c,feature:v,intersectionZ:f})}}lookupSymbolFeatures(e,t,n,i,r,o,s,a){const l={};this.loadVTLayers();const c=Si(r);for(const u of e)this.loadMatchingFeature(l,{bucketIndex:n,sourceLayerIndex:i,featureIndex:u,layoutVertexArrayOffset:0},c,o,s,a,t);return l}hasLayer(e){for(const t of this.bucketLayerIDs)for(const n of t)if(e===n)return!0;return!1}getId(e,t){let n=e.id;return this.promoteId&&(n=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]],"boolean"==typeof n&&(n=Number(n))),n}}function wd(e,t,n,i,r){return C(e,(e,o)=>{const s=t instanceof mo?t.get(o):null;return s&&s.evaluate?s.evaluate(n,i,r):s})}function Td(e,t){return t-e}ar("FeatureIndex",bd,{omit:["rawTileData","sourceLayerCoder"]});class Sd{constructor(e){const t={},n=[];for(const s in e){const i=e[s],r=t[s]={};for(const e in i){const t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;const o=t.metrics.localGlyph?2:1,s={x:0,y:0,w:t.bitmap.width+2*o,h:t.bitmap.height+2*o};n.push(s),r[e]={rect:s,metrics:t.metrics}}}const{w:i,h:r}=Jc(n),o=new $a({width:i||1,height:r||1});for(const s in e){const n=e[s];for(const e in n){const i=n[+e];if(!i||0===i.bitmap.width||0===i.bitmap.height)continue;const r=t[s][e].rect,a=i.metrics.localGlyph?2:1;$a.copy(i.bitmap,o,{x:0,y:0},{x:r.x+a,y:r.y+a},i.bitmap)}}this.image=o,this.positions=t}}ar("GlyphAtlas",Sd);class Ed{constructor(e){this.tileID=new Hh(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.tileZoom=e.tileZoom,this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId,this.enableTerrain=!!e.enableTerrain,this.isSymbolTile=e.isSymbolTile}parse(e,t,n,i,r){this.status="parsing",this.data=e,this.collisionBoxArray=new Qo;const o=new Zh(Object.keys(e.layers).sort()),s=new bd(this.tileID,this.promoteId);s.bucketLayerIDs=[];const a={},l=new Nh(256,256),c={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},lineAtlas:l,availableImages:n},u=t.familiesBySource[this.source];for(const v in u){const t=e.layers[v];if(!t)continue;let i=!1,r=!1;for(const e of u[v])"symbol"===e[0].type?i=!0:r=!0;if(!0===this.isSymbolTile&&!i)continue;if(!1===this.isSymbolTile&&!r)continue;1===t.version&&P(`Vector tile source "${this.source}" layer "${v}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const l=o.encode(v),h=[];for(let e=0;e<t.length;e++){const n=t.feature(e),i=s.getId(n,v);h.push({feature:n,id:i,index:e,sourceLayerIndex:l})}for(const e of u[v]){const t=e[0];void 0!==this.isSymbolTile&&"symbol"===t.type!==this.isSymbolTile||t.minzoom&&this.zoom<Math.floor(t.minzoom)||t.maxzoom&&this.zoom>=t.maxzoom||"none"!==t.visibility&&(kd(e,this.zoom,n),(a[t.id]=t.createBucket({index:s.bucketLayerIDs.length,layers:e,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:l,sourceID:this.source,enableTerrain:this.enableTerrain})).populate(h,c,this.tileID.canonical),s.bucketLayerIDs.push(e.map(e=>e.id)))}}let h,d,p,f;l.trim();const m={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},g=C(c.glyphDependencies,e=>Object.keys(e).map(Number));Object.keys(g).length?i.send("getGlyphs",{uid:this.uid,stacks:g},(e,t)=>{h||(h=e,d=t,x.call(this))},void 0,!1,m):d={};const y=Object.keys(c.iconDependencies);y.length?i.send("getImages",{icons:y,source:this.source,tileID:this.tileID,type:"icons"},(e,t)=>{h||(h=e,p=t,x.call(this))},void 0,!1,m):p={};const _=Object.keys(c.patternDependencies);function x(){if(h)return r(h);if(d&&p&&f){const e=new Sd(d),t=new tu(p,f);for(const i in a){const r=a[i];r instanceof uh?(kd(r.layers,this.zoom,n),Zu(r,d,e.positions,p,t.iconPositions,this.showCollisionBoxes,this.tileID.canonical,this.tileZoom)):r.hasPattern&&(r instanceof cc||r instanceof Pl||r instanceof Yl)&&(kd(r.layers,this.zoom,n),r.addFeatures(c,this.tileID.canonical,t.patternPositions))}this.status="done",r(null,{buckets:v(a).filter(e=>!e.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,lineAtlas:l,imageAtlas:t,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}_.length?i.send("getImages",{icons:_,source:this.source,tileID:this.tileID,type:"patterns"},(e,t)=>{h||(h=e,f=t,x.call(this))},void 0,!1,m):f={},x.call(this)}}function kd(e,t,n){const i=new so(t);for(const r of e)r.recalculate(i,n)}class Cd{constructor(e){this.entries={},this.scheduler=e}request(e,t,n,i){const r=this.entries[e]=this.entries[e]||{callbacks:[]};if(r.result){const[e,n]=r.result;return this.scheduler?this.scheduler.add(()=>{i(e,n)},t):i(e,n),()=>{}}return r.callbacks.push(i),r.cancel||(r.cancel=n((n,i)=>{r.result=[n,i];for(const e of r.callbacks)this.scheduler?this.scheduler.add(()=>{e(n,i)},t):e(n,i);setTimeout(()=>delete this.entries[e],3e3)})),()=>{r.result||(r.callbacks=r.callbacks.filter(e=>e!==i),r.callbacks.length||(r.cancel(),delete this.entries[e]))}}}function Ad(e,t,n){const i=JSON.stringify(e.request);return e.data&&(this.deduped.entries[i]={result:[null,e.data]}),this.deduped.request(i,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom},t=>{const i=Ee(e.request,(e,i,r,o)=>{e?t(e):i&&t(null,{vectorTile:n?void 0:new Gl.VectorTile(new Mc(i)),rawData:i,cacheControl:r,expires:o})});return()=>{i.cancel(),t()}},t)}e.ARRAY_TYPE=pa,e.AUTH_ERR_MSG=K,e.Actor=class{constructor(e,t,n){this.target=e,this.parent=t,this.mapId=n,this.callbacks={},this.cancelCallbacks={},E(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=O()?e:s,this.scheduler=new $h}send(e,t,n,i,r=!1,o){const s=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(n.metadata=o,this.callbacks[s]=n);const a=j(this.globalScope)?void 0:[];return this.target.postMessage({id:s,type:e,hasCallback:!!n,targetMapId:i,mustQueue:r,sourceMapId:this.mapId,data:ur(t,a)},a),{cancel:()=>{n&&delete this.callbacks[s],this.target.postMessage({id:s,type:"<cancel>",targetMapId:i,sourceMapId:this.mapId})}}}receive(e){const t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){const e=this.cancelCallbacks[n];delete this.cancelCallbacks[n],e&&e.cancel()}else if(t.mustQueue||O()){const e=this.callbacks[n];this.cancelCallbacks[n]=this.scheduler.add(()=>this.processTask(n,t),e&&e.metadata||{type:"message"})}else this.processTask(n,t)}processTask(e,t){if("<response>"===t.type){const n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(hr(t.error)):n(null,hr(t.data)))}else{const n=j(this.globalScope)?void 0:[],i=t.hasCallback?(t,i)=>{delete this.cancelCallbacks[e],this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?ur(t):null,data:ur(i,n)},n)}:e=>{},r=hr(t.data);if(this.parent[t.type])this.parent[t.type](t.sourceMapId,r,i);else if(this.parent.getWorkerSource){const e=t.type.split(".");this.parent.getWorkerSource(t.sourceMapId,e[0],r.source)[e[1]](r,i)}else i(new Error("Could not find function "+t.type))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},e.CanonicalTileID=qh,e.Color=ut,e.ColorMode=pd,e.CullFaceMode=gd,e.DEMData=ld,e.DataConstantProperty=go,e.DedupedRequest=Cd,e.DepthMode=ud,e.EXTENT=$s,e.Elevation=class{getAtPointOrZero(e,t=0){return this.getAtPoint(e,t)||0}getAtPoint(e,t,n=!0){null==t&&(t=null);const i=this._source();if(!i)return t;if(e.y<0||e.y>1)return t;const r=i.getSource().maxzoom,o=1<<r,s=Math.floor(e.x),a=e.x-s,l=new Hh(r,s,r,Math.floor(a*o),Math.floor(e.y*o)),c=this.findDEMTileFor(l);if(!c||!c.dem)return t;const u=c.dem,h=1<<c.tileID.canonical.z,d=(a*h-c.tileID.canonical.x)*u.dim,p=(e.y*h-c.tileID.canonical.y)*u.dim,f=Math.floor(d),m=Math.floor(p);return(n?this.exaggeration():1)*nn(nn(u.get(f,m),u.get(f,m+1),p-m),nn(u.get(f+1,m),u.get(f+1,m+1),p-m),d-f)}getAtTileOffset(e,t,n){const i=1<<e.canonical.z;return this.getAtPointOrZero(new Fh(e.wrap+(e.canonical.x+t/$s)/i,(e.canonical.y+n/$s)/i))}getForTilePoints(e,t,n,i){const r=xd.create(this,e,i);return!!r&&(t.forEach(e=>{e[2]=this.exaggeration()*r.getElevationAt(e[0],e[1],n)}),!0)}getMinMaxForTile(e){const t=this.findDEMTileFor(e);if(!t||!t.dem)return null;const n=t.dem.tree,i=t.tileID,r=1<<e.canonical.z-i.canonical.z;let o=e.canonical.x/r-i.canonical.x,s=e.canonical.y/r-i.canonical.y,a=0;for(let l=0;l<e.canonical.z-i.canonical.z&&!n.leaves[a];l++){o*=2,s*=2;const e=2*Math.floor(s)+Math.floor(o);a=n.childOffsets[a]+e,o%=1,s%=1}return{min:this.exaggeration()*n.minimums[a],max:this.exaggeration()*n.maximums[a]}}getMinElevationBelowMSL(){throw new Error("Pure virtual method called.")}raycast(e,t,n){throw new Error("Pure virtual method called.")}pointCoordinate(e){throw new Error("Pure virtual method called.")}_source(){throw new Error("Pure virtual method called.")}exaggeration(){throw new Error("Pure virtual method called.")}findDEMTileFor(e){throw new Error("Pure virtual method called.")}get visibleDemTiles(){throw new Error("Getter must be implemented in subclass.")}},e.ErrorEvent=Re,e.EvaluationParameters=so,e.Event=ze,e.Evented=Fe,e.GlyphManager=zu,e.ImagePosition=eu,e.LineAtlas=Nh,e.LngLat=Ih,e.LngLatBounds=Ch,e.LocalGlyphMode=Ou,e.MAX_SAFE_INTEGER=a,e.MercatorCoordinate=Fh,e.ONE_EM=xc,e.OverscaledTileID=Hh,e.Properties=bo,e.RGBAImage=Ua,e.RequestManager=class{constructor(e,t,n){this._transformRequestFn=e,this._customAccessToken=t,this._silenceAuthErrors=!!n,this._createSkuToken()}_createSkuToken(){const e=function(){let e="";for(let t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Q,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}normalizeStyleURL(e,t){if(!J(e))return e;const n=ne(e);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)}normalizeGlyphsURL(e,t){if(!J(e))return e;const n=ne(e);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)}normalizeSourceURL(e,t){if(!J(e))return e;const n=ne(e);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||t)}normalizeSpriteURL(e,t,n,i){const r=ne(e);return J(e)?(r.path=`/styles/v1${r.path}/sprite${t}${n}`,this._makeAPIURL(r,this._customAccessToken||i)):(r.path+=`${t}${n}`,ie(r))}normalizeTileURL(e,t,n){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!J(e))return e;const i=ne(e);i.path=i.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${t||n&&"raster"!==i.authority&&512===n?"@2x":""}${G.supported?".webp":"$1"}`),"raster"===i.authority?i.path=`/${q.RASTER_URL_PREFIX}${i.path}`:(i.path=i.path.replace(/^.+\/v4\//,"/"),i.path=`/${q.TILE_URL_VERSION}${i.path}`);const r=this._customAccessToken||function(e){for(const t of e){const e=t.match(/^access_token=(.*)$/);if(e)return e[1]}return null}(i.params)||q.ACCESS_TOKEN;return q.REQUIRE_ACCESS_TOKEN&&r&&this._skuToken&&i.params.push("sku="+this._skuToken),this._makeAPIURL(i,r)}canonicalizeTileURL(e,t){const n=ne(e);if(!n.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!n.path.match(/\.[\w]+$/))return e;let i="mapbox://";n.path.match(/^\/raster\/v1\//)?i+="raster/"+n.path.replace(`/${q.RASTER_URL_PREFIX}/`,""):i+="tiles/"+n.path.replace(`/${q.TILE_URL_VERSION}/`,"");let r=n.params;return t&&(r=r.filter(e=>!e.match(/^access_token=/))),r.length&&(i+="?"+r.join("&")),i}canonicalizeTileset(e,t){const n=!!t&&J(t),i=[];for(const r of e.tiles||[])ee(r)?i.push(this.canonicalizeTileURL(r,n)):i.push(r);return i}_makeAPIURL(e,t){const n="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",i=ne(q.API_URL);if(e.protocol=i.protocol,e.authority=i.authority,"http"===e.protocol){const t=e.params.indexOf("secure");t>=0&&e.params.splice(t,1)}if("/"!==i.path&&(e.path=`${i.path}${e.path}`),!q.REQUIRE_ACCESS_TOKEN)return ie(e);if(t=t||q.ACCESS_TOKEN,!this._silenceAuthErrors){if(!t)throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n)}return e.params=e.params.filter(e=>-1===e.indexOf("access_token")),e.params.push("access_token="+(t||"")),ie(e)}},e.ResourceType=be,e.SegmentVector=Vs,e.SourceCache=yd,e.StencilMode=dd,e.StructArrayLayout1ui2=Zo,e.StructArrayLayout2f1f2i16=Bo,e.StructArrayLayout2i4=Ao,e.StructArrayLayout2ui4=Wo,e.StructArrayLayout3f12=zo,e.StructArrayLayout3ui6=Vo,e.StructArrayLayout4i8=Io,e.Texture=kh,e.Tile=Qh,e.Transitionable=co,e.Uniform1f=_s,e.Uniform1i=class extends vs{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},e.Uniform2f=class extends vs{constructor(e,t){super(e,t),this.current=[0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},e.Uniform3f=class extends vs{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},e.Uniform4f=xs,e.UniformColor=bs,e.UniformMatrix3f=class extends vs{constructor(e,t){super(e,t),this.current=Ts}set(e){for(let t=0;t<9;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix3fv(this.location,!1,e);break}}},e.UniformMatrix4f=class extends vs{constructor(e,t){super(e,t),this.current=ws}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.UnwrappedTileID=Gh,e.ValidationError=Be,e.VectorTileWorkerSource=class extends Fe{constructor(e,t,n,i,r){super(),this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||Ad,this.loading={},this.loaded={},this.deduped=new Cd(e.scheduler),this.isSpriteLoaded=i,this.scheduler=e.scheduler}loadTile(e,t){const n=e.uid,i=e&&e.request,r=i&&i.collectResourceTiming,o=this.loading[n]=new Ed(e);o.abort=this.loadVectorData(e,(s,a)=>{const l=!this.loading[n];if(delete this.loading[n],l||s||!a)return o.status="done",l||(this.loaded[n]=o),t(s);const c=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile||new Gl.VectorTile(new Mc(c));const h=()=>{o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,(e,n)=>{if(e||!n)return t(e);const o={};if(r){const e=Vh(i);e.length>0&&(o.resourceTiming=JSON.parse(JSON.stringify(e)))}t(null,_({rawTileData:c.slice(0)},n,u,o))})};this.isSpriteLoaded?h():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(h,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom}):h()}),this.loaded=this.loaded||{},this.loaded[n]=o})}reloadTile(e,t){const n=this.loaded,i=e.uid,r=this;if(n&&n[i]){const o=n[i];o.showCollisionBoxes=e.showCollisionBoxes,o.enableTerrain=!!e.enableTerrain;const s=(e,n)=>{const i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,r.layerIndex,this.availableImages,r.actor,i)),t(e,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}}abortTile(e,t){const n=e.uid,i=this.loading[n];i&&(i.abort&&i.abort(),delete this.loading[n]),t()}removeTile(e,t){const n=this.loaded,i=e.uid;n&&n[i]&&delete n[i],t()}},e.WritingMode=nu,e.ZoomHistory=dr,e.add=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e},e.addDynamicAttributes=sh,e.altitudeFromMercatorZ=Rh,e.asyncAll=y,e.bezier=p,e.bindAll=E,e.bufferConvexPolygon=function(e,t){const n=[];for(let i=0;i<e.length;i++){const r=g(i-1,-1,e.length-1),o=g(i+1,-1,e.length-1),s=e[i],a=e[o],l=e[r].sub(s).unit(),c=a.sub(s).unit(),u=c.angleWithSep(l.x,l.y),h=l.add(c).unit().mult(-1*t/Math.sin(u/2));n.push(s.add(h))}return n},e.cacheEntryPossiblyAdded=function(e){xe++,xe>ye&&(e.getActor().send("enforceCacheSizeLimit",ge),xe=0)},e.clamp=m,e.clearTileCache=function(e){const t=s.caches.delete(pe);e&&t.catch(e).then(()=>e())},e.clipLine=Cu,e.clone=function(e){var t=new pa(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.clone$1=function(e){var t=new pa(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$2=I,e.collisionCircleLayout=_c,e.config=q,e.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.create=va,e.create$1=function(){var e=new pa(16);return pa!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$2=fa,e.createExpression=ui,e.createFilter=Si,e.createLayout=ko,e.createStyleLayer=function(e){return"custom"===e.type?new yh(e):new xh[e.type](e)},e.cross=function(e,t,n){var i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=r*l-o*a,e[1]=o*s-i*l,e[2]=i*a-r*s,e},e.degToRad=u,e.div=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e},e.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},e.ease=f,e.easeCubicInOut=d,e.emitValidationErrors=tr,e.endsWith=k,e.enforceCacheSizeLimit=function(e){ve(),fe&&fe.then(t=>{t.keys().then(n=>{for(let i=0;i<n.length-e;i++)t.delete(n[i])})})},e.evaluateSizeForFeature=Tc,e.evaluateSizeForZoom=Sc,e.evaluateVariableOffset=Wu,e.evented=no,e.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},e.exactEquals$1=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},e.exported=$,e.exported$1=G,e.extend=_,e.filterObject=A,e.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},e.fromQuat=function(e,t){var n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,h=i*a,d=r*s,p=r*a,f=r*l,m=o*s,g=o*a,y=o*l;return e[0]=1-h-f,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-f,e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.fromRotation=function(e,t){var n=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=n,e[2]=0,e[3]=-n,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.furthestTileCorner=function(e){const t=Math.round((e+45+360)%360/90)%4;return h[t]},e.getAABBPointSquareDist=function(e,t,n){let i=0;for(let r=0;r<2;++r){const o=n?n[r]:0;e[r]>o&&(i+=(e[r]-o)*(e[r]-o)),t[r]<o&&(i+=(o-t[r])*(o-t[r]))}return i},e.getAnchorAlignment=mu,e.getAnchorJustification=Xu,e.getBounds=function(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of e)t=Math.min(t,r.x),n=Math.min(n,r.y),i=Math.max(i,r.x),o=Math.max(o,r.y);return{min:new r(t,n),max:new r(i,o)}},e.getImage=De,e.getJSON=function(e,t){return Se(_(e,{type:"json"}),t)},e.getMapSessionAPI=he,e.getPerformanceMeasurement=Vh,e.getRTLTextPluginStatus=io,e.getReferrer=Te,e.getVideo=function(e,t){const n=s.document.createElement("video");n.muted=!0,n.onloadstart=function(){t(null,n)};for(let i=0;i<e.length;i++){const t=s.document.createElement("source");Ae(e[i])||(n.crossOrigin="Anonymous"),t.src=e[i],n.appendChild(t)}return{cancel:()=>{}}},e.identity=ma,e.identity$1=Da,e.invert=function(e,t){var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],p=t[11],f=t[12],m=t[13],g=t[14],y=t[15],v=n*a-i*s,_=n*l-r*s,x=n*c-o*s,b=i*l-r*a,w=i*c-o*a,T=r*c-o*l,S=u*m-h*f,E=u*g-d*f,k=u*y-p*f,C=h*g-d*m,A=h*y-p*m,I=d*y-p*g,M=v*I-_*A+x*C+b*k-w*E+T*S;return M?(e[0]=(a*I-l*A+c*C)*(M=1/M),e[1]=(r*A-i*I-o*C)*M,e[2]=(m*T-g*w+y*b)*M,e[3]=(d*w-h*T-p*b)*M,e[4]=(l*k-s*I-c*E)*M,e[5]=(n*I-r*k+o*E)*M,e[6]=(g*x-f*T-y*_)*M,e[7]=(u*T-d*x+p*_)*M,e[8]=(s*A-a*k+c*S)*M,e[9]=(i*k-n*A-o*S)*M,e[10]=(f*w-m*x+y*v)*M,e[11]=(h*x-u*w-p*v)*M,e[12]=(a*E-s*C-l*S)*M,e[13]=(n*C-i*E+r*S)*M,e[14]=(m*_-f*b-g*v)*M,e[15]=(u*b-h*_+d*v)*M,e):null},e.isMapAuthenticated=function(e){return de.has(e)},e.isMapboxURL=J,e.latFromMercatorY=zh,e.len=Ia,e.length=_a,e.length$1=function(e){return Math.hypot(e[0],e[1],e[2],e[3])},e.loadVectorTile=Ad,e.makeRequest=Se,e.mercatorXfromLng=Dh,e.mercatorYfromLat=Lh,e.mercatorZfromAltitude=Oh,e.mul=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e},e.mul$1=ya,e.mul$2=Aa,e.multiply=ga,e.multiply$1=wa,e.nextPowerOfTwo=T,e.normalize=Sa,e.normalize$1=function(e,t){var n=t[0],i=t[1],r=t[2],o=t[3],s=n*n+i*i+r*r+o*o;return s>0&&(s=1/Math.sqrt(s)),e[0]=n*s,e[1]=i*s,e[2]=r*s,e[3]=o*s,e},e.number=nn,e.ortho=function(e,t,n,i,r,o,s){var a=1/(t-n),l=1/(i-r),c=1/(o-s);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(r+i)*l,e[14]=(s+o)*c,e[15]=1,e},e.pbf=Mc,e.perspective=function(e,t,n,i,r){var o,s=1/Math.tan(t/2);return e[0]=s/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(e[10]=(r+i)*(o=1/(i-r)),e[14]=2*r*i*o):(e[10]=-1,e[14]=-2*i),e},e.pick=function(e,t){const n={};for(let i=0;i<t.length;i++){const r=t[i];r in e&&(n[r]=e[r])}return n},e.plugin=oo,e.pointGeometry=r,e.polygonIntersectsBox=oa,e.polygonIntersectsPolygon=Xs,e.polygonizeBounds=function(e,t,n=0,i=!0){const o=new r(n,n),s=e.sub(o),a=t.add(o),l=[s,new r(a.x,s.y),a,new r(s.x,a.y)];return i&&l.push(s),l},e.posAttributes=Yh,e.postMapLoadEvent=ce,e.postTurnstileEvent=ae,e.potpack=Jc,e.prevPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},e.radToDeg=function(e){return e*c},e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.registerForPluginStateChange=function(e){return e({pluginStatus:Kr,pluginURL:Jr}),no.on("pluginStateChange",e),e},e.removeAuthState=function(e){de.delete(e)},e.renderColorRamp=Ga,e.rotateX=function(e,t,n){var i=Math.sin(n),r=Math.cos(n),o=t[4],s=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*r+c*i,e[5]=s*r+u*i,e[6]=a*r+h*i,e[7]=l*r+d*i,e[8]=c*r-o*i,e[9]=u*r-s*i,e[10]=h*r-a*i,e[11]=d*r-l*i,e},e.rotateX$1=La,e.rotateY=function(e,t,n){var i=Math.sin(n),r=Math.cos(n),o=t[0],s=t[1],a=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r-c*i,e[1]=s*r-u*i,e[2]=a*r-h*i,e[3]=l*r-d*i,e[8]=o*i+c*r,e[9]=s*i+u*r,e[10]=a*i+h*r,e[11]=l*i+d*r,e},e.rotateZ=function(e,t,n){var i=Math.sin(n),r=Math.cos(n),o=t[0],s=t[1],a=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(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[0]=o*r+c*i,e[1]=s*r+u*i,e[2]=a*r+h*i,e[3]=l*r+d*i,e[4]=c*r-o*i,e[5]=u*r-s*i,e[6]=h*r-a*i,e[7]=d*r-l*i,e},e.rotateZ$1=function(e,t,n){n*=.5;var i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=i*l+r*a,e[1]=r*l-i*a,e[2]=o*l+s*a,e[3]=s*l-o*a,e},e.scale=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e},e.scale$1=function(e,t,n){var i=n[0],r=n[1],o=n[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.scale$2=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e},e.scaleAndAdd=Ta,e.setCacheLimits=function(e,t){ge=e,ye=t},e.setRTLTextPlugin=function(e,t,n=!1){if(Kr===Zr||Kr===Xr||Kr===Yr)throw new Error("setRTLTextPlugin cannot be called multiple times.");Jr=$.resolveURL(e),Kr=Zr,Qr=t,to(),n||ro()},e.smoothstep=function(e,t,n){return(n=m((n-e)/(t-e),0,1))*n*(3-2*n)},e.spec=Ne,e.storeAuthState=function(e,t){t?de.add(e):de.delete(e)},e.sub=Ca,e.subtract=ba,e.symbolSize=Ec,e.transformMat3=function(e,t,n){var i=t[0],r=t[1],o=t[2];return e[0]=i*n[0]+r*n[3]+o*n[6],e[1]=i*n[1]+r*n[4]+o*n[7],e[2]=i*n[2]+r*n[5]+o*n[8],e},e.transformMat4=Ma,e.transformMat4$1=function(e,t,n){var i=t[0],r=t[1],o=t[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];return e[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/(s=s||1),e[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/s,e[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/s,e},e.transformQuat=Ea,e.translate=function(e,t,n){var i,r,o,s,a,l,c,u,h,d,p,f,m=n[0],g=n[1],y=n[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],p=t[10],f=t[11],e[0]=i=t[0],e[1]=r,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=p,e[11]=f,e[12]=i*m+a*g+h*y+t[12],e[13]=r*m+l*g+d*y+t[13],e[14]=o*m+c*g+p*y+t[14],e[15]=s*m+u*g+f*y+t[15]),e},e.triggerPluginCompletionEvent=eo,e.uniqueId=b,e.validateCustomStyleLayer=function(e){const t=[],n=e.id;return void 0===n&&t.push({message:`layers.${n}: missing required property "id"`}),void 0===e.render&&t.push({message:`layers.${n}: missing required method "render"`}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:`layers.${n}: property "renderingMode" must be either "2d" or "3d"`}),t},e.validateFog=Ki,e.validateLight=Qi,e.validateStyle=Yi,e.values=v,e.vectorTile=Gl,e.version=t,e.warnOnce=P,e.window=s,e.wrap=g})),i(["./shared"],(function(e){function t(e){const n=typeof e;if("number"===n||"boolean"===n||"string"===n||null==e)return JSON.stringify(e);if(Array.isArray(e)){let n="[";for(const i of e)n+=t(i)+",";return n+"]"}const i=Object.keys(e).sort();let r="{";for(let o=0;o<i.length;o++)r+=`${JSON.stringify(i[o])}:${t(e[i[o]])},`;return r+"}"}function n(n){let i="";for(const r of e.refProperties)i+="/"+t(n[r]);return i}class i{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,i){for(const n of t){this._layerConfigs[n.id]=n;const t=this._layers[n.id]=e.createStyleLayer(n);t._featureFilter=e.createFilter(t.filter),this.keyCache[n.id]&&delete this.keyCache[n.id]}for(const e of i)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const r=function(e,t){const i={};for(let o=0;o<e.length;o++){const r=t&&t[e[o].id]||n(e[o]);t&&(t[e[o].id]=r);let s=i[r];s||(s=i[r]=[]),s.push(e[o])}const r=[];for(const n in i)r.push(i[n]);return r}(e.values(this._layerConfigs),this.keyCache);for(const e of r){const t=e.map(e=>this._layers[e.id]),n=t[0];if("none"===n.visibility)continue;const i=n.source||"";let r=this.familiesBySource[i];r||(r=this.familiesBySource[i]={});const o=n.sourceLayer||"_geojsonTileLayer";let s=r[o];s||(s=r[o]=[]),s.push(t)}}}const{ImageBitmap:r}=e.window;class o{loadTile(t,n){const{uid:i,encoding:o,rawImageData:s,padding:a,buildQuadTree:l}=t,c=r&&s instanceof r?this.getImageData(s,a):s;n(null,new e.DEMData(i,c,o,a<1,l))}getImageData(t,n){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);const i=this.offscreenCanvasContext.getImageData(-n,-n,t.width+2*n,t.height+2*n);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:i.width,height:i.height},i.data)}}var s=function e(t,n){var i,r=t&&t.type;if("FeatureCollection"===r)for(i=0;i<t.features.length;i++)e(t.features[i],n);else if("GeometryCollection"===r)for(i=0;i<t.geometries.length;i++)e(t.geometries[i],n);else if("Feature"===r)e(t.geometry,n);else if("Polygon"===r)a(t.coordinates,n);else if("MultiPolygon"===r)for(i=0;i<t.coordinates.length;i++)a(t.coordinates[i],n);return t};function a(e,t){if(0!==e.length){l(e[0],t);for(var n=1;n<e.length;n++)l(e[n],!t)}}function l(e,t){for(var n=0,i=0,r=e.length,o=r-1;i<r;o=i++)n+=(e[i][0]-e[o][0])*(e[o][1]+e[i][1]);n>=0!=!!t&&e.reverse()}const c=e.vectorTile.VectorTileFeature.prototype.toGeoJSON;class u{constructor(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))}loadGeometry(){if(1===this._feature.type){const t=[];for(const n of this._feature.geometry)t.push([new e.pointGeometry(n[0],n[1])]);return t}{const t=[];for(const n of this._feature.geometry){const i=[];for(const t of n)i.push(new e.pointGeometry(t[0],t[1]));t.push(i)}return t}}toGeoJSON(e,t,n){return c.call(this,e,t,n)}}class h{constructor(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=t.length,this._features=t}feature(e){return new u(this._features[e])}}var d=e.vectorTile.VectorTileFeature,p=f;function f(e,t){this.options=t||{},this.features=e,this.length=e.length}function m(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}f.prototype.feature=function(e){return new m(this.features[e],this.options.extent)},m.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var n=0;n<t.length;n++){for(var i=t[n],r=[],o=0;o<i.length;o++)r.push(new e.pointGeometry(i[o][0],i[o][1]));this.geometry.push(r)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,n=-1/0,i=1/0,r=-1/0,o=0;o<e.length;o++)for(var s=e[o],a=0;a<s.length;a++){var l=s[a];t=Math.min(t,l.x),n=Math.max(n,l.x),i=Math.min(i,l.y),r=Math.max(r,l.y)}return[t,i,n,r]},m.prototype.toGeoJSON=d.prototype.toGeoJSON;var g=v,y=p;function v(t){var n=new e.pbf;return function(e,t){for(var n in e.layers)t.writeMessage(3,_,e.layers[n])}(t,n),n.finish()}function _(e,t){var n;t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<e.length;n++)i.feature=e.feature(n),t.writeMessage(2,x,i);var r=i.keys;for(n=0;n<r.length;n++)t.writeStringField(3,r[n]);var o=i.values;for(n=0;n<o.length;n++)t.writeMessage(4,E,o[n])}function x(e,t){var n=e.feature;void 0!==n.id&&t.writeVarintField(1,n.id),t.writeMessage(2,b,e),t.writeVarintField(3,n.type),t.writeMessage(4,S,n)}function b(e,t){var n=e.feature,i=e.keys,r=e.values,o=e.keycache,s=e.valuecache;for(var a in n.properties){var l=o[a];void 0===l&&(i.push(a),o[a]=l=i.length-1),t.writeVarint(l);var c=n.properties[a],u=typeof c;"string"!==u&&"boolean"!==u&&"number"!==u&&(c=JSON.stringify(c));var h=u+":"+c,d=s[h];void 0===d&&(r.push(c),s[h]=d=r.length-1),t.writeVarint(d)}}function w(e,t){return(t<<3)+(7&e)}function T(e){return e<<1^e>>31}function S(e,t){for(var n=e.loadGeometry(),i=e.type,r=0,o=0,s=n.length,a=0;a<s;a++){var l=n[a],c=1;1===i&&(c=l.length),t.writeVarint(w(1,c));for(var u=3===i?l.length-1:l.length,h=0;h<u;h++){1===h&&1!==i&&t.writeVarint(w(2,u-1));var d=l[h].x-r,p=l[h].y-o;t.writeVarint(T(d)),t.writeVarint(T(p)),r+=d,o+=p}3===i&&t.writeVarint(w(7,1))}}function E(e,t){var n=typeof e;"string"===n?t.writeStringField(1,e):"boolean"===n?t.writeBooleanField(7,e):"number"===n&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}function k(e,t,n,i,r,o){if(r-i<=n)return;const s=i+r>>1;C(e,t,s,i,r,o%2),k(e,t,n,i,s-1,o+1),k(e,t,n,s+1,r,o+1)}function C(e,t,n,i,r,o){for(;r>i;){if(r-i>600){const s=r-i+1,a=n-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(s-c)/s)*(a-s/2<0?-1:1);C(e,t,n,Math.max(i,Math.floor(n-a*c/s+u)),Math.min(r,Math.floor(n+(s-a)*c/s+u)),o)}const s=t[2*n+o];let a=i,l=r;for(A(e,t,i,n),t[2*r+o]>s&&A(e,t,i,r);a<l;){for(A(e,t,a,l),a++,l--;t[2*a+o]<s;)a++;for(;t[2*l+o]>s;)l--}t[2*i+o]===s?A(e,t,i,l):(l++,A(e,t,l,r)),l<=n&&(i=l+1),n<=l&&(r=l-1)}}function A(e,t,n,i){I(e,n,i),I(t,2*n,2*i),I(t,2*n+1,2*i+1)}function I(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function M(e,t,n,i){const r=e-n,o=t-i;return r*r+o*o}g.fromVectorTileJs=v,g.fromGeojsonVt=function(e,t){t=t||{};var n={};for(var i in e)n[i]=new p(e[i].features,t),n[i].name=i,n[i].version=t.version,n[i].extent=t.extent;return v({layers:n})},g.GeoJSONWrapper=y;const P=e=>e[0],D=e=>e[1];class L{constructor(e,t=P,n=D,i=64,r=Float64Array){this.nodeSize=i,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,s=this.ids=new o(e.length),a=this.coords=new r(2*e.length);for(let l=0;l<e.length;l++)s[l]=l,a[2*l]=t(e[l]),a[2*l+1]=n(e[l]);k(s,a,i,0,s.length-1,0)}range(e,t,n,i){return function(e,t,n,i,r,o,s){const a=[0,e.length-1,0],l=[];let c,u;for(;a.length;){const h=a.pop(),d=a.pop(),p=a.pop();if(d-p<=s){for(let s=p;s<=d;s++)c=t[2*s],u=t[2*s+1],c>=n&&c<=r&&u>=i&&u<=o&&l.push(e[s]);continue}const f=Math.floor((p+d)/2);c=t[2*f],u=t[2*f+1],c>=n&&c<=r&&u>=i&&u<=o&&l.push(e[f]);const m=(h+1)%2;(0===h?n<=c:i<=u)&&(a.push(p),a.push(f-1),a.push(m)),(0===h?r>=c:o>=u)&&(a.push(f+1),a.push(d),a.push(m))}return l}(this.ids,this.coords,e,t,n,i,this.nodeSize)}within(e,t,n){return function(e,t,n,i,r,o){const s=[0,e.length-1,0],a=[],l=r*r;for(;s.length;){const c=s.pop(),u=s.pop(),h=s.pop();if(u-h<=o){for(let r=h;r<=u;r++)M(t[2*r],t[2*r+1],n,i)<=l&&a.push(e[r]);continue}const d=Math.floor((h+u)/2),p=t[2*d],f=t[2*d+1];M(p,f,n,i)<=l&&a.push(e[d]);const m=(c+1)%2;(0===c?n-r<=p:i-r<=f)&&(s.push(h),s.push(d-1),s.push(m)),(0===c?n+r>=p:i+r>=f)&&(s.push(d+1),s.push(u),s.push(m))}return a}(this.ids,this.coords,e,t,n,this.nodeSize)}}const O={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},z=Math.fround||(R=new Float32Array(1),e=>(R[0]=+e,R[0]));var R;class F{constructor(e){this.options=G(Object.create(O),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:t,minZoom:n,maxZoom:i,nodeSize:r}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;let s=[];for(let a=0;a<e.length;a++)e[a].geometry&&s.push(B(e[a],a));this.trees[i+1]=new L(s,H,W,r,Float32Array),t&&console.timeEnd(o);for(let a=i;a>=n;a--){const e=+Date.now();s=this._cluster(s,a),this.trees[a]=new L(s,H,W,r,Float32Array),t&&console.log("z%d: %d clusters in %dms",a,s.length,+Date.now()-e)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let r=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,r=180;else if(n>r){const e=this.getClusters([n,i,180,o],t),s=this.getClusters([-180,i,r,o],t);return e.concat(s)}const s=this.trees[this._limitZoom(t)],a=s.range($(n),U(o),$(r),U(i)),l=[];for(const c of a){const e=s.points[c];l.push(e.numPoints?j(e):this.points[e.index])}return l}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",r=this.trees[n];if(!r)throw new Error(i);const o=r.points[t];if(!o)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=r.within(o.x,o.y,s),l=[];for(const c of a){const t=r.points[c];t.parentId===e&&l.push(t.numPoints?j(t):this.points[t.index])}if(0===l.length)throw new Error(i);return l}getLeaves(e,t,n){const i=[];return this._appendLeaves(i,e,t=t||10,n=n||0,0),i}getTile(e,t,n){const i=this.trees[this._limitZoom(e)],r=Math.pow(2,e),{extent:o,radius:s}=this.options,a=s/o,l=(n-a)/r,c=(n+1+a)/r,u={features:[]};return this._addTileFeatures(i.range((t-a)/r,l,(t+1+a)/r,c),i.points,t,n,r,u),0===t&&this._addTileFeatures(i.range(1-a/r,l,1,c),i.points,r,n,r,u),t===r-1&&this._addTileFeatures(i.range(0,l,a/r,c),i.points,-1,n,r,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,i,r){const o=this.getChildren(t);for(const s of o){const t=s.properties;if(t&&t.cluster?r+t.point_count<=i?r+=t.point_count:r=this._appendLeaves(e,t.cluster_id,n,i,r):r<i?r++:e.push(s),e.length===n)break}return r}_addTileFeatures(e,t,n,i,r,o){for(const s of e){const e=t[s],a=e.numPoints;let l,c,u;if(a)l=V(e),c=e.x,u=e.y;else{const t=this.points[e.index];l=t.properties,c=$(t.geometry.coordinates[0]),u=U(t.geometry.coordinates[1])}const h={type:1,geometry:[[Math.round(this.options.extent*(c*r-n)),Math.round(this.options.extent*(u*r-i))]],tags:l};let d;a?d=e.id:this.options.generateId?d=e.index:this.points[e.index].id&&(d=this.points[e.index].id),void 0!==d&&(h.id=d),o.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(+e,this.options.maxZoom+1))}_cluster(e,t){const n=[],{radius:i,extent:r,reduce:o,minPoints:s}=this.options,a=i/(r*Math.pow(2,t));for(let l=0;l<e.length;l++){const i=e[l];if(i.zoom<=t)continue;i.zoom=t;const r=this.trees[t+1],c=r.within(i.x,i.y,a),u=i.numPoints||1;let h=u;for(const e of c){const n=r.points[e];n.zoom>t&&(h+=n.numPoints||1)}if(h>=s){let e=i.x*u,s=i.y*u,a=o&&u>1?this._map(i,!0):null;const d=(l<<5)+(t+1)+this.points.length;for(const n of c){const l=r.points[n];if(l.zoom<=t)continue;l.zoom=t;const c=l.numPoints||1;e+=l.x*c,s+=l.y*c,l.parentId=d,o&&(a||(a=this._map(i,!0)),o(a,this._map(l)))}i.parentId=d,n.push(N(e/h,s/h,d,h,a))}else if(n.push(i),h>1)for(const e of c){const i=r.points[e];i.zoom<=t||(i.zoom=t,n.push(i))}}return n}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t){if(e.numPoints)return t?G({},e.properties):e.properties;const n=this.points[e.index].properties,i=this.options.map(n);return t&&i===n?G({},i):i}}function N(e,t,n,i,r){return{x:z(e),y:z(t),zoom:1/0,id:n,parentId:-1,numPoints:i,properties:r}}function B(e,t){const[n,i]=e.geometry.coordinates;return{x:z($(n)),y:z(U(i)),zoom:1/0,index:t,parentId:-1}}function j(e){return{type:"Feature",id:e.id,properties:V(e),geometry:{type:"Point",coordinates:[(t=e.x,360*(t-.5)),q(e.y)]}};var t}function V(e){const t=e.numPoints,n=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return G(G({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function $(e){return e/360+.5}function U(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function q(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function G(e,t){for(const n in t)e[n]=t[n];return e}function H(e){return e.x}function W(e){return e.y}function Z(e,t,n,i){for(var r,o=i,s=n-t>>1,a=n-t,l=e[t],c=e[t+1],u=e[n],h=e[n+1],d=t+3;d<n;d+=3){var p=X(e[d],e[d+1],l,c,u,h);if(p>o)r=d,o=p;else if(p===o){var f=Math.abs(d-s);f<a&&(r=d,a=f)}}o>i&&(r-t>3&&Z(e,t,r,i),e[r+2]=o,n-r>3&&Z(e,r,n,i))}function X(e,t,n,i,r,o){var s=r-n,a=o-i;if(0!==s||0!==a){var l=((e-n)*s+(t-i)*a)/(s*s+a*a);l>1?(n=r,i=o):l>0&&(n+=s*l,i+=a*l)}return(s=e-n)*s+(a=t-i)*a}function Y(e,t,n,i){var r={id:void 0===e?null:e,type:t,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)Q(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var i=0;i<t.length;i++)Q(e,t[i]);else if("MultiPolygon"===n)for(i=0;i<t.length;i++)for(var r=0;r<t[i].length;r++)Q(e,t[i][r])}(r),r}function Q(e,t){for(var n=0;n<t.length;n+=3)e.minX=Math.min(e.minX,t[n]),e.minY=Math.min(e.minY,t[n+1]),e.maxX=Math.max(e.maxX,t[n]),e.maxY=Math.max(e.maxY,t[n+1])}function K(e,t,n,i){if(t.geometry){var r=t.geometry.coordinates,o=t.geometry.type,s=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),a=[],l=t.id;if(n.promoteId?l=t.properties[n.promoteId]:n.generateId&&(l=i||0),"Point"===o)J(r,a);else if("MultiPoint"===o)for(var c=0;c<r.length;c++)J(r[c],a);else if("LineString"===o)ee(r,a,s,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(c=0;c<r.length;c++)ee(r[c],a=[],s,!1),e.push(Y(l,"LineString",a,t.properties));return}te(r,a,s,!1)}else if("Polygon"===o)te(r,a,s,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(c=0;c<t.geometry.geometries.length;c++)K(e,{id:l,geometry:t.geometry.geometries[c],properties:t.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<r.length;c++){var u=[];te(r[c],u,s,!0),a.push(u)}}e.push(Y(l,o,a,t.properties))}}function J(e,t){t.push(ne(e[0])),t.push(ie(e[1])),t.push(0)}function ee(e,t,n,i){for(var r,o,s=0,a=0;a<e.length;a++){var l=ne(e[a][0]),c=ie(e[a][1]);t.push(l),t.push(c),t.push(0),a>0&&(s+=i?(r*c-l*o)/2:Math.sqrt(Math.pow(l-r,2)+Math.pow(c-o,2))),r=l,o=c}var u=t.length-3;t[2]=1,Z(t,0,u,n),t[u+2]=1,t.size=Math.abs(s),t.start=0,t.end=t.size}function te(e,t,n,i){for(var r=0;r<e.length;r++){var o=[];ee(e[r],o,n,i),t.push(o)}}function ne(e){return e/360+.5}function ie(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function re(e,t,n,i,r,o,s,a){if(i/=t,o>=(n/=t)&&s<i)return e;if(s<n||o>=i)return null;for(var l=[],c=0;c<e.length;c++){var u=e[c],h=u.geometry,d=u.type,p=0===r?u.minX:u.minY,f=0===r?u.maxX:u.maxY;if(p>=n&&f<i)l.push(u);else if(!(f<n||p>=i)){var m=[];if("Point"===d||"MultiPoint"===d)oe(h,m,n,i,r);else if("LineString"===d)se(h,m,n,i,r,!1,a.lineMetrics);else if("MultiLineString"===d)le(h,m,n,i,r,!1);else if("Polygon"===d)le(h,m,n,i,r,!0);else if("MultiPolygon"===d)for(var g=0;g<h.length;g++){var y=[];le(h[g],y,n,i,r,!0),y.length&&m.push(y)}if(m.length){if(a.lineMetrics&&"LineString"===d){for(g=0;g<m.length;g++)l.push(Y(u.id,d,m[g],u.tags));continue}"LineString"!==d&&"MultiLineString"!==d||(1===m.length?(d="LineString",m=m[0]):d="MultiLineString"),"Point"!==d&&"MultiPoint"!==d||(d=3===m.length?"Point":"MultiPoint"),l.push(Y(u.id,d,m,u.tags))}}}return l.length?l:null}function oe(e,t,n,i,r){for(var o=0;o<e.length;o+=3){var s=e[o+r];s>=n&&s<=i&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function se(e,t,n,i,r,o,s){for(var a,l,c=ae(e),u=0===r?ue:he,h=e.start,d=0;d<e.length-3;d+=3){var p=e[d],f=e[d+1],m=e[d+2],g=e[d+3],y=e[d+4],v=0===r?p:f,_=0===r?g:y,x=!1;s&&(a=Math.sqrt(Math.pow(p-g,2)+Math.pow(f-y,2))),v<n?_>n&&(l=u(c,p,f,g,y,n),s&&(c.start=h+a*l)):v>i?_<i&&(l=u(c,p,f,g,y,i),s&&(c.start=h+a*l)):ce(c,p,f,m),_<n&&v>=n&&(l=u(c,p,f,g,y,n),x=!0),_>i&&v<=i&&(l=u(c,p,f,g,y,i),x=!0),!o&&x&&(s&&(c.end=h+a*l),t.push(c),c=ae(e)),s&&(h+=a)}var b=e.length-3;p=e[b],f=e[b+1],m=e[b+2],(v=0===r?p:f)>=n&&v<=i&&ce(c,p,f,m),b=c.length-3,o&&b>=3&&(c[b]!==c[0]||c[b+1]!==c[1])&&ce(c,c[0],c[1],c[2]),c.length&&t.push(c)}function ae(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function le(e,t,n,i,r,o){for(var s=0;s<e.length;s++)se(e[s],t,n,i,r,o,!1)}function ce(e,t,n,i){e.push(t),e.push(n),e.push(i)}function ue(e,t,n,i,r,o){var s=(o-t)/(i-t);return e.push(o),e.push(n+(r-n)*s),e.push(1),s}function he(e,t,n,i,r,o){var s=(o-n)/(r-n);return e.push(t+(i-t)*s),e.push(o),e.push(1),s}function de(e,t){for(var n=[],i=0;i<e.length;i++){var r,o=e[i],s=o.type;if("Point"===s||"MultiPoint"===s||"LineString"===s)r=pe(o.geometry,t);else if("MultiLineString"===s||"Polygon"===s){r=[];for(var a=0;a<o.geometry.length;a++)r.push(pe(o.geometry[a],t))}else if("MultiPolygon"===s)for(r=[],a=0;a<o.geometry.length;a++){for(var l=[],c=0;c<o.geometry[a].length;c++)l.push(pe(o.geometry[a][c],t));r.push(l)}n.push(Y(o.id,s,r,o.tags))}return n}function pe(e,t){var n=[];n.size=e.size,void 0!==e.start&&(n.start=e.start,n.end=e.end);for(var i=0;i<e.length;i+=3)n.push(e[i]+t,e[i+1],e[i+2]);return n}function fe(e,t){if(e.transformed)return e;var n,i,r,o=1<<e.z,s=e.x,a=e.y;for(n=0;n<e.features.length;n++){var l=e.features[n],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(i=0;i<c.length;i+=2)l.geometry.push(me(c[i],c[i+1],t,o,s,a));else for(i=0;i<c.length;i++){var h=[];for(r=0;r<c[i].length;r+=2)h.push(me(c[i][r],c[i][r+1],t,o,s,a));l.geometry.push(h)}}return e.transformed=!0,e}function me(e,t,n,i,r,o){return[Math.round(n*(e*i-r)),Math.round(n*(t*i-o))]}function ge(e,t,n,i,r){for(var o=t===r.maxZoom?0:r.tolerance/((1<<t)*r.extent),s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:i,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},a=0;a<e.length;a++){s.numFeatures++,ye(s,e[a],o,r);var l=e[a].minX,c=e[a].minY,u=e[a].maxX,h=e[a].maxY;l<s.minX&&(s.minX=l),c<s.minY&&(s.minY=c),u>s.maxX&&(s.maxX=u),h>s.maxY&&(s.maxY=h)}return s}function ye(e,t,n,i){var r=t.geometry,o=t.type,s=[];if("Point"===o||"MultiPoint"===o)for(var a=0;a<r.length;a+=3)s.push(r[a]),s.push(r[a+1]),e.numPoints++,e.numSimplified++;else if("LineString"===o)ve(s,r,e,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(a=0;a<r.length;a++)ve(s,r[a],e,n,"Polygon"===o,0===a);else if("MultiPolygon"===o)for(var l=0;l<r.length;l++){var c=r[l];for(a=0;a<c.length;a++)ve(s,c[a],e,n,!0,0===a)}if(s.length){var u=t.tags||null;if("LineString"===o&&i.lineMetrics){for(var h in u={},t.tags)u[h]=t.tags[h];u.mapbox_clip_start=r.start/r.size,u.mapbox_clip_end=r.end/r.size}var d={geometry:s,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:u};null!==t.id&&(d.id=t.id),e.features.push(d)}}function ve(e,t,n,i,r,o){var s=i*i;if(i>0&&t.size<(r?s:i))n.numPoints+=t.length/3;else{for(var a=[],l=0;l<t.length;l+=3)(0===i||t[l+2]>s)&&(n.numSimplified++,a.push(t[l]),a.push(t[l+1])),n.numPoints++;r&&function(e,t){for(var n=0,i=0,r=e.length,o=r-2;i<r;o=i,i+=2)n+=(e[i]-e[o])*(e[i+1]+e[o+1]);if(n>0===t)for(i=0,r=e.length;i<r/2;i+=2){var s=e[i],a=e[i+1];e[i]=e[r-2-i],e[i+1]=e[r-1-i],e[r-2-i]=s,e[r-1-i]=a}}(a,o),e.push(a)}}function _e(e,t){var n=(t=this.options=function(e,t){for(var n in t)e[n]=t[n];return e}(Object.create(this.options),t)).debug;if(n&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var i=0;i<e.features.length;i++)K(n,e.features[i],t,i);else K(n,"Feature"===e.type?e:{geometry:e},t);return n}(e,t);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(e,t){var n=t.buffer/t.extent,i=e,r=re(e,1,-1-n,n,0,-1,2,t),o=re(e,1,1-n,2+n,0,-1,2,t);return(r||o)&&(i=re(e,1,-n,1+n,0,-1,2,t)||[],r&&(i=de(r,1).concat(i)),o&&(i=i.concat(de(o,-1)))),i}(i,t)).length&&this.splitTile(i,0,0,0),n&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function xe(e,t,n){return 32*((1<<e)*n+t)+e}function be(e,t){const n=e.tileID.canonical;if(!this._geoJSONIndex)return t(null,null);const i=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!i)return t(null,null);const r=new h(i.features);let o=g(r);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),t(null,{vectorTile:r,rawData:o.buffer})}_e.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_e.prototype.splitTile=function(e,t,n,i,r,o,s){for(var a=[e,t,n,i],l=this.options,c=l.debug;a.length;){i=a.pop(),n=a.pop(),t=a.pop(),e=a.pop();var u=1<<t,h=xe(t,n,i),d=this.tiles[h];if(!d&&(c>1&&console.time("creation"),d=this.tiles[h]=ge(e,t,n,i,l),this.tileCoords.push({z:t,x:n,y:i}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(d.source=e,r){if(t===l.maxZoom||t===r)continue;var f=1<<r-t;if(n!==Math.floor(o/f)||i!==Math.floor(s/f))continue}else if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue;if(d.source=null,0!==e.length){c>1&&console.time("clipping");var m,g,y,v,_,x,b=.5*l.buffer/l.extent,w=.5-b,T=.5+b,S=1+b;m=g=y=v=null,_=re(e,u,n-b,n+T,0,d.minX,d.maxX,l),x=re(e,u,n+w,n+S,0,d.minX,d.maxX,l),e=null,_&&(m=re(_,u,i-b,i+T,1,d.minY,d.maxY,l),g=re(_,u,i+w,i+S,1,d.minY,d.maxY,l),_=null),x&&(y=re(x,u,i-b,i+T,1,d.minY,d.maxY,l),v=re(x,u,i+w,i+S,1,d.minY,d.maxY,l),x=null),c>1&&console.timeEnd("clipping"),a.push(m||[],t+1,2*n,2*i),a.push(g||[],t+1,2*n,2*i+1),a.push(y||[],t+1,2*n+1,2*i),a.push(v||[],t+1,2*n+1,2*i+1)}}},_e.prototype.getTile=function(e,t,n){var i=this.options,r=i.extent,o=i.debug;if(e<0||e>24)return null;var s=1<<e,a=xe(e,t=(t%s+s)%s,n);if(this.tiles[a])return fe(this.tiles[a],r);o>1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,c=e,u=t,h=n;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[xe(c,u,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,h),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,e,t,n),o>1&&console.timeEnd("drilling down"),this.tiles[a]?fe(this.tiles[a],r):null):null};class we extends e.VectorTileWorkerSource{constructor(e,t,n,i,r){super(e,t,n,i,be),r&&(this.loadGeoJSON=r)}loadData(t,n){const i=t&&t.request,r=i&&i.collectResourceTiming;this.loadGeoJSON(t,(o,a)=>{if(o||!a)return n(o);if("object"!=typeof a)return n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));{s(a,!0);try{if(t.filter){const n=e.createExpression(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===n.result)throw new Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));const i=a.features.filter(e=>n.value.evaluate({zoom:0},e));a={type:"FeatureCollection",features:i}}this._geoJSONIndex=t.cluster?new F(function({superclusterOptions:t,clusterProperties:n}){if(!n||!t)return t;const i={},r={},o={accumulated:null,zoom:0},s={properties:null},a=Object.keys(n);for(const l of a){const[t,o]=n[l],s=e.createExpression(o),a=e.createExpression("string"==typeof t?[t,["accumulated"],["get",l]]:t);i[l]=s.value,r[l]=a.value}return t.map=e=>{s.properties=e;const t={};for(const n of a)t[n]=i[n].evaluate(o,s);return t},t.reduce=(e,t)=>{s.properties=t;for(const n of a)o.accumulated=e[n],e[n]=r[n].evaluate(o,s)},t}(t)).load(a.features):function(e,t){return new _e(e,t)}(a,t.geojsonVtOptions)}catch(o){return n(o)}this.loaded={};const l={};if(r){const n=e.getPerformanceMeasurement(i);n&&(l.resourceTiming={},l.resourceTiming[t.source]=JSON.parse(JSON.stringify(n)))}n(null,l)}})}reloadTile(e,t){const n=this.loaded;return n&&n[e.uid]?super.reloadTile(e,t):this.loadTile(e,t)}loadGeoJSON(t,n){if(t.request)e.getJSON(t.request,n);else{if("string"!=typeof t.data)return n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));try{return n(null,JSON.parse(t.data))}catch(e){return n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}}getClusterChildren(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}}getClusterLeaves(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}}}class Te{constructor(t){this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded=!1,this.workerSourceTypes={vector:e.VectorTileWorkerSource,geojson:we},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(e,t)=>{if(this.workerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=t=>{if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}}checkIfReady(e,t,n){n()}setReferrer(e,t){this.referrer=t}spriteLoaded(t,n){this.isSpriteLoaded=n;for(const i in this.workerSources[t]){const r=this.workerSources[t][i];for(const t in r)r[t]instanceof e.VectorTileWorkerSource&&(r[t].isSpriteLoaded=n,r[t].fire(new e.Event("isSpriteLoaded")))}}setImages(e,t,n){this.availableImages[e]=t;for(const i in this.workerSources[e]){const n=this.workerSources[e][i];for(const e in n)n[e].availableImages=t}n()}enableTerrain(e,t,n){this.terrain=t,n()}setLayers(e,t,n){this.getLayerIndex(e).replace(t),n()}updateLayers(e,t,n){this.getLayerIndex(e).update(t.layers,t.removedIds),n()}loadTile(t,n,i){const r=this.enableTerrain?e.extend({enableTerrain:this.terrain},n):n;this.getWorkerSource(t,n.type,n.source).loadTile(r,i)}loadDEMTile(t,n,i){const r=this.enableTerrain?e.extend({buildQuadTree:this.terrain},n):n;this.getDEMWorkerSource(t,n.source).loadTile(r,i)}reloadTile(t,n,i){const r=this.enableTerrain?e.extend({enableTerrain:this.terrain},n):n;this.getWorkerSource(t,n.type,n.source).reloadTile(r,i)}abortTile(e,t,n){this.getWorkerSource(e,t.type,t.source).abortTile(t,n)}removeTile(e,t,n){this.getWorkerSource(e,t.type,t.source).removeTile(t,n)}removeSource(e,t,n){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const i=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==i.removeSource?i.removeSource(t,n):n()}loadWorkerSource(e,t,n){try{this.self.importScripts(t.url),n()}catch(e){n(e.toString())}}syncRTLPluginState(t,n,i){try{e.plugin.setState(n);const t=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=t){this.self.importScripts(t);const n=e.plugin.isParsed();i(n?void 0:new Error("RTL Text Plugin failed to import scripts from "+t),n)}}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new i),t}getWorkerSource(e,t,n){return this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),this.workerSources[e][t][n]||(this.workerSources[e][t][n]=new this.workerSourceTypes[t]({send:(t,n,i,r,o,s)=>{this.actor.send(t,n,i,e,o,s)},scheduler:this.actor.scheduler},this.getLayerIndex(e),this.getAvailableImages(e),this.isSpriteLoaded)),this.workerSources[e][t][n]}getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}enforceCacheSizeLimit(t,n){e.enforceCacheSizeLimit(n)}getWorkerPerformanceMetrics(e,t,n){n(void 0,void 0)}}return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new Te(self)),Te})),i(["./shared"],(function(e){var t=n;function n(e){return!function(e){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var e,t,n=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(n);try{t=new Worker(i),e=!0}catch(t){e=!1}return t&&t.terminate(),URL.revokeObjectURL(i),e}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var e=document.createElement("canvas");e.width=e.height=1;var t=e.getContext("2d");if(!t)return!1;var n=t.getImageData(0,0,1,1);return n&&n.width===e.width}()?(void 0===i[t=e&&e.failIfMajorPerformanceCaveat]&&(i[t]=function(e){var t,i=function(e){var t=document.createElement("canvas"),i=Object.create(n.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=e,t.getContext("webgl",i)||t.getContext("experimental-webgl",i)}(e);if(!i)return!1;try{t=i.createShader(i.VERTEX_SHADER)}catch(e){return!1}return!(!t||i.isContextLost())&&(i.shaderSource(t,"void main() {}"),i.compileShader(t),!0===i.getShaderParameter(t,i.COMPILE_STATUS))}(t)),i[t]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var t}(e)}var i={};function r(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!r(e[n],t[n]))return!1;return!0}return e===t}n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const o={create:function(t,n,i){const r=e.window.document.createElement(t);return void 0!==n&&(r.className=n),i&&i.appendChild(r),r},createNS:function(t,n){return e.window.document.createElementNS(t,n)}},s=e.window.document&&e.window.document.documentElement.style,a=s&&void 0!==s.userSelect?"userSelect":"WebkitUserSelect";let l;o.disableDrag=function(){s&&a&&(l=s[a],s[a]="none")},o.enableDrag=function(){s&&a&&(s[a]=l)},o.setTransform=function(e,t){e.style.transform=t};let c=!1;try{const t=Object.defineProperty({},"passive",{get(){c=!0}});e.window.addEventListener("test",t,t),e.window.removeEventListener("test",t,t)}catch(e){c=!1}o.addEventListener=function(e,t,n,i={}){e.addEventListener(t,n,"passive"in i&&c?i:i.capture)},o.removeEventListener=function(e,t,n,i={}){e.removeEventListener(t,n,"passive"in i&&c?i:i.capture)};const u=function(t){t.preventDefault(),t.stopPropagation(),e.window.removeEventListener("click",u,!0)};function h(t,n,i){const r=t.offsetWidth===n.width?1:t.offsetWidth/n.width;return new e.pointGeometry((i.clientX-n.left)*r,(i.clientY-n.top)*r)}o.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout(()=>{e.window.removeEventListener("click",u,!0)},0)},o.mousePos=function(e,t){const n=e.getBoundingClientRect();return h(e,n,t)},o.touchPos=function(e,t){const n=e.getBoundingClientRect(),i=[];for(let r=0;r<t.length;r++)i.push(h(e,n,t[r]));return i},o.mouseButton=function(t){return void 0!==e.window.InstallTrigger&&2===t.button&&t.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button},o.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};class d{constructor(e,t){this.pos=e,this.dir=t}intersectsPlane(t,n,i){const r=e.dot(n,this.dir);if(Math.abs(r)<1e-6)return!1;const o=e.dot(e.sub(e.create(),t,this.pos),n)/r,s=e.scaleAndAdd(e.create(),this.pos,this.dir,o);return e.copy(i,s),!0}}class p{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(t,n,i){const r=Math.pow(2,i),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(i=>{const o=e.transformMat4([],i,t),s=1/o[3]/n*r;return e.mul(o,o,[s,s,1/o[3],s])}),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(t=>{const n=e.sub([],o[t[0]],o[t[1]]),i=e.sub([],o[t[2]],o[t[1]]),r=e.normalize([],e.cross([],n,i)),s=-e.dot(r,o[t[1]]);return r.concat(s)});return new p(o,s)}}class f{constructor(t,n){this.min=t,this.max=n,this.center=e.scale([],e.add([],this.min,this.max),.5)}quadrant(t){const n=[t%2==0,t<2],i=e.clone(this.min),r=e.clone(this.max);for(let e=0;e<n.length;e++)i[e]=n[e]?this.min[e]:this.center[e],r[e]=n[e]?this.center[e]:this.max[e];return r[2]=this.max[2],new f(i,r)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}distanceZ(e){return Math.max(Math.min(this.max[2],e[2]),this.min[2])-e[2]}intersects(t){const n=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let i=!0;for(let r=0;r<t.planes.length;r++){const o=t.planes[r];let s=0;for(let t=0;t<n.length;t++)s+=e.dot$1(o,n[t])>=0;if(0===s)return 0;s!==n.length&&(i=!1)}if(i)return 2;for(let e=0;e<3;e++){let n=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let r=0;r<t.points.length;r++){const o=t.points[r][e]-this.min[e];n=Math.min(n,o),i=Math.max(i,o)}if(i<0||n>this.max[e]-this.min[e])return 0}return 1}}function m(e){const{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class g extends e.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,callback:t}of this.requestors)this._notify(e,t);this.requestors=[]}}getImage(e){return this.images[e]}addImage(e,t){this._validate(e,t)&&(this.images[e]=t)}_validate(t,n){let i=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),i=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),i=!1),this._validateContent(n.content,n)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let n=0;for(const i of e){if(i[0]<n||i[1]<i[0]||t<i[1])return!1;n=i[1]}return!0}_validateContent(e,t){return!(e&&(4!==e.length||e[0]<0||t.data.width<e[0]||e[1]<0||t.data.height<e[1]||e[2]<0||t.data.width<e[2]||e[3]<0||t.data.height<e[3]||e[2]<e[0]||e[3]<e[1]))}updateImage(e,t){t.version=this.images[e].version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){const t=this.images[e];delete this.images[e],delete this.patterns[e],t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e,t){let n=!0;if(!this.isLoaded())for(const i of e)this.images[i]||(n=!1);this.isLoaded()||n?this._notify(e,t):this.requestors.push({ids:e,callback:t})}_notify(t,n){const i={};for(const r of t){this.images[r]||this.fire(new e.Event("styleimagemissing",{id:r}));const t=this.images[r];t?i[r]={data:t.data.clone(),pixelRatio:t.pixelRatio,sdf:t.sdf,version:t.version,stretchX:t.stretchX,stretchY:t.stretchY,content:t.content,hasRenderCallback:Boolean(t.userImage&&t.userImage.render)}:e.warnOnce(`Image "${r}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}n(null,i)}getPixelSize(){const{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(t){const n=this.patterns[t],i=this.getImage(t);if(!i)return null;if(n&&n.position.version===i.version)return n.position;if(n)n.position.version=i.version;else{const n={w:i.data.width+2,h:i.data.height+2,x:0,y:0},r=new e.ImagePosition(n,i);this.patterns[t]={bin:n,position:r}}return this._updatePatternAtlas(),this.patterns[t].position}bind(t){const n=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(t,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}_updatePatternAtlas(){const t=[];for(const e in this.patterns)t.push(this.patterns[e].bin);const{w:n,h:i}=e.potpack(t),r=this.atlasImage;r.resize({width:n||1,height:i||1});for(const o in this.patterns){const{bin:t}=this.patterns[o],n=t.x+1,i=t.y+1,s=this.images[o].data,a=s.width,l=s.height;e.RGBAImage.copy(s,r,{x:0,y:0},{x:n,y:i},{width:a,height:l}),e.RGBAImage.copy(s,r,{x:0,y:l-1},{x:n,y:i-1},{width:a,height:1}),e.RGBAImage.copy(s,r,{x:0,y:0},{x:n,y:i+l},{width:a,height:1}),e.RGBAImage.copy(s,r,{x:a-1,y:0},{x:n-1,y:i},{width:1,height:l}),e.RGBAImage.copy(s,r,{x:0,y:0},{x:n+a,y:i},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const t of e){if(this.callbackDispatchedThisFrame[t])continue;this.callbackDispatchedThisFrame[t]=!0;const e=this.images[t];m(e)&&this.updateImage(t,e)}}}const y=new e.Properties({anchor:new e.DataConstantProperty(e.spec.light.anchor),position:new class{constructor(){this.specification=e.spec.light.position}possiblyEvaluate(t,n){return function([t,n,i]){const r=e.degToRad(n+90),o=e.degToRad(i);return{x:t*Math.cos(r)*Math.sin(o),y:t*Math.sin(r)*Math.sin(o),z:t*Math.cos(o),azimuthal:n,polar:i}}(t.expression.evaluate(n))}interpolate(t,n,i){return{x:e.number(t.x,n.x,i),y:e.number(t.y,n.y,i),z:e.number(t.z,n.z,i),azimuthal:e.number(t.azimuthal,n.azimuthal,i),polar:e.number(t.polar,n.polar,i)}}},color:new e.DataConstantProperty(e.spec.light.color),intensity:new e.DataConstantProperty(e.spec.light.intensity)}),v="-transition";class _ extends e.Evented{constructor(t){super(),this._transitionable=new e.Transitionable(y),this.setLight(t),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(t,n={}){if(!this._validate(e.validateLight,t,n))for(const i in t){const n=t[i];e.endsWith(i,v)?this._transitionable.setTransition(i.slice(0,-v.length),n):this._transitionable.setValue(i,n)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(t,n,i){return(!i||!1!==i.validate)&&e.emitValidationErrors(this,t.call(e.validateStyle,e.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:e.spec})))}}const x=new e.Properties({source:new e.DataConstantProperty(e.spec.terrain.source),exaggeration:new e.DataConstantProperty(e.spec.terrain.exaggeration)}),b="-transition";class w extends e.Evented{constructor(t){super(),this._transitionable=new e.Transitionable(x),this.set(t),this._transitioning=this._transitionable.untransitioned()}get(){return this._transitionable.serialize()}set(t){for(const n in t){const i=t[n];e.endsWith(n,b)?this._transitionable.setTransition(n.slice(0,-b.length),i):this._transitionable.setValue(n,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}}function T(t,n,i,r){const o=e.smoothstep(45,65,i),[s,a]=S(t,r),l=e.length(n);let c=1-Math.min(1,Math.exp((l-s)/(a-s)*-6));return c*=c*c,c=Math.min(1,1.00747*c),c*o*t.alpha}function S(e,t){const n=.5/Math.tan(.5*t);return[e.range[0]+n,e.range[1]+n]}const E=new e.Properties({range:new e.DataConstantProperty(e.spec.fog.range),color:new e.DataConstantProperty(e.spec.fog.color),"horizon-blend":new e.DataConstantProperty(e.spec.fog["horizon-blend"])}),k="-transition";class C extends e.Evented{constructor(t){super(),this._transitionable=new e.Transitionable(E),this.set(t),this._transitioning=this._transitionable.untransitioned()}get state(){return{range:this.properties.get("range"),horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(t){if(!this._validate(e.validateFog,t))for(const n in t){const i=t[n];e.endsWith(n,k)?this._transitionable.setTransition(n.slice(0,-k.length),i):this._transitionable.setValue(n,i)}}getOpacity(t){const n=this.properties&&this.properties.get("color")||1;return e.smoothstep(45,65,t)*n.a}getOpacityAtLatLng(t,n){return function(t,n,i){const r=e.MercatorCoordinate.fromLngLat(n),o=i.elevation?i.elevation.getAtPointOrZero(r):0,s=[r.x,r.y,o];return e.transformMat4$1(s,s,i.mercatorFogMatrix),T(t,s,i.pitch,i._fov)}(this.state,t,n)}getFovAdjustedRange(e){return S(this.state,e)}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(t,n,i){return(!i||!1!==i.validate)&&e.emitValidationErrors(this,t.call(e.validateStyle,e.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:e.spec})))}}class A{constructor(t,n){this.workerPool=t,this.actors=[],this.currentActor=0,this.id=e.uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e<i.length;e++){const t=new A.Actor(i[e],n,this.id);t.name="Worker "+e,this.actors.push(t)}this.ready=!1,this.broadcast("checkIfReady",null,()=>{this.ready=!0})}broadcast(t,n,i){e.asyncAll(this.actors,(e,i)=>{e.send(t,n,i)},i=i||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(e=>{e.remove()}),this.actors=[],this.workerPool.release(this.id)}}function I(t,n,i){return n*(e.EXTENT/(t.tileSize*Math.pow(2,i-t.tileID.overscaledZ)))}A.Actor=e.Actor;class M{constructor(e,t,n,i){this.screenBounds=e,this.cameraPoint=t,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=n,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this.screenGeometry.map(e=>i.pointCoordinate3D(e)),this.cameraGeometry=this.bufferedCameraGeometry(0)}static createFromScreenPoints(t,n){let i,r;if(t instanceof e.pointGeometry||"number"==typeof t[0]){const o=e.pointGeometry.convert(t);i=[e.pointGeometry.convert(t)],r=n.isPointAboveHorizon(o)}else{const o=e.pointGeometry.convert(t[0]),s=e.pointGeometry.convert(t[1]);i=[o,s],r=e.polygonizeBounds(o,s).every(e=>n.isPointAboveHorizon(e))}return new M(i,n.getCameraPoint(),r,n)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(t){return e.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],t)}bufferedCameraGeometry(t){const n=this.screenBounds[0],i=1===this.screenBounds.length?this.screenBounds[0].add(new e.pointGeometry(1,1)):this.screenBounds[1],r=e.polygonizeBounds(n,i,0,!1);return this.cameraPoint.y>i.y&&(this.cameraPoint.x>n.x&&this.cameraPoint.x<i.x?r.splice(3,0,this.cameraPoint):this.cameraPoint.x>=i.x?r[2]=this.cameraPoint:this.cameraPoint.x<=n.x&&(r[3]=this.cameraPoint)),e.bufferConvexPolygon(r,t)}containsTile(t,n,i){const r=t.queryPadding+1,o=i?this._bufferedCameraMercator(r,n).map(e=>t.tileID.getTilePoint(e)):this._bufferedScreenMercator(r,n).map(e=>t.tileID.getTilePoint(e)),s=this.screenGeometryMercator.map(e=>t.tileID.getTileVec3(e)),a=s.map(t=>new e.pointGeometry(t[0],t[1])),l=n.getFreeCameraOptions().position||new e.MercatorCoordinate(0,0,0),c=t.tileID.getTileVec3(l),u=s.map(t=>{const n=e.sub(t,t,c);return e.normalize(n,n),new d(c,n)}),h=I(t,1,n.zoom);if(e.polygonIntersectsBox(o,0,0,e.EXTENT,e.EXTENT))return{queryGeometry:this,tilespaceGeometry:a,tilespaceRays:u,bufferedTilespaceGeometry:o,bufferedTilespaceBounds:(p=e.getBounds(o),p.min.x=e.clamp(p.min.x,0,e.EXTENT),p.min.y=e.clamp(p.min.y,0,e.EXTENT),p.max.x=e.clamp(p.max.x,0,e.EXTENT),p.max.y=e.clamp(p.max.y,0,e.EXTENT),p),tile:t,tileID:t.tileID,pixelToTileUnitsFactor:h};var p}_bufferedScreenMercator(e,t){const n=P(e);if(this._screenRaycastCache[n])return this._screenRaycastCache[n];{const i=this.bufferedScreenGeometry(e).map(e=>t.pointCoordinate3D(e));return this._screenRaycastCache[n]=i,i}}_bufferedCameraMercator(e,t){const n=P(e);if(this._cameraRaycastCache[n])return this._cameraRaycastCache[n];{const i=this.bufferedCameraGeometry(e).map(e=>t.pointCoordinate3D(e));return this._cameraRaycastCache[n]=i,i}}}function P(e){return 100*e|0}function D(t,n,i){const r=function(r,o){if(r)return i(r);if(o){const r=e.pick(e.extend(o,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(r.vectorLayers=o.vector_layers,r.vectorLayerIds=r.vectorLayers.map(e=>e.id)),r.tiles=n.canonicalizeTileset(r,t.url),i(null,r)}};return t.url?e.getJSON(n.transformRequest(n.normalizeSourceURL(t.url),e.ResourceType.Source),r):e.exported.frame(()=>r(null,t))}class L{constructor(t,n,i){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=i||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),i=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*n),r=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*n),s=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*n);return t.x>=i&&t.x<o&&t.y>=r&&t.y<s}}class O{constructor(e,t,n){this.context=e;const i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const z={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class R{constructor(e,t,n,i){this.length=t.length,this.attributes=n,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;const r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){const t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let n=0;n<this.attributes.length;n++){const i=t.attributes[this.attributes[n].name];void 0!==i&&e.enableVertexAttribArray(i)}}setVertexAttribPointers(e,t,n){for(let i=0;i<this.attributes.length;i++){const r=this.attributes[i],o=t.attributes[r.name];void 0!==o&&e.vertexAttribPointer(o,r.components,e[z[r.type]],!1,this.itemSize,r.offset+this.itemSize*(n||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class F{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class N extends F{getDefault(){return e.Color.transparent}set(e){const t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class B extends F{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class j extends F{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class V extends F{getDefault(){return[!0,!0,!0,!0]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class $ extends F{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class U extends F{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class q extends F{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class G extends F{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class H extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class W extends F{getDefault(){return[0,1]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class Z extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class X extends F{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Y extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class Q extends F{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class K extends F{getDefault(){return e.Color.transparent}set(e){const t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class J extends F{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class ee extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class te extends F{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class ne extends F{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class ie extends F{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class re extends F{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class oe extends F{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class se extends F{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class ae extends F{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class le extends F{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class ce extends F{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class ue extends F{getDefault(){return null}set(e){const t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class he extends F{constructor(e){super(e),this.vao=e.extVertexArrayObject}getDefault(){return null}set(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)}}class de extends F{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class pe extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class fe extends F{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class me extends F{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class ge extends me{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ye extends me{attachment(){return this.gl.DEPTH_ATTACHMENT}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,this.attachment(),t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ve extends ye{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}class _e{constructor(e,t,n,i){this.context=e,this.width=t,this.height=n;const r=this.framebuffer=e.gl.createFramebuffer();this.colorAttachment=new ge(e,r),i&&(this.depthAttachment=new ye(e,r))}destroy(){const e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){const t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class xe{constructor(e){this.gl=e,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new N(this),this.clearDepth=new B(this),this.clearStencil=new j(this),this.colorMask=new V(this),this.depthMask=new $(this),this.stencilMask=new U(this),this.stencilFunc=new q(this),this.stencilOp=new G(this),this.stencilTest=new H(this),this.depthRange=new W(this),this.depthTest=new Z(this),this.depthFunc=new X(this),this.blend=new Y(this),this.blendFunc=new Q(this),this.blendColor=new K(this),this.blendEquation=new J(this),this.cullFace=new ee(this),this.cullFaceSide=new te(this),this.frontFace=new ne(this),this.program=new ie(this),this.activeTexture=new re(this),this.viewport=new oe(this),this.bindFramebuffer=new se(this),this.bindRenderbuffer=new ae(this),this.bindTexture=new le(this),this.bindVertexBuffer=new ce(this),this.bindElementBuffer=new ue(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new he(this),this.pixelStoreUnpack=new de(this),this.pixelStoreUnpackPremultiplyAlpha=new pe(this),this.pixelStoreUnpackFlipY=new fe(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureFilterAnisotropicForceOff=!1,this.extTextureHalfFloat=e.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(e.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=e.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=e.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new O(this,e,t)}createVertexBuffer(e,t,n){return new R(this,e,t,n)}createRenderbuffer(e,t,n){const i=this.gl,r=i.createRenderbuffer();return this.bindRenderbuffer.set(r),i.renderbufferStorage(i.RENDERBUFFER,e,t,n),this.bindRenderbuffer.set(null),r}createFramebuffer(e,t,n){return new _e(this,e,t,n)}clear({color:e,depth:t,stencil:n}){const i=this.gl;let r=0;e&&(r|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(r|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==n&&(r|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(n),this.stencilMask.set(255)),i.clear(r)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(t){r(t.blendFunction,e.ColorMode.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class be extends e.Evented{constructor(t,n,i,r){super(),this.id=t,this.dispatcher=i,this.setEventedParent(r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},n),e.extend(this,e.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=D(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new L(n.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(n.tiles),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return e.extend({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,n){const i=e.exported.devicePixelRatio>=2,r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),i,this.tileSize);t.request=e.getImage(this.map._requestManager.transformRequest(r,e.ResourceType.Tile),(i,r,o,s)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(i)t.state="errored",n(i);else if(r){this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:o,expires:s});const i=this.map.painter.context,a=i.gl;t.texture=this.map.painter.getTileTexture(r.width),t.texture?t.texture.update(r,{useMipmap:!0}):(t.texture=new e.Texture(i,r,a.RGBA,{useMipmap:!0}),t.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),i.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,i.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,i.extTextureFilterAnisotropicMax)),t.state="loaded",e.cacheEntryPossiblyAdded(this.dispatcher),n(null)}})}abortTile(e,t){e.request&&(e.request.cancel(),delete e.request),t()}unloadTile(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()}hasTransition(){return!1}}let we;var Te=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Se extends e.Evented{constructor(e,t,n,i){super(),this.id=e,this.dispatcher=n,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(t,n){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(i,r)=>{this._loaded=!0,i?this.fire(new e.ErrorEvent(i)):r&&(this.image=r,t&&(this.coordinates=t),n&&n(),this._finishLoading())})}loaded(){return this._loaded}updateImage(e){return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}setCoordinates(t){this.coordinates=t;const n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){let n=1/0,i=1/0,r=-1/0,o=-1/0;for(const e of t)n=Math.min(n,e.x),i=Math.min(i,e.y),r=Math.max(r,e.x),o=Math.max(o,e.y);const s=Math.max(r-n,o-i),a=Math.max(0,Math.floor(-Math.log(s)/Math.LN2)),l=Math.pow(2,a);return new e.CanonicalTileID(a,Math.floor((n+r)/2*l),Math.floor((i+o)/2*l))}(n),this.minzoom=this.maxzoom=this.tileID.z;const i=n.map(e=>this.tileID.getTilePoint(e)._round());return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,Te.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}loadTile(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const Ee={vector:class extends e.Evented{constructor(t,n,i,r){if(super(),this.id=t,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(n,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(r),this._tileWorkers={},this._deduped=new e.DedupedRequest}load(){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=D(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new L(n.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(n.tiles,this.map._requestManager._customAccessToken),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.cancel(),e();const t=this.map.style._getSourceCaches(this.id);for(const n of t)n.clearTiles();this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return e.extend({},this._options)}loadTile(t,n){const i=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),r={request:this.map._requestManager.transformRequest(i,e.ResourceType.Tile),data:void 0,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:t.isSymbolTile};if(r.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state)"loading"===t.state?t.reloadCallback=n:t.request=t.actor.send("reloadTile",r,o.bind(this));else if(t.actor=this._tileWorkers[i]=this._tileWorkers[i]||this.dispatcher.getActor(),this.dispatcher.ready)t.request=t.actor.send("loadTile",r,o.bind(this),void 0,!0);else{const n=e.loadVectorTile.call({deduped:this._deduped},r,(e,n)=>{e||!n?o.call(this,e):(r.data={cacheControl:n.cacheControl,expires:n.expires,rawData:n.rawData.slice(0)},t.actor&&t.actor.send("loadTile",r,o.bind(this),void 0,!0))},!0);t.request={cancel:n}}function o(i,r){return delete t.request,t.aborted?n(null):i&&404!==i.status?n(i):(r&&r.resourceTiming&&(t.resourceTiming=r.resourceTiming),this.map._refreshExpiredTiles&&r&&t.setExpiryData(r),t.loadVectorData(r,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id})}unloadTile(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}},raster:be,"raster-dem":class extends be{constructor(t,n,i,r){super(t,n,i,r),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}loadTile(t,n){const i=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function r(e,i){e&&(t.state="errored",n(e)),i&&(t.dem=i,t.dem.onDeserialize(),t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0,t.state="loaded",n(null))}t.request=e.getImage(this.map._requestManager.transformRequest(i,e.ResourceType.Tile),function(i,o,s,a){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(i)t.state="errored",n(i);else if(o){this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:s,expires:a});const n=e.window.ImageBitmap&&o instanceof e.window.ImageBitmap&&(null==we&&(we=e.window.OffscreenCanvas&&new e.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof e.window.createImageBitmap),we),i=1-(o.width-e.prevPowerOfTwo(o.width))/2;i<1||t.neighboringTiles||(t.neighboringTiles=this._getNeighboringTiles(t.tileID));const l=n?o:e.exported.getImageData(o,i),c={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:l,encoding:this.encoding,padding:i};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",c,r.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(t){const n=t.canonical,i=Math.pow(2,n.z),r=(n.x-1+i)%i,o=0===n.x?t.wrap-1:t.wrap,s=(n.x+1+i)%i,a=n.x+1===i?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,o,n.z,r,n.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,a,n.z,s,n.y).key]={backfilled:!1},n.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,r,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,a,n.z,s,n.y-1).key]={backfilled:!1}),n.y+1<i&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,r,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,a,n.z,s,n.y+1).key]={backfilled:!1}),l}unloadTile(e){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded"}},geojson:class extends e.Evented{constructor(t,n,i,r){super(),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._loaded=!1,this.actor=i.getActor(),this.setEventedParent(r),this._data=n.data,this._options=e.extend({},n),this._collectResourceTiming=n.collectResourceTiming,void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const o=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:e.EXTENT,radius:(void 0!==n.clusterRadius?n.clusterRadius:50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions)}onAdd(e){this.map=e,this.setData(this._data)}setData(e){return this._data=e,this._updateWorkerData(),this}getClusterExpansionZoom(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this}getClusterChildren(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this}getClusterLeaves(e,t,n,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},i),this}_updateWorkerData(){if(this._pendingLoad)return void(this._coalesce=!0);this.fire(new e.Event("dataloading",{dataType:"source"})),this._loaded=!1;const t=e.extend({},this.workerOptions),n=this._data;"string"==typeof n?(t.request=this.map._requestManager.transformRequest(e.exported.resolveURL(n),e.ResourceType.Source),t.request.collectResourceTiming=this._collectResourceTiming):t.data=JSON.stringify(n),this._pendingLoad=this.actor.send(this.type+".loadData",t,(t,n)=>{if(this._loaded=!0,this._pendingLoad=null,t)this.fire(new e.ErrorEvent(t));else{const t={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&n&&n.resourceTiming&&n.resourceTiming[this.id]&&(t.resourceTiming=n.resourceTiming[this.id]),this.fire(new e.Event("data",t)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(t,n){const i=t.actor?"reloadTile":"loadTile";t.actor=this.actor,t.request=this.actor.send(i,{type:this.type,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(e,r)=>(delete t.request,t.unloadVectorData(),t.aborted?n(null):e?n(e):(t.loadVectorData(r,this.map.painter,"reloadTile"===i),n(null))),void 0,"loadTile"===i)}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0}unloadTile(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return e.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends Se{constructor(e,t,n,i){super(e,t,n,i),this.roundZoom=!0,this.type="video",this.options=t}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const n of t.urls)this.urls.push(this.map._requestManager.transformRequest(n,e.ResourceType.Source).url);e.getVideo(this.urls,(t,n)=>{this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):n&&(this.video=n,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;t<n.start(0)||t>n.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,Te.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:Se,canvas:class extends Se{constructor(t,n,i,r){super(t,n,i,r),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+t,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+t,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+t,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+t,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 e.ErrorEvent(new e.ValidationError("sources."+t,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.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())}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const n=this.map.painter.context,i=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,Te.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(n,this.canvas,i.RGBA,{premultiply:!0});for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}},ke=function(t,n,i,r){const o=new Ee[n.type](t,n,i,r);if(o.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${o.id}`);return e.bindAll(["load","abort","unload","serialize","prepare"],o),o};function Ce(t,n){const i=e.identity([]);return e.scale$1(i,i,[.5*t.width,.5*-t.height,1]),e.translate(i,i,[1,-1,0]),e.multiply(i,i,t.calculateProjMatrix(n.toUnwrapped()))}function Ae(e,t,n,i,r,o,s,a=!1){const l=e.tilesIn(i,s,a);l.sort(Me);const c=[];for(const h of l)c.push({wrappedTileID:h.tile.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(t,n,e._state,h,r,o,Ce(e.transform,h.tile.tileID),a)});const u=function(e){const t={},n={};for(const i of e){const e=i.queryResults,r=i.wrappedTileID,o=n[r]=n[r]||{};for(const n in e){const i=e[n],r=o[n]=o[n]||{},s=t[n]=t[n]||[];for(const e of i)r[e.featureIndex]||(r[e.featureIndex]=!0,s.push(e))}}return t}(c);for(const h in u)u[h].forEach(t=>{const n=t.feature,i=e.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=i});return u}function Ie(e,t){const n=e.getRenderableIds().map(t=>e.getTileByID(t)),i=[],r={};for(let o=0;o<n.length;o++){const e=n[o],s=e.tileID.canonical.key;r[s]||(r[s]=!0,e.querySourceFeatures(i,t))}return i}function Me(e,t){const n=e.tileID,i=t.tileID;return n.overscaledZ-i.overscaledZ||n.canonical.y-i.canonical.y||n.wrap-i.wrap||n.canonical.x-i.canonical.x}function Pe(){return null!=Hr.workerClass?new Hr.workerClass:new e.window.Worker(Hr.workerUrl)}const De="mapboxgl_preloaded_worker_pool";class Le{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<Le.workerCount;)this.workers.push(new Pe);return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],0===this.numActive()&&(this.workers.forEach(e=>{e.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[De]}numActive(){return Object.keys(this.active).length}}let Oe;function ze(){return Oe||(Oe=new Le),Oe}function Re(t,n){const i={};for(const e in t)"ref"!==e&&(i[e]=t[e]);return e.refProperties.forEach(e=>{e in n&&(i[e]=n[e])}),i}function Fe(e){e=e.slice();const t=Object.create(null);for(let n=0;n<e.length;n++)t[e[n].id]=e[n];for(let n=0;n<e.length;n++)"ref"in e[n]&&(e[n]=Re(e[n],t[e[n].ref]));return e}Le.workerCount=2;const Ne={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog"};function Be(e,t,n){n.push({command:Ne.addSource,args:[e,t[e]]})}function je(e,t,n){t.push({command:Ne.removeSource,args:[e]}),n[e]=!0}function Ve(e,t,n,i){je(e,n,i),Be(e,t,n)}function $e(e,t,n){let i;for(i in e[n])if(e[n].hasOwnProperty(i)&&"data"!==i&&!r(e[n][i],t[n][i]))return!1;for(i in t[n])if(t[n].hasOwnProperty(i)&&"data"!==i&&!r(e[n][i],t[n][i]))return!1;return!0}function Ue(e,t,n,i,o,s){let a;for(a in t=t||{},e=e||{})e.hasOwnProperty(a)&&(r(e[a],t[a])||n.push({command:s,args:[i,a,t[a],o]}));for(a in t)t.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(r(e[a],t[a])||n.push({command:s,args:[i,a,t[a],o]}))}function qe(e){return e.id}function Ge(e,t){return e[t.id]=t,e}class He{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(t){if(1===this.points.length)return this.points[0];t=e.clamp(t,0,1);let n=1,i=this._distances[n];const r=t*this.paddedLength+this.padding;for(;i<r&&n<this._distances.length;)i=this._distances[++n];const o=n-1,s=this._distances[o],a=i-s,l=a>0?(r-s)/a:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))}}class We{constructor(e,t,n){const i=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(let o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,n,i,r){this._forEachCell(t,n,i,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)}insertCircle(e,t,n,i){this._forEachCell(t-i,n-i,t+i,n+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(i)}_insertBoxCell(e,t,n,i,r,o){this.boxCells[r].push(o)}_insertCircleCell(e,t,n,i,r,o){this.circleCells[r].push(o)}_query(e,t,n,i,r,o){if(n<0||e>this.width||i<0||t>this.height)return!r&&[];const s=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=i){if(r)return!0;for(let e=0;e<this.boxKeys.length;e++)s.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],n=this.circles[3*e+1],i=this.circles[3*e+2];s.push({key:this.circleKeys[e],x1:t-i,y1:n-i,x2:t+i,y2:n+i})}return o?s.filter(o):s}return this._forEachCell(e,t,n,i,this._queryCell,s,{hitTest:r,seenUids:{box:{},circle:{}}},o),r?s.length>0:s}_queryCircle(e,t,n,i,r){const o=e-n,s=e+n,a=t-n,l=t+n;if(s<0||o>this.width||l<0||a>this.height)return!i&&[];const c=[];return this._forEachCell(o,a,s,l,this._queryCellCircle,c,{hitTest:i,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}},r),i?c.length>0:c}query(e,t,n,i,r){return this._query(e,t,n,i,!1,r)}hitTest(e,t,n,i,r){return this._query(e,t,n,i,!0,r)}hitTestCircle(e,t,n,i){return this._queryCircle(e,t,n,!0,i)}_queryCell(e,t,n,i,r,o,s,a){const l=s.seenUids,c=this.boxCells[r];if(null!==c){const r=this.bboxes;for(const u of c)if(!l.box[u]){l.box[u]=!0;const c=4*u;if(e<=r[c+2]&&t<=r[c+3]&&n>=r[c+0]&&i>=r[c+1]&&(!a||a(this.boxKeys[u]))){if(s.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[u],x1:r[c],y1:r[c+1],x2:r[c+2],y2:r[c+3]})}}}const u=this.circleCells[r];if(null!==u){const r=this.circles;for(const c of u)if(!l.circle[c]){l.circle[c]=!0;const u=3*c;if(this._circleAndRectCollide(r[u],r[u+1],r[u+2],e,t,n,i)&&(!a||a(this.circleKeys[c]))){if(s.hitTest)return o.push(!0),!0;{const e=r[u],t=r[u+1],n=r[u+2];o.push({key:this.circleKeys[c],x1:e-n,y1:t-n,x2:e+n,y2:t+n})}}}}}_queryCellCircle(e,t,n,i,r,o,s,a){const l=s.circle,c=s.seenUids,u=this.boxCells[r];if(null!==u){const e=this.bboxes;for(const t of u)if(!c.box[t]){c.box[t]=!0;const n=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[n+0],e[n+1],e[n+2],e[n+3])&&(!a||a(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!c.circle[t]){c.circle[t]=!0;const n=3*t;if(this._circlesCollide(e[n],e[n+1],e[n+2],l.x,l.y,l.radius)&&(!a||a(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,n,i,r,o,s,a){const l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(n),h=this._convertToYCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++)if(r.call(this,e,t,n,i,this.xCellCount*l+d,o,s,a))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,n,i,r,o){const s=i-e,a=r-t,l=n+o;return l*l>s*s+a*a}_circleAndRectCollide(e,t,n,i,r,o,s){const a=(o-i)/2,l=Math.abs(e-(i+a));if(l>a+n)return!1;const c=(s-r)/2,u=Math.abs(t-(r+c));if(u>c+n)return!1;if(l<=a||u<=c)return!0;const h=l-a,d=u-c;return h*h+d*d<=n*n}}function Ze(t,n,i,r,o){const s=e.create$1();return n?(e.scale$1(s,s,[1/o,1/o,1]),i||e.rotateZ(s,s,r.angle)):e.multiply(s,r.labelPlaneMatrix,t),s}function Xe(t,n,i,r,o){if(n){const n=e.clone$1(t);return e.scale$1(n,n,[o,o,1]),i||e.rotateZ(n,n,-r.angle),n}return r.glCoordMatrix}function Ye(t,n,i=0){const r=[t.x,t.y,i,1];i?e.transformMat4(r,r,n):at(r,r,n);const o=r[3];return{point:new e.pointGeometry(r[0]/o,r[1]/o),signedDistanceFromCamera:o}}function Qe(e,t){return Math.min(.5+e/t*.5,1.5)}function Ke(e,t){const n=e[0]/e[3],i=e[1]/e[3];return n>=-t[0]&&n<=t[0]&&i>=-t[1]&&i<=t[1]}function Je(t,n,i,r,o,s,a,l,c){const u=r?t.textSizeData:t.iconSizeData,h=e.evaluateSizeForZoom(u,i.transform.zoom),d=[256/i.width*2+1,256/i.height*2+1],p=r?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;p.clear();const f=t.lineVertexArray,m=r?t.text.placedSymbolArray:t.icon.placedSymbolArray,g=i.transform.width/i.transform.height;let y=!1;for(let v=0;v<m.length;v++){const r=m.get(v);if(r.hidden||r.writingMode===e.WritingMode.vertical&&!y){st(r.numGlyphs,p);continue}y=!1;const _=c?c({x:r.anchorX,y:r.anchorY}):0,x=[r.anchorX,r.anchorY,_,1];if(e.transformMat4(x,x,n),!Ke(x,d)){st(r.numGlyphs,p);continue}const b=Qe(i.transform.cameraToCenterDistance,x[3]),w=e.evaluateSizeForFeature(u,h,r),T=a?w/b:w*b,S=new e.pointGeometry(r.anchorX,r.anchorY),E=Ye(S,o,_);if(E.signedDistanceFromCamera<=0){st(r.numGlyphs,p);continue}const k=E.point;let C={};const A=a?null:c,I=nt(r,T,!1,l,n,o,s,t.glyphOffsetArray,f,p,k,S,C,g,A);y=I.useVertical,A&&I.needsFlipping&&(C={}),(I.notEnoughRoom||y||I.needsFlipping&&nt(r,T,!0,l,n,o,s,t.glyphOffsetArray,f,p,k,S,C,g,A).notEnoughRoom)&&st(r.numGlyphs,p)}r?t.text.dynamicLayoutVertexBuffer.updateData(p):t.icon.dynamicLayoutVertexBuffer.updateData(p)}function et(e,t,n,i,r,o,s,a,l,c,u,h,d){const p=a.glyphStartIndex+a.numGlyphs,f=a.lineStartIndex,m=a.lineStartIndex+a.lineLength,g=t.getoffsetX(a.glyphStartIndex),y=t.getoffsetX(p-1),v=rt(e*g,n,i,r,o,s,a.segment,f,m,l,c,u,h,d,!0);if(!v)return null;const _=rt(e*y,n,i,r,o,s,a.segment,f,m,l,c,u,h,d,!0);return _?{first:v,last:_}:null}function tt(t,n,i,r){return t===e.WritingMode.horizontal&&Math.abs(i.y-n.y)>Math.abs(i.x-n.x)*r?{useVertical:!0}:(t===e.WritingMode.vertical?n.y<i.y:n.x>i.x)?{needsFlipping:!0}:null}function nt(t,n,i,r,o,s,a,l,c,u,h,d,p,f,m){const g=n/24,y=t.lineOffsetX*g,v=t.lineOffsetY*g;let _;if(t.numGlyphs>1){const e=t.glyphStartIndex+t.numGlyphs,n=t.lineStartIndex,o=t.lineStartIndex+t.lineLength,u=et(g,l,y,v,i,h,d,t,c,s,p,m);if(!u)return{notEnoughRoom:!0};const x=Ye(u.first.point,a).point,b=Ye(u.last.point,a).point;if(r&&!i){const e=tt(t.writingMode,x,b,f);if(e)return e}_=[u.first];for(let r=t.glyphStartIndex+1;r<e-1;r++)_.push(rt(g*l.getoffsetX(r),y,v,i,h,d,t.segment,n,o,c,s,p,m));_.push(u.last)}else{if(r&&!i){const n=Ye(d,o).point,i=t.lineStartIndex+t.segment+1,r=new e.pointGeometry(c.getx(i),c.gety(i)),s=Ye(r,o),a=s.signedDistanceFromCamera>0?s.point:it(d,r,n,1,o),l=tt(t.writingMode,n,a,f);if(l)return l}const n=rt(g*l.getoffsetX(t.glyphStartIndex),y,v,i,h,d,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,s,p,m);if(!n)return{notEnoughRoom:!0};_=[n]}for(const x of _)e.addDynamicAttributes(u,x.point,x.angle);return{}}function it(e,t,n,i,r,o){const s=e.add(e.sub(t)._unit()),a=Ye(s,r,o?o(s):0).point,l=n.sub(a);return n.add(l._mult(i/l.mag()))}function rt(t,n,i,r,o,s,a,l,c,u,h,d,p,f,m){const g=r?t-n:t+n;let y=g>0?1:-1,v=0;r&&(y*=-1,v=Math.PI),y<0&&(v+=Math.PI);let _=y>0?l+a:l+a+1,x=o,b=o,w=0,T=0;const S=Math.abs(g),E=[],k=[];let C=s;const A=()=>{const t=_-y;return 0===w?s:new e.pointGeometry(u.getx(t),u.gety(t))},I=()=>it(A(),C,b,S-w+1,h,p);for(;w+T<=S;){if(_+=y,_<l||_>=c)return null;if(b=x,E.push(x),f&&k.push(C||A()),x=d[_],void 0===x){C=new e.pointGeometry(u.getx(_),u.gety(_));const t=Ye(C,h,p?p(C):0);x=t.signedDistanceFromCamera>0?d[_]=t.point:I()}else C=null;w+=T,T=b.dist(x)}m&&p&&(C=C||new e.pointGeometry(u.getx(_),u.gety(_)),d[_]=x=void 0===d[_]?x:I(),T=b.dist(x));const M=(S-w)/T,P=x.sub(b),D=P.mult(M)._add(b);i&&D._add(P._unit()._perp()._mult(i*y));const L=v+Math.atan2(x.y-b.y,x.x-b.x);return E.push(D),f&&(C=C||new e.pointGeometry(u.getx(_),u.gety(_)),k.push(function(t,n,i){const r=1-i;return new e.pointGeometry(t.x*r+n.x*i,t.y*r+n.y*i)}(k.length>0?k[k.length-1]:C,C,M))),{point:D,angle:L,path:E,tilePath:k}}const ot=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function st(e,t){for(let n=0;n<e;n++){const e=t.length;t.resize(e+4),t.float32.set(ot,3*e)}}function at(e,t,n){const i=t[0],r=t[1];return e[0]=n[0]*i+n[4]*r+n[12],e[1]=n[1]*i+n[5]*r+n[13],e[3]=n[3]*i+n[7]*r+n[15],e}const lt=100;class ct{constructor(e,t,n=new We(e.width+200,e.height+200,25),i=new We(e.width+200,e.height+200,25)){this.transform=e,this.grid=n,this.ignoredGrid=i,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+lt,this.screenBottomBoundary=e.height+lt,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.fogState=t}placeCollisionBox(e,t,n,i,r,o,s){const a=this.projectAndGetPerspectiveRatio(o,t.anchorPointX,t.anchorPointY,t.elevation,t.tileID),l=r*a.perspectiveRatio,c=(t.x1*e+n.x-t.padding)*l+a.point.x,u=(t.y1*e+n.y-t.padding)*l+a.point.y,h=(t.x2*e+n.x+t.padding)*l+a.point.x,d=(t.y2*e+n.y+t.padding)*l+a.point.y,p=a.perspectiveRatio<=.55||a.aboveHorizon;return!this.isInsideGrid(c,u,h,d)||!i&&this.grid.hitTest(c,u,h,d,s)||p?{box:[],offscreen:!1}:{box:[c,u,h,d],offscreen:this.isOffscreen(c,u,h,d)}}placeCollisionCircles(t,n,i,r,o,s,a,l,c,u,h,d,p,f){const m=[],g=this.transform.elevation,y=g?e=>g.getAtTileOffset(f,e.x,e.y):e=>0,v=new e.pointGeometry(n.anchorX,n.anchorY),_=y(v),x=this.projectAndGetPerspectiveRatio(s,v.x,v.y,_,f),{perspectiveRatio:b}=x,w=(u?o/b:o*b)/e.ONE_EM,T=Ye(v,a,_).point,S=x.signedDistanceFromCamera>0?et(w,r,n.lineOffsetX*w,n.lineOffsetY*w,!1,T,v,n,i,a,{},g&&!u?y:null,u&&!!g):null;let E=!1,k=!1,C=!0;if(S&&!x.aboveHorizon){const n=.5*d*b+p,i=new e.pointGeometry(-100,-100),r=new e.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),o=new He,s=S.first,a=S.last;let u=[];for(let e=s.path.length-1;e>=1;e--)u.push(s.path[e]);for(let e=1;e<a.path.length;e++)u.push(a.path[e]);const f=2.5*n;if(l){const e=u.map(g?(e,t)=>{const n=y(t<s.path.length-1?s.tilePath[s.path.length-1-t]:a.tilePath[t-s.path.length+2]);return Ye(e,l,n)}:e=>Ye(e,l));u=e.some(e=>e.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let v=[];if(u.length>0){const t=u[0].clone(),n=u[0].clone();for(let e=1;e<u.length;e++)t.x=Math.min(t.x,u[e].x),t.y=Math.min(t.y,u[e].y),n.x=Math.max(n.x,u[e].x),n.y=Math.max(n.y,u[e].y);v=t.x>=i.x&&n.x<=r.x&&t.y>=i.y&&n.y<=r.y?[u]:n.x<i.x||t.x>r.x||n.y<i.y||t.y>r.y?[]:e.clipLine([u],i.x,i.y,r.x,r.y)}for(const e of v){o.reset(e,.25*n);let i=0;i=o.length<=.5*n?1:Math.ceil(o.paddedLength/f)+1;for(let e=0;e<i;e++){const r=e/Math.max(i-1,1),s=o.lerp(r),a=s.x+lt,l=s.y+lt;m.push(a,l,n,0);const u=a-n,d=l-n,p=a+n,f=l+n;if(C=C&&this.isOffscreen(u,d,p,f),k=k||this.isInsideGrid(u,d,p,f),!t&&this.grid.hitTestCircle(a,l,n,h)&&(E=!0,!c))return{circles:[],offscreen:!1,collisionDetected:E}}}}return{circles:!c&&E||!k?[]:m,offscreen:C,collisionDetected:E}}queryRenderedSymbols(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const n=[];let i=1/0,r=1/0,o=-1/0,s=-1/0;for(const u of t){const t=new e.pointGeometry(u.x+lt,u.y+lt);i=Math.min(i,t.x),r=Math.min(r,t.y),o=Math.max(o,t.x),s=Math.max(s,t.y),n.push(t)}const a=this.grid.query(i,r,o,s).concat(this.ignoredGrid.query(i,r,o,s)),l={},c={};for(const u of a){const t=u.key;if(void 0===l[t.bucketInstanceId]&&(l[t.bucketInstanceId]={}),l[t.bucketInstanceId][t.featureIndex])continue;const i=[new e.pointGeometry(u.x1,u.y1),new e.pointGeometry(u.x2,u.y1),new e.pointGeometry(u.x2,u.y2),new e.pointGeometry(u.x1,u.y2)];e.polygonIntersectsPolygon(n,i)&&(l[t.bucketInstanceId][t.featureIndex]=!0,void 0===c[t.bucketInstanceId]&&(c[t.bucketInstanceId]=[]),c[t.bucketInstanceId].push(t.featureIndex))}return c}insertCollisionBox(e,t,n,i,r){(t?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:i,collisionGroupID:r},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,n,i,r){const o=t?this.ignoredGrid:this.grid,s={bucketInstanceId:n,featureIndex:i,collisionGroupID:r};for(let a=0;a<e.length;a+=4)o.insertCircle(s,e[a],e[a+1],e[a+2])}projectAndGetPerspectiveRatio(t,n,i,r,o){const s=[n,i,r||0,1];let a=!1;if(r||this.transform.pitch>0){e.transformMat4(s,s,t);let l=!1;this.fogState&&o&&(l=function(t,n,i,r,o,s){const a=s.calculateFogTileMatrix(o),l=[n,i,r];return e.transformMat4$1(l,l,a),T(t,l,s.pitch,s._fov)}(this.fogState,n,i,r||0,o.toUnwrapped(),this.transform)>.9),a=s[2]>s[3]||l}else at(s,s,t);return{point:new e.pointGeometry((s[0]/s[3]+1)/2*this.transform.width+lt,(-s[1]/s[3]+1)/2*this.transform.height+lt),perspectiveRatio:Math.min(.5+this.transform.cameraToCenterDistance/s[3]*.5,1.5),signedDistanceFromCamera:s[3],aboveHorizon:a}}isOffscreen(e,t,n,i){return n<lt||e>=this.screenRightBoundary||i<lt||t>this.screenBottomBoundary}isInsideGrid(e,t,n,i){return n>=0&&e<this.gridRightBoundary&&i>=0&&t<this.gridBottomBoundary}getViewportMatrix(){const t=e.identity([]);return e.translate(t,t,[-100,-100,0]),t}}class ut{constructor(e,t,n,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&n?1:0,this.placed=n}isHidden(){return 0===this.opacity&&!this.placed}}class ht{constructor(e,t,n,i,r){this.text=new ut(e?e.text:null,t,n,r),this.icon=new ut(e?e.icon:null,t,i,r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class dt{constructor(e,t,n){this.text=e,this.icon=t,this.skipFade=n}}class pt{constructor(){this.invProjMatrix=e.create$1(),this.viewportMatrix=e.create$1(),this.circles=[]}}class ft{constructor(e,t,n,i,r){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=n,this.bucketIndex=i,this.tileID=r}}class mt{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function gt(t,n,i,r,o){const{horizontalAlign:s,verticalAlign:a}=e.getAnchorAlignment(t),l=-(s-.5)*n,c=-(a-.5)*i,u=e.evaluateVariableOffset(t,r);return new e.pointGeometry(l+u[0]*o,c+u[1]*o)}function yt(t,n,i,r,o){const s=new e.pointGeometry(t,n);return i&&s._rotate(r?o:-o),s}class vt{constructor(e,t,n,i,r){this.transform=e.clone(),this.collisionIndex=new ct(this.transform,r),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new mt(n),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,i,r){const o=i.getBucket(n),s=i.latestFeatureIndex;if(!o||!s||n.id!==o.layerIds[0])return;const a=i.collisionBoxArray,l=o.layers[0].layout,c=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),u=i.tileSize/e.EXTENT,h=this.transform.calculateProjMatrix(i.tileID.toUnwrapped()),d="map"===l.get("text-pitch-alignment"),p="map"===l.get("text-rotation-alignment"),f=I(i,1,this.transform.zoom),m=Ze(h,d,p,this.transform,f);let g=null;if(d){const t=Xe(h,d,p,this.transform,f);g=e.multiply([],this.transform.labelPlaneMatrix,t)}this.retainedQueryData[o.bucketInstanceId]=new ft(o.bucketInstanceId,s,o.sourceLayerIndex,o.index,i.tileID);const y={bucket:o,layout:l,posMatrix:h,textLabelPlaneMatrix:m,labelToScreenMatrix:g,scale:c,textPixelRatio:u,holdingForFade:i.holdingForFade(),collisionBoxArray:a,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:e.evaluateSizeForZoom(o.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(r)for(const e of o.sortKeyRanges){const{sortKey:n,symbolInstanceStart:i,symbolInstanceEnd:r}=e;t.push({sortKey:n,symbolInstanceStart:i,symbolInstanceEnd:r,parameters:y})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:y})}attemptAnchorPlacement(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,y){const v=[h.textOffset0,h.textOffset1],_=gt(e,n,i,v,r),x=this.collisionIndex.placeCollisionBox(r,t,yt(_.x,_.y,o,s,this.transform.angle),u,a,l,c.predicate);if((!m||0!==this.collisionIndex.placeCollisionBox(p.getSymbolInstanceIconSize(y,this.transform.zoom,d),m,yt(_.x,_.y,o,s,this.transform.angle),u,a,l,c.predicate).box.length)&&x.box.length>0){let t;return this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(t=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:v,width:n,height:i,anchor:e,textScale:r,prevAnchor:t},this.markUsedJustification(p,e,h,f),p.allowVerticalPlacement&&(this.markUsedOrientation(p,f,h),this.placedOrientations[h.crossTileID]=f),{shift:_,placedGlyphBoxes:x}}}placeLayerBucketPart(t,n,i){const{bucket:r,layout:o,posMatrix:s,textLabelPlaneMatrix:a,labelToScreenMatrix:l,textPixelRatio:c,holdingForFade:u,collisionBoxArray:h,partiallyEvaluatedTextSize:d,partiallyEvaluatedIconSize:p,collisionGroup:f}=t.parameters,m=o.get("text-optional"),g=o.get("icon-optional"),y=o.get("text-allow-overlap"),v=o.get("icon-allow-overlap"),_="map"===o.get("text-rotation-alignment"),x="map"===o.get("text-pitch-alignment"),b="none"!==o.get("icon-text-fit"),w="viewport-y"===o.get("symbol-z-order"),T=y&&(v||!r.hasIconData()||g),S=v&&(y||!r.hasTextData()||m);!r.collisionArrays&&h&&r.deserializeCollisionBoxes(h),i&&r.updateCollisionDebugBuffers(this.transform.zoom,h);const E=(t,h,w)=>{if(n[t.crossTileID])return;if(u)return void(this.placements[t.crossTileID]=new dt(!1,!1,!1));let E=!1,k=!1,C=!0,A=null,I={box:null,offscreen:null},M={box:null,offscreen:null},P=null,D=null,L=null,O=0,z=0,R=0;w.textFeatureIndex?O=w.textFeatureIndex:t.useRuntimeCollisionCircles&&(O=t.featureIndex),w.verticalTextFeatureIndex&&(z=w.verticalTextFeatureIndex);const F=e=>{e.tileID=this.retainedQueryData[r.bucketInstanceId].tileID,(this.transform.elevation||e.elevation)&&(e.elevation=this.transform.elevation?this.transform.elevation.getAtTileOffset(this.retainedQueryData[r.bucketInstanceId].tileID,e.anchorPointX,e.anchorPointY):0)},N=w.textBox;if(N){F(N);const n=n=>{let i=e.WritingMode.horizontal;if(r.allowVerticalPlacement&&!n&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[t.crossTileID];e&&(this.placedOrientations[t.crossTileID]=e,i=e,this.markUsedOrientation(r,i,t))}return i},i=(n,i)=>{if(r.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&w.verticalTextBox){for(const t of r.writingModes)if(t===e.WritingMode.vertical?(I=i(),M=I):I=n(),I&&I.box&&I.box.length)break}else I=n()};if(o.get("text-variable-anchor")){let a=o.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[t.crossTileID]){const e=this.prevPlacement.variableOffsets[t.crossTileID];a.indexOf(e.anchor)>0&&(a=a.filter(t=>t!==e.anchor),a.unshift(e.anchor))}const l=(e,n,i)=>{const o=r.getSymbolInstanceTextSize(d,t,this.transform.zoom,h),l=(e.x2-e.x1)*o+2*e.padding,u=(e.y2-e.y1)*o+2*e.padding,m=b&&!v?n:null;m&&F(m);let g={box:[],offscreen:!1};const w=y?2*a.length:a.length;for(let y=0;y<w;++y){const n=this.attemptAnchorPlacement(a[y%a.length],e,l,u,o,_,x,c,s,f,y>=a.length,t,h,r,i,m,d,p);if(n&&(g=n.placedGlyphBoxes,g&&g.box&&g.box.length)){E=!0,A=n.shift;break}}return g};i(()=>l(N,w.iconBox,e.WritingMode.horizontal),()=>{const n=w.verticalTextBox;return n&&F(n),r.allowVerticalPlacement&&!(I&&I.box&&I.box.length)&&t.numVerticalGlyphVertices>0&&n?l(n,w.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}}),I&&(E=I.box,C=I.offscreen);const u=n(I&&I.box);if(!E&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[t.crossTileID];e&&(this.variableOffsets[t.crossTileID]=e,this.markUsedJustification(r,e.anchor,t,u))}}else{const o=(n,i)=>{const o=r.getSymbolInstanceTextSize(d,t,this.transform.zoom,h),a=this.collisionIndex.placeCollisionBox(o,n,new e.pointGeometry(0,0),y,c,s,f.predicate);return a&&a.box&&a.box.length&&(this.markUsedOrientation(r,i,t),this.placedOrientations[t.crossTileID]=i),a};i(()=>o(N,e.WritingMode.horizontal),()=>{const n=w.verticalTextBox;return r.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?(F(n),o(n,e.WritingMode.vertical)):{box:null,offscreen:null}}),n(I&&I.box&&I.box.length)}}if(P=I,E=P&&P.box&&P.box.length>0,C=P&&P.offscreen,t.useRuntimeCollisionCircles){const n=r.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),c=e.evaluateSizeForFeature(r.textSizeData,d,n),u=o.get("text-padding");D=this.collisionIndex.placeCollisionCircles(y,n,r.lineVertexArray,r.glyphOffsetArray,c,s,a,l,i,x,f.predicate,t.collisionCircleDiameter,u,this.retainedQueryData[r.bucketInstanceId].tileID),E=y||D.circles.length>0&&!D.collisionDetected,C=C&&D.offscreen}if(w.iconFeatureIndex&&(R=w.iconFeatureIndex),w.iconBox){const t=t=>{F(t);const n=b&&A?yt(A.x,A.y,_,x,this.transform.angle):new e.pointGeometry(0,0),i=r.getSymbolInstanceIconSize(p,this.transform.zoom,h);return this.collisionIndex.placeCollisionBox(i,t,n,v,c,s,f.predicate)};M&&M.box&&M.box.length&&w.verticalIconBox?(L=t(w.verticalIconBox),k=L.box.length>0):(L=t(w.iconBox),k=L.box.length>0),C=C&&L.offscreen}const B=m||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,j=g||0===t.numIconVertices;if(B||j?j?B||(k=k&&E):E=k&&E:k=E=k&&E,E&&P&&P.box&&this.collisionIndex.insertCollisionBox(P.box,o.get("text-ignore-placement"),r.bucketInstanceId,M&&M.box&&z?z:O,f.ID),k&&L&&this.collisionIndex.insertCollisionBox(L.box,o.get("icon-ignore-placement"),r.bucketInstanceId,R,f.ID),D&&(E&&this.collisionIndex.insertCollisionCircles(D.circles,o.get("text-ignore-placement"),r.bucketInstanceId,O,f.ID),i)){const e=r.bucketInstanceId;let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=new pt);for(let n=0;n<D.circles.length;n+=4)t.circles.push(D.circles[n+0]),t.circles.push(D.circles[n+1]),t.circles.push(D.circles[n+2]),t.circles.push(D.collisionDetected?1:0)}this.placements[t.crossTileID]=new dt(E||T,k||S,C||r.justReloaded),n[t.crossTileID]=!0};if(w){const e=r.getSortedSymbolIndexes(this.transform.angle);for(let t=e.length-1;t>=0;--t){const n=e[t];E(r.symbolInstances.get(n),n,r.collisionArrays[n])}}else for(let e=t.symbolInstanceStart;e<t.symbolInstanceEnd;e++)E(r.symbolInstances.get(e),e,r.collisionArrays[e]);if(i&&r.bucketInstanceId in this.collisionCircleArrays){const t=this.collisionCircleArrays[r.bucketInstanceId];e.invert(t.invProjMatrix,s),t.viewportMatrix=this.collisionIndex.getViewportMatrix()}r.justReloaded=!1}markUsedJustification(t,n,i,r){let o;o=r===e.WritingMode.vertical?i.verticalPlacedTextSymbolIndex:{left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex}[e.getAnchorJustification(n)];const s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];for(const e of s)e>=0&&(t.text.placedSymbolArray.get(e).crossTileID=o>=0&&e!==o?0:i.crossTileID)}markUsedOrientation(t,n,i){const r=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,o=n===e.WritingMode.vertical?n:0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];for(const e of s)t.text.placedSymbolArray.get(e).placedOrientation=r;i.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let n=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const i=t?t.symbolFadeChange(e):1,r=t?t.opacities:{},o=t?t.variableOffsets:{},s=t?t.placedOrientations:{};for(const a in this.placements){const e=this.placements[a],t=r[a];t?(this.opacities[a]=new ht(t,i,e.text,e.icon),n=n||e.text!==t.text.placed||e.icon!==t.icon.placed):(this.opacities[a]=new ht(null,i,e.text,e.icon,e.skipFade),n=n||e.text||e.icon)}for(const a in r){const e=r[a];if(!this.opacities[a]){const t=new ht(e,i,!1,!1);t.isHidden()||(this.opacities[a]=t,n=n||e.text.placed||e.icon.placed)}}for(const a in o)this.variableOffsets[a]||!this.opacities[a]||this.opacities[a].isHidden()||(this.variableOffsets[a]=o[a]);for(const a in s)this.placedOrientations[a]||!this.opacities[a]||this.opacities[a].isHidden()||(this.placedOrientations[a]=s[a]);n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const n={};for(const i of t){const t=i.getBucket(e);t&&i.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n,i.collisionBoxArray)}}updateBucketOpacities(t,n,i){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const r=t.layers[0].layout,o=new ht(null,0,!1,!1,!0),s=r.get("text-allow-overlap"),a=r.get("icon-allow-overlap"),l=r.get("text-variable-anchor"),c="map"===r.get("text-rotation-alignment"),u="map"===r.get("text-pitch-alignment"),h="none"!==r.get("icon-text-fit"),d=new ht(null,0,s&&(a||!t.hasIconData()||r.get("icon-optional")),a&&(s||!t.hasTextData()||r.get("text-optional")),!0);!t.collisionArrays&&i&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(i);const p=(e,t,n)=>{for(let i=0;i<t/4;i++)e.opacityVertexArray.emplaceBack(n)};for(let f=0;f<t.symbolInstances.length;f++){const i=t.symbolInstances.get(f),{numHorizontalGlyphVertices:r,numVerticalGlyphVertices:s,crossTileID:a}=i;let m=this.opacities[a];n[a]?m=o:m||(m=d,this.opacities[a]=m),n[a]=!0;const g=i.numIconVertices>0,y=this.placedOrientations[i.crossTileID],v=y===e.WritingMode.vertical,_=y===e.WritingMode.horizontal||y===e.WritingMode.horizontalOnly;if(r>0||s>0){const e=Ct(m.text);p(t.text,r,v?At:e),p(t.text,s,_?At:e);const n=m.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach(e=>{e>=0&&(t.text.placedSymbolArray.get(e).hidden=n||v?1:0)}),i.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=n||_?1:0);const o=this.variableOffsets[i.crossTileID];o&&this.markUsedJustification(t,o.anchor,i,y);const a=this.placedOrientations[i.crossTileID];a&&(this.markUsedJustification(t,"left",i,a),this.markUsedOrientation(t,a,i))}if(g){const e=Ct(m.icon),n=!(h&&i.verticalPlacedIconSymbolIndex&&v);i.placedIconSymbolIndex>=0&&(p(t.icon,i.numIconVertices,n?e:At),t.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=m.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(p(t.icon,i.numVerticalIconVertices,n?At:e),t.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=m.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const n=t.collisionArrays[f];if(n){let i=new e.pointGeometry(0,0);if(n.textBox||n.verticalTextBox){let e=!0;if(l){const t=this.variableOffsets[a];t?(i=gt(t.anchor,t.width,t.height,t.textOffset,t.textScale),c&&i._rotate(u?this.transform.angle:-this.transform.angle)):e=!1}n.textBox&&_t(t.textCollisionBox.collisionVertexArray,m.text.placed,!e||v,i.x,i.y),n.verticalTextBox&&_t(t.textCollisionBox.collisionVertexArray,m.text.placed,!e||_,i.x,i.y)}const r=Boolean(!_&&n.verticalIconBox);n.iconBox&&_t(t.iconCollisionBox.collisionVertexArray,m.icon.placed,r,h?i.x:0,h?i.y:0),n.verticalIconBox&&_t(t.iconCollisionBox.collisionVertexArray,m.icon.placed,!r,h?i.x:0,h?i.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){const n=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*n>e}setStale(){this.stale=!0}}function _t(e,t,n,i,r){e.emplaceBack(t?1:0,n?1:0,i||0,r||0),e.emplaceBack(t?1:0,n?1:0,i||0,r||0),e.emplaceBack(t?1:0,n?1:0,i||0,r||0),e.emplaceBack(t?1:0,n?1:0,i||0,r||0)}const xt=Math.pow(2,25),bt=Math.pow(2,24),wt=Math.pow(2,17),Tt=Math.pow(2,16),St=Math.pow(2,9),Et=Math.pow(2,8),kt=Math.pow(2,1);function Ct(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*xt+t*bt+n*wt+t*Tt+n*St+t*Et+n*kt+t}const At=0;class It{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,n,i,r){const o=this._bucketParts;for(;this._currentTileIndex<e.length;)if(t.getBucketParts(o,i,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,r())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((e,t)=>e.sortKey-t.sortKey));this._currentPartIndex<o.length;)if(t.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,r())return!0;return!1}}class Mt{constructor(e,t,n,i,r,o,s,a){this.placement=new vt(e,r,o,s,a),this._currentPlacementIndex=t.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=i,this._done=!1}isDone(){return this._done}continuePlacement(t,n,i){const r=e.exported.now(),o=()=>{const t=e.exported.now()-r;return!this._forceFullPlacement&&t>2};for(;this._currentPlacementIndex>=0;){const e=n[t[this._currentPlacementIndex]],r=this.placement.collisionIndex.transform.zoom;if("symbol"===e.type&&(!e.minzoom||e.minzoom<=r)&&(!e.maxzoom||e.maxzoom>r)){if(this._inProgressLayer||(this._inProgressLayer=new It(e)),this._inProgressLayer.continuePlacement(i[e.source],this.placement,this._showCollisionBoxes,e,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Pt=512/e.EXTENT/2;class Dt{constructor(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(let i=0;i<t.length;i++){const n=t.get(i),r=n.key;this.indexedSymbolInstances[r]||(this.indexedSymbolInstances[r]=[]),this.indexedSymbolInstances[r].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,e)})}}getScaledCoordinates(t,n){const i=Pt/Math.pow(2,n.canonical.z-this.tileID.canonical.z);return{x:Math.floor((n.canonical.x*e.EXTENT+t.anchorX)*i),y:Math.floor((n.canonical.y*e.EXTENT+t.anchorY)*i)}}findMatches(e,t,n){const i=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z);for(let r=0;r<e.length;r++){const o=e.get(r);if(o.crossTileID)continue;const s=this.indexedSymbolInstances[o.key];if(!s)continue;const a=this.getScaledCoordinates(o,t);for(const e of s)if(Math.abs(e.coord.x-a.x)<=i&&Math.abs(e.coord.y-a.y)<=i&&!n[e.crossTileID]){n[e.crossTileID]=!0,o.crossTileID=e.crossTileID;break}}}}class Lt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ot{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const t=Math.round((e-this.lng)/360);if(0!==t)for(const n in this.indexes){const e=this.indexes[n],i={};for(const n in e){const r=e[n];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+t),i[r.tileID.key]=r}this.indexes[n]=i}this.lng=e}addBucket(e,t,n){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let r=0;r<t.symbolInstances.length;r++)t.symbolInstances.get(r).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const i=this.usedCrossTileIDs[e.overscaledZ];for(const r in this.indexes){const n=this.indexes[r];if(Number(r)>e.overscaledZ)for(const r in n){const o=n[r];o.tileID.isChildOf(e)&&o.findMatches(t.symbolInstances,e,i)}else{const o=n[e.scaledTo(Number(r)).key];o&&o.findMatches(t.symbolInstances,e,i)}}for(let r=0;r<t.symbolInstances.length;r++){const e=t.symbolInstances.get(r);e.crossTileID||(e.crossTileID=n.generate(),i[e.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new Dt(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(const n in t.indexedSymbolInstances)for(const i of t.indexedSymbolInstances[n])delete this.usedCrossTileIDs[e][i.crossTileID]}removeStaleBuckets(e){let t=!1;for(const n in this.indexes){const i=this.indexes[n];for(const r in i)e[i[r].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,i[r]),delete i[r],t=!0)}return t}}class zt{constructor(){this.layerIndexes={},this.crossTileIDs=new Lt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,n){let i=this.layerIndexes[e.id];void 0===i&&(i=this.layerIndexes[e.id]=new Ot);let r=!1;const o={};i.handleWrapJump(n);for(const s of t){const t=s.getBucket(e);t&&e.id===t.layerIds[0]&&(t.bucketInstanceId||(t.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(s.tileID,t,this.crossTileIDs)&&(r=!0),o[t.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(r=!0),r}pruneUnusedLayers(e){const t={};e.forEach(e=>{t[e]=!0});for(const n in this.layerIndexes)t[n]||delete this.layerIndexes[n]}}const Rt=(t,n)=>e.emitValidationErrors(t,n&&n.filter(e=>"source.canvas"!==e.identifier)),Ft=e.pick(Ne,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog"]),Nt=e.pick(Ne,["setCenter","setZoom","setBearing","setPitch"]),Bt=function(){const t={},n=e.spec.$version;for(const i in e.spec.$root){const r=e.spec.$root[i];if(r.required){let e=null;e="version"===i?n:"array"===r.type?[]:{},null!=e&&(t[i]=e)}}return t}(),jt={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Vt extends e.Evented{constructor(t,n={}){super(),this.map=t,this.dispatcher=new A(ze(),this),this.imageManager=new g,this.imageManager.setEventedParent(this),this.glyphManager=new e.GlyphManager(t._requestManager,n.localFontFamily?e.LocalGlyphMode.all:n.localIdeographFontFamily?e.LocalGlyphMode.ideographs:e.LocalGlyphMode.none,n.localFontFamily||n.localIdeographFontFamily),this.lineAtlas=new e.LineAtlas(256,512),this.crossTileSymbolIndex=new zt,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());const i=this;this._rtlTextPluginCallback=Vt.registerForPluginStateChange(t=>{i.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},(t,n)=>{if(e.triggerPluginCompletionEvent(t),n&&n.every(e=>e))for(const e in i._sourceCaches){const t=i._sourceCaches[e],n=t.getSource().type;"vector"!==n&&"geojson"!==n||t.reload()}})}),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.getSource(e.sourceId);if(t&&t.vectorLayerIds)for(const n in this._layers){const e=this._layers[n];e.source===t.id&&this._validateLayer(e)}})}loadURL(t,n={}){this.fire(new e.Event("dataloading",{dataType:"style"}));const i="boolean"==typeof n.validate?n.validate:!e.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,n.accessToken);const r=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(r,(t,n)=>{this._request=null,t?this.fire(new e.ErrorEvent(t)):n&&this._load(n,i)})}loadJSON(t,n={}){this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.exported.frame(()=>{this._request=null,this._load(t,!1!==n.validate)})}loadEmpty(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Bt,!1)}_updateLayerCount(e,t){const n=t?1:-1;e.is3D()&&(this._num3DLayers+=n),"circle"===e.type&&(this._numCircleLayers+=n),"symbol"===e.type&&(this._numSymbolLayers+=n)}_load(t,n){if(n&&Rt(this,e.validateStyle(t)))return;this._loaded=!0,this.stylesheet=t;for(const e in t.sources)this.addSource(e,t.sources[e],{validate:!1});this._changed=!1,t.sprite?this._loadSprite(t.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(t.glyphs);const i=Fe(this.stylesheet.layers);this._order=i.map(e=>e.id),this._layers={},this._serializedLayers={};for(let r of i)r=e.createStyleLayer(r),r.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=r,this._serializedLayers[r.id]=r.serialize(),this._updateLayerCount(r,!0);this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new _(this.stylesheet.light),this.stylesheet.terrain&&this._createTerrain(this.stylesheet.terrain),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}_loadSprite(t){this._spriteRequest=function(t,n,i){let r,o,s;const a=e.exported.devicePixelRatio>1?"@2x":"";let l=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,a,".json"),e.ResourceType.SpriteJSON),(e,t)=>{l=null,s||(s=e,r=t,u())}),c=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,a,".png"),e.ResourceType.SpriteImage),(e,t)=>{c=null,s||(s=e,o=t,u())});function u(){if(s)i(s);else if(r&&o){const t=e.exported.getImageData(o),n={};for(const i in r){const{width:o,height:s,x:a,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:d,content:p}=r[i],f=new e.RGBAImage({width:o,height:s});e.RGBAImage.copy(t,f,{x:a,y:l},{x:0,y:0},{width:o,height:s}),n[i]={data:f,pixelRatio:u,sdf:c,stretchX:h,stretchY:d,content:p}}i(null,n)}}return{cancel(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,(t,n)=>{if(this._spriteRequest=null,t)this.fire(new e.ErrorEvent(t));else if(n)for(const e in n)this.imageManager.addImage(e,n[e]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new e.Event("data",{dataType:"style"}))})}_validateLayer(t){const n=this.getSource(t.source);if(!n)return;const i=t.sourceLayer;i&&("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new e.ErrorEvent(new Error(`Source layer "${i}" does not exist on source "${n.id}" as specified by style layer "${t.id}"`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const e in this._sourceCaches)if(!this._sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(e){const t=[];for(const n of e){const e=this._layers[n];"custom"!==e.type&&t.push(e.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.fog&&this.fog.hasTransition())return!0;for(const e in this._sourceCaches)if(this._sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(e){return!!this.terrain&&jt[e.type]}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const e=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(e.length||n.length)&&this._updateWorkerLayers(e,n);for(const t in this._updatedSources){const e=this._updatedSources[t];"reload"===e?this._reloadSource(t):"clear"===e&&this._clearSource(t)}this._updateTilesForChangedImages();for(const i in this._updatedPaintProps)this._layers[i].updateTransitions(t);this.light.updateTransitions(t),this.fog&&this.fog.updateTransitions(t),this._resetUpdates()}const i={};for(const e in this._sourceCaches){const t=this._sourceCaches[e];i[e]=t.used,t.used=!1}for(const e of this._order){const n=this._layers[e];if(n.recalculate(t,this._availableImages),!n.isHidden(t.zoom)){const e=this._getLayerSourceCache(n);e&&(e.used=!0)}const i=this.map.painter;if(i){const e=n.getProgramIds();if(!e)continue;const r=n.getProgramConfiguration(t.zoom);for(const t of e)i.useProgram(t,r)}}for(const r in i){const t=this._sourceCaches[r];i[r]!==t.used&&t.getSource().fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:t.getSource().id}))}this.light.recalculate(t),this.terrain&&this.terrain.recalculate(t),this.fog&&this.fog.recalculate(t),this.z=t.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),n&&this.fire(new e.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this._sourceCaches)this._sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(t){if(this._checkLoaded(),Rt(this,e.validateStyle(t)))return!1;(t=e.clone$2(t)).layers=Fe(t.layers);const n=function(e,t){if(!e)return[{command:Ne.setStyle,args:[t]}];let n=[];try{if(!r(e.version,t.version))return[{command:Ne.setStyle,args:[t]}];r(e.center,t.center)||n.push({command:Ne.setCenter,args:[t.center]}),r(e.zoom,t.zoom)||n.push({command:Ne.setZoom,args:[t.zoom]}),r(e.bearing,t.bearing)||n.push({command:Ne.setBearing,args:[t.bearing]}),r(e.pitch,t.pitch)||n.push({command:Ne.setPitch,args:[t.pitch]}),r(e.sprite,t.sprite)||n.push({command:Ne.setSprite,args:[t.sprite]}),r(e.glyphs,t.glyphs)||n.push({command:Ne.setGlyphs,args:[t.glyphs]}),r(e.transition,t.transition)||n.push({command:Ne.setTransition,args:[t.transition]}),r(e.light,t.light)||n.push({command:Ne.setLight,args:[t.light]}),r(e.fog,t.fog)||n.push({command:Ne.setFog,args:[t.fog]});const i={},o=[];!function(e,t,n,i){let o;for(o in t=t||{},e=e||{})e.hasOwnProperty(o)&&(t.hasOwnProperty(o)||je(o,n,i));for(o in t)t.hasOwnProperty(o)&&(e.hasOwnProperty(o)?r(e[o],t[o])||("geojson"===e[o].type&&"geojson"===t[o].type&&$e(e,t,o)?n.push({command:Ne.setGeoJSONSourceData,args:[o,t[o].data]}):Ve(o,t,n,i)):Be(o,t,n))}(e.sources,t.sources,o,i);const s=[];e.layers&&e.layers.forEach(e=>{i[e.source]?n.push({command:Ne.removeLayer,args:[e.id]}):s.push(e)});let a=e.terrain;a&&i[a.source]&&(n.push({command:Ne.setTerrain,args:[void 0]}),a=void 0),n=n.concat(o),r(a,t.terrain)||n.push({command:Ne.setTerrain,args:[t.terrain]}),function(e,t,n){t=t||[];const i=(e=e||[]).map(qe),o=t.map(qe),s=e.reduce(Ge,{}),a=t.reduce(Ge,{}),l=i.slice(),c=Object.create(null);let u,h,d,p,f,m,g;for(u=0,h=0;u<i.length;u++)d=i[u],a.hasOwnProperty(d)?h++:(n.push({command:Ne.removeLayer,args:[d]}),l.splice(l.indexOf(d,h),1));for(u=0,h=0;u<o.length;u++)d=o[o.length-1-u],l[l.length-1-u]!==d&&(s.hasOwnProperty(d)?(n.push({command:Ne.removeLayer,args:[d]}),l.splice(l.lastIndexOf(d,l.length-h),1)):h++,m=l[l.length-u],n.push({command:Ne.addLayer,args:[a[d],m]}),l.splice(l.length-u,0,d),c[d]=!0);for(u=0;u<o.length;u++)if(d=o[u],p=s[d],f=a[d],!c[d]&&!r(p,f))if(r(p.source,f.source)&&r(p["source-layer"],f["source-layer"])&&r(p.type,f.type)){for(g in Ue(p.layout,f.layout,n,d,null,Ne.setLayoutProperty),Ue(p.paint,f.paint,n,d,null,Ne.setPaintProperty),r(p.filter,f.filter)||n.push({command:Ne.setFilter,args:[d,f.filter]}),r(p.minzoom,f.minzoom)&&r(p.maxzoom,f.maxzoom)||n.push({command:Ne.setLayerZoomRange,args:[d,f.minzoom,f.maxzoom]}),p)p.hasOwnProperty(g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Ue(p[g],f[g],n,d,g.slice(6),Ne.setPaintProperty):r(p[g],f[g])||n.push({command:Ne.setLayerProperty,args:[d,g,f[g]]}));for(g in f)f.hasOwnProperty(g)&&!p.hasOwnProperty(g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Ue(p[g],f[g],n,d,g.slice(6),Ne.setPaintProperty):r(p[g],f[g])||n.push({command:Ne.setLayerProperty,args:[d,g,f[g]]}))}else n.push({command:Ne.removeLayer,args:[d]}),m=l[l.lastIndexOf(d)+1],n.push({command:Ne.addLayer,args:[f,m]})}(s,t.layers,n)}catch(e){console.warn("Unable to compute style diff:",e),n=[{command:Ne.setStyle,args:[t]}]}return n}(this.serialize(),t).filter(e=>!(e.command in Nt));if(0===n.length)return!1;const i=n.filter(e=>!(e.command in Ft));if(i.length>0)throw new Error(`Unimplemented: ${i.map(e=>e.command).join(", ")}.`);return n.forEach(e=>{"setTransition"!==e.command&&this[e.command].apply(this,e.args)}),this.stylesheet=t,!0}addImage(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,i={}){if(this._checkLoaded(),void 0!==this.getSource(t))throw new Error("There is already a source with this ID");if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,n,null,i))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const r=ke(t,n,this.dispatcher,this);r.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:r.serialize(),sourceId:t}));const o=n=>{const i=(n?"symbol:":"other:")+t,o=this._sourceCaches[i]=new e.SourceCache(i,r,n);(n?this._symbolSourceCaches:this._otherSourceCaches)[t]=o,o.style=this,o.onAdd(this.map)};o(!1),"vector"!==n.type&&"geojson"!==n.type||o(!0),r.onAdd&&r.onAdd(this.map),this._changed=!0}removeSource(t){this._checkLoaded();const n=this.getSource(t);if(void 0===n)throw new Error("There is no source with this ID");for(const r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${r}" is using it.`)));if(this.terrain&&this.terrain.get().source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while terrain is using it.`)));const i=this._getSourceCaches(t);for(const r of i)delete this._sourceCaches[r.id],delete this._updatedSources[r.id],r.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:r.getSource().id})),r.setEventedParent(null),r.clearTiles();delete this._otherSourceCaches[t],delete this._symbolSourceCaches[t],n.setEventedParent(null),n.onRemove&&n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){this._checkLoaded(),this.getSource(e).setData(t),this._changed=!0}getSource(e){const t=this._getSourceCache(e);return t&&t.getSource()}addLayer(t,n,i={}){this._checkLoaded();const r=t.id;if(this.getLayer(r))return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${r}" already exists on this map`)));let o;if("custom"===t.type){if(Rt(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(r,t.source),t=e.clone$2(t),t=e.extend(t,{source:r})),this._validate(e.validateStyle.layer,"layers."+r,t,{arrayIndex:-1},i))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:r}}),this._serializedLayers[o.id]=o.serialize(),this._updateLayerCount(o,!0)}const s=n?this._order.indexOf(n):this._order.length;if(n&&-1===s)return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${n}" does not exist on this map.`)));this._order.splice(s,0,r),this._layerOrderChanged=!0,this._layers[r]=o;const a=this._getLayerSourceCache(o);if(this._removedLayers[r]&&o.source&&a&&"custom"!==o.type){const e=this._removedLayers[r];delete this._removedLayers[r],e.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",a.pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const i=this._order.indexOf(t);this._order.splice(i,1);const r=n?this._order.indexOf(n):this._order.length;n&&-1===r?this.fire(new e.ErrorEvent(new Error(`Layer with id "${n}" does not exist on this map.`))):(this._order.splice(r,0,t),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be removed.`)));n.setEventedParent(null),this._updateLayerCount(n,!1);const i=this._order.indexOf(t);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(e){return this._layers[e]}hasLayer(e){return e in this._layers}hasLayerType(e){for(const t in this._layers)if(this._layers[t].type===e)return!0;return!1}setLayerZoomRange(t,n,i){this._checkLoaded();const r=this.getLayer(t);r?r.minzoom===n&&r.maxzoom===i||(null!=n&&(r.minzoom=n),null!=i&&(r.maxzoom=i),this._updateLayer(r)):this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(t,n,i={}){this._checkLoaded();const o=this.getLayer(t);if(o){if(!r(o.filter,n))return null==n?(o.filter=void 0,void this._updateLayer(o)):void(this._validate(e.validateStyle.filter,`layers.${o.id}.filter`,n,null,i)||(o.filter=e.clone$2(n),this._updateLayer(o)))}else this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be filtered.`)))}getFilter(t){return e.clone$2(this.getLayer(t).filter)}setLayoutProperty(t,n,i,o={}){this._checkLoaded();const s=this.getLayer(t);s?r(s.getLayoutProperty(n),i)||(s.setLayoutProperty(n,i,o),this._updateLayer(s)):this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(t,n){const i=this.getLayer(t);if(i)return i.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style.`)))}setPaintProperty(t,n,i,o={}){this._checkLoaded();const s=this.getLayer(t);s?r(s.getPaintProperty(n),i)||(s.setPaintProperty(n,i,o)&&this._updateLayer(s),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(t,n){this._checkLoaded();const i=t.source,r=t.sourceLayer,o=this.getSource(i);if(void 0===o)return void this.fire(new e.ErrorEvent(new Error(`The source '${i}' does not exist in the map's style.`)));const s=o.type;if("geojson"===s&&r)return void this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===s&&!r)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided.")));const a=this._getSourceCaches(i);for(const e of a)e.setFeatureState(r,t.id,n)}removeFeatureState(t,n){this._checkLoaded();const i=t.source,r=this.getSource(i);if(void 0===r)return void this.fire(new e.ErrorEvent(new Error(`The source '${i}' does not exist in the map's style.`)));const o=r.type,s="vector"===o?t.sourceLayer:void 0;if("vector"===o&&!s)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(n&&"string"!=typeof t.id&&"number"!=typeof t.id)return void this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const a=this._getSourceCaches(i);for(const e of a)e.removeFeatureState(s,t.id,n)}getFeatureState(t){this._checkLoaded();const n=t.source,i=t.sourceLayer,r=this.getSource(n);if(void 0!==r){if("vector"!==r.type||i)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(n)[0].getFeatureState(i,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const t={};for(const e in this._sourceCaches){const n=this._sourceCaches[e].getSource();t[n.id]||(t[n.id]=n.serialize())}return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.stylesheet.terrain,fog:this.stylesheet.fog,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,layers:this._serializeLayers(this._order)},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0;const t=this._getLayerSourceCache(e);e.source&&!this._updatedSources[e.source]&&t&&"raster"!==t.getSource().type&&(this._updatedSources[e.source]="reload",t.pause()),this._changed=!0}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,n={},i=[];for(let o=this._order.length-1;o>=0;o--){const r=this._order[o];if(t(r)){n[r]=o;for(const t of e){const e=t[r];if(e)for(const t of e)i.push(t)}}}i.sort((e,t)=>t.intersectionZ-e.intersectionZ);const r=[];for(let o=this._order.length-1;o>=0;o--){const s=this._order[o];if(t(s))for(let e=i.length-1;e>=0;e--){const t=i[e].feature;if(n[t.layer.id]<o)break;r.push(t),i.pop()}else for(const t of e){const e=t[s];if(e)for(const t of e)r.push(t.feature)}}return r}queryRenderedFeatures(t,n,i){n&&n.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",n.filter,null,n);const r={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const t of n.layers){const n=this._layers[t];if(!n)return this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be queried for features.`))),[];r[n.source]=!0}}const o=[];n.availableImages=this._availableImages;const s=n&&n.layers?n.layers.some(e=>{const t=this.getLayer(e);return t&&t.is3D()}):this.has3DLayers(),a=M.createFromScreenPoints(t,i);for(const e in this._sourceCaches){const t=this._sourceCaches[e].getSource().id;n.layers&&!r[t]||o.push(Ae(this._sourceCaches[e],this._layers,this._serializedLayers,a,n,i,s,!!this.map._showQueryGeometry))}return this.placement&&o.push(function(e,t,n,i,r,o,s){const a={},l=o.queryRenderedSymbols(i),c=[];for(const u of Object.keys(l).map(Number))c.push(s[u]);c.sort(Me);for(const u of c){const n=u.featureIndex.lookupSymbolFeatures(l[u.bucketInstanceId],t,u.bucketIndex,u.sourceLayerIndex,r.filter,r.layers,r.availableImages,e);for(const e in n){const t=a[e]=a[e]||[],i=n[e];i.sort((e,t)=>{const n=u.featureSortOrder;if(n){const i=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-i}return t.featureIndex-e.featureIndex});for(const e of i)t.push(e)}}for(const u in a)a[u].forEach(t=>{const i=t.feature,r=n(e[u]).getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r});return a}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),a.screenGeometry,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(t,n){n&&n.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);const i=this._getSourceCaches(t);let r=[];for(const e of i)r=r.concat(Ie(e,n));return r}addSourceType(e,t,n){return Vt.getSourceType(e)?n(new Error(`A source type called "${e}" already exists.`)):(Vt.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},n):n(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const i=this.light.getLight();let o=!1;for(const e in t)if(!r(t[e],i[e])){o=!0;break}if(!o)return;const s={now:e.exported.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(s)}getTerrain(){return this.terrain?this.terrain.get():null}setTerrain(t){if(this._checkLoaded(),!t)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);if("object"==typeof t.source){const n="terrain-dem-src";this.addSource(n,t.source),t=e.clone$2(t),t=e.extend(t,{source:n})}if(!this._validate(e.validateStyle.terrain,"terrain",t)){if(this.terrain){const n=this.terrain,i=n.get();for(const o in t)if(!r(t[o],i[o])){n.set(t),this.stylesheet.terrain=t;const i={now:e.exported.now(),transition:e.extend({duration:0},this.stylesheet.transition)};n.updateTransitions(i);break}}else this._createTerrain(t);this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}}_createFog(t){const n=this.fog=new C(t);this.stylesheet.fog=t;const i={now:e.exported.now(),transition:e.extend({duration:0},this.stylesheet.transition)};n.updateTransitions(i)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask(()=>{for(const e of this.map._markers)e._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(t){if(this._checkLoaded(),!t)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const n=this.fog,i=n.get();for(const o in t)if(!r(t[o],i[o])){n.set(t),this.stylesheet.fog=t;const i={now:e.exported.now(),transition:e.extend({duration:0},this.stylesheet.transition)};n.updateTransitions(i);break}}else this._createFog(t);this._markersNeedUpdate=!0}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const e=this._order.filter(e=>this.isLayerDraped(this._layers[e])),t=this._order.filter(e=>!this.isLayerDraped(this._layers[e]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...e),this._drapedFirstOrder.push(...t)}_createTerrain(t){const n=this.terrain=new w(t);this.stylesheet.terrain=t,this.dispatcher.broadcast("enableTerrain",!0),this._force3DLayerUpdate();const i={now:e.exported.now(),transition:e.extend({duration:0},this.stylesheet.transition)};n.updateTransitions(i)}_force3DLayerUpdate(){for(const e in this._layers){const t=this._layers[e];"fill-extrusion"===t.type&&this._updateLayer(t)}}_validate(t,n,i,r,o={}){return(!o||!1!==o.validate)&&Rt(this,t.call(e.validateStyle,e.extend({key:n,style:this.serialize(),value:i,styleSpec:e.spec},r)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const e in this._layers)this._layers[e].setEventedParent(null);for(const e in this._sourceCaches)this._sourceCaches[e].clearTiles(),this._sourceCaches[e].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(e){const t=this._getSourceCaches(e);for(const n of t)n.clearTiles()}_reloadSource(e){const t=this._getSourceCaches(e);for(const n of t)n.resume(),n.reload()}_updateSources(e){for(const t in this._sourceCaches)this._sourceCaches[t].update(e)}_generateCollisionBoxes(){for(const e in this._sourceCaches){const t=this._sourceCaches[e];t.resume(),t.reload()}}_updatePlacement(t,n,i,r,o=!1){let s=!1,a=!1;const l={};for(const e of this._order){const n=this._layers[e];if("symbol"!==n.type)continue;if(!l[n.source]){const e=this._getLayerSourceCache(n);if(!e)continue;l[n.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}const i=this.crossTileSymbolIndex.addLayer(n,l[n.source],t.center.lng);s=s||i}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),o=o||this._layerOrderChanged||0===i,this._layerOrderChanged&&this.fire(new e.Event("neworder")),(o||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.exported.now(),t.zoom))&&(this.pauseablePlacement=new Mt(t,this._order,o,n,i,r,this.placement,this.fog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.exported.now()),a=!0),s&&this.pauseablePlacement.placement.setStale()),a||s)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.exported.now())}_releaseSymbolFadeTiles(){for(const e in this._sourceCaches)this._sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,t,n){this.imageManager.getImages(t.icons,n),this._updateTilesForChangedImages();const i=e=>{e&&e.setDependencies(t.tileID.key,t.type,t.icons)};i(this._otherSourceCaches[t.source]),i(this._symbolSourceCaches[t.source])}getGlyphs(e,t,n){this.glyphManager.getGlyphs(t.stacks,n)}getResource(t,n,i){return e.makeRequest(n,i)}_getSourceCache(e){return this._otherSourceCaches[e]}_getLayerSourceCache(e){return"symbol"===e.type?this._symbolSourceCaches[e.source]:this._otherSourceCaches[e.source]}_getSourceCaches(e){const t=[];return this._otherSourceCaches[e]&&t.push(this._otherSourceCaches[e]),this._symbolSourceCaches[e]&&t.push(this._symbolSourceCaches[e]),t}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}}Vt.getSourceType=function(e){return Ee[e]},Vt.setSourceType=function(e,t){Ee[e]=t},Vt.registerForPluginStateChange=e.registerForPluginStateChange;var $t="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}\n#endif",Ut="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}";let qt={},Gt={};qt=Xt("","\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef TERRAIN\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;uniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {float dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);}float prevElevation(vec2 apos) {float dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {float nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {return currentElevation(apos);}\n#endif\nfloat unpack_depth(vec4 rgba_depth)\n{const vec4 bit_shift=vec4(1.0/(256.0*256.0*256.0),1.0/(256.0*256.0),1.0/256.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {vec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);return vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;vec4 bounds=vec4(d,vec2(1.0)-d);h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",!0),Gt=Xt("#ifdef FOG\nuniform float u_fog_temporal_offset;float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif","#ifdef FOG\nuniform mat4 u_fog_matrix;vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",!0);const Ht=Xt("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),Wt=$t;var Zt={background:Xt("uniform vec4 u_color;uniform float u_opacity;void main() {vec4 out_color=u_color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:Xt("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 out_color=mix(color1,color2,u_mix);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:Xt("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float height=circle_elevation(circle_center);vec4 world_center=vec4(circle_center,height,1);vec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);vec4 occlusion_world_center=vec4(circle_center,cantilevered_height,1);vec4 occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nvec4 occlusion_world_center=world_center;vec4 occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:Xt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Xt("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\ngl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec3 pos=vec3(floor(a_pos*0.5)+extrude,elevation(floor(a_pos*0.5)));gl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:Xt("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Xt("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;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,elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=u_matrix*vec4(a_pos,elevation(a_pos),1.0);gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Xt("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_2f;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_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-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(\n0.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);}"),debug:Xt("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() {float h=elevation(a_pos);v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);}"),fill:Xt("#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\nvec4 out_color=color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_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);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:Xt("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);vec4 out_color=outline_color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:Xt("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);vec4 out_color=mix(color1,color2,u_fade);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillPattern:Xt("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);vec4 out_color=mix(color1,color2,u_fade);\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*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);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:Xt("varying vec4 v_color;void main() {vec4 color=v_color;\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=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 vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;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 pos_nx=floor(a_pos_normal_ed.xyz*0.5);mediump vec3 top_up_ny=a_pos_normal_ed.xyz-2.0*pos_nx;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;\n#ifdef TERRAIN\nvec2 centroid_pos=a_centroid_pos;bool flat_roof=centroid_pos.x !=0.0;float ele=elevation(pos_nx.xy);float hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);float c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;float h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);vec3 pos=vec3(pos_nx.xy,h);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#else\nvec3 pos=vec3(pos_nx.xy,t > 0.0 ? height : base);gl_Position=u_matrix*vec4(pos,1);\n#endif\nfloat 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,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*=(\n(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.rgb+=clamp(color.rgb*directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_color*=u_opacity;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:Xt("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 out_color=mix(color1,color2,u_fade);out_color=out_color*v_lighting;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\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 vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;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 pos_nx=floor(a_pos_normal_ed.xyz*0.5);mediump vec3 top_up_ny=a_pos_normal_ed.xyz-2.0*pos_nx;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_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=top_up_ny.x;float z=t > 0.0 ? height : base;\n#ifdef TERRAIN\nvec2 centroid_pos=a_centroid_pos;bool flat_roof=centroid_pos.x !=0.0;float ele=elevation(pos_nx.xy);float hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);float c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;float h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);vec3 p=vec3(pos_nx.xy,h);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);\n#else\nvec3 p=vec3(pos_nx.xy,z);gl_Position=u_matrix*vec4(p,1);\n#endif\nvec2 pos=normal.z==1.0\n? pos_nx.xy\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,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*=(\n(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;\n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:Xt("#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(\n(c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.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;}"),hillshade:Xt("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;void 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 FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:Xt("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);vec4 out_color=color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_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;\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;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;\n#ifndef RENDER_TO_TEXTURE\nfloat 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;\n#else\nv_gamma_scale=1.0;\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),lineGradient:Xt("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);\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_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;\n#ifndef RENDER_TO_TEXTURE\nfloat 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;\n#else\nv_gamma_scale=1.0;\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),linePattern:Xt("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);\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_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_linesofar;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;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;\n#ifndef RENDER_TO_TEXTURE\nfloat 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;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),lineSDF:Xt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_mix;uniform vec3 u_scale;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\n#pragma mapbox: define lowp vec4 dash_from\n#pragma mapbox: define lowp vec4 dash_to\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\n#pragma mapbox: initialize mediump vec4 dash_from\n#pragma mapbox: initialize mediump vec4 dash_to\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);float sdfwidth=min(dash_from.z*u_scale.y,dash_to.z*u_scale.z);float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/sdfwidth;alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);vec4 out_color=color;\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform vec2 u_texsize;uniform mediump vec3 u_scale;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\n#pragma mapbox: define lowp vec4 dash_from\n#pragma mapbox: define lowp vec4 dash_to\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\n#pragma mapbox: initialize mediump vec4 dash_from\n#pragma mapbox: initialize mediump vec4 dash_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;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*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*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;\n#ifndef RENDER_TO_TEXTURE\nfloat 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;\n#else\nv_gamma_scale=1.0;\n#endif\nfloat tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;float widthA=dash_from.z*fromScale;float widthB=dash_to.z*toScale;float heightA=dash_from.y;float heightB=dash_to.y;v_tex_a=vec2(a_linesofar*(tileZoomRatio/widthA)/floorwidth,(-normal.y*heightA+dash_from.x+0.5)/u_texsize.y);v_tex_b=vec2(a_linesofar*(tileZoomRatio/widthB)/floorwidth,(-normal.y*heightB+dash_to.x+0.5)/u_texsize.y);v_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:Xt("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(\ndot(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);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:Xt("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}","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;}float h=elevation(a_pos);vec4 projectedPoint=u_matrix*vec4(a_pos,h,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(\n0.5+0.5*distance_ratio,0.0,1.5);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),h,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,h,1.0);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0);\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\nfloat occlusion_fade=occlusionFade(projectedPoint);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projectedPoint.w <=0.0 || occlusion_fade==0.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(occlusion_fade,fade_opacity[0]+fade_change));}"),symbolSDF:Xt("#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}","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;}float h=elevation(a_pos);vec4 projectedPoint=u_matrix*vec4(a_pos,h,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(\n0.5+0.5*distance_ratio,0.0,1.5);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),h,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,h,1.0);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\nfloat occlusion_fade=occlusionFade(projectedPoint);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projectedPoint.w <=0.0 || occlusion_fade==0.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(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:Xt("#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}","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;}float h=elevation(a_pos);vec4 projectedPoint=u_matrix*vec4(a_pos,h,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(\n0.5+0.5*distance_ratio,0.0,1.5);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),h,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,h,1.0);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale);\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\nfloat occlusion_fade=occlusionFade(projectedPoint);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projectedPoint.w <=0.0 || occlusion_fade==0.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(occlusion_fade,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);}"),terrainRaster:Xt("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef FOG\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\nconst float skirtOffset=24575.0;const float wireframeOffset=0.00015;void main() {v_pos0=a_texture_pos/8192.0;float skirt=float(a_pos.x >=skirtOffset);float elevation=elevation(a_texture_pos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=u_skirt_height*u_skirt_height*wireframeOffset;\n#endif\nvec2 decodedPos=a_pos-vec2(skirt*skirtOffset,0.0);gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n}"),terrainDepth:Xt("#ifdef GL_ES\nprecision highp float;\n#endif\nvec4 pack_depth(float ndc_z) {float depth=ndc_z*0.5+0.5;const vec4 bit_shift=vec4(256.0*256.0*256.0,256.0*256.0,256.0,1.0);const vec4 bit_mask =vec4(0.0,1.0/256.0,1.0/256.0,1.0/256.0);vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}varying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying float v_depth;void main() {float elevation=elevation(a_texture_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:Xt("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Ut),skyboxGradient:Xt("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform lowp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Ut),skyboxCapture:Xt("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R                  vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M                  vec3(21e-6,21e-6,21e-6)\n#define MIE_G                   0.76\n#define DENSITY_HEIGHT_SCALE_R  8000.0\n#define DENSITY_HEIGHT_SCALE_M  1200.0\n#define PLANET_RADIUS           6360e3\n#define ATMOSPHERE_RADIUS       6420e3\n#define SAMPLE_STEPS            10\n#define DENSITY_STEPS           4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}")};function Xt(e,t,n){const i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=/uniform (highp |mediump |lowp )?([\w]+) ([\w]+)([\s]*)([\w]*)/g,o=t.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),s=e.match(r),a=t.match(r),l=$t.match(r);let c=a?a.concat(s):s;n||(qt.staticUniforms&&(c=qt.staticUniforms.concat(c)),Gt.staticUniforms&&(c=Gt.staticUniforms.concat(c))),c&&(c=c.concat(l));const u={};return{fragmentSource:e=e.replace(i,(e,t,n,i,r)=>(u[r]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nvarying ${n} ${i} ${r};\n#else\nuniform ${n} ${i} u_${r};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${r}\n    ${n} ${i} ${r} = u_${r};\n#endif\n`)),vertexSource:t=t.replace(i,(e,t,n,i,r)=>{const o="float"===i?"vec2":"vec4",s=r.match(/color/)?"color":o;return u[r]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nuniform lowp float u_${r}_t;\nattribute ${n} ${o} a_${r};\nvarying ${n} ${i} ${r};\n#else\nuniform ${n} ${i} u_${r};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${r}\n    ${r} = a_${r};\n#else\n    ${n} ${i} ${r} = u_${r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${r}\n    ${r} = unpack_mix_${s}(a_${r}, u_${r}_t);\n#else\n    ${n} ${i} ${r} = u_${r};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nuniform lowp float u_${r}_t;\nattribute ${n} ${o} a_${r};\n#else\nuniform ${n} ${i} u_${r};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${r}\n    ${n} ${i} ${r} = a_${r};\n#else\n    ${n} ${i} ${r} = u_${r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${r}\n    ${n} ${i} ${r} = unpack_mix_${s}(a_${r}, u_${r}_t);\n#else\n    ${n} ${i} ${r} = u_${r};\n#endif\n`}),staticAttributes:o,staticUniforms:c}}class Yt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,n,i,r,o,s,a){this.context=e;let l=this.boundPaintVertexBuffers.length!==i.length;for(let c=0;!l&&c<i.length;c++)this.boundPaintVertexBuffers[c]!==i[c]&&(l=!0);e.extVertexArrayObject&&this.vao&&this.boundProgram===t&&this.boundLayoutVertexBuffer===n&&!l&&this.boundIndexBuffer===r&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===s&&this.boundDynamicVertexBuffer2===a?(e.bindVertexArrayOES.set(this.vao),s&&s.bind(),r&&r.dynamicDraw&&r.bind(),a&&a.bind()):this.freshBind(t,n,i,r,o,s,a)}freshBind(e,t,n,i,r,o,s){let a;const l=e.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),a=0,this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=i,this.boundVertexOffset=r,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=s;else{a=c.currentNumAttributes||0;for(let e=l;e<a;e++)u.disableVertexAttribArray(e)}t.enableAttributes(u,e);for(const h of n)h.enableAttributes(u,e);o&&o.enableAttributes(u,e),s&&s.enableAttributes(u,e),t.bind(),t.setVertexAttribPointers(u,e,r);for(const h of n)h.bind(),h.setVertexAttribPointers(u,e,r);o&&(o.bind(),o.setVertexAttribPointers(u,e,r)),i&&i.bind(),s&&(s.bind(),s.setVertexAttribPointers(u,e,r)),c.currentNumAttributes=l}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function Qt(t,n){const i=Math.pow(2,n.canonical.z),r=n.canonical.y;return[new e.MercatorCoordinate(0,r/i).toLngLat().lat,new e.MercatorCoordinate(0,(r+1)/i).toLngLat().lat]}function Kt(t,n,i,r,o,s,a){const l=t.context,c=l.gl,u=i.fbo;if(!u)return;t.prepareDrawTile(n);const h=t.useProgram("hillshade");l.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,u.colorAttachment.get());const d=((e,t,n,i)=>{const r=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),s=n.paint.get("hillshade-accent-color");let a=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(a-=e.transform.angle);const l=!e.options.moving;return{u_matrix:i||e.transform.calculateProjMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:Qt(0,t.tileID),u_light:[n.paint.get("hillshade-exaggeration"),a],u_shadow:r,u_highlight:o,u_accent:s}})(t,i,r,t.terrain?n.projMatrix:null);t.prepareDrawProgram(l,h,n.toUnwrapped()),h.draw(l,c.TRIANGLES,o,s,a,e.CullFaceMode.disabled,d,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}function Jt(t,n,i){if(!n.needsDEMTextureUpload)return;const r=t.context,o=r.gl;r.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||t.getTileTexture(i.stride);const s=i.getPixels();n.demTexture?n.demTexture.update(s,{premultiply:!1}):n.demTexture=new e.Texture(r,s,o.RGBA,{premultiply:!1}),n.needsDEMTextureUpload=!1}function en(t,n,i,r,o,s){const a=t.context,l=a.gl;if(!n.dem)return;const c=n.dem;if(a.activeTexture.set(l.TEXTURE1),Jt(t,n,c),!n.demTexture)return;n.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);const u=c.dim;a.activeTexture.set(l.TEXTURE0);let h=n.fbo;if(!h){const t=new e.Texture(a,{width:u,height:u,data:null},l.RGBA);t.bind(l.LINEAR,l.CLAMP_TO_EDGE),h=n.fbo=a.createFramebuffer(u,u,!0),h.colorAttachment.set(t.texture)}a.bindFramebuffer.set(h.framebuffer),a.viewport.set([0,0,u,u]),t.useProgram("hillshadePrepare").draw(a,l.TRIANGLES,r,o,s,e.CullFaceMode.disabled,((t,n)=>{const i=n.stride,r=e.create$1();return e.ortho(r,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(r,r,[0,-e.EXTENT,0]),{u_matrix:r,u_image:1,u_dimension:[i,i],u_zoom:t.overscaledZ,u_unpack:n.unpackVector}})(n.tileID,c),i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),n.needsHillshadePrepare=!1}const tn=(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image0:new e.Uniform1i(t,n.u_image0),u_skirt_height:new e.Uniform1f(t,n.u_skirt_height)}),nn=(e,t)=>({u_matrix:e,u_image0:0,u_skirt_height:t}),rn=new class{constructor(){this.operations={}}newMorphing(e,t,n,i,r){if(e in this.operations){const t=this.operations[e];t.to.tileID.key!==n.tileID.key&&(t.queued=n)}else this.operations[e]={startTime:i,phase:0,duration:r,from:t,to:n,queued:null}}getMorphValuesForProxy(e){if(!(e in this.operations))return null;const t=this.operations[e];return{from:t.from,to:t.to,phase:t.phase}}update(e){for(const t in this.operations){const n=this.operations[t];for(n.phase=(e-n.startTime)/n.duration;n.phase>=1||!this._validOp(n);)if(!this._nextOp(n,e)){delete this.operations[t];break}}}_nextOp(e,t){return!!e.queued&&(e.from=e.to,e.to=e.queued,e.queued=null,e.phase=0,e.startTime=t,!0)}_validOp(e){return e.from.hasData()&&e.to.hasData()}},on={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function sn(t,n,i,r,o){const s=t.context,a=s.gl;let l,c;const u=t.options.showTerrainWireframe?2:0,h=(e,n)=>{if(c===e)return;const i=[on[e]];n&&i.push(on[u]),l=t.useProgram("terrainRaster",null,i),c=e},d=t.colorModeForRenderPass(),p=new e.DepthMode(a.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);rn.update(o);const f=t.transform,m=6*Math.pow(1.5,22-f.zoom)*n.exaggeration();(u?[!1,!0]:[!1]).forEach(u=>{c=-1;const g=u?a.LINES:a.TRIANGLES,[y,v]=u?n.getWirefameBuffer():[n.gridIndexBuffer,n.gridSegments];for(const c of r){const r=i.getTile(c),b=e.StencilMode.disabled,w=n.prevTerrainTileForTile[c.key],T=n.terrainTileForTile[c.key];x=T,null!=(_=w)&&null!=x&&_.hasData()&&x.hasData()&&null!=_.demTexture&&null!=x.demTexture&&_.tileID.key!==x.tileID.key&&rn.newMorphing(c.key,w,T,o,250),s.activeTexture.set(a.TEXTURE0),r.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST);const S=rn.getMorphValuesForProxy(c.key),E=S?1:0;let k;S&&(k={morphing:{srcDemTile:S.from,dstDemTile:S.to,phase:e.easeCubicInOut(S.phase)}});const C=nn(c.projMatrix,an(c.canonical,f.renderWorldCopies)?m/10:m);h(E,u),n.setupElevationDraw(r,l,k),t.prepareDrawProgram(s,l,c.toUnwrapped()),l.draw(s,g,p,b,d,e.CullFaceMode.backCCW,C,"terrain_raster",n.gridBuffer,y,v)}var _,x})}function an(e,t){const n=1<<e.z;return!t&&(0===e.x||e.x===n-1)||0===e.y||e.y===n-1}const ln=e=>({u_matrix:e});function cn(t,n,i,r,o){if(o>0){const s=e.exported.now(),a=(s-t.timeAdded)/o,l=n?(s-n.timeAdded)/o:-1,c=i.getSource(),u=r.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-u)>Math.abs(t.tileID.overscaledZ-u),d=h&&t.refreshedUponExpiration?1:e.clamp(h?a:1-l,0,1);return t.refreshedUponExpiration&&a>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}class un extends e.SourceCache{constructor(e){const t=ke("proxy",{type:"geojson",maxzoom:e.transform.maxZoom},new A(ze(),null),e.style);super("proxy",t,!1),t.setEventedParent(this),this.map=this.getSource().map=e,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(t,n,i){if(t.freezeTileCoverage)return;this.transform=t;const r=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((n,i)=>{if(n[i.key]="",!this._tiles[i.key]){const n=new e.Tile(i,this._source.tileSize*i.overscaleFactor(),t.tileZoom);n.state="loaded",this._tiles[i.key]=n}return n},{});for(const e in this._tiles)e in r||(this.freeFBO(e),this._tiles[e].state="unloaded",delete this._tiles[e])}freeFBO(e){const t=this.proxyCachedFBO[e];if(void 0!==t){const n=Object.values(t);this.renderCachePool.push(...n),delete this.proxyCachedFBO[e]}}deallocRenderCache(){this.renderCache.forEach(e=>e.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class hn extends e.OverscaledTileID{constructor(e,t,n){super(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y),this.proxyTileKey=t,this.projMatrix=n}}class dn extends e.Elevation{constructor(t,n){super(),this.painter=t,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[i,r,o]=function(t){const n=new e.StructArrayLayout4i8,i=new e.StructArrayLayout3ui6,r=131;n.reserve(17161),i.reserve(33800);const o=e.EXTENT/128,s=e.EXTENT+o/2,a=s+o;for(let c=-o;c<a;c+=o)for(let t=-o;t<a;t+=o){const i=t<0||t>s||c<0||c>s?24575:0,r=e.clamp(Math.round(t),0,e.EXTENT),o=e.clamp(Math.round(c),0,e.EXTENT);n.emplaceBack(r+i,o,r,o)}const l=(e,t)=>{const n=t*r+e;i.emplaceBack(n+1,n,n+r),i.emplaceBack(n+r,n+r+1,n+1)};for(let e=1;e<129;e++)for(let t=1;t<129;t++)l(t,e);return[0,129].forEach(e=>{for(let t=0;t<130;t++)l(t,e),l(e,t)}),[n,i,32768]}(),s=t.context;this.gridBuffer=s.createVertexBuffer(i,Te.members),this.gridIndexBuffer=s.createIndexBuffer(r),this.gridSegments=e.SegmentVector.simpleSegment(0,0,i.length,r.length),this.gridNoSkirtSegments=e.SegmentVector.simpleSegment(0,0,i.length,o),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new un(n.map),this.orthoMatrix=e.create$1(),e.ortho(this.orthoMatrix,0,e.EXTENT,0,e.EXTENT,0,1);const a=s.gl;this._overlapStencilMode=new e.StencilMode({func:a.GEQUAL,mask:255},0,255,a.KEEP,a.KEEP,a.REPLACE),this._previousZoom=t.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=n,this._useVertexMorphing=!0,this._exaggeration=1}set style(e){e.on("data",this._onStyleDataEvent.bind(this)),e.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=e,this._checkRenderCacheEfficiency()}update(t,n,i){if(t&&t.terrain){this._style!==t&&(this.style=t),this.enabled=!0;const r=t.terrain.properties;this.sourceCache=t._getSourceCache(r.get("source")),this._exaggeration=r.get("exaggeration");const o=()=>{this.sourceCache.used&&e.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const t=this.sourceCache.getSource().tileSize/128,i=this.proxySourceCache.getSource().tileSize;this.sourceCache.update(n,t*i,!0),this._findCoveringTileCache[this.sourceCache.id]={}};this.sourceCache.usedForTerrain||(this._findCoveringTileCache[this.sourceCache.id]={},this.sourceCache.usedForTerrain=!0,o(),this._initializing=!0),o(),n.updateElevation(!i),this._findCoveringTileCache[this.proxySourceCache.id]={},this.proxySourceCache.update(n),this._emptyDEMTextureDirty=!0}else this._disable()}_checkRenderCacheEfficiency(){const t=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==t.efficiency&&e.warnOnce(`Terrain render cache efficiency is not optimal (${t.efficiency}%) and performance\n                may be affected negatively, consider placing all background, fill and line layers before layer\n                with id '${t.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(e){e.coord&&"source"===e.dataType?this._clearRenderCacheForTile(e.sourceCacheId,e.coord):"style"===e.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const e in this._style._sourceCaches)this._style._sourceCaches[e].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this.pool.forEach(e=>e.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),delete this._depthFBO,delete this._depthTexture)}_source(){return this.enabled?this.sourceCache:null}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const e=2*this.proxySourceCache.getSource().tileSize;return[e,e]}set useVertexMorphing(e){this._useVertexMorphing=e}updateTileBinding(t){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const n=this.proxySourceCache,i=this.painter.transform;this._initializing&&(this._initializing=0===i._centerAltitude&&-1===this.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(i.center),-1),this._emptyDEMTextureDirty=!this._initializing);const r=this.proxyCoords=n.getIds().map(e=>{const t=n.getTileByID(e).tileID;return t.projMatrix=i.calculateProjMatrix(t.toUnwrapped()),t});!function(t,n){const i=n.transform.pointCoordinate(n.transform.getCameraPoint()),r=new e.pointGeometry(i.x,i.y);t.sort((t,n)=>{if(n.overscaledZ-t.overscaledZ)return n.overscaledZ-t.overscaledZ;const i=new e.pointGeometry(t.canonical.x+(1<<t.canonical.z)*t.wrap,t.canonical.y),o=new e.pointGeometry(n.canonical.x+(1<<n.canonical.z)*n.wrap,n.canonical.y),s=r.mult(1<<t.canonical.z);return s.x-=.5,s.y-=.5,s.distSqr(i)-s.distSqr(o)})}(r,this.painter),this._previousZoom=i.zoom;const o=this.proxyToSource||{};this.proxyToSource={},r.forEach(e=>{this.proxyToSource[e.key]={}}),this.terrainTileForTile={};const s=this._style._sourceCaches;for(const e in s){const n=s[e];if(!n.used)continue;if(n!==this.sourceCache&&(this._findCoveringTileCache[n.id]={}),this._setupProxiedCoordsForOrtho(n,t[e],o),n.usedForTerrain)continue;const i=t[e];n.getSource().reparseOverscaled&&this._assignTerrainTiles(i)}this.proxiedCoords[n.id]=r.map(e=>new hn(e,e.key,this.orthoMatrix)),this._assignTerrainTiles(r),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(o),this.renderingToTexture=!1,this._updateTimestamp=e.exported.now();const a={};this._visibleDemTiles=[];for(const e of this.proxyCoords){const t=this.terrainTileForTile[e.key];if(!t)continue;const n=t.tileID.key;n in a||(this._visibleDemTiles.push(t),a[n]=n)}}_assignTerrainTiles(e){this._initializing||e.forEach(e=>{if(this.terrainTileForTile[e.key])return;const t=this._findTileCoveringTileID(e,this.sourceCache);t&&(this.terrainTileForTile[e.key]=t)})}_prepareDEMTextures(){const e=this.painter.context,t=e.gl;for(const n in this.terrainTileForTile){const i=this.terrainTileForTile[n],r=i.dem;!r||i.demTexture&&!i.needsDEMTextureUpload||(e.activeTexture.set(t.TEXTURE1),Jt(this.painter,i,r))}}_prepareDemTileUniforms(e,t,n,i){if(!t||null==t.demTexture)return!1;const r=e.tileID.canonical,o=Math.pow(2,t.tileID.canonical.z-r.z),s=i||"";return n["u_dem_tl"+s]=[r.x*o%1,r.y*o%1],n["u_dem_scale"+s]=o,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}_getLoadedAreaMinimum(){let e=0;const t=this._visibleDemTiles.reduce((t,n)=>{if(!n.dem)return t;const i=n.dem.tree.minimums[0];return i>0&&e++,t+i},0);return e?t/e:0}_updateEmptyDEMTexture(){const t=this.painter.context,n=t.gl;t.activeTexture.set(n.TEXTURE2);const i=this._getLoadedAreaMinimum(),r={width:1,height:1,data:new Uint8Array(e.DEMData.pack(i,this.sourceCache.getSource().encoding))};this._emptyDEMTextureDirty=!1;let o=this._emptyDEMTexture;return o?o.update(r,{premultiply:!1}):o=this._emptyDEMTexture=new e.Texture(t,r,n.RGBA,{premultiply:!1}),o}setupElevationDraw(t,n,i){const r=this.painter.context,o=r.gl,s=(a=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:e.DEMData.getUnpackVector(a),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var a;s.u_dem_size=this.sourceCache.getSource().tileSize,s.u_exaggeration=this.exaggeration();let l=null,c=null,u=1;if(i&&i.morphing&&this._useVertexMorphing){const e=i.morphing.srcDemTile,n=i.morphing.dstDemTile;u=i.morphing.phase,e&&n&&(this._prepareDemTileUniforms(t,e,s,"_prev")&&(c=e),this._prepareDemTileUniforms(t,n,s)&&(l=n))}if(c&&l?(r.activeTexture.set(o.TEXTURE2),l.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST),r.activeTexture.set(o.TEXTURE4),c.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST),s.u_dem_lerp=u):(l=this.terrainTileForTile[t.tileID.key],r.activeTexture.set(o.TEXTURE2),(this._prepareDemTileUniforms(t,l,s)?l.demTexture:this.emptyDEMTexture).bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST)),i&&i.useDepthForOcclusion&&(r.activeTexture.set(o.TEXTURE3),this._depthTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE,o.NEAREST),s.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height]),i&&i.useMeterToDem&&l){const t=(1<<l.tileID.canonical.z)*e.mercatorZfromAltitude(1,this.painter.transform.center.lat)*this.sourceCache.getSource().tileSize;s.u_meter_to_dem=t}i&&i.labelPlaneMatrixInv&&(s.u_label_plane_matrix_inv=i.labelPlaneMatrixInv),n.setTerrainUniformValues(r,s)}renderBatch(t){if(0===this._drapedRenderBatches.length)return t+1;this.renderingToTexture=!0;const n=this.painter,i=this.painter.context,r=this.proxySourceCache,o=this.proxiedCoords[r.id],s=()=>{i.bindFramebuffer.set(null),i.viewport.set([0,0,n.width,n.height]),this.renderingToTexture=!1},a=this._drapedRenderBatches.shift();let l=[];const c=n.style.order;let u=0;for(let h=0;h<o.length;h++){const d=o[h],p=r.getTileByID(d.proxyTileKey),f=r.proxyCachedFBO[d.key]?r.proxyCachedFBO[d.key][t]:void 0;let m,g;if(m=this.currentFBO=void 0!==f?r.renderCache[f]:this.pool[u++],p.texture=m.tex,void 0===f||m.dirty){i.bindFramebuffer.set(m.fb.framebuffer),this.renderedToTile=!1,m.dirty&&(i.clear({color:e.Color.transparent}),m.dirty=!1);for(let e=a.start;e<=a.end;++e){const t=n.style._layers[c[e]];if(t.isHidden(n.transform.zoom))continue;const r=n.style._getLayerSourceCache(t),o=r?this.proxyToSource[d.key][r.id]:[d];if(!o)continue;const s=o;i.viewport.set([0,0,m.fb.width,m.fb.height]),g!==(r?r.id:null)&&(this._setupStencil(o,t,r),g=r?r.id:null),n.renderLayer(n,r,t,s)}m.dirty=this.renderedToTile,this.renderedToTile&&l.push(p.tileID),5===u&&(u=0,l.length>0&&(s(),sn(n,this,r,l,this._updateTimestamp),this.renderingToTexture=!0,l=[]))}else l.push(p.tileID)}return s(),l.length>0&&sn(n,this,r,l,this._updateTimestamp),a.end+1}postRender(){}renderCacheEfficiency(e){const t=e.order.length;if(0===t)return{efficiency:100};let n,i=0,r=0,o=!1;for(let s=0;s<t;++s){const t=e._layers[e.order[s]];this._style.isLayerDraped(t)?(o&&++i,++r):o||(o=!0,n=t.id)}return 0===r?{efficiency:100}:{efficiency:100*(1-i/r),firstUndrapedLayer:n}}getMinElevationBelowMSL(){let e=0;return this._visibleDemTiles.filter(e=>e.dem).forEach(t=>{e=Math.min(e,t.dem.tree.minimums[0])}),0===e?e:(e-30)*this._exaggeration}raycast(e,t,n){if(!this._visibleDemTiles)return null;const i=this._visibleDemTiles.filter(e=>e.dem).map(i=>{const r=i.tileID,o=Math.pow(2,r.overscaledZ),{x:s,y:a}=r.canonical,l=s/o,c=(s+1)/o,u=a/o,h=(a+1)/o;return{minx:l,miny:u,maxx:c,maxy:h,t:i.dem.tree.raycastRoot(l,u,c,h,e,t,n),tile:i}});i.sort((e,t)=>(null!==e.t?e.t:Number.MAX_VALUE)-(null!==t.t?t.t:Number.MAX_VALUE));for(const r of i){if(null==r.t)return null;const i=r.tile.dem.tree.raycast(r.minx,r.miny,r.maxx,r.maxy,e,t,n);if(null!=i)return i}return null}_createFBO(){const t=this.painter.context,n=t.gl,i=this.drapeBufferSize;t.activeTexture.set(n.TEXTURE0);const r=new e.Texture(t,{width:i[0],height:i[1],data:null},n.RGBA);r.bind(n.LINEAR,n.CLAMP_TO_EDGE);const o=t.createFramebuffer(i[0],i[1],!1);return o.colorAttachment.set(r.texture),o.depthAttachment=new ve(t,o.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=t.createRenderbuffer(t.gl.DEPTH_STENCIL,i[0],i[1]),this._stencilRef=0,o.depthAttachment.set(this._sharedDepthStencil),t.clear({stencil:0})):o.depthAttachment.set(this._sharedDepthStencil),t.extTextureFilterAnisotropic&&!t.extTextureFilterAnisotropicForceOff&&n.texParameterf(n.TEXTURE_2D,t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.extTextureFilterAnisotropicMax),{fb:o,tex:r,dirty:!1}}_initFBOPool(){for(;this.pool.length<Math.min(5,this.proxyCoords.length);)this.pool.push(this._createFBO())}_shouldDisableRenderCache(){if(this._style.light&&this._style.light.hasTransition())return!0;for(const e in this._style._sourceCaches)if(this._style._sourceCaches[e].hasTransition())return!0;return this._style.order.some(e=>{const t=this._style._layers[e],n=t.isHidden(this.painter.transform.zoom),i=t.getCrossfadeParameters(),r=!!i&&1!==i.t,o=t.hasTransition();return"custom"!==t.type&&!n&&(r||o)})}_clearRasterFadeFromRenderCache(){let e=!1;for(const t in this._style._sourceCaches)if(this._style._sourceCaches[t]._source instanceof be){e=!0;break}if(e)for(let t=0;t<this._style.order.length;++t){const e=this._style._layers[this._style.order[t]],n=e.isHidden(this.painter.transform.zoom),i=this._style._getLayerSourceCache(e);if("raster"!==e.type||n||!i)continue;const r=e.paint.get("raster-fade-duration");for(const t of this.proxyCoords){const e=this.proxyToSource[t.key][i.id];if(e)for(const t of e){const e=cn(i.getTile(t),i.findLoadedParent(t,0),i,this.painter.transform,r);(1!==e.opacity||0!==e.mix)&&this._clearRenderCacheForTile(i.id,t)}}}}_setupDrapedRenderBatches(){const e=this._style.order,t=e.length;if(0===t)return;const n=[];let i,r=0,o=this._style._layers[e[r]];for(;!this._style.isLayerDraped(o)&&o.isHidden(this.painter.transform.zoom)&&++r<t;)o=this._style._layers[e[r]];for(;r<t;++r){const t=this._style._layers[e[r]];t.isHidden(this.painter.transform.zoom)||(this._style.isLayerDraped(t)?void 0===i&&(i=r):void 0!==i&&(n.push({start:i,end:r-1}),i=void 0))}void 0!==i&&n.push({start:i,end:r-1}),this._drapedRenderBatches=n}_setupRenderCache(e){const t=this.proxySourceCache;if(this._shouldDisableRenderCache()||this._invalidateRenderCache){if(this._invalidateRenderCache=!1,t.renderCache.length>t.renderCachePool.length){const e=Object.values(t.proxyCachedFBO);t.proxyCachedFBO={};for(let n=0;n<e.length;++n){const i=Object.values(e[n]);t.renderCachePool.push(...i)}}return}this._clearRasterFadeFromRenderCache();const n=this.proxyCoords,i=this._tilesDirty;for(let r=n.length-1;r>=0;r--){const o=n[r];if(t.getTileByID(o.key),void 0!==t.proxyCachedFBO[o.key]){const n=e[o.key],r=this.proxyToSource[o.key];let s=0;for(const e in r){const t=r[e],o=n[e];if(!o||o.length!==t.length||t.some((t,n)=>t!==o[n]||i[e]&&i[e].hasOwnProperty(t.key))){s=-1;break}++s}for(const e in t.proxyCachedFBO[o.key])t.renderCache[t.proxyCachedFBO[o.key][e]].dirty=s<0||s!==Object.values(n).length}else for(let e=0;e<this._drapedRenderBatches.length;++e){const n=this._drapedRenderBatches[e];let i=t.renderCachePool.pop();void 0===i&&t.renderCache.length<50&&(i=t.renderCache.length,t.renderCache.push(this._createFBO())),void 0!==i&&(void 0===t.proxyCachedFBO[o.key]&&(t.proxyCachedFBO[o.key]={}),t.proxyCachedFBO[o.key][n.start]=i,t.renderCache[i].dirty=!0)}}this._tilesDirty={}}_setupStencil(e,t,n){if(!n||!this._sourceTilesOverlap[n.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const i=this.painter.context,r=i.gl;if(e.length<=1)return void(this._overlapStencilType=!1);let o;if(t.isTileClipped())o=e.length,this._overlapStencilMode.test={func:r.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(e[0].overscaledZ>e[e.length-1].overscaledZ))return void(this._overlapStencilType=!1);o=1,this._overlapStencilMode.test={func:r.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+o>255&&(i.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=o,this._overlapStencilMode.ref=this._stencilRef,t.isTileClipped()&&this._renderTileClippingMasks(e,this._overlapStencilMode.ref)}stencilModeForRTTOverlap(t){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[t.key]),this._overlapStencilMode):e.StencilMode.disabled}_renderTileClippingMasks(t,n){const i=this.painter,r=this.painter.context,o=r.gl;i._tileClippingMaskIDs={},r.setColorMode(e.ColorMode.disabled),r.setDepthMode(e.DepthMode.disabled);const s=i.useProgram("clippingMask");for(const a of t){const t=i._tileClippingMaskIDs[a.key]=--n;s.draw(r,o.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,ln(a.projMatrix),"$clipping",i.tileExtentBuffer,i.quadTriangleIndexBuffer,i.tileExtentSegments)}}pointCoordinate(t){const n=this.painter.transform;if(t.x<0||t.x>n.width||t.y<0||t.y>n.height)return null;const i=[t.x,t.y,1,1];e.transformMat4(i,i,n.pixelMatrixInverse),e.scale$2(i,i,1/i[3]),i[0]/=n.worldSize,i[1]/=n.worldSize;const r=n._camera.position,o=e.mercatorZfromAltitude(1,n.center.lat),s=[r[0],r[1],r[2]/o,0],a=e.subtract([],i.slice(0,3),s);e.normalize(a,a);const l=this.raycast(s,a,this._exaggeration);return null!==l&&l?(e.scaleAndAdd(s,s,a,l),s[3]=s[2],s[2]*=o,s):null}drawDepth(){const t=this.painter,n=t.context,i=this.proxySourceCache,r=Math.ceil(t.width),o=Math.ceil(t.height);if(!this._depthFBO||this._depthFBO.width===r&&this._depthFBO.height===o||(this._depthFBO.destroy(),delete this._depthFBO,delete this._depthTexture),!this._depthFBO){const t=n.gl,i=n.createFramebuffer(r,o,!0);n.activeTexture.set(t.TEXTURE0);const s=new e.Texture(n,{width:r,height:o,data:null},t.RGBA);s.bind(t.NEAREST,t.CLAMP_TO_EDGE),i.colorAttachment.set(s.texture);const a=n.createRenderbuffer(n.gl.DEPTH_COMPONENT16,r,o);i.depthAttachment.set(a),this._depthFBO=i,this._depthTexture=s}n.bindFramebuffer.set(this._depthFBO.framebuffer),n.viewport.set([0,0,r,o]),function(t,n,i,r){const o=t.context,s=o.gl;o.clear({depth:1});const a=t.useProgram("terrainDepth"),l=new e.DepthMode(s.LESS,e.DepthMode.ReadWrite,t.depthRangeFor3D);for(const c of r){const t=i.getTile(c),r=nn(c.projMatrix,0);n.setupElevationDraw(t,a),a.draw(o,s.TRIANGLES,l,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.backCCW,r,"terrain_depth",n.gridBuffer,n.gridIndexBuffer,n.gridNoSkirtSegments)}}(t,this,i,this.proxyCoords)}_setupProxiedCoordsForOrtho(e,t,n){if(e.getSource()instanceof Se)return this._setupProxiedCoordsForImageSource(e,t,n);this._findCoveringTileCache[e.id]=this._findCoveringTileCache[e.id]||{};const i=this.proxiedCoords[e.id]=[],r=this.proxyCoords;for(let s=0;s<r.length;s++){const t=r[s],o=this._findTileCoveringTileID(t,e);if(o){const r=this._createProxiedId(t,o,n[t.key]&&n[t.key][e.id]);i.push(r),this.proxyToSource[t.key][e.id]=[r]}}let o=!1;for(let s=0;s<t.length;s++){const r=e.getTile(t[s]);if(!r||!r.hasData())continue;const a=this._findTileCoveringTileID(r.tileID,this.proxySourceCache);if(a&&a.tileID.canonical.z!==r.tileID.canonical.z){const t=this.proxyToSource[a.tileID.key][e.id],s=this._createProxiedId(a.tileID,r,n[a.tileID.key]&&n[a.tileID.key][e.id]);t?t.splice(t.length-1,0,s):this.proxyToSource[a.tileID.key][e.id]=[s],i.push(s),o=!0}}this._sourceTilesOverlap[e.id]=o}_setupProxiedCoordsForImageSource(t,n,i){if(!t.getSource().loaded())return;const r=this.proxiedCoords[t.id]=[],o=this.proxyCoords,s=t.getSource(),a=new e.pointGeometry(s.tileID.x,s.tileID.y)._div(1<<s.tileID.z),l=s.coordinates.map(e.MercatorCoordinate.fromLngLat).reduce((e,t)=>(e.min.x=Math.min(e.min.x,t.x-a.x),e.min.y=Math.min(e.min.y,t.y-a.y),e.max.x=Math.max(e.max.x,t.x-a.x),e.max.y=Math.max(e.max.y,t.y-a.y),e),{min:new e.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE),max:new e.pointGeometry(-Number.MAX_VALUE,-Number.MAX_VALUE)}),c=(t,n)=>{const i=t.wrap+t.canonical.x/(1<<t.canonical.z),r=t.canonical.y/(1<<t.canonical.z),o=e.EXTENT/(1<<t.canonical.z),s=n.wrap+n.canonical.x/(1<<n.canonical.z),a=n.canonical.y/(1<<n.canonical.z);return i+o<s+l.min.x||i>s+l.max.x||r+o<a+l.min.y||r>a+l.max.y};for(let e=0;e<o.length;e++){const s=o[e];for(let e=0;e<n.length;e++){const o=t.getTile(n[e]);if(!o||!o.hasData())continue;if(c(s,o.tileID))continue;const a=this._createProxiedId(s,o,i[s.key]&&i[s.key][t.id]),l=this.proxyToSource[s.key][t.id];l?l.push(a):this.proxyToSource[s.key][t.id]=[a],r.push(a)}}}_createProxiedId(t,n,i){let r=this.orthoMatrix;if(i){const e=i.find(e=>e.key===n.tileID.key);if(e)return e}if(n.tileID.key!==t.key){const i=t.canonical.z-n.tileID.canonical.z;let o,s,a;r=e.create$1();const l=n.tileID.wrap-t.wrap<<t.overscaledZ;i>0?(o=e.EXTENT>>i,s=o*((n.tileID.canonical.x<<i)-t.canonical.x+l),a=o*((n.tileID.canonical.y<<i)-t.canonical.y)):(o=e.EXTENT<<-i,s=e.EXTENT*(n.tileID.canonical.x-(t.canonical.x+l<<-i)),a=e.EXTENT*(n.tileID.canonical.y-(t.canonical.y<<-i))),e.ortho(r,0,o,0,o,0,1),e.translate(r,r,[s,a,0])}return new hn(n.tileID,t.key,r)}_findTileCoveringTileID(t,n){let i=n.getTile(t);if(i&&i.hasData())return i;const r=this._findCoveringTileCache[n.id],o=r[t.key];if(i=o?n.getTileByID(o):null,i&&i.hasData()||null===o)return i;let s=i?i.tileID:t,a=s.overscaledZ;const l=n.getSource().minzoom,c=[];if(!o){const r=n.getSource().maxzoom;if(t.canonical.z>=r){const i=t.canonical.z-r;n.getSource().reparseOverscaled?(a=Math.max(t.canonical.z+2,n.transform.tileZoom),s=new e.OverscaledTileID(a,t.wrap,r,t.canonical.x>>i,t.canonical.y>>i)):0!==i&&(a=r,s=new e.OverscaledTileID(a,t.wrap,r,t.canonical.x>>i,t.canonical.y>>i))}s.key!==t.key&&(c.push(s.key),i=n.getTile(s))}const u=e=>{c.forEach(t=>{r[t]=e}),c.length=0};for(a-=1;a>=l&&(!i||!i.hasData());a--){i&&u(i.tileID.key);const e=s.calculateScaledKey(a);if(i=n.getTileByID(e),i&&i.hasData())break;const t=r[e];if(null===t)break;void 0===t?c.push(e):i=n.getTileByID(t)}return u(i?i.tileID.key:null),i&&i.hasData()?i:null}findDEMTileFor(e){return this.enabled?this._findTileCoveringTileID(e,this.sourceCache):null}prepareDrawTile(e){this.renderedToTile||(this.renderedToTile=!0)}_clearRenderCacheForTile(e,t){let n=this._tilesDirty[e];n||(n=this._tilesDirty[e]={}),n[t.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const t=function(t){let n,i,r;const o=new e.StructArrayLayout2ui4,s=131;for(i=1;i<129;i++){for(n=1;n<129;n++)r=i*s+n,o.emplaceBack(r,r+1),o.emplaceBack(r,r+s),o.emplaceBack(r+1,r+s),128===i&&o.emplaceBack(r+s,r+s+1);o.emplaceBack(r+1,r+1+s)}return o}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(t),this.wireframeSegments=e.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,t.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}function pn(e){const t=[];for(let n=0;n<e.length;n++){if(null===e[n])continue;const i=e[n].split(" ");t.push(i.pop())}return t}class fn{static cacheKey(e,t,n){let i=`${e}${n?n.cacheKey:""}`;for(const r of t)i+="/"+r;return i}constructor(t,n,i,r,o,s){const a=t.gl;this.program=a.createProgram();const l=pn(i.staticAttributes),c=r?r.getBinderAttributes():[],u=l.concat(c),h=i.staticUniforms?pn(i.staticUniforms):[],d=r?r.getBinderUniforms():[],p=h.concat(d),f=[];for(const e of p)f.indexOf(e)<0&&f.push(e);let m=r?r.defines():[];m=m.concat(s.map(e=>"#define "+e));const g=m.concat(Ht.fragmentSource,Wt,Gt.fragmentSource,i.fragmentSource).join("\n"),y=m.concat(Ht.vertexSource,Wt,Gt.vertexSource,qt.vertexSource,i.vertexSource).join("\n"),v=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())return void(this.failedToCreate=!0);a.shaderSource(v,g),a.compileShader(v),a.attachShader(this.program,v);const _=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())return void(this.failedToCreate=!0);a.shaderSource(_,y),a.compileShader(_),a.attachShader(this.program,_),this.attributes={};const x={};this.numAttributes=u.length;for(let e=0;e<this.numAttributes;e++)u[e]&&(a.bindAttribLocation(this.program,e,u[e]),this.attributes[u[e]]=e);a.linkProgram(this.program),a.deleteShader(_),a.deleteShader(v);for(let e=0;e<f.length;e++){const t=f[e];if(t&&!x[t]){const e=a.getUniformLocation(this.program,t);e&&(x[t]=e)}}this.fixedUniforms=o(t,x),this.binderUniforms=r?r.getUniforms(t,x):[],-1!==s.indexOf("TERRAIN")&&(this.terrainUniforms=((t,n)=>({u_dem:new e.Uniform1i(t,n.u_dem),u_dem_prev:new e.Uniform1i(t,n.u_dem_prev),u_dem_unpack:new e.Uniform4f(t,n.u_dem_unpack),u_dem_tl:new e.Uniform2f(t,n.u_dem_tl),u_dem_scale:new e.Uniform1f(t,n.u_dem_scale),u_dem_tl_prev:new e.Uniform2f(t,n.u_dem_tl_prev),u_dem_scale_prev:new e.Uniform1f(t,n.u_dem_scale_prev),u_dem_size:new e.Uniform1f(t,n.u_dem_size),u_dem_lerp:new e.Uniform1f(t,n.u_dem_lerp),u_exaggeration:new e.Uniform1f(t,n.u_exaggeration),u_depth:new e.Uniform1i(t,n.u_depth),u_depth_size_inv:new e.Uniform2f(t,n.u_depth_size_inv),u_meter_to_dem:new e.Uniform1f(t,n.u_meter_to_dem),u_label_plane_matrix_inv:new e.UniformMatrix4f(t,n.u_label_plane_matrix_inv)}))(t,x)),-1!==s.indexOf("FOG")&&(this.fogUniforms=((t,n)=>({u_fog_matrix:new e.UniformMatrix4f(t,n.u_fog_matrix),u_fog_range:new e.Uniform2f(t,n.u_fog_range),u_fog_color:new e.Uniform4f(t,n.u_fog_color),u_fog_horizon_blend:new e.Uniform1f(t,n.u_fog_horizon_blend),u_fog_temporal_offset:new e.Uniform1f(t,n.u_fog_temporal_offset)}))(t,x))}setTerrainUniformValues(e,t){if(!this.terrainUniforms)return;const n=this.terrainUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)n[e].set(t[e])}}setFogUniformValues(e,t){if(!this.fogUniforms)return;const n=this.fogUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)n[e].location&&n[e].set(t[e])}}draw(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m){const g=e.gl;if(this.failedToCreate)return;e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(i),e.setColorMode(r),e.setCullFace(o);for(const v in this.fixedUniforms)this.fixedUniforms[v].set(s[v]);p&&p.setUniforms(e,this.binderUniforms,h,{zoom:d});const y={[g.LINES]:2,[g.TRIANGLES]:3,[g.LINE_STRIP]:1}[t];for(const v of u.get()){const n=v.vaos||(v.vaos={});(n[a]||(n[a]=new Yt)).bind(e,this,l,p?p.getPaintVertexBuffers():[],c,v.vertexOffset,f,m),g.drawElements(t,v.primitiveLength*y,g.UNSIGNED_SHORT,v.primitiveOffset*y*2)}}}function mn(e,t,n){const i=1/I(n,1,t.transform.tileZoom),r=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,t.transform.tileZoom)/r,s=o*(n.tileID.canonical.x+n.tileID.wrap*r),a=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[i,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,a>>16],u_pixel_coord_lower:[65535&s,65535&a]}}const gn=(t,n,i,r)=>{const o=n.style.light,s=o.properties.get("position"),a=[s.x,s.y,s.z],l=e.create$2();"viewport"===o.properties.get("anchor")&&(e.fromRotation(l,-n.transform.angle),e.transformMat3(a,a,l));const c=o.properties.get("color");return{u_matrix:t,u_lightpos:a,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+i,u_opacity:r}},yn=(t,n,i,r,o,s,a)=>e.extend(gn(t,n,i,r),mn(s,n,a),{u_height_factor:-Math.pow(2,o.overscaledZ)/a.tileSize/8}),vn=e=>({u_matrix:e}),_n=(t,n,i,r)=>e.extend(vn(t),mn(i,n,r)),xn=(e,t)=>({u_matrix:e,u_world:t}),bn=(t,n,i,r,o)=>e.extend(_n(t,n,i,r),{u_world:o}),wn=(t,n,i,r)=>{const o=t.transform;let s;if("map"===r.paint.get("circle-pitch-alignment")){const e=I(i,1,o.zoom);s=[e,e]}else s=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_matrix:t.translatePosMatrix(n.projMatrix,i,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor")),u_device_pixel_ratio:e.exported.devicePixelRatio,u_extrude_scale:s}},Tn=e=>{const t=[];return"map"===e.paint.get("circle-pitch-alignment")&&t.push("PITCH_WITH_MAP"),"map"===e.paint.get("circle-pitch-scale")&&t.push("SCALE_WITH_MAP"),t},Sn=(t,n,i)=>{const r=e.EXTENT/i.tileSize;return{u_matrix:t,u_camera_to_center_distance:n.cameraToCenterDistance,u_extrude_scale:[n.pixelsToGLUnits[0]/r,n.pixelsToGLUnits[1]/r]}},En=(e,t,n=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:n}),kn=(e,t,n,i)=>({u_matrix:e,u_extrude_scale:I(t,1,n),u_intensity:i}),Cn=(t,n,i,r)=>{const o=t.transform;return{u_matrix:Dn(t,n,i,r),u_ratio:1/I(n,1,o.zoom),u_device_pixel_ratio:e.exported.devicePixelRatio,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},An=(t,n,i,r,o)=>e.extend(Cn(t,n,i,r),{u_image:0,u_image_height:o}),In=(t,n,i,r,o)=>{const s=t.transform,a=Pn(n,s);return{u_matrix:Dn(t,n,i,o),u_texsize:n.imageAtlasTexture.size,u_ratio:1/I(n,1,s.zoom),u_device_pixel_ratio:e.exported.devicePixelRatio,u_image:0,u_scale:[a,r.fromScale,r.toScale],u_fade:r.t,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]]}},Mn=(t,n,i,r,o)=>{const s=Pn(n,t.transform);return e.extend(Cn(t,n,i,o),{u_texsize:n.lineAtlasTexture.size,u_scale:[s,r.fromScale,r.toScale],u_image:0,u_mix:r.t})};function Pn(e,t){return 1/I(e,1,t.tileZoom)}function Dn(e,t,n,i){return e.translatePosMatrix(i||t.tileID.projMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Ln=(e,t,n,i,r)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:r.paint.get("raster-brightness-min"),u_brightness_high:r.paint.get("raster-brightness-max"),u_saturation_factor:(s=r.paint.get("raster-saturation"),s>0?1-1/(1.001-s):-s),u_contrast_factor:(o=r.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:On(r.paint.get("raster-hue-rotate"))};var o,s};function On(e){e*=Math.PI/180;const t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const zn=(e,t,n,i,r,o,s,a,l,c)=>{const u=r.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:u.width/u.height,u_fade_change:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:s,u_coord_matrix:a,u_is_text:+l,u_pitch_with_map:+i,u_texsize:c,u_texture:0}},Rn=(t,n,i,r,o,s,a,l,c,u,h)=>{const{cameraToCenterDistance:d,_pitch:p}=o.transform;return e.extend(zn(t,n,i,r,o,s,a,l,c,u),{u_gamma_scale:r?d*Math.cos(o.terrain?0:p):1,u_device_pixel_ratio:e.exported.devicePixelRatio,u_is_halo:+h})},Fn=(t,n,i,r,o,s,a,l,c,u)=>e.extend(Rn(t,n,i,r,o,s,a,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1}),Nn=(e,t,n)=>({u_matrix:e,u_opacity:t,u_color:n}),Bn=(t,n,i,r,o,s)=>e.extend(function(e,t,n,i){const r=n.imageManager.getPattern(e.from.toString()),o=n.imageManager.getPattern(e.to.toString()),{width:s,height:a}=n.imageManager.getPixelSize(),l=Math.pow(2,i.tileID.overscaledZ),c=i.tileSize*Math.pow(2,n.transform.tileZoom)/l,u=c*(i.tileID.canonical.x+i.tileID.wrap*l),h=c*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:r.tl,u_pattern_br_a:r.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,a],u_mix:t.t,u_pattern_size_a:r.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/I(i,1,n.transform.tileZoom),u_pixel_coord_upper:[u>>16,h>>16],u_pixel_coord_lower:[65535&u,65535&h]}}(r,s,i,o),{u_matrix:t,u_opacity:n}),jn={fillExtrusion:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}),fillExtrusionPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}),fill:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),fillPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),fillOutline:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}),fillOutlinePattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),circle:(t,n)=>({u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),collisionBox:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale)}),collisionCircle:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,n.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,n.u_viewport_size)}),debug:(t,n)=>({u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_overlay:new e.Uniform1i(t,n.u_overlay),u_overlay_scale:new e.Uniform1f(t,n.u_overlay_scale)}),clippingMask:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),heatmap:(t,n)=>({u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),heatmapTexture:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}),hillshade:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}),hillshadePrepare:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}),line:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}),lineGradient:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image),u_image_height:new e.Uniform1f(t,n.u_image_height)}),linePattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),lineSDF:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image),u_scale:new e.Uniform3f(t,n.u_scale),u_mix:new e.Uniform1f(t,n.u_mix)}),raster:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}),symbolIcon:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}),symbolSDF:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}),symbolTextAndIcon:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texsize_icon:new e.Uniform2f(t,n.u_texsize_icon),u_texture:new e.Uniform1i(t,n.u_texture),u_texture_icon:new e.Uniform1i(t,n.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}),background:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}),backgroundPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}),terrainRaster:tn,terrainDepth:tn,skybox:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_sun_direction:new e.Uniform3f(t,n.u_sun_direction),u_cubemap:new e.Uniform1i(t,n.u_cubemap),u_opacity:new e.Uniform1f(t,n.u_opacity),u_temporal_offset:new e.Uniform1f(t,n.u_temporal_offset)}),skyboxGradient:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_center_direction:new e.Uniform3f(t,n.u_center_direction),u_radius:new e.Uniform1f(t,n.u_radius),u_opacity:new e.Uniform1f(t,n.u_opacity),u_temporal_offset:new e.Uniform1f(t,n.u_temporal_offset)}),skyboxCapture:(t,n)=>({u_matrix_3f:new e.UniformMatrix3f(t,n.u_matrix_3f),u_sun_direction:new e.Uniform3f(t,n.u_sun_direction),u_sun_intensity:new e.Uniform1f(t,n.u_sun_intensity),u_color_tint_r:new e.Uniform4f(t,n.u_color_tint_r),u_color_tint_m:new e.Uniform4f(t,n.u_color_tint_m),u_luminance:new e.Uniform1f(t,n.u_luminance)})};let Vn;function $n(t,n,i,r,o,s,a){const l=t.context,c=l.gl,u=t.useProgram("collisionBox"),h=[];let d=0,p=0;for(let x=0;x<r.length;x++){const f=r[x],m=n.getTile(f),g=m.getBucket(i);if(!g)continue;let y=f.projMatrix;0===o[0]&&0===o[1]||(y=t.translatePosMatrix(f.projMatrix,m,o,s));const v=a?g.textCollisionBox:g.iconCollisionBox,_=g.collisionCircleArray;if(_.length>0){const n=e.create$1(),i=y;e.mul$1(n,g.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul$1(n,n,g.placementViewportMatrix),h.push({circleArray:_,circleOffset:p,transform:i,invTransform:n}),d+=_.length/4,p=d}v&&(t.terrain&&t.terrain.setupElevationDraw(m,u),u.draw(l,c.LINES,e.DepthMode.disabled,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.disabled,Sn(y,t.transform,m),i.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,t.transform.zoom,null,v.collisionVertexBuffer,v.collisionVertexBufferExt))}if(!a||!h.length)return;const f=t.useProgram("collisionCircle"),m=new e.StructArrayLayout2f1f2i16;m.resize(4*d),m._trim();let g=0;for(const e of h)for(let t=0;t<e.circleArray.length/4;t++){const n=4*t,i=e.circleArray[n+0],r=e.circleArray[n+1],o=e.circleArray[n+2],s=e.circleArray[n+3];m.emplace(g++,i,r,o,s,0),m.emplace(g++,i,r,o,s,1),m.emplace(g++,i,r,o,s,2),m.emplace(g++,i,r,o,s,3)}(!Vn||Vn.length<2*d)&&(Vn=function(t){const n=2*t,i=new e.StructArrayLayout3ui6;i.resize(n),i._trim();for(let e=0;e<n;e++){const t=6*e;i.uint16[t+0]=4*e+0,i.uint16[t+1]=4*e+1,i.uint16[t+2]=4*e+2,i.uint16[t+3]=4*e+2,i.uint16[t+4]=4*e+3,i.uint16[t+5]=4*e+0}return i}(d));const y=l.createIndexBuffer(Vn,!0),v=l.createVertexBuffer(m,e.collisionCircleLayout.members,!0);for(const x of h){const n={u_matrix:x.transform,u_inv_matrix:x.invTransform,u_camera_to_center_distance:(_=t.transform).cameraToCenterDistance,u_viewport_size:[_.width,_.height]};f.draw(l,c.TRIANGLES,e.DepthMode.disabled,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.disabled,n,i.id,v,y,e.SegmentVector.simpleSegment(0,2*x.circleOffset,x.circleArray.length,x.circleArray.length/2),null,t.transform.zoom,null,null,null)}var _;v.destroy(),y.destroy()}const Un=e.identity(new Float32Array(16));function qn(t,n,i,r,o,s){const{horizontalAlign:a,verticalAlign:l}=e.getAnchorAlignment(t),c=-(a-.5)*n,u=-(l-.5)*i,h=e.evaluateVariableOffset(t,r);return new e.pointGeometry((c/o+h[0])*s,(u/o+h[1])*s)}function Gn(t,n,i,r,o,s,a,l,c,u,h,d){const p=t.text.placedSymbolArray,f=t.text.dynamicLayoutVertexArray,m=t.icon.dynamicLayoutVertexArray,g={};f.clear();for(let y=0;y<p.length;y++){const m=p.get(y),v=t.allowVerticalPlacement&&!m.placedOrientation,_=m.hidden||!m.crossTileID||v?null:r[m.crossTileID];if(_){const r=new e.pointGeometry(m.anchorX,m.anchorY),p=d(r),y=Ye(r,i?l:a,p),v=Qe(s.cameraToCenterDistance,y.signedDistanceFromCamera);let x=o.evaluateSizeForFeature(t.textSizeData,u,m)*v/e.ONE_EM;i&&(x*=t.tilePixelRatio/c);const{width:b,height:w,anchor:T,textOffset:S,textScale:E}=_,k=qn(T,b,w,S,E,x),C=i?Ye(r.add(k),a,p).point:y.point.add(n?k.rotate(-s.angle):k),A=t.allowVerticalPlacement&&m.placedOrientation===e.WritingMode.vertical?Math.PI/2:0;for(let t=0;t<m.numGlyphs;t++)e.addDynamicAttributes(f,C,A);h&&m.associatedIconIndex>=0&&(g[m.associatedIconIndex]={shiftedAnchor:C,angle:A})}else st(m.numGlyphs,f)}if(h){m.clear();const n=t.icon.placedSymbolArray;for(let t=0;t<n.length;t++){const i=n.get(t);if(i.hidden)st(i.numGlyphs,m);else{const n=g[t];if(n)for(let t=0;t<i.numGlyphs;t++)e.addDynamicAttributes(m,n.shiftedAnchor,n.angle);else st(i.numGlyphs,m)}}t.icon.dynamicLayoutVertexBuffer.updateData(m)}t.text.dynamicLayoutVertexBuffer.updateData(f)}function Hn(e,t,n){return n.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function Wn(t,n,i,r,o,s,a,l,c,u,h,d){const p=t.context,f=p.gl,m=t.transform,g="map"===l,y="map"===c,v=g&&"point"!==i.layout.get("symbol-placement"),_=g&&!y&&!v,x=void 0!==i.layout.get("symbol-sort-key").constantOr(1);let b=!1;const w=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),T=i.layout.get("text-variable-anchor"),S=[],E=t.terrain&&y?["PITCH_WITH_MAP_TERRAIN"]:null;for(const k of r){const r=n.getTile(k),l=r.getBucket(i);if(!l)continue;const c=o?l.text:l.icon;if(!c||!c.segments.get().length)continue;const h=c.programConfigurations.get(i.id),d=o||l.sdfIcons,p=o?l.textSizeData:l.iconSizeData,w=y||0!==m.pitch,C=t.useProgram(Hn(d,o,l),h,E),A=e.evaluateSizeForZoom(p,m.zoom);let M,P,D,L,O=[0,0],z=null;if(o){if(P=r.glyphAtlasTexture,D=f.LINEAR,M=r.glyphAtlasTexture.size,l.iconsInText){O=r.imageAtlasTexture.size,z=r.imageAtlasTexture;const e="composite"===p.kind||"camera"===p.kind;L=w||t.options.rotating||t.options.zooming||e?f.LINEAR:f.NEAREST}}else{const e=1!==i.layout.get("icon-size").constantOr(0)||l.iconsNeedLinear;P=r.imageAtlasTexture,D=d||t.options.rotating||t.options.zooming||e||w?f.LINEAR:f.NEAREST,M=r.imageAtlasTexture.size}const R=I(r,1,t.transform.zoom),F=Ze(k.projMatrix,y,g,t.transform,R),N=t.terrain&&y&&v?e.invert(new Float32Array(16),F):Un,B=Xe(k.projMatrix,y,g,t.transform,R),j=T&&l.hasTextData(),V="none"!==i.layout.get("icon-text-fit")&&j&&l.hasIconData();if(v){const e=m.elevation;Je(l,k.projMatrix,t,o,F,B,y,u,e?t=>e.getAtTileOffset(k,t.x,t.y):null)}const $=t.translatePosMatrix(k.projMatrix,r,s,a),U=v||o&&T||V?Un:F,q=t.translatePosMatrix(B,r,s,a,!0),G=d&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let H;H=d?l.iconsInText?Fn(p.kind,A,_,y,t,$,U,q,M,O):Rn(p.kind,A,_,y,t,$,U,q,o,M,!0):zn(p.kind,A,_,y,t,$,U,q,o,M);const W={program:C,buffers:c,uniformValues:H,atlasTexture:P,atlasTextureIcon:z,atlasInterpolation:D,atlasInterpolationIcon:L,isSDF:d,hasHalo:G,tile:r,labelPlaneMatrixInv:N};if(x&&l.canOverlap){b=!0;const t=c.segments.get();for(const n of t)S.push({segments:new e.SegmentVector([n]),sortKey:n.sortKey,state:W})}else S.push({segments:c.segments,sortKey:0,state:W})}b&&S.sort((e,t)=>e.sortKey-t.sortKey);for(const e of S){const n=e.state;if(t.terrain&&t.terrain.setupElevationDraw(n.tile,n.program,{useDepthForOcclusion:!0,labelPlaneMatrixInv:n.labelPlaneMatrixInv}),p.activeTexture.set(f.TEXTURE0),n.atlasTexture.bind(n.atlasInterpolation,f.CLAMP_TO_EDGE),n.atlasTextureIcon&&(p.activeTexture.set(f.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,f.CLAMP_TO_EDGE)),n.isSDF){const r=n.uniformValues;n.hasHalo&&(r.u_is_halo=1,Zn(n.buffers,e.segments,i,t,n.program,w,h,d,r)),r.u_is_halo=0}Zn(n.buffers,e.segments,i,t,n.program,w,h,d,n.uniformValues)}}function Zn(t,n,i,r,o,s,a,l,c){const u=r.context;o.draw(u,u.gl.TRIANGLES,s,a,l,e.CullFaceMode.disabled,c,i.id,t.layoutVertexBuffer,t.indexBuffer,n,i.paint,r.transform.zoom,t.programConfigurations.get(i.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Xn(t,n,i,r,o,s,a){const l=t.context.gl,c=i.paint.get("fill-pattern"),u=c&&c.constantOr(1),h=i.getCrossfadeParameters();let d,p,f,m,g;a?(p=u&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=l.LINES):(p=u?"fillPattern":"fill",d=l.TRIANGLES);for(const y of r){const r=n.getTile(y);if(u&&!r.patternsLoaded())continue;const v=r.getBucket(i);if(!v)continue;t.prepareDrawTile(y);const _=v.programConfigurations.get(i.id),x=t.useProgram(p,_);u&&(t.context.activeTexture.set(l.TEXTURE0),r.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),_.updatePaintBuffers(h));const b=c.constantOr(null);if(b&&r.imageAtlas){const e=r.imageAtlas,t=e.patternPositions[b.to.toString()],n=e.patternPositions[b.from.toString()];t&&n&&_.setConstantPatternPositions(t,n)}const w=t.translatePosMatrix(y.projMatrix,r,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor"));if(a){m=v.indexBuffer2,g=v.segments2;const e=t.terrain&&t.terrain.renderingToTexture?t.terrain.drapeBufferSize:[l.drawingBufferWidth,l.drawingBufferHeight];f="fillOutlinePattern"===p&&u?bn(w,t,h,r,e):xn(w,e)}else m=v.indexBuffer,g=v.segments,f=u?_n(w,t,h,r):vn(w);t.prepareDrawProgram(t.context,x,y.toUnwrapped()),x.draw(t.context,d,o,t.stencilModeForClipping(y),s,e.CullFaceMode.disabled,f,i.id,v.layoutVertexBuffer,m,g,i.paint,t.transform.zoom,_)}}function Yn(t,n,i,r,o,s,a){const l=t.context,c=l.gl,u=i.paint.get("fill-extrusion-pattern"),h=u.constantOr(1),d=i.getCrossfadeParameters(),p=i.paint.get("fill-extrusion-opacity");for(const f of r){const r=n.getTile(f),m=r.getBucket(i);if(!m)continue;const g=m.programConfigurations.get(i.id),y=t.useProgram(h?"fillExtrusionPattern":"fillExtrusion",g);if(t.terrain){const e=t.terrain;if(!m.enableTerrain)continue;if(e.setupElevationDraw(r,y,{useMeterToDem:!0}),Qn(l,n,f,m,i,e),!m.centroidVertexBuffer){const e=y.attributes.a_centroid_pos;void 0!==e&&c.vertexAttrib2f(e,0,0)}}h&&(t.context.activeTexture.set(c.TEXTURE0),r.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),g.updatePaintBuffers(d));const v=u.constantOr(null);if(v&&r.imageAtlas){const e=r.imageAtlas,t=e.patternPositions[v.to.toString()],n=e.patternPositions[v.from.toString()];t&&n&&g.setConstantPatternPositions(t,n)}const _=t.translatePosMatrix(f.projMatrix,r,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),x=i.paint.get("fill-extrusion-vertical-gradient"),b=h?yn(_,t,x,p,f,d,r):gn(_,t,x,p);t.prepareDrawProgram(l,y,f.toUnwrapped()),y.draw(l,l.gl.TRIANGLES,o,s,a,e.CullFaceMode.backCCW,b,i.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,i.paint,t.transform.zoom,g,t.terrain?m.centroidVertexBuffer:null)}}function Qn(t,n,i,r,o,s){const a=[t=>{let n=t.canonical.x-1,i=t.wrap;return n<0&&(n=(1<<t.canonical.z)-1,i--),new e.OverscaledTileID(t.overscaledZ,i,t.canonical.z,n,t.canonical.y)},t=>{let n=t.canonical.x+1,i=t.wrap;return n===1<<t.canonical.z&&(n=0,i++),new e.OverscaledTileID(t.overscaledZ,i,t.canonical.z,n,t.canonical.y)},t=>new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,(0===t.canonical.y?1<<t.canonical.z:t.canonical.y)-1),t=>new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y===(1<<t.canonical.z)-1?0:t.canonical.y+1)],l=e=>{const t=n.getSource().maxzoom,i=e=>{const t=n.getTileByID(e);if(t&&t.hasData())return t.getBucket(o)};let r,s,a;return(e.overscaledZ===e.canonical.z||e.overscaledZ>=t)&&(r=i(e.key)),e.overscaledZ>=t&&(s=i(e.calculateScaledKey(e.overscaledZ+1))),e.overscaledZ>t&&(a=i(e.calculateScaledKey(e.overscaledZ-1))),r||s||a},c=[0,0,0],u=(t,n)=>(c[0]=Math.min(t.min.y,n.min.y),c[1]=Math.max(t.max.y,n.max.y),c[2]=e.EXTENT-n.min.x>t.max.x?n.min.x-e.EXTENT:t.max.x,c),h=(t,n)=>(c[0]=Math.min(t.min.x,n.min.x),c[1]=Math.max(t.max.x,n.max.x),c[2]=e.EXTENT-n.min.y>t.max.y?n.min.y-e.EXTENT:t.max.y,c),d=[(e,t)=>u(e,t),(e,t)=>u(t,e),(e,t)=>h(e,t),(e,t)=>h(t,e)],p=new e.pointGeometry(0,0);let f,m,g;const y=(t,n,r,o,a)=>{const l=[[o?r:t,o?t:r,0],[o?r:n,o?n:r,0]],c=a<0?e.EXTENT+a:a,u=[o?c:(t+n)/2,o?(t+n)/2:c,0];return 0===r&&a<0||0!==r&&a>0?s.getForTilePoints(g,[u],!0,m):l.push(u),s.getForTilePoints(i,l,!0,f),Math.max(l[0][2],l[1][2],u[2])/s.exaggeration()};for(let v=0;v<4;v++){const t=r.borders[v];if(0===t.length&&(r.borderDone[v]=!0),r.borderDone[v])continue;const n=g=a[v](i),o=l(n);if(!o||!o.enableTerrain)continue;if(m=s.findDEMTileFor(n),!m||!m.dem)continue;if(!f){const e=s.findDEMTileFor(i);if(!e||!e.dem)return;f=e}const c=(v<2?1:5)-v,u=o.borders[c];let h=0;for(let i=0;i<t.length;i++){const n=r.featuresOnBorder[t[i]],s=n.borders[v];let a;for(;h<u.length&&(a=o.featuresOnBorder[u[h]],!(a.borders[c][1]>s[0]+3));)o.borderDone[c]||o.encodeCentroid(void 0,a,!1),h++;if(a&&h<u.length){const t=h;let i=0;for(;!(a.borders[c][0]>s[1]-3)&&(i++,++h!==u.length);)a=o.featuresOnBorder[u[h]];if(a=o.featuresOnBorder[u[t]],n.intersectsCount()>1||a.intersectsCount()>1||1!==i){1!==i&&(h=t),r.encodeCentroid(void 0,n,!1),o.borderDone[c]||o.encodeCentroid(void 0,a,!1);continue}const l=d[v](n,a),f=v%2?e.EXTENT-1:0;p.x=y(l[0],Math.min(e.EXTENT-1,l[1]),f,v<2,l[2]),p.y=0,r.encodeCentroid(p,n,!1),o.borderDone[c]||o.encodeCentroid(p,a,!1)}else r.encodeCentroid(void 0,n,!1)}r.borderDone[v]=r.needsCentroidUpdate=!0,o.borderDone[c]||(o.borderDone[c]=o.needsCentroidUpdate=!0)}(r.needsCentroidUpdate||!r.centroidVertexBuffer&&0!==r.centroidVertexArray.length)&&r.uploadCentroid(t)}const Kn=new e.Color(1,0,0,1),Jn=new e.Color(0,1,0,1),ei=new e.Color(0,0,1,1),ti=new e.Color(1,0,1,1),ni=new e.Color(0,1,1,1);function ii(e,t,n,i){oi(e,0,t+n/2,e.transform.width,n,i)}function ri(e,t,n,i){oi(e,t-n/2,0,n,e.transform.height,i)}function oi(t,n,i,r,o,s){const a=t.context,l=a.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*e.exported.devicePixelRatio,i*e.exported.devicePixelRatio,r*e.exported.devicePixelRatio,o*e.exported.devicePixelRatio),a.clear({color:s}),l.disable(l.SCISSOR_TEST)}function si(t,n,i){const r=t.context,o=r.gl,s=i.projMatrix,a=t.useProgram("debug"),l=n.getTileByID(i.key);t.terrain&&t.terrain.setupElevationDraw(l,a);const c=e.DepthMode.disabled,u=e.StencilMode.disabled,h=t.colorModeForRenderPass(),d="$debug";r.activeTexture.set(o.TEXTURE0),t.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),a.draw(r,o.LINE_STRIP,c,u,h,e.CullFaceMode.disabled,En(s,e.Color.red),d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);const p=l.latestRawTileData,f=Math.floor((p&&p.byteLength||0)/1024),m=n.getTile(i).tileSize,g=512/Math.min(m,512)*(i.overscaledZ/t.transform.zoom)*.5;let y=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(y+=" => "+i.overscaledZ),function(e,t){e.initDebugOverlayCanvas();const n=e.debugOverlayCanvas,i=e.context.gl,r=e.debugOverlayCanvas.getContext("2d");r.clearRect(0,0,n.width,n.height),r.shadowColor="white",r.shadowBlur=2,r.lineWidth=1.5,r.strokeStyle="white",r.textBaseline="top",r.font="bold 36px Open Sans, sans-serif",r.fillText(t,5,5),r.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}(t,`${y} ${f}kb`),a.draw(r,o.TRIANGLES,c,u,e.ColorMode.alphaBlended,e.CullFaceMode.disabled,En(s,e.Color.transparent,g),d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}const ai=e.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:li}=ai;function ci(e,t,n,i){e.emplaceBack(t,n,i)}class ui{constructor(t){this.vertexArray=new e.StructArrayLayout3f12,this.indices=new e.StructArrayLayout3ui6,ci(this.vertexArray,-1,-1,1),ci(this.vertexArray,1,-1,1),ci(this.vertexArray,-1,1,1),ci(this.vertexArray,1,1,1),ci(this.vertexArray,-1,-1,-1),ci(this.vertexArray,1,-1,-1),ci(this.vertexArray,-1,1,-1),ci(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=t.createVertexBuffer(this.vertexArray,li),this.indexBuffer=t.createIndexBuffer(this.indices),this.segment=e.SegmentVector.simpleSegment(0,0,36,12)}}function hi(t,n,i,r,o,s){const a=t.gl,l=n.paint.get("sky-atmosphere-color"),c=n.paint.get("sky-atmosphere-halo-color"),u=n.paint.get("sky-atmosphere-sun-intensity"),h=((e,t,n,i,r)=>({u_matrix_3f:e,u_sun_direction:t,u_sun_intensity:n,u_color_tint_r:[i.r,i.g,i.b,i.a],u_color_tint_m:[r.r,r.g,r.b,r.a],u_luminance:5e-5}))(e.fromMat4([],r),o,u,l,c);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+s,n.skyboxTexture,0),i.draw(t,a.TRIANGLES,e.DepthMode.disabled,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.frontCW,h,"skyboxCapture",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}const di={symbol:function(t,n,i,r,o){if("translucent"!==t.renderPass)return;const s=e.StencilMode.disabled,a=t.colorModeForRenderPass();i.layout.get("text-variable-anchor")&&function(t,n,i,r,o,s,a){const l=n.transform,c="map"===o,u="map"===s;for(const h of t){const t=r.getTile(h),o=t.getBucket(i);if(!o||!o.text||!o.text.segments.get().length)continue;const s=e.evaluateSizeForZoom(o.textSizeData,l.zoom),d=I(t,1,n.transform.zoom),p=Ze(h.projMatrix,u,c,n.transform,d),f="none"!==i.layout.get("icon-text-fit")&&o.hasIconData();if(s){const n=Math.pow(2,l.zoom-t.tileID.overscaledZ),i=l.elevation;Gn(o,c,u,a,e.symbolSize,l,p,h.projMatrix,n,s,f,i?e=>i.getAtTileOffset(h,e.x,e.y):e=>0)}}}(r,t,i,n,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),o),0!==i.paint.get("icon-opacity").constantOr(1)&&Wn(t,n,i,r,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),s,a),0!==i.paint.get("text-opacity").constantOr(1)&&Wn(t,n,i,r,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),s,a),n.map.showCollisionBoxes&&($n(t,n,i,r,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),$n(t,n,i,r,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1))},circle:function(t,n,i,r){if("translucent"!==t.renderPass)return;const o=i.paint.get("circle-opacity"),s=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),l=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0===o.constantOr(1)&&(0===s.constantOr(1)||0===a.constantOr(1)))return;const c=t.context,u=c.gl,h=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),d=e.StencilMode.disabled,p=t.colorModeForRenderPass(),f=[];for(let m=0;m<r.length;m++){const o=r[m],s=n.getTile(o),a=s.getBucket(i);if(!a)continue;const c=a.programConfigurations.get(i.id),u=Tn(i),h={programConfiguration:c,program:t.useProgram("circle",c,u),layoutVertexBuffer:a.layoutVertexBuffer,indexBuffer:a.indexBuffer,uniformValues:wn(t,o,s,i),tile:s};if(l){const t=a.segments.get();for(const n of t)f.push({segments:new e.SegmentVector([n]),sortKey:n.sortKey,state:h})}else f.push({segments:a.segments,sortKey:0,state:h})}l&&f.sort((e,t)=>e.sortKey-t.sortKey);for(const m of f){const{programConfiguration:n,program:r,layoutVertexBuffer:o,indexBuffer:s,uniformValues:a,tile:l}=m.state,f=m.segments;t.terrain&&t.terrain.setupElevationDraw(l,r,{useDepthForOcclusion:!0}),t.prepareDrawProgram(c,r,l.tileID.toUnwrapped()),r.draw(c,u.TRIANGLES,h,d,p,e.CullFaceMode.disabled,a,i.id,o,s,f,i.paint,t.transform.zoom,n)}},heatmap:function(t,n,i,r){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const o=t.context,s=o.gl,a=e.StencilMode.disabled,l=new e.ColorMode([s.ONE,s.ONE],e.Color.transparent,[!0,!0,!0,!0]);!function(e,t,n){const i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let r=n.heatmapFbo;if(r)i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),e.bindFramebuffer.set(r.framebuffer);else{const o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),r=n.heatmapFbo=e.createFramebuffer(t.width/4,t.height/4,!1),function(e,t,n,i){const r=e.gl;r.texImage2D(r.TEXTURE_2D,0,r.RGBA,t.width/4,t.height/4,0,r.RGBA,e.extRenderToTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:r.UNSIGNED_BYTE,null),i.colorAttachment.set(n)}(e,t,o,r)}}(o,t,i),o.clear({color:e.Color.transparent});for(let c=0;c<r.length;c++){const u=r[c];if(n.hasRenderableParent(u))continue;const h=n.getTile(u),d=h.getBucket(i);if(!d)continue;const p=d.programConfigurations.get(i.id),f=t.useProgram("heatmap",p),{zoom:m}=t.transform;t.terrain&&t.terrain.setupElevationDraw(h,f),t.prepareDrawProgram(o,f,u.toUnwrapped()),f.draw(o,s.TRIANGLES,e.DepthMode.disabled,a,l,e.CullFaceMode.disabled,kn(u.projMatrix,h,m,i.paint.get("heatmap-intensity")),i.id,d.layoutVertexBuffer,d.indexBuffer,d.segments,i.paint,t.transform.zoom,p)}o.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),function(t,n){const i=t.context,r=i.gl,o=n.heatmapFbo;if(!o)return;i.activeTexture.set(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(r.TEXTURE1);let s=n.colorRampTexture;s||(s=n.colorRampTexture=new e.Texture(i,n.colorRamp,r.RGBA)),s.bind(r.LINEAR,r.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(i,r.TRIANGLES,e.DepthMode.disabled,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.disabled,((t,n,i,r)=>{const o=e.create$1();e.ortho(o,0,t.width,t.height,0,0,1);const s=t.context.gl;return{u_matrix:o,u_world:[s.drawingBufferWidth,s.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:n.paint.get("heatmap-opacity")}})(t,n),n.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,n.paint,t.transform.zoom)}(t,i))},line:function(t,n,i,r){if("translucent"!==t.renderPass)return;const o=i.paint.get("line-opacity"),s=i.paint.get("line-width");if(0===o.constantOr(1)||0===s.constantOr(1))return;const a=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),l=t.colorModeForRenderPass(),c=i.paint.get("line-dasharray"),u=c.constantOr(1),h=i.layout.get("line-cap"),d=i.paint.get("line-pattern"),p=d.constantOr(1),f=i.paint.get("line-gradient"),m=i.getCrossfadeParameters(),g=p?"linePattern":u?"lineSDF":f?"lineGradient":"line",y=t.context,v=y.gl;for(const _ of r){const r=n.getTile(_);if(p&&!r.patternsLoaded())continue;const o=r.getBucket(i);if(!o)continue;t.prepareDrawTile(_);const s=o.programConfigurations.get(i.id),x=t.useProgram(g,s),b=d.constantOr(null);if(b&&r.imageAtlas){const e=r.imageAtlas,t=e.patternPositions[b.to.toString()],n=e.patternPositions[b.from.toString()];t&&n&&s.setConstantPatternPositions(t,n)}const w=c.constantOr(null),T=h.constantOr(null);if(!p&&w&&T&&r.lineAtlas){const e=r.lineAtlas,t=e.getDash(w.to,T),n=e.getDash(w.from,T);t&&n&&s.setConstantPatternPositions(t,n)}const S=t.terrain?_.projMatrix:null,E=p?In(t,r,i,m,S):u?Mn(t,r,i,m,S):f?An(t,r,i,S,o.lineClipsArray.length):Cn(t,r,i,S);if(p)y.activeTexture.set(v.TEXTURE0),r.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),s.updatePaintBuffers(m);else if(u)y.activeTexture.set(v.TEXTURE0),r.lineAtlasTexture.bind(v.LINEAR,v.REPEAT),s.updatePaintBuffers(m);else if(f){const r=o.gradients[i.id];let s=r.texture;if(i.gradientVersion!==r.version){let a=256;if(i.stepInterpolant){const i=n.getSource().maxzoom,r=_.canonical.z===i?Math.ceil(1<<t.transform.maxZoom-_.canonical.z):1;a=e.clamp(e.nextPowerOfTwo(o.maxLineLength/e.EXTENT*1024*r),256,y.maxTextureSize)}r.gradient=e.renderColorRamp({expression:i.gradientExpression(),evaluationKey:"lineProgress",resolution:a,image:r.gradient||void 0,clips:o.lineClipsArray}),r.texture?r.texture.update(r.gradient):r.texture=new e.Texture(y,r.gradient,v.RGBA),r.version=i.gradientVersion,s=r.texture}y.activeTexture.set(v.TEXTURE0),s.bind(i.stepInterpolant?v.NEAREST:v.LINEAR,v.CLAMP_TO_EDGE)}t.prepareDrawProgram(y,x,_.toUnwrapped()),x.draw(y,v.TRIANGLES,a,t.stencilModeForClipping(_),l,e.CullFaceMode.disabled,E,i.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,i.paint,t.transform.zoom,s,o.layoutVertexBuffer2)}},fill:function(t,n,i,r){const o=i.paint.get("fill-color"),s=i.paint.get("fill-opacity");if(0===s.constantOr(1))return;const a=t.colorModeForRenderPass(),l=i.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(e.Color.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){const o=t.depthModeForSublayer(1,"opaque"===t.renderPass?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly);Xn(t,n,i,r,o,a,!1)}if("translucent"===t.renderPass&&i.paint.get("fill-antialias")){const o=t.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,e.DepthMode.ReadOnly);Xn(t,n,i,r,o,a,!0)}},"fill-extrusion":function(t,n,i,r){const o=i.paint.get("fill-extrusion-opacity");if(0!==o&&"translucent"===t.renderPass){const s=new e.DepthMode(t.context.gl.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);if(1!==o||i.paint.get("fill-extrusion-pattern").constantOr(1))Yn(t,n,i,r,s,e.StencilMode.disabled,e.ColorMode.disabled),Yn(t,n,i,r,s,t.stencilModeFor3D(),t.colorModeForRenderPass());else{const o=t.colorModeForRenderPass();Yn(t,n,i,r,s,e.StencilMode.disabled,o)}}},hillshade:function(t,n,i,r){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;const o=t.context,s=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),a=t.colorModeForRenderPass(),l=t.terrain&&t.terrain.renderingToTexture,[c,u]="translucent"!==t.renderPass||l?[{},r]:t.stencilConfigForOverlap(r);for(const h of u){const r=n.getTile(h);if(r.needsHillshadePrepare&&"offscreen"===t.renderPass)en(t,r,i,s,e.StencilMode.disabled,a);else if("translucent"===t.renderPass){const e=l&&t.terrain?t.terrain.stencilModeForRTTOverlap(h):c[h.overscaledZ];Kt(t,h,r,i,s,e,a)}}o.viewport.set([0,0,t.width,t.height])},raster:function(t,n,i,r,o,s){if("translucent"!==t.renderPass)return;if(0===i.paint.get("raster-opacity"))return;if(!r.length)return;const a=t.context,l=a.gl,c=n.getSource(),u=t.useProgram("raster"),h=t.colorModeForRenderPass(),d=t.terrain&&t.terrain.renderingToTexture,[p,f]=c instanceof Se||d?[{},r]:t.stencilConfigForOverlap(r),m=f[f.length-1].overscaledZ,g=!t.options.moving;for(const y of f){const r=d?e.DepthMode.disabled:t.depthModeForSublayer(y.overscaledZ-m,1===i.paint.get("raster-opacity")?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly,l.LESS),o=y.toUnwrapped(),f=n.getTile(y);if(d&&(!f||!f.hasData()))continue;const v=d?y.projMatrix:t.transform.calculateProjMatrix(o,g),_=t.terrain&&d?t.terrain.stencilModeForRTTOverlap(y):p[y.overscaledZ],x=s?0:i.paint.get("raster-fade-duration");f.registerFadeDuration(x);const b=n.findLoadedParent(y,0),w=cn(f,b,n,t.transform,x);let T,S;t.terrain&&t.terrain.prepareDrawTile(y);const E="nearest"===i.paint.get("raster-resampling")?l.NEAREST:l.LINEAR;a.activeTexture.set(l.TEXTURE0),f.texture.bind(E,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(l.TEXTURE1),b?(b.texture.bind(E,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST),T=Math.pow(2,b.tileID.overscaledZ-f.tileID.overscaledZ),S=[f.tileID.canonical.x*T%1,f.tileID.canonical.y*T%1]):f.texture.bind(E,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST);const k=Ln(v,S||[0,0],T||1,w,i);t.prepareDrawProgram(a,u,o),c instanceof Se?u.draw(a,l.TRIANGLES,r,e.StencilMode.disabled,h,e.CullFaceMode.disabled,k,i.id,c.boundsBuffer,t.quadTriangleIndexBuffer,c.boundsSegments):u.draw(a,l.TRIANGLES,r,_,h,e.CullFaceMode.disabled,k,i.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,n,i,r){const o=i.paint.get("background-color"),s=i.paint.get("background-opacity");if(0===s)return;const a=t.context,l=a.gl,c=t.transform,u=c.tileSize,h=i.paint.get("background-pattern");if(t.isPatternMissing(h))return;const d=!h&&1===o.a&&1===s&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==d)return;const p=e.StencilMode.disabled,f=t.depthModeForSublayer(0,"opaque"===d?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly),m=t.colorModeForRenderPass(),g=t.useProgram(h?"backgroundPattern":"background"),y=r||c.coveringTiles({tileSize:u});h&&(a.activeTexture.set(l.TEXTURE0),t.imageManager.bind(t.context));const v=i.getCrossfadeParameters();for(const _ of y){const n=_.toUnwrapped(),c=r?_.projMatrix:t.transform.calculateProjMatrix(n);t.prepareDrawTile(_);const d=h?Bn(c,s,t,h,{tileID:_,tileSize:u},v):Nn(c,s,o);t.prepareDrawProgram(a,g,n),g.draw(a,l.TRIANGLES,f,p,m,e.CullFaceMode.disabled,d,i.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}},sky:function(t,n,i){const r=i.paint.get("sky-opacity");if(0===r)return;const o=t.context,s=i.paint.get("sky-type"),a=new e.DepthMode(o.gl.LEQUAL,e.DepthMode.ReadOnly,[0,1]),l=t.frameCounter/1e3%1;"atmosphere"===s?"offscreen"===t.renderPass?i.needsSkyboxCapture(t)&&(function(t,n,i,r){const o=t.context,s=o.gl;let a=n.skyboxFbo;if(!a){a=n.skyboxFbo=o.createFramebuffer(32,32,!1),n.skyboxGeometry=new ui(o),n.skyboxTexture=o.gl.createTexture(),s.bindTexture(s.TEXTURE_CUBE_MAP,n.skyboxTexture),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MAG_FILTER,s.LINEAR);for(let e=0;e<6;++e)s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,s.RGBA,32,32,0,s.RGBA,s.UNSIGNED_BYTE,null)}o.bindFramebuffer.set(a.framebuffer),o.viewport.set([0,0,32,32]);const l=n.getCenter(t,!0),c=t.useProgram("skyboxCapture"),u=new Float64Array(16);e.identity(u),e.rotateY(u,u,.5*-Math.PI),hi(o,n,c,u,l,0),e.identity(u),e.rotateY(u,u,.5*Math.PI),hi(o,n,c,u,l,1),e.identity(u),e.rotateX(u,u,.5*-Math.PI),hi(o,n,c,u,l,2),e.identity(u),e.rotateX(u,u,.5*Math.PI),hi(o,n,c,u,l,3),e.identity(u),hi(o,n,c,u,l,4),e.identity(u),e.rotateY(u,u,Math.PI),hi(o,n,c,u,l,5),o.viewport.set([0,0,t.width,t.height])}(t,i),i.markSkyboxValid(t)):"sky"===t.renderPass&&function(t,n,i,r,o){const s=t.context,a=s.gl,l=t.transform,c=t.useProgram("skybox");s.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_CUBE_MAP,n.skyboxTexture);const u=((e,t,n,i,r)=>({u_matrix:e,u_sun_direction:t,u_cubemap:0,u_opacity:i,u_temporal_offset:r}))(l.skyboxMatrix,n.getCenter(t,!1),0,r,o);t.prepareDrawProgram(s,c),c.draw(s,a.TRIANGLES,i,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,u,"skybox",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}(t,i,a,r,l):"gradient"===s&&"sky"===t.renderPass&&function(t,n,i,r,o){const s=t.context,a=s.gl,l=t.transform,c=t.useProgram("skyboxGradient");n.skyboxGeometry||(n.skyboxGeometry=new ui(s)),s.activeTexture.set(a.TEXTURE0);let u=n.colorRampTexture;u||(u=n.colorRampTexture=new e.Texture(s,n.colorRamp,a.RGBA)),u.bind(a.LINEAR,a.CLAMP_TO_EDGE);const h=((t,n,i,r,o)=>({u_matrix:t,u_color_ramp:0,u_center_direction:n,u_radius:e.degToRad(i),u_opacity:r,u_temporal_offset:o}))(l.skyboxMatrix,n.getCenter(t,!1),n.paint.get("sky-gradient-radius"),r,o);t.prepareDrawProgram(s,c),c.draw(s,a.TRIANGLES,i,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,h,"skyboxGradient",n.skyboxGeometry.vertexBuffer,n.skyboxGeometry.indexBuffer,n.skyboxGeometry.segment)}(t,i,a,r,l)},debug:function(e,t,n){for(let i=0;i<n.length;i++)si(e,t,n[i])},custom:function(t,n,i){const r=t.context,o=i.implementation;if("offscreen"===t.renderPass){const e=o.prerender;e&&(t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),e.call(o,r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),r.setStencilMode(e.StencilMode.disabled);const n="3d"===o.renderingMode?new e.DepthMode(t.context.gl.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,e.DepthMode.ReadOnly);r.setDepthMode(n),o.render(r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState(),r.bindFramebuffer.set(null)}}};class pi{constructor(t,n){this.context=new xe(t),this.transform=n,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.setup(),this.numSublayers=e.SourceCache.maxUnderzooming+e.SourceCache.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new zt,this.gpuTimers={},this.frameCounter=0}updateTerrain(e,t){const n=!!e&&!!e.terrain;if(!(n||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new dn(this,e));const i=this._terrain;this.transform.elevation=n?i:null,i.update(e,this.transform,t)}_updateFog(e){const t=e.fog;if(!t||t.getOpacity(this.transform.pitch)<1||t.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);const[n,i]=t.getFovAdjustedRange(this.transform._fov);if(n>i)return void(this.transform.fogCullDistSq=null);const r=n+.78*(i-n);this.transform.fogCullDistSq=r*r}get terrain(){return this._terrain&&this._terrain.enabled?this._terrain:null}resize(t,n){if(this.width=t*e.exported.devicePixelRatio,this.height=n*e.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style.order)this.style._layers[e].resize()}setup(){const t=this.context,n=new e.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(n,e.posAttributes.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);const i=new e.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(e.EXTENT,0),i.emplaceBack(0,e.EXTENT),i.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(i,e.posAttributes.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);const r=new e.StructArrayLayout4i8;r.emplaceBack(0,0,0,0),r.emplaceBack(e.EXTENT,0,e.EXTENT,0),r.emplaceBack(0,e.EXTENT,0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(r,Te.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);const o=new e.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,e.posAttributes.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);const s=new e.StructArrayLayout1ui2;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(s);const a=new e.StructArrayLayout3ui6;a.emplaceBack(0,1,2),a.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(a),this.emptyTexture=new e.Texture(t,{width:1,height:1,data:new Uint8Array([0,0,0,0])},t.gl.RGBA),this.identityMat=e.create$1();const l=this.context.gl;this.stencilClearMode=new e.StencilMode({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.loadTimeStamps.push(e.window.performance.now())}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const i=e.create$1();e.ortho(i,0,this.width,this.height,0,0,1),e.scale$1(i,i,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,e.DepthMode.disabled,this.stencilClearMode,e.ColorMode.disabled,e.CullFaceMode.disabled,ln(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,n,i){if(!(n&&this.currentStencilSource!==n.id&&t.isTileClipped()&&i&&i.length))return;this.currentStencilSource=n.id;const r=this.context,o=r.gl;this.nextStencilID+i.length>256&&this.clearStencil(),r.setColorMode(e.ColorMode.disabled),r.setDepthMode(e.DepthMode.disabled);const s=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const a of i){const t=this._tileClippingMaskIDs[a.key]=this.nextStencilID++;s.draw(r,o.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,ln(a.projMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,n=this.context.gl;return new e.StencilMode({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(t){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(t);const n=this.context.gl;return new e.StencilMode({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(t){const n=this.context.gl,i=t.sort((e,t)=>t.overscaledZ-e.overscaledZ),r=i[i.length-1].overscaledZ,o=i[0].overscaledZ-r+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();const t={};for(let i=0;i<o;i++)t[i+r]=new e.StencilMode({func:n.GEQUAL,mask:255},i+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=o,[t,i]}return[{[r]:e.StencilMode.disabled},i]}colorModeForRenderPass(){const t=this.context.gl;if(this._showOverdrawInspector){const n=1/8;return new e.ColorMode([t.CONSTANT_COLOR,t.ONE],new e.Color(n,n,n,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?e.ColorMode.unblended:e.ColorMode.alphaBlended}depthModeForSublayer(t,n,i){if(!this.opaquePassEnabledForLayer())return e.DepthMode.disabled;const r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new e.DepthMode(i||this.context.gl.LEQUAL,n,[r,r])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(t,n){this.style=t,this.options=n,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(e.exported.now()),this.imageManager.beginFrame();const i=this.style.order,r=this.style._sourceCaches;for(const e in r){const t=r[e];t.used&&t.prepare(this.context)}const o={},s={},a={};for(const e in r){const t=r[e];o[e]=t.getVisibleCoordinates(),s[e]=o[e].slice().reverse(),a[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;e<i.length;e++)if(this.style._layers[i[e]].is3D()){this.opaquePassCutoff=e;break}if(this.terrain&&(this.terrain.updateTileBinding(a),this.opaquePassCutoff=0),!e.isMapAuthenticated(this.context.gl))return;this.renderPass="offscreen";for(const e of i){const n=this.style._layers[e],i=t._getLayerSourceCache(n);if(!n.hasOffscreenPass()||n.isHidden(this.transform.zoom))continue;const r=i?s[i.id]:void 0;("custom"===n.type||n.isSky()||r&&r.length)&&this.renderLayer(this,i,n,r)}this.depthRangeFor3D=[0,1-(t.order.length+2)*this.numSublayers*this.depthEpsilon],this.terrain&&(this.style.hasSymbolLayers()||this.style.hasCircleLayers())&&this.terrain.drawDepth(),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]);let l=e.Color.transparent;if(this.style.fog&&(l=this.style.fog.properties.get("color")),this.context.clear({color:n.showOverdrawInspector?e.Color.black:l,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.renderPass="opaque",!this.terrain)for(this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){const e=this.style._layers[i[this.currentLayer]],n=t._getLayerSourceCache(e);if(e.isSky())continue;const r=n?s[n.id]:void 0;this._renderTileClippingMasks(e,n,r),this.renderLayer(this,n,e,r)}if(this.renderPass="sky",this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){const e=this.style._layers[i[this.currentLayer]],n=t._getLayerSourceCache(e);e.isSky()&&this.renderLayer(this,n,e,n?s[n.id]:void 0)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;){const e=this.style._layers[i[this.currentLayer]],n=t._getLayerSourceCache(e);if(e.isSky()){++this.currentLayer;continue}if(this.terrain&&this.style.isLayerDraped(e)){if(e.isHidden(this.transform.zoom)){++this.currentLayer;continue}this.currentLayer=this.terrain.renderBatch(this.currentLayer);continue}const r=n?("symbol"===e.type?a:s)[n.id]:void 0;this._renderTileClippingMasks(e,n,n?o[n.id]:void 0),this.renderLayer(this,n,e,r),++this.currentLayer}if(this.terrain&&this.terrain.postRender(),this.options.showTileBoundaries||this.options.showQueryGeometry){let n=null;e.values(this.style._layers).forEach(e=>{const i=t._getLayerSourceCache(e);i&&!e.isHidden(this.transform.zoom)&&(!n||n.getSource().maxzoom<i.getSource().maxzoom)&&(n=i)}),n&&this.options.showTileBoundaries&&di.debug(this,n,n.getVisibleCoordinates())}this.options.showPadding&&function(e){const t=e.transform.padding;ii(e,e.transform.height-(t.top||0),3,Kn),ii(e,t.bottom||0,3,Jn),ri(e,t.left||0,3,ei),ri(e,e.transform.width-(t.right||0),3,ti);const n=e.transform.centerPoint;!function(e,t,n,i){oi(e,t-1,n-10,2,20,i),oi(e,t-10,n-1,20,2,i)}(e,n.x,e.transform.height-n.y,ni)}(this),this.context.setDefault(),this.frameCounter=(this.frameCounter+1)%e.MAX_SAFE_INTEGER,this.tileLoaded&&this.options.speedIndexTiming&&(this.loadTimeStamps.push(e.window.performance.now()),this.saveCanvasCopy())}renderLayer(e,t,n,i){n.isHidden(this.transform.zoom)||("background"===n.type||"sky"===n.type||"custom"===n.type||i&&i.length)&&(this.id=n.id,this.gpuTimingStart(n),di[n.type](e,t,n,i,this.style.placement.variableOffsets,this.options.isInitialLoad),this.gpuTimingEnd())}gpuTimingStart(e){if(!this.options.gpuTiming)return;const t=this.context.extTimerQuery;let n=this.gpuTimers[e.id];n||(n=this.gpuTimers[e.id]={calls:0,cpuTime:0,query:t.createQueryEXT()}),n.calls++,t.beginQueryEXT(t.TIME_ELAPSED_EXT,n.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const e=this.context.extTimerQuery;e.endQueryEXT(e.TIME_ELAPSED_EXT)}collectGpuTimers(){const e=this.gpuTimers;return this.gpuTimers={},e}queryGpuTimers(e){const t={};for(const n in e){const i=e[n],r=this.context.extTimerQuery,o=r.getQueryObjectEXT(i.query,r.QUERY_RESULT_EXT)/1e6;r.deleteQueryEXT(i.query),t[n]=o}return t}translatePosMatrix(t,n,i,r,o){if(!i[0]&&!i[1])return t;const s=o?"map"===r?this.transform.angle:0:"viewport"===r?-this.transform.angle:0;if(s){const e=Math.sin(s),t=Math.cos(s);i=[i[0]*t-i[1]*e,i[0]*e+i[1]*t]}const a=[o?i[0]:I(n,i[0],this.transform.zoom),o?i[1]:I(n,i[1],this.transform.zoom),0],l=new Float32Array(16);return e.translate(l,t,a),l}saveTileTexture(e){const t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n}currentGlobalDefines(){const e=this.terrain&&this.terrain.renderingToTexture,t=this.style&&this.style.fog,n=[];return this.terrain&&!this.terrain.renderingToTexture&&n.push("TERRAIN"),t&&!e&&0!==t.getOpacity(this.transform.pitch)&&n.push("FOG"),e&&n.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&n.push("OVERDRAW_INSPECTOR"),n}useProgram(e,t,n){this.cache=this.cache||{};const i=n||[],r=this.currentGlobalDefines().concat(i),o=fn.cacheKey(e,r,t);return this.cache[o]||(this.cache[o]=new fn(this.context,e,Zt[e],t,jn[e],r)),this.cache[o]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}prepareDrawTile(e){this.terrain&&this.terrain.prepareDrawTile(e)}prepareDrawProgram(e,t,n){if(this.terrain&&this.terrain.renderingToTexture)return;const i=this.style.fog;if(i){const r=i.getOpacity(this.transform.pitch);0!==r&&t.setFogUniformValues(e,((e,t,n,i)=>{const r=t.properties.get("color"),o=e.frameCounter/1e3%1,s=[r.r/r.a,r.g/r.a,r.b/r.a,i];return{u_fog_matrix:n?e.transform.calculateFogTileMatrix(n):e.identityMat,u_fog_range:t.getFovAdjustedRange(e.transform._fov),u_fog_color:s,u_fog_horizon_blend:t.properties.get("horizon-blend"),u_fog_temporal_offset:o}})(this,i,n,r))}}setTileLoadedFlag(e){this.tileLoaded=e}saveCanvasCopy(){this.frameCopies.push(this.canvasCopy()),this.tileLoaded=!1}canvasCopy(){const e=this.context.gl,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGBA,0,0,e.drawingBufferWidth,e.drawingBufferHeight,0),t}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const e=this.style&&this.style.fog;return!!e&&0!==e.getOpacity(this.transform.pitch)}}class fi{constructor(e=0,t=0,n=0,i=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=i}interpolate(t,n,i){return null!=n.top&&null!=t.top&&(this.top=e.number(t.top,n.top,i)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,n.bottom,i)),null!=n.left&&null!=t.left&&(this.left=e.number(t.left,n.left,i)),null!=n.right&&null!=t.right&&(this.right=e.number(t.right,n.right,i)),this}getCenter(t,n){const i=e.clamp((this.left+t-this.right)/2,0,t),r=e.clamp((this.top+n-this.bottom)/2,0,n);return new e.pointGeometry(i,r)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new fi(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function mi(e,t){return[e[4*t],e[4*t+1],e[4*t+2],e[4*t+3]]}function gi(e,t,n){e[4*t+0]=n[0],e[4*t+1]=n[1],e[4*t+2]=n[2],e[4*t+3]=n[3]}function yi(t,n){const i=mi(t,3);e.fromQuat(t,n),gi(t,3,i)}function vi(e,t){gi(e,3,[t[0],t[1],t[2],1])}function _i(t,n){const i=e.identity$1([]);return e.rotateZ$1(i,i,-n),e.rotateX$1(i,i,-t),i}function xi(t,n){const i=[t[0],t[1],0],r=[n[0],n[1],0];if(e.length(i)>=1e-15){const t=e.normalize([],i);e.scale(r,t,e.dot(r,t)),n[0]=r[0],n[1]=r[1]}const o=e.cross([],n,t);if(e.len(o)<1e-15)return null;const s=Math.atan2(-o[1],o[0]);return _i(Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2]),s)}class bi{constructor(e,t){this.position=e,this.orientation=t}get position(){return this._position}set position(t){this._position=this._renderWorldCopies?function(t){if(!t)return;const n=Array.isArray(t)?new e.MercatorCoordinate(t[0],t[1],t[2]):t;return n.x=e.wrap(n.x,0,1),n}(t):t}lookAtPoint(t,n){if(this.orientation=null,!this.position)return;const i=this._elevation?this._elevation.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(t)):0,r=this.position,o=e.MercatorCoordinate.fromLngLat(t,i),s=[o.x-r.x,o.y-r.y,o.z-r.z];n||(n=[0,0,1]),n[2]=Math.abs(n[2]),this.orientation=xi(s,n)}setPitchBearing(t,n){this.orientation=_i(e.degToRad(t),e.degToRad(-n))}}class wi{constructor(t,n){this._transform=e.identity([]),this._orientation=e.identity$1([]),n&&(this._orientation=n,yi(this._transform,this._orientation)),t&&vi(this._transform,t)}get mercatorPosition(){const t=this.position;return new e.MercatorCoordinate(t[0],t[1],t[2])}get position(){const e=mi(this._transform,3);return[e[0],e[1],e[2]]}set position(e){vi(this._transform,e)}get orientation(){return this._orientation}set orientation(e){this._orientation=e,yi(this._transform,this._orientation)}getPitchBearing(){const e=this.forward(),t=this.right();return{bearing:Math.atan2(-t[1],t[0]),pitch:Math.atan2(Math.sqrt(e[0]*e[0]+e[1]*e[1]),-e[2])}}setPitchBearing(e,t){this._orientation=_i(e,t),yi(this._transform,this._orientation)}forward(){const e=mi(this._transform,2);return[-e[0],-e[1],-e[2]]}up(){const e=mi(this._transform,1);return[-e[0],-e[1],-e[2]]}right(){const e=mi(this._transform,0);return[e[0],e[1],e[2]]}getCameraToWorld(t,n){const i=new Float64Array(16);return e.invert(i,this.getWorldToCamera(t,n)),i}getWorldToCameraPosition(t,n,i){const r=this.position;e.scale(r,r,-t);const o=new Float64Array(16);return e.fromScaling(o,[i,i,i]),e.translate(o,o,r),o[10]*=n,o}getWorldToCamera(t,n){const i=new Float64Array(16),r=new Float64Array(4),o=this.position;return e.conjugate(r,this._orientation),e.scale(o,o,-t),e.fromQuat(i,r),e.translate(i,i,o),i[1]*=-1,i[5]*=-1,i[9]*=-1,i[13]*=-1,i[8]*=n,i[9]*=n,i[10]*=n,i[11]*=n,i}getCameraToClipPerspective(t,n,i,r){const o=new Float64Array(16);return e.perspective(o,t,n,i,r),o}getDistanceToElevation(t){const n=0===t?0:e.mercatorZfromAltitude(t,this.position[1]),i=this.forward();return(n-this.position[2])/i[2]}clone(){return new wi([...this.position],[...this.orientation])}}class Ti{constructor(t,n,i,r,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=null==i?0:i,this._maxPitch=null==r?60:r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new fi,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._camera=new wi,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._horizonShift=.1}clone(){const e=new Ti(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e._elevation=this._elevation,e._centerAltitude=this._centerAltitude,e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e.cameraElevationReference=this.cameraElevationReference,e._center=this._center,e._setZoom(this.zoom),e._cameraZoom=this._cameraZoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._averageElevation=this._averageElevation,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._camera=this._camera.clone(),e._calcMatrices(),e.freezeTileCoverage=this.freezeTileCoverage,e}get elevation(){return this._elevation}set elevation(e){this._elevation!==e&&(this._elevation=e,e?this._updateCenterElevation()&&this._updateCameraOnTerrain():(this._cameraZoom=null,this._centerAltitude=0),this._calcMatrices())}updateElevation(e){this._terrainEnabled()&&null==this._cameraZoom&&this._updateCenterElevation()&&this._updateCameraOnTerrain(),e&&this._constrainCameraAltitude(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get cameraWorldSize(){const e=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(e))}get pixelsPerMeter(){return e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize}get cameraPixelsPerMeter(){return e.mercatorZfromAltitude(1,this.center.lat)*this.cameraWorldSize}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-e.wrap(t,-180,180)*Math.PI/180;var i;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=(i=new e.ARRAY_TYPE(4),e.ARRAY_TYPE!=Float32Array&&(i[1]=0,i[2]=0),i[0]=1,i[3]=1,i),function(e,t,n){var i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l+o*a,e[1]=r*l+s*a,e[2]=i*-a+o*l,e[3]=r*-a+s*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(e){this._averageElevation=e,this._calcFogMatrices()}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._setZoom(t),this._terrainEnabled()&&this._updateCameraOnTerrain(),this._constrain(),this._calcMatrices())}_setZoom(e){this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom}_updateCenterElevation(){if(!this._elevation)return!1;const t=this._elevation.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(this.center),-1);return-1===t?(this._cameraZoom=null,!1):(this._centerAltitude=t,!0)}_updateCameraOnTerrain(){const t=this.cameraToCenterDistance/this.worldSize,n=e.mercatorZfromAltitude(this._centerAltitude,this.center.lat);this._cameraZoom=this._zoomFromMercatorZ(n+t)}sampleAverageElevation(){if(!this._elevation)return 0;const t=this._elevation,n=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],i=this.horizonLineFromTop();let r=0,o=0;for(let s=0;s<n.length;s++){const a=new e.pointGeometry(n[s][0]*this.width,i+n[s][1]*(this.height-i)),l=t.pointCoordinate(a);if(!l)continue;const c=1/Math.hypot(l[0]-this._camera.position[0],l[1]-this._camera.position[1]);r+=l[3]*c,o+=c}return 0===o?NaN:r/o}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._terrainEnabled()&&("ground"===this.cameraElevationReference?this._updateCenterElevation()?this._updateCameraOnTerrain():this._cameraZoom=null:this._updateZoomFromElevation()),this._constrain(),this._calcMatrices())}_updateZoomFromElevation(){if(null==this._cameraZoom||!this._elevation)return;const t=this._cameraZoom,n=this._elevation.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(this.center)),i=e.mercatorZfromAltitude(n,this.center.lat),r=this._mercatorZfromZoom(t),o=this._mercatorZfromZoom(this._maxZoom),s=Math.max(r-i,o);this._setZoom(this._zoomFromMercatorZ(s))}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}computeZoomRelativeTo(t){const n=this.rayIntersectionCoordinate(this.pointRayIntersection(this.centerPoint,t.toAltitude()));let i;i=t.z<this._camera.position[2]?[n.x,n.y,n.z]:[t.x,t.y,t.z];const r=e.length(e.sub([],this._camera.position,i));return e.clamp(this._zoomFromMercatorZ(r),this._minZoom,this._maxZoom)}setFreeCameraOptions(t){if(!this.height)return;if(!t.position&&!t.orientation)return;this._updateCameraState();let n=!1;if(t.orientation&&!e.exactEquals(t.orientation,this._camera.orientation)&&(n=this._setCameraOrientation(t.orientation)),t.position){const i=[t.position.x,t.position.y,t.position.z];e.exactEquals$1(i,this._camera.position)||(this._setCameraPosition(i),n=!0)}n&&(this._updateStateFromCamera(),this.recenterOnTerrain())}getFreeCameraOptions(){this._updateCameraState();const t=this._camera.position,n=new bi;return n.position=new e.MercatorCoordinate(t[0],t[1],t[2]),n.orientation=this._camera.orientation,n._elevation=this.elevation,n._renderWorldCopies=this._renderWorldCopies,n}_setCameraOrientation(t){if(!e.length$1(t))return!1;e.normalize$1(t,t);const n=e.transformQuat([],[0,0,-1],t),i=e.transformQuat([],[0,-1,0],t);if(i[2]<0)return!1;const r=xi(n,i);return!!r&&(this._camera.orientation=r,!0)}_setCameraPosition(t){const n=this.zoomScale(this.minZoom)*this.tileSize,i=this.zoomScale(this.maxZoom)*this.tileSize,r=this.cameraToCenterDistance;t[2]=e.clamp(t[2],r/i,r/n),this._camera.position=t}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}get fovAboveCenter(){return this._fov*(.5+this.centerOffset.y/this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(t){const n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies){const i=this.pointCoordinate(new e.pointGeometry(0,0)),r=this.pointCoordinate(new e.pointGeometry(this.width,0)),o=this.pointCoordinate(new e.pointGeometry(this.width,this.height)),s=this.pointCoordinate(new e.pointGeometry(0,this.height)),a=Math.floor(Math.min(i.x,r.x,o.x,s.x)),l=Math.floor(Math.max(i.x,r.x,o.x,s.x)),c=1;for(let u=a-c;u<=l+c;u++)0!==u&&n.push(new e.UnwrappedTileID(u,t))}return n}coveringTiles(t){let n=this.coveringZoomLevel(t);const i=n,r=this.elevation&&!t.isTerrainDEM;if(void 0!==t.minzoom&&n<t.minzoom)return[];void 0!==t.maxzoom&&n>t.maxzoom&&(n=t.maxzoom);const o=e.MercatorCoordinate.fromLngLat(this.center),s=1<<n,a=[s*o.x,s*o.y,0],l=p.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),c=this.pointCoordinate(this.getCameraPoint()),u=s*e.mercatorZfromAltitude(1,this.center.lat),h=this._camera.position[2]/e.mercatorZfromAltitude(1,this.center.lat),d=[s*c.x,s*c.y,h],m=this.cameraToCenterDistance/t.tileSize*(t.roundZoom?1:.502),g=this.pitch<=60&&this._edgeInsets.top<=this._edgeInsets.bottom&&!this._elevation?n:0,y=t.isTerrainDEM&&this._elevation?1e4*this._elevation.exaggeration():this._centerAltitude,v=t.isTerrainDEM?-y:this._elevation?this._elevation.getMinElevationBelowMSL():0,_=e=>({aabb:new f([e*s,0,v],[(e+1)*s,s,y]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),x=[],b=[],w=n,T=t.reparseOverscaled?i:n,S=e=>{if(!this._elevation||!e.tileID)return;const t=this._elevation.getMinMaxForTile(e.tileID),n=e.aabb;t?(n.min[2]=t.min,n.max[2]=t.max,n.center[2]=(n.min[2]+n.max[2])/2):(e.shouldSplit=C(e),e.shouldSplit||(n.min[2]=n.max[2]=n.center[2]=this._centerAltitude))},E=e=>e*e,k=E((h-this._centerAltitude)*u),C=e=>{if(e.zoom<g)return!0;if(e.zoom===w)return!1;if(null!=e.shouldSplit)return e.shouldSplit;const t=e.aabb.distanceX(d),n=e.aabb.distanceY(d);let i=k;r&&(i=E(e.aabb.distanceZ(d)*u));const o=t*t+n*n+i;return o<E((1<<w-e.zoom)*m*((e,t)=>{if(t*E(.707)<e)return 1;const n=Math.sqrt(t/e);return n/(1.4144271570014144+(Math.pow(1.1,n-1.4144271570014144+1)-1)/(1.1-1)-1)})(Math.max(i,k),o))};if(this._renderWorldCopies)for(let e=1;e<=3;e++)x.push(_(-e)),x.push(_(e));for(x.push(_(0));x.length>0;){const i=x.pop(),o=i.x,s=i.y;let c=i.fullyVisible;if(!c){const e=i.aabb.intersects(l);if(0===e)continue;c=2===e}if(i.zoom!==w&&C(i))for(let t=0;t<4;t++){const n=(o<<1)+t%2,a=(s<<1)+(t>>1),l={aabb:i.aabb.quadrant(t),zoom:i.zoom+1,x:n,y:a,wrap:i.wrap,fullyVisible:c,tileID:void 0,shouldSplit:void 0};r&&(l.tileID=new e.OverscaledTileID(i.zoom+1===w?T:i.zoom+1,i.wrap,i.zoom+1,n,a),S(l)),x.push(l)}else{const r=i.zoom===w?T:i.zoom;if(t.minzoom&&t.minzoom>r)continue;const l=a[0]-(.5+o+(i.wrap<<i.zoom))*(1<<n-i.zoom),c=a[1]-.5-s,u=i.tileID?i.tileID:new e.OverscaledTileID(r,i.wrap,i.zoom,o,s);b.push({tileID:u,distanceSq:l*l+c*c})}}if(this.fogCullDistSq){const t=this.fogCullDistSq;b.splice(0,b.length,...b.filter(n=>{const i=[0,0,0,1],o=[e.EXTENT,e.EXTENT,0,1],s=this.calculateFogTileMatrix(n.tileID.toUnwrapped());e.transformMat4(i,i,s),e.transformMat4(o,o,s);const a=e.getAABBPointSquareDist(i,o);if(0===a)return!0;let l=!1;const c=this.horizonLineFromTop();if(a>t&&0!==c){const t=this.calculateProjMatrix(n.tileID.toUnwrapped());let i;r&&this._elevation&&(i=this._elevation.getMinMaxForTile(n.tileID)),i||(i={min:v,max:y});const o=e.furthestTileCorner(this.bearing),s=[o[0]*e.EXTENT,o[1]*e.EXTENT,i.max];e.transformMat4$1(s,s,t),l=(1-s[1])*this.height*.5<c}return a<t||l}))}return b.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(t){const n=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.pointGeometry(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(n)*this.worldSize)}unproject(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(t,n){const i=this.pointCoordinate(n),r=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),s=new e.MercatorCoordinate(o.x-(i.x-r.x),o.y-(i.y-r.y));this.center=this.coordinateLocation(s),this._renderWorldCopies&&(this.center=this.center.wrap())}setLocation(e){this.center=this.coordinateLocation(e),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this._coordinatePoint(this.locationCoordinate(e),!1)}locationPoint3D(e){return this._coordinatePoint(this.locationCoordinate(e),!0)}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}pointLocation3D(e){return this.coordinateLocation(this.pointCoordinate3D(e))}locationCoordinate(t){return e.MercatorCoordinate.fromLngLat(t)}coordinateLocation(e){return e.toLngLat()}pointRayIntersection(t,n){const i=null!=n?n:this._centerAltitude,r=[t.x,t.y,0,1],o=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(o,o,this.pixelMatrixInverse);const s=o[3];e.scale$2(r,r,1/r[3]),e.scale$2(o,o,1/s);const a=r[2],l=o[2];return{p0:r,p1:o,t:a===l?0:(i-a)/(l-a)}}screenPointToMercatorRay(t){const n=[t.x,t.y,0,1],i=[t.x,t.y,1,1];return e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse),e.scale$2(n,n,1/n[3]),e.scale$2(i,i,1/i[3]),n[2]=e.mercatorZfromAltitude(n[2],this._center.lat)*this.worldSize,i[2]=e.mercatorZfromAltitude(i[2],this._center.lat)*this.worldSize,e.scale$2(n,n,1/this.worldSize),e.scale$2(i,i,1/this.worldSize),new d([n[0],n[1],n[2]],e.normalize([],e.sub([],i,n)))}rayIntersectionCoordinate(t){const{p0:n,p1:i,t:r}=t,o=e.mercatorZfromAltitude(n[2],this._center.lat),s=e.mercatorZfromAltitude(i[2],this._center.lat);return new e.MercatorCoordinate(e.number(n[0],i[0],r)/this.worldSize,e.number(n[1],i[1],r)/this.worldSize,e.number(o,s,r))}pointCoordinate(t){const n=this.horizonLineFromTop(!1),i=new e.pointGeometry(t.x,Math.max(n,t.y));return this.rayIntersectionCoordinate(this.pointRayIntersection(i))}pointCoordinate3D(t){if(!this.elevation)return this.pointCoordinate(t);const n=this.elevation;let i=this.elevation.pointCoordinate(t);if(i)return new e.MercatorCoordinate(i[0],i[1],i[2]);let r=0,o=this.horizonLineFromTop();if(t.y>o)return this.pointCoordinate(t);const s=.02*o,a=t.clone();for(let l=0;l<10&&o-r>s;l++){a.y=e.number(r,o,.66);const t=n.pointCoordinate(a);t?(o=a.y,i=t):r=a.y}return i?new e.MercatorCoordinate(i[0],i[1],i[2]):this.pointCoordinate(t)}isPointAboveHorizon(e){if(this.elevation)return!this.elevation.pointCoordinate(e);{const t=this.horizonLineFromTop();return e.y<t}}_coordinatePoint(t,n){const i=n&&this.elevation?this.elevation.getAtPointOrZero(t,this._centerAltitude):this._centerAltitude,r=[t.x*this.worldSize,t.y*this.worldSize,i+t.toAltitude(),1];return e.transformMat4(r,r,this.pixelMatrix),r[3]>0?new e.pointGeometry(r[0]/r[3],r[1]/r[3]):new e.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE)}getBounds(){return this._terrainEnabled()?this._getBounds3D():(new e.LngLatBounds).extend(this.pointLocation(new e.pointGeometry(this._edgeInsets.left,this._edgeInsets.top))).extend(this.pointLocation(new e.pointGeometry(this.width-this._edgeInsets.right,this._edgeInsets.top))).extend(this.pointLocation(new e.pointGeometry(this.width-this._edgeInsets.right,this.height-this._edgeInsets.bottom))).extend(this.pointLocation(new e.pointGeometry(this._edgeInsets.left,this.height-this._edgeInsets.bottom)))}_getBounds3D(){const t=this.elevation,n=t.visibleDemTiles.reduce((e,t)=>{if(t.dem){const n=t.dem.tree;e.min=Math.min(e.min,n.minimums[0]),e.max=Math.max(e.max,n.maximums[0])}return e},{min:Number.MAX_VALUE,max:0});n.min*=t.exaggeration(),n.max*=t.exaggeration();const i=this.horizonLineFromTop();return[new e.pointGeometry(0,i),new e.pointGeometry(this.width,i),new e.pointGeometry(this.width,this.height),new e.pointGeometry(0,this.height)].reduce((e,t)=>e.extend(this.coordinateLocation(this.rayIntersectionCoordinate(this.pointRayIntersection(t,n.min)))).extend(this.coordinateLocation(this.rayIntersectionCoordinate(this.pointRayIntersection(t,n.max)))),new e.LngLatBounds)}horizonLineFromTop(e=!0){const t=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,n=this.height/2-.97*t;return e?Math.max(0,n):n}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n){const i=t.canonical,r=n/this.zoomScale(i.z),o=i.x+Math.pow(2,i.z)*t.wrap,s=e.identity(new Float64Array(16));return e.translate(s,s,[o*r,i.y*r,0]),e.scale$1(s,s,[r/e.EXTENT,r/e.EXTENT,1]),s}calculateFogTileMatrix(t){const n=t.key,i=this._fogTileMatrixCache;if(i[n])return i[n];const r=this.calculatePosMatrix(t,this.cameraWorldSize);return e.multiply(r,this.worldToFogMatrix,r),i[n]=new Float32Array(r),i[n]}calculateProjMatrix(t,n=!1){const i=t.key,r=n?this._alignedProjMatrixCache:this._projMatrixCache;if(r[i])return r[i];const o=this.calculatePosMatrix(t,this.worldSize);return e.multiply(o,n?this.alignedProjMatrix:this.projMatrix,o),r[i]=new Float32Array(o),r[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}recenterOnTerrain(){if(!this._elevation)return;const t=this._elevation;this._updateCameraState();const n=this._camera.position,i=this._camera.forward();if(n[2]<=0||i[2]>=0)return;const r=e.mercatorZfromAltitude(1,this._center.lat);n[2]/=r,i[2]/=r,e.normalize(i,i);const o=t.raycast(n,i,t.exaggeration());if(o){const t=e.scaleAndAdd([],n,i,o),r=new e.MercatorCoordinate(t[0],t[1],e.mercatorZfromAltitude(t[2],e.latFromMercatorY(t[1]))),s=this._camera.position,a=r.z+e.length([r.x-s[0],r.y-s[1],r.z-s[2]]);this._cameraZoom=this._zoomFromMercatorZ(a),this._centerAltitude=r.toAltitude(),this._center=r.toLngLat(),this._updateZoomFromElevation(),this._constrain(),this._calcMatrices()}}_constrainCameraAltitude(){if(!this._elevation)return;const t=this._elevation;this._updateCameraState();const n=t.getAtPointOrZero(this._camera.mercatorPosition),i=this._minimumHeightOverTerrain()*Math.cos(e.degToRad(this._maxPitch)),r=e.mercatorZfromAltitude(n,this._center.lat),o=this._camera.position[2]-r;if(o<i){const t=e.MercatorCoordinate.fromLngLat(this._center,this._centerAltitude),n=this._camera.mercatorPosition,r=[t.x-n.x,t.y-n.y,t.z-n.z],s=e.length(r);r[2]-=i-o;const a=e.length(r);if(0===a)return;e.scale(r,r,s/a),this._camera.position=[t.x-r[0],t.y-r[1],t.z-r[2]],this._camera.orientation=xi(r,this._camera.up()),this._updateStateFromCamera()}}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,i,r,o=-90,s=90,a=-180,l=180;const c=this.size,u=this._unmodified;if(this.latRange){const n=this.latRange;o=e.mercatorYfromLat(n[1])*this.worldSize,s=e.mercatorYfromLat(n[0])*this.worldSize,t=s-o<c.y?c.y/(s-o):0}if(this.lngRange){const t=this.lngRange;a=e.mercatorXfromLng(t[0])*this.worldSize,l=e.mercatorXfromLng(t[1])*this.worldSize,n=l-a<c.x?c.x/(l-a):0}const h=this.point,d=Math.max(n||0,t||0);if(d)return this.center=this.unproject(new e.pointGeometry(n?(l+a)/2:h.x,t?(s+o)/2:h.y)),this.zoom+=this.scaleZoom(d),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=h.y,t=c.y/2;e-t<o&&(r=o+t),e+t>s&&(r=s-t)}if(this.lngRange){const e=h.x,t=c.x/2;e-t<a&&(i=a+t),e+t>l&&(i=l-t)}void 0===i&&void 0===r||(this.center=this.unproject(new e.pointGeometry(void 0!==i?i:h.x,void 0!==r?r:h.y))),this._constrainCameraAltitude(),this._unmodified=u,this._constraining=!1}_minZoomForBounds(){const t=(e,t)=>Math.log2(e/(this.tileSize*Math.abs(t[1]-t[0])));let n=0;if(this.latRange){const i=this.latRange;n=t(this.height,[e.mercatorYfromLat(i[0]),e.mercatorYfromLat(i[1])])}let i=0;if(this.lngRange){const n=this.lngRange;i=t(this.width,[e.mercatorXfromLng(n[0]),e.mercatorXfromLng(n[1])])}return Math.max(n,i)}_maxCameraBoundsDistance(){return this._mercatorZfromZoom(this._minZoomForBounds())}_calcMatrices(){if(!this.height)return;const t=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const n=this.pixelsPerMeter;this._updateCameraState();const i=Math.PI/2+this._pitch,r=this.fovAboveCenter,o=this.elevation?this.elevation.getMinElevationBelowMSL()*n:0,s=(this._camera.position[2]*this.worldSize-o)/Math.cos(this._pitch),a=Math.sin(r)*s/Math.sin(e.clamp(Math.PI-i-r,.01,Math.PI-.01)),l=this.point,c=l.x,u=l.y,h=Math.cos(Math.PI/2-this._pitch)*a+s,d=Math.min(1.01*h,s*(1/this._horizonShift)),p=this.height/50,f=this._camera.getWorldToCamera(this.worldSize,n),m=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,p,d);m[8]=2*-t.x/this.width,m[9]=2*t.y/this.height;let g=e.mul$1([],m,f);this.mercatorMatrix=e.scale$1([],g,[this.worldSize,this.worldSize,this.worldSize/n]),this.projMatrix=g,this.invProjMatrix=e.invert(new Float64Array(16),this.projMatrix);const y=new Float32Array(16);e.identity(y),e.scale$1(y,y,[1,-1,1]),e.rotateX(y,y,this._pitch),e.rotateZ(y,y,this.angle);const v=e.perspective(new Float32Array(16),this._fov,this.width/this.height,p,d),_=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;v[8]=2*-t.x/this.width,v[9]=2*(t.y+_)/this.height,this.skyboxMatrix=e.multiply(y,v,y);const x=this.width%2/2,b=this.height%2/2,w=Math.cos(this.angle),T=Math.sin(this.angle),S=c-Math.round(c)+w*x+T*b,E=u-Math.round(u)+w*b+T*x,k=new Float64Array(g);if(e.translate(k,k,[S>.5?S-1:S,E>.5?E-1:E,0]),this.alignedProjMatrix=k,g=e.create$1(),e.scale$1(g,g,[this.width/2,-this.height/2,1]),e.translate(g,g,[1,-1,0]),this.labelPlaneMatrix=g,g=e.create$1(),e.scale$1(g,g,[1,-1,1]),e.translate(g,g,[-1,-1,0]),e.scale$1(g,g,[2/this.width,2/this.height,1]),this.glCoordMatrix=g,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),g=e.invert(new Float64Array(16),this.pixelMatrix),!g)throw new Error("failed to invert matrix");this.pixelMatrixInverse=g,this._projMatrixCache={},this._alignedProjMatrixCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const t=this.cameraWorldSize,n=this.cameraPixelsPerMeter,i=this._camera.position,r=1/this.height,o=[t,t,n];e.scale(o,o,r),e.scale(i,i,-1),e.multiply$1(i,i,o);const s=e.create$1();e.translate(s,s,i),e.scale$1(s,s,o),this.mercatorFogMatrix=s,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(t,n,r)}_updateCameraState(){if(!this.height)return;this._camera.setPitchBearing(this._pitch,this.angle);const t=this._camera.forward(),n=this.cameraToCenterDistance,i=this.point,r=this._mercatorZfromZoom(this._cameraZoom?this._cameraZoom:this._zoom)-e.mercatorZfromAltitude(this._centerAltitude,this.center.lat),o=this.cameraToCenterDistance/r;this._camera.position=[i.x/this.worldSize-t[0]*n/o,i.y/this.worldSize-t[1]*n/o,e.mercatorZfromAltitude(this._centerAltitude,this._center.lat)+-t[2]*n/o]}_translateCameraConstrained(t){const n=this._maxCameraBoundsDistance()*Math.cos(this._pitch),i=t[2];let r=1;i>0&&(r=Math.min((n-this._camera.position[2])/i,1)),this._camera.position=e.scaleAndAdd([],this._camera.position,t,r),this._updateStateFromCamera()}_updateStateFromCamera(){const t=this._camera.position,n=this._camera.forward(),{pitch:i,bearing:r}=this._camera.getPitchBearing(),o=e.mercatorZfromAltitude(this._centerAltitude,this.center.lat),s=this._mercatorZfromZoom(this._maxZoom)*Math.cos(e.degToRad(this._maxPitch)),a=Math.max((t[2]-o)/Math.cos(i),s),l=this._zoomFromMercatorZ(a);e.scaleAndAdd(t,t,n,a),this._pitch=e.clamp(i,e.degToRad(this.minPitch),e.degToRad(this.maxPitch)),this.angle=e.wrap(r,-Math.PI,Math.PI),this._setZoom(e.clamp(l,this._minZoom,this._maxZoom)),this._terrainEnabled()&&this._updateCameraOnTerrain(),this._center=new e.MercatorCoordinate(t[0],t[1],t[2]).toLngLat(),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(e){return Math.pow(2,e)*this.tileSize}_mercatorZfromZoom(e){return this.cameraToCenterDistance/this._worldSizeFromZoom(e)}_minimumHeightOverTerrain(){const e=Math.min((null!=this._cameraZoom?this._cameraZoom:this._zoom)+2,this._maxZoom);return this._mercatorZfromZoom(e)}_zoomFromMercatorZ(e){return this.scaleZoom(this.cameraToCenterDistance/(e*this.tileSize))}_terrainEnabled(){return!!this._elevation}isHorizonVisibleForPoints(t,n){const i=Math.min(t.x,n.x),r=Math.max(t.x,n.x),o=Math.min(t.y,n.y),s=Math.max(t.y,n.y),a=[new e.pointGeometry(i,o),new e.pointGeometry(r,s),new e.pointGeometry(i,s),new e.pointGeometry(r,o)],l=this._renderWorldCopies?-3:0,c=this._renderWorldCopies?4:1;for(const e of a){const t=this.pointRayIntersection(e);if(t.t<0)return!0;const n=this.rayIntersectionCoordinate(t);if(n.x<l||n.y<0||n.x>c||n.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+e.radToDeg(this.fovAboveCenter)>88||this.isHorizonVisibleForPoints(new e.pointGeometry(0,0),new e.pointGeometry(this.width,this.height))}zoomDeltaToMovement(t,n){const i=e.length(e.sub([],this._camera.position,t)),r=this._zoomFromMercatorZ(i)+n;return i-this._mercatorZfromZoom(r)}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.pointGeometry(0,t))}}class Si{constructor(t){this._hashName=t&&encodeURIComponent(t),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(e,t){let n=!1,i=null;const r=()=>{i=null,n&&(e(),i=setTimeout(r,300),n=!1)};return()=>(n=!0,i||r(),i)}(this._updateHashUnthrottled.bind(this))}addTo(t){return this._map=t,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(t){const n=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,r=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,r),s=Math.round(n.lng*o)/o,a=Math.round(n.lat*o)/o,l=this._map.getBearing(),c=this._map.getPitch();let u="";if(u+=t?`/${s}/${a}/${i}`:`${i}/${a}/${s}`,(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+="/"+Math.round(c)),this._hashName){const t=this._hashName;let n=!1;const i=e.window.location.hash.slice(1).split("&").map(e=>{const i=e.split("=")[0];return i===t?(n=!0,`${i}=${u}`):e}).filter(e=>e);return n||i.push(`${t}=${u}`),"#"+i.join("&")}return"#"+u}_getCurrentHash(){const t=e.window.location.hash.replace("#","");if(this._hashName){let e;return t.split("&").map(e=>e.split("=")).forEach(t=>{t[0]===this._hashName&&(e=t)}),(e&&e[1]||"").split("/")}return t.split("/")}_onHashChange(){const e=this._getCurrentHash();if(e.length>=3&&!e.some(e=>isNaN(e))){const t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());e.window.history.replaceState(e.window.history.state,null,t)}}const Ei={linearity:.3,easing:e.bezier(0,0,.3,1)},ki=e.extend({deceleration:2500,maxSpeed:1400},Ei),Ci=e.extend({deceleration:20,maxSpeed:1400},Ei),Ai=e.extend({deceleration:1e3,maxSpeed:360},Ei),Ii=e.extend({deceleration:1e3,maxSpeed:90},Ei);class Mi{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.exported.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=e.exported.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new e.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)n.zoom+=e.zoomDelta||0,n.bearing+=e.bearingDelta||0,n.pitch+=e.pitchDelta||0,e.panDelta&&n.pan._add(e.panDelta),e.around&&(n.around=e.around),e.pinchAround&&(n.pinchAround=e.pinchAround);const i=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,r={};if(n.pan.mag()){const o=Di(n.pan.mag(),i,e.extend({},ki,t||{}));r.offset=n.pan.mult(o.amount/n.pan.mag()),r.center=this._map.transform.center,Pi(r,o)}if(n.zoom){const e=Di(n.zoom,i,Ci);r.zoom=this._map.transform.zoom+e.amount,Pi(r,e)}if(n.bearing){const t=Di(n.bearing,i,Ai);r.bearing=this._map.transform.bearing+e.clamp(t.amount,-179,179),Pi(r,t)}if(n.pitch){const e=Di(n.pitch,i,Ii);r.pitch=this._map.transform.pitch+e.amount,Pi(r,e)}if(r.zoom||r.bearing){const e=void 0===n.pinchAround?n.around:n.pinchAround;r.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),e.extend(r,{noMoveStart:!0})}}function Pi(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function Di(t,n,i){const{maxSpeed:r,linearity:o,deceleration:s}=i,a=e.clamp(t*o/(n/1e3),-r,r),l=Math.abs(a)/(s*o);return{easing:i.easing,duration:1e3*l,amount:a*(l/2)}}class Li extends e.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,i,r={}){const s=o.mousePos(n.getCanvasContainer(),i),a=n.unproject(s);super(t,e.extend({point:s,lngLat:a,originalEvent:i},r)),this._defaultPrevented=!1,this.target=n}}class Oi extends e.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,i){const r="touchend"===t?i.changedTouches:i.touches,s=o.touchPos(n.getCanvasContainer(),r),a=s.map(e=>n.unproject(e)),l=s.reduce((e,t,n,i)=>e.add(t.div(i.length)),new e.pointGeometry(0,0));super(t,{points:s,point:l,lngLats:a,lngLat:n.unproject(l),originalEvent:i}),this._defaultPrevented=!1}}class zi extends e.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,n){super(e,{originalEvent:n}),this._defaultPrevented=!1}}class Ri{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new zi(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new Li(e.type,this._map,e))}mouseup(e){this._map.fire(new Li(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new Li(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Li(e.type,this._map,e))}mouseover(e){this._map.fire(new Li(e.type,this._map,e))}mouseout(e){this._map.fire(new Li(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Oi(e.type,this._map,e))}touchmove(e){this._map.fire(new Oi(e.type,this._map,e))}touchend(e){this._map.fire(new Oi(e.type,this._map,e))}touchcancel(e){this._map.fire(new Oi(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Fi{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Li(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Li("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new Li(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ni{constructor(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(o.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;const n=t;if(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)return;const i=this._startPos;this._lastPos=n,this._box||(this._box=o.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",e));const r=Math.min(i.x,n.x),s=Math.max(i.x,n.x),a=Math.min(i.y,n.y),l=Math.max(i.y,n.y);this._map._requestDomTask(()=>{this._box&&(o.setTransform(this._box,`translate(${r}px,${a}px)`),this._box.style.width=s-r+"px",this._box.style.height=l-a+"px")})}mouseupWindow(t,n){if(!this._active)return;if(0!==t.button)return;const i=this._startPos,r=n;if(this.reset(),o.suppressClick(),i.x!==r.x||i.y!==r.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:t})),{cameraAnimation:e=>e.fitScreenCoordinates(i,r,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",t)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new e.Event(t,{originalEvent:n}))}}function Bi(e,t){const n={};for(let i=0;i<e.length;i++)n[e[i].identifier]=t[i];return n}class ji{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(t,n,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),i.length===this.numTouches&&(this.centroid=function(t){const n=new e.pointGeometry(0,0);for(const e of t)n._add(e);return n.div(t.length)}(n),this.touches=Bi(i,n)))}touchmove(e,t,n){if(this.aborted||!this.centroid)return;const i=Bi(n,t);for(const r in this.touches){const e=this.touches[r],t=i[r];(!t||t.dist(e)>30)&&(this.aborted=!0)}}touchend(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class Vi{constructor(e){this.singleTap=new ji(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,n){this.singleTap.touchstart(e,t,n)}touchmove(e,t,n){this.singleTap.touchmove(e,t,n)}touchend(e,t,n){const i=this.singleTap.touchend(e,t,n);if(i){const t=e.timeStamp-this.lastTime<500,n=!this.lastTap||this.lastTap.dist(i)<30;if(t&&n||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}}class $i{constructor(){this._zoomIn=new Vi({numTouches:1,numTaps:2}),this._zoomOut=new Vi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,n){this._zoomIn.touchstart(e,t,n),this._zoomOut.touchstart(e,t,n)}touchmove(e,t,n){this._zoomIn.touchmove(e,t,n),this._zoomOut.touchmove(e,t,n)}touchend(e,t,n){const i=this._zoomIn.touchend(e,t,n),r=this._zoomOut.touchend(e,t,n);return i?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}):r?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(r)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const Ui={0:1,2:2};class qi{constructor(e){this.reset(),this._clickTolerance=e.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(e,t){return!1}_move(e,t){return{}}mousedown(e,t){if(this._lastPoint)return;const n=o.mouseButton(e);this._correctButton(e,n)&&(this._lastPoint=t,this._eventButton=n)}mousemoveWindow(e,t){const n=this._lastPoint;if(n)if(e.preventDefault(),function(e,t){const n=Ui[t];return void 0===e.buttons||(e.buttons&n)!==n}(e,this._eventButton))this.reset();else if(this._moved||!(t.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=t,this._move(n,t)}mouseupWindow(e){this._lastPoint&&o.mouseButton(e)===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Gi extends qi{mousedown(e,t){super.mousedown(e,t),this._lastPoint&&(this._active=!0)}_correctButton(e,t){return 0===t&&!e.ctrlKey}_move(e,t){return{around:t,panDelta:t.sub(e)}}}class Hi extends qi{_correctButton(e,t){return 0===t&&e.ctrlKey||2===t}_move(e,t){const n=.8*(t.x-e.x);if(n)return this._active=!0,{bearingDelta:n}}contextmenu(e){e.preventDefault()}}class Wi extends qi{_correctButton(e,t){return 0===t&&e.ctrlKey||2===t}_move(e,t){const n=-.5*(t.y-e.y);if(n)return this._active=!0,{pitchDelta:n}}contextmenu(e){e.preventDefault()}}class Zi{constructor(e){this._minTouches=1,this._clickTolerance=e.clickTolerance||1,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.pointGeometry(0,0)}touchstart(e,t,n){return this._calculateTransform(e,t,n)}touchmove(e,t,n){if(this._active&&!(n.length<this._minTouches))return e.preventDefault(),this._calculateTransform(e,t,n)}touchend(e,t,n){this._calculateTransform(e,t,n),this._active&&n.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,n,i){i.length>0&&(this._active=!0);const r=Bi(i,n),o=new e.pointGeometry(0,0),s=new e.pointGeometry(0,0);let a=0;for(const e in r){const t=r[e],n=this._touches[e];n&&(o._add(t),s._add(t.sub(n)),a++,r[e]=t)}if(this._touches=r,a<this._minTouches||!s.mag())return;const l=s.div(a);return this._sum._add(l),this._sum.mag()<this._clickTolerance?void 0:{around:o.div(a),panDelta:l}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Xi{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(e){}_move(e,t,n){return{}}touchstart(e,t,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,n){if(!this._firstTwoTouches)return;e.preventDefault();const[i,r]=this._firstTwoTouches,o=Yi(n,t,i),s=Yi(n,t,r);if(!o||!s)return;const a=this._aroundCenter?null:o.add(s).div(2);return this._move([o,s],a,e)}touchend(e,t,n){if(!this._firstTwoTouches)return;const[i,r]=this._firstTwoTouches,s=Yi(n,t,i),a=Yi(n,t,r);s&&a||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Yi(e,t,n){for(let i=0;i<e.length;i++)if(e[i].identifier===n)return t[i]}function Qi(e,t){return Math.log(e/t)/Math.LN2}class Ki extends Xi{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){const n=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Qi(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Qi(this._distance,n),pinchAround:t}}}function Ji(e,t){return 180*e.angleWith(t)/Math.PI}class er extends Xi{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t){const n=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ji(this._vector,n),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const t=25/(Math.PI*this._minDiameter)*360,n=Ji(e,this._startVector);return Math.abs(n)<t}}function tr(e){return Math.abs(e.y)>Math.abs(e.x)}class nr extends Xi{reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}_start(e){this._lastPoints=e,tr(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,n){const i=e[0].sub(this._lastPoints[0]),r=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,r,n.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(i.y+r.y)/2*-.5}}gestureBeginsVertically(e,t,n){if(void 0!==this._valid)return this._valid;const i=e.mag()>=2,r=t.mag()>=2;if(!i&&!r)return;if(!i||!r)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;const o=e.y>0==t.y>0;return tr(e)&&tr(t)&&o}}const ir={panStep:100,bearingStep:15,pitchStep:10};class rr{constructor(){const e=ir;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,n=0,i=0,r=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),r=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),r=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,i=0),{cameraAnimation:s=>{const a=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:or,zoom:t?Math.round(a)+t*(e.shiftKey?2:1):a,bearing:s.getBearing()+n*this._bearingStep,pitch:s.getPitch()+i*this._pitchStep,offset:[-r*this._panStep,-o*this._panStep],center:s.getCenter()},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function or(e){return e*(2-e)}const sr=4.000244140625;class ar{constructor(t,n){this._map=t,this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,e.bindAll(["_onTimeout"],this)}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;let n=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const i=e.exported.now(),r=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==n&&n%sr==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":r>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(r*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_onTimeout(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const t=o.mousePos(this._el,e);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:t,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._map.transform,n=()=>t._terrainEnabled()?t.computeZoomRelativeTo(this._aroundCoord):t.zoom;if(0!==this._delta){const e="wheel"===this._type&&Math.abs(this._delta)>sr?this._wheelZoomRate:this._defaultZoomRate;let i=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==i&&(i=1/i);const r=n(),o=Math.pow(2,r),s="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):o;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(s*i))),"wheel"===this._type&&(this._startZoom=n(),this._easing=this._smoothOutEasing(200)),this._delta=0}const i="number"==typeof this._targetZoom?this._targetZoom:n(),r=this._startZoom,o=this._easing;let s,a=!1;if("wheel"===this._type&&r&&o){const t=Math.min((e.exported.now()-this._lastWheelEventTime)/200,1),n=o(t);s=e.number(r,i,n),t<1?this._frameId||(this._frameId=!0):a=!0}else s=i,a=!0;return this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!a,zoomDelta:s-n(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=e.ease;if(this._prevEase){const t=this._prevEase,i=(e.exported.now()-t.start)/t.duration,r=t.easing(i+.01)-t.easing(i),o=.27/Math.sqrt(r*r+1e-4)*.01,s=Math.sqrt(.0729-o*o);n=e.bezier(o,s,.25,1)}return this._prevEase={start:e.exported.now(),duration:t,easing:n},n}reset(){this._active=!1}}class lr{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cr{constructor(){this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:n=>{n.easeTo({duration:300,zoom:n.getZoom()+(e.shiftKey?-1:1),around:n.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ur{constructor(){this._tap=new Vi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(e,t,n){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=t[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(e,t,n))}touchmove(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;const i=t[0],r=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:r/128}}}else this._tap.touchmove(e,t,n)}touchend(e,t,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(e,t,n)&&(this._tapTime=e.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hr{constructor(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class dr{constructor(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class pr{constructor(e,t,n,i){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const fr=e=>e.zoom||e.drag||e.pitch||e.rotate;class mr extends e.Event{}class gr{constructor(){this.constants=[1,1,.01],this.radius=0}setup(t,n){const i=e.sub([],n,t);this.radius=e.length(i[2]<0?e.div([],i,this.constants):[i[0],i[1],0])}projectRay(t){e.div(t,t,this.constants),e.normalize(t,t),e.mul$2(t,t,this.constants);const n=e.scale([],t,this.radius);if(n[2]>0){const t=e.scale([],[0,0,1],e.dot(n,[0,0,1])),i=e.scale([],e.normalize([],[n[0],n[1],0]),this.radius),r=e.add([],n,e.scale([],e.sub([],e.add([],i,t),n),2));n[0]=r[0],n[1]=r[1]}return n}}function yr(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class vr{constructor(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Mi(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new gr,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(n),e.bindAll(["handleEvent","handleWindowEvent"],this);const 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],[e.window.document,"mousemove",{capture:!0}],[e.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],[e.window,"blur",void 0]];for(const[r,s,a]of this._listeners)o.addEventListener(r,s,r===e.window.document?this.handleWindowEvent:this.handleEvent,a)}destroy(){for(const[t,n,i]of this._listeners)o.removeEventListener(t,n,t===e.window.document?this.handleWindowEvent:this.handleEvent,i)}_addDefaultHandlers(e){const t=this._map,n=t.getCanvasContainer();this._add("mapEvent",new Ri(t,e));const i=t.boxZoom=new Ni(t,e);this._add("boxZoom",i);const r=new $i,o=new cr;t.doubleClickZoom=new lr(o,r),this._add("tapZoom",r),this._add("clickZoom",o);const s=new ur;this._add("tapDragZoom",s);const a=t.touchPitch=new nr;this._add("touchPitch",a);const l=new Hi(e),c=new Wi(e);t.dragRotate=new dr(e,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new Gi(e),h=new Zi(e);t.dragPan=new hr(n,u,h),this._add("mousePan",u),this._add("touchPan",h,["touchZoom","touchRotate"]);const d=new er,p=new Ki;t.touchZoomRotate=new pr(n,p,d,s),this._add("touchRotate",d,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]),this._add("blockableMapEvent",new Fi(t));const f=t.scrollZoom=new ar(t,this);this._add("scrollZoom",f,["mousePan"]);const m=t.keyboard=new rr;this._add("keyboard",m);for(const g of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])e.interactive&&e[g]&&t[g].enable(e[g])}_add(e,t,n){this._handlers.push({handlerName:e,handler:t,allowed:n}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(fr(this._eventsInProgress))||this.isZooming()}_blockedByActive(e,t,n){for(const i in e)if(i!==n&&(!t||t.indexOf(i)<0))return!0;return!1}handleWindowEvent(e){this.handleEvent(e,e.type+"Window")}_getMapTouches(e){const t=[];for(const n of e)this._el.contains(n.target)&&t.push(n);return t}handleEvent(e,t){if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;const n="renderFrame"===e.type,i=n?void 0:e,r={needsRenderFrame:!1},s={},a={},l=e.touches?this._getMapTouches(e.touches):void 0,c=l?o.touchPos(this._el,l):n?void 0:o.mousePos(this._el,e);for(const{handlerName:o,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let n;this._blockedByActive(a,p,o)?d.reset():d[t||e.type]&&(n=d[t||e.type](e,c,l),this.mergeHandlerResult(r,s,n,o,i),n&&n.needsRenderFrame&&this._triggerRenderFrame()),(n||d.isActive())&&(a[o]=d)}const u={};for(const o in this._previousActiveHandlers)a[o]||(u[o]=i);this._previousActiveHandlers=a,(Object.keys(u).length||yr(r))&&(this._changes.push([r,s,u]),this._triggerRenderFrame()),(Object.keys(a).length||yr(r))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:h}=r;h&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],h(this._map))}mergeHandlerResult(t,n,i,r,o){if(!i)return;e.extend(t,i);const s={handlerName:r,originalEvent:i.originalEvent||o};void 0!==i.zoomDelta&&(n.zoom=s),void 0!==i.panDelta&&(n.drag=s),void 0!==i.pitchDelta&&(n.pitch=s),void 0!==i.bearingDelta&&(n.rotate=s)}_applyChanges(){const t={},n={},i={};for(const[r,o,s]of this._changes)r.panDelta&&(t.panDelta=(t.panDelta||new e.pointGeometry(0,0))._add(r.panDelta)),r.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+r.zoomDelta),r.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+r.bearingDelta),r.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+r.pitchDelta),void 0!==r.around&&(t.around=r.around),void 0!==r.aroundCoord&&(t.aroundCoord=r.aroundCoord),void 0!==r.pinchAround&&(t.pinchAround=r.pinchAround),r.noInertia&&(t.noInertia=r.noInertia),e.extend(n,o),e.extend(i,s);this._updateMapTransform(t,n,i),this._changes=[]}_updateMapTransform(t,n,i){const r=this._map,o=r.transform,s=e=>[e.x,e.y,e.z];if((e=>{const t=this._eventsInProgress.drag;return t&&!this._handlersById[t.handlerName].isActive()})()&&!yr(t)){const e=o.zoom;o.cameraElevationReference="sea",o.recenterOnTerrain(),o.cameraElevationReference="ground",e!==o.zoom&&this._map._update(!0)}if(!yr(t))return this._fireEvents(n,i,!0);let{panDelta:a,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:h,aroundCoord:d,pinchAround:p}=t;void 0!==p&&(h=p),(e=>n.drag&&!this._eventsInProgress.drag)()&&h&&(this._dragOrigin=s(o.pointCoordinate3D(h)),this._trackingEllipsoid.setup(o._camera.position,this._dragOrigin)),o.cameraElevationReference="sea",r._stop(!0),h=h||r.transform.centerPoint,c&&(o.bearing+=c),u&&(o.pitch+=u),o._updateCameraState();const f=[0,0,0];if(a){const e=o.screenPointToMercatorRay(h),t=o.screenPointToMercatorRay(h.sub(a)),n=this._trackingEllipsoid.projectRay(e.dir),i=this._trackingEllipsoid.projectRay(t.dir);f[0]=i[0]-n[0],f[1]=i[1]-n[1]}const m=o.zoom,g=[0,0,0];if(l){const t=s(d||o.pointCoordinate3D(h)),n={dir:e.normalize([],e.sub([],t,o._camera.position))},i=o.screenPointToMercatorRay(o.centerPoint);if(n.dir[2]<0){const r=e.altitudeFromMercatorZ(t[2],t[1]),a=o.rayIntersectionCoordinate(o.pointRayIntersection(o.centerPoint,r)),c=o.zoomDeltaToMovement(s(a),l)*(i.dir[2]/n.dir[2]);e.scale(g,n.dir,c)}else if(o._terrainEnabled()){const i=o.zoomDeltaToMovement(t,l);e.scale(g,n.dir,i)}}const y=e.add(f,f,g);o._translateCameraConstrained(y),l&&Math.abs(o.zoom-m)>1e-4&&o.recenterOnTerrain(),o.cameraElevationReference="ground",this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,i,!0)}_fireEvents(t,n,i){const r=fr(this._eventsInProgress),o=fr(t),s={};for(const e in t){const{originalEvent:n}=t[e];this._eventsInProgress[e]||(s[e+"start"]=n),this._eventsInProgress[e]=t[e]}!r&&o&&this._fireEvent("movestart",o.originalEvent);for(const e in s)this._fireEvent(e,s[e]);o&&this._fireEvent("move",o.originalEvent);for(const e in t){const{originalEvent:n}=t[e];this._fireEvent(e,n)}const a={};let l;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:i}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=n[t]||i,a[e+"end"]=l)}for(const e in a)this._fireEvent(e,a[e]);const c=fr(this._eventsInProgress);if(i&&(r||o)&&!c){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),n=e=>0!==e&&-this._bearingSnap<e&&e<this._bearingSnap;t?(n(t.bearing||this._map.getBearing())&&(t.bearing=0),this._map.easeTo(t,{originalEvent:l})):(this._map.fire(new e.Event("moveend",{originalEvent:l})),n(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(t,n){this._map.fire(new e.Event(t,n?{originalEvent:n}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new mr("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class _r extends e.Evented{constructor(t,n){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}getCenter(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(t,n,i){return t=e.pointGeometry.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},n),i)}panTo(t,n,i){return this.easeTo(e.extend({center:t},n),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(t,n,i){return this.easeTo(e.extend({zoom:t},n),i)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(t,n,i){return this.easeTo(e.extend({bearing:t},n),i)}resetNorth(t,n){return this.rotateTo(0,e.extend({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}cameraForBounds(t,n){t=e.LngLatBounds.convert(t);const i=n&&n.bearing||0;return this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),i,n)}_extendCameraOptions(t){const n={top:0,bottom:0,right:0,left:0};if("number"==typeof(t=e.extend({padding:n,offset:[0,0],maxZoom:this.transform.maxZoom},t)).padding){const e=t.padding;t.padding={top:e,bottom:e,right:e,left:e}}return t.padding=e.extend(n,t.padding),t}_cameraForBoxAndBearing(t,n,i,r){const o=this._extendCameraOptions(r),s=this.transform,a=s.padding,l=s.project(e.LngLat.convert(t)),c=s.project(e.LngLat.convert(n)),u=l.rotate(-e.degToRad(i)),h=c.rotate(-e.degToRad(i)),d=new e.pointGeometry(Math.max(u.x,h.x),Math.max(u.y,h.y)),p=new e.pointGeometry(Math.min(u.x,h.x),Math.min(u.y,h.y)),f=d.sub(p),m=(s.width-(a.left+a.right+o.padding.left+o.padding.right))/f.x,g=(s.height-(a.top+a.bottom+o.padding.top+o.padding.bottom))/f.y;if(g<0||m<0)return void e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const y=Math.min(s.scaleZoom(s.scale*Math.min(m,g)),o.maxZoom),v="number"==typeof o.offset.x?new e.pointGeometry(o.offset.x,o.offset.y):e.pointGeometry.convert(o.offset),_=new e.pointGeometry((o.padding.left-o.padding.right)/2,(o.padding.top-o.padding.bottom)/2).rotate(i*Math.PI/180),x=v.add(_).mult(s.scale/s.zoomScale(y));return{center:s.unproject(l.add(c).div(2).sub(x)),zoom:y,bearing:i}}_cameraForBox(t,n,i,r,o){const s=this._extendCameraOptions(o);i=i||0,r=r||0,t=e.LngLat.convert(t),n=e.LngLat.convert(n);const a=this.transform.clone();a.padding=s.padding;const l=this.getFreeCameraOptions(),c=new e.LngLat(.5*(t.lng+n.lng),.5*(t.lat+n.lat)),u=.5*(i+r);if(a._camera.position[2]<e.mercatorZfromAltitude(u,c.lat))return void e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");l.lookAtPoint(c),a.setFreeCameraOptions(l);const h=e.MercatorCoordinate.fromLngLat(t),d=e.MercatorCoordinate.fromLngLat(n),m=a.pointRayIntersection(a.centerPoint,u),g=[(y=a.rayIntersectionCoordinate(m)).x,y.y,y.z];var y;const v=a.screenPointToMercatorRay(a.centerPoint);let _,x=0;do{const n=Math.floor(a.zoom),o=1<<n,s=Math.min(o*h.x,o*d.x),l=Math.min(o*h.y,o*d.y),c=Math.max(o*h.x,o*d.x),u=Math.max(o*h.y,o*d.y),m=new f([s,l,i],[c,u,r]),y=p.fromInvProjectionMatrix(a.invProjMatrix,a.worldSize,n);if(2!==m.intersects(y)){_&&(a._camera.position=e.scaleAndAdd([],a._camera.position,v.dir,-_),a._updateStateFromCamera());break}const x=e.sub([],a._camera.position,g);_=.5*e.length(x),a._camera.position=e.scaleAndAdd([],a._camera.position,v.dir,_);try{a._updateStateFromCamera()}catch(t){return void e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}}while(++x<10);return{center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch}}fitBounds(e,t,n){return this._fitInternal(this.cameraForBounds(e,t),t,n)}_raycastElevationBox(t,n){const i=this.transform.elevation;if(!i)return;const r=new e.pointGeometry(t.x,n.y),o=new e.pointGeometry(n.x,t.y),s=i.pointCoordinate(t);if(!s)return;const a=i.pointCoordinate(n);if(!a)return;const l=i.pointCoordinate(r);if(!l)return;const c=i.pointCoordinate(o);if(!c)return;const u=new e.MercatorCoordinate(s[0],s[1]).toLngLat(),h=new e.MercatorCoordinate(a[0],a[1]).toLngLat(),d=new e.MercatorCoordinate(l[0],l[1]).toLngLat(),p=new e.MercatorCoordinate(c[0],c[1]).toLngLat(),f=Math.min(u.lng,Math.min(h.lng,Math.min(d.lng,p.lng))),m=Math.min(u.lat,Math.min(h.lat,Math.min(d.lat,p.lat))),g=Math.max(u.lng,Math.max(h.lng,Math.max(d.lng,p.lng))),y=Math.max(u.lat,Math.max(h.lat,Math.max(d.lat,p.lat))),v=Math.min(s[3],Math.min(a[3],Math.min(l[3],c[3]))),_=Math.max(s[3],Math.max(a[3],Math.max(l[3],c[3])));return{minLngLat:new e.LngLat(f,m),maxLngLat:new e.LngLat(g,y),minAltitude:v,maxAltitude:_}}fitScreenCoordinates(t,n,i,r,o){let s,a,l,c;const u=e.pointGeometry.convert(t),h=e.pointGeometry.convert(n),d=this._raycastElevationBox(u,h);if(d)s=d.minLngLat,a=d.maxLngLat,l=d.minAltitude,c=d.maxAltitude;else{if(this.transform.isHorizonVisibleForPoints(u,h))return this;s=this.transform.pointLocation(u),a=this.transform.pointLocation(h)}return this._fitInternal(0===this.transform.pitch?this._cameraForBoxAndBearing(this.transform.pointLocation(e.pointGeometry.convert(t)),this.transform.pointLocation(e.pointGeometry.convert(n)),i,r):this._cameraForBox(s,a,l,c,r),r,o)}_fitInternal(t,n,i){return t?(delete(n=e.extend(t,n)).padding,n.linear?this.easeTo(n,i):this.flyTo(n,i)):this}jumpTo(t,n){this.stop();const i=this.transform;let r=!1,o=!1,s=!1;return"zoom"in t&&i.zoom!==+t.zoom&&(r=!0,i.zoom=+t.zoom),void 0!==t.center&&(i.center=e.LngLat.convert(t.center)),"bearing"in t&&i.bearing!==+t.bearing&&(o=!0,i.bearing=+t.bearing),"pitch"in t&&i.pitch!==+t.pitch&&(s=!0,i.pitch=+t.pitch),null==t.padding||i.isPaddingEqual(t.padding)||(i.padding=t.padding),this.fire(new e.Event("movestart",n)).fire(new e.Event("move",n)),r&&this.fire(new e.Event("zoomstart",n)).fire(new e.Event("zoom",n)).fire(new e.Event("zoomend",n)),o&&this.fire(new e.Event("rotatestart",n)).fire(new e.Event("rotate",n)).fire(new e.Event("rotateend",n)),s&&this.fire(new e.Event("pitchstart",n)).fire(new e.Event("pitch",n)).fire(new e.Event("pitchend",n)),this.fire(new e.Event("moveend",n))}getFreeCameraOptions(){return this.transform.getFreeCameraOptions()}setFreeCameraOptions(t,n){this.stop();const i=this.transform,r=i.zoom,o=i.pitch,s=i.bearing;i.setFreeCameraOptions(t);const a=r!==i.zoom,l=o!==i.pitch,c=s!==i.bearing;return this.fire(new e.Event("movestart",n)).fire(new e.Event("move",n)),a&&this.fire(new e.Event("zoomstart",n)).fire(new e.Event("zoom",n)).fire(new e.Event("zoomend",n)),c&&this.fire(new e.Event("rotatestart",n)).fire(new e.Event("rotate",n)).fire(new e.Event("rotateend",n)),l&&this.fire(new e.Event("pitchstart",n)).fire(new e.Event("pitch",n)).fire(new e.Event("pitchend",n)),this.fire(new e.Event("moveend",n)),this}easeTo(t,n){this._stop(!1,t.easeId),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||!t.essential&&e.exported.prefersReducedMotion)&&(t.duration=0);const i=this.transform,r=this.getZoom(),o=this.getBearing(),s=this.getPitch(),a=this.getPadding(),l="zoom"in t?+t.zoom:r,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,u="pitch"in t?+t.pitch:s,h="padding"in t?t.padding:i.padding,d=e.pointGeometry.convert(t.offset);let p=i.centerPoint.add(d);const f=i.pointLocation(p),m=e.LngLat.convert(t.center||f);this._normalizeCenter(m);const g=i.project(f),y=i.project(m).sub(g),v=i.zoomScale(l-r);let _,x;t.around&&(_=e.LngLat.convert(t.around),x=i.locationPoint(_));const b={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||l!==r,this._rotating=this._rotating||o!==c,this._pitching=this._pitching||u!==s,this._padding=!i.isPaddingEqual(h),this._easeId=t.easeId,this._prepareEase(n,t.noMoveStart,b),this._ease(t=>{if(this._zooming&&(i.zoom=e.number(r,l,t)),this._rotating&&(i.bearing=e.number(o,c,t)),this._pitching&&(i.pitch=e.number(s,u,t)),this._padding&&(i.interpolatePadding(a,h,t),p=i.centerPoint.add(d)),_)i.setLocationAtPoint(_,x);else{const e=i.zoomScale(i.zoom-r),n=l>r?Math.min(2,v):Math.max(.5,v),o=Math.pow(n,1-t),s=i.unproject(g.add(y.mult(t*o)).mult(e));i.setLocationAtPoint(i.renderWorldCopies?s.wrap():s,p)}this._fireMoveEvents(n)},e=>{i.recenterOnTerrain(),this._afterEase(n,e)},t),this}_prepareEase(t,n,i={}){this._moving=!0,this.transform.cameraElevationReference="sea",n||i.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!i.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!i.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!i.pitching&&this.fire(new e.Event("pitchstart",t))}_fireMoveEvents(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId,this.transform.cameraElevationReference="ground";const i=this._zooming,r=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new e.Event("zoomend",t)),r&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}flyTo(t,n){if(!t.essential&&e.exported.prefersReducedMotion){const i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);const i=this.transform,r=this.getZoom(),o=this.getBearing(),s=this.getPitch(),a=this.getPadding(),l="zoom"in t?e.clamp(+t.zoom,i.minZoom,i.maxZoom):r,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,u="pitch"in t?+t.pitch:s,h="padding"in t?t.padding:i.padding,d=i.zoomScale(l-r),p=e.pointGeometry.convert(t.offset);let f=i.centerPoint.add(p);const m=i.pointLocation(f),g=e.LngLat.convert(t.center||m);this._normalizeCenter(g);const y=i.project(m),v=i.project(g).sub(y);let _=t.curve;const x=Math.max(i.width,i.height),b=x/d,w=v.mag();if("minZoom"in t){const n=e.clamp(Math.min(t.minZoom,r,l),i.minZoom,i.maxZoom),o=x/i.zoomScale(n-r);_=Math.sqrt(o/w*2)}const T=_*_;function S(e){const t=(b*b-x*x+(e?-1:1)*T*T*w*w)/(2*(e?b:x)*T*w);return Math.log(Math.sqrt(t*t+1)-t)}function E(e){return(Math.exp(e)-Math.exp(-e))/2}function k(e){return(Math.exp(e)+Math.exp(-e))/2}const C=S(0);let A=function(e){return k(C)/k(C+_*e)},I=function(e){return x*((k(C)*(E(t=C+_*e)/k(t))-E(C))/T)/w;var t},M=(S(1)-C)/_;if(Math.abs(w)<1e-6||!isFinite(M)){if(Math.abs(x-b)<1e-6)return this.easeTo(t,n);const e=b<x?-1:1;M=Math.abs(Math.log(b/x))/_,I=function(){return 0},A=function(t){return Math.exp(e*_*t)}}return t.duration="duration"in t?+t.duration:1e3*M/("screenSpeed"in t?+t.screenSpeed/_:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._padding=!i.isPaddingEqual(h),this._prepareEase(n,!1),this._ease(t=>{const d=t*M,m=1/A(d);i.zoom=1===t?l:r+i.scaleZoom(m),this._rotating&&(i.bearing=e.number(o,c,t)),this._pitching&&(i.pitch=e.number(s,u,t)),this._padding&&(i.interpolatePadding(a,h,t),f=i.centerPoint.add(p));const _=1===t?g:i.unproject(y.add(v.mult(I(d))).mult(m));i.setLocationAtPoint(i.renderWorldCopies?_.wrap():_,f),i._updateCenterElevation(),this._fireMoveEvents(n)},()=>this._afterEase(n),t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}if(!e){const e=this.handlers;e&&e.stop(!1)}return this}_ease(t,n,i){!1===i.animate||0===i.duration?(t(1),n()):(this._easeStart=e.exported.now(),this._easeOptions=i,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((e.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,n){t=e.wrap(t,-180,180);const i=Math.abs(t-n);return Math.abs(t-360-n)<i&&(t-=360),Math.abs(t+360-n)<i&&(t+=360),t}_normalizeCenter(e){const t=this.transform;if(!t.renderWorldCopies||t.lngRange)return;const n=e.lng-t.center.lng;e.lng+=n>180?-360:n<-180?360:0}}class xr{constructor(t={}){this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(e){const t=this.options&&this.options.compact;return this._map=e,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&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===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){o.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}_setElementTitle(e,t){const n=this._map._getUIString("AttributionControl."+t);e.title=n,e.setAttribute("aria-label",n)}_toggleAttribution(){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"))}_updateEditLink(){let t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));const n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){const i=n.reduce((e,t,i)=>(t.value&&(e+=`${t.key}=${t.value}${i<n.length-1?"&":""}`),e),"?");t.href=`${e.config.FEEDBACK_URL}/${i}${this._map._hash?this._map._hash.getHashString(!0):""}`,t.rel="noopener nofollow",this._setElementTitle(t,"MapFeedback")}}_updateData(e){!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType||(this._updateAttributions(),this._updateEditLink())}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}const t=this._map.style._sourceCaches;for(const i in t){const n=t[i];if(n.used){const t=n.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution)}}e.sort((e,t)=>e.length-t.length),e=e.filter((t,n)=>{for(let i=n+1;i<e.length;i++)if(e[i].indexOf(t)>=0)return!1;return!0});const n=e.join(" | ");n!==this._attribHTML&&(this._attribHTML=n,e.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class br{constructor(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)}onAdd(e){this._map=e,this._container=o.create("div","mapboxgl-ctrl");const t=o.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const e=this._map.style._sourceCaches;if(0===Object.entries(e).length)return!0;for(const t in e){const n=e[t].getSource();if(n.hasOwnProperty("mapbox_logo")&&!n.mapbox_logo)return!1}return!0}_updateCompact(){const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}}}class wr{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,n=t?this._queue.concat(t):this._queue;for(const i of n)if(i.id===e)return void(i.cancelled=!0)}run(e=0){const t=this._currentlyRunning=this._queue;this._queue=[];for(const n of t)if(!n.cancelled&&(n.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function Tr(t,n,i){if(t=new e.LngLat(t.lng,t.lat),n){const r=new e.LngLat(t.lng-360,t.lat),o=new e.LngLat(t.lng+360,t.lat),s=360*Math.ceil(Math.abs(t.lng-i.center.lng)/360),a=i.locationPoint(t).distSqr(n),l=n.x<0||n.y<0||n.x>i.width||n.y>i.height;i.locationPoint(r).distSqr(n)<a&&(l||Math.abs(r.lng-i.center.lng)<s)?t=r:i.locationPoint(o).distSqr(n)<a&&(l||Math.abs(o.lng-i.center.lng)<s)&&(t=o)}for(;Math.abs(t.lng-i.center.lng)>180;){const e=i.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=i.width&&e.y<=i.height)break;t.lng>i.center.lng?t.lng-=360:t.lng+=360}return t}const Sr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Er(e,t,n){const i=e.classList;for(const r in Sr)i.remove(`mapboxgl-${n}-anchor-${r}`);i.add(`mapboxgl-${n}-anchor-${t}`)}class kr extends e.Evented{constructor(t,n){if(super(),(t instanceof e.window.HTMLElement||n)&&(t=e.extend({element:t},n)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&"auto"!==t.pitchAlignment?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=e.pointGeometry.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");const n=o.createNS("http://www.w3.org/2000/svg","svg"),i=41,r=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",i+"px"),n.setAttributeNS(null,"width",r+"px"),n.setAttributeNS(null,"viewBox",`0 0 ${r} ${i}`);const s=o.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"stroke","none"),s.setAttributeNS(null,"stroke-width","1"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"fill-rule","evenodd");const a=o.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");const l=o.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");const c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const e of c){const t=o.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),l.appendChild(t)}const u=o.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"fill",this._color);const h=o.createNS("http://www.w3.org/2000/svg","path");h.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),u.appendChild(h);const d=o.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"fill","#000000");const p=o.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),d.appendChild(p);const f=o.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"transform","translate(6.0, 7.0)"),f.setAttributeNS(null,"fill","#FFFFFF");const m=o.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");const g=o.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");const y=o.createNS("http://www.w3.org/2000/svg","circle");y.setAttributeNS(null,"fill","#FFFFFF"),y.setAttributeNS(null,"cx","5.5"),y.setAttributeNS(null,"cy","5.5"),y.setAttributeNS(null,"r","5.4999962"),m.appendChild(g),m.appendChild(y),a.appendChild(l),a.appendChild(u),a.appendChild(d),a.appendChild(f),a.appendChild(m),n.appendChild(a),n.setAttributeNS(null,"height",i*this._scale+"px"),n.setAttributeNS(null,"width",r*this._scale+"px"),this._element.appendChild(n),this._offset=e.pointGeometry.convert(t&&t.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),Er(this._element,this._anchor,"marker"),this._popup=null}addTo(e){return this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("remove",this._clearFadeTimer),e._addMarker(this),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._map.off("remove",this._clearFadeTimer),this._map._removeMarker(this),delete this._map),this._clearFadeTimer(),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,n=13.5,i=Math.sqrt(Math.pow(n,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[i,-1*(t-n+i)],"bottom-right":[-i,-1*(t-n+i)],left:[n,-1*(t-n)],right:[-n,-1*(t-n)]}:this._offset}this._popup=e,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(e){const t=e.code,n=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==n&&13!==n||this.togglePopup()}_onMapClick(e){const t=e.originalEvent.target,n=this._element;this._popup&&(t===n||n.contains(t))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const e=this._popup;return e?(e.isOpen()?e.remove():e.addTo(this._map),this):this}_evaluateOpacity(){const e=this._pos?this._pos.sub(this._transformedOffset()):null;if(!this._withinScreenBounds(e))return void this._clearFadeTimer();const t=this._map.unproject(e);let n=!1;if(this._map.getTerrain()){const e=this._map.getFreeCameraOptions();if(e.position){const i=e.position.toLngLat();n=i.distanceTo(t)<.9*i.distanceTo(this._lngLat)}}const i=(1-this._map._queryFogOpacity(t))*(n?.2:1);this._element.style.opacity=""+i,this._popup&&this._popup._setOpacity(""+i),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_withinScreenBounds(e){const t=this._map.transform;return!!e&&e.x>=0&&e.x<t.width&&e.y>=0&&e.y<t.height}_update(e){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Tr(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._transformedOffset());let t="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?t=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(t=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?n="rotateX(0deg)":"map"===this._pitchAlignment&&(n=`rotateX(${this._map.getPitch()}deg)`),e&&"moveend"!==e.type||(this._pos=this._pos.round()),this._map._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&o.setTransform(this._element,`${Sr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${t}`),!this._map.getTerrain()&&!this._map.getFog()||this._fadeTimer||(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))})}_transformedOffset(){if(!this._defaultMarker)return this._offset;const e=this._map.transform,t=this._offset.mult(this._scale);return"map"===this._rotationAlignment&&t._rotate(e.angle),"map"===this._pitchAlignment&&(t.y*=Math.cos(e._pitch)),t}getOffset(){return this._offset}setOffset(t){return this._offset=e.pointGeometry.convert(t),this._update(),this}_onMove(t){if(!this._isDragging){const e=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=e}this._isDragging&&(this._pos=t.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 e.Event("dragstart"))),this.fire(new e.Event("drag")))}_onUp(){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 e.Event("dragend")),this._state="inactive"}_addDragHandler(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._transformedOffset()),this._pointerdownPos=e.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))}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}class Cr{constructor(e){this.jumpTo(e)}getValue(t){if(t<=this._startTime)return this._start;if(t>=this._endTime)return this._end;const n=e.easeCubicInOut((t-this._startTime)/(this._endTime-this._startTime));return this._start*(1-n)+this._end*n}isEasing(e){return e>=this._startTime&&e<=this._endTime}jumpTo(e){this._startTime=-1/0,this._endTime=-1/0,this._start=e,this._end=e}easeTo(e,t,n){this._start=this.getValue(t),this._end=e,this._startTime=t,this._endTime=t+n}}const Ar={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},{HTMLImageElement:Ir,HTMLElement:Mr,ImageBitmap:Pr}=e.window,Dr={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0};function Lr(e){e.parentNode&&e.parentNode.removeChild(e)}const Or={showCompass:!0,showZoom:!0,visualizePitch:!1};class zr{constructor(t,n,i=!1){this._clickTolerance=10,this.element=n,this.mouseRotate=new Hi({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,i&&(this.mousePitch=new Wi({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(n,"mousedown",this.mousedown),o.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(n,"touchmove",this.touchmove),o.addEventListener(n,"touchend",this.touchend),o.addEventListener(n,"touchcancel",this.reset)}down(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),o.disableDrag()}move(e,t){const n=this.map,i=this.mouseRotate.mousemoveWindow(e,t);if(i&&i.bearingDelta&&n.setBearing(n.getBearing()+i.bearingDelta),this.mousePitch){const i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}}off(){const e=this.element;o.removeEventListener(e,"mousedown",this.mousedown),o.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(e,"touchmove",this.touchmove),o.removeEventListener(e,"touchend",this.touchend),o.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(e.window,"mousemove",this.mousemove),o.removeEventListener(e.window,"mouseup",this.mouseup)}mousedown(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),o.mousePos(this.element,t)),o.addEventListener(e.window,"mousemove",this.mousemove),o.addEventListener(e.window,"mouseup",this.mouseup)}mousemove(e){this.move(e,o.mousePos(this.element,e))}mouseup(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()}touchstart(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>e.preventDefault()},this._startPos))}touchmove(e){1!==e.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:()=>e.preventDefault()},this._lastPos))}touchend(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}const Rr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Fr,Nr=0,Br=!1;const jr={maxWidth:100,unit:"metric"};function Vr(e,t,n){const i=n&&n.maxWidth||100,r=e._container.clientHeight/2,o=e.unproject([0,r]),s=e.unproject([i,r]),a=o.distanceTo(s);if(n&&"imperial"===n.unit){const n=3.2808*a;n>5280?$r(t,i,n/5280,e._getUIString("ScaleControl.Miles"),e):$r(t,i,n,e._getUIString("ScaleControl.Feet"),e)}else n&&"nautical"===n.unit?$r(t,i,a/1852,e._getUIString("ScaleControl.NauticalMiles"),e):a>=1e3?$r(t,i,a/1e3,e._getUIString("ScaleControl.Kilometers"),e):$r(t,i,a,e._getUIString("ScaleControl.Meters"),e)}function $r(e,t,n,i,r){const o=function(e){const t=Math.pow(10,(""+Math.floor(e)).length-1);let n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(n),t*n}(n),s=o/n;r._requestDomTask(()=>{e.style.width=t*s+"px",e.innerHTML=`${o}&nbsp;${i}`})}const Ur={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},qr=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Gr(t){if(t){if("number"==typeof t){const n=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.pointGeometry(0,0),top:new e.pointGeometry(0,t),"top-left":new e.pointGeometry(n,n),"top-right":new e.pointGeometry(-n,n),bottom:new e.pointGeometry(0,-t),"bottom-left":new e.pointGeometry(n,-n),"bottom-right":new e.pointGeometry(-n,-n),left:new e.pointGeometry(t,0),right:new e.pointGeometry(-t,0)}}if(t instanceof e.pointGeometry||Array.isArray(t)){const n=e.pointGeometry.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.pointGeometry.convert(t.center||[0,0]),top:e.pointGeometry.convert(t.top||[0,0]),"top-left":e.pointGeometry.convert(t["top-left"]||[0,0]),"top-right":e.pointGeometry.convert(t["top-right"]||[0,0]),bottom:e.pointGeometry.convert(t.bottom||[0,0]),"bottom-left":e.pointGeometry.convert(t["bottom-left"]||[0,0]),"bottom-right":e.pointGeometry.convert(t["bottom-right"]||[0,0]),left:e.pointGeometry.convert(t.left||[0,0]),right:e.pointGeometry.convert(t.right||[0,0])}}return Gr(new e.pointGeometry(0,0))}const Hr={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:class extends _r{constructor(t){if(null!=(t=e.extend({},Dr,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ti(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._optimizeForTerrain=t.optimizeForTerrain,this._renderTaskQueue=new wr,this._domRenderTaskQueue=new wr,this._controls=[],this._markers=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Ar,t.locale),this._clickTolerance=t.clickTolerance,this._averageElevationLastSampledAt=-1/0,this._averageElevation=new Cr(0),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken,t.testMode),this._silenceAuthErrors=!!t.testMode,"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof Mr))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.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",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new vr(this,t),this._hash=t.hash&&new Si("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localFontFamily=t.localFontFamily,this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),t.attributionControl&&this.addControl(new xr({customAttribution:t.customAttribution})),this._logoControl=new br,this.addControl(this._logoControl,t.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update("style"===t.dataType),this.fire(new e.Event(t.dataType+"data",t))}),this.on("dataloading",t=>{this.fire(new e.Event(t.dataType+"dataloading",t))})}_getMapId(){return this._mapId}addControl(t,n){if(void 0===n&&(n=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const i=t.onAdd(this);this._controls.push(t);const r=this._controlPositions[n];return-1!==n.indexOf("bottom")?r.insertBefore(i,r.firstChild):r.appendChild(i),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}resize(t){const n=this._containerDimensions(),i=n[0],r=n[1];this._resizeCanvas(i,r),this.transform.resize(i,r),this.painter.resize(i,r);const o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()<e&&this.setPitch(e),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=null==e?85:e)>85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}project(t){return this.transform.locationPoint3D(e.LngLat.convert(t))}unproject(t){return this.transform.pointLocation3D(e.pointGeometry.convert(t))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()}_createDelegatedListener(e,t,n){if("mouseenter"===e||"mouseover"===e){let i=!1;const r=r=>{const o=this.getLayer(t)?this.queryRenderedFeatures(r.point,{layers:[t]}):[];o.length?i||(i=!0,n.call(this,new Li(e,this,r.originalEvent,{features:o}))):i=!1};return{layer:t,listener:n,delegates:{mousemove:r,mouseout:()=>{i=!1}}}}if("mouseleave"===e||"mouseout"===e){let i=!1;const r=r=>{(this.getLayer(t)?this.queryRenderedFeatures(r.point,{layers:[t]}):[]).length?i=!0:i&&(i=!1,n.call(this,new Li(e,this,r.originalEvent)))},o=t=>{i&&(i=!1,n.call(this,new Li(e,this,t.originalEvent)))};return{layer:t,listener:n,delegates:{mousemove:r,mouseout:o}}}{const i=e=>{const i=this.getLayer(t)?this.queryRenderedFeatures(e.point,{layers:[t]}):[];i.length&&(e.features=i,n.call(this,e),delete e.features)};return{layer:t,listener:n,delegates:{[e]:i}}}}on(e,t,n){if(void 0===n)return super.on(e,t);const i=this._createDelegatedListener(e,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i);for(const r in i.delegates)this.on(r,i.delegates[r]);return this}once(e,t,n){if(void 0===n)return super.once(e,t);const i=this._createDelegatedListener(e,t,n);for(const r in i.delegates)this.once(r,i.delegates[r]);return this}off(e,t,n){return void 0===n?super.off(e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&(i=>{const r=this._delegatedListeners[e];for(let e=0;e<r.length;e++){const i=r[e];if(i.layer===t&&i.listener===n){for(const e in i.delegates)this.off(e,i.delegates[e]);return r.splice(e,1),this}}})(),this)}queryRenderedFeatures(t,n){return this.style?(void 0!==n||void 0===t||t instanceof e.pointGeometry||Array.isArray(t)||(n=t,t=void 0),this.style.queryRenderedFeatures(t=t||[[0,0],[this.transform.width,this.transform.height]],n=n||{},this.transform)):[]}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(t,n){return!1!==(n=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&n.localFontFamily===this._localFontFamily&&this.style&&t?(this._diffStyle(t,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._localFontFamily=n.localFontFamily,this._updateStyle(t,n))}_getUIString(e){const t=this._locale[e];if(null==t)throw new Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){return this.style&&(this.style.setEventedParent(null),this.style._remove(),delete this.style),e&&(this.style=new Vt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e)),this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new Vt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(t,n){if("string"==typeof t){const i=this._requestManager.normalizeStyleURL(t),r=this._requestManager.transformRequest(i,e.ResourceType.Style);e.getJSON(r,(t,i)=>{t?this.fire(new e.ErrorEvent(t)):i&&this._updateDiff(i,n)})}else"object"==typeof t&&this._updateDiff(t,n)}_updateDiff(t,n){try{this.style.setState(t)&&this._update(!0)}catch(i){e.warnOnce(`Unable to perform style diff: ${i.message||i.error||i}.  Rebuilding the style from scratch.`),this._updateStyle(t,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(t){const n=this.style&&this.style._getSourceCaches(t);if(0!==n.length)return n.every(e=>e.loaded());this.fire(new e.ErrorEvent(new Error(`There is no source with ID '${t}'`)))}areTilesLoaded(){const e=this.style&&this.style._sourceCaches;for(const t in e){const n=e[t]._tiles;for(const e in n){const t=n[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}addSourceType(e,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,n)}removeSource(e){return this.style.removeSource(e),this._updateTerrain(),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(t,n,{pixelRatio:i=1,sdf:r=!1,stretchX:o,stretchY:s,content:a}={}){if(this._lazyInitEmptyStyle(),n instanceof Ir||Pr&&n instanceof Pr){const{width:l,height:c,data:u}=e.exported.getImageData(n);this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},u),pixelRatio:i,stretchX:o,stretchY:s,content:a,sdf:r,version:0})}else{if(void 0===n.width||void 0===n.height)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:l,height:c,data:u}=n,h=n;this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},new Uint8Array(u)),pixelRatio:i,stretchX:o,stretchY:s,content:a,sdf:r,version:0,userImage:h}),h.onAdd&&h.onAdd(this,t)}}}updateImage(t,n){const i=this.style.getImage(t);if(!i)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const r=n instanceof Ir||Pr&&n instanceof Pr?e.exported.getImageData(n):n,{width:o,height:s,data:a}=r;return void 0===o||void 0===s?this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):o!==i.data.width||s!==i.data.height?this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(i.data.replace(a,!(n instanceof Ir||Pr&&n instanceof Pr)),void this.style.updateImage(t,i))}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(t,n){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),(t,i)=>{n(t,i instanceof Ir?e.exported.getImageData(i):i)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}setLayerZoomRange(e,t,n){return this.style.setLayerZoomRange(e,t,n),this._update(!0)}setFilter(e,t,n={}){return this.style.setFilter(e,t,n),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,n,i={}){return this.style.setPaintProperty(e,t,n,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,n,i={}){return this.style.setLayoutProperty(e,t,n,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(e){return this._lazyInitEmptyStyle(),this.style.setTerrain(e),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(e){return this._lazyInitEmptyStyle(),this.style.setFog(e),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(t){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(e.LngLat.convert(t),this.transform):0}queryTerrainElevation(t,n){const i=this.transform.elevation;return i?(n=e.extend({},{exaggerated:!0},n),i.getAtPoint(e.MercatorCoordinate.fromLngLat(t),null,n.exaggerated)):null}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_detectMissingCSS(){"rgb(250, 128, 114)"!==e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const e=this._container;e.classList.add("mapboxgl-map"),(this._missingCSSCanary=o.create("div","mapboxgl-canary",e)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=o.create("div","mapboxgl-canvas-container",e);this._interactive&&t.classList.add("mapboxgl-interactive"),this._canvas=o.create("canvas","mapboxgl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);const i=this._controlContainer=o.create("div","mapboxgl-control-container",e),r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(e=>{r[e]=o.create("div","mapboxgl-ctrl-"+e,i)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,n){const i=e.exported.devicePixelRatio||1;this._canvas.width=i*t,this._canvas.height=i*n,this._canvas.style.width=t+"px",this._canvas.style.height=n+"px"}_addMarker(e){this._markers.push(e)}_removeMarker(e){const t=this._markers.indexOf(e);-1!==t&&this._markers.splice(t,1)}_setupPainter(){const n=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),i=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);i?(e.storeAuthState(i,!0),this.painter=new pi(i,this.transform),this.on("data",e=>{"source"===e.dataType&&this.painter.setTileLoadedFlag(!0)}),e.exported$1.testSupport(i)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))}_onMapScroll(e){if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_requestDomTask(e){!this.isMoving()&&this.loaded()?e():this._domRenderTaskQueue.add(e)}_render(t){let n;const i=this.painter.context.extTimerQuery,r=e.exported.now();this.listens("gpu-timing-frame")&&(n=i.createQueryEXT(),i.beginQueryEXT(i.TIME_ELAPSED_EXT,n));let o=this._updateAverageElevation(r);if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),this._domRenderTaskQueue.run(t),this._removed)return;let s=!1;const a=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,n=e.exported.now();this.style.zoomHistory.update(t,n);const i=new e.EvaluationParameters(t,{now:n,fadeDuration:a,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),r=i.crossFadingFactor();1===r&&r===this._crossFadingFactor||(s=!0,this._crossFadingFactor=r),this.style.update(i)}if(this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,a,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:a,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),speedIndexTiming:this.speedIndexTiming}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||s)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const t=e.exported.now()-r;i.endQueryEXT(i.TIME_ELAPSED_EXT,n),setTimeout(()=>{const r=i.getQueryObjectEXT(n,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(n),this.fire(new e.Event("gpu-timing-frame",{cpuTime:t,gpuTime:r}))},50)}if(this.listens("gpu-timing-layer")){const t=this.painter.collectGpuTimers();setTimeout(()=>{const n=this.painter.queryGpuTimers(t);this.fire(new e.Event("gpu-timing-layer",{layerTimes:n}))},50)}const l=this._sourcesDirty||this._styleDirty||this._placementDirty||o;if(l||this._repaint)this.triggerRepaint();else{const t=!this.isMoving()&&this.loaded();if(t&&(o=this._updateAverageElevation(r,!0)),o)this.triggerRepaint();else if(this._triggerFrame(!1),t&&(this.fire(new e.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const t=this._calculateSpeedIndex();this.fire(new e.Event("speedindexcompleted",{speedIndex:t})),this.speedIndexTiming=!1}}return!this._loaded||this._fullyLoaded||l||(this._fullyLoaded=!0,this._authenticate()),this}_updateAverageElevation(e,t=!1){const n=e=>(this.transform.averageElevation=e,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&n(0);if((t||e-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(e)){const t=this.transform.averageElevation;let i=this.transform.sampleAverageElevation();isNaN(i)?i=0:this._averageElevationLastSampledAt=e;const r=Math.abs(t-i);if(r>1)this._averageElevation.easeTo(i,e,300);else if(r>1e-4)return this._averageElevation.jumpTo(i),n(i)}return!!this._averageElevation.isEasing(e)&&n(this._averageElevation.getValue(e))}_authenticate(){e.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,t=>{if(t&&(t.message===e.AUTH_ERR_MSG||401===t.status)){const t=this.painter.context.gl;e.storeAuthState(t,!1),this._logoControl instanceof br&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new e.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),e.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){this.painter.updateTerrain(this.style,this.isMoving()||this.isRotating()||this.isZooming())}_calculateSpeedIndex(){const e=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const n=this.painter.context.gl,i=n.createFramebuffer();function r(e){n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);const t=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);return n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,t),t}return n.bindFramebuffer(n.FRAMEBUFFER,i),this._canvasPixelComparison(r(e),t.canvasCopies.map(r),t.timeStamps)}_canvasPixelComparison(e,t,n){let i=n[1]-n[0];const r=e.length/4;for(let o=0;o<t.length;o++){const s=t[o];let a=0;for(let t=0;t<s.length;t+=4)s[t]===e[t]&&s[t+1]===e[t+1]&&s[t+2]===e[t+2]&&s[t+3]===e[t+3]&&(a+=1);i+=(n[o+2]-n[o+1])*(1-a/r)}return i}remove(){this._hash&&this._hash.remove();for(const e of this._controls)e.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==e.window&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("orientationchange",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),Lr(this._canvasContainer),Lr(this._controlContainer),Lr(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),e.removeAuthState(this.painter.context.gl),this._removed=!0,this.fire(new e.Event("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(t){this._renderNextFrame=this._renderNextFrame||t,this.style&&!this._frame&&(this._frame=e.exported.frame(e=>{const t=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,t&&this._render(e)}))}_onWindowOnline(){this._update()}_onWindowResize(e){this._trackResize&&this.resize({originalEvent:e})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(e){this._showTerrainWireframe!==e&&(this._showTerrainWireframe=e,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(e){this._speedIndexTiming!==e&&(this._speedIndexTiming=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}_setCacheLimits(t,n){e.setCacheLimits(t,n)}get version(){return e.version}},NavigationControl:class{constructor(t){this.options=e.extend({},Or,t),this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),o.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),o.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=o.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))}_updateZoomButtons(){const e=this._map.getZoom(),t=e===this._map.getMaxZoom(),n=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._map._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=e)})}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new zr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){const n=o.create("button",e,this._container);return n.type="button",n.addEventListener("click",t),n}_setButtonTitle(e,t){const n=this._map._getUIString("NavigationControl."+t);e.title=n,e.setAttribute("aria-label",n)}},GeolocateControl:class extends e.Evented{constructor(t){super(),this.options=e.extend({},Rr,t),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(t){var n;return this._map=t,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==Fr?n(Fr):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then(e=>{Fr="denied"!==e.state,n(Fr)}):(Fr=!!e.window.navigator.geolocation,n(Fr)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(e.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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Nr=0,Br=!1}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),n=e.coords;return t&&(n.longitude<t.getWest()||n.longitude>t.getEast()||n.latitude<t.getSouth()||n.latitude>t.getNorth())}_setErrorState(){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")}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}}_updateCamera(t){const n=new e.LngLat(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,r=this._map.getBearing(),o=e.extend({bearing:r},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(i),o,{geolocateSource:!0})}_updateMarker(t){if(t){const n=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),n=this._map.unproject([100,e]),i=t.distanceTo(n)/100,r=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=r+"px",this._circleElement.style.height=r+"px"}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(t){if(this._map){if(this.options.trackUserLocation)if(1===t.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;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Br)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new kr(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kr({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",t=>{t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new e.Event("trackuserlocationend")))})}trigger(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Nr--,Br=!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 e.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 e.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){let t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Nr++,Nr>1?(t={maximumAge:6e5,timeout:0},Br=!0):(t=this.options.positionOptions,Br=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){e.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)}},AttributionControl:xr,ScaleControl:class{constructor(t){this.options=e.extend({},jr,t),e.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){Vr(this._map,this._container,this.options)}onAdd(e){return this._map=e,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(e){this.options.unit=e,Vr(this._map,this._container,this.options)}},FullscreenControl:class{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in e.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!e.window.document.fullscreenEnabled&&!e.window.document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(e.window.document.fullscreenElement||e.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends e.Evented{constructor(t){super(),this.options=e.extend(Object.create(Ur),t),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(t){return this._map&&this.remove(),this._map=t,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 e.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&o.remove(this._content),this._container&&(o.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 e.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),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}trackPointer(){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}getElement(){return this._container}setText(t){return this.setDOMContent(e.window.document.createTextNode(t))}setHTML(t){const n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");let r;for(i.innerHTML=t;r=i.firstChild,r;)n.appendChild(r);return this.setDOMContent(n)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){this._container&&this._container.classList.add(e)}removeClassName(e){this._container&&this._container.classList.remove(e)}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(e){this._update(e.point)}_onMouseMove(e){this._update(e.point)}_onDrag(e){this._update(e.point)}_update(e){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(e=>this._container.classList.add(e)),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=Tr(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!e)return;const t=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);let n=this.options.anchor;const i=Gr(this.options.offset);if(!n){const e=this._container.offsetWidth,r=this._container.offsetHeight;let o;o=t.y+i.bottom.y<r?["top"]:t.y>this._map.transform.height-r?["bottom"]:[],t.x<e/2?o.push("left"):t.x>this._map.transform.width-e/2&&o.push("right"),n=0===o.length?"bottom":o.join("-")}const r=t.add(i[n]).round();this._map._requestDomTask(()=>{this._container&&n&&(o.setTransform(this._container,`${Sr[n]} translate(${r.x}px,${r.y}px)`),Er(this._container,n,"popup"))})}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(qr);e&&e.focus()}_onClose(){this.remove()}_setOpacity(e){this._content&&(this._content.style.opacity=e),this._tip&&(this._tip.style.opacity=e)}},Marker:kr,Style:Vt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.pointGeometry,MercatorCoordinate:e.MercatorCoordinate,FreeCameraOptions:bi,Evented:e.Evented,config:e.config,prewarm:function(){ze().acquire(De)},clearPrewarmedResources:function(){const e=Oe;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(De),Oe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Le.workerCount},set workerCount(e){Le.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){e.clearTileCache(t)},workerUrl:"",workerClass:null,setNow:e.exported.setNow,restoreNow:e.exported.restoreNow};return Hr}));var r=n;return r}))},e4ae:function(e,t,n){var i=n("f772");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},e53d:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e630:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("774e"),r=n.n(i),o=n("db2a");function s(e,t){if(e){if("string"===typeof e)return Object(o["a"])(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?r()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(o["a"])(e,t):void 0}}},e683:function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e6f3:function(e,t,n){var i=n("07e3"),r=n("36c3"),o=n("5b4e")(!1),s=n("5559")("IE_PROTO");e.exports=function(e,t){var n,a=r(e),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);while(t.length>l)i(a,n=t[l++])&&(~o(c,n)||c.push(n));return c}},e853:function(e,t,n){var i=n("d3f4"),r=n("1169"),o=n("2b4c")("species");e.exports=function(e){var t;return r(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!r(t.prototype)||(t=void 0),i(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},e9d4:function(e,t){!function(){var e={},t={};!function(e,t){function n(e){if("number"==typeof e)return e;var t={};for(var n in e)t[n]=e[n];return t}function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=T}function r(){return e.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function o(t,n,r){var o=new i;return n&&(o.fill="both",o.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.getOwnPropertyNames(t).forEach((function(n){if("auto"!=t[n]){if(("number"==typeof o[n]||"duration"==n)&&("number"!=typeof t[n]||isNaN(t[n])))return;if("fill"==n&&-1==b.indexOf(t[n]))return;if("direction"==n&&-1==w.indexOf(t[n]))return;if("playbackRate"==n&&1!==t[n]&&e.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;o[n]=t[n]}})):o.duration=t,o}function s(e){return"number"==typeof e&&(e=isNaN(e)?{duration:0}:{duration:e}),e}function a(t,n){return t=e.numericTimingToObject(t),o(t,n)}function l(e,t,n,i){return e<0||e>1||n<0||n>1?T:function(r){function o(e,t,n){return 3*e*(1-n)*(1-n)*n+3*t*(1-n)*n*n+n*n*n}if(r<=0){var s=0;return e>0?s=t/e:!t&&n>0&&(s=i/n),s*r}if(r>=1){var a=0;return n<1?a=(i-1)/(n-1):1==n&&e<1&&(a=(t-1)/(e-1)),1+a*(r-1)}for(var l=0,c=1;l<c;){var u=(l+c)/2,h=o(e,n,u);if(Math.abs(r-h)<1e-5)return o(t,i,u);h<r?l=u:c=u}return o(t,i,u)}}function c(e,t){return function(n){if(n>=1)return 1;var i=1/e;return(n+=t*i)-n%i}}function u(e){A||(A=document.createElement("div").style),A.animationTimingFunction="",A.animationTimingFunction=e;var t=A.animationTimingFunction;if(""==t&&r())throw new TypeError(e+" is not a valid value for easing");return t}function h(e){if("linear"==e)return T;var t=M.exec(e);if(t)return l.apply(this,t.slice(1).map(Number));var n=P.exec(e);if(n)return c(Number(n[1]),k);var i=D.exec(e);return i?c(Number(i[1]),{start:S,middle:E,end:k}[i[2]]):C[e]||T}function d(e){return Math.abs(p(e)/e.playbackRate)}function p(e){return 0===e.duration||0===e.iterations?0:e.duration*e.iterations}function f(e,t,n){if(null==t)return L;var i=n.delay+e+n.endDelay;return t<Math.min(n.delay,i)?O:t>=Math.min(n.delay+e,i)?z:R}function m(e,t,n,i,r){switch(i){case O:return"backwards"==t||"both"==t?0:null;case R:return n-r;case z:return"forwards"==t||"both"==t?e:null;case L:return null}}function g(e,t,n,i,r){var o=r;return 0===e?t!==O&&(o+=n):o+=i/e,o}function y(e,t,n,i,r,o){var s=e===1/0?t%1:e%1;return 0!==s||n!==z||0===i||0===r&&0!==o||(s=1),s}function v(e,t,n,i){return e===z&&t===1/0?1/0:1===n?Math.floor(i)-1:Math.floor(i)}function _(e,t,n){var i=e;if("normal"!==e&&"reverse"!==e){var r=t;"alternate-reverse"===e&&(r+=1),i="normal",r!==1/0&&r%2!=0&&(i="reverse")}return"normal"===i?n:1-n}function x(e,t,n){var i=f(e,t,n),r=m(e,n.fill,t,i,n.delay);if(null===r)return null;var o=g(n.duration,i,n.iterations,r,n.iterationStart),s=y(o,n.iterationStart,i,n.iterations,r,n.duration),a=v(i,n.iterations,s,o),l=_(n.direction,a,s);return n._easingFunction(l)}var b="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),T=function(e){return e};i.prototype={_setMember:function(t,n){this["_"+t]=n,this._effect&&(this._effect._timingInput[t]=n,this._effect._timing=e.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=e.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(e){this._setMember("delay",e)},get delay(){return this._delay},set endDelay(e){this._setMember("endDelay",e)},get endDelay(){return this._endDelay},set fill(e){this._setMember("fill",e)},get fill(){return this._fill},set iterationStart(e){if((isNaN(e)||e<0)&&r())throw new TypeError("iterationStart must be a non-negative number, received: "+e);this._setMember("iterationStart",e)},get iterationStart(){return this._iterationStart},set duration(e){if("auto"!=e&&(isNaN(e)||e<0)&&r())throw new TypeError("duration must be non-negative or auto, received: "+e);this._setMember("duration",e)},get duration(){return this._duration},set direction(e){this._setMember("direction",e)},get direction(){return this._direction},set easing(e){this._easingFunction=h(u(e)),this._setMember("easing",e)},get easing(){return this._easing},set iterations(e){if((isNaN(e)||e<0)&&r())throw new TypeError("iterations must be non-negative, received: "+e);this._setMember("iterations",e)},get iterations(){return this._iterations}};var S=1,E=.5,k=0,C={ease:l(.25,.1,.25,1),"ease-in":l(.42,0,1,1),"ease-out":l(0,0,.58,1),"ease-in-out":l(.42,0,.58,1),"step-start":c(1,S),"step-middle":c(1,E),"step-end":c(1,k)},A=null,I="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",M=new RegExp("cubic-bezier\\("+I+","+I+","+I+","+I+"\\)"),P=/steps\(\s*(\d+)\s*\)/,D=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,L=0,O=1,z=2,R=3;e.cloneTimingInput=n,e.makeTiming=o,e.numericTimingToObject=s,e.normalizeTimingInput=a,e.calculateActiveDuration=d,e.calculateIterationProgress=x,e.calculatePhase=f,e.normalizeEasing=u,e.parseEasingFunction=h}(e),function(e,t){function n(e,t){return e in u&&u[e][t]||t}function i(e){return"display"===e||0===e.lastIndexOf("animation",0)||0===e.lastIndexOf("transition",0)}function r(e,t,r){if(!i(e)){var o=a[e];if(o)for(var s in l.style[e]=t,o){var c=o[s],u=l.style[c];r[c]=n(c,u)}else r[e]=n(e,t)}}function o(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var i=e[n];Array.isArray(i)||(i=[i]);for(var r,o=i.length,s=0;s<o;s++)r={},r.offset="offset"in e?e.offset:1==o?1:s/(o-1),"easing"in e&&(r.easing=e.easing),"composite"in e&&(r.composite=e.composite),r[n]=i[s],t.push(r)}return t.sort((function(e,t){return e.offset-t.offset})),t}function s(t){function n(){var e=i.length;null==i[e-1].offset&&(i[e-1].offset=1),e>1&&null==i[0].offset&&(i[0].offset=0);for(var t=0,n=i[0].offset,r=1;r<e;r++){var o=i[r].offset;if(null!=o){for(var s=1;s<r-t;s++)i[t+s].offset=n+(o-n)*s/(r-t);t=r,n=o}}}if(null==t)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||(t=o(t));for(var i=t.map((function(t){var n={};for(var i in t){var o=t[i];if("offset"==i){if(null!=o){if(o=Number(o),!isFinite(o))throw new TypeError("Keyframe offsets must be numbers.");if(o<0||o>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==i){if("add"==o||"accumulate"==o)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=o)throw new TypeError("Invalid composite mode "+o+".")}else o="easing"==i?e.normalizeEasing(o):""+o;r(i,o,n)}return void 0==n.offset&&(n.offset=null),void 0==n.easing&&(n.easing="linear"),n})),s=!0,a=-1/0,l=0;l<i.length;l++){var c=i[l].offset;if(null!=c){if(c<a)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");a=c}else s=!1}return i=i.filter((function(e){return e.offset>=0&&e.offset<=1})),s||n(),i}var a={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},l=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c={thin:"1px",medium:"3px",thick:"5px"},u={borderBottomWidth:c,borderLeftWidth:c,borderRightWidth:c,borderTopWidth:c,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:c,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};e.convertToArrayForm=o,e.normalizeKeyframes=s}(e),function(e){var t={};e.isDeprecated=function(e,n,i,r){var o=r?"are":"is",s=new Date,a=new Date(n);return a.setMonth(a.getMonth()+3),!(s<a&&(e in t||console.warn("Web Animations: "+e+" "+o+" deprecated and will stop working on "+a.toDateString()+". "+i),t[e]=!0,1))},e.deprecated=function(t,n,i,r){var o=r?"are":"is";if(e.isDeprecated(t,n,i,r))throw new Error(t+" "+o+" no longer supported. "+i)}}(e),function(){if(document.documentElement.animate){var n=document.documentElement.animate([],0),i=!0;if(n&&(i=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach((function(e){void 0===n[e]&&(i=!0)}))),!i)return}!function(e,t,n){function i(e){for(var t={},n=0;n<e.length;n++)for(var i in e[n])if("offset"!=i&&"easing"!=i&&"composite"!=i){var r={offset:e[n].offset,easing:e[n].easing,value:e[n][i]};t[i]=t[i]||[],t[i].push(r)}for(var o in t){var s=t[o];if(0!=s[0].offset||1!=s[s.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return t}function r(n){var i=[];for(var r in n)for(var o=n[r],s=0;s<o.length-1;s++){var a=s,l=s+1,c=o[a].offset,u=o[l].offset,h=c,d=u;0==s&&(h=-1/0,0==u&&(l=a)),s==o.length-2&&(d=1/0,1==c&&(a=l)),i.push({applyFrom:h,applyTo:d,startOffset:o[a].offset,endOffset:o[l].offset,easingFunction:e.parseEasingFunction(o[a].easing),property:r,interpolation:t.propertyInterpolation(r,o[a].value,o[l].value)})}return i.sort((function(e,t){return e.startOffset-t.startOffset})),i}t.convertEffectInput=function(n){var o=e.normalizeKeyframes(n),s=i(o),a=r(s);return function(e,n){if(null!=n)a.filter((function(e){return n>=e.applyFrom&&n<e.applyTo})).forEach((function(i){var r=n-i.startOffset,o=i.endOffset-i.startOffset,s=0==o?0:i.easingFunction(r/o);t.apply(e,i.property,i.interpolation(s))}));else for(var i in s)"offset"!=i&&"easing"!=i&&"composite"!=i&&t.clear(e,i)}}}(e,t),function(e,t,n){function i(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function r(e,t,n){a[n]=a[n]||[],a[n].push([e,t])}function o(e,t,n){for(var o=0;o<n.length;o++)r(e,t,i(n[o]))}function s(n,r,o){var s=n;/-/.test(n)&&!e.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(s=i(n)),"initial"!=r&&"initial"!=o||("initial"==r&&(r=l[s]),"initial"==o&&(o=l[s]));for(var c=r==o?[]:a[s],u=0;c&&u<c.length;u++){var h=c[u][0](r),d=c[u][0](o);if(void 0!==h&&void 0!==d){var p=c[u][1](h,d);if(p){var f=t.Interpolation.apply(null,p);return function(e){return 0==e?r:1==e?o:f(e)}}}}return t.Interpolation(!1,!0,(function(e){return e?o:r}))}var a={};t.addPropertiesHandler=o;var l={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};t.propertyInterpolation=s}(e,t),function(e,t,n){function i(t){var n=e.calculateActiveDuration(t),i=function(i){return e.calculateIterationProgress(n,i,t)};return i._totalDuration=t.delay+n+t.endDelay,i}t.KeyframeEffect=function(n,r,o,s){var a,l=i(e.normalizeTimingInput(o)),c=t.convertEffectInput(r),u=function(){c(n,a)};return u._update=function(e){return null!==(a=l(e))},u._clear=function(){c(n,null)},u._hasSameTarget=function(e){return n===e},u._target=n,u._totalDuration=l._totalDuration,u._id=s,u}}(e,t),function(e,t){function n(e,t){return!(!t.namespaceURI||-1==t.namespaceURI.indexOf("/svg"))&&(s in e||(e[s]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(e.navigator.userAgent)),e[s])}function i(e,t,n){n.enumerable=!0,n.configurable=!0,Object.defineProperty(e,t,n)}function r(e){this._element=e,this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=e.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=n(window,e),this._savedTransformAttr=null;for(var t=0;t<this._style.length;t++){var i=this._style[t];this._surrogateStyle[i]=this._style[i]}this._updateIndices()}function o(e){if(!e._webAnimationsPatchedStyle){var t=new r(e);try{i(e,"style",{get:function(){return t}})}catch(t){e.style._set=function(t,n){e.style[t]=n},e.style._clear=function(t){e.style[t]=""}}e._webAnimationsPatchedStyle=e.style}}var s="_webAnimationsUpdateSvgTransformAttr",a={cssText:1,length:1,parentRule:1},l={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},c={removeProperty:1,setProperty:1};for(var u in r.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(e){for(var t={},n=0;n<this._surrogateStyle.length;n++)t[this._surrogateStyle[n]]=!0;this._surrogateStyle.cssText=e,this._updateIndices();for(n=0;n<this._surrogateStyle.length;n++)t[this._surrogateStyle[n]]=!0;for(var i in t)this._isAnimatedProperty[i]||this._style.setProperty(i,this._surrogateStyle.getPropertyValue(i))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(e){return function(){return this._surrogateStyle[e]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(t,n){this._style[t]=n,this._isAnimatedProperty[t]=!0,this._updateSvgTransformAttr&&"transform"==e.unprefixedPropertyName(t)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",e.transformToSvgMatrix(n)))},_clear:function(t){this._style[t]=this._surrogateStyle[t],this._updateSvgTransformAttr&&"transform"==e.unprefixedPropertyName(t)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[t]}},l)r.prototype[u]=function(e,t){return function(){var n=this._surrogateStyle[e].apply(this._surrogateStyle,arguments);return t&&(this._isAnimatedProperty[arguments[0]]||this._style[e].apply(this._style,arguments),this._updateIndices()),n}}(u,u in c);for(var h in document.documentElement.style)h in a||h in l||function(e){i(r.prototype,e,{get:function(){return this._surrogateStyle[e]},set:function(t){this._surrogateStyle[e]=t,this._updateIndices(),this._isAnimatedProperty[e]||(this._style[e]=t)}})}(h);e.apply=function(t,n,i){o(t),t.style._set(e.propertyName(n),i)},e.clear=function(t,n){t._webAnimationsPatchedStyle&&t.style._clear(e.propertyName(n))}}(t),function(e){window.Element.prototype.animate=function(t,n){var i="";return n&&n.id&&(i=n.id),e.timeline._play(e.KeyframeEffect(this,t,n,i))}}(t),function(e,t){function n(e,t,i){if("number"==typeof e&&"number"==typeof t)return e*(1-i)+t*i;if("boolean"==typeof e&&"boolean"==typeof t)return i<.5?e:t;if(e.length==t.length){for(var r=[],o=0;o<e.length;o++)r.push(n(e[o],t[o],i));return r}throw"Mismatched interpolation arguments "+e+":"+t}e.Interpolation=function(e,t,i){return function(r){return i(n(e,t,r))}}}(t),function(e,t){function n(e,t,n){return Math.max(Math.min(e,n),t)}function i(t,i,r){var o=e.dot(t,i);o=n(o,-1,1);var s=[];if(1===o)s=t;else for(var a=Math.acos(o),l=1*Math.sin(r*a)/Math.sqrt(1-o*o),c=0;c<4;c++)s.push(t[c]*(Math.cos(r*a)-o*l)+i[c]*l);return s}var r=function(){function e(e,t){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],i=0;i<4;i++)for(var r=0;r<4;r++)for(var o=0;o<4;o++)n[i][r]+=t[i][o]*e[o][r];return n}function t(e){return 0==e[0][2]&&0==e[0][3]&&0==e[1][2]&&0==e[1][3]&&0==e[2][0]&&0==e[2][1]&&1==e[2][2]&&0==e[2][3]&&0==e[3][2]&&1==e[3][3]}function n(n,i,r,o,s){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],l=0;l<4;l++)a[l][3]=s[l];for(l=0;l<3;l++)for(var c=0;c<3;c++)a[3][l]+=n[c]*a[c][l];var u=o[0],h=o[1],d=o[2],p=o[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];f[0][0]=1-2*(h*h+d*d),f[0][1]=2*(u*h-d*p),f[0][2]=2*(u*d+h*p),f[1][0]=2*(u*h+d*p),f[1][1]=1-2*(u*u+d*d),f[1][2]=2*(h*d-u*p),f[2][0]=2*(u*d-h*p),f[2][1]=2*(h*d+u*p),f[2][2]=1-2*(u*u+h*h),a=e(a,f);var m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(m[2][1]=r[2],a=e(a,m)),r[1]&&(m[2][1]=0,m[2][0]=r[0],a=e(a,m)),r[0]&&(m[2][0]=0,m[1][0]=r[0],a=e(a,m));for(l=0;l<3;l++)for(c=0;c<3;c++)a[l][c]*=i[l];return t(a)?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}return n}();e.composeMatrix=r,e.quat=i}(t),function(e,t,n){e.sequenceNumber=0;var i=function(e,t,n){this.target=e,this.currentTime=t,this.timelineTime=n,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=e,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};t.Animation=function(t){this.id="",t&&t._id&&(this.id=t._id),this._sequenceNumber=e.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=t,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},t.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,t.timeline._animations.push(this))},_tickCurrentTime:function(e,t){e!=this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(e){e=+e,isNaN(e)||(t.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-e/this._playbackRate),this._currentTimePending=!1,this._currentTime!=e&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(e,!0),t.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(e){e=+e,isNaN(e)||this._paused||this._idle||(this._startTime=e,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),t.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(e){if(e!=this._playbackRate){var n=this.currentTime;this._playbackRate=e,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)),null!=n&&(this.currentTime=n)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,t.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),t.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(e,t){"function"==typeof t&&"finish"==e&&this._finishHandlers.push(t)},removeEventListener:function(e,t){if("finish"==e){var n=this._finishHandlers.indexOf(t);n>=0&&this._finishHandlers.splice(n,1)}},_fireEvents:function(e){if(this._isFinished){if(!this._finishedFlag){var t=new i(this,this._currentTime,e),n=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout((function(){n.forEach((function(e){e.call(t.target,t)}))}),0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(e,t){this._idle||this._paused||(null==this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this._currentTimePending=!1,this._fireEvents(e))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var e=this._effect._target;return e._activeAnimations||(e._activeAnimations=[]),e._activeAnimations},_markTarget:function(){var e=this._targetAnimations();-1===e.indexOf(this)&&e.push(this)},_unmarkTarget:function(){var e=this._targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}}}(e,t),function(e,t,n){function i(e){var t=c;c=[],e<m.currentTime&&(e=m.currentTime),m._animations.sort(r),m._animations=a(e,!0,m._animations)[0],t.forEach((function(t){t[1](e)})),s(),void 0}function r(e,t){return e._sequenceNumber-t._sequenceNumber}function o(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function s(){p.forEach((function(e){e()})),p.length=0}function a(e,n,i){f=!0,d=!1,t.timeline.currentTime=e,h=!1;var r=[],o=[],s=[],a=[];return i.forEach((function(t){t._tick(e,n),t._inEffect?(o.push(t._effect),t._markTarget()):(r.push(t._effect),t._unmarkTarget()),t._needsTick&&(h=!0);var i=t._inEffect||t._needsTick;t._inTimeline=i,i?s.push(t):a.push(t)})),p.push.apply(p,r),p.push.apply(p,o),h&&requestAnimationFrame((function(){})),f=!1,[s,a]}var l=window.requestAnimationFrame,c=[],u=0;window.requestAnimationFrame=function(e){var t=u++;return 0==c.length&&l(i),c.push([t,e]),t},window.cancelAnimationFrame=function(e){c.forEach((function(t){t[0]==e&&(t[1]=function(){})}))},o.prototype={_play:function(n){n._timing=e.normalizeTimingInput(n.timing);var i=new t.Animation(n);return i._idle=!1,i._timeline=this,this._animations.push(i),t.restart(),t.applyDirtiedAnimation(i),i}};var h=!1,d=!1;t.restart=function(){return h||(h=!0,requestAnimationFrame((function(){})),d=!0),d},t.applyDirtiedAnimation=function(e){if(!f){e._markTarget();var n=e._targetAnimations();n.sort(r),a(t.timeline.currentTime,!1,n.slice())[1].forEach((function(e){var t=m._animations.indexOf(e);-1!==t&&m._animations.splice(t,1)})),s()}};var p=[],f=!1,m=new o;t.timeline=m}(e,t),function(e,t){function n(e,t){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[i];return n}function i(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function r(e){var t=e.rad||0;return((e.deg||0)/360+(e.grad||0)/400+(e.turn||0))*(2*Math.PI)+t}function o(e){switch(e.t){case"rotatex":var t=r(e.d[0]);return[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1];case"rotatey":t=r(e.d[0]);return[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1];case"rotate":case"rotatez":t=r(e.d[0]);return[Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var n=e.d[0],i=e.d[1],o=e.d[2],s=(t=r(e.d[3]),n*n+i*i+o*o);if(0===s)n=1,i=0,o=0;else if(1!==s){var a=Math.sqrt(s);n/=a,i/=a,o/=a}var l=Math.sin(t/2),c=l*Math.cos(t/2),u=l*l;return[1-2*(i*i+o*o)*u,2*(n*i*u+o*c),2*(n*o*u-i*c),0,2*(n*i*u-o*c),1-2*(n*n+o*o)*u,2*(i*o*u+n*c),0,2*(n*o*u+i*c),2*(i*o*u-n*c),1-2*(n*n+i*i)*u,0,0,0,0,1];case"scale":return[e.d[0],0,0,0,0,e.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[e.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,e.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,e.d[0],0,0,0,0,1];case"scale3d":return[e.d[0],0,0,0,0,e.d[1],0,0,0,0,e.d[2],0,0,0,0,1];case"skew":var h=r(e.d[0]),d=r(e.d[1]);return[1,Math.tan(d),0,0,Math.tan(h),1,0,0,0,0,1,0,0,0,0,1];case"skewx":t=r(e.d[0]);return[1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1];case"skewy":t=r(e.d[0]);return[1,Math.tan(t),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":n=e.d[0].px||0,i=e.d[1].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,n,i,0,1];case"translatex":n=e.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translatey":i=e.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,i,0,1];case"translatez":o=e.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,o,1];case"translate3d":n=e.d[0].px||0,i=e.d[1].px||0,o=e.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,n,i,o,1];case"perspective":return[1,0,0,0,0,1,0,0,0,0,1,e.d[0].px?-1/e.d[0].px:0,0,0,0,1];case"matrix":return[e.d[0],e.d[1],0,0,e.d[2],e.d[3],0,0,0,0,1,0,e.d[4],e.d[5],0,1];case"matrix3d":return e.d}}function s(e){return 0===e.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(o).reduce(i)}function a(e){return[l(s(e))]}var l=function(){function e(e){return e[0][0]*e[1][1]*e[2][2]+e[1][0]*e[2][1]*e[0][2]+e[2][0]*e[0][1]*e[1][2]-e[0][2]*e[1][1]*e[2][0]-e[1][2]*e[2][1]*e[0][0]-e[2][2]*e[0][1]*e[1][0]}function t(t){for(var n=1/e(t),i=t[0][0],r=t[0][1],o=t[0][2],s=t[1][0],a=t[1][1],l=t[1][2],c=t[2][0],u=t[2][1],h=t[2][2],d=[[(a*h-l*u)*n,(o*u-r*h)*n,(r*l-o*a)*n,0],[(l*c-s*h)*n,(i*h-o*c)*n,(o*s-i*l)*n,0],[(s*u-a*c)*n,(c*r-i*u)*n,(i*a-r*s)*n,0]],p=[],f=0;f<3;f++){for(var m=0,g=0;g<3;g++)m+=t[3][g]*d[g][f];p.push(m)}return p.push(1),d.push(p),d}function i(e){return[[e[0][0],e[1][0],e[2][0],e[3][0]],[e[0][1],e[1][1],e[2][1],e[3][1]],[e[0][2],e[1][2],e[2][2],e[3][2]],[e[0][3],e[1][3],e[2][3],e[3][3]]]}function r(e,t){for(var n=[],i=0;i<4;i++){for(var r=0,o=0;o<4;o++)r+=e[o]*t[o][i];n.push(r)}return n}function o(e){var t=s(e);return[e[0]/t,e[1]/t,e[2]/t]}function s(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])}function a(e,t,n,i){return[n*e[0]+i*t[0],n*e[1]+i*t[1],n*e[2]+i*t[2]]}function l(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function c(c){var u=[c.slice(0,4),c.slice(4,8),c.slice(8,12),c.slice(12,16)];if(1!==u[3][3])return null;for(var h=[],d=0;d<4;d++)h.push(u[d].slice());for(d=0;d<3;d++)h[d][3]=0;if(0===e(h))return null;var p,f=[];u[0][3]||u[1][3]||u[2][3]?(f.push(u[0][3]),f.push(u[1][3]),f.push(u[2][3]),f.push(u[3][3]),p=r(f,i(t(h)))):p=[0,0,0,1];var m=u[3].slice(0,3),g=[];g.push(u[0].slice(0,3));var y=[];y.push(s(g[0])),g[0]=o(g[0]);var v=[];g.push(u[1].slice(0,3)),v.push(n(g[0],g[1])),g[1]=a(g[1],g[0],1,-v[0]),y.push(s(g[1])),g[1]=o(g[1]),v[0]/=y[1],g.push(u[2].slice(0,3)),v.push(n(g[0],g[2])),g[2]=a(g[2],g[0],1,-v[1]),v.push(n(g[1],g[2])),g[2]=a(g[2],g[1],1,-v[2]),y.push(s(g[2])),g[2]=o(g[2]),v[1]/=y[2],v[2]/=y[2];var _=l(g[1],g[2]);if(n(g[0],_)<0)for(d=0;d<3;d++)y[d]*=-1,g[d][0]*=-1,g[d][1]*=-1,g[d][2]*=-1;var x,b,w=g[0][0]+g[1][1]+g[2][2]+1;return w>1e-4?(x=.5/Math.sqrt(w),b=[(g[2][1]-g[1][2])*x,(g[0][2]-g[2][0])*x,(g[1][0]-g[0][1])*x,.25/x]):g[0][0]>g[1][1]&&g[0][0]>g[2][2]?(x=2*Math.sqrt(1+g[0][0]-g[1][1]-g[2][2]),b=[.25*x,(g[0][1]+g[1][0])/x,(g[0][2]+g[2][0])/x,(g[2][1]-g[1][2])/x]):g[1][1]>g[2][2]?(x=2*Math.sqrt(1+g[1][1]-g[0][0]-g[2][2]),b=[(g[0][1]+g[1][0])/x,.25*x,(g[1][2]+g[2][1])/x,(g[0][2]-g[2][0])/x]):(x=2*Math.sqrt(1+g[2][2]-g[0][0]-g[1][1]),b=[(g[0][2]+g[2][0])/x,(g[1][2]+g[2][1])/x,.25*x,(g[1][0]-g[0][1])/x]),[m,y,v,b,p]}return c}();e.dot=n,e.makeMatrixDecomposition=a,e.transformListToMatrix=s}(t),function(e){function t(e,t){var n=e.exec(t);if(n)return n=e.ignoreCase?n[0].toLowerCase():n[0],[n,t.substr(n.length)]}function n(e,t){t=t.replace(/^\s*/,"");var n=e(t);if(n)return[n[0],n[1].replace(/^\s*/,"")]}function i(e,i,r){e=n.bind(null,e);for(var o=[];;){var s=e(r);if(!s)return[o,r];if(o.push(s[0]),r=s[1],!(s=t(i,r))||""==s[1])return[o,r];r=s[1]}}function r(e,t){for(var n=0,i=0;i<t.length&&(!/\s|,/.test(t[i])||0!=n);i++)if("("==t[i])n++;else if(")"==t[i]&&(n--,0==n&&i++,n<=0))break;var r=e(t.substr(0,i));return void 0==r?void 0:[r,t.substr(i)]}function o(e,t){for(var n=e,i=t;n&&i;)n>i?n%=i:i%=n;return e*t/(n+i)}function s(e){return function(t){var n=e(t);return n&&(n[0]=void 0),n}}function a(e,t){return function(n){return e(n)||[t,n]}}function l(t,n){for(var i=[],r=0;r<t.length;r++){var o=e.consumeTrimmed(t[r],n);if(!o||""==o[0])return;void 0!==o[0]&&i.push(o[0]),n=o[1]}if(""==n)return i}function c(e,t,n,i,r){for(var s=[],a=[],l=[],c=o(i.length,r.length),u=0;u<c;u++){var h=t(i[u%i.length],r[u%r.length]);if(!h)return;s.push(h[0]),a.push(h[1]),l.push(h[2])}return[s,a,function(t){var i=t.map((function(e,t){return l[t](e)})).join(n);return e?e(i):i}]}function u(e,t,n){for(var i=[],r=[],o=[],s=0,a=0;a<n.length;a++)if("function"==typeof n[a]){var l=n[a](e[s],t[s++]);i.push(l[0]),r.push(l[1]),o.push(l[2])}else!function(e){i.push(!1),r.push(!1),o.push((function(){return n[e]}))}(a);return[i,r,function(e){for(var t="",n=0;n<e.length;n++)t+=o[n](e[n]);return t}]}e.consumeToken=t,e.consumeTrimmed=n,e.consumeRepeated=i,e.consumeParenthesised=r,e.ignore=s,e.optional=a,e.consumeList=l,e.mergeNestedRepeated=c.bind(null,null),e.mergeWrappedNestedRepeated=c,e.mergeList=u}(t),function(e){function t(t){function n(t){var n=e.consumeToken(/^inset/i,t);return n?(i.inset=!0,n):(n=e.consumeLengthOrPercent(t))?(i.lengths.push(n[0]),n):(n=e.consumeColor(t),n?(i.color=n[0],n):void 0)}var i={inset:!1,lengths:[],color:null},r=e.consumeRepeated(n,/^/,t);if(r&&r[0].length)return[i,r[1]]}function n(n){var i=e.consumeRepeated(t,/^,/,n);if(i&&""==i[1])return i[0]}function i(t,n){for(;t.lengths.length<Math.max(t.lengths.length,n.lengths.length);)t.lengths.push({px:0});for(;n.lengths.length<Math.max(t.lengths.length,n.lengths.length);)n.lengths.push({px:0});if(t.inset==n.inset&&!!t.color==!!n.color){for(var i,r=[],o=[[],0],s=[[],0],a=0;a<t.lengths.length;a++){var l=e.mergeDimensions(t.lengths[a],n.lengths[a],2==a);o[0].push(l[0]),s[0].push(l[1]),r.push(l[2])}if(t.color&&n.color){var c=e.mergeColors(t.color,n.color);o[1]=c[0],s[1]=c[1],i=c[2]}return[o,s,function(e){for(var n=t.inset?"inset ":" ",o=0;o<r.length;o++)n+=r[o](e[0][o])+" ";return i&&(n+=i(e[1])),n}]}}function r(t,n,i,r){function o(e){return{inset:e,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var s=[],a=[],l=0;l<i.length||l<r.length;l++){var c=i[l]||o(r[l].inset),u=r[l]||o(i[l].inset);s.push(c),a.push(u)}return e.mergeNestedRepeated(t,n,s,a)}var o=r.bind(null,i,", ");e.addPropertiesHandler(n,o,["box-shadow","text-shadow"])}(t),function(e,t){function n(e){return e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function i(e,t,n){return Math.min(t,Math.max(e,n))}function r(e){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e))return Number(e)}function o(e,t){return[e,t,n]}function s(e,t){if(0!=e)return l(0,1/0)(e,t)}function a(e,t){return[e,t,function(e){return Math.round(i(1,1/0,e))}]}function l(e,t){return function(r,o){return[r,o,function(r){return n(i(e,t,r))}]}}function c(e){var t=e.trim().split(/\s*[\s,]\s*/);if(0!==t.length){for(var n=[],i=0;i<t.length;i++){var o=r(t[i]);if(void 0===o)return;n.push(o)}return n}}function u(e,t){if(e.length==t.length)return[e,t,function(e){return e.map(n).join(" ")}]}function h(e,t){return[e,t,Math.round]}e.clamp=i,e.addPropertiesHandler(c,u,["stroke-dasharray"]),e.addPropertiesHandler(r,l(0,1/0),["border-image-width","line-height"]),e.addPropertiesHandler(r,l(0,1),["opacity","shape-image-threshold"]),e.addPropertiesHandler(r,s,["flex-grow","flex-shrink"]),e.addPropertiesHandler(r,a,["orphans","widows"]),e.addPropertiesHandler(r,h,["z-index"]),e.parseNumber=r,e.parseNumberList=c,e.mergeNumbers=o,e.numberToString=n}(t),function(e,t){function n(e,t){if("visible"==e||"visible"==t)return[0,1,function(n){return n<=0?e:n>=1?t:"visible"}]}e.addPropertiesHandler(String,n,["visibility"])}(t),function(e,t){function n(e){e=e.trim(),o.fillStyle="#000",o.fillStyle=e;var t=o.fillStyle;if(o.fillStyle="#fff",o.fillStyle=e,t==o.fillStyle){o.fillRect(0,0,1,1);var n=o.getImageData(0,0,1,1).data;o.clearRect(0,0,1,1);var i=n[3]/255;return[n[0]*i,n[1]*i,n[2]*i,i]}}function i(t,n){return[t,n,function(t){function n(e){return Math.max(0,Math.min(255,e))}if(t[3])for(var i=0;i<3;i++)t[i]=Math.round(n(t[i]/t[3]));return t[3]=e.numberToString(e.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=r.height=1;var o=r.getContext("2d");e.addPropertiesHandler(n,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),e.consumeColor=e.consumeParenthesised.bind(null,n),e.mergeColors=i}(t),function(e,t){function n(e){function t(){var t=a.exec(e);s=t?t[0]:void 0}function n(){var e=Number(s);return t(),e}function i(){if("("!==s)return n();t();var e=o();return")"!==s?NaN:(t(),e)}function r(){for(var e=i();"*"===s||"/"===s;){var n=s;t();var r=i();"*"===n?e*=r:e/=r}return e}function o(){for(var e=r();"+"===s||"-"===s;){var n=s;t();var i=r();"+"===n?e+=i:e-=i}return e}var s,a=/([\+\-\w\.]+|[\(\)\*\/])/g;return t(),o()}function i(e,t){if("0"==(t=t.trim().toLowerCase())&&"px".search(e)>=0)return{px:0};if(/^[^(]*$|^calc/.test(t)){t=t.replace(/calc\(/g,"(");var i={};t=t.replace(e,(function(e){return i[e]=null,"U"+e}));for(var r="U("+e.source+")",o=t.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+r,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),s=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],a=0;a<s.length;)s[a].test(o)?(o=o.replace(s[a],"$1"),a=0):a++;if("D"==o){for(var l in i){var c=n(t.replace(new RegExp("U"+l,"g"),"").replace(new RegExp(r,"g"),"*0"));if(!isFinite(c))return;i[l]=c}return i}}}function r(e,t){return o(e,t,!0)}function o(t,n,i){var r,o=[];for(r in t)o.push(r);for(r in n)o.indexOf(r)<0&&o.push(r);return t=o.map((function(e){return t[e]||0})),n=o.map((function(e){return n[e]||0})),[t,n,function(t){var n=t.map((function(n,r){return 1==t.length&&i&&(n=Math.max(n,0)),e.numberToString(n)+o[r]})).join(" + ");return t.length>1?"calc("+n+")":n}]}var s="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",a=i.bind(null,new RegExp(s,"g")),l=i.bind(null,new RegExp(s+"|%","g")),c=i.bind(null,/deg|rad|grad|turn/g);e.parseLength=a,e.parseLengthOrPercent=l,e.consumeLengthOrPercent=e.consumeParenthesised.bind(null,l),e.parseAngle=c,e.mergeDimensions=o;var u=e.consumeParenthesised.bind(null,a),h=e.consumeRepeated.bind(void 0,u,/^/),d=e.consumeRepeated.bind(void 0,h,/^,/);e.consumeSizePairList=d;var p=function(e){var t=d(e);if(t&&""==t[1])return t[0]},f=e.mergeNestedRepeated.bind(void 0,r," "),m=e.mergeNestedRepeated.bind(void 0,f,",");e.mergeNonNegativeSizePair=f,e.addPropertiesHandler(p,m,["background-size"]),e.addPropertiesHandler(l,r,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),e.addPropertiesHandler(l,o,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(t),function(e,t){function n(t){return e.consumeLengthOrPercent(t)||e.consumeToken(/^auto/,t)}function i(t){var i=e.consumeList([e.ignore(e.consumeToken.bind(null,/^rect/)),e.ignore(e.consumeToken.bind(null,/^\(/)),e.consumeRepeated.bind(null,n,/^,/),e.ignore(e.consumeToken.bind(null,/^\)/))],t);if(i&&4==i[0].length)return i[0]}function r(t,n){return"auto"==t||"auto"==n?[!0,!1,function(i){var r=i?t:n;if("auto"==r)return"auto";var o=e.mergeDimensions(r,r);return o[2](o[0])}]:e.mergeDimensions(t,n)}function o(e){return"rect("+e+")"}var s=e.mergeWrappedNestedRepeated.bind(null,o,r,", ");e.parseBox=i,e.mergeBoxes=s,e.addPropertiesHandler(i,s,["clip"])}(t),function(e,t){function n(e){return function(t){var n=0;return e.map((function(e){return e===u?t[n++]:e}))}}function i(e){return e}function r(t){if("none"==(t=t.toLowerCase().trim()))return[];for(var n,i=/\s*(\w+)\(([^)]*)\)/g,r=[],o=0;n=i.exec(t);){if(n.index!=o)return;o=n.index+n[0].length;var s=n[1],a=p[s];if(!a)return;var l=n[2].split(","),c=a[0];if(c.length<l.length)return;for(var u=[],f=0;f<c.length;f++){var m,g=l[f],y=c[f];if(void 0===(m=g?{A:function(t){return"0"==t.trim()?d:e.parseAngle(t)},N:e.parseNumber,T:e.parseLengthOrPercent,L:e.parseLength}[y.toUpperCase()](g):{a:d,n:u[0],t:h}[y]))return;u.push(m)}if(r.push({t:s,d:u}),i.lastIndex==t.length)return r}}function o(e){return e.toFixed(6).replace(".000000","")}function s(t,n){if(t.decompositionPair!==n){t.decompositionPair=n;var i=e.makeMatrixDecomposition(t)}if(n.decompositionPair!==t){n.decompositionPair=t;var r=e.makeMatrixDecomposition(n)}return null==i[0]||null==r[0]?[[!1],[!0],function(e){return e?n[0].d:t[0].d}]:(i[0].push(0),r[0].push(1),[i,r,function(t){var n=e.quat(i[0][3],r[0][3],t[5]);return e.composeMatrix(t[0],t[1],t[2],n,t[4]).map(o).join(",")}])}function a(e){return e.replace(/[xy]/,"")}function l(e){return e.replace(/(x|y|z|3d)?$/,"3d")}function c(t,n){var i=e.makeMatrixDecomposition&&!0,r=!1;if(!t.length||!n.length){t.length||(r=!0,t=n,n=[]);for(var o=0;o<t.length;o++){var c=t[o].t,u=t[o].d,h="scale"==c.substr(0,5)?1:0;n.push({t:c,d:u.map((function(e){if("number"==typeof e)return h;var t={};for(var n in e)t[n]=h;return t}))})}}var d=function(e,t){return"perspective"==e&&"perspective"==t||("matrix"==e||"matrix3d"==e)&&("matrix"==t||"matrix3d"==t)},f=[],m=[],g=[];if(t.length!=n.length){if(!i)return;var y=s(t,n);f=[y[0]],m=[y[1]],g=[["matrix",[y[2]]]]}else for(o=0;o<t.length;o++){var v=t[o].t,_=n[o].t,x=t[o].d,b=n[o].d,w=p[v],T=p[_];if(d(v,_)){if(!i)return;y=s([t[o]],[n[o]]);f.push(y[0]),m.push(y[1]),g.push(["matrix",[y[2]]])}else{if(v==_)c=v;else if(w[2]&&T[2]&&a(v)==a(_))c=a(v),x=w[2](x),b=T[2](b);else{if(!w[1]||!T[1]||l(v)!=l(_)){if(!i)return;y=s(t,n);f=[y[0]],m=[y[1]],g=[["matrix",[y[2]]]];break}c=l(v),x=w[1](x),b=T[1](b)}for(var S=[],E=[],k=[],C=0;C<x.length;C++){var A="number"==typeof x[C]?e.mergeNumbers:e.mergeDimensions;y=A(x[C],b[C]);S[C]=y[0],E[C]=y[1],k.push(y[2])}f.push(S),m.push(E),g.push([c,k])}}if(r){var I=f;f=m,m=I}return[f,m,function(e){return e.map((function(e,t){var n=e.map((function(e,n){return g[t][1][n](e)})).join(",");return"matrix"==g[t][0]&&16==n.split(",").length&&(g[t][0]="matrix3d"),g[t][0]+"("+n+")"})).join(" ")}]}var u=null,h={px:0},d={deg:0},p={matrix:["NNNNNN",[u,u,0,0,u,u,0,0,0,0,1,0,u,u,0,1],i],matrix3d:["NNNNNNNNNNNNNNNN",i],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",n([u,u,1]),i],scalex:["N",n([u,1,1]),n([u,1])],scaley:["N",n([1,u,1]),n([1,u])],scalez:["N",n([1,1,u])],scale3d:["NNN",i],skew:["Aa",null,i],skewx:["A",null,n([u,d])],skewy:["A",null,n([d,u])],translate:["Tt",n([u,u,h]),i],translatex:["T",n([u,h,h]),n([u,h])],translatey:["T",n([h,u,h]),n([h,u])],translatez:["L",n([h,h,u])],translate3d:["TTL",i]};e.addPropertiesHandler(r,c,["transform"]),e.transformToSvgMatrix=function(t){var n=e.transformListToMatrix(r(t));return"matrix("+o(n[0])+" "+o(n[1])+" "+o(n[4])+" "+o(n[5])+" "+o(n[12])+" "+o(n[13])+")"}}(t),function(e){function t(e){var t=Number(e);if(!(isNaN(t)||t<100||t>900||t%100!=0))return t}function n(t){return t=100*Math.round(t/100),t=e.clamp(100,900,t),400===t?"normal":700===t?"bold":String(t)}function i(e,t){return[e,t,n]}e.addPropertiesHandler(t,i,["font-weight"])}(t),function(e){function t(e){var t={};for(var n in e)t[n]=-e[n];return t}function n(t){return e.consumeToken(/^(left|center|right|top|bottom)\b/i,t)||e.consumeLengthOrPercent(t)}function i(t,i){var r=e.consumeRepeated(n,/^/,i);if(r&&""==r[1]){var o=r[0];if(o[0]=o[0]||"center",o[1]=o[1]||"center",3==t&&(o[2]=o[2]||{px:0}),o.length==t){if(/top|bottom/.test(o[0])||/left|right/.test(o[1])){var a=o[0];o[0]=o[1],o[1]=a}if(/left|right|center|Object/.test(o[0])&&/top|bottom|center|Object/.test(o[1]))return o.map((function(e){return"object"==typeof e?e:s[e]}))}}}function r(i){var r=e.consumeRepeated(n,/^/,i);if(r){for(var o=r[0],a=[{"%":50},{"%":50}],l=0,c=!1,u=0;u<o.length;u++){var h=o[u];"string"==typeof h?(c=/bottom|right/.test(h),l={left:0,right:0,center:l,top:1,bottom:1}[h],a[l]=s[h],"center"==h&&l++):(c&&(h=t(h),h["%"]=(h["%"]||0)+100),a[l]=h,l++,c=!1)}return[a,r[1]]}}function o(t){var n=e.consumeRepeated(r,/^,/,t);if(n&&""==n[1])return n[0]}var s={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},a=e.mergeNestedRepeated.bind(null,e.mergeDimensions," ");e.addPropertiesHandler(i.bind(null,3),a,["transform-origin"]),e.addPropertiesHandler(i.bind(null,2),a,["perspective-origin"]),e.consumePosition=r,e.mergeOffsetList=a;var l=e.mergeNestedRepeated.bind(null,a,", ");e.addPropertiesHandler(o,l,["background-position","object-position"])}(t),function(e){function t(t){var n=e.consumeToken(/^circle/,t);if(n&&n[0])return["circle"].concat(e.consumeList([e.ignore(e.consumeToken.bind(void 0,/^\(/)),i,e.ignore(e.consumeToken.bind(void 0,/^at/)),e.consumePosition,e.ignore(e.consumeToken.bind(void 0,/^\)/))],n[1]));var o=e.consumeToken(/^ellipse/,t);if(o&&o[0])return["ellipse"].concat(e.consumeList([e.ignore(e.consumeToken.bind(void 0,/^\(/)),r,e.ignore(e.consumeToken.bind(void 0,/^at/)),e.consumePosition,e.ignore(e.consumeToken.bind(void 0,/^\)/))],o[1]));var s=e.consumeToken(/^polygon/,t);return s&&s[0]?["polygon"].concat(e.consumeList([e.ignore(e.consumeToken.bind(void 0,/^\(/)),e.optional(e.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),e.consumeSizePairList,e.ignore(e.consumeToken.bind(void 0,/^\)/))],s[1])):void 0}function n(t,n){if(t[0]===n[0])return"circle"==t[0]?e.mergeList(t.slice(1),n.slice(1),["circle(",e.mergeDimensions," at ",e.mergeOffsetList,")"]):"ellipse"==t[0]?e.mergeList(t.slice(1),n.slice(1),["ellipse(",e.mergeNonNegativeSizePair," at ",e.mergeOffsetList,")"]):"polygon"==t[0]&&t[1]==n[1]?e.mergeList(t.slice(2),n.slice(2),["polygon(",t[1],s,")"]):void 0}var i=e.consumeParenthesised.bind(null,e.parseLengthOrPercent),r=e.consumeRepeated.bind(void 0,i,/^/),o=e.mergeNestedRepeated.bind(void 0,e.mergeDimensions," "),s=e.mergeNestedRepeated.bind(void 0,o,",");e.addPropertiesHandler(t,n,["shape-outside"])}(t),function(e,t){function n(e,t){t.concat([e]).forEach((function(t){t in document.documentElement.style&&(i[e]=t),r[t]=e}))}var i={},r={};n("transform",["webkitTransform","msTransform"]),n("transformOrigin",["webkitTransformOrigin"]),n("perspective",["webkitPerspective"]),n("perspectiveOrigin",["webkitPerspectiveOrigin"]),e.propertyName=function(e){return i[e]||e},e.unprefixedPropertyName=function(e){return r[e]||e}}(t)}(),function(){if(void 0===document.createElement("div").animate([]).oncancel){if(window.performance&&performance.now)var e=function(){return performance.now()};else e=function(){return Date.now()};var t=function(e,t,n){this.target=e,this.currentTime=t,this.timelineTime=n,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=e,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},n=window.Element.prototype.animate;window.Element.prototype.animate=function(i,r){var o=n.call(this,i,r);o._cancelHandlers=[],o.oncancel=null;var s=o.cancel;o.cancel=function(){s.call(this);var n=new t(this,null,e()),i=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout((function(){i.forEach((function(e){e.call(n.target,n)}))}),0)};var a=o.addEventListener;o.addEventListener=function(e,t){"function"==typeof t&&"cancel"==e?this._cancelHandlers.push(t):a.call(this,e,t)};var l=o.removeEventListener;return o.removeEventListener=function(e,t){if("cancel"==e){var n=this._cancelHandlers.indexOf(t);n>=0&&this._cancelHandlers.splice(n,1)}else l.call(this,e,t)},o}}}(),function(e){var t=document.documentElement,n=null,i=!1;try{var r=getComputedStyle(t).getPropertyValue("opacity"),o="0"==r?"1":"0";n=t.animate({opacity:[o,o]},{duration:1}),n.currentTime=0,i=getComputedStyle(t).getPropertyValue("opacity")==o}catch(e){}finally{n&&n.cancel()}if(!i){var s=window.Element.prototype.animate;window.Element.prototype.animate=function(t,n){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||null===t||(t=e.convertToArrayForm(t)),s.call(this,t,n)}}}(e)}()},ebd6:function(e,t,n){var i=n("cb7c"),r=n("d8e8"),o=n("2b4c")("species");e.exports=function(e,t){var n,s=i(e).constructor;return void 0===s||void 0==(n=i(s)[o])?t:r(n)}},ebfd:function(e,t,n){var i=n("62a0")("meta"),r=n("f772"),o=n("07e3"),s=n("d9f6").f,a=0,l=Object.isExtensible||function(){return!0},c=!n("294c")((function(){return l(Object.preventExtensions({}))})),u=function(e){s(e,i,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i},d=function(e,t){if(!o(e,i)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[i].w},p=function(e){return c&&f.NEED&&l(e)&&!o(e,i)&&u(e),e},f=e.exports={KEY:i,NEED:!1,fastKey:h,getWeak:d,onFreeze:p}},ec30:function(e,t,n){"use strict";if(n("9e1e")){var i=n("2d00"),r=n("7726"),o=n("79e5"),s=n("5ca1"),a=n("0f88"),l=n("ed0b"),c=n("9b43"),u=n("f605"),h=n("4630"),d=n("32e9"),p=n("dcbc"),f=n("4588"),m=n("9def"),g=n("09fa"),y=n("77f1"),v=n("6a99"),_=n("69a8"),x=n("23c6"),b=n("d3f4"),w=n("4bf8"),T=n("33a4"),S=n("2aeb"),E=n("38fd"),k=n("9093").f,C=n("27ee"),A=n("ca5a"),I=n("2b4c"),M=n("0a49"),P=n("c366"),D=n("ebd6"),L=n("cadf"),O=n("84f2"),z=n("5cc5"),R=n("7a56"),F=n("36bd"),N=n("ba92"),B=n("86cc"),j=n("11e9"),V=B.f,$=j.f,U=r.RangeError,q=r.TypeError,G=r.Uint8Array,H="ArrayBuffer",W="Shared"+H,Z="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],Q=l.ArrayBuffer,K=l.DataView,J=M(0),ee=M(2),te=M(3),ne=M(4),ie=M(5),re=M(6),oe=P(!0),se=P(!1),ae=L.values,le=L.keys,ce=L.entries,ue=Y.lastIndexOf,he=Y.reduce,de=Y.reduceRight,pe=Y.join,fe=Y.sort,me=Y.slice,ge=Y.toString,ye=Y.toLocaleString,ve=I("iterator"),_e=I("toStringTag"),xe=A("typed_constructor"),be=A("def_constructor"),we=a.CONSTR,Te=a.TYPED,Se=a.VIEW,Ee="Wrong length!",ke=M(1,(function(e,t){return Pe(D(e,e[be]),t)})),Ce=o((function(){return 1===new G(new Uint16Array([1]).buffer)[0]})),Ae=!!G&&!!G[X].set&&o((function(){new G(1).set({})})),Ie=function(e,t){var n=f(e);if(n<0||n%t)throw U("Wrong offset!");return n},Me=function(e){if(b(e)&&Te in e)return e;throw q(e+" is not a typed array!")},Pe=function(e,t){if(!b(e)||!(xe in e))throw q("It is not a typed array constructor!");return new e(t)},De=function(e,t){return Le(D(e,e[be]),t)},Le=function(e,t){var n=0,i=t.length,r=Pe(e,i);while(i>n)r[n]=t[n++];return r},Oe=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},ze=function(e){var t,n,i,r,o,s,a=w(e),l=arguments.length,u=l>1?arguments[1]:void 0,h=void 0!==u,d=C(a);if(void 0!=d&&!T(d)){for(s=d.call(a),i=[],t=0;!(o=s.next()).done;t++)i.push(o.value);a=i}for(h&&l>2&&(u=c(u,arguments[2],2)),t=0,n=m(a.length),r=Pe(this,n);n>t;t++)r[t]=h?u(a[t],t):a[t];return r},Re=function(){var e=0,t=arguments.length,n=Pe(this,t);while(t>e)n[e]=arguments[e++];return n},Fe=!!G&&o((function(){ye.call(new G(1))})),Ne=function(){return ye.apply(Fe?me.call(Me(this)):Me(this),arguments)},Be={copyWithin:function(e,t){return N.call(Me(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Me(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Me(this),arguments)},filter:function(e){return De(this,ee(Me(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ie(Me(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return re(Me(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(Me(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return se(Me(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Me(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return pe.apply(Me(this),arguments)},lastIndexOf:function(e){return ue.apply(Me(this),arguments)},map:function(e){return ke(Me(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return he.apply(Me(this),arguments)},reduceRight:function(e){return de.apply(Me(this),arguments)},reverse:function(){var e,t=this,n=Me(t).length,i=Math.floor(n/2),r=0;while(r<i)e=t[r],t[r++]=t[--n],t[n]=e;return t},some:function(e){return te(Me(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return fe.call(Me(this),e)},subarray:function(e,t){var n=Me(this),i=n.length,r=y(e,i);return new(D(n,n[be]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,m((void 0===t?i:y(t,i))-r))}},je=function(e,t){return De(this,me.call(Me(this),e,t))},Ve=function(e){Me(this);var t=Ie(arguments[1],1),n=this.length,i=w(e),r=m(i.length),o=0;if(r+t>n)throw U(Ee);while(o<r)this[t+o]=i[o++]},$e={entries:function(){return ce.call(Me(this))},keys:function(){return le.call(Me(this))},values:function(){return ae.call(Me(this))}},Ue=function(e,t){return b(e)&&e[Te]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},qe=function(e,t){return Ue(e,t=v(t,!0))?h(2,e[t]):$(e,t)},Ge=function(e,t,n){return!(Ue(e,t=v(t,!0))&&b(n)&&_(n,"value"))||_(n,"get")||_(n,"set")||n.configurable||_(n,"writable")&&!n.writable||_(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};we||(j.f=qe,B.f=Ge),s(s.S+s.F*!we,"Object",{getOwnPropertyDescriptor:qe,defineProperty:Ge}),o((function(){ge.call({})}))&&(ge=ye=function(){return pe.call(this)});var He=p({},Be);p(He,$e),d(He,ve,$e.values),p(He,{slice:je,set:Ve,constructor:function(){},toString:ge,toLocaleString:Ne}),Oe(He,"buffer","b"),Oe(He,"byteOffset","o"),Oe(He,"byteLength","l"),Oe(He,"length","e"),V(He,_e,{get:function(){return this[Te]}}),e.exports=function(e,t,n,l){l=!!l;var c=e+(l?"Clamped":"")+"Array",h="get"+e,p="set"+e,f=r[c],y=f||{},v=f&&E(f),_=!f||!a.ABV,w={},T=f&&f[X],C=function(e,n){var i=e._d;return i.v[h](n*t+i.o,Ce)},A=function(e,n,i){var r=e._d;l&&(i=(i=Math.round(i))<0?0:i>255?255:255&i),r.v[p](n*t+r.o,i,Ce)},I=function(e,t){V(e,t,{get:function(){return C(this,t)},set:function(e){return A(this,t,e)},enumerable:!0})};_?(f=n((function(e,n,i,r){u(e,f,c,"_d");var o,s,a,l,h=0,p=0;if(b(n)){if(!(n instanceof Q||(l=x(n))==H||l==W))return Te in n?Le(f,n):ze.call(f,n);o=n,p=Ie(i,t);var y=n.byteLength;if(void 0===r){if(y%t)throw U(Ee);if(s=y-p,s<0)throw U(Ee)}else if(s=m(r)*t,s+p>y)throw U(Ee);a=s/t}else a=g(n),s=a*t,o=new Q(s);d(e,"_d",{b:o,o:p,l:s,e:a,v:new K(o)});while(h<a)I(e,h++)})),T=f[X]=S(He),d(T,"constructor",f)):o((function(){f(1)}))&&o((function(){new f(-1)}))&&z((function(e){new f,new f(null),new f(1.5),new f(e)}),!0)||(f=n((function(e,n,i,r){var o;return u(e,f,c),b(n)?n instanceof Q||(o=x(n))==H||o==W?void 0!==r?new y(n,Ie(i,t),r):void 0!==i?new y(n,Ie(i,t)):new y(n):Te in n?Le(f,n):ze.call(f,n):new y(g(n))})),J(v!==Function.prototype?k(y).concat(k(v)):k(y),(function(e){e in f||d(f,e,y[e])})),f[X]=T,i||(T.constructor=f));var M=T[ve],P=!!M&&("values"==M.name||void 0==M.name),D=$e.values;d(f,xe,!0),d(T,Te,c),d(T,Se,!0),d(T,be,f),(l?new f(1)[_e]==c:_e in T)||V(T,_e,{get:function(){return c}}),w[c]=f,s(s.G+s.W+s.F*(f!=y),w),s(s.S,c,{BYTES_PER_ELEMENT:t}),s(s.S+s.F*o((function(){y.of.call(f,1)})),c,{from:ze,of:Re}),Z in T||d(T,Z,t),s(s.P,c,Be),R(c),s(s.P+s.F*Ae,c,{set:Ve}),s(s.P+s.F*!P,c,$e),i||T.toString==ge||(T.toString=ge),s(s.P+s.F*o((function(){new f(1).slice()})),c,{slice:je}),s(s.P+s.F*(o((function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()}))||!o((function(){T.toLocaleString.call([1,2])}))),c,{toLocaleString:Ne}),O[c]=P?M:D,i||P||d(T,ve,D)}}else e.exports=function(){}},ed0b:function(e,t,n){"use strict";var i=n("7726"),r=n("9e1e"),o=n("2d00"),s=n("0f88"),a=n("32e9"),l=n("dcbc"),c=n("79e5"),u=n("f605"),h=n("4588"),d=n("9def"),p=n("09fa"),f=n("9093").f,m=n("86cc").f,g=n("36bd"),y=n("7f20"),v="ArrayBuffer",_="DataView",x="prototype",b="Wrong length!",w="Wrong index!",T=i[v],S=i[_],E=i.Math,k=i.RangeError,C=i.Infinity,A=T,I=E.abs,M=E.pow,P=E.floor,D=E.log,L=E.LN2,O="buffer",z="byteLength",R="byteOffset",F=r?"_b":O,N=r?"_l":z,B=r?"_o":R;function j(e,t,n){var i,r,o,s=new Array(n),a=8*n-t-1,l=(1<<a)-1,c=l>>1,u=23===t?M(2,-24)-M(2,-77):0,h=0,d=e<0||0===e&&1/e<0?1:0;for(e=I(e),e!=e||e===C?(r=e!=e?1:0,i=l):(i=P(D(e)/L),e*(o=M(2,-i))<1&&(i--,o*=2),e+=i+c>=1?u/o:u*M(2,1-c),e*o>=2&&(i++,o/=2),i+c>=l?(r=0,i=l):i+c>=1?(r=(e*o-1)*M(2,t),i+=c):(r=e*M(2,c-1)*M(2,t),i=0));t>=8;s[h++]=255&r,r/=256,t-=8);for(i=i<<t|r,a+=t;a>0;s[h++]=255&i,i/=256,a-=8);return s[--h]|=128*d,s}function V(e,t,n){var i,r=8*n-t-1,o=(1<<r)-1,s=o>>1,a=r-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;a>0;u=256*u+e[l],l--,a-=8);for(i=u&(1<<-a)-1,u>>=-a,a+=t;a>0;i=256*i+e[l],l--,a-=8);if(0===u)u=1-s;else{if(u===o)return i?NaN:c?-C:C;i+=M(2,t),u-=s}return(c?-1:1)*i*M(2,u-t)}function $(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function U(e){return[255&e]}function q(e){return[255&e,e>>8&255]}function G(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function H(e){return j(e,52,8)}function W(e){return j(e,23,4)}function Z(e,t,n){m(e[x],t,{get:function(){return this[n]}})}function X(e,t,n,i){var r=+n,o=p(r);if(o+t>e[N])throw k(w);var s=e[F]._b,a=o+e[B],l=s.slice(a,a+t);return i?l:l.reverse()}function Y(e,t,n,i,r,o){var s=+n,a=p(s);if(a+t>e[N])throw k(w);for(var l=e[F]._b,c=a+e[B],u=i(+r),h=0;h<t;h++)l[c+h]=u[o?h:t-h-1]}if(s.ABV){if(!c((function(){T(1)}))||!c((function(){new T(-1)}))||c((function(){return new T,new T(1.5),new T(NaN),T.name!=v}))){T=function(e){return u(this,T),new A(p(e))};for(var Q,K=T[x]=A[x],J=f(A),ee=0;J.length>ee;)(Q=J[ee++])in T||a(T,Q,A[Q]);o||(K.constructor=T)}var te=new S(new T(2)),ne=S[x].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||l(S[x],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else T=function(e){u(this,T,v);var t=p(e);this._b=g.call(new Array(t),0),this[N]=t},S=function(e,t,n){u(this,S,_),u(e,T,_);var i=e[N],r=h(t);if(r<0||r>i)throw k("Wrong offset!");if(n=void 0===n?i-r:d(n),r+n>i)throw k(b);this[F]=e,this[B]=r,this[N]=n},r&&(Z(T,z,"_l"),Z(S,O,"_b"),Z(S,z,"_l"),Z(S,R,"_o")),l(S[x],{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var t=X(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=X(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return $(X(this,4,e,arguments[1]))},getUint32:function(e){return $(X(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return V(X(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return V(X(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){Y(this,1,e,U,t)},setUint8:function(e,t){Y(this,1,e,U,t)},setInt16:function(e,t){Y(this,2,e,q,t,arguments[2])},setUint16:function(e,t){Y(this,2,e,q,t,arguments[2])},setInt32:function(e,t){Y(this,4,e,G,t,arguments[2])},setUint32:function(e,t){Y(this,4,e,G,t,arguments[2])},setFloat32:function(e,t){Y(this,4,e,W,t,arguments[2])},setFloat64:function(e,t){Y(this,8,e,H,t,arguments[2])}});y(T,v),y(S,_),a(S[x],s.VIEW,!0),t[v]=T,t[_]=S},f1ae:function(e,t,n){"use strict";var i=n("86cc"),r=n("4630");e.exports=function(e,t,n){t in e?i.f(e,t,r(0,n)):e[t]=n}},f201:function(e,t,n){var i=n("e4ae"),r=n("79aa"),o=n("5168")("species");e.exports=function(e,t){var n,s=i(e).constructor;return void 0===s||void 0==(n=i(s)[o])?t:r(n)}},f28c:function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function l(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"===typeof clearTimeout?clearTimeout:s}catch(e){i=s}})();var c,u=[],h=!1,d=-1;function p(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!h){var e=a(p);h=!0;var t=u.length;while(t){c=u,u=[];while(++d<t)c&&c[d].run();d=-1,t=u.length}c=null,h=!1,l(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||h||a(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},f410:function(e,t,n){n("1af6"),e.exports=n("584a").Array.isArray},f576:function(e,t,n){"use strict";var i=n("5ca1"),r=n("2e08"),o=n("a25f"),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);i(i.P+i.F*s,"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},f605:function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},f6b4:function(e,t,n){"use strict";var i=n("c532");function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},f751:function(e,t,n){var i=n("5ca1");i(i.S+i.F,"Object",{assign:n("7333")})},f772:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},f921:function(e,t,n){n("014b"),n("c207"),n("69d3"),n("765d"),e.exports=n("584a").Symbol},f9a4:function(e,t,n){var i,r;!function(n,o){i=[],r=function(){return n.svg4everybody=o()}.apply(t,i),void 0===r||(e.exports=r)}(this,(function(){
/*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */
function e(e,t,n){if(n){var i=document.createDocumentFragment(),r=!t.hasAttribute("viewBox")&&n.getAttribute("viewBox");r&&t.setAttribute("viewBox",r);for(var o=n.cloneNode(!0);o.childNodes.length;)i.appendChild(o.firstChild);e.appendChild(i)}}function t(t){t.onreadystatechange=function(){if(4===t.readyState){var n=t._cachedDocument;n||(n=t._cachedDocument=document.implementation.createHTMLDocument(""),n.body.innerHTML=t.responseText,t._cachedTarget={}),t._embeds.splice(0).map((function(i){var r=t._cachedTarget[i.id];r||(r=t._cachedTarget[i.id]=n.getElementById(i.id)),e(i.parent,i.svg,r)}))}},t.onreadystatechange()}function n(n){function r(){for(var n=0;n<f.length;){var a=f[n],l=a.parentNode,c=i(l),u=a.getAttribute("xlink:href")||a.getAttribute("href");if(!u&&s.attributeName&&(u=a.getAttribute(s.attributeName)),c&&u){if(o)if(!s.validate||s.validate(u,c,a)){l.removeChild(a);var h=u.split("#"),g=h.shift(),y=h.join("#");if(g.length){var v=d[g];v||(v=d[g]=new XMLHttpRequest,v.open("GET",g),v.send(),v._embeds=[]),v._embeds.push({parent:l,svg:c,id:y}),t(v)}else e(l,c,document.getElementById(y))}else++n,++m}else++n}(!f.length||f.length-m>0)&&p(r,67)}var o,s=Object(n),a=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,l=/\bAppleWebKit\/(\d+)\b/,c=/\bEdge\/12\.(\d+)\b/,u=/\bEdge\/.(\d+)\b/,h=window.top!==window.self;o="polyfill"in s?s.polyfill:a.test(navigator.userAgent)||(navigator.userAgent.match(c)||[])[1]<10547||(navigator.userAgent.match(l)||[])[1]<537||u.test(navigator.userAgent)&&h;var d={},p=window.requestAnimationFrame||setTimeout,f=document.getElementsByTagName("use"),m=0;o&&r()}function i(e){for(var t=e;"svg"!==t.nodeName.toLowerCase()&&(t=t.parentNode););return t}return n}))},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var i=n("7726").document;e.exports=i&&i.documentElement},fdef:function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"}}]);
//# sourceMappingURL=chunk-vendors.js.map