text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.deck=e():t.deck=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=167)}([function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){"use strict";var r=n(190);function i(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}function a(t){for(var e in t)return!1;return!0}function o(t,e){if(t===e)return!0;var n=Array.isArray(t)||ArrayBuffer.isView(t),r=Array.isArray(e)||ArrayBuffer.isView(e);if(n&&r&&t.length===e.length){for(var i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}return!1}function s(t){if(t.canvas&&t.luma){var e=t.luma.canvasSizeInfo.clientWidth;return e?t.drawingBufferWidth/e:1}return 1}function u(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(t,e,n,r,i){var a,o=c(t[0],e,n),s=l(t[1],e,r,i),u=c(t[0]+1,e,n),h=u===n-1?u:u-1;u=l(t[1]+1,e,r,i),i?(a=s,s=u=0===u?u:u+1):a=u===r-1?u:u-1;return{x:o,y:s,width:Math.max(h-o+1,1),height:Math.max(a-s+1,1)}}(e,s(t),t.drawingBufferWidth,t.drawingBufferHeight,n)}function c(t,e,n){return Math.min(Math.round(t*e),n-1)}function l(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}function h(t){return Boolean(t&&Number.isFinite(t._version))}function f(t){return Boolean(t&&2===t._version)}var d,v,p=new r.a({id:"luma.gl"}),g=n(0),b=function(t){return f(t)?void 0:0},y=(d={},Object(g.a)(d,3074,(function(t){return f(t)?void 0:36064})),Object(g.a)(d,35723,(function(t){return f(t)?void 0:4352})),Object(g.a)(d,35977,b),Object(g.a)(d,32937,b),Object(g.a)(d,36795,(function(t,e){var n=f(t)?t.getExtension("EXT_disjoint_timer_query_webgl2"):t.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?e(n.GPU_DISJOINT_EXT):0})),Object(g.a)(d,37445,(function(t,e){var n=t.getExtension("WEBGL_debug_renderer_info");return e(n&&n.UNMASKED_VENDOR_WEBGL||7936)})),Object(g.a)(d,37446,(function(t,e){var n=t.getExtension("WEBGL_debug_renderer_info");return e(n&&n.UNMASKED_RENDERER_WEBGL||7937)})),Object(g.a)(d,34047,(function(t,e){var n=t.luma.extensions.EXT_texture_filter_anisotropic;return n?e(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1})),Object(g.a)(d,32883,b),Object(g.a)(d,35071,b),Object(g.a)(d,37447,b),Object(g.a)(d,36063,(function(t,e){if(!f(t)){var n=t.getExtension("WEBGL_draw_buffers");return n?e(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}})),Object(g.a)(d,35379,b),Object(g.a)(d,35374,b),Object(g.a)(d,35377,b),Object(g.a)(d,34852,(function(t){if(!f(t)){var e=t.getExtension("WEBGL_draw_buffers");return e?e.MAX_DRAW_BUFFERS_WEBGL:0}})),Object(g.a)(d,36203,(function(t){return t.getExtension("OES_element_index")?2147483647:65535})),Object(g.a)(d,33001,(function(t){return t.getExtension("OES_element_index")?16777216:65535})),Object(g.a)(d,33e3,(function(t){return 16777216})),Object(g.a)(d,37157,b),Object(g.a)(d,35373,b),Object(g.a)(d,35657,b),Object(g.a)(d,36183,b),Object(g.a)(d,37137,b),Object(g.a)(d,34045,b),Object(g.a)(d,35978,b),Object(g.a)(d,35979,b),Object(g.a)(d,35968,b),Object(g.a)(d,35376,b),Object(g.a)(d,35375,b),Object(g.a)(d,35659,b),Object(g.a)(d,37154,b),Object(g.a)(d,35371,b),Object(g.a)(d,35658,b),Object(g.a)(d,35076,b),Object(g.a)(d,35077,b),Object(g.a)(d,35380,b),d);var m=(v={},Object(g.a)(v,"OES_vertex_array_object",{meta:{suffix:"OES"},createVertexArray:function(){i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:function(){},bindVertexArray:function(){},isVertexArray:function(){return!1}}),Object(g.a)(v,"ANGLE_instanced_arrays",{meta:{suffix:"ANGLE"},vertexAttribDivisor:function(t,e){i(0===e,"WebGL instanced rendering not supported")},drawElementsInstanced:function(){},drawArraysInstanced:function(){}}),Object(g.a)(v,"WEBGL_draw_buffers",{meta:{suffix:"WEBGL"},drawBuffers:function(){i(!1)}}),Object(g.a)(v,"EXT_disjoint_timer_query",{meta:{suffix:"EXT"},createQuery:function(){i(!1)},deleteQuery:function(){i(!1)},beginQuery:function(){i(!1)},endQuery:function(){},getQuery:function(t,e){return this.getQueryObject(t,e)},getQueryParameter:function(t,e){return this.getQueryObject(t,e)},getQueryObject:function(){}}),v),_={readBuffer:function(t,e,n){f(t)&&e(n)},getVertexAttrib:function(t,e,n,r){var i,a=function(t,e){return{webgl2:f(t),ext:t.getExtension(e)}}(t,"ANGLE_instanced_arrays"),o=a.webgl2,s=a.ext;switch(r){case 35069:i=!!o&&void 0;break;case 35070:i=o||s?void 0:0}return void 0!==i?i:e(n,r)},getProgramParameter:function(t,e,n,r){if(!f(t))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return e(n,r)},getInternalformatParameter:function(t,e,n,r,i){if(!f(t))switch(i){case 32937:return new Int32Array([0])}return t.getInternalformatParameter(n,r,i)},getTexParameter:function(t,e,n,r){switch(r){case 34046:var i=t.luma.extensions.EXT_texture_filter_anisotropic;r=i&&i.TEXTURE_MAX_ANISOTROPY_EXT||34046}return e(n,r)},getParameter:function(t,e,n){var r=y[n],i="function"==typeof r?r(t,e,n):r;return void 0!==i?i:e(n)},hint:function(t,e,n,r){return e(n,r)}};function O(t,e){var n=e.extension,r=e.target,a=e.target2,o=m[n];i(o);for(var s=o.meta,u=(void 0===s?{}:s).suffix,c=void 0===u?"":u,l=t.getExtension(n),h=function(){var e=d[f],n="".concat(e).concat(c),i=null;"meta"===e||"function"==typeof t[e]||(l&&"function"==typeof l[n]?i=function(){return l[n].apply(l,arguments)}:"function"==typeof o[e]&&(i=o[e].bind(r))),i&&(r[e]=i,a[e]=i)},f=0,d=Object.keys(o);f<d.length;f++)h()}("undefined"!=typeof global?global:window).polyfillContext=function(t){return t.luma=t.luma||{},function(t){t.luma.extensions={};var e=t.getSupportedExtensions()||[],n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t.luma[s]=t.getExtension(s)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(t),t.luma.polyfilled||(!function(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=Object.getOwnPropertyNames(e)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;"overrides"!==s&&O(t,{extension:s,target:t.luma,target2:t})}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(t,m),function(t,e){var n=e.target,r=e.target2;Object.keys(_).forEach((function(e){if("function"==typeof _[e]){var i=t[e]?t[e].bind(t):function(){},a=_[e].bind(null,t,i);n[e]=a,r[e]=a}}))}(t,{target:t.luma,target2:t}),t.luma.polyfilled=!0),t};var w,j,k,x=n(19),E=n(23),P=(w={},Object(g.a)(w,3042,!1),Object(g.a)(w,32773,new Float32Array([0,0,0,0])),Object(g.a)(w,32777,32774),Object(g.a)(w,34877,32774),Object(g.a)(w,32969,1),Object(g.a)(w,32968,0),Object(g.a)(w,32971,1),Object(g.a)(w,32970,0),Object(g.a)(w,3106,new Float32Array([0,0,0,0])),Object(g.a)(w,3107,[!0,!0,!0,!0]),Object(g.a)(w,2884,!1),Object(g.a)(w,2885,1029),Object(g.a)(w,2929,!1),Object(g.a)(w,2931,1),Object(g.a)(w,2932,513),Object(g.a)(w,2928,new Float32Array([0,1])),Object(g.a)(w,2930,!0),Object(g.a)(w,3024,!0),Object(g.a)(w,36006,null),Object(g.a)(w,2886,2305),Object(g.a)(w,33170,4352),Object(g.a)(w,2849,1),Object(g.a)(w,32823,!1),Object(g.a)(w,32824,0),Object(g.a)(w,10752,0),Object(g.a)(w,32938,1),Object(g.a)(w,32939,!1),Object(g.a)(w,3089,!1),Object(g.a)(w,3088,new Int32Array([0,0,1024,1024])),Object(g.a)(w,2960,!1),Object(g.a)(w,2961,0),Object(g.a)(w,2968,4294967295),Object(g.a)(w,36005,4294967295),Object(g.a)(w,2962,519),Object(g.a)(w,2967,0),Object(g.a)(w,2963,4294967295),Object(g.a)(w,34816,519),Object(g.a)(w,36003,0),Object(g.a)(w,36004,4294967295),Object(g.a)(w,2964,7680),Object(g.a)(w,2965,7680),Object(g.a)(w,2966,7680),Object(g.a)(w,34817,7680),Object(g.a)(w,34818,7680),Object(g.a)(w,34819,7680),Object(g.a)(w,2978,[0,0,1024,1024]),Object(g.a)(w,3333,4),Object(g.a)(w,3317,4),Object(g.a)(w,37440,!1),Object(g.a)(w,37441,!1),Object(g.a)(w,37443,37444),Object(g.a)(w,35723,4352),Object(g.a)(w,36010,null),Object(g.a)(w,35977,!1),Object(g.a)(w,3330,0),Object(g.a)(w,3332,0),Object(g.a)(w,3331,0),Object(g.a)(w,3314,0),Object(g.a)(w,32878,0),Object(g.a)(w,3316,0),Object(g.a)(w,3315,0),Object(g.a)(w,32877,0),w),T=function(t,e,n){return e?t.enable(n):t.disable(n)},S=function(t,e,n){return t.hint(n,e)},A=function(t,e,n){return t.pixelStorei(n,e)};function M(t){return Array.isArray(t)||ArrayBuffer.isView(t)}var L=(j={},Object(g.a)(j,3042,T),Object(g.a)(j,32773,(function(t,e){return t.blendColor.apply(t,Object(E.a)(e))})),Object(g.a)(j,32777,"blendEquation"),Object(g.a)(j,34877,"blendEquation"),Object(g.a)(j,32969,"blendFunc"),Object(g.a)(j,32968,"blendFunc"),Object(g.a)(j,32971,"blendFunc"),Object(g.a)(j,32970,"blendFunc"),Object(g.a)(j,3106,(function(t,e){return t.clearColor.apply(t,Object(E.a)(e))})),Object(g.a)(j,3107,(function(t,e){return t.colorMask.apply(t,Object(E.a)(e))})),Object(g.a)(j,2884,T),Object(g.a)(j,2885,(function(t,e){return t.cullFace(e)})),Object(g.a)(j,2929,T),Object(g.a)(j,2931,(function(t,e){return t.clearDepth(e)})),Object(g.a)(j,2932,(function(t,e){return t.depthFunc(e)})),Object(g.a)(j,2928,(function(t,e){return t.depthRange.apply(t,Object(E.a)(e))})),Object(g.a)(j,2930,(function(t,e){return t.depthMask(e)})),Object(g.a)(j,3024,T),Object(g.a)(j,35723,S),Object(g.a)(j,36006,(function(t,e){var n=f(t)?36009:36160;return t.bindFramebuffer(n,e)})),Object(g.a)(j,2886,(function(t,e){return t.frontFace(e)})),Object(g.a)(j,33170,S),Object(g.a)(j,2849,(function(t,e){return t.lineWidth(e)})),Object(g.a)(j,32823,T),Object(g.a)(j,32824,"polygonOffset"),Object(g.a)(j,10752,"polygonOffset"),Object(g.a)(j,35977,T),Object(g.a)(j,32938,"sampleCoverage"),Object(g.a)(j,32939,"sampleCoverage"),Object(g.a)(j,3089,T),Object(g.a)(j,3088,(function(t,e){return t.scissor.apply(t,Object(E.a)(e))})),Object(g.a)(j,2960,T),Object(g.a)(j,2961,(function(t,e){return t.clearStencil(e)})),Object(g.a)(j,2968,(function(t,e){return t.stencilMaskSeparate(1028,e)})),Object(g.a)(j,36005,(function(t,e){return t.stencilMaskSeparate(1029,e)})),Object(g.a)(j,2962,"stencilFuncFront"),Object(g.a)(j,2967,"stencilFuncFront"),Object(g.a)(j,2963,"stencilFuncFront"),Object(g.a)(j,34816,"stencilFuncBack"),Object(g.a)(j,36003,"stencilFuncBack"),Object(g.a)(j,36004,"stencilFuncBack"),Object(g.a)(j,2964,"stencilOpFront"),Object(g.a)(j,2965,"stencilOpFront"),Object(g.a)(j,2966,"stencilOpFront"),Object(g.a)(j,34817,"stencilOpBack"),Object(g.a)(j,34818,"stencilOpBack"),Object(g.a)(j,34819,"stencilOpBack"),Object(g.a)(j,2978,(function(t,e){return t.viewport.apply(t,Object(E.a)(e))})),Object(g.a)(j,3333,A),Object(g.a)(j,3317,A),Object(g.a)(j,37440,A),Object(g.a)(j,37441,A),Object(g.a)(j,37443,A),Object(g.a)(j,3330,A),Object(g.a)(j,3332,A),Object(g.a)(j,3331,A),Object(g.a)(j,36010,(function(t,e){return t.bindFramebuffer(36008,e)})),Object(g.a)(j,3314,A),Object(g.a)(j,32878,A),Object(g.a)(j,3316,A),Object(g.a)(j,3315,A),Object(g.a)(j,32877,A),Object(g.a)(j,"framebuffer",(function(t,e){var n=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,n)})),Object(g.a)(j,"blend",(function(t,e){return e?t.enable(3042):t.disable(3042)})),Object(g.a)(j,"blendColor",(function(t,e){return t.blendColor.apply(t,Object(E.a)(e))})),Object(g.a)(j,"blendEquation",(function(t,e){e=M(e)?e:[e,e],t.blendEquationSeparate.apply(t,Object(E.a)(e))})),Object(g.a)(j,"blendFunc",(function(t,e){e=M(e)&&2===e.length?[].concat(Object(E.a)(e),Object(E.a)(e)):e,t.blendFuncSeparate.apply(t,Object(E.a)(e))})),Object(g.a)(j,"clearColor",(function(t,e){return t.clearColor.apply(t,Object(E.a)(e))})),Object(g.a)(j,"clearDepth",(function(t,e){return t.clearDepth(e)})),Object(g.a)(j,"clearStencil",(function(t,e){return t.clearStencil(e)})),Object(g.a)(j,"colorMask",(function(t,e){return t.colorMask.apply(t,Object(E.a)(e))})),Object(g.a)(j,"cull",(function(t,e){return e?t.enable(2884):t.disable(2884)})),Object(g.a)(j,"cullFace",(function(t,e){return t.cullFace(e)})),Object(g.a)(j,"depthTest",(function(t,e){return e?t.enable(2929):t.disable(2929)})),Object(g.a)(j,"depthFunc",(function(t,e){return t.depthFunc(e)})),Object(g.a)(j,"depthMask",(function(t,e){return t.depthMask(e)})),Object(g.a)(j,"depthRange",(function(t,e){return t.depthRange.apply(t,Object(E.a)(e))})),Object(g.a)(j,"dither",(function(t,e){return e?t.enable(3024):t.disable(3024)})),Object(g.a)(j,"derivativeHint",(function(t,e){t.hint(35723,e)})),Object(g.a)(j,"frontFace",(function(t,e){return t.frontFace(e)})),Object(g.a)(j,"mipmapHint",(function(t,e){return t.hint(33170,e)})),Object(g.a)(j,"lineWidth",(function(t,e){return t.lineWidth(e)})),Object(g.a)(j,"polygonOffsetFill",(function(t,e){return e?t.enable(32823):t.disable(32823)})),Object(g.a)(j,"polygonOffset",(function(t,e){return t.polygonOffset.apply(t,Object(E.a)(e))})),Object(g.a)(j,"sampleCoverage",(function(t,e){return t.sampleCoverage.apply(t,Object(E.a)(e))})),Object(g.a)(j,"scissorTest",(function(t,e){return e?t.enable(3089):t.disable(3089)})),Object(g.a)(j,"scissor",(function(t,e){return t.scissor.apply(t,Object(E.a)(e))})),Object(g.a)(j,"stencilTest",(function(t,e){return e?t.enable(2960):t.disable(2960)})),Object(g.a)(j,"stencilMask",(function(t,e){var n=e=M(e)?e:[e,e],r=Object(x.a)(n,2),i=r[0],a=r[1];t.stencilMaskSeparate(1028,i),t.stencilMaskSeparate(1029,a)})),Object(g.a)(j,"stencilFunc",(function(t,e){var n=e=M(e)&&3===e.length?[].concat(Object(E.a)(e),Object(E.a)(e)):e,r=Object(x.a)(n,6),i=r[0],a=r[1],o=r[2],s=r[3],u=r[4],c=r[5];t.stencilFuncSeparate(1028,i,a,o),t.stencilFuncSeparate(1029,s,u,c)})),Object(g.a)(j,"stencilOp",(function(t,e){var n=e=M(e)&&3===e.length?[].concat(Object(E.a)(e),Object(E.a)(e)):e,r=Object(x.a)(n,6),i=r[0],a=r[1],o=r[2],s=r[3],u=r[4],c=r[5];t.stencilOpSeparate(1028,i,a,o),t.stencilOpSeparate(1029,s,u,c)})),Object(g.a)(j,"viewport",(function(t,e){return t.viewport.apply(t,Object(E.a)(e))})),j);function C(t,e,n){return void 0!==e[t]?e[t]:n[t]}var I={blendEquation:function(t,e,n){return t.blendEquationSeparate(C(32777,e,n),C(34877,e,n))},blendFunc:function(t,e,n){return t.blendFuncSeparate(C(32969,e,n),C(32968,e,n),C(32971,e,n),C(32970,e,n))},polygonOffset:function(t,e,n){return t.polygonOffset(C(32824,e,n),C(10752,e,n))},sampleCoverage:function(t,e,n){return t.sampleCoverage(C(32938,e,n),C(32939,e,n))},stencilFuncFront:function(t,e,n){return t.stencilFuncSeparate(1028,C(2962,e,n),C(2967,e,n),C(2963,e,n))},stencilFuncBack:function(t,e,n){return t.stencilFuncSeparate(1029,C(34816,e,n),C(36003,e,n),C(36004,e,n))},stencilOpFront:function(t,e,n){return t.stencilOpSeparate(1028,C(2964,e,n),C(2965,e,n),C(2966,e,n))},stencilOpBack:function(t,e,n){return t.stencilOpSeparate(1029,C(34817,e,n),C(34818,e,n),C(34819,e,n))}},R={enable:function(t,e){return t(Object(g.a)({},e,!0))},disable:function(t,e){return t(Object(g.a)({},e,!1))},pixelStorei:function(t,e,n){return t(Object(g.a)({},e,n))},hint:function(t,e,n){return t(Object(g.a)({},e,n))},bindFramebuffer:function(t,e,n){var r;switch(e){case 36160:return t((r={},Object(g.a)(r,36006,n),Object(g.a)(r,36010,n),r));case 36009:return t(Object(g.a)({},36006,n));case 36008:return t(Object(g.a)({},36010,n));default:return null}},blendColor:function(t,e,n,r,i){return t(Object(g.a)({},32773,new Float32Array([e,n,r,i])))},blendEquation:function(t,e){var n;return t((n={},Object(g.a)(n,32777,e),Object(g.a)(n,34877,e),n))},blendEquationSeparate:function(t,e,n){var r;return t((r={},Object(g.a)(r,32777,e),Object(g.a)(r,34877,n),r))},blendFunc:function(t,e,n){var r;return t((r={},Object(g.a)(r,32969,e),Object(g.a)(r,32968,n),Object(g.a)(r,32971,e),Object(g.a)(r,32970,n),r))},blendFuncSeparate:function(t,e,n,r,i){var a;return t((a={},Object(g.a)(a,32969,e),Object(g.a)(a,32968,n),Object(g.a)(a,32971,r),Object(g.a)(a,32970,i),a))},clearColor:function(t,e,n,r,i){return t(Object(g.a)({},3106,new Float32Array([e,n,r,i])))},clearDepth:function(t,e){return t(Object(g.a)({},2931,e))},clearStencil:function(t,e){return t(Object(g.a)({},2961,e))},colorMask:function(t,e,n,r,i){return t(Object(g.a)({},3107,[e,n,r,i]))},cullFace:function(t,e){return t(Object(g.a)({},2885,e))},depthFunc:function(t,e){return t(Object(g.a)({},2932,e))},depthRange:function(t,e,n){return t(Object(g.a)({},2928,new Float32Array([e,n])))},depthMask:function(t,e){return t(Object(g.a)({},2930,e))},frontFace:function(t,e){return t(Object(g.a)({},2886,e))},lineWidth:function(t,e){return t(Object(g.a)({},2849,e))},polygonOffset:function(t,e,n){var r;return t((r={},Object(g.a)(r,32824,e),Object(g.a)(r,10752,n),r))},sampleCoverage:function(t,e,n){var r;return t((r={},Object(g.a)(r,32938,e),Object(g.a)(r,32939,n),r))},scissor:function(t,e,n,r,i){return t(Object(g.a)({},3088,new Int32Array([e,n,r,i])))},stencilMask:function(t,e){var n;return t((n={},Object(g.a)(n,2968,e),Object(g.a)(n,36005,e),n))},stencilMaskSeparate:function(t,e,n){return t(Object(g.a)({},1028===e?2968:36005,n))},stencilFunc:function(t,e,n,r){var i;return t((i={},Object(g.a)(i,2962,e),Object(g.a)(i,2967,n),Object(g.a)(i,2963,r),Object(g.a)(i,34816,e),Object(g.a)(i,36003,n),Object(g.a)(i,36004,r),i))},stencilFuncSeparate:function(t,e,n,r,i){var a;return t((a={},Object(g.a)(a,1028===e?2962:34816,n),Object(g.a)(a,1028===e?2967:36003,r),Object(g.a)(a,1028===e?2963:36004,i),a))},stencilOp:function(t,e,n,r){var i;return t((i={},Object(g.a)(i,2964,e),Object(g.a)(i,2965,n),Object(g.a)(i,2966,r),Object(g.a)(i,34817,e),Object(g.a)(i,34818,n),Object(g.a)(i,34819,r),i))},stencilOpSeparate:function(t,e,n,r,i){var a;return t((a={},Object(g.a)(a,1028===e?2964:34817,n),Object(g.a)(a,1028===e?2965:34818,r),Object(g.a)(a,1028===e?2966:34819,i),a))},viewport:function(t,e,n,r,i){return t(Object(g.a)({},2978,[e,n,r,i]))}},F=function(t,e){return t.isEnabled(e)},D=(k={},Object(g.a)(k,3042,F),Object(g.a)(k,2884,F),Object(g.a)(k,2929,F),Object(g.a)(k,3024,F),Object(g.a)(k,32823,F),Object(g.a)(k,32926,F),Object(g.a)(k,32928,F),Object(g.a)(k,3089,F),Object(g.a)(k,2960,F),Object(g.a)(k,35977,F),k),N=n(1),B=n(3);function z(t,e){var n=t[e].bind(t);t[e]=function(){var e=arguments.length<=0?void 0:arguments[0];return e in t.state.cache||(t.state.cache[e]=n.apply(void 0,arguments)),t.state.enable?t.state.cache[e]:n.apply(void 0,arguments)},Object.defineProperty(t[e],"name",{value:"".concat(e,"-from-cache"),configurable:!1})}function U(t,e,n){var r=t[e].bind(t);t[e]=function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];var o=n.apply(void 0,[t.state._updateCache].concat(i)),s=o.valueChanged,u=o.oldValue;return s&&r.apply(void 0,i),u},Object.defineProperty(t[e],"name",{value:"".concat(e,"-to-cache"),configurable:!1})}var V=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.copyState,i=void 0!==r&&r,a=n.log,o=void 0===a?function(){}:a;Object(N.a)(this,t),this.gl=e,this.program=null,this.stateStack=[],this.enable=!0,this.cache=i?X(e):Object.assign({},P),this.log=o,this._updateCache=this._updateCache.bind(this),Object.seal(this)}return Object(B.a)(t,[{key:"push",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.stateStack.push({})}},{key:"pop",value:function(){i(this.stateStack.length>0);var t=this.stateStack[this.stateStack.length-1];W(this.gl,t,this.cache),this.stateStack.pop()}},{key:"_updateCache",value:function(t){var e,n=!1,r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(var a in t){i(void 0!==a);var s=t[a],u=this.cache[a];o(s,u)||(n=!0,e=u,!r||a in r||(r[a]=u),this.cache[a]=s)}return{valueChanged:n,oldValue:e}}}]),t}();function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.enable,r=void 0===n||n,a=e.copyState;if(i(void 0!==a),!t.state){var o="undefined"!=typeof global?global:window;for(var s in o.polyfillContext&&o.polyfillContext(t),t.state=new V(t,{copyState:a,enable:r}),function(t){var e=t.useProgram.bind(t);t.useProgram=function(n){t.state.program!==n&&(e(n),t.state.program=n)}}(t),R){U(t,s,R[s])}z(t,"getParameter"),z(t,"isEnabled")}return t.state.enable=r,t}function H(t){i(t.state),t.state.pop()}function W(t,e){if(i(h(t),"setParameters requires a WebGL context"),!a(e)){var n={};for(var r in e){var o=Number(r),s=L[r];s&&("string"==typeof s?n[s]=!0:s(t,e[r],o))}var u=t.state&&t.state.cache;if(u)for(var c in n){(0,I[c])(t,e,u)}}}function X(t,e){if("number"==typeof(e=e||P)){var n=e,r=D[n];return r?r(t,n):t.getParameter(n)}var i=Array.isArray(e)?e:Object.keys(e),a={},o=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var h=c.value,f=D[h];a[h]=f?f(t,Number(h)):t.getParameter(Number(h))}}catch(t){s=!0,u=t}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}return a}function Z(t){W(t,P)}function Y(t,e,n){if(a(e))return n(t);var r,i=e.nocatch,o=void 0===i||i;if(function(t){t.state||G(t,{copyState:!1}),t.state.push()}(t),W(t,e),o)r=n(t),H(t);else try{r=n(t)}finally{H(t)}return r}var q=n(30),K=Object(q.isBrowser)(),Q=K&&"undefined"!=typeof document,J={webgl2:!0,webgl1:!0,throwOnError:!1,manageState:!0,canvas:null,debug:!1,width:800,height:600};function $(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(K,"createGLContext on available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils");var e,n=t=Object.assign({},J,t),r=n.width,a=n.height;return(e=function(t,e){var n=e.onError,r=void 0===n?function(t){return null}:n,i=function(t){return r("WebGL context: ".concat(t.statusMessage||"error"))};t.addEventListener("webglcontextcreationerror",i,!1);var a=e.webgl1,o=void 0===a||a,s=e.webgl2,u=void 0===s||s,c=null;u&&(c=(c=c||t.getContext("webgl2",e))||t.getContext("experimental-webgl2",e));o&&(c=(c=c||t.getContext("webgl",e))||t.getContext("experimental-webgl",e));if(t.removeEventListener("webglcontextcreationerror",i,!1),!c)return r("Failed to create ".concat(u&&!o?"WebGL2":"WebGL"," context"));return c}(function(t){var e,n=t.canvas,r=t.width,i=void 0===r?800:r,a=t.height,o=void 0===a?600:a,s=t.onError,u=void 0===s?function(){}:s;if("string"==typeof n){Q&&"complete"===document.readyState||u("createGLContext called on canvas '".concat(n,"' before page was loaded")),e=document.getElementById(n)}else n?e=n:((e=document.createElement("canvas")).id="lumagl-canvas",e.style.width=Number.isFinite(i)?"".concat(i,"px"):"100%",e.style.height=Number.isFinite(o)?"".concat(o,"px"):"100%",document.body.insertBefore(e,document.body.firstChild));return e}({canvas:t.canvas,width:r,height:a,onError:function(e){if(t.throwOnError)throw new Error(e);return null}}),t))?(function(t){var e=f(t)?"WebGL2":"WebGL1",n=function(t){var e=t.getParameter(7936),n=t.getParameter(7937),r=t.getExtension("WEBGL_debug_renderer_info"),i=r&&t.getParameter(r.UNMASKED_VENDOR_WEBGL||7936),a=r&&t.getParameter(r.UNMASKED_RENDERER_WEBGL||7937);return{vendor:i||e,renderer:a||n,vendorMasked:e,rendererMasked:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),r=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",i=t.debug?" debug":"";p.info(1,"".concat(e).concat(i," context ").concat(r))()}(e=tt(e,t)),e):null}function tt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||t._instrumented)return t;t._version=t._version||function(t){if("undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext)return 2;return 1}(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};var n=e=Object.assign({},J,e),r=n.manageState,i=n.debug;return r&&G(t,{copyState:!1,log:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return p.log.apply(p,[1].concat(e))()}}),K&&i&&(q.global.makeDebugContext?(t=q.global.makeDebugContext(t,e),p.level=Math.max(p.level,1)):p.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),t._instrumented=!0,t}function et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.canvas){!function(t,e,n){var r="width"in n?n.width:t.canvas.clientWidth,i="height"in n?n.height:t.canvas.clientHeight;r&&i||(p.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,r=t.canvas.width||1,i=t.canvas.height||1);t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};var a=t.luma.canvasSizeInfo;if(a.clientWidth!==r||a.clientHeight!==i||a.devicePixelRatio!==e){var o=e,s=Math.floor(r*o),u=Math.floor(i*o);t.canvas.width=s,t.canvas.height=u,t.drawingBufferWidth===s&&t.drawingBufferHeight===u||(p.warn("Device pixel ratio clamped")(),o=Math.min(t.drawingBufferWidth/r,t.drawingBufferHeight/i),t.canvas.width=Math.floor(r*o),t.canvas.height=Math.floor(i*o)),Object.assign(t.luma.canvasSizeInfo,{clientWidth:r,clientHeight:i,devicePixelRatio:e})}}(t,(n=e.useDevicePixels,r="undefined"==typeof window?1:window.devicePixelRatio||1,Number.isFinite(n)?n<=0?1:n:n?r:1),e)}else{var n,r,i=t.getExtension("STACKGL_resize_drawingbuffer");i&&"width"in e&&"height"in e&&i.resize(e.width,e.height)}}n.d(e,"d",(function(){return X})),n.d(e,"k",(function(){return W})),n.d(e,"i",(function(){return Z})),n.d(e,"l",(function(){return Y})),n.d(e,"a",(function(){return $})),n.d(e,"j",(function(){return et})),n.d(e,"e",(function(){return tt})),n.d(e,"h",(function(){return p})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"f",(function(){return h})),n.d(e,"g",(function(){return f}))},function(t,e,n){t.exports=n(172)},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(13),o=n(9),s=n(14),u=n(87);var c=n(88);function l(t){var e="function"==typeof Map?new Map:void 0;return(l=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Object(c.a)(t,arguments,Object(o.a)(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object(u.a)(r,t)})(t)}n(24),n(23);function h(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}var f=1/Math.PI*180,d=1/180*Math.PI,v={};function p(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).precision,n=void 0===e?v.precision||4:e;return t=function(t){return Math.round(t/v.EPSILON)*v.EPSILON}(t),"".concat(parseFloat(t.toPrecision(n)))}function g(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&void 0!==t.length}function b(t,e,n){if(g(t)){n=n||((i=t).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<t.length;++r)n[r]=e(t[r],r,n);return n}var i;return e(t)}function y(t,e){return b(t,(function(t){return t*d}),e)}function m(t,e){return b(t,(function(t){return t*f}),e)}function _(t,e,n){return b(t,(function(t){return Math.max(e,Math.min(n,t))}))}function O(t,e,n){return g(t)?t.map((function(t,r){return O(t,e[r],n)})):n*e+(1-n)*t}function w(t,e,n){var r=v.EPSILON;n&&(v.EPSILON=n);try{if(t===e)return!0;if(g(t)&&g(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;++i)if(!w(t[i],e[i]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=v.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{v.EPSILON=r}}v.EPSILON=1e-12,v.debug=!1,v.precision=4,v.printTypes=!1,v.printDegrees=!1,v.printRowMajor=!0;var j=function(t){function e(){return Object(r.a)(this,e),Object(a.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(s.a)(e,t),Object(i.a)(e,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}},{key:"to",value:function(t){return t===this?this:g(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(v)}},{key:"formatString",value:function(t){for(var e="",n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+p(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!w(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,n){void 0===n&&(n=e,e=t,t=this);for(var r=0;r<this.ELEMENTS;++r){var i=t[r];this[r]=i+n*(e[r]-i)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(v.debug&&!this.validate(this))throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"elements",get:function(){return this}}]),e}(l(Array));function k(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function x(t,e,n){if(v.debug&&!function(t,e){if(t.length!==e)return!1;for(var n=0;n<t.length;++n)if(!Number.isFinite(t[n]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(""|n," some fields set to invalid numbers'"));return t}var E={};function P(t,e){E[t]||(E[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}var T=function(t){function e(){return Object(r.a)(this,e),Object(a.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(s.a)(e,t),Object(i.a)(e,[{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-t[n];e+=r*r}return k(e)}},{key:"dot",value:function(t){for(var e=0,n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return k(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return h(t>=0&&t<this.ELEMENTS,"index is out of range"),k(this[t])}},{key:"setComponent",value:function(t,e){return h(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){return this[0]=k(t)}},{key:"y",get:function(){return this[1]},set:function(t){return this[1]=k(t)}}]),e}(j),S=n(35);function A(t,e,n){var r=e[0],i=e[1],a=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/a,t[1]=(n[1]*r+n[5]*i)/a,t}function M(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a||1;return t[0]=(n[0]*r+n[4]*i+n[8]*a)/o,t[1]=(n[1]*r+n[5]*i+n[9]*a)/o,t[2]=(n[2]*r+n[6]*i+n[10]*a)/o,t}var L=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(r.a)(this,e),t=Object(a.a)(this,Object(o.a)(e).call(this,2)),g(n)&&1===arguments.length?t.copy(n):(v.debug&&(k(n),k(i)),t[0]=n,t[1]=i),t}return Object(s.a)(e,t),Object(i.a)(e,[{key:"set",value:function(t,e,n){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return v.debug&&(k(t.x),k(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return S.j(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return A(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return S.i(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return S.h(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return S.g(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),e}(T),C=n(42),I=[0,0,0],R=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,e),t=Object(a.a)(this,Object(o.a)(e).call(this,-0,-0,-0)),1===arguments.length&&g(n)?t.copy(n):(v.debug&&(k(n),k(i),k(s)),t[0]=n,t[1]=i,t[2]=s),t}return Object(s.a)(e,t),Object(i.a)(e,[{key:"set",value:function(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return v.debug&&(k(t.x),k(t.y),k(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return C.a(this,t)}},{key:"cross",value:function(t){return C.b(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?I:n;return C.e(this,this,r,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?I:n;return C.f(this,this,r,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,n=t.origin,r=void 0===n?I:n;return C.g(this,this,r,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return C.j(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return M(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return C.i(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){var e,n,r,i,a;return e=this,r=t,i=(n=this)[0],a=n[1],e[0]=r[0]*i+r[2]*a,e[1]=r[1]*i+r[3]*a,e[2]=n[2],this.check()}},{key:"transformByQuaternion",value:function(t){return C.k(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){return this[2]=k(t)}}]),e}(T),F=n(19),D=function(t){function e(){return Object(r.a)(this,e),Object(a.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(s.a)(e,t),Object(i.a)(e,[{key:"toString",value:function(){var t="[";if(v.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(var r=0;r<this.ELEMENTS;++r)t+=" ".concat(this[r])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,n){return this[e*this.RANK+t]=k(n),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=t*this.RANK,r=0;r<this.RANK;++r)e[r]=this[n+r];return e}},{key:"setColumn",value:function(t,e){for(var n=t*this.RANK,r=0;r<this.RANK;++r)this[n+r]=e[r];return this}}]),e}(j),N=n(18),B=n(70),z=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),U=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),V=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),G={},H=function(t){function e(t){var n;return Object(r.a)(this,e),n=Object(a.a)(this,Object(o.a)(e).call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0)),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Object(s.a)(e,t),Object(i.a)(e,[{key:"INDICES",get:function(){return V}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return G.IDENTITY=G.IDENTITY||Object.freeze(new e(z)),G.IDENTITY}},{key:"ZERO",get:function(){return G.ZERO=G.ZERO||Object.freeze(new e(U)),G.ZERO}}]),Object(i.a)(e,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,n,r,i,a,o,s,u,c,l,h,f,d,v,p){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=d,this[14]=v,this[15]=p,this.check()}},{key:"setRowMajor",value:function(t,e,n,r,i,a,o,s,u,c,l,h,f,d,v,p){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=a,this[6]=c,this[7]=d,this[8]=n,this[9]=o,this[10]=l,this[11]=v,this[12]=r,this[13]=s,this[14]=h,this[15]=p,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(z)}},{key:"fromQuaternion",value:function(t){return N.c(this,t),this.check()}},{key:"frustum",value:function(t){var n=t.left,r=t.right,i=t.bottom,a=t.top,o=t.near,s=t.far;return s===1/0?e._computeInfinitePerspectiveOffCenter(this,n,r,i,a,o):N.d(this,n,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(t,e,n){if(1===arguments.length){var r=t;t=r.eye,e=r.center,n=r.up}return e=e||[0,0,0],n=n||[0,1,0],N.f(this,t,e,n),this.check()}},{key:"ortho",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,a=t.near,o=void 0===a?.1:a,s=t.far,u=void 0===s?500:s;return N.h(this,e,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(t){var n=t.fovy,r=void 0===n?45*Math.PI/180:n,i=t.aspect,a=void 0===i?1:i,o=t.focalDistance,s=void 0===o?1:o,u=t.near,c=void 0===u?.1:u,l=t.far,h=void 0===l?500:l;if(r>2*Math.PI)throw Error("radians");var f=r/2,d=s*Math.tan(f),v=d*a;return(new e).ortho({left:-v,right:v,bottom:-d,top:d,near:c,far:h})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,a=void 0===i?1:i,o=t.near,s=void 0===o?.1:o,u=t.far,c=void 0===u?500:u;if((e=e||r)>2*Math.PI)throw Error("radians");return N.i(this,e,a,s,c),this.check()}},{key:"determinant",value:function(){return N.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*a,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*a,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*a,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*a,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*a,t}},{key:"transpose",value:function(){return N.p(this,this),this.check()}},{key:"invert",value:function(){return N.e(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return N.g(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return N.g(this,this,t),this.check()}},{key:"rotateX",value:function(t){return N.k(this,this,t),this.check()}},{key:"rotateY",value:function(t){return N.l(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return N.m(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Object(F.a)(t,3),n=e[0],r=e[1],i=e[2];return this.rotateX(n).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return N.j(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?N.n(this,this,t):N.n(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return N.o(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(x(e=B.b(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=S.j(e||[-0,-0],t,this);break;case 3:e=C.j(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return x(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=A(e||[-0,-0],t,this);break;case 3:e=M(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return x(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,n){return this.identity().translate([t,e,n])}},{key:"transformPoint",value:function(t,e){return P("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return P("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return P("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,n,r,i,a){var o=2*a/(n-e),s=2*a/(i-r),u=(n+e)/(n-e),c=(i+r)/(i-r),l=-2*a;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0,t}}]),e}(D),W=6371e3,X=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.phi,i=e.theta,a=e.radius,o=e.bearing,s=e.pitch,u=(e.altitude,e.radiusScale),c=void 0===u?W:u;Object(r.a)(this,t),0===arguments.length?(this.phi=0,this.theta=0,this.radius=1):Number.isFinite(n)||Number.isFinite(i)?(this.phi=n||0,this.theta=i||0):(Number.isFinite(o)||Number.isFinite(s))&&(this.bearing=o||0,this.pitch=s||0),this.radius=a||1,this.radiusScale=c||1,this.check()}return Object(i.a)(t,[{key:"toString",value:function(){return this.formatString(v)}},{key:"formatString",value:function(t){var e=t.printTypes,n=(t.printDegrees,p);return"".concat(e?"Spherical":"","[rho:").concat(n(this.radius),",theta:").concat(n(this.theta),",phi:").concat(n(this.phi),"]")}},{key:"equals",value:function(t){return w(this.radius,t.radius)&&w(this.theta,t.theta)&&w(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"set",value:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var e=Object(F.a)(t,3),n=e[0],r=e[1],i=e[2];this.radius=1+i/this.radiusScale,this.phi=y(r),this.theta=y(n)}},{key:"fromVector3",value:function(t){return this.radius=C.c(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(_(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new R(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi))}},{key:"check",value:function(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}},{key:"bearing",get:function(){return 180-m(this.phi)},set:function(t){this.phi=Math.PI-y(t)}},{key:"pitch",get:function(){return m(this.theta)},set:function(t){this.theta=y(t)}},{key:"longitude",get:function(){return m(this.phi)}},{key:"latitude",get:function(){return m(this.theta)}},{key:"lng",get:function(){return m(this.phi)}},{key:"lat",get:function(){return m(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}}]),t}(),Z={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global};(Z.global||Z.self||Z.window).mathgl={config:v},n.d(e,"b",(function(){return L})),n.d(e,"c",(function(){return R})),n.d(e,"a",(function(){return H})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return w})),n.d(e,"e",(function(){return _})),n.d(e,"h",(function(){return O})),n.d(e,"d",(function(){return X}))},function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(41),i=n(134);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(173);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return a}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,a=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(24),i=n(28);function a(t,e){return!e||"object"!==Object(r.a)(e)&&"function"!=typeof e?Object(i.a)(t):e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(87);function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(r.a)(t,e)}},function(t,e,n){"use strict";function r(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function s(t){r(o,i,a,s,u,"next",t)}function u(t){r(o,i,a,s,u,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var r=n(190);e.a=new r.a({id:"deck"})},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o}));var r=n(16),i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:function(){return r.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")()||0}});var a={WEB_MERCATOR:1,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},o={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}}},function(t,e,n){"use strict";n.d(e,"p",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"g",(function(){return s})),n.d(e,"o",(function(){return u})),n.d(e,"n",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return f})),n.d(e,"m",(function(){return d})),n.d(e,"c",(function(){return v})),n.d(e,"d",(function(){return p})),n.d(e,"i",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"f",(function(){return y})),n.d(e,"b",(function(){return m}));var r=n(12);function i(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function a(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],v=e[12],p=e[13],g=e[14],b=e[15],y=n*s-r*o,m=n*u-i*o,_=n*c-a*o,O=r*u-i*s,w=r*c-a*s,j=i*c-a*u,k=l*p-h*v,x=l*g-f*v,E=l*b-d*v,P=h*g-f*p,T=h*b-d*p,S=f*b-d*g,A=y*S-m*T+_*P+O*E-w*x+j*k;return A?(A=1/A,t[0]=(s*S-u*T+c*P)*A,t[1]=(i*T-r*S-a*P)*A,t[2]=(p*j-g*w+b*O)*A,t[3]=(f*w-h*j-d*O)*A,t[4]=(u*E-o*S-c*x)*A,t[5]=(n*S-i*E+a*x)*A,t[6]=(g*_-v*j-b*m)*A,t[7]=(l*j-f*_+d*m)*A,t[8]=(o*T-s*E+c*k)*A,t[9]=(r*E-n*T-a*k)*A,t[10]=(v*w-p*_+b*y)*A,t[11]=(h*_-l*w-d*y)*A,t[12]=(s*x-o*P-u*k)*A,t[13]=(n*P-r*x+i*k)*A,t[14]=(p*m-v*O-g*y)*A,t[15]=(l*O-h*m+f*y)*A,t):null}function o(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],v=t[13],p=t[14],g=t[15];return(e*o-n*a)*(h*g-f*p)-(e*s-r*a)*(l*g-f*v)+(e*u-i*a)*(l*p-h*v)+(n*s-r*o)*(c*g-f*d)-(n*u-i*o)*(c*p-h*d)+(r*u-i*s)*(c*v-l*d)}function s(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],v=e[11],p=e[12],g=e[13],b=e[14],y=e[15],m=n[0],_=n[1],O=n[2],w=n[3];return t[0]=m*r+_*s+O*h+w*p,t[1]=m*i+_*u+O*f+w*g,t[2]=m*a+_*c+O*d+w*b,t[3]=m*o+_*l+O*v+w*y,m=n[4],_=n[5],O=n[6],w=n[7],t[4]=m*r+_*s+O*h+w*p,t[5]=m*i+_*u+O*f+w*g,t[6]=m*a+_*c+O*d+w*b,t[7]=m*o+_*l+O*v+w*y,m=n[8],_=n[9],O=n[10],w=n[11],t[8]=m*r+_*s+O*h+w*p,t[9]=m*i+_*u+O*f+w*g,t[10]=m*a+_*c+O*d+w*b,t[11]=m*o+_*l+O*v+w*y,m=n[12],_=n[13],O=n[14],w=n[15],t[12]=m*r+_*s+O*h+w*p,t[13]=m*i+_*u+O*f+w*g,t[14]=m*a+_*c+O*d+w*b,t[15]=m*o+_*l+O*v+w*y,t}function u(t,e,n){var r,i,a,o,s,u,c,l,h,f,d,v,p=n[0],g=n[1],b=n[2];return e===t?(t[12]=e[0]*p+e[4]*g+e[8]*b+e[12],t[13]=e[1]*p+e[5]*g+e[9]*b+e[13],t[14]=e[2]*p+e[6]*g+e[10]*b+e[14],t[15]=e[3]*p+e[7]*g+e[11]*b+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],v=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=v,t[12]=r*p+s*g+h*b+e[12],t[13]=i*p+u*g+f*b+e[13],t[14]=a*p+c*g+d*b+e[14],t[15]=o*p+l*g+v*b+e[15]),t}function c(t,e,n){var r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function l(t,e,n,i){var a,o,s,u,c,l,h,f,d,v,p,g,b,y,m,_,O,w,j,k,x,E,P,T,S=i[0],A=i[1],M=i[2],L=Math.hypot(S,A,M);return L<r.b?null:(S*=L=1/L,A*=L,M*=L,a=Math.sin(n),s=1-(o=Math.cos(n)),u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],v=e[6],p=e[7],g=e[8],b=e[9],y=e[10],m=e[11],_=S*S*s+o,O=A*S*s+M*a,w=M*S*s-A*a,j=S*A*s-M*a,k=A*A*s+o,x=M*A*s+S*a,E=S*M*s+A*a,P=A*M*s-S*a,T=M*M*s+o,t[0]=u*_+f*O+g*w,t[1]=c*_+d*O+b*w,t[2]=l*_+v*O+y*w,t[3]=h*_+p*O+m*w,t[4]=u*j+f*k+g*x,t[5]=c*j+d*k+b*x,t[6]=l*j+v*k+y*x,t[7]=h*j+p*k+m*x,t[8]=u*E+f*P+g*T,t[9]=c*E+d*P+b*T,t[10]=l*E+v*P+y*T,t[11]=h*E+p*P+m*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*r,t[5]=o*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-a*r,t[9]=l*i-o*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*r,t[1]=o*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=a*r+c*i,t[9]=o*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function d(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*r,t[1]=o*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-a*r,t[5]=l*i-o*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}function v(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,d=i*s,v=i*u,p=a*o,g=a*s,b=a*u;return t[0]=1-h-v,t[1]=l+b,t[2]=f-g,t[3]=0,t[4]=l-b,t[5]=1-c-v,t[6]=d+p,t[7]=0,t[8]=f+g,t[9]=d-p,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e,n,r,i,a,o){var s=1/(n-e),u=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t}function g(t,e,n,r,i){var a,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t}function b(t,e,n,r,i,a,o){var s=1/(e-n),u=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(o+a)*c,t[15]=1,t}function y(t,e,n,i){var a,o,s,u,c,l,h,f,d,v,p=e[0],g=e[1],b=e[2],y=i[0],m=i[1],_=i[2],O=n[0],w=n[1],j=n[2];return Math.abs(p-O)<r.b&&Math.abs(g-w)<r.b&&Math.abs(b-j)<r.b?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=p-O,f=g-w,d=b-j,a=m*(d*=v=1/Math.hypot(h,f,d))-_*(f*=v),o=_*(h*=v)-y*d,s=y*f-m*h,(v=Math.hypot(a,o,s))?(a*=v=1/v,o*=v,s*=v):(a=0,o=0,s=0),u=f*s-d*o,c=d*a-h*s,l=h*o-f*a,(v=Math.hypot(u,c,l))?(u*=v=1/v,c*=v,l*=v):(u=0,c=0,l=0),t[0]=a,t[1]=u,t[2]=h,t[3]=0,t[4]=o,t[5]=c,t[6]=f,t[7]=0,t[8]=s,t[9]=l,t[10]=d,t[11]=0,t[12]=-(a*p+o*g+s*b),t[13]=-(u*p+c*g+l*b),t[14]=-(h*p+f*g+d*b),t[15]=1,t)}function m(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=t[9],d=t[10],v=t[11],p=t[12],g=t[13],b=t[14],y=t[15],m=e[0],_=e[1],O=e[2],w=e[3],j=e[4],k=e[5],x=e[6],E=e[7],P=e[8],T=e[9],S=e[10],A=e[11],M=e[12],L=e[13],C=e[14],I=e[15];return Math.abs(n-m)<=r.b*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(i-_)<=r.b*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(a-O)<=r.b*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(o-w)<=r.b*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-j)<=r.b*Math.max(1,Math.abs(s),Math.abs(j))&&Math.abs(u-k)<=r.b*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-x)<=r.b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(l-E)<=r.b*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(h-P)<=r.b*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(f-T)<=r.b*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-S)<=r.b*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(v-A)<=r.b*Math.max(1,Math.abs(v),Math.abs(A))&&Math.abs(p-M)<=r.b*Math.max(1,Math.abs(p),Math.abs(M))&&Math.abs(g-L)<=r.b*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(b-C)<=r.b*Math.max(1,Math.abs(b),Math.abs(C))&&Math.abs(y-I)<=r.b*Math.max(1,Math.abs(y),Math.abs(I))}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return(i="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(13),o=n(9),s=n(28),u=n(14),c=n(19),l=n(70);function h(t,e){var n=l.b([],e,t);return l.a(n,n,1/n[3]),n}function f(t,e){var n=t%e;return n<0?e+n:n}var d=n(18),v=n(35),p=n(42);function g(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}var b=Math.PI,y=b/4,m=b/180,_=180/b,O=512,w=4003e4,j=1.5;function k(t){return Math.pow(2,t)}function x(t){return Math.log2(t)}function E(t){var e=Object(c.a)(t,2),n=e[0],r=e[1];g(Number.isFinite(n)),g(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var i=r*m;return[O*(n*m+b)/(2*b),O*(b+Math.log(Math.tan(y+.5*i)))/(2*b)]}function P(t){var e=Object(c.a)(t,2),n=e[0],r=e[1],i=n/O*(2*b)-b,a=2*(Math.atan(Math.exp(r/O*(2*b)-b))-y);return[i*_,a*_]}function T(t){var e=t.latitude;g(Number.isFinite(e));var n=Math.cos(e*m);return x(w*n)-9}function S(t){var e=t.latitude,n=t.longitude,r=t.highPrecision,i=void 0!==r&&r;g(Number.isFinite(e)&&Number.isFinite(n));var a={},o=O,s=Math.cos(e*m),u=o/360,c=u/s,l=o/w/s;if(a.unitsPerMeter=[l,l,l],a.metersPerUnit=[1/l,1/l,1/l],a.unitsPerDegree=[u,c,l],a.degreesPerUnit=[1/u,1/c,1/l],i){var h=m*Math.tan(e*m)/s,f=u*h/2,d=o/w*h,v=d/c*l;a.unitsPerDegree2=[0,f,d],a.unitsPerMeter2=[v,0,v]}return a}function A(t,e){var n=Object(c.a)(t,3),r=n[0],i=n[1],a=n[2],o=Object(c.a)(e,3),s=o[0],u=o[1],l=o[2],h=S({longitude:r,latitude:i,highPrecision:!0}),f=h.unitsPerMeter,d=h.unitsPerMeter2,v=E(t);v[0]+=s*(f[0]+d[0]*u),v[1]+=u*(f[1]+d[1]*u);var p=P(v),g=(a||0)+(l||0);return Number.isFinite(a)||Number.isFinite(l)?[p[0],p[1],g]:p}function M(t){var e=t.height,n=t.pitch,r=t.bearing,i=t.altitude,a=t.scale,o=t.center,s=void 0===o?null:o,u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return d.o(u,u,[0,0,-i]),d.k(u,u,-n*m),d.m(u,u,r*m),a/=e,d.n(u,u,[a,a,a]),s&&d.o(u,u,p.d([],s)),u}function L(t){var e=t.width,n=t.height,r=t.altitude,i=void 0===r?j:r,a=t.pitch,o=void 0===a?0:a,s=t.nearZMultiplier,u=void 0===s?1:s,c=t.farZMultiplier,l=void 0===c?1:c,h=o*m,f=Math.atan(.5/i),d=Math.sin(f)*i/Math.sin(Math.PI/2-h-f);return{fov:2*f,aspect:e/n,focalDistance:i,near:u,far:(Math.cos(Math.PI/2-h)*d+i)*l}}function C(t,e){var n=Object(c.a)(t,3),r=n[0],i=n[1],a=n[2],o=void 0===a?0:a;return g(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(o)),h(e,[r,i,o,1])}function I(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(c.a)(t,3),i=r[0],a=r[1],o=r[2];if(g(Number.isFinite(i)&&Number.isFinite(a),"invalid pixel coordinate"),Number.isFinite(o))return h(e,[i,a,o,1]);var s=h(e,[i,a,0,1]),u=h(e,[i,a,1,1]),l=s[2],f=u[2],d=l===f?0:((n||0)-l)/(f-l);return v.c([],s,u,d)}var R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function F(t){var e=t.width,n=t.height,r=t.bounds,i=t.minExtent,a=void 0===i?0:i,o=t.maxZoom,s=void 0===o?24:o,u=t.padding,l=void 0===u?0:u,h=t.offset,f=void 0===h?[0,0]:h,d=Object(c.a)(r,2),v=Object(c.a)(d[0],2),p=v[0],b=v[1],y=Object(c.a)(d[1],2),m=y[0],_=y[1];if(Number.isFinite(l)){l={top:l,bottom:l,left:l,right:l}}else g(Number.isFinite(l.top)&&Number.isFinite(l.bottom)&&Number.isFinite(l.left)&&Number.isFinite(l.right));var O=new D({width:e,height:n,longitude:0,latitude:0,zoom:0}),w=O.project([p,_]),j=O.project([m,b]),k=[Math.max(Math.abs(j[0]-w[0]),a),Math.max(Math.abs(j[1]-w[1]),a)],x=[e-l.left-l.right-2*Math.abs(f[0]),n-l.top-l.bottom-2*Math.abs(f[1])];g(x[0]>0&&x[1]>0);var E=x[0]/k[0],P=x[1]/k[1],T=(l.right-l.left)/2/E,S=(l.bottom-l.top)/2/P,A=[(j[0]+w[0])/2+T,(j[1]+w[1])/2+S],M=O.unproject(A),L=Math.min(s,O.zoom+Math.log2(Math.abs(Math.min(E,P))));return g(Number.isFinite(L)),{longitude:M[0],latitude:M[1],zoom:L}}var D=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.width,u=n.height,c=n.latitude,l=void 0===c?0:c,h=n.longitude,f=void 0===h?0:h,v=n.zoom,p=void 0===v?0:v,g=n.pitch,b=void 0===g?0:g,y=n.bearing,m=void 0===y?0:y,_=n.altitude,O=void 0===_?1.5:_,w=n.nearZMultiplier,j=void 0===w?.02:w,x=n.farZMultiplier,P=void 0===x?1.01:x;Object(r.a)(this,e),i=i||1,u=u||1;var T=k(p);O=Math.max(.75,O);var A=E([f,l]);A[2]=0;var C=function(t){var e=t.width,n=t.height,r=t.pitch,i=L({width:e,height:n,altitude:t.altitude,pitch:r,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier}),a=i.fov,o=i.aspect,s=i.near,u=i.far;return d.i([],a,o,s,u)}({width:i,height:u,pitch:b,bearing:m,altitude:O,nearZMultiplier:j,farZMultiplier:P}),I=M({height:u,scale:T,center:A,pitch:b,bearing:m,altitude:O});return(t=Object(a.a)(this,Object(o.a)(e).call(this,{width:i,height:u,scale:T,viewMatrix:I,projectionMatrix:C}))).latitude=l,t.longitude=f,t.zoom=p,t.pitch=b,t.bearing=m,t.altitude=O,t.center=A,t.unitsPerMeter=S(Object(s.a)(t)).unitsPerMeter[2],Object.freeze(Object(s.a)(t)),t}return Object(u.a)(e,t),Object(i.a)(e,[{key:"projectFlat",value:function(t){return E(t)}},{key:"unprojectFlat",value:function(t){return P(t)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,n=I(t.pos,this.pixelUnprojectionMatrix),r=E(e),i=v.a([],r,v.d([],n));return P(v.a([],this.center,i),this.scale)}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,n=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=F(Object.assign({width:r,height:i,bounds:t},n)),o=a.longitude,s=a.latitude,u=a.zoom;return new e({width:r,height:i,longitude:o,latitude:s,zoom:u})}}]),e}(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width,i=e.height,a=e.scale,o=e.viewMatrix,s=void 0===o?R:o,u=e.projectionMatrix,c=void 0===u?R:u;Object(r.a)(this,t),this.width=n||1,this.height=i||1,this.scale=a,this.unitsPerMeter=1,this.viewMatrix=s,this.projectionMatrix=c;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];d.g(l,l,this.projectionMatrix),d.g(l,l,this.viewMatrix),this.viewProjectionMatrix=l;var h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];d.n(h,h,[this.width/2,-this.height/2,1]),d.o(h,h,[1,-1,0]),d.g(h,h,this.viewProjectionMatrix);var f=d.e([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],h);if(!f)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=h,this.pixelUnprojectionMatrix=f,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return Object(i.a)(t,[{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&d.b(e.projectionMatrix,this.projectionMatrix)&&d.b(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=this.projectPosition(t),a=C(i,this.pixelProjectionMatrix),o=Object(c.a)(a,2),s=o[0],u=o[1],l=r?u:this.height-u;return 2===t.length?[s,l]:[s,l,a[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=e.targetZ,a=Object(c.a)(t,3),o=a[0],s=a[1],u=a[2],l=r?s:this.height-s,h=i&&i*this.unitsPerMeter,f=I([o,l,u],this.pixelUnprojectionMatrix,h),d=this.unprojectPosition(f),v=Object(c.a)(d,3),p=v[0],g=v[1],b=v[2];return Number.isFinite(u)?[p,g,b]:Number.isFinite(i)?[p,g,i]:[p,g]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),n=Object(c.a)(e,2);return[n[0],n[1],(t[2]||0)*this.unitsPerMeter]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),n=Object(c.a)(e,2);return[n[0],n[1],(t[2]||0)/this.unitsPerMeter]}},{key:"projectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return t}},{key:"unprojectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return t}}]),t}()),N=85.05113,B=-85.05113;function z(t){var e=t.width,n=t.height,r=t.longitude,i=t.latitude,a=t.zoom,o=t.pitch,s=void 0===o?0:o,u=t.bearing,c=void 0===u?0:u;(r<-180||r>180)&&(r=f(r+180,360)-180),(c<-180||c>180)&&(c=f(c+180,360)-180);var l=new D({width:e,height:n,longitude:r,latitude:i,zoom:a}),h=l.project([r,N])[1],d=l.project([r,B])[1],v=0;return d-h<n&&(a+=Math.log2(n/(d-h)),h=(l=new D({width:e,height:n,longitude:r,latitude:i,zoom:a})).project([r,N])[1],d=l.project([r,B])[1]),h>0?v=h:d<n&&(v=d-n),v&&(i=l.unproject([e/2,n/2+v])[1]),{width:e,height:n,longitude:r,latitude:i,zoom:a,pitch:s,bearing:c}}var U=.01,V=["longitude","latitude","zoom"],G={curve:1.414,speed:1.2};function H(t,e,n){var r,i={},a=X(t,e,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),o=a.startZoom,s=a.startCenterXY,u=a.uDelta,c=a.w0,l=a.u1,h=a.S,f=a.rho,d=a.rho2,p=a.r0;if(l<U){var g=!0,b=!1,y=void 0;try{for(var m,_=V[Symbol.iterator]();!(g=(m=_.next()).done);g=!0){var O=m.value,w=t[O],j=e[O];i[O]=(r=n)*j+(1-r)*w}}catch(t){b=!0,y=t}finally{try{g||null==_.return||_.return()}finally{if(b)throw y}}return i}var k=n*h,E=Math.cosh(p)/Math.cosh(p+f*k),T=c*((Math.cosh(p)*Math.tanh(p+f*k)-Math.sinh(p))/d)/l,S=o+x(1/E),A=v.e([],u,T);v.a(A,A,s);var M=P(A);return i.longitude=M[0],i.latitude=M[1],i.zoom=S,i}function W(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},G,r),a=i.screenSpeed,o=i.speed,s=i.maxDuration,u=X(t,e,r),c=u.S,l=u.rho,h=1e3*c;return n=Number.isFinite(a)?h/(a/l):h/o,Number.isFinite(s)&&n>s?0:n}function X(t,e,n){var r=(n=Object.assign({},G,n)).curve,i=t.zoom,a=[t.longitude,t.latitude],o=k(i),s=e.zoom,u=[e.longitude,e.latitude],c=k(s-i),l=E(a),h=E(u),f=v.f([],h,l),d=Math.max(t.width,t.height),p=d/c,g=v.b(f)*o,b=Math.max(g,U),y=r*r,m=(p*p-d*d+y*y*b*b)/(2*d*y*b),_=(p*p-d*d-y*y*b*b)/(2*p*y*b),O=Math.log(Math.sqrt(m*m+1)-m),w=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:i,startCenterXY:l,uDelta:f,w0:d,u1:g,S:(w-O)/r,rho:r,rho2:y,r0:O,r1:w}}n.d(e,"b",(function(){return D})),n.d(e,"c",(function(){return F})),n.d(e,"k",(function(){return z})),n.d(e,"d",(function(){return H})),n.d(e,"f",(function(){return W})),n.d(e,"j",(function(){return E})),n.d(e,"m",(function(){return P})),n.d(e,"n",(function(){return C})),n.d(e,"l",(function(){return I})),n.d(e,"g",(function(){return T})),n.d(e,"e",(function(){return S})),n.d(e,"a",(function(){return A})),n.d(e,"i",(function(){return M})),n.d(e,"h",(function(){return L}))},function(t,e,n){var r=n(177),i=n(178),a=n(179);t.exports=function(t,e){return r(t)||i(t,e)||a()}},function(t,e,n){t.exports=n(182)()},function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"f",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return f})),n.d(e,"g",(function(){return d})),n.d(e,"h",(function(){return v}));var r=n(24),i=function(t){return"boolean"==typeof t},a=function(t){return"function"==typeof t},o=function(t){return null!==t&&"object"===Object(r.a)(t)},s=function(t){return o(t)&&a(t.then)},u=function(t){return t&&"function"==typeof t[Symbol.iterator]},c=function(t){return t&&"function"==typeof t[Symbol.asyncIterator]},l=function(t){return t&&a(t.next)},h=function(t){return"undefined"!=typeof Response&&t instanceof Response||t.arrayBuffer&&t.text&&t.json},f=function(t){return function(t){return"undefined"!=typeof File&&t instanceof File}(t)||function(t){return"undefined"!=typeof Blob&&t instanceof Blob}(t)},d=function(t){return function(t){return o(t)&&a(t.tee)&&a(t.cancel)&&a(t.pipeTo)&&a(t.getReader)}(t)||function(t){return o(t)&&a(t.read)&&a(t.pipe)&&i(t.readable)}(t)},v=function(t){return function(t){return o(t)&&a(t.abort)&&a(t.getWriter)}(t)||function(t){return o(t)&&a(t.end)&&a(t.write)&&i(t.writable)}(t)}},function(t,e,n){t.exports=n(169)},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0);function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){Object(r.a)(t,e,n[e])}))}return t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(16),i={};function a(t){i=t}function o(t){var e;r.a.level>0&&i[t]&&(e=i[t]).call.apply(e,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i={COMPONENT:Symbol.for("component"),ASYNC_DEFAULTS:Symbol.for("asyncPropDefaults"),ASYNC_ORIGINAL:Symbol.for("asyncPropOriginal"),ASYNC_RESOLVED:Symbol.for("asyncPropResolved")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return f})),n.d(e,"f",(function(){return p}));var r=n(12);function i(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function a(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function o(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function s(t,e){return t[0]=-e[0],t[1]=-e[1],t}function u(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t}function c(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function l(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function h(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function f(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}var d,v,p=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};d=new r.a(2),r.a!=Float32Array&&(d[0]=0,d[1]=0),v=d},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(1),i=n(3),a=n(13),o=n(9),s=n(28),u=n(14),c=n(39),l=n(54),h=n(55),f=n(73),d=n(5),v=n(142),p=n(21),g={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},b={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:g},y={removedProps:g},m=function(t){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,e),(n=Object(a.a)(this,Object(o.a)(e).call(this,t,i))).stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),n.target=i.target||(n.gl.webgl2?36662:34962),n.initialize(i),Object.seal(Object(s.a)(n)),n}return Object(u.a)(e,t),Object(i.a)(e,[{key:"getElementCount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/l.a.getBytesPerElement(t))}},{key:"getVertexCount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/l.a.getBytesPerVertex(t))}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=Object(v.a)("Buffer",t,b),this.usage=t.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},t,t.accessor)),t.data?this._setData(t.data):this._setByteLength(t.byteLength||0),this}},{key:"setProps",value:function(t){return"accessor"in(t=Object(v.a)("Buffer",t,y))&&this.setAccessor(t.accessor),this}},{key:"setAccessor",value:function(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new l.a(t),this}},{key:"reallocate",value:function(t){return t>this.byteLength?(this._setByteLength(t),!0):(this.bytesUsed=t,!1)}},{key:"setData",value:function(t){return this.initialize(t)}},{key:"subData",value:function(t){ArrayBuffer.isView(t)&&(t={data:t});var e=t,n=e.data,r=e.offset,i=void 0===r?0:r,a=e.srcOffset,o=void 0===a?0:a,s=t.byteLength||t.length;Object(p.a)(n);var u=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(u,this.handle),0!==o||void 0!==s?(Object(h.a)(this.gl),this.gl.bufferSubData(this.target,i,n,o,s)):this.gl.bufferSubData(u,i,n),this.gl.bindBuffer(u,null),this.debugData=null,this._inferType(n),this}},{key:"copyData",value:function(t){var e=t.sourceBuffer,n=t.readOffset,r=void 0===n?0:n,i=t.writeOffset,a=void 0===i?0:i,o=t.size,s=this.gl;return Object(h.a)(s),s.bindBuffer(36662,e.handle),s.bindBuffer(36663,this.handle),s.copyBufferSubData(36662,36663,r,a,o),s.bindBuffer(36662,null),s.bindBuffer(36663,null),this.debugData=null,this}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.dstData,n=void 0===e?null:e,r=t.srcByteOffset,i=void 0===r?0:r,a=t.dstOffset,o=void 0===a?0:a,s=t.length,u=void 0===s?0:s;Object(h.a)(this.gl);var c,l,d=Object(f.c)(this.accessor.type||5126,{clamped:!1}),v=this._getAvailableElementCount(i),g=o;n?c=(l=n.length)-g:l=g+(c=Math.min(v,u||v));var b=Math.min(v,c);return u=u||b,Object(p.a)(u<=b),n=n||new d(l),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,i,n,o,u),this.gl.bindBuffer(36662,null),n}},{key:"bind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=void 0===e?this.target:e,r=t.index,i=void 0===r?this.accessor&&this.accessor.index:r,a=t.offset,o=void 0===a?0:a,s=t.size;return 35345===n||35982===n?void 0!==s?this.gl.bindBufferRange(n,i,this.handle,o,s):(Object(p.a)(0===o),this.gl.bindBufferBase(n,i,this.handle)):this.gl.bindBuffer(n,this.handle),this}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=void 0===e?this.target:e,r=t.index,i=void 0===r?this.accessor&&this.accessor.index:r,a=35345===n||35982===n;return a?this.gl.bindBufferBase(n,i,null):this.gl.bindBuffer(n,null),this}},{key:"getDebugData",value:function(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}},{key:"invalidateDebugData",value:function(){this.debugData=null}},{key:"_setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(p.a)(ArrayBuffer.isView(t)),this._trackDeallocatedMemory();var n=this._getTarget();this.gl.bindBuffer(n,this.handle),this.gl.bufferData(n,t,e),this.gl.bindBuffer(n,null),this.usage=e,this.debugData=t.slice(0,10),this.bytesUsed=t.byteLength,this._trackAllocatedMemory(t.byteLength);var r=Object(f.b)(t);return Object(p.a)(r),this.setAccessor(new l.a(this.accessor,{type:r})),this}},{key:"_setByteLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(p.a)(t>=0),this._trackDeallocatedMemory();var n=t;0===t&&(n=new Float32Array(0));var r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,e),this.gl.bindBuffer(r,null),this.usage=e,this.debugData=null,this.bytesUsed=t,this._trackAllocatedMemory(t),this}},{key:"_getTarget",value:function(){return this.gl.webgl2?36663:this.target}},{key:"_getAvailableElementCount",value:function(t){var e=t/Object(f.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}},{key:"_inferType",value:function(t){this.accessor.type||this.setAccessor(new l.a(this.accessor,{type:Object(f.b)(t)}))}},{key:"_createHandle",value:function(){return this.gl.createBuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}},{key:"_getParameter",value:function(t){this.gl.bindBuffer(this.target,this.handle);var e=this.gl.getBufferParameter(this.target,t);return this.gl.bindBuffer(this.target,null),e}},{key:"setByteLength",value:function(t){return d.h.deprecated("setByteLength","reallocate")(),this.reallocate(t)}},{key:"updateAccessor",value:function(t){return d.h.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new l.a(this.accessor,t),this}},{key:"type",get:function(){return d.h.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}},{key:"bytes",get:function(){return d.h.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}}]),e}(c.a)},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return g})),n.d(e,"c",(function(){return b})),n.d(e,"f",(function(){return y}));var r=n(71),i=n(8);function a(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t,e){var n=t%e;return n<0?e+n:n}function s(t){var e=t.viewMatrix,n=t.viewMatrixInverse;return{eye:[n[12],n[13],n[14]],direction:[-e[2],-e[6],-e[10]],up:[e[1],e[5],e[9]],right:[e[0],e[4],e[8]]}}var u,c=new i.c,l=new i.c,h=new i.c,f=new i.c,d=new i.c,v=new i.c,p=new i.c;function g(t){var e=t.aspect,n=t.near,r=t.far,a=t.fovyRadians,o=t.position,s=t.direction,u=t.up,g=t.right;l.copy(s);var b=1/l.len();l.normalize(),c.copy(o),h.copy(u);var y=1/h.len();h.normalize(),f.copy(g).normalize();var m=2*Math.tan(a/2)*n*y,_=m*e;d.copy(l).scale(n*b).add(c),v.copy(l).scale(r*b).add(c);var O=l.clone().negate(),w=O.dot(d),j={near:{distance:w,normal:O},far:{distance:l.dot(v),normal:l.clone()}};return p.copy(f).scale(.5*_).add(d).subtract(c).normalize(),O=new i.c(p).cross(h),w=c.dot(O),j.right={normal:O,distance:w},p.copy(f).scale(.5*-_).add(d).subtract(c).normalize(),O=new i.c(h).cross(p),w=c.dot(O),j.left={normal:O,distance:w},p.copy(h).scale(.5*m).add(d).subtract(c).normalize(),O=new i.c(f).cross(p),w=c.dot(O),j.top={normal:O,distance:w},p.copy(h).scale(.5*-m).add(d).subtract(c).normalize(),O=new i.c(p).cross(f),w=c.dot(O),j.bottom={normal:O,distance:w},j}function b(t){return t-Math.fround(t)}function y(t,e){var n=e.size,i=void 0===n?1:n,a=e.startIndex,o=void 0===a?0:a,s=e.endIndex;Number.isFinite(s)||(s=t.length);var c=(s-o)/i;u=r.a.allocate(u,c,{type:Float32Array,size:2*i});for(var l=o,h=0;l<s;){for(var f=0;f<i;f++){var d=t[l++];u[h+f]=d,u[h+f+i]=b(d)}h+=2*i}return u.subarray(0,c*i*2)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(1),i=n(3),a=n(5),o=n(102),s=n(55),u=n(78),c=n(94),l=n(21),h=n(186),f="Resource subclass must define virtual methods",d=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),Object(s.b)(e);var i=n.id,a=n.userData,o=void 0===a?{}:a;this.gl=e,this.id=i||Object(c.c)(this.constructor.name),this.userData=o,this._bound=!1,this._handle=n.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}return Object(i.a)(t,[{key:"toString",value:function(){return"".concat(this.constructor.name,"(").concat(this.id,")")}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.deleteChildren,n=void 0!==e&&e,r=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,r&&n&&r.filter(Boolean).forEach((function(t){t.delete()})),this}},{key:"bind",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!=typeof e?(this._bindHandle(e),this):(this._bound?t=e():(this._bindHandle(this.handle),this._bound=!0,t=e(),this._bound=!1,this._bindHandle(null)),t)}},{key:"unbind",value:function(){this.bind(null)}},{key:"getParameter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(u.b)(this.gl,t),Object(l.a)(t);var n=this.constructor.PARAMETERS||{},r=n[t];if(r){var i=Object(a.g)(this.gl),o=(!("webgl2"in r)||i)&&(!("extension"in r)||this.gl.getExtension(r.extension));if(!o){var s=r.webgl1,c="webgl2"in r?r.webgl2:r.webgl1,h=i?c:s;return h}}return this._getParameter(t,e)}},{key:"getParameters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},n=e.parameters,r=e.keys,i=this.constructor.PARAMETERS||{},o=Object(a.g)(this.gl),s={},c=n||Object.keys(i),l=!0,h=!1,f=void 0;try{for(var d,v=c[Symbol.iterator]();!(l=(d=v.next()).done);l=!0){var p=d.value,g=i[p],b=g&&(!("webgl2"in g)||o)&&(!("extension"in g)||this.gl.getExtension(g.extension));if(b){var y=r?Object(u.a)(this.gl,p):p;s[y]=this.getParameter(p,t),r&&"GLenum"===g.type&&(s[y]=Object(u.a)(this.gl,s[y]))}}}catch(t){h=!0,f=t}finally{try{l||null==v.return||v.return()}finally{if(h)throw f}}return s}},{key:"setParameter",value:function(t,e){t=Object(u.b)(this.gl,t),Object(l.a)(t);var n=(this.constructor.PARAMETERS||{})[t];if(n){var r=Object(a.g)(this.gl);if(!((!("webgl2"in n)||r)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(e=Object(u.b)(e))}return this._setParameter(t,e),this}},{key:"setParameters",value:function(t){for(var e in t)this.setParameter(e,t[e]);return this}},{key:"stubRemovedMethods",value:function(t,e,n){return Object(h.a)(this,t,e,n)}},{key:"initialize",value:function(t){}},{key:"_createHandle",value:function(){throw new Error(f)}},{key:"_deleteHandle",value:function(){throw new Error(f)}},{key:"_bindHandle",value:function(){throw new Error(f)}},{key:"_getOptsFromHandle",value:function(){throw new Error(f)}},{key:"_getParameter",value:function(t,e){throw new Error(f)}},{key:"_setParameter",value:function(t,e){throw new Error(f)}},{key:"_context",value:function(){return this.gl.luma=this.gl.luma||{},this.gl.luma}},{key:"_addStats",value:function(){var t=this.constructor.name,e=o.a.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get("".concat(t,"s Created")).incrementCount(),e.get("".concat(t,"s Active")).incrementCount()}},{key:"_removeStats",value:function(){var t=this.constructor.name;o.a.get("Resource Counts").get("".concat(t,"s Active")).decrementCount()}},{key:"_trackAllocatedMemory",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.name,n=o.a.get("Memory Usage");n.get("GPU Memory").addCount(t),n.get("".concat(e," Memory")).addCount(t),this.byteLength=t}},{key:"_trackDeallocatedMemory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.constructor.name,e=o.a.get("Memory Usage");e.get("GPU Memory").subtractCount(this.byteLength),e.get("".concat(t," Memory")).subtractCount(this.byteLength),this.byteLength=0}},{key:"handle",get:function(){return this._handle}}]),t}()},,function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"j",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"k",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return v})),n.d(e,"a",(function(){return p})),n.d(e,"h",(function(){return y}));var r=n(12);function i(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function a(t,e,n){var i=new r.a(3);return i[0]=t,i[1]=e,i[2]=n,i}function o(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function s(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function u(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t}function c(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function l(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t}function h(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],u=e[1],c=e[2],l=i*c-a*u,h=a*s-r*c,f=r*u-i*s,d=i*f-a*h,v=a*l-r*f,p=r*h-i*l,g=2*o;return l*=g,h*=g,f*=g,d*=2,v*=2,p*=2,t[0]=s+l+d,t[1]=u+h+v,t[2]=c+f+p,t}function f(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function d(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function v(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function p(t,e){var n=a(t[0],t[1],t[2]),r=a(e[0],e[1],e[2]);s(n,n),s(r,r);var i=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)}var g,b,y=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t};g=new r.a(3),r.a!=Float32Array&&(g[0]=0,g[1]=0,g[2]=0),b=g},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(125);function i(t){return new r.a(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(26),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(16),l=n(38),h=n(8),f=n(18),d=n(25),v=n(17),p=Math.PI/180,g=Object(l.a)(),b=[0,0,0],y={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]},m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o()(this,t);var n=e.id,r=void 0===n?null:n,i=e.x,a=void 0===i?0:i,s=e.y,u=void 0===s?0:s,c=e.width,l=void 0===c?1:c,h=e.height,f=void 0===h?1:h;this.id=r||this.constructor.displayName||"viewport",this.x=a,this.y=u,this.width=l||1,this.height=f||1,this._frustumPlanes={},this._initViewMatrix(e),this._initProjectionMatrix(e),this._initPixelMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return u()(t,[{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&e.scale===this.scale&&Object(h.g)(e.projectionMatrix,this.projectionMatrix)&&Object(h.g)(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,a=this.projectPosition(t),o=Object(d.n)(a,this.pixelProjectionMatrix),s=i()(o,2),u=s[0],c=s[1],l=r?c:this.height-c;return 2===t.length?[u,l]:[u,l,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,a=e.targetZ,o=i()(t,3),s=o[0],u=o[1],c=o[2],l=r?u:this.height-u,h=a&&a*this.distanceScales.unitsPerMeter[2],f=Object(d.l)([s,l,c],this.pixelUnprojectionMatrix,h),v=this.unprojectPosition(f),p=i()(v,3),g=p[0],b=p[1],y=p[2];return Number.isFinite(c)?[g,b,y]:Number.isFinite(a)?[g,b,a]:[g,b]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),n=i()(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),n=i()(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){return this.isGeospatial?Object(d.j)(t):t}},{key:"unprojectFlat",value:function(t){return this.isGeospatial?Object(d.m)(t):t}},{key:"getDistanceScales",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?Object(d.e)({longitude:t[0],latitude:t[1],highPrecision:!0}):this.distanceScales}},{key:"containsPixel",value:function(t){var e=t.x,n=t.y,r=t.width,i=void 0===r?1:r,a=t.height,o=void 0===a?1:a;return e<this.x+this.width&&this.x<e+i&&n<this.y+this.height&&this.y<n+o}},{key:"getFrustumPlanes",value:function(){if(this._frustumPlanes.near)return this._frustumPlanes;var t=this.projectionProps,e=t.near,n=t.far,r=t.fovyRadians,i=t.aspect;return Object.assign(this._frustumPlanes,Object(l.d)({aspect:i,near:e,far:n,fovyRadians:r,position:this.cameraPosition,direction:this.cameraDirection,up:this.cameraUp,right:this.cameraRight})),this._frustumPlanes}},{key:"getCameraPosition",value:function(){return this.cameraPosition}},{key:"getCameraDirection",value:function(){return this.cameraDirection}},{key:"getCameraUp",value:function(){return this.cameraUp}},{key:"_createProjectionMatrix",value:function(t){var e=t.orthographic,n=t.fovyRadians,r=t.aspect,i=t.focalDistance,a=t.near,o=t.far;return e?(new h.a).orthographic({fovy:n,aspect:r,focalDistance:i,near:a,far:o}):(new h.a).perspective({fovy:n,aspect:r,near:a,far:o})}},{key:"_initViewMatrix",value:function(t){var e=t.viewMatrix,n=void 0===e?g:e,r=t.longitude,i=void 0===r?null:r,a=t.latitude,o=void 0===a?null:a,s=t.zoom,u=void 0===s?null:s,c=t.position,l=void 0===c?null:c,f=t.modelMatrix,v=void 0===f?null:f,p=t.focalDistance,m=void 0===p?1:p,_=t.distanceScales,O=void 0===_?null:_;this.isGeospatial=Number.isFinite(o)&&Number.isFinite(i),this.zoom=u,Number.isFinite(this.zoom)||(this.zoom=this.isGeospatial?Object(d.g)({latitude:o})+Math.log2(m):0);var w=Math.pow(2,this.zoom);this.scale=w,this.distanceScales=this.isGeospatial?Object(d.e)({latitude:o,longitude:i}):O||y,this.focalDistance=m,this.distanceScales.metersPerUnit=new h.c(this.distanceScales.metersPerUnit),this.distanceScales.unitsPerMeter=new h.c(this.distanceScales.unitsPerMeter),this.position=b,this.meterOffset=b,l&&(this.position=l,this.modelMatrix=v,this.meterOffset=v?v.transformVector(l):l),this.isGeospatial?(this.longitude=i,this.latitude=o,this.center=this._getCenterInWorld({longitude:i,latitude:o})):this.center=l?this.projectPosition(l):[0,0,0],this.viewMatrixUncentered=n,this.viewMatrix=(new h.a).multiplyRight(this.viewMatrixUncentered).translate(new h.c(this.center||b).negate())}},{key:"_getCenterInWorld",value:function(t){var e=t.longitude,n=t.latitude,r=this.meterOffset,i=this.distanceScales,a=this.projectFlat([e,n]),o=new h.c(a[0],a[1],0);if(r){var s=new h.c(r).scale(i.unitsPerMeter);o.add(s)}return o}},{key:"_initProjectionMatrix",value:function(t){var e=t.projectionMatrix,n=void 0===e?null:e,r=t.orthographic,i=void 0!==r&&r,a=t.fovyRadians,o=t.fovy,s=void 0===o?75:o,u=t.near,c=void 0===u?.1:u,l=t.far,h=void 0===l?1e3:l,f=t.focalDistance,d=void 0===f?1:f;this.projectionProps={orthographic:i,fovyRadians:a||s*p,aspect:this.width/this.height,focalDistance:d,near:c,far:h},this.projectionMatrix=n||this._createProjectionMatrix(this.projectionProps)}},{key:"_initPixelMatrices",value:function(){var t=Object(l.a)();f.g(t,t,this.projectionMatrix),f.g(t,t,this.viewMatrix),this.viewProjectionMatrix=t,this.viewMatrixInverse=f.e([],this.viewMatrix)||this.viewMatrix;var e=Object(l.b)({viewMatrix:this.viewMatrix,viewMatrixInverse:this.viewMatrixInverse}),n=e.eye,r=e.direction,i=e.up,a=e.right;this.cameraPosition=n,this.cameraDirection=r,this.cameraUp=i,this.cameraRight=a;var o=Object(l.a)(),s=Object(l.a)();f.n(o,o,[this.width/2,-this.height/2,1]),f.o(o,o,[1,-1,0]),f.g(s,o,this.viewProjectionMatrix),this.pixelProjectionMatrix=s,this.viewportMatrix=o,this.pixelUnprojectionMatrix=f.e(Object(l.a)(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||c.a.warn("Pixel project matrix not invertible")()}},{key:"metersPerPixel",get:function(){return this.distanceScales.metersPerUnit[2]/this.scale}},{key:"projectionMode",get:function(){return this.isGeospatial?this.zoom<12?v.c.WEB_MERCATOR:v.c.WEB_MERCATOR_AUTO_OFFSET:v.c.IDENTITY}}]),t}();m.displayName="Viewport"},function(t,e,n){"use strict";function r(t){var e=t.source,n=t.target,r=t.start,i=void 0===r?0:r,a=t.end,o=t.getData;a=a||n.length;var s=e.length,u=a-i;if(s>u)n.set(e.subarray(0,u),i);else if(n.set(e,i),o)for(var c=s;c<u;)for(var l=o(c,e),h=0;h<l.length;h++)n[i+c]=l[h],c++}n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return c})),n.d(e,"f",(function(){return l}));var i={interpolation:{duration:0,easing:function(t){return t}},spring:{stiffness:.05,damping:.5}};function a(t,e){return t?(Number.isFinite(t)&&(t={duration:t}),t.type=t.type||"interpolation",Object.assign({},i[t.type],e,t)):null}function o(t,e){return e.getBuffer()?[e.getBuffer(),{divisor:0,size:e.size,normalized:e.settings.normalized}]:e.value}function s(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(t,'"'))}}function u(t){t.push(t.shift())}function c(t,e){var n=t.doublePrecision,r=t.settings,i=t.value,a=t.size,o=n?2:1;return(r.noAlloc?i.length:e*a)*o}function l(t){var e=t.buffer,n=t.numInstances,i=t.attribute,a=t.fromLength,o=t.fromStartIndices,s=t.getData,u=void 0===s?function(t){return t}:s,l=i.doublePrecision?2:1,h=i.size*l,f=i.byteOffset,d=i.startIndices,v=o&&d,p=c(i,n),g=i.state.constant;if(v||!(a>=p)){var b=g?i.value:i.getBuffer().getData({srcByteOffset:f});if(i.settings.normalized&&!g){var y=u;u=function(t,e){return i._normalizeConstant(y(t,e))}}var m=g?function(t,e){return u(b,e)}:function(t,e){return u(b.subarray(t,t+h),e)},_=e.getData({length:a}),O=new Float32Array(p);!function(t){var e=t.source,n=t.target,i=t.size,a=t.getData,o=t.sourceStartIndices,s=t.targetStartIndices;if(!Array.isArray(s))return r({source:e,target:n,getData:a}),n;for(var u=0,c=0,l=a&&function(t,e){return a(t+c,e)},h=Math.min(o.length,s.length),f=1;f<h;f++){var d=o[f]*i,v=s[f]*i;r({source:e.subarray(u,d),target:n,start:c,end:v,getData:l}),u=d,c=v}c<n.length&&r({source:[],target:n,start:c,getData:l})}({source:_,target:O,sourceStartIndices:o,targetStartIndices:d,size:h,getData:m}),e.byteLength<O.byteLength+f&&e.reallocate(O.byteLength+f),e.subData({data:O,offset:f})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n(0),i=n(84);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){if(!t)return!1;Array.isArray(t)&&(t=t[0]);var e=t.parseTextSync||t.parseSync||t.parse||t.parseStream||t.parseInBatches,n=t.options&&t.options[t.id];return e=e||n&&n.workerUrl}function u(t){var e;return Object(i.a)(t,"null loader"),Object(i.a)(s(t),"invalid loader"),Array.isArray(t)&&(e=t[1],t=o({},t=t[0],{options:o({},t.options,{},e)})),t.extension&&(t.extensions=t.extensions||t.extension,delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),Object(i.a)(t.extensions&&t.extensions.length>0&&t.extensions[0]),t.parseTextSync&&(t.text=!0),t.text||(t.binary=!0),t}},function(t,e,n){var r=n(180);function i(e,n,a){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,e,n){var i=r(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(n):a.value}},i(e,n,a||e)}t.exports=i},,function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(1),i=n(13),a=n(9),o=n(3),s=n(14),u=n(39),c=n(36),l=n(72),h=n(5),f=n(30),d=n(55),v=n(94),p=n(21),g=[9729,9728],b=f.global.WebGLBuffer||function(){},y=function(t){function e(t,n){var o;Object(r.a)(this,e);var s=n.id,u=void 0===s?Object(v.c)("texture"):s,c=n.handle,l=n.target;return(o=Object(i.a)(this,Object(a.a)(e).call(this,t,{id:u,handle:c}))).target=l,o.textureUnit=void 0,o.loaded=!1,o.width=void 0,o.height=void 0,o.depth=void 0,o.format=void 0,o.type=void 0,o.dataFormat=void 0,o.border=void 0,o.textureUnit=void 0,o.mipmaps=void 0,o}return Object(s.a)(e,t),Object(o.a)(e,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.format,r=e.linearFiltering,i=!0;return n&&(i=(i=i&&Object(l.d)(t,n))&&(!r||Object(l.e)(t,n))),i}}]),Object(o.a)(e,[{key:"toString",value:function(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}},{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.data;if(n instanceof Promise)return n.then((function(n){return t.initialize(Object.assign({},e,{pixels:n,data:n}))})),this;var r=e.pixels,i=void 0===r?null:r,a=e.format,o=void 0===a?6408:a,s=e.border,u=void 0===s?0:s,c=e.recreate,l=void 0!==c&&c,f=e.parameters,d=void 0===f?{}:f,v=e.pixelStore,p=void 0===v?{}:v,g=e.textureUnit,b=void 0===g?void 0:g,y=e.mipmaps,m=void 0===y||y;n||(n=i);var _=e.width,O=e.height,w=e.dataFormat,j=e.type,k=e.depth,x=void 0===k?0:k,E=this._deduceParameters({format:o,type:j,dataFormat:w,compressed:!1,data:n,width:_,height:O});return _=E.width,O=E.height,w=E.dataFormat,j=E.type,this.width=_,this.height=O,this.depth=x,this.format=o,this.type=j,this.dataFormat=w,this.border=u,this.textureUnit=b,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(h.h.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),m=!1,this._updateForNPOT(d)),this.mipmaps=m,this.setImageData({data:n,width:_,height:O,depth:x,format:o,type:j,dataFormat:w,border:u,mipmaps:m,parameters:p}),m&&this.generateMipmap(),this.setParameters(d),l&&(this.data=n),this}},{key:"resize",value:function(t){var e=t.height,n=t.width,r=t.mipmaps,i=void 0!==r&&r;return n!==this.width||e!==this.height?this.initialize({width:n,height:e,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:i}):this}},{key:"generateMipmap",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(h.h.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(h.l)(this.gl,e,(function(){t.gl.generateMipmap(t.target)})),this.gl.bindTexture(this.target,null),this)}},{key:"setImageData",value:function(t){this._trackDeallocatedMemory("Texture");var e=t.target,n=void 0===e?this.target:e,r=t.pixels,i=void 0===r?null:r,a=t.level,o=void 0===a?0:a,s=t.format,u=void 0===s?this.format:s,c=t.border,f=void 0===c?this.border:c,v=t.offset,g=void 0===v?0:v,b=t.parameters,y=void 0===b?{}:b,m=t.data,_=void 0===m?null:m,O=t.type,w=void 0===O?this.type:O,j=t.width,k=void 0===j?this.width:j,x=t.height,E=void 0===x?this.height:x,P=t.dataFormat,T=void 0===P?this.dataFormat:P,S=t.compressed,A=void 0!==S&&S;_||(_=i);var M=this._deduceParameters({format:u,type:w,dataFormat:T,compressed:A,data:_,width:k,height:E});w=M.type,T=M.dataFormat,A=M.compressed,k=M.width,E=M.height;var L=this.gl;L.bindTexture(this.target,this.handle);var C,I=this._getDataType({data:_,compressed:A});if(_=I.data,C=I.dataType,Object(h.l)(this.gl,y,(function(){switch(C){case"null":L.texImage2D(n,o,u,k,E,f,T,w,_);break;case"typed-array":L.texImage2D(n,o,u,k,E,f,T,w,_,g);break;case"buffer":Object(d.a)(L),L.bindBuffer(35052,_.handle||_),L.texImage2D(n,o,u,k,E,f,T,w,g),L.bindBuffer(35052,null);break;case"browser-object":Object(h.g)(L)?L.texImage2D(n,o,u,k,E,f,T,w,_):L.texImage2D(n,o,u,T,w,_);break;case"compressed":L.compressedTexImage2D(n,o,u,k,E,f,_);break;default:Object(p.a)(!1,"Unknown image data type")}})),_&&_.byteLength)this._trackAllocatedMemory(_.byteLength,"Texture");else{var R=l.a[this.dataFormat]||4,F=l.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*R*F,"Texture")}return this.loaded=!0,this}},{key:"setSubImageData",value:function(t){var e=this,n=t.target,r=void 0===n?this.target:n,i=t.pixels,a=void 0===i?null:i,o=t.data,s=void 0===o?null:o,u=t.x,l=void 0===u?0:u,f=t.y,v=void 0===f?0:f,g=t.width,y=void 0===g?this.width:g,m=t.height,_=void 0===m?this.height:m,O=t.level,w=void 0===O?0:O,j=t.format,k=void 0===j?this.format:j,x=t.type,E=void 0===x?this.type:x,P=t.dataFormat,T=void 0===P?this.dataFormat:P,S=t.compressed,A=void 0!==S&&S,M=t.offset,L=void 0===M?0:M,C=t.border,I=(void 0===C&&this.border,t.parameters),R=void 0===I?{}:I,F=this._deduceParameters({format:k,type:E,dataFormat:T,compressed:A,data:s,width:y,height:_});if(E=F.type,T=F.dataFormat,A=F.compressed,y=F.width,_=F.height,Object(p.a)(0===this.depth,"texSubImage not supported for 3D textures"),s||(s=a),s&&s.data){var D=s;s=D.data,y=D.shape[0],_=D.shape[1]}s instanceof c.a&&(s=s.handle),this.gl.bindTexture(this.target,this.handle),Object(h.l)(this.gl,R,(function(){A?e.gl.compressedTexSubImage2D(r,w,l,v,y,_,k,s):null===s?e.gl.texSubImage2D(r,w,l,v,y,_,T,E,null):ArrayBuffer.isView(s)?e.gl.texSubImage2D(r,w,l,v,y,_,T,E,s,L):s instanceof b?(Object(d.a)(e.gl),e.gl.bindBuffer(35052,s),e.gl.texSubImage2D(r,w,l,v,y,_,T,E,L),e.gl.bindBuffer(35052,null)):Object(h.g)(e.gl)?e.gl.texSubImage2D(r,w,l,v,y,_,T,E,s):e.gl.texSubImage2D(r,w,l,v,T,E,s)})),this.gl.bindTexture(this.target,null)}},{key:"copyFramebuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return h.h.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}},{key:"getActiveUnit",value:function(){return this.gl.getParameter(34016)-33984}},{key:"bind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,e=this.gl;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,this.handle),t}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,e=this.gl;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}},{key:"_getDataType",value:function(t){var e=t.data,n=t.compressed;return void 0!==n&&n?{data:e,dataType:"compressed"}:null===e?{data:e,dataType:"null"}:ArrayBuffer.isView(e)?{data:e,dataType:"typed-array"}:e instanceof c.a?{data:e.handle,dataType:"buffer"}:e instanceof b?{data:e,dataType:"buffer"}:{data:e,dataType:"browser-object"}}},{key:"_deduceParameters",value:function(t){var e=t.format,n=t.data,r=t.width,i=t.height,a=t.dataFormat,o=t.type,s=t.compressed,u=l.b[e];a=a||u&&u.dataFormat,o=o||u&&u.types[0],s=s||u&&u.compressed;var c=this._deduceImageSize(n,r,i);return{dataFormat:a,type:o,compressed:s,width:r=c.width,height:i=c.height,format:e,data:n}}},{key:"_deduceImageSize",value:function(t,e,n){var r;return r="undefined"!=typeof ImageData&&t instanceof ImageData?{width:t.width,height:t.height}:"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?{width:t.naturalWidth,height:t.naturalHeight}:"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement?{width:t.width,height:t.height}:"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?{width:t.width,height:t.height}:"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t?{width:e,height:n}:{width:e>=0?e:1,height:n>=0?n:1},Object(p.a)(r,"Could not deduced texture size"),Object(p.a)(void 0===e||r.width===e,"Deduced texture width does not match supplied width"),Object(p.a)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}},{key:"_createHandle",value:function(){return this.gl.createTexture()}},{key:"_deleteHandle",value:function(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}},{key:"_getParameter",value:function(t){switch(t){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);var e=this.gl.getTexParameter(this.target,t);return this.gl.bindTexture(this.target,null),e}}},{key:"_setParameter",value:function(t,e){switch(this.gl.bindTexture(this.target,this.handle),e=this._getNPOTParam(t,e),t){case 33082:case 33083:this.gl.texParameterf(this.handle,t,e);break;case 4096:case 4097:Object(p.a)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}},{key:"_isNPOT",value:function(){return!Object(h.g)(this.gl)&&(!(!this.width||!this.height)&&(!Object(v.b)(this.width)||!Object(v.b)(this.height)))}},{key:"_updateForNPOT",value:function(t){void 0===t[this.gl.TEXTURE_MIN_FILTER]&&(t[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===t[this.gl.TEXTURE_WRAP_S]&&(t[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===t[this.gl.TEXTURE_WRAP_T]&&(t[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}},{key:"_getNPOTParam",value:function(t,e){if(this._isNPOT())switch(t){case 10241:-1===g.indexOf(e)&&(e=9729);break;case 10242:case 10243:33071!==e&&(e=33071)}return e}}]),e}(u.a)},,function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return o}));var r=n(24),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"===("undefined"==typeof process?"undefined":Object(r.a)(process))&&process},a=i.window||i.self||i.global,o=i.process||{};console},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(32),i=n(1),a=n(3),o=n(94),s=n(21),u={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,t);var n=e.id,r=void 0===n?Object(o.c)("geometry"):n,a=e.drawMode,s=void 0===a?u.TRIANGLES:a,c=e.attributes,l=void 0===c?{}:c,h=e.indices,f=void 0===h?null:h,d=e.vertexCount,v=void 0===d?null:d;this.id=r,this.drawMode=0|s,this.attributes={},this.userData={},this._setAttributes(l,f),this.vertexCount=v||this._calculateVertexCount(this.attributes,this.indices)}return Object(a.a)(t,null,[{key:"DRAW_MODE",get:function(){return u}}]),Object(a.a)(t,[{key:"getVertexCount",value:function(){return this.vertexCount}},{key:"getAttributes",value:function(){return this.indices?Object(r.a)({indices:this.indices},this.attributes):this.attributes}},{key:"_print",value:function(t){return"Geometry ".concat(this.id," attribute ").concat(t)}},{key:"_setAttributes",value:function(t,e){for(var n in e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e),t){var r=t[n];r=ArrayBuffer.isView(r)?{value:r}:r,Object(s.a)(ArrayBuffer.isView(r.value),"".concat(this._print(n),": must be typed array or object with value as typed array")),"POSITION"!==n&&"positions"!==n||r.size||(r.size=3),"indices"===n?(Object(s.a)(!this.indices),this.indices=r):this.attributes[n]=r}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}},{key:"_calculateVertexCount",value:function(t,e){if(e)return e.value.length;var n=1/0;for(var r in t){var i=t[r],a=i.value,o=i.size;!i.constant&&a&&o>=1&&(n=Math.min(n,a.length/o))}return Object(s.a)(Number.isFinite(n)),n}},{key:"mode",get:function(){return this.drawMode}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return s}));var r=[],i=[];function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,a=r,o={index:-1,data:t,target:[]};return t?"function"==typeof t[Symbol.iterator]?a=t:t.length>0&&(i.length=t.length,a=i):a=r,(e>0||Number.isFinite(n))&&(a=(Array.isArray(a)?a:Array.from(a)).slice(e,n),o.index=e-1),{iterable:a,objectInfo:o}}function o(t){return t&&t[Symbol.asyncIterator]}function s(t,e){var n=e.size,r=e.stride,i=e.offset,a=e.startIndices,o=e.nested,s=t.BYTES_PER_ELEMENT,u=r?r/s:n,c=i?i/s:0,l=Math.floor((t.length-c)/u);return function(e,r){var i=r.index,s=r.target;if(!a){for(var h=i*u+c,f=0;f<n;f++)s[f]=t[h+f];return s}var d,v=a[i],p=a[i+1]||l;if(o){d=new Array(p-v);for(var g=v;g<p;g++){var b=g*u+c;s=new Array(n);for(var y=0;y<n;y++)s[y]=t[b+y];d[g-v]=s}}else if(u===n)d=t.subarray(v*n+c,p*n+c);else{d=new t.constructor((p-v)*n);for(var m=0,_=v;_<p;_++)for(var O=_*u+c,w=0;w<n;w++)d[m++]=t[O+w]}return d}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(88),i=n(1),a=n(3),o=n(73),s=n(21),u=n(142),c={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},l={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}},h=function(){function t(){var e=this;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];r.forEach((function(t){return e._assign(t)})),Object.freeze(this)}return Object(a.a)(t,null,[{key:"getBytesPerElement",value:function(t){return Object(o.c)(t.type||5126).BYTES_PER_ELEMENT}},{key:"getBytesPerVertex",value:function(t){return Object(s.a)(t.size),Object(o.c)(t.type||5126).BYTES_PER_ELEMENT*t.size}},{key:"resolve",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Object(r.a)(t,[c].concat(n))}}]),Object(a.a)(t,[{key:"toString",value:function(){return JSON.stringify(this)}},{key:"_assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0!==(t=Object(u.a)("Accessor",t,l)).type&&(this.type=t.type,5124!==t.type&&5125!==t.type||(this.integer=!0)),void 0!==t.size&&(this.size=t.size),void 0!==t.offset&&(this.offset=t.offset),void 0!==t.stride&&(this.stride=t.stride),void 0!==t.normalized&&(this.normalized=t.normalized),void 0!==t.integer&&(this.integer=t.integer),void 0!==t.divisor&&(this.divisor=t.divisor),void 0!==t.buffer&&(this.buffer=t.buffer),void 0!==t.index&&("boolean"==typeof index?this.index=t.index?1:0:this.index=t.index),void 0!==t.instanced&&(this.divisor=t.instanced?1:0),void 0!==t.isInstanced&&(this.divisor=t.isInstanced?1:0),this}},{key:"BYTES_PER_ELEMENT",get:function(){return t.getBytesPerElement(this)}},{key:"BYTES_PER_VERTEX",get:function(){return t.getBytesPerVertex(this)}}]),t}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(21),i=n(5),a="Invalid WebGLRenderingContext",o="Requires WebGL2";function s(t){Object(r.a)(Object(i.f)(t),a)}function u(t){Object(r.a)(Object(i.g)(t),o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(10),u=n.n(s),c=n(7),l=n.n(c),h=n(11),f=n.n(h),d=n(123),v=n(8),p=["longitude","latitude","zoom","bearing","pitch"],g=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return i()(this,e),u()(this,l()(e).call(this,t))}return f()(e,t),o()(e,[{key:"interpolateProps",value:function(t,e,n){var r={};for(var i in e)r[i]=Object(v.h)(t[i],e[i],n);return r}}]),e}(d.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return f}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(56),u=n(63),c=function(){},l={BREAK:1,SNAP_TO_END:2,IGNORE:3},h={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new s.a,transitionInterruption:l.BREAK,onTransitionStart:c,onTransitionInterrupt:c,onTransitionEnd:c},f=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i()(this,t),this.ControllerState=e,this.props=Object.assign({},h,n),this.propsInTransition=null,this.transition=new u.a(n.timeline),this.onViewStateChange=n.onViewStateChange,this._onTransitionUpdate=this._onTransitionUpdate.bind(this)}return o()(t,[{key:"finalize",value:function(){this.transition.cancel()}},{key:"getViewportInTransition",value:function(){return this.propsInTransition}},{key:"processViewStateChange",value:function(t){var e=!1,n=this.props;if(t=Object.assign({},h,t),this.props=t,this._shouldIgnoreViewportChange(n,t))return e;if(this._isTransitionEnabled(t)){var r=this.transition.settings,i=r.interruption,a=r.endProps,o=Object.assign({},n,i===l.SNAP_TO_END?a:this.propsInTransition||n);this._triggerTransition(o,t),e=!0}else this.transition.cancel();return e}},{key:"updateTransition",value:function(){this.transition.update()}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.transition.inProgress&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return this.transition.inProgress?this.transition.settings.interruption===l.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}},{key:"_triggerTransition",value:function(t,e){var n=new this.ControllerState(t),r=new this.ControllerState(e).shortestPathFrom(n),i=e.transitionInterpolator,a=i.getDuration?i.getDuration(t,e):e.transitionDuration,o=e.transitionInterpolator.initializeProps(t,r);this.propsInTransition={},this.duration=a,this.transition.start({duration:a,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startProps:o.start,endProps:o.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)}),this.updateTransition()}},{key:"_onTransitionEnd",value:function(t){var e=this;return function(n){e.propsInTransition=null,t(n)}}},{key:"_onTransitionUpdate",value:function(t){var e=t.time,n=t.settings,r=n.interpolator,i=n.startProps,a=n.endProps,o=n.duration,s=(0,n.easing)(e/o),u=r.interpolateProps(i,a,s);this.propsInTransition=new this.ControllerState(Object.assign({},this.props,u)).getViewportProps(),this.onViewStateChange&&this.onViewStateChange({viewState:this.propsInTransition,interactionState:{inTransition:!0},oldViewState:this.props})}}]),t}();f.defaultProps=h},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(57),u=n(16),c=n(20),l={transitionDuration:0},h=["wheel"],f=["panstart","panmove","panend"],d=["pinchstart","pinchmove","pinchend"],v=["doubletap"],p=["keydown"],g=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i()(this,t),Object(c.a)(e),this.ControllerState=e,this.controllerState=null,this.controllerStateProps=null,this.eventManager=null,this.transitionManager=new s.b(e,n),this._events=null,this._state={isDragging:!1},this._customEvents=[],this.onViewStateChange=null,this.onStateChange=null,this.invertPan=!1,this.handleEvent=this.handleEvent.bind(this),this.setProps(n)}return o()(t,[{key:"finalize",value:function(){for(var t in this._events)this._events[t]&&this.eventManager.off(t,this.handleEvent);this.transitionManager.finalize()}},{key:"handleEvent",value:function(t){var e=this.ControllerState;switch(this.controllerState=new e(Object.assign({},this.controllerStateProps,this._state)),t.type){case"panstart":return this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=this.controllerStateProps,n=e.x,r=e.y,i=t.offsetCenter;return[i.x-n,i.y-r]}},{key:"isPointInBounds",value:function(t,e){var n=this.controllerStateProps,r=n.width,i=n.height;if(e&&e.handled)return!1;var a=t[0]>=0&&t[0]<=r&&t[1]>=0&&t[1]<=i;return a&&e&&e.stopPropagation(),a}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"isDragging",value:function(){return this._state.isDragging}},{key:"setProps",value:function(t){"onViewportChange"in t&&u.a.removed("onViewportChange")(),"onViewStateChange"in t&&(this.onViewStateChange=t.onViewStateChange),"onStateChange"in t&&(this.onStateChange=t.onStateChange),this.controllerStateProps=t,"eventManager"in t&&this.eventManager!==t.eventManager&&(this.eventManager=t.eventManager,this._events={},this.toggleEvents(this._customEvents,!0)),this.transitionManager.processViewStateChange(this.controllerStateProps);var e=t.scrollZoom,n=void 0===e||e,r=t.dragPan,i=void 0===r||r,a=t.dragRotate,o=void 0===a||a,s=t.doubleClickZoom,c=void 0===s||s,l=t.touchZoom,g=void 0===l||l,b=t.touchRotate,y=void 0!==b&&b,m=t.keyboard,_=void 0===m||m,O=Boolean(this.onViewStateChange);this.toggleEvents(h,O&&n),this.toggleEvents(f,O&&(i||o)),this.toggleEvents(d,O&&(g||y)),this.toggleEvents(v,O&&c),this.toggleEvents(p,O&&_),this.scrollZoom=n,this.dragPan=i,this.dragRotate=o,this.doubleClickZoom=c,this.touchZoom=g,this.touchRotate=y,this.keyboard=_}},{key:"updateTransition",value:function(){this.transitionManager.updateTransition()}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach((function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))}))}},{key:"updateViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.assign({},t.getViewportProps(),e),i=this.controllerState!==t;if(i){var a=this.controllerState?this.controllerState.getViewportProps():null;this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:n,oldViewState:a})}Object.assign(this._state,t.getInteractiveState(),n),this.onStateChange&&this.onStateChange(this._state)}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.controllerState.panStart({pos:e}).rotateStart({pos:e});return this.updateViewport(n,l,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){if(!this.isDragging())return!1;var e=this.isFunctionKeyPressed(t)||t.rightButton;return(e=this.invertPan?!e:e)?this._onPanMove(t):this._onPanRotate(t)}},{key:"_onPanEnd",value:function(t){var e=this.controllerState.panEnd().rotateEnd();return this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.controllerState.pan({pos:e});return this.updateViewport(n,l,{isDragging:!0,isPanning:!0}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=t.deltaX,n=t.deltaY,r=this.controllerState.getViewportProps(),i=e/r.width,a=n/r.height,o=this.controllerState.rotate({deltaScaleX:i,deltaScaleY:a});return this.updateViewport(o,l,{isDragging:!0,isRotating:!0}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;t.preventDefault();var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=t.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.controllerState.zoom({pos:e,scale:r});return this.updateViewport(i,l,{isZooming:!0,isPanning:!0}),!0}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.controllerState.zoomStart({pos:e}).rotateStart({pos:e});return this._state.startPinchRotation=t.rotation,this.updateViewport(n,l,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;var e=this.controllerState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation,a=this._state.startPinchRotation;e=e.rotate({deltaScaleX:-(i-a)/180})}return this.updateViewport(e,l,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(t){var e=this.controllerState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.isFunctionKeyPressed(t),r=this.controllerState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps(),{isZooming:!0,isPanning:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.controllerState,i={};switch(t.srcEvent.keyCode){case 189:e=n?r.zoomOut().zoomOut():r.zoomOut(),i.isZooming=!0;break;case 187:e=n?r.zoomIn().zoomIn():r.zoomIn(),i.isZooming=!0;break;case 37:n?(e=r.rotateLeft(),i.isRotating=!0):(e=r.moveLeft(),i.isPanning=!0);break;case 39:n?(e=r.rotateRight(),i.isRotating=!0):(e=r.moveRight(),i.isPanning=!0);break;case 38:n?(e=r.rotateUp(),i.isRotating=!0):(e=r.moveUp(),i.isPanning=!0);break;case 40:n?(e=r.rotateDown(),i.isRotating=!0):(e=r.moveDown(),i.isPanning=!0);break;default:return!1}return this.updateViewport(e,this._getTransitionProps(),i),!0}},{key:"_getTransitionProps",value:function(){return l}},{key:"events",set:function(t){this.toggleEvents(this._customEvents,!1),this.toggleEvents(t,!0),this._customEvents=t,this.setProps(this.controllerStateProps)}}]),t}()},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.filter,r=void 0===n?function(){return!0}:n,i=e.map,a=void 0===i?function(t){return t}:i,o=e.result,s=void 0===o?[]:o;return Array.isArray(t)?function t(e,n,r,i){var a=-1;for(;++a<e.length;){var o=e[a];Array.isArray(o)?t(o,n,r,i):n(o)&&i.push(r(o))}return i}(t,r,a,s):r(t)?[a(t)]:[]}function i(t){for(var e=t.target,n=t.source,r=t.start,i=void 0===r?0:r,a=t.count,o=void 0===a?1:a,s=n.length,u=o*s,c=0,l=i;c<s;c++)e[l++]=n[c];for(;c<u;)c<u-c?(e.copyWithin(i+c,i,i+c),c*=2):(e.copyWithin(i+c,i,i+u-c),c=u);return e}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(24),i=n(23),a=n(85),o=n(46),s=n(29),u=/\.([^.]+)$/,c=/^data:(.*?)(;|,)/;function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).nothrow,l=void 0!==r&&r;if(e=e||"",t&&!Array.isArray(t)){var p=t;return Object(o.b)(p),p}!function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var s=i.value;Object(o.b)(s)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}(t=[].concat(Object(i.a)(t||[]),Object(i.a)(Object(a.b)())));var g=function(t,e){var n=e.match(c),r=n&&n[1];if(r)return h(t,r);var i=(n=e.match(u))&&n[1];return i&&function(t,e){e=e.toLowerCase();var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=!0,c=!1,l=void 0;try{for(var h,f=s.extensions[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){if(h.value.toLowerCase()===e)return s}}catch(t){c=!0,l=t}finally{try{u||null==f.return||f.return()}finally{if(c)throw l}}}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}(t,i)}(t,e=e.replace(/\?.*/,""));if(!(g=(g=g||function(t,e){if(!e||!Object(s.b)(e)||!e.headers)return null;var n=e.headers.get("content-type");return h(t,n)}(t,n))||function(t,e){if(!e)return null;var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if("string"==typeof e){if(f(e,s))return s}else if(ArrayBuffer.isView(e)){if(d(e.buffer,e.byteOffset,s))return s}else if(e instanceof ArrayBuffer){if(d(e,0,s))return s}}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}(t,n))){if(l)return null;var b="No valid loader found";throw n&&(b+=' for data starting with "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return v(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return v(t,0,e)}return""}(n),'"')),e&&(b+=" for ".concat(e)),new Error(b)}return g}function h(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(s.mimeTypes&&s.mimeTypes.includes(e))return s}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}function f(t,e){return e.testText&&e.testText(t)}function d(t,e,n){switch(Array.isArray(n.test)?"array":Object(r.a)(n.test)){case"function":return n.test(t,n);case"string":case"array":return(Array.isArray(n.test)?n.test:[n.test]).some((function(n){return n===v(t,e,n.length)}));default:return!1}}function v(t,e,n){if(t.byteLength<=e+n)return"";for(var r=new DataView(t),i="",a=0;a<n;a++)i+=String.fromCharCode(r.getUint8(e+a));return i}},function(t,e,n){"use strict";var r=n(41),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(44),l=/([0-9]+\.?[0-9]*)(%|px)/;function h(t){switch(i()(t)){case"number":return{position:t,relative:!1};case"string":var e=t.match(l);if(e&&e.length>=3){var n="%"===e[2],r=parseFloat(e[1]);return{position:n?r/100:r,relative:n}}default:throw new Error("Could not parse position string ".concat(t))}}function f(t,e){return t.relative?Math.round(t.position*e):t.position}var d=n(76),v=n(20);n.d(e,"a",(function(){return p}));var p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o()(this,t);var n=e.id,r=void 0===n?null:n,i=e.x,a=void 0===i?0:i,s=e.y,u=void 0===s?0:s,l=e.width,h=void 0===l?"100%":l,f=e.height,d=void 0===f?"100%":f,p=e.projectionMatrix,g=void 0===p?null:p,b=e.fovy,y=void 0===b?50:b,m=e.near,_=void 0===m?.1:m,O=e.far,w=void 0===O?1e3:O,j=e.modelMatrix,k=void 0===j?null:j,x=e.viewportInstance,E=void 0===x?null:x,P=e.type,T=void 0===P?c.a:P;Object(v.a)(!E||E instanceof c.a),this.viewportInstance=E,this.id=r||this.constructor.displayName||"view",this.type=T,this.props=Object.assign({},e,{id:this.id,projectionMatrix:g,fovy:y,near:_,far:w,modelMatrix:k}),this._parseDimensions({x:a,y:u,width:h,height:d}),this.equals=this.equals.bind(this),Object.seal(this)}return u()(t,[{key:"equals",value:function(t){return this===t||(this.viewportInstance?t.viewportInstance&&this.viewportInstance.equals(t.viewportInstance):Object(d.a)(this.props,t.props))}},{key:"makeViewport",value:function(t){var e=t.width,n=t.height,r=t.viewState;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);var i=this.getDimensions({width:e,height:n}),a=Object.assign({viewState:r},r,this.props,i);return this._getViewport(a)}},{key:"getViewStateId",value:function(){switch(i()(this.props.viewState)){case"string":return this.props.viewState;case"object":return this.props.viewState&&this.props.viewState.id;default:return this.id}}},{key:"filterViewState",value:function(t){if(this.props.viewState&&"object"===i()(this.props.viewState)){if(!this.props.viewState.id)return this.props.viewState;var e=Object.assign({},t);for(var n in this.props.viewState)"id"!==n&&(e[n]=this.props.viewState[n]);return e}return t}},{key:"getDimensions",value:function(t){var e=t.width,n=t.height;return{x:f(this._x,e),y:f(this._y,n),width:f(this._width,e),height:f(this._height,n)}}},{key:"_getControllerProps",value:function(t){var e=this.props.controller;return e?!0===e?t:("function"==typeof e&&(e={type:e}),Object.assign({},t,e)):null}},{key:"_getViewport",value:function(t){return new(0,this.type)(t)}},{key:"_parseDimensions",value:function(t){var e=t.x,n=t.y,r=t.width,i=t.height;this._x=h(e),this._y=h(n),this._width=h(r),this._height=h(i)}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(0),i=n(19),a=n(1),o=n(13),s=n(28),u=n(9),c=n(93),l=n(3),h=n(14),f=n(5),d=n(39),v=n(92),p=n(82),g=n(130),b=n(141),y=n(187),m=n(55),_=n(78),O=n(21),w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,e),(n=Object(o.a)(this,Object(u.a)(e).call(this,t,r))).width=null,n.height=null,n.attachments={},n.readBuffer=36064,n.drawBuffers=[36064],n.ownResources=[],n.initialize(r),Object.seal(Object(s.a)(n)),n}return Object(h.a)(e,t),Object(l.a)(e,[{key:"MAX_COLOR_ATTACHMENTS",get:function(){return this.gl.getParameter(this.gl.MAX_COLOR_ATTACHMENTS)}},{key:"MAX_DRAW_BUFFERS",get:function(){return this.gl.getParameter(this.gl.MAX_DRAW_BUFFERS)}}],[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.colorBufferFloat,r=e.colorBufferHalfFloat,i=!0;return n&&(i=Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")||t.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("EXT_color_buffer_half_float"))),i}},{key:"getDefaultFramebuffer",value:function(t){return t.luma=t.luma||{},t.luma.defaultFramebuffer=t.luma.defaultFramebuffer||new e(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}}]),Object(l.a)(e,[{key:"initialize",value:function(t){var e=t.width,n=void 0===e?1:e,r=t.height,i=void 0===r?1:r,a=t.attachments,o=void 0===a?null:a,s=t.color,u=void 0===s||s,c=t.depth,l=void 0===c||c,h=t.stencil,f=void 0!==h&&h,d=t.check,v=void 0===d||d,p=t.readBuffer,g=t.drawBuffers;if(Object(O.a)(n>=0&&i>=0,"Width and height need to be integers"),this.width=n,this.height=i,o)for(var b in o){var y=o[b];(Array.isArray(y)?y[0]:y).resize({width:n,height:i})}else o=this._createDefaultAttachments(u,l,f,n,i);this.update({clearAttachments:!0,attachments:o,readBuffer:p,drawBuffers:g}),o&&v&&this.checkStatus()}},{key:"delete",value:function(){var t=!0,n=!1,r=void 0;try{for(var i,a=this.ownResources[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.delete()}}catch(t){n=!0,r=t}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}Object(c.a)(Object(u.a)(e.prototype),"delete",this).call(this)}},{key:"update",value:function(t){var e=t.attachments,n=void 0===e?{}:e,r=t.readBuffer,i=t.drawBuffers,a=t.clearAttachments,o=void 0!==a&&a,s=t.resizeAttachments,u=void 0===s||s;this.attach(n,{clearAttachments:o,resizeAttachments:u});var c=this.gl,l=c.bindFramebuffer(36160,this.handle);return r&&this._setReadBuffer(r),i&&this._setDrawBuffers(i),c.bindFramebuffer(36160,l||null),this}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,n=t.height;if(null===this.handle)return Object(O.a)(void 0===e&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;for(var r in void 0===e&&(e=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),e!==this.width&&n!==this.height&&f.h.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(e,"x").concat(n))(),this.attachments)this.attachments[r].resize({width:e,height:n});return this.width=e,this.height=n,this}},{key:"attach",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clearAttachments,a=void 0!==r&&r,o=n.resizeAttachments,s=void 0===o||o,u={};a&&Object.keys(this.attachments).forEach((function(t){u[t]=null})),Object.assign(u,t);var c=this.gl.bindFramebuffer(36160,this.handle);for(var l in u){Object(O.a)(void 0!==l,"Misspelled framebuffer binding point?");var h=Number(l),f=u[h],d=f;if(d)if(d instanceof p.a)this._attachRenderbuffer({attachment:h,renderbuffer:d});else if(Array.isArray(f)){var v=Object(i.a)(f,3),g=v[0],b=v[1],y=void 0===b?0:b,m=v[2],_=void 0===m?0:m;d=g,this._attachTexture({attachment:h,texture:g,layer:y,level:_})}else this._attachTexture({attachment:h,texture:d,layer:0,level:0});else this._unattach(h);s&&d&&d.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,c||null),Object.assign(this.attachments,t),Object.keys(this.attachments).filter((function(t){return!e.attachments[t]})).forEach((function(t){delete e.attachments[t]}))}},{key:"checkStatus",value:function(){this.gl;var t=this.getStatus();if(36053!==t)throw new Error(j(t));return this}},{key:"getStatus",value:function(){var t=this.gl,e=t.bindFramebuffer(36160,this.handle),n=t.checkFramebufferStatus(36160);return t.bindFramebuffer(36160,e||null),n}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color,n=t.depth,r=t.stencil,i=t.drawBuffers,a=void 0===i?[]:i,o=this.gl.bindFramebuffer(36160,this.handle);return(e||n||r)&&Object(g.a)(this.gl,{color:e,depth:n,stencil:r}),a.forEach((function(t,e){Object(g.b)({drawBuffer:e,value:t})})),this.gl.bindFramebuffer(36160,o||null),this}},{key:"readPixels",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}},{key:"readPixelsToBuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}},{key:"copyToDataUrl",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}},{key:"copyToImage",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}},{key:"copyToTexture",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}},{key:"blit",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}},{key:"invalidate",value:function(t){var e=t.attachments,n=void 0===e?[]:e,r=t.x,i=void 0===r?0:r,a=t.y,o=void 0===a?0:a,s=t.width,u=t.height,c=this.gl;Object(m.a)(c);var l=c.bindFramebuffer(36008,this.handle);return 0===i&&0===o&&void 0===s&&void 0===u?c.invalidateFramebuffer(36008,n):c.invalidateFramebuffer(36008,n,i,o,s,u),c.bindFramebuffer(36008,l),this}},{key:"getAttachmentParameter",value:function(t,e,n){var r=this._getAttachmentParameterFallback(e);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,t,e),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=Object(_.a)(this.gl,r)),r}},{key:"getAttachmentParameters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[],r={},i=!0,a=!1,o=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=e?Object(_.a)(this.gl,c):c;r[l]=this.getAttachmentParameter(t,c,e)}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}return r}},{key:"getParameters",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=Object.keys(this.attachments),n={},r=0,i=e;r<i.length;r++){var a=i[r],o=Number(a),s=t?Object(_.a)(this.gl,o):o;n[s]=this.getAttachmentParameters(o,t)}return n}},{key:"show",value:function(){return"undefined"!=typeof window&&window.open(Object(b.a)(this),"luma-debug-texture"),this}},{key:"log",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t>f.h.level||"undefined"==typeof window)return this;e=e||"Framebuffer ".concat(this.id);var n=Object(b.a)(this,{maxHeight:100});return f.h.image({logLevel:t,message:e,image:n},e)(),this}},{key:"bind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=void 0===e?36160:e;return this.gl.bindFramebuffer(n,this.handle),this}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=void 0===e?36160:e;return this.gl.bindFramebuffer(n,null),this}},{key:"_createDefaultAttachments",value:function(t,e,n,i,a){var o,s=null;t&&((s=s||{})[36064]=new v.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:i,height:a,mipmaps:!1,parameters:(o={},Object(r.a)(o,10241,9729),Object(r.a)(o,10240,9729),Object(r.a)(o,10242,33071),Object(r.a)(o,10243,33071),o)}),this.ownResources.push(s[36064]));return e&&n?((s=s||{})[33306]=new p.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:i,height:111}),this.ownResources.push(s[33306])):e?((s=s||{})[36096]=new p.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:i,height:a}),this.ownResources.push(s[36096])):n&&Object(O.a)(!1),s}},{key:"_unattach",value:function(t){var e=this.attachments[t];e&&(e instanceof p.a?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}},{key:"_attachRenderbuffer",value:function(t){var e=t.attachment,n=void 0===e?36064:e,r=t.renderbuffer;this.gl.framebufferRenderbuffer(36160,n,36161,r.handle),this.attachments[n]=r}},{key:"_attachTexture",value:function(t){var e=t.attachment,n=void 0===e?36064:e,r=t.texture,i=t.layer,a=t.level,o=this.gl;switch(o.bindTexture(r.target,r.handle),r.target){case 35866:case 32879:o.framebufferTextureLayer(36160,n,r.target,a,i);break;case 34067:var s=function(t){return t<34069?t+34069:t}(i);o.framebufferTexture2D(36160,n,s,r.handle,a);break;case 3553:o.framebufferTexture2D(36160,n,3553,r.handle,a);break;default:Object(O.a)(!1,"Illegal texture type")}o.bindTexture(r.target,null),this.attachments[n]=r}},{key:"_setReadBuffer",value:function(t){var e=this.gl;Object(f.g)(e)?e.readBuffer(t):Object(O.a)(36064===t||1029===t,"Multiple render targets not supported"),this.readBuffer=t}},{key:"_setDrawBuffers",value:function(t){var e=this.gl;if(Object(f.g)(e))e.drawBuffers(t);else{var n=e.getExtension("WEBGL.draw_buffers");n?n.drawBuffersWEBGL(t):Object(O.a)(1===t.length&&(36064===t[0]||1029===t[0]),"Multiple render targets not supported")}this.drawBuffers=t}},{key:"_getAttachmentParameterFallback",value:function(t){var e=Object(y.a)(this.gl);switch(t){case 36052:return e.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return e.WEBGL2?null:8;case 33297:return e.WEBGL2?null:5125;case 33296:return e.WEBGL2||e.EXT_sRGB?null:9729;default:return null}}},{key:"_createHandle",value:function(){return this.gl.createFramebuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteFramebuffer(this.handle)}},{key:"_bindHandle",value:function(t){return this.gl.bindFramebuffer(36160,t)}},{key:"color",get:function(){return this.attachments[36064]||null}},{key:"texture",get:function(){return this.attachments[36064]||null}},{key:"depth",get:function(){return this.attachments[36096]||this.attachments[33306]||null}},{key:"stencil",get:function(){return this.attachments[36128]||this.attachments[33306]||null}}]),e}(d.a);function j(t){return(w.STATUS||{})[t]||"Framebuffer error ".concat(t)}w.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a);function s(){}var u={onStart:s,onUpdate:s,onInterrupt:s,onEnd:s},c=function(){function t(e){i()(this,t),this._inProgress=!1,this._handle=null,this.timeline=e,this.settings={}}return o()(t,[{key:"start",value:function(t){this.cancel(),this.settings=Object.assign({},u,t),this._inProgress=!0;var e=this.timeline,n=this.settings;this._handle=e.addChannel({delay:e.getTime(),duration:n.duration}),n.onStart(this)}},{key:"end",value:function(){this._inProgress&&(this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,this.settings.onEnd(this))}},{key:"cancel",value:function(){this._inProgress&&(this.settings.onInterrupt(this),this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}},{key:"update",value:function(){return!!this._inProgress&&(this.time=this.timeline.getTime(this._handle),this._onUpdate(),this.settings.onUpdate(this),this.timeline.isFinished(this._handle)&&this.end(),!0)}},{key:"_onUpdate",value:function(){}},{key:"inProgress",get:function(){return this._inProgress}}]),t}()},function(t,e,n){"use strict";var r=n(0),i=n(24),a=n(1),o=n(3),s=function(){function t(){Object(a.a)(this,t)}return Object(o.a)(t,[{key:"log",value:function(){return function(t){}}},{key:"info",value:function(){return function(t){}}},{key:"warn",value:function(){return function(t){}}},{key:"error",value:function(){return function(t){}}}]),t}(),u={CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new(function(){function t(){Object(a.a)(this,t),this.console=console}return Object(o.a)(t,[{key:"log",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.log).bind.apply(t,[this.console].concat(n))}},{key:"info",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.info).bind.apply(t,[this.console].concat(n))}},{key:"warn",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.warn).bind.apply(t,[this.console].concat(n))}},{key:"error",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.error).bind.apply(t,[this.console].concat(n))}}]),t}()),dataType:"arraybuffer"};function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return v}));var h=function(t){return t&&"object"===Object(i.a)(t)&&t.constructor==={}.constructor},f=l({},u);function d(t){f=v(f,t)}function v(t,e,n){var r=l({},t&&(t.DEFAULT_LOADER_OPTIONS||t.defaultOptions||t.options||{}));return function(t,e){!e||"baseUri"in t||(t.baseUri=e)}(r,n),null===r.log&&(r.log=new s),p(r,f),p(r,e),r}function p(t,e){for(var n in e)if(n in e){var r=e[n];h(r)&&h(t[n])?t[n]=l({},t[n],{},e[n]):t[n]=e[n]}}},function(t,e,n){"use strict";var r=n(6),i=n.n(r),a=n(15),o=n(29),s=n(97),u=n(124);function c(t){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(i.a.mark((function t(e){var n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=12;break}return n="fetch failed ".concat(e.status," "),t.prev=2,t.next=5,e.text();case 5:r=t.sent,n+=r,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(2);case 11:throw new Error(n);case 12:case"end":return t.stop()}}),t,null,[[2,9]])})))).apply(this,arguments)}n.d(e,"e",(function(){return f})),n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return v})),n.d(e,"c",(function(){return g})),n.d(e,"d",(function(){return b}));var h="Cannot convert supplied data type";function f(t,e){return Object(o.b)(t)?e=e||t.url:Object(o.c)(e)&&(e=e.name),"string"==typeof e?e.replace(/\?.*/,""):e}function d(t,e){if(e.text&&"string"==typeof t)return t;if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){var n=t.buffer||t;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}throw new Error(h)}function v(t,e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function t(e,n){var r,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(e=t.sent,r=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!r){t.next=6;break}return t.abrupt("return",d(e,n));case 6:if(!Object(o.c)(e)){t.next=10;break}return t.next=9,Object(u.a)(e);case 9:e=t.sent;case 10:if(!Object(o.b)(e)){t.next=24;break}return a=e,t.next=14,c(a);case 14:if(!n.binary){t.next=20;break}return t.next=17,a.arrayBuffer();case 17:t.t0=t.sent,t.next=23;break;case 20:return t.next=22,a.text();case 22:t.t0=t.sent;case 23:return t.abrupt("return",t.t0);case 24:throw new Error(h);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return Object(o.e)(t)?t:Object(o.b)(t)&&t.body?(function(t){if(!t.ok)throw new Error("fetch failed ".concat(t.status))}(t),Object(s.a)(t.body)):Object(o.g)(t)?Object(s.a)(t):Object(o.a)(t)?t[Symbol.asyncIterator]():b(t)}function b(t){if(t instanceof ArrayBuffer||ArrayBuffer.isView(t))return i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.buffer||t;case 2:case"end":return e.stop()}}),e)}))();if(Object(o.e)(t))return t;if(Object(o.d)(t))return t[Symbol.iterator]();throw new Error(h)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n(23),i=n(0),a=n(68);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t,e,n){return n||(t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({fetch:t.fetch||a.a},t),Array.isArray(t.loaders)||(t.loaders=null),t)}function u(t,e){if(!e&&!Array.isArray(t))return t;var n;if(t&&(n=Array.isArray(t)?t:[t]),e&&e.loaders){var i=Array.isArray(e.loaders)?e.loaders:[e.loaders];n=n?[].concat(Object(r.a)(n),Object(r.a)(i)):i}return n&&n.length?n:null}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var r="vs",i="fs"},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(6),i=n.n(r),a=n(15),o=n(189),s=n(29),u=n(124);function c(t,e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(i.a.mark((function t(e,n){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Object(s.c)(e)){t.next=2;break}return t.abrupt("return",Object(u.a)(e,n));case 2:return e=Object(o.b)(e),t.abrupt("return",fetch(e,n));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return _})),n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return w}));var r,i=n(19),a=n(0),o=n(21),s=5120,u=5121,c=5122,l=5123,h=0,f=1,d=2,v=3,p=4,g=5,b=6,y=5126,m=(r={},Object(a.a)(r,y,[y,1,"float"]),Object(a.a)(r,35664,[y,2,"vec2"]),Object(a.a)(r,35665,[y,3,"vec3"]),Object(a.a)(r,35666,[y,4,"vec4"]),Object(a.a)(r,5124,[5124,1,"int"]),Object(a.a)(r,35667,[5124,2,"ivec2"]),Object(a.a)(r,35668,[5124,3,"ivec3"]),Object(a.a)(r,35669,[5124,4,"ivec4"]),Object(a.a)(r,5125,[5125,1,"uint"]),Object(a.a)(r,36294,[5125,2,"uvec2"]),Object(a.a)(r,36295,[5125,3,"uvec3"]),Object(a.a)(r,36296,[5125,4,"uvec4"]),Object(a.a)(r,35670,[y,1,"bool"]),Object(a.a)(r,35671,[y,2,"bvec2"]),Object(a.a)(r,35672,[y,3,"bvec3"]),Object(a.a)(r,35673,[y,4,"bvec4"]),Object(a.a)(r,35674,[y,8,"mat2"]),Object(a.a)(r,35685,[y,8,"mat2x3"]),Object(a.a)(r,35686,[y,8,"mat2x4"]),Object(a.a)(r,35675,[y,12,"mat3"]),Object(a.a)(r,35687,[y,12,"mat3x2"]),Object(a.a)(r,35688,[y,12,"mat3x4"]),Object(a.a)(r,35676,[y,16,"mat4"]),Object(a.a)(r,35689,[y,16,"mat4x2"]),Object(a.a)(r,35690,[y,16,"mat4x3"]),r);function _(t){switch(t){case h:return h;case f:case v:case d:return f;case p:case g:case b:return p;default:return Object(o.a)(!1),0}}function O(t){var e=m[t];if(!e)return null;var n=Object(i.a)(e,2);return{type:n[0],components:n[1]}}function w(t,e){switch(t){case s:case u:case c:case l:t=y}for(var n in m){var r=Object(i.a)(m[n],3),a=r[0],o=r[1],h=r[2];if(a===t&&o===e)return{glType:n,name:h}}return null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=n(12);function i(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function a(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}var o,s;o=new r.a(4),r.a!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0,o[3]=0),s=o},function(t,e,n){"use strict";var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.overAlloc,r=void 0===n?2:n,a=e.poolSize,o=void 0===a?100:a;i()(this,t),this.overAlloc=r,this.poolSize=o,this._pool=[]}return o()(t,[{key:"allocate",value:function(t,e,n){var r=n.size,i=void 0===r?1:r,a=n.type,o=n.padding,s=void 0===o?0:o,u=n.copy,c=void 0!==u&&u,l=a||t&&t.constructor||Float32Array,h=e*i+s;if(ArrayBuffer.isView(t)){if(h<=t.length)return t;if(h*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new l(t.buffer,0,h)}var f=this._allocate(l,h);return t&&c?f.set(t):f.fill(0,0,4),this._release(t),f}},{key:"release",value:function(t){this._release(t)}},{key:"_allocate",value:function(t,e){e=Math.max(Math.ceil(e*this.overAlloc),1);var n=this._pool,r=t.BYTES_PER_ELEMENT*e,i=n.findIndex((function(t){return t.byteLength>=r}));return i>=0?new t(n.splice(i,1)[0],0,e):new t(e)}},{key:"_release",value:function(t){if(ArrayBuffer.isView(t)){var e=this._pool,n=t.buffer,r=n.byteLength,i=e.findIndex((function(t){return t.byteLength>=r}));i<0?e.push(n):(i>0||e.length<this.poolSize)&&e.splice(i,0,n),e.length>this.poolSize&&e.shift()}}}]),t}();e.a=new s},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f}));var r,i,a,o=n(0),s=n(5),u=(r={},Object(o.a)(r,6407,{dataFormat:6407,types:[5121,33635]}),Object(o.a)(r,6408,{dataFormat:6408,types:[5121,32819,32820]}),Object(o.a)(r,6406,{dataFormat:6406,types:[5121]}),Object(o.a)(r,6409,{dataFormat:6409,types:[5121]}),Object(o.a)(r,6410,{dataFormat:6410,types:[5121]}),Object(o.a)(r,33326,{dataFormat:6403,types:[5126],gl2:!0}),Object(o.a)(r,33328,{dataFormat:33319,types:[5126],gl2:!0}),Object(o.a)(r,34837,{dataFormat:6407,types:[5126],gl2:!0}),Object(o.a)(r,34836,{dataFormat:6408,types:[5126],gl2:!0}),r),c=(i={},Object(o.a)(i,6403,1),Object(o.a)(i,36244,1),Object(o.a)(i,33319,2),Object(o.a)(i,33320,2),Object(o.a)(i,6407,3),Object(o.a)(i,36248,3),Object(o.a)(i,6408,4),Object(o.a)(i,36249,4),Object(o.a)(i,6402,1),Object(o.a)(i,34041,1),Object(o.a)(i,6406,1),Object(o.a)(i,6409,1),Object(o.a)(i,6410,2),i),l=(a={},Object(o.a)(a,5126,4),Object(o.a)(a,5125,4),Object(o.a)(a,5124,4),Object(o.a)(a,5123,2),Object(o.a)(a,5122,2),Object(o.a)(a,5131,2),Object(o.a)(a,5120,1),Object(o.a)(a,5121,1),a);function h(t,e){var n=u[e];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;var r=Object(s.g)(t)&&n.gl2||n.gl1;return"string"==typeof r?t.getExtension(r):r}function f(t,e){var n=u[e];switch(n&&n.types[0]){case 5126:return t.getExtension("OES_texture_float_linear");case 5131:return t.getExtension("OES_texture_half_float_linear");default:return!0}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return s}));var r="Failed to deduce GL constant from typed array";function i(t){switch(ArrayBuffer.isView(t)?t.constructor:t){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error(r)}}function a(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clamped,n=void 0===e||e;switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return n?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function o(t){var e=t.data,n=t.width,r=t.height,i=t.bytesPerPixel,a=void 0===i?4:i,o=t.temp,s=n*a;o=o||new Uint8Array(s);for(var u=0;u<r/2;++u){var c=u*s,l=(r-u-1)*s;o.set(e.subarray(c,c+s)),e.copyWithin(c,l,l+s),e.set(o,l)}}function s(t){for(var e=t.data,n=t.width,r=t.height,i=Math.round(n/2),a=Math.round(r/2),o=new Uint8Array(i*a*4),s=0;s<a;s++)for(var u=0;u<i;u++)for(var c=0;c<4;c++)o[4*(s*i+u)+c]=e[4*(2*s*n+2*u)+c];return{data:o,width:i,height:a}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(10),u=n.n(s),c=n(7),l=n.n(c),h=n(11),f=n.n(h),d=n(122),v=n(5),p=n(130),g=function(t){function e(){return i()(this,e),u()(this,l()(e).apply(this,arguments))}return f()(e,t),o()(e,[{key:"render",value:function(t){var e=this.gl;return Object(v.k)(e,{framebuffer:t.target}),this._drawLayers(t)}},{key:"_drawLayers",value:function(t){var e=this,n=t.viewports,r=t.views,i=t.onViewportActive,a=t.clearCanvas,o=void 0===a||a,s=this.gl;o&&function(t){var e=t.drawingBufferWidth,n=t.drawingBufferHeight;Object(v.k)(t,{viewport:[0,0,e,n]}),t.clear(16640)}(s);var u=[];return n.forEach((function(n,a){var o=n.viewport||n,c=r&&r[o.id];i(o),t.viewport=o,t.view=c;var l=e._drawLayersInViewport(s,t);u.push(l)})),u}},{key:"_drawLayersInViewport",value:function(t,e){var n=this,r=e.layers,i=e.layerFilter,a=e.viewport,o=e.view,s=e.pass,u=void 0===s?"unknown":s,c=e.effects,l=e.moduleParameters,h=function(t,e){var n=e.viewport,r=t.canvas?t.canvas.clientHeight||t.canvas.height:100,i=n,a=Object(v.c)(t);return[i.x*a,(r-i.y-i.height)*a,i.width*a,i.height*a]}(t,{viewport:a});if(o&&o.props.clear){var f=!0===o.props.clear?{color:!0,depth:!0}:o.props.clear;Object(v.l)(t,{scissorTest:!0,scissor:h},(function(){return Object(p.a)(t,f)}))}var d={totalCount:r.length,visibleCount:0,compositeCount:0,pickableCount:0};return Object(v.k)(t,{viewport:h}),r.forEach((function(t,e){var r=n._shouldDrawLayer(t,a,u,i);if(r&&t.props.pickable&&d.pickableCount++,t.isComposite&&d.compositeCount++,r){d.visibleCount++;var o=n._getModuleParameters(t,c,u,l),s=Object.assign({},t.context.uniforms,{layerIndex:e}),h=n.getLayerParameters(t,e);t.drawLayer({moduleParameters:o,uniforms:s,parameters:h})}})),d}},{key:"shouldDrawLayer",value:function(t){return!0}},{key:"getModuleParameters",value:function(t,e){return null}},{key:"getLayerParameters",value:function(t,e){return t.props.parameters}},{key:"_shouldDrawLayer",value:function(t,e,n,r){var i=this.shouldDrawLayer(t)&&!t.isComposite&&t.props.visible;return i&&r&&(i=r({layer:t,viewport:e,isPicking:n.startsWith("picking"),renderPass:n})),i}},{key:"_getModuleParameters",value:function(t,e,n,r){var i=Object.assign(Object.create(t.props),{viewport:t.context.viewport,mousePosition:t.context.mousePosition,pickingActive:0,devicePixelRatio:Object(v.c)(this.gl)});if(e){var a=!0,o=!1,s=void 0;try{for(var u,c=e[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var l=u.value;Object.assign(i,l.getModuleParameters(t))}}catch(t){o=!0,s=t}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}}return Object.assign(i,this.getModuleParameters(t,e),r)}}]),e}(d.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t);var n=e.id,r=void 0===n?"effect":n;this.id=r,this.props={},Object.assign(this.props,e)}return o()(t,[{key:"preRender",value:function(){}},{key:"getModuleParameters",value:function(){}},{key:"cleanup",value:function(){}}]),t}()},function(t,e,n){"use strict";function r(t,e){return t===e||Object.keys(t).every((function(n){return Array.isArray(t[n])&&Array.isArray(e[n])?r(t[n],e[n]):t[n]===e[n]}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(125);function i(t){var e,n;function i(e,n){try{var o=t[e](n),s=o.value,u=s instanceof r.a;Promise.resolve(u?s.wrapped:s).then((function(t){u?i("next",t):a(o.done?"return":"normal",t)}),(function(t){i("throw",t)}))}catch(t){a("throw",t)}}function a(t,r){switch(t){case"return":e.resolve({value:r,done:!0});break;case"throw":e.reject(r);break;default:e.resolve({value:r,done:!1})}(e=e.next)?i(e.key,e.arg):n=null}this._invoke=function(t,r){return new Promise((function(a,o){var s={key:t,arg:r,resolve:a,reject:o,next:null};n?n=n.next=s:(e=n=s,i(t,r))}))},"function"!=typeof t.return&&(this.return=void 0)}function a(t){return function(){return new i(t.apply(this,arguments))}}"function"==typeof Symbol&&Symbol.asyncIterator&&(i.prototype[Symbol.asyncIterator]=function(){return this}),i.prototype.next=function(t){return this._invoke("next",t)},i.prototype.throw=function(t){return this._invoke("throw",t)},i.prototype.return=function(t){return this._invoke("return",t)},n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n(21);function i(t,e){if("string"!=typeof e)return e;var n=Number(e);if(!isNaN(n))return n;var i=t[e=e.replace(/^.*\./,"")];return Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(e)),i}function a(t,e){for(var n in e=Number(e),t)if(t[n]===e)return"GL.".concat(n);return String(e)}},function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(Array.isArray(t)){var n=t.length;if(!e||e.length!==n)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}function i(t){var e,n={};return function(i){for(var a in i)if(!r(i[a],n[a])){e=t(i),n=i;break}return e}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(8),u=[255,255,255],c=1,l=[0,0,-1],h=0,f=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t);var n=e.color,r=void 0===n?u:n,a=e.intensity,o=void 0===a?c:a,f=e.direction,d=void 0===f?l:f,v=e._shadow,p=void 0!==v&&v;this.id=e.id||"directional-".concat(h++),this.color=r,this.intensity=o,this.type="directional",this.direction=new s.c(d).normalize().toArray(),this.shadow=p}return o()(t,[{key:"getProjectedLight",value:function(){return this}}]),t}()},function(t,e,n){"use strict";var r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n  float r, s, t, x;\n\n  if (a == 0.0) {\n    return 0.0;\n  }\n\n  x = -a * a;\n  s = a;\n  r = a;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_3;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_5;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_7;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_9;\n  s = s + t;\n\n  return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n  if (a == 0.0) {\n    sin_t = 0.0;\n    cos_t = 1.0;\n  }\n  sin_t = sin_taylor_fp32(a);\n  cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n    float sin_a;\n    float cos_a;\n\n    if (a == 0.0) {\n        return 0.0;\n    }\n    float z = floor(a / TWO_PI);\n    float r = a - TWO_PI * z;\n\n    float t;\n    float q = floor(r / PI_2 + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return 0.0 / 0.0;\n    }\n\n    t = r - PI_2 * q;\n\n    q = floor(t / PI_16 + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return 0.0 / 0.0;\n    } else {\n        t = t - PI_16 * q;\n    }\n\n    float u = 0.0;\n    float v = 0.0;\n\n    float sin_t, cos_t;\n    float s, c;\n    sincos_taylor_fp32(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0;\n            v = SIN_TABLE_0;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1;\n            v = SIN_TABLE_1;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2;\n            v = SIN_TABLE_2;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3;\n            v = SIN_TABLE_3;\n        }\n        if (k > 0) {\n            s = u * sin_t + v * cos_t;\n            c = u * cos_t - v * sin_t;\n        } else {\n            s = u * sin_t - v * cos_t;\n            c = u * cos_t + v * sin_t;\n        }\n    }\n\n    if (j == 0) {\n        sin_a = s;\n        cos_a = c;\n    } else if (j == 1) {\n        sin_a = c;\n        cos_a = -s;\n    } else if (j == -1) {\n        sin_a = -c;\n        cos_a = s;\n    } else {\n        sin_a = -s;\n        cos_a = -c;\n    }\n    return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n  return tan_taylor_fp32(a);\n#else\n  return tan(a);\n#endif\n}\n",fs:null},i=n(17),a=Object.keys(i.a).map((function(t){return"const float COORDINATE_SYSTEM_".concat(t," = ").concat(i.a[t],".;")})).join(""),o=Object.keys(i.c).map((function(t){return"const float PROJECTION_MODE_".concat(t," = ").concat(i.c[t],".;")})).join(""),s="".concat(a,"\n").concat(o,"\n\nuniform float project_uCoordinateSystem;\nuniform float project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform float project_uAntimeridian;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nfloat project_size(float meters) {\n  return meters * project_uCommonUnitsPerMeter.z;\n}\n\nvec2 project_size(vec2 meters) {\n  return meters * project_uCommonUnitsPerMeter.xy;\n}\n\nvec3 project_size(vec3 meters) {\n  return meters * project_uCommonUnitsPerMeter;\n}\n\nvec4 project_size(vec4 meters) {\n  return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nvec3 project_normal(vec3 vector) {\n  vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n  return normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n}\n\nvec4 project_offset_(vec4 offset) {\n  float dy = offset.y;\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n    dy = clamp(dy, -1., 1.);\n  }\n  vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n  return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n  float x = lnglat.x;\n  if (project_uWrapLongitude) {\n    x = mod(x - project_uAntimeridian, 360.0) + project_uAntimeridian;\n  }\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan_fp32(PI * 0.25 + radians(lnglat.y) * 0.5))\n  );\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n  vec4 position_world = project_uModelMatrix * position;\n  if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n    if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n      return vec4(\n        project_mercator_(position_world.xy) * WORLD_SCALE,\n        project_size(position_world.z),\n        position_world.w\n      );\n    }\n  }\n  if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n    (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT)) {\n    position_world.xyz -= project_uCoordinateOrigin;\n    position_world += project_uModelMatrix * vec4(position64Low, 0.0);\n  }\n\n  return project_offset_(position_world);\n}\n\nvec4 project_position(vec4 position) {\n  return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n  vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n  return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n  vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n  return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n  vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n  return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_METER_OFFSETS ||\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    position.w *= project_uCommonUnitsPerMeter.z;\n  }\n  return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n  return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n  vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n  return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n  return project_size(meters) * project_uScale;\n}\nfloat project_pixel_size(float pixels) {\n  return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n  return pixels / project_uScale;\n}\n"),u=n(90),c={};e.a={name:"project",dependencies:[r],vs:s,getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return t.viewport?Object(u.b)(t):{}}}},function(t,e,n){"use strict";var r,i=n(1),a=n(13),o=n(9),s=n(28),u=n(3),c=n(14),l=n(39),h=n(0),f="EXT_color_buffer_float",d=(r={},Object(h.a)(r,33189,{bpp:2}),Object(h.a)(r,33190,{gl2:!0,bpp:3}),Object(h.a)(r,36012,{gl2:!0,bpp:4}),Object(h.a)(r,36168,{bpp:1}),Object(h.a)(r,34041,{bpp:4}),Object(h.a)(r,35056,{gl2:!0,bpp:4}),Object(h.a)(r,36013,{gl2:!0,bpp:5}),Object(h.a)(r,32854,{bpp:2}),Object(h.a)(r,36194,{bpp:2}),Object(h.a)(r,32855,{bpp:2}),Object(h.a)(r,33321,{gl2:!0,bpp:1}),Object(h.a)(r,33330,{gl2:!0,bpp:1}),Object(h.a)(r,33329,{gl2:!0,bpp:1}),Object(h.a)(r,33332,{gl2:!0,bpp:2}),Object(h.a)(r,33331,{gl2:!0,bpp:2}),Object(h.a)(r,33334,{gl2:!0,bpp:4}),Object(h.a)(r,33333,{gl2:!0,bpp:4}),Object(h.a)(r,33323,{gl2:!0,bpp:2}),Object(h.a)(r,33336,{gl2:!0,bpp:2}),Object(h.a)(r,33335,{gl2:!0,bpp:2}),Object(h.a)(r,33338,{gl2:!0,bpp:4}),Object(h.a)(r,33337,{gl2:!0,bpp:4}),Object(h.a)(r,33340,{gl2:!0,bpp:8}),Object(h.a)(r,33339,{gl2:!0,bpp:8}),Object(h.a)(r,32849,{gl2:!0,bpp:3}),Object(h.a)(r,32856,{gl2:!0,bpp:4}),Object(h.a)(r,32857,{gl2:!0,bpp:4}),Object(h.a)(r,36220,{gl2:!0,bpp:4}),Object(h.a)(r,36238,{gl2:!0,bpp:4}),Object(h.a)(r,36975,{gl2:!0,bpp:4}),Object(h.a)(r,36214,{gl2:!0,bpp:8}),Object(h.a)(r,36232,{gl2:!0,bpp:8}),Object(h.a)(r,36226,{gl2:!0,bpp:16}),Object(h.a)(r,36208,{gl2:!0,bpp:16}),Object(h.a)(r,33325,{gl2:f,bpp:2}),Object(h.a)(r,33327,{gl2:f,bpp:4}),Object(h.a)(r,34842,{gl2:f,bpp:8}),Object(h.a)(r,33326,{gl2:f,bpp:4}),Object(h.a)(r,33328,{gl2:f,bpp:8}),Object(h.a)(r,34836,{gl2:f,bpp:16}),Object(h.a)(r,35898,{gl2:f,bpp:4}),r),v=n(5),p=n(21);function g(t,e,n){var r=n[e];if(!r)return!1;var i=Object(v.g)(t)&&r.gl2||r.gl1;return"string"==typeof i?t.getExtension(i):i}n.d(e,"a",(function(){return b}));var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(this,e),(n=Object(a.a)(this,Object(o.a)(e).call(this,t,r))).initialize(r),Object.seal(Object(s.a)(n)),n}return Object(c.a)(e,t),Object(u.a)(e,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.format;return!n||g(t,n,d)}},{key:"getSamplesForFormat",value:function(t,e){var n=e.format;return t.getInternalformatParameter(36161,n,32937)}}]),Object(u.a)(e,[{key:"initialize",value:function(t){var e=t.format,n=t.width,r=void 0===n?1:n,i=t.height,a=void 0===i?1:i,o=t.samples,s=void 0===o?0:o;return Object(p.a)(e,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==s&&Object(v.g)(this.gl)?this.gl.renderbufferStorageMultisample(36161,s,e,r,a):this.gl.renderbufferStorage(36161,e,r,a),this.format=e,this.width=r,this.height=a,this.samples=s,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*d[this.format].bpp),this}},{key:"resize",value:function(t){var e=t.width,n=t.height;return e!==this.width||n!==this.height?this.initialize({width:e,height:n,format:this.format,samples:this.samples}):this}},{key:"_createHandle",value:function(){return this.gl.createRenderbuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}},{key:"_bindHandle",value:function(t){this.gl.bindRenderbuffer(36161,t)}},{key:"_syncHandle",value:function(t){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}},{key:"_getParameter",value:function(t){return this.gl.bindRenderbuffer(36161,this.handle),this.gl.getRenderbufferParameter(36161,t)}}]),e}(l.a)},function(t,e,n){var r=n(174),i=n(175),a=n(176);t.exports=function(t){return r(t)||i(t)||a()}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var r=n(46),i=[];function a(t){t=Array.isArray(t)?t:[t];var e=!0,n=!1,a=void 0;try{for(var o,s=function(){var t=o.value,e=Object(r.b)(t);i.find((function(t){return e===t}))||i.unshift(e)},u=t[Symbol.iterator]();!(e=(o=u.next()).done);e=!0)s()}catch(t){n=!0,a=t}finally{try{e||null==u.return||u.return()}finally{if(n)throw a}}}function o(){return i}function s(){i=[]}},function(t,e,n){"use strict";var r=n(26),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(10),l=n.n(c),h=n(7),f=n.n(h),d=n(11),v=n.n(d),p=n(17),g=n(115),b=n(22),y=n.n(b),m=n(45),_=n(8),O=n(63),w=function(t){function e(){return o()(this,e),l()(this,f()(e).apply(this,arguments))}return v()(e,t),u()(e,[{key:"_onUpdate",value:function(){var t=this.time,e=this.settings,n=e.fromValue,r=e.toValue,i=e.duration,a=(0,e.easing)(t/i);this._value=Object(_.h)(n,r,a)}},{key:"value",get:function(){return this._value}}]),e}(O.a);function j(t,e,n,r,i){var a=e-t;return(n-e)*i+-a*r+a+e}function k(t,e){if(Array.isArray(t)){for(var n=0,r=0;r<t.length;r++){var i=t[r]-e[r];n+=i*i}return Math.sqrt(n)}return Math.abs(t-e)}var x=function(t){function e(){return o()(this,e),l()(this,f()(e).apply(this,arguments))}return v()(e,t),u()(e,[{key:"_onUpdate",value:function(){var t=this.settings,e=t.fromValue,n=t.toValue,r=t.damping,i=t.stiffness,a=this._prevValue,o=void 0===a?e:a,s=this._currValue,u=void 0===s?e:s,c=function(t,e,n,r,i){if(Array.isArray(n)){for(var a=[],o=0;o<n.length;o++)a[o]=j(t[o],e[o],n[o],r,i);return a}return j(t,e,n,r,i)}(o,u,n,r,i),l=k(c,n),h=k(c,u);l<1e-5&&h<1e-5&&(c=n,this.end()),this._prevValue=u,this._currValue=c}},{key:"value",get:function(){return this._currValue}}]),e}(O.a),E=n(16);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var T={interpolation:w,spring:x},S=function(){function t(e){o()(this,t),this.transitions=new Map,this.timeline=e}return u()(t,[{key:"add",value:function(t,e,n,r){var i=this.transitions;i.has(t)&&(e=i.get(t).value,this.remove(t));if(r=Object(m.e)(r)){var a=T[r.type];if(a){var o=new a(this.timeline);o.start(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(n,!0).forEach((function(e){y()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},r,{fromValue:e,toValue:n})),i.set(t,o)}else E.a.error("unsupported transition type '".concat(r.type,"'"))()}}},{key:"remove",value:function(t){var e=this.transitions;e.has(t)&&(e.get(t).cancel(),e.delete(t))}},{key:"update",value:function(){var t={},e=!0,n=!1,r=void 0;try{for(var a,o=this.transitions[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var s=i()(a.value,2),u=s[0],c=s[1];c.update(),t[u]=c.value,c.inProgress||this.remove(u)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}},{key:"clear",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.transitions.keys()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;this.remove(a)}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"active",get:function(){return this.transitions.size>0}}]),t}(),A=n(99),M=n(114),L=n(33),C=n(5),I=n(20),R=n(113),F=n(101),D=n(71),N=n(34),B=n(53),z=n(41),U=n.n(z),V={boolean:{validate:function(t,e){return!0},equal:function(t,e,n){return Boolean(t)===Boolean(e)}},number:{validate:function(t,e){return Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)}},color:{validate:function(t,e){return e.optional&&!t||X(t)&&(3===t.length||4===t.length)},equal:function(t,e,n){return G(t,e)}},accessor:{validate:function(t,e){var n=Z(t);return"function"===n||n===Z(e.value)},equal:function(t,e,n){return"function"==typeof e||G(t,e)}},array:{validate:function(t,e){return e.optional&&!t||X(t)},equal:function(t,e,n){return n.compare?G(t,e):t===e}},function:{validate:function(t,e){return e.optional&&!t||"function"==typeof t},equal:function(t,e,n){return!n.compare||t===e}}};function G(t,e){if(t===e)return!0;if(!X(t)||!X(e))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function H(t,e){switch(Z(e)){case"object":return W(t,e);case"array":return W(t,{type:"array",value:e,compare:!1});case"boolean":return W(t,{type:"boolean",value:e});case"number":return W(t,{type:"number",value:e});case"function":return W(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function W(t,e){return"type"in e?Object.assign({name:t},V[e.type],e):"value"in e?Object.assign({name:t,type:Z(e.value)},e):{name:t,type:"object",value:e}}function X(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function Z(t){return X(t)?"array":null===t?"null":U()(t)}var Y=N.b.COMPONENT,q=N.b.ASYNC_ORIGINAL,K=N.b.ASYNC_RESOLVED,Q=N.b.ASYNC_DEFAULTS;function J(){var t=$(this.constructor),e=Object.create(t);e[Y]=this,e[q]={},e[K]={};for(var n=0;n<arguments.length;++n){var r=arguments[n];for(var i in r)e[i]=r[i]}return Object.freeze(e),e}function $(t){var e=nt(t,"_mergedDefaultProps");return e||(function(t){if(!t.prototype)return;var e=Object.getPrototypeOf(t),n=$(e),r=function(t){for(var e={},n={},r={},a=0,o=Object.entries(t);a<o.length;a++){var s=i()(o[a],2),u=s[0],c=s[1];if(c&&c.deprecatedFor)r[u]=Array.isArray(c.deprecatedFor)?c.deprecatedFor:[c.deprecatedFor];else{var l=H(u,c);e[u]=l,n[u]=l.value}}return{propTypes:e,defaultProps:n,deprecatedProps:r}}(nt(t,"defaultProps")||{}),a=function(t,e,n){var r=Object.create(null);Object.assign(r,e,t);var i=function(t){var e=nt(t,"layerName")||nt(t,"componentName");e||E.a.once(0,"".concat(t.name,".componentName not specified"))();return e||t.name}(n);return delete t.id,Object.defineProperties(r,{id:{writable:!0,value:i}}),r}(r.defaultProps,n,t),o=Object.assign({},e._propTypes,r.propTypes);!function(t,e){var n={},r={};for(var i in e){var a=e[i],o=a.name,s=a.value;a.async&&(n[o]=s,r[o]=tt(o))}t[Q]=n,t[q]={},Object.defineProperties(t,r)}(a,o);var s=Object.assign({},e._deprecatedProps,r.deprecatedProps);(function(t,e){var n=function(n){Object.defineProperty(t,n,{enumerable:!1,set:function(t){var r="".concat(this.id,": ").concat(n),i=!0,a=!1,o=void 0;try{for(var s,u=e[n][Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;et(this,c)||(this[c]=t)}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}E.a.deprecated(r,e[n].join("/"))()}})};for(var r in e)n(r)})(a,s),t._mergedDefaultProps=a,t._propTypes=o,t._deprecatedProps=s}(t),t._mergedDefaultProps)}function tt(t){return{enumerable:!0,set:function(e){"string"==typeof e||e instanceof Promise||Object(B.c)(e)?this[q][t]=e:this[K][t]=e},get:function(){if(this[K]){if(t in this[K]){var e=this[K][t];return"data"===t?e||this[Q][t]:e}if(t in this[q]){var n=this[Y]&&this[Y].internalState;if(n&&n.hasAsyncProp(t))return n.getAsyncProp(t)}}return this[Q][t]}}}function et(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function nt(t,e){return et(t,e)&&t[e]}var rt=n(6),it=n.n(rt),at=n(155),ot=n.n(at),st=n(156),ut=n.n(st),ct=N.b.ASYNC_ORIGINAL,lt=N.b.ASYNC_RESOLVED,ht=N.b.ASYNC_DEFAULTS,ft=Object.freeze({}),dt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o()(this,t),this.component=e,this.asyncProps={},this.onAsyncPropUpdated=function(){},this.oldProps=ft,this.oldAsyncProps=null}var e;return u()(t,[{key:"getOldProps",value:function(){return this.oldAsyncProps||this.oldProps}},{key:"resetOldProps",value:function(){this.oldAsyncProps=null,this.oldProps=this.component.props}},{key:"freezeAsyncOldProps",value:function(){if(!this.oldAsyncProps)for(var t in this.oldProps=this.oldProps||this.component.props,this.oldAsyncProps=Object.create(this.oldProps),this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}},{key:"hasAsyncProp",value:function(t){return t in this.asyncProps}},{key:"getAsyncProp",value:function(t){var e=this.asyncProps[t];return e&&e.resolvedValue}},{key:"isAsyncPropLoading",value:function(t){var e=this.asyncProps[t];return Boolean(e&&e.pendingLoadCount>0&&e.pendingLoadCount!==e.resolvedLoadCount)}},{key:"setAsyncProps",value:function(t){var e=t[lt]||{},n=t[ct]||t,r=t[ht]||{};for(var i in e){var a=e[i];this._createAsyncPropData(i,a,r[i]),this._updateAsyncProp(i,a)}for(var o in n){var s=n[o];this._createAsyncPropData(o,s,r[o]),this._updateAsyncProp(o,s)}}},{key:"_updateAsyncProp",value:function(t,e){if(this._didAsyncInputValueChange(t,e)){if("string"==typeof e){var n=this.layer&&this.layer.props.fetch;n&&(e=n(e,{propName:t,layer:this.layer}))}e instanceof Promise?this._watchPromise(t,e):Object(B.c)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e)}}},{key:"_didAsyncInputValueChange",value:function(t,e){var n=this.asyncProps[t];return e!==n.lastValue&&(n.lastValue=e,!0)}},{key:"_setPropValue",value:function(t,e){var n=this.asyncProps[t];n.value=e,n.resolvedValue=e,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount}},{key:"_setAsyncPropValue",value:function(t,e,n){var r=this.asyncProps[t];r&&n>=r.resolvedLoadCount&&(Object(I.a)(void 0!==e),this.freezeAsyncOldProps(),r.resolvedValue=e,r.resolvedLoadCount=n,this.onAsyncPropUpdated(t,e))}},{key:"_watchPromise",value:function(t,e){var n=this,r=this.asyncProps[t];r.pendingLoadCount++;var i=r.pendingLoadCount;e.then((function(e){e=n._postProcessValue(t,e),n._setAsyncPropValue(t,e,i);var r=n.layer&&n.layer.props.onDataLoad;"data"===t&&r&&r(e,{propName:t,layer:n.layer})})).catch((function(t){return E.a.error(t)()}))}},{key:"_resolveAsyncIterable",value:(e=ot()(it.a.mark((function t(e,n){var r,i,a,o,s,u,c,l,h,f,d,v;return it.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"data"!==e&&this._setPropValue(e,n),(r=this.asyncProps[e]).pendingLoadCount++,i=r.pendingLoadCount,a=[],o=0,s=!0,u=!1,t.prev=8,l=ut()(n);case 10:return t.next=12,l.next();case 12:return h=t.sent,s=h.done,t.next=16,h.value;case 16:if(f=t.sent,s){t.next=26;break}d=f,a=this._postProcessValue(e,d,a),Object.defineProperty(a,"__diff",{enumerable:!1,value:[{startRow:o,endRow:a.length}]}),o=a.length,this._setAsyncPropValue(e,a,i);case 23:s=!0,t.next=10;break;case 26:t.next=32;break;case 28:t.prev=28,t.t0=t.catch(8),u=!0,c=t.t0;case 32:if(t.prev=32,t.prev=33,s||null==l.return){t.next=37;break}return t.next=37,l.return();case 37:if(t.prev=37,!u){t.next=40;break}throw c;case 40:return t.finish(37);case 41:return t.finish(32);case 42:(v=this.layer&&this.layer.props.onDataLoad)&&v(a,{propName:e,layer:this.layer});case 44:case"end":return t.stop()}}),t,this,[[8,28,32,42],[33,,37,41]])}))),function(t,n){return e.apply(this,arguments)})},{key:"_postProcessValue",value:function(t,e,n){var r=(this.component?this.component.props:{}).dataTransform;return"data"!==t?e:r?r(e,n):n?n.concat(e):e}},{key:"_createAsyncPropData",value:function(t,e,n){this.asyncProps[t]||(this.asyncProps[t]={lastValue:null,resolvedValue:n,pendingLoadCount:0,resolvedLoadCount:0})}}]),t}(),vt=N.b.ASYNC_ORIGINAL,pt=N.b.ASYNC_RESOLVED,gt=N.b.ASYNC_DEFAULTS,bt=0,yt=function(){function t(){o()(this,t),this.props=J.apply(this,arguments),this.id=this.props.id,this.count=bt++,this.lifecycle=N.a.NO_STATE,this.parent=null,this.context=null,this.state=null,this.internalState=null,Object.seal(this)}return u()(t,[{key:"clone",value:function(t){var e=this.props,n={};for(var r in e[gt])r in e[pt]?n[r]=e[pt][r]:r in e[vt]&&(n[r]=e[vt][r]);return new this.constructor(Object.assign({},e,n,t))}},{key:"_initState",value:function(){this.internalState=new dt({})}},{key:"stats",get:function(){return this.internalState.stats}}]),t}();yt.componentName="Component",yt.defaultProps={};var mt=function(t){function e(t){var n,r=t.attributeManager,i=t.layer;return o()(this,e),(n=l()(this,f()(e).call(this,i))).attributeManager=r,n.model=null,n.needsRedraw=!0,n.subLayers=null,n}return v()(e,t),u()(e,[{key:"layer",get:function(){return this.component},set:function(t){this.component=t}}]),e}(dt),_t=n(25),Ot=n(146);n.d(e,"a",(function(){return xt}));var wt=Object.freeze([]),jt=new Uint8ClampedArray(0),kt={data:{type:"data",value:wt,async:!0},dataComparator:null,_dataDiff:{type:"function",value:function(t){return t&&t.__diff},compare:!1,optional:!0},dataTransform:{type:"function",value:null,compare:!1,optional:!0},onDataLoad:{type:"function",value:null,compare:!1,optional:!0},fetch:{type:"function",value:function(t,e){var n=e.layer;return Object(Ot.a)(t,n.getLoadOptions())},compare:!1},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},onHover:{type:"function",value:null,compare:!1,optional:!0},onClick:{type:"function",value:null,compare:!1,optional:!0},onDragStart:{type:"function",value:null,compare:!1,optional:!0},onDrag:{type:"function",value:null,compare:!1,optional:!0},onDragEnd:{type:"function",value:null,compare:!1,optional:!0},coordinateSystem:p.a.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{},uniforms:{},extensions:[],getPolygonOffset:{type:"function",value:function(t){return[0,100*-t.layerIndex]},compare:!1},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"color",value:[0,0,128,128]}},xt=function(t){function e(){return o()(this,e),l()(this,f()(e).apply(this,arguments))}return v()(e,t),u()(e,[{key:"toString",value:function(){var t=this.constructor.layerName||this.constructor.name;return"".concat(t,"({id: '").concat(this.props.id,"'})")}},{key:"setState",value:function(t){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,t),this.setNeedsRedraw()}},{key:"setNeedsRedraw",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.internalState&&(this.internalState.needsRedraw=t)}},{key:"setNeedsUpdate",value:function(){this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};return this._getNeedsRedraw(t)}},{key:"needsUpdate",value:function(){return this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams())}},{key:"hasUniformTransition",value:function(){return this.internalState.uniformTransitions.active}},{key:"isPickable",value:function(){return this.props.pickable&&this.props.visible}},{key:"getModels",value:function(){return this.state&&(this.state.models||(this.state.model?[this.state.model]:[]))}},{key:"getAttributeManager",value:function(){return this.internalState&&this.internalState.attributeManager}},{key:"getCurrentLayer",value:function(){return this.internalState&&this.internalState.layer}},{key:"getLoadOptions",value:function(){return this.props.loadOptions}},{key:"project",value:function(t){var e=this.context.viewport,n=Object(F.a)(t,{viewport:e,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),r=Object(_t.n)(n,e.pixelProjectionMatrix),a=i()(r,3),o=a[0],s=a[1],u=a[2];return 2===t.length?[o,s]:[o,s,u]}},{key:"unproject",value:function(t){return this.context.viewport.unproject(t)}},{key:"projectPosition",value:function(t){return Object(F.b)(t,{viewport:this.context.viewport,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem})}},{key:"use64bitPositions",value:function(){var t=this.props.coordinateSystem;return t===p.a.DEFAULT||t===p.a.LNGLAT||t===p.a.CARTESIAN}},{key:"onHover",value:function(t,e){return!!this.props.onHover&&this.props.onHover(t,e)}},{key:"onClick",value:function(t,e){return!!this.props.onClick&&this.props.onClick(t,e)}},{key:"nullPickingColor",value:function(){return[0,0,0]}},{key:"encodePickingColor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[0]=t+1&255,e[1]=t+1>>8&255,e[2]=t+1>>8>>8&255,e}},{key:"decodePickingColor",value:function(t){Object(I.a)(t instanceof Uint8Array);var e=i()(t,3);return e[0]+256*e[1]+65536*e[2]-1}},{key:"initializeState",value:function(){throw new Error("Layer ".concat(this," has not defined initializeState"))}},{key:"getShaders",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=this.props.extensions[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;t=Object(R.a)(t,o.getShaders.call(this,o))}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return t}},{key:"shouldUpdateState",value:function(t){t.oldProps,t.props,t.context;return t.changeFlags.propsOrDataChanged}},{key:"updateState",value:function(t){t.oldProps,t.props,t.context;var e=t.changeFlags,n=this.getAttributeManager();if(e.dataChanged&&n){var r=e.dataChanged;if(Array.isArray(r)){var i=!0,a=!1,o=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.invalidateAll(c)}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}else n.invalidateAll()}}},{key:"finalizeState",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.getModels()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){r.value.delete()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}var a=this.getAttributeManager();a&&a.finalize(),this.internalState.uniformTransitions.clear()}},{key:"draw",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=this.getModels()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.draw(t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"getPickingInfo",value:function(t){var e=t.info,n=(t.mode,e.index);return n>=0&&Array.isArray(this.props.data)&&(e.object=this.props.data[n]),e}},{key:"invalidateAttribute",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.getAttributeManager());e&&("all"===t?e.invalidateAll():e.invalidate(t))}},{key:"updateAttributes",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=this.getModels()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;this._setModelAttributes(o,t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"_updateAttributes",value:function(t){var e=this.getAttributeManager();if(e){var n=this.getNumInstances(t),r=this.getStartIndices(t);e.update({data:t.data,numInstances:n,startIndices:r,props:t,transitions:t.transitions,buffers:t.data.attributes,context:this,ignoreUnknownAttributes:!0});var i=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}}},{key:"_updateAttributeTransition",value:function(){var t=this.getAttributeManager();t&&t.updateTransition()}},{key:"_updateUniformTransition",value:function(){var t=this.internalState.uniformTransitions;if(t.active){var e=t.update(),n=Object.create(this.props);for(var r in e)Object.defineProperty(n,r,{value:e[r]});return n}return this.props}},{key:"calculateInstancePickingColors",value:function(t,e){var n=e.numInstances,r=jt.length/3;if(r<n){var i=(jt=D.a.allocate(jt,n,{size:3,copy:!0})).length/3,a=[];Object(I.a)(i<16777215,"index out of picking color range");for(var o=r;o<i;o++)this.encodePickingColor(o,a),jt[3*o+0]=a[0],jt[3*o+1]=a[1],jt[3*o+2]=a[2]}t.value=jt.subarray(0,3*n)}},{key:"_setModelAttributes",value:function(t,e){var n=this.getAttributeManager(),r=t.userData.excludeAttributes||{},i=n.getShaderAttributes(e,r);t.setAttributes(i)}},{key:"clearPickingColor",value:function(t){var e=this.getAttributeManager().attributes,n=e.pickingColors,r=e.instancePickingColors,i=n||r,a=this.decodePickingColor(t),o=i.getVertexOffset(a),s=i.getVertexOffset(a+1);i.buffer.subData({data:new Uint8Array(s-o),offset:o})}},{key:"restorePickingColors",value:function(){var t=this.getAttributeManager().attributes,e=t.pickingColors,n=t.instancePickingColors;(e||n).updateSubBuffer({startOffset:0})}},{key:"getNumInstances",value:function(t){return void 0!==(t=t||this.props).numInstances?t.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(M.a)(t.data)}},{key:"getStartIndices",value:function(t){return void 0!==(t=t||this.props).startIndices?t.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}},{key:"_initialize",value:function(){Object(L.a)("layer.initialize",this),this._initState(),this.initializeState(this.context);var t=!0,e=!1,n=void 0;try{for(var r,i=this.props.extensions[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;a.initializeState.call(this,this.context,a)}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}this.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,extensionsChanged:!0}),this._updateState()}},{key:"_update",value:function(){var t=this.needsUpdate();Object(L.a)("layer.update",this,t),t&&this._updateState()}},{key:"_updateState",value:function(){var t=this.props,e=this._updateUniformTransition();this.internalState.propsInTransition=e,this.props=e;var n=this._getUpdateParams();if(this.context.gl)this.updateState(n);else try{this.updateState(n)}catch(t){}var r=!0,i=!1,a=void 0;try{for(var o,s=this.props.extensions[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;u.updateState.call(this,n,u)}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}this._updateModules(n),this.isComposite?this._renderLayers(n):(this.setNeedsRedraw(),this._updateAttributes(this.props),this.state.model&&this.state.model.setInstanceCount(this.getNumInstances())),this.props=t,this.clearChangeFlags(),this.internalState.needsUpdate=!1,this.internalState.resetOldProps()}},{key:"_finalize",value:function(){Object(L.a)("layer.finalize",this),Object(I.a)(this.internalState&&this.state),this.finalizeState(this.context);var t=!0,e=!1,n=void 0;try{for(var r,i=this.props.extensions[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;a.finalizeState.call(this,a)}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"drawLayer",value:function(t){var e=this,n=t.moduleParameters,r=void 0===n?null:n,i=t.uniforms,a=void 0===i?{}:i,o=t.parameters,s=void 0===o?{}:o;this._updateAttributeTransition();var u=this.props;this.props=this.internalState.propsInTransition;var c=this.props.opacity;a.opacity=Math.pow(c,1/2.2),r&&this.setModuleParameters(r);var l=this.props.getPolygonOffset,h=l&&l(a)||[0,0];Object(C.k)(this.context.gl,{polygonOffset:h}),Object(C.l)(this.context.gl,s,(function(){e.draw({moduleParameters:r,uniforms:a,parameters:s,context:e.context})})),this.props=u}},{key:"getChangeFlags",value:function(){return this.internalState.changeFlags}},{key:"setChangeFlags",value:function(t){var e=this.internalState.changeFlags;for(var n in e)t[n]&&!e[n]&&(e[n]=t[n],Object(L.a)("layer.changeFlag",this,n,t));var r=e.dataChanged||e.updateTriggersChanged||e.propsChanged||e.extensionsChanged;e.propsOrDataChanged=r,e.somethingChanged=r||t.viewportChanged||t.stateChanged}},{key:"clearChangeFlags",value:function(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}},{key:"diffProps",value:function(t,e){var n=Object(A.b)(t,e);if(n.updateTriggersChanged)for(var r in n.updateTriggersChanged)n.updateTriggersChanged[r]&&this.invalidateAttribute(r);if(n.transitionsChanged)for(var i in n.transitionsChanged)this.internalState.uniformTransitions.add(i,e[i],t[i],t.transitions[i]);return this.setChangeFlags(n)}},{key:"validateProps",value:function(){Object(A.c)(this.props)}},{key:"setModuleParameters",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=this.getModels()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.updateModuleSettings(t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"_updateModules",value:function(t){var e=t.props,n=t.oldProps,r=e.autoHighlight,i=e.highlightedObjectIndex,a=e.highlightColor;if(n.autoHighlight!==r||n.highlightedObjectIndex!==i||n.highlightColor!==a){var o={};r||(o.pickingSelectedColor=null),a[3]=a[3]||255,o.pickingHighlightColor=a,Number.isInteger(i)&&(o.pickingSelectedColor=i>=0?this.encodePickingColor(i):null),this.setModuleParameters(o)}}},{key:"_getUpdateParams",value:function(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}},{key:"_getNeedsRedraw",value:function(t){if(!this.internalState)return!1;var e=!1;e=e||this.internalState.needsRedraw&&this.id,this.internalState.needsRedraw=this.internalState.needsRedraw&&!t.clearRedrawFlags;var n=this.getAttributeManager(),r=n&&n.getNeedsRedraw(t);return e=e||r}},{key:"_getAttributeManager",value:function(){return new g.a(this.context.gl,{id:this.props.id,stats:this.context.stats,timeline:this.context.timeline})}},{key:"_initState",value:function(){Object(I.a)(!this.internalState&&!this.state),Object(I.a)(isFinite(this.props.coordinateSystem),"".concat(this.id,": invalid coordinateSystem"));var t=this._getAttributeManager();t&&t.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new mt({attributeManager:t,layer:this}),this.clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:function(){return E.a.deprecated("layer.state.attributeManager","layer.getAttributeManager()"),t}}),this.internalState.layer=this,this.internalState.uniformTransitions=new S(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props)}},{key:"_transferState",value:function(t){Object(L.a)("layer.matched",this,this===t);var e=t.state,n=t.internalState;Object(I.a)(e&&n),this!==t&&(this.internalState=n,this.internalState.layer=this,this.state=e,this.internalState.setAsyncProps(this.props),this.diffProps(this.props,this.internalState.getOldProps()))}},{key:"_onAsyncPropUpdated",value:function(){this.diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}]),e}(yt);xt.layerName="Layer",xt.defaultProps=kt},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(87);function i(t,e,n){return(i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return n&&Object(r.a)(a,n.prototype),a}).apply(null,arguments)}},function(t,e,n){"use strict";var r=n(83),i=n.n(r),a=n(26),o=n.n(a),s=n(17),u=n(81),c=n(8),l=n(79),h=n(25),f=Object(l.a)((function(t){var e=t.viewport,n=t.center;return new c.a(e.viewProjectionMatrix).invert().transform(n)})),d=Object(l.a)((function(t){var e=t.viewport,n=t.shadowMatrices,r=[],a=e.pixelUnprojectionMatrix,s=e.isGeospatial?void 0:1,u=[[0,0,s],[e.width,0,s],[0,e.height,s],[e.width,e.height,s],[0,0,-1],[e.width,0,-1],[0,e.height,-1],[e.width,e.height,-1]].map((function(t){return function(t,e){var n=o()(t,3),r=n[0],i=n[1],a=n[2],s=Object(h.l)([r,i,a],e);if(Number.isFinite(a))return s;return[s[0],s[1],0]}(t,a)})),l=!0,f=!1,d=void 0;try{for(var v,p=function(){var t=v.value,n=t.clone().translate(new c.c(e.center).negate()),a=u.map((function(t){return n.transform(t)})),o=(new c.a).ortho({left:Math.min.apply(Math,i()(a.map((function(t){return t[0]})))),right:Math.max.apply(Math,i()(a.map((function(t){return t[0]})))),bottom:Math.min.apply(Math,i()(a.map((function(t){return t[1]})))),top:Math.max.apply(Math,i()(a.map((function(t){return t[1]})))),near:Math.min.apply(Math,i()(a.map((function(t){return-t[2]})))),far:Math.max.apply(Math,i()(a.map((function(t){return-t[2]}))))});r.push(o.multiplyRight(t))},g=n[Symbol.iterator]();!(l=(v=g.next()).done);l=!0)p()}catch(t){f=!0,d=t}finally{try{l||null==g.return||g.return()}finally{if(f)throw d}}return r})),v=[0,0,0,1],p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];function g(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={shadow_uDrawShadowMap:Boolean(t.drawToShadowMap),shadow_uUseShadowMap:!!t.shadowMaps&&t.shadowMaps.length>0,shadow_uColor:t.shadowColor||v,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},r=f({viewport:t.viewport,center:e.project_uCenter}),i=[],a=d({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice(),o=0;o<t.shadowMatrices.length;o++){var u=a[o],l=u.clone().translate(new c.c(t.viewport.center).negate());e.project_uCoordinateSystem===s.a.LNGLAT&&e.project_uProjectionMode===s.c.WEB_MERCATOR?(a[o]=l,i[o]=r):(a[o]=u.clone().multiplyRight(p),i[o]=l.transform(r))}for(var h=0;h<a.length;h++)n["shadow_uViewProjectionMatrices[".concat(h,"]")]=a[h],n["shadow_uProjectCenters[".concat(h,"]")]=i[h],t.shadowMaps&&t.shadowMaps.length>0?n["shadow_uShadowMap".concat(h)]=t.shadowMaps[h]:n["shadow_uShadowMap".concat(h)]=t.dummyShadowMap;return n}e.a={name:"shadow",dependencies:[u.a],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n  if (shadow_uDrawShadowMap) {\n    return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n  }\n  if (shadow_uUseShadowMap) {\n    for (int i = 0; i < max_lights; i++) {\n      if(i < int(shadow_uLightCount)) {\n        vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n        shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n      }\n    }\n  }\n  return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0,  0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n  vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n  float z = dot(rgbaDepth, bitUnpackShift);\n  return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n  if (shadow_uDrawShadowMap) {\n    vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n    rgbaDepth -= rgbaDepth.gbaa * bitMask;\n    return rgbaDepth;\n  }\n  if (shadow_uUseShadowMap) {\n    float shadowAlpha = 0.0;\n    shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n    if(shadow_uLightCount > 1.0) {\n      shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n    }\n    shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n    float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n    return vec4(\n      mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n      blendedAlpha\n    );\n  }\n  return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n    position = shadow_setVertexPosition(geometry.position);\n    ","fs:DECKGL_FILTER_COLOR":"\n    color = shadow_filterShadowColor(color);\n    "},getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0){var n={},r=t.shadowEnabled,i=void 0===r||r;return i&&t.shadowMatrices&&t.shadowMatrices.length>0?Object.assign(n,g(t,e)):Object.assign(n,{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1}),n}return{}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));var r=n(18),i=n(70),a=n(17),o=n(79),s=n(20),u=[0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],h=[0,0,0],f=[0,0,0],d=12,v=Object(o.a)((function(t){var e=t.viewport,n=t.devicePixelRatio,o=t.coordinateSystem,s=t.coordinateOrigin,l=function(t){var e=t.viewport,n=t.coordinateSystem,o=t.coordinateOrigin,s=e.viewMatrixUncentered,l=e.projectionMatrix,h=e.projectionMode,f=e.viewMatrix,d=e.viewProjectionMatrix,v=u,p=e.cameraPosition,g=o,b=!0;n===a.a.LNGLAT?h===a.c.WEB_MERCATOR?b=!1:g=[Math.fround(e.longitude),Math.fround(e.latitude),0]:h===a.c.IDENTITY&&(g=e.position.map(Math.fround));if(g[2]=g[2]||0,b){var y=e.projectPosition(g);p=[p[0]-y[0],p[1]-y[1],p[2]-y[2]],y[3]=1,v=i.b([],y,d),f=s||f,d=r.g([],l,f),d=r.g([],d,c)}return{viewMatrix:f,viewProjectionMatrix:d,projectionCenter:v,cameraPosCommon:p,shaderCoordinateOrigin:g}}({coordinateSystem:o,coordinateOrigin:s,viewport:e}),f=l.projectionCenter,d=l.viewProjectionMatrix,v=l.cameraPosCommon,p=l.shaderCoordinateOrigin,g=e.getDistanceScales(),b=[e.width*n,e.height*n],y={project_uCoordinateSystem:o,project_uProjectionMode:e.projectionMode,project_uCoordinateOrigin:p,project_uCenter:f,project_uAntimeridian:(e.longitude||0)-180,project_uViewportSize:b,project_uDevicePixelRatio:n,project_uFocalDistance:e.focalDistance||1,project_uCommonUnitsPerMeter:g.unitsPerMeter,project_uCommonUnitsPerWorldUnit:g.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:h,project_uScale:e.scale,project_uViewProjectionMatrix:d,project_uCameraPosition:v},m=e.getDistanceScales(p);switch(o){case a.a.METER_OFFSETS:y.project_uCommonUnitsPerWorldUnit=m.unitsPerMeter,y.project_uCommonUnitsPerWorldUnit2=m.unitsPerMeter2;break;case a.a.LNGLAT:case a.a.LNGLAT_OFFSETS:y.project_uCommonUnitsPerWorldUnit=m.unitsPerDegree,y.project_uCommonUnitsPerWorldUnit2=m.unitsPerDegree2}return y}));function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.viewport,n=t.devicePixelRatio,r=void 0===n?1:n,i=t.modelMatrix,o=void 0===i?null:i,u=t.coordinateSystem,c=void 0===u?a.a.DEFAULT:u,h=t.coordinateOrigin,d=void 0===h?f:h,p=t.wrapLongitude,g=void 0!==p&&p;t.projectionMode,t.positionOrigin;Object(s.a)(e),c===a.a.DEFAULT&&(c=e.isGeospatial?a.a.LNGLAT:a.a.CARTESIAN);var b=v({viewport:e,devicePixelRatio:r,coordinateSystem:c,coordinateOrigin:d});return b.project_uWrapLongitude=g,b.project_uModelMatrix=o||l,b}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(20),u=function(){function t(e){i()(this,t),Object(s.a)(Number.isFinite(e.width),"`width` must be supplied"),Object(s.a)(Number.isFinite(e.height),"`height` must be supplied"),this._viewportProps=this._applyConstraints(e)}return o()(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"shortestPathFrom",value:function(t){return this._viewportProps}},{key:"_applyConstraints",value:function(t){return t}}]),t}()},function(t,e,n){"use strict";var r=n(1),i=n(13),a=n(9),o=n(28),s=n(3),u=n(14),c=n(49),l=n(55),h=n(21),f="";n.d(e,"a",(function(){return d}));var d=function(t){function e(t){var n,s,u,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,e),Object(l.b)(t),(c instanceof Promise||"string"==typeof c)&&(c={data:c}),"string"==typeof c.data&&(c=Object.assign({},c,{data:(s=c.data,Object(h.a)("string"==typeof s),s=f+s,new Promise((function(t,e){try{var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return e(new Error("Could not load image ".concat(s,".")))},n.crossOrigin=u&&u.crossOrigin||"anonymous",n.src=s}catch(t){e(t)}})))})),(n=Object(i.a)(this,Object(a.a)(e).call(this,t,Object.assign({},c,{target:3553})))).initialize(c),Object.seal(Object(o.a)(n)),n}return Object(u.a)(e,t),Object(s.a)(e,null,[{key:"isSupported",value:function(t,e){return c.a.isSupported(t,e)}}]),e}(c.a)},function(t,e,n){"use strict";var r=n(9);function i(t,e,n){return(i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(n):a.value}})(t,e,n||t)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var r=n(21),i={};function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[t]=i[t]||1;var e=i[t]++;return"".concat(t,"-").concat(e)}function o(t){return Object(r.a)("number"==typeof t,"Input must be a number"),t&&0==(t&t-1)}function s(t){var e=!0;for(var n in t){e=!1;break}return e}},,function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(15),i=n(6),a=n.n(i),o=n(43),s=n(77),u=n(143);function c(t){if(u.c||u.e>=10){if("function"==typeof t[Symbol.asyncIterator])return t;if("function"==typeof t.getIterator)return t.getIterator()}return u.c?function(t){return l.apply(this,arguments)}(t):function(t){return h.apply(this,arguments)}(t)}function l(){return(l=Object(s.a)(a.a.mark((function t(e){var n,r,i,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.getReader(),t.prev=1;case 2:return t.next=5,Object(o.a)(n.read());case 5:if(r=t.sent,i=r.done,s=r.value,!i){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,s;case 12:t.next=2;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),n.releaseLock();case 19:case"end":return t.stop()}}),t,null,[[1,16]])})))).apply(this,arguments)}function h(){return(h=Object(s.a)(a.a.mark((function t(e){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.a)(e);case 2:e=t.sent;case 3:if(null===(n=e.read())){t.next=9;break}return t.next=8,n;case 8:return t.abrupt("continue",3);case 9:if(!e._readableState.ended){t.next=11;break}return t.abrupt("return");case 11:return t.next=13,Object(o.a)(f(e));case 13:t.next=3;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(t){return d.apply(this,arguments)}function d(){return(d=Object(r.a)(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.once("readable",t)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(6),i=n.n(r),a=n(15),o=n(1),s=n(3),u=n(111),c=5,l=function(){function t(e){var n=e.maxConcurrency,r=void 0===n?c:n,i=e.onMessage,a=e.onDebug,s=void 0===a?function(){}:a;Object(o.a)(this,t),this.maxConcurrency=r,this.onMessage=i,this.onDebug=s,this.workerPools=new Map}var e;return Object(s.a)(t,null,[{key:"isSupported",value:function(){return"undefined"!=typeof Worker}}]),Object(s.a)(t,[{key:"setProps",value:function(t){"maxConcurrency"in t&&(this.maxConcurrency=t.maxConcurrency),"onDebug"in t&&(this.onDebug=t.onDebug)}},{key:"destroy",value:function(){this.workerPools.forEach((function(t){return t.destroy()}))}},{key:"process",value:(e=Object(a.a)(i.a.mark((function t(e,n,r){var a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this._getWorkerPool(e,n),t.abrupt("return",a.process(r));case 2:case"end":return t.stop()}}),t,this)}))),function(t,n,r){return e.apply(this,arguments)})},{key:"_getWorkerPool",value:function(t,e){var n=this.workerPools.get(e);return n||(n=new u.a({source:t,name:e,onMessage:this.onMessage,maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(e,n)),n}}]),t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return c}));var r=n(41),i=n.n(r),a=n(34).b.COMPONENT;function o(t){var e=d(t);for(var n in e){var r=e[n],i=r.validate;if(i&&!i(t[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(t[n]))}}function s(t,e){var n=c({newProps:t,oldProps:e,propTypes:d(t),ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),r=function(t,e){if(null===e)return"oldProps is null, initial diff";var n=null,r=t.dataComparator,i=t._dataDiff;r?r(t.data,e.data)||(n="Data comparator detected a change"):t.data!==e.data&&(n="A new data container was supplied");n&&i&&(n=i(t.data,e.data)||n);return n}(t,e),i=!1;return r||(i=function(t,e){if(null===e)return"oldProps is null, initial diff";if("all"in t.updateTriggers){if(f(t,e,"all"))return{all:!0}}var n={},r=!1;for(var i in t.updateTriggers){if("all"!==i)f(t,e,i)&&(n[i]=!0,r=n)}return r}(t,e)),{dataChanged:r,propsChanged:n,updateTriggersChanged:i,extensionsChanged:h(t,e),transitionsChanged:u(t,e)}}function u(t,e){if(!t.transitions)return null;var n={},r=d(t);for(var i in t.transitions){var a=r[i],o=a&&a.type;("number"===o||"color"===o||"array"===o)&&l(t[i],e[i],a)&&(n[i]=!0)}return n}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.newProps,n=t.oldProps,r=t.ignoreProps,a=void 0===r?{}:r,o=t.propTypes,s=void 0===o?{}:o,u=t.triggerName,c=void 0===u?"props":u;if(n===e)return null;if("object"!==i()(e)||null===e)return"".concat(c," changed shallowly");if("object"!==i()(n)||null===n)return"".concat(c," changed shallowly");for(var h=0,f=Object.keys(e);h<f.length;h++){var d=f[h];if(!(d in a)){if(!(d in n))return"".concat(c,".").concat(d," added");var v=l(e[d],n[d],s[d]);if(v)return"".concat(c,".").concat(d," ").concat(v)}}for(var p=0,g=Object.keys(n);p<g.length;p++){var b=g[p];if(!(b in a)){if(!(b in e))return"".concat(c,".").concat(b," dropped");if(!Object.hasOwnProperty.call(e,b)){var y=l(e[b],n[b],s[b]);if(y)return"".concat(c,".").concat(b," ").concat(y)}}}return null}function l(t,e,n){var r=n&&n.equal;return r&&!r(t,e,n)?"changed deeply":r||!(r=t&&e&&t.equals)||r.call(t,e)?r||e===t?null:"changed shallowly":"changed deeply"}function h(t,e){if(null===e)return"oldProps is null, initial diff";var n=e.extensions,r=t.extensions;if(r===n)return!1;if(r.length!==n.length)return!0;for(var i=0;i<r.length;i++)if(!r[i].equals(n[i]))return!0;return!1}function f(t,e,n){var r=t.updateTriggers[n];r=null==r?{}:r;var i=e.updateTriggers[n];return c({oldProps:i=null==i?{}:i,newProps:r,triggerName:n})}function d(t){var e=t[a],n=e&&e.constructor;return n?n._propTypes:{}}},function(t,e,n){"use strict";var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(10),u=n.n(s),c=n(7),l=n.n(c),h=n(11),f=n.n(h),d=n(157),v=n(92),p=n(106),g=n(80),b=n(75),y=n(8),m=n(22),_=n.n(m),O=n(47),w=n.n(O),j=n(74),k=n(82),x=n(62),E=n(5);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var T=function(t){function e(t,n){var r,a,o;return i()(this,e),(o=u()(this,l()(e).call(this,t,n))).shadowMap=new v.a(t,{width:1,height:1,parameters:(r={},_()(r,10241,9729),_()(r,10240,9729),_()(r,10242,33071),_()(r,10243,33071),r)}),o.depthBuffer=new k.a(t,{format:33189,width:1,height:1}),o.fbo=new x.a(t,{id:"shadowmap",width:1,height:1,attachments:(a={},_()(a,36064,o.shadowMap),_()(a,36096,o.depthBuffer),a)}),o}return f()(e,t),o()(e,[{key:"render",value:function(t){var n=this,r=this.fbo;Object(E.l)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(function(){var i=t.viewports[0],a=Object(E.c)(n.gl),o=i.width*a,s=i.height*a;o===r.width&&s===r.height||r.resize({width:o,height:s}),w()(l()(e.prototype),"render",n).call(n,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(n,!0).forEach((function(e){_()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{target:r,pass:"shadow"}))}))}},{key:"shouldDrawLayer",value:function(t){return!1!==t.props.shadowEnabled}},{key:"getModuleParameters",value:function(){return{drawToShadowMap:!0}}},{key:"delete",value:function(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}]),e}(j.a),S=n(89);n.d(e,"a",(function(){return C}));var A={color:[255,255,255],intensity:1},M=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],L=[0,0,0,200/255],C=function(t){function e(t){var n;for(var r in i()(this,e),(n=u()(this,l()(e).call(this,t))).ambientLight=null,n.directionalLights=[],n.pointLights=[],n.shadowColor=L,n.shadowPasses=[],n.shadowMaps=[],n.dummyShadowMap=null,n.shadow=!1,n.programManager=null,t){var a=t[r];switch(a.type){case"ambient":n.ambientLight=a;break;case"directional":n.directionalLights.push(a);break;case"point":n.pointLights.push(a)}}return n._applyDefaultLights(),n.shadow=n.directionalLights.some((function(t){return t.shadow})),n}return f()(e,t),o()(e,[{key:"preRender",value:function(t,e){var n=e.layers,r=e.layerFilter,i=e.viewports,a=e.onViewportActive,o=e.views;if(this.shadow){this.shadowMatrices=this._createLightMatrix(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=d.a.getDefaultProgramManager(t),S.a&&this.programManager.addDefaultModule(S.a)),this.dummyShadowMap||(this.dummyShadowMap=new v.a(t,{width:1,height:1}));for(var s=0;s<this.shadowPasses.length;s++){this.shadowPasses[s].render({layers:n,layerFilter:r,viewports:i,onViewportActive:a,views:o,moduleParameters:{shadowLightId:s,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}})}}}},{key:"getModuleParameters",value:function(t){var e=this.shadow?{shadowMaps:this.shadowMaps,dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{};return e.lightSources={ambientLight:this.ambientLight,directionalLights:this.directionalLights.map((function(e){return e.getProjectedLight({layer:t})})),pointLights:this.pointLights.map((function(e){return e.getProjectedLight({layer:t})}))},e}},{key:"cleanup",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.shadowPasses[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){r.value.delete()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(S.a),this.programManager=null)}},{key:"_createLightMatrix",value:function(){var t=[],e=!0,n=!1,r=void 0;try{for(var i,a=this.directionalLights[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value,s=(new y.a).lookAt({eye:new y.c(o.direction).negate()});t.push(s)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}return t}},{key:"_createShadowPasses",value:function(t){for(var e=0;e<this.directionalLights.length;e++){var n=new T(t);this.shadowPasses[e]=n,this.shadowMaps[e]=n.shadowMap}}},{key:"_applyDefaultLights",value:function(){var t=this.ambientLight,e=this.pointLights,n=this.directionalLights;t||0!==e.length||0!==n.length||(this.ambientLight=new p.a(A),this.directionalLights.push(new g.a(M[0]),new g.a(M[1])))}}]),e}(b.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return f}));var r=n(26),i=n.n(r),a=n(17),o=n(90),s=n(70),u=n(42),c=n(25);function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=i()(t,3),a=r[0],o=r[1],s=r[2],u=void 0===s?0:s,c=e.projectFlat(t),l=i()(c,2);return[l[0],l[1],u*e.getDistanceScales(n&&[a,o]).unitsPerMeter[2]]}function h(t,e){var n=e.viewport,r=e.modelMatrix,o=e.coordinateSystem,u=e.coordinateOrigin,h=e.offsetMode,f=i()(t,3),d=f[0],v=f[1],p=f[2];if(r){var g=s.b([],[d,v,p,1],r),b=i()(g,3);d=b[0],v=b[1],p=b[2]}switch(o){case a.a.LNGLAT:return l([d,v,p],n,h);case a.a.LNGLAT_OFFSETS:return l([d+u[0],v+u[1],p+(u[2]||0)],n,h);case a.a.METER_OFFSETS:return l(Object(c.a)(u,[d,v,p]),n,h);case a.a.CARTESIAN:default:return n.projectPosition([d,v,p])}}function f(t,e){var n=function(t){var e=Object.assign({},t),n=t.coordinateSystem,r=t.viewport,i=t.coordinateOrigin,s=t.fromCoordinateSystem,u=t.fromCoordinateOrigin;return n===a.a.DEFAULT&&(n=r.isGeospatial?a.a.LNGLAT:a.a.CARTESIAN),void 0===s&&(e.fromCoordinateSystem=n),void 0===u&&(e.fromCoordinateOrigin=i),n===a.a.LNGLAT&&r.zoom>=o.a&&(n=a.a.LNGLAT_OFFSETS,e.coordinateOrigin=[Math.fround(r.longitude),Math.fround(r.latitude)]),e.coordinateSystem=n,e}(e),r=n.viewport,i=n.coordinateSystem,s=n.coordinateOrigin,c=n.modelMatrix,f=n.fromCoordinateSystem,d=n.fromCoordinateOrigin;switch(i){case a.a.LNGLAT_OFFSETS:case a.a.METER_OFFSETS:var v=h(t,{viewport:r,modelMatrix:c,coordinateSystem:f,coordinateOrigin:d,offsetMode:!0}),p=l(s,r,!0);return u.h(v,v,p),v;case a.a.LNGLAT:case a.a.CARTESIAN:default:return h(t,{viewport:r,modelMatrix:c,coordinateSystem:f,coordinateOrigin:d,offsetMode:!1})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(3),a=n(5),o=n(158),s=n(30),u=new(function(){function t(){Object(r.a)(this,t),this.stats=new Map}return Object(i.a)(t,[{key:"get",value:function(t){return this.stats.has(t)||this.stats.set(t,new o.a({id:t})),this.stats.get(t)}}]),t}());if(s.global.luma&&"8.0.3"!==s.global.luma.VERSION)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(s.global.luma.VERSION," vs ").concat("8.0.3"));s.global.luma||(Object(s.isBrowser)()&&a.h.log(1,"luma.gl ".concat("8.0.3"," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),s.global.luma=s.global.luma||{VERSION:"8.0.3",version:"8.0.3",log:a.h,stats:u,globals:{modules:{},nodeIO:{}}});s.global.luma},function(t,e,n){var r;
  /*! Hammer.JS - v2.0.7 - 2016-04-22
   * http://hammerjs.github.io/
   *
   * Copyright (c) 2016 Jorik Tangelder;
   * Licensed under the MIT license */!function(i,a,o,s){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],l=a.createElement("div"),h="function",f=Math.round,d=Math.abs,v=Date.now;function p(t,e,n){return setTimeout(w(t,n),e)}function g(t,e,n){return!!Array.isArray(t)&&(b(t,n[e],n),!0)}function b(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function y(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=i.console&&(i.console.warn||i.console.log);return a&&a.call(i.console,r,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==s&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var m=y((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===s)&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),_=y((function(t,e){return m(t,e,!0)}),"merge","Use `assign`.");function O(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&u(r,n)}function w(t,e){return function(){return t.apply(e,arguments)}}function j(t,e){return typeof t==h?t.apply(e&&e[0]||s,e):t}function k(t,e){return t===s?e:t}function x(t,e,n){b(S(e),(function(e){t.addEventListener(e,n,!1)}))}function E(t,e,n){b(S(e),(function(e){t.removeEventListener(e,n,!1)}))}function P(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function T(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function M(t){return Array.prototype.slice.call(t,0)}function L(t,e,n){for(var r=[],i=[],a=0;a<t.length;){var o=e?t[a][e]:t[a];A(i,o)<0&&r.push(t[a]),i[a]=o,a++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function C(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),a=0;a<c.length;){if((r=(n=c[a])?n+i:e)in t)return r;a++}return s}var I=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var F="ontouchstart"in i,D=C(i,"PointerEvent")!==s,N=F&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),B=25,z=1,U=2,V=4,G=8,H=1,W=2,X=4,Z=8,Y=16,q=W|X,K=Z|Y,Q=q|K,J=["x","y"],$=["clientX","clientY"];function tt(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){j(t.options.enable,[t])&&n.handler(e)},this.init()}function et(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,a=e&z&&r-i==0,o=e&(V|G)&&r-i==0;n.isFirst=!!a,n.isFinal=!!o,a&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=nt(e));i>1&&!n.firstMultiple?n.firstMultiple=nt(e):1===i&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,u=o?o.center:a.center,c=e.center=rt(r);e.timeStamp=v(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=st(u,c),e.distance=ot(u,c),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},a=t.prevInput||{};e.eventType!==z&&a.eventType!==V||(i=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=at(e.deltaX,e.deltaY);var l=it(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=d(l.x)>d(l.y)?l.x:l.y,e.scale=o?(h=o.pointers,f=r,ot(f[0],f[1],$)/ot(h[0],h[1],$)):1,e.rotation=o?function(t,e){return st(e[1],e[0],$)+st(t[1],t[0],$)}(o.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,a,o=t.lastInterval||e,u=e.timeStamp-o.timeStamp;if(e.eventType!=G&&(u>B||o.velocity===s)){var c=e.deltaX-o.deltaX,l=e.deltaY-o.deltaY,h=it(u,c,l);r=h.x,i=h.y,n=d(h.x)>d(h.y)?h.x:h.y,a=at(c,l),t.lastInterval=e}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=a}(n,e);var h,f;var p=t.element;P(e.srcEvent.target,p)&&(p=e.srcEvent.target);e.target=p}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function nt(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:f(t.pointers[n].clientX),clientY:f(t.pointers[n].clientY)},n++;return{timeStamp:v(),pointers:e,center:rt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function rt(t){var e=t.length;if(1===e)return{x:f(t[0].clientX),y:f(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:f(n/e),y:f(r/e)}}function it(t,e,n){return{x:e/t||0,y:n/t||0}}function at(t,e){return t===e?H:d(t)>=d(e)?t<0?W:X:e<0?Z:Y}function ot(t,e,n){n||(n=J);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function st(t,e,n){n||(n=J);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}tt.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(R(this.element),this.evWin,this.domHandler)},destroy: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)}};var ut={mousedown:z,mousemove:U,mouseup:V},ct="mousedown",lt="mousemove mouseup";function ht(){this.evEl=ct,this.evWin=lt,this.pressed=!1,tt.apply(this,arguments)}O(ht,tt,{handler:function(t){var e=ut[t.type];e&z&&0===t.button&&(this.pressed=!0),e&U&&1!==t.which&&(e=V),this.pressed&&(e&V&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ft={pointerdown:z,pointermove:U,pointerup:V,pointercancel:G,pointerout:G},dt={2:"touch",3:"pen",4:"mouse",5:"kinect"},vt="pointerdown",pt="pointermove pointerup pointercancel";function gt(){this.evEl=vt,this.evWin=pt,tt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(vt="MSPointerDown",pt="MSPointerMove MSPointerUp MSPointerCancel"),O(gt,tt,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=ft[r],a=dt[t.pointerType]||t.pointerType,o="touch"==a,s=A(e,t.pointerId,"pointerId");i&z&&(0===t.button||o)?s<0&&(e.push(t),s=e.length-1):i&(V|G)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:a,srcEvent:t}),n&&e.splice(s,1))}});var bt={touchstart:z,touchmove:U,touchend:V,touchcancel:G},yt="touchstart",mt="touchstart touchmove touchend touchcancel";function _t(){this.evTarget=yt,this.evWin=mt,this.started=!1,tt.apply(this,arguments)}function Ot(t,e){var n=M(t.touches),r=M(t.changedTouches);return e&(V|G)&&(n=L(n.concat(r),"identifier",!0)),[n,r]}O(_t,tt,{handler:function(t){var e=bt[t.type];if(e===z&&(this.started=!0),this.started){var n=Ot.call(this,t,e);e&(V|G)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var wt={touchstart:z,touchmove:U,touchend:V,touchcancel:G},jt="touchstart touchmove touchend touchcancel";function kt(){this.evTarget=jt,this.targetIds={},tt.apply(this,arguments)}function xt(t,e){var n=M(t.touches),r=this.targetIds;if(e&(z|U)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,a,o=M(t.changedTouches),s=[],u=this.target;if(a=n.filter((function(t){return P(t.target,u)})),e===z)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),e&(V|G)&&delete r[o[i].identifier],i++;return s.length?[L(a.concat(s),"identifier",!0),s]:void 0}O(kt,tt,{handler:function(t){var e=wt[t.type],n=xt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var Et=2500,Pt=25;function Tt(){tt.apply(this,arguments);var t=w(this.handler,this);this.touch=new kt(this.manager,t),this.mouse=new ht(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function St(t,e){t&z?(this.primaryTouch=e.changedPointers[0].identifier,At.call(this,e)):t&(V|G)&&At.call(this,e)}function At(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),Et)}}function Mt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(e-i.x),o=Math.abs(n-i.y);if(a<=Pt&&o<=Pt)return!0}return!1}O(Tt,tt,{handler:function(t,e,n){var r="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)St.call(this,e,n);else if(i&&Mt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Lt=C(l.style,"touchAction"),Ct=Lt!==s,It="auto",Rt="manipulation",Ft="none",Dt="pan-x",Nt="pan-y",Bt=function(){if(!Ct)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||i.CSS.supports("touch-action",n)})),t}();function zt(t,e){this.manager=t,this.set(e)}zt.prototype={set:function(t){"compute"==t&&(t=this.compute()),Ct&&this.manager.element.style&&Bt[t]&&(this.manager.element.style[Lt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return b(this.manager.recognizers,(function(e){j(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(T(t,Ft))return Ft;var e=T(t,Dt),n=T(t,Nt);if(e&&n)return Ft;if(e||n)return e?Dt:Nt;if(T(t,Rt))return Rt;return It}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=T(r,Ft)&&!Bt[Ft],a=T(r,Nt)&&!Bt[Nt],o=T(r,Dt)&&!Bt[Dt];if(i){var s=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(s&&u&&c)return}if(!o||!a)return i||a&&n&q||o&&n&K?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Ut=1,Vt=2,Gt=4,Ht=8,Wt=Ht,Xt=16;function Zt(t){this.options=u({},this.defaults,t||{}),this.id=I++,this.manager=null,this.options.enable=k(this.options.enable,!0),this.state=Ut,this.simultaneous={},this.requireFail=[]}function Yt(t){return t&Xt?"cancel":t&Ht?"end":t&Gt?"move":t&Vt?"start":""}function qt(t){return t==Y?"down":t==Z?"up":t==W?"left":t==X?"right":""}function Kt(t,e){var n=e.manager;return n?n.get(t):t}function Qt(){Zt.apply(this,arguments)}function Jt(){Qt.apply(this,arguments),this.pX=null,this.pY=null}function $t(){Qt.apply(this,arguments)}function te(){Zt.apply(this,arguments),this._timer=null,this._input=null}function ee(){Qt.apply(this,arguments)}function ne(){Qt.apply(this,arguments)}function re(){Zt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ie(t,e){return(e=e||{}).recognizers=k(e.recognizers,ie.defaults.preset),new ae(t,e)}Zt.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(g(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Kt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return g(t,"dropRecognizeWith",this)?this:(t=Kt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(g(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=Kt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(g(t,"dropRequireFailure",this))return this;t=Kt(t,this);var e=A(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<Ht&&r(e.options.event+Yt(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=Ht&&r(e.options.event+Yt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|Ut)))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!j(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(Wt|Xt|32)&&(this.state=Ut),this.state=this.process(e),this.state&(Vt|Gt|Ht|Xt)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},O(Qt,Zt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(Vt|Gt),i=this.attrTest(t);return r&&(n&G||!i)?e|Xt:r||i?n&V?e|Ht:e&Vt?e|Gt:Vt:32}}),O(Jt,Qt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Q},getTouchAction:function(){var t=this.options.direction,e=[];return t&q&&e.push(Nt),t&K&&e.push(Dt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,a=t.deltaX,o=t.deltaY;return i&e.direction||(e.direction&q?(i=0===a?H:a<0?W:X,n=a!=this.pX,r=Math.abs(t.deltaX)):(i=0===o?H:o<0?Z:Y,n=o!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return Qt.prototype.attrTest.call(this,t)&&(this.state&Vt||!(this.state&Vt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=qt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),O($t,Qt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ft]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Vt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),O(te,Zt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[It]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(V|G)&&!i)this.reset();else if(t.eventType&z)this.reset(),this._timer=p((function(){this.state=Wt,this.tryEmit()}),e.time,this);else if(t.eventType&V)return Wt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Wt&&(t&&t.eventType&V?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=v(),this.manager.emit(this.options.event,this._input)))}}),O(ee,Qt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ft]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Vt)}}),O(ne,Qt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:q|K,pointers:1},getTouchAction:function(){return Jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(q|K)?e=t.overallVelocity:n&q?e=t.overallVelocityX:n&K&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&t.eventType&V},emit:function(t){var e=qt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),O(re,Zt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Rt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),t.eventType&z&&0===this.count)return this.failTimeout();if(r&&i&&n){if(t.eventType!=V)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||ot(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&a?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=Wt,this.tryEmit()}),e.interval,this),Vt):Wt}return 32},failTimeout:function(){return this._timer=p((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Wt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ie.VERSION="2.0.7",ie.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[ee,{enable:!1}],[$t,{enable:!1},["rotate"]],[ne,{direction:q}],[Jt,{direction:q},["swipe"]],[re],[re,{event:"doubletap",taps:2},["tap"]],[te]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function ae(t,e){var n;this.options=u({},ie.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(D?gt:N?kt:F?Tt:ht))(n,et),this.touchAction=new zt(this,this.options.touchAction),oe(this,!0),b(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function oe(t,e){var n,r=t.element;r.style&&(b(t.options.cssProps,(function(i,a){n=C(r.style,a),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}ae.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&Wt)&&(i=e.curRecognizer=null);for(var a=0;a<r.length;)n=r[a],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&n.state&(Vt|Gt|Ht)&&(i=e.curRecognizer=n),a++}},get:function(t){if(t instanceof Zt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(g(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(g(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=A(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==s&&e!==s){var n=this.handlers;return b(S(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==s){var n=this.handlers;return b(S(t),(function(t){e?n[t]&&n[t].splice(A(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=a.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&oe(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(ie,{INPUT_START:z,INPUT_MOVE:U,INPUT_END:V,INPUT_CANCEL:G,STATE_POSSIBLE:Ut,STATE_BEGAN:Vt,STATE_CHANGED:Gt,STATE_ENDED:Ht,STATE_RECOGNIZED:Wt,STATE_CANCELLED:Xt,STATE_FAILED:32,DIRECTION_NONE:H,DIRECTION_LEFT:W,DIRECTION_RIGHT:X,DIRECTION_UP:Z,DIRECTION_DOWN:Y,DIRECTION_HORIZONTAL:q,DIRECTION_VERTICAL:K,DIRECTION_ALL:Q,Manager:ae,Input:tt,TouchAction:zt,TouchInput:kt,MouseInput:ht,PointerEventInput:gt,TouchMouseInput:Tt,SingleTouchInput:_t,Recognizer:Zt,AttrRecognizer:Qt,Tap:re,Pan:Jt,Swipe:ne,Pinch:$t,Rotate:ee,Press:te,on:x,off:E,each:b,merge:_,extend:m,assign:u,inherit:O,bindFn:w,prefixed:C}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=ie,(r=function(){return ie}.call(e,n,e,t))===s||(t.exports=r)}(window,document)},function(t,e){},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),i=n.n(r),a=[255,255,255],o=0,s=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t);var n=e.color,r=void 0===n?a:n,s=e.intensity,u=void 0===s?1:s;this.id=e.id||"ambient-".concat(o++),this.color=r,this.intensity=u,this.type="ambient"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(10),u=n.n(s),c=n(7),l=n.n(c),h=n(11),f=n.n(h),d=n(61),v=n(108),p=n(109),g=function(t){function e(t){return i()(this,e),u()(this,l()(e).call(this,Object.assign({},t,{type:v.a})))}return f()(e,t),o()(e,[{key:"controller",get:function(){return this._getControllerProps({type:p.a})}}]),e}(d.a);g.displayName="MapView"},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(10),u=n.n(s),c=n(7),l=n.n(c),h=n(134),f=n.n(h),d=n(11),v=n.n(d),p=n(44),g=n(25),b=n(35),y=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,e);var r=n.latitude,a=void 0===r?0:r,o=n.longitude,s=void 0===o?0:o,c=n.zoom,h=void 0===c?11:c,d=n.pitch,v=void 0===d?0:d,p=n.bearing,b=void 0===p?0:p,y=n.nearZMultiplier,m=void 0===y?.1:y,_=n.farZMultiplier,O=void 0===_?1.01:_,w=n.orthographic,j=void 0!==w&&w,k=n.width,x=n.height,E=n.altitude,P=void 0===E?1.5:E,T=Math.pow(2,h);k=k||1,x=x||1,P=Math.max(.75,P);var S=Object(g.h)({width:k,height:x,pitch:v,altitude:P,nearZMultiplier:m,farZMultiplier:O}),A=S.fov,M=S.aspect,L=S.focalDistance,C=S.near,I=S.far,R=Object(g.i)({height:x,pitch:v,bearing:b,scale:T,altitude:P}),F=Object.assign({},n,{width:k,height:x,viewMatrix:R,longitude:s,latitude:a,zoom:h,orthographic:j,fovyRadians:A,aspect:M,focalDistance:j?L:1,near:C,far:I});return(t=u()(this,l()(e).call(this,F))).latitude=a,t.longitude=s,t.zoom=h,t.pitch=v,t.bearing=b,t.altitude=P,t.orthographic=j,Object.freeze(f()(t)),t}return v()(e,t),o()(e,[{key:"addMetersToLngLat",value:function(t,e){return Object(g.a)(t,e)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,n=t.pos,r=Object(g.l)(n,this.pixelUnprojectionMatrix),i=this.projectFlat(e),a=b.a([],i,b.d([],r)),o=b.a([],this.center,a);return this.unprojectFlat(o)}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=Object(g.c)(Object.assign({width:r,height:i,bounds:t},n)),o=a.longitude,s=a.latitude,u=a.zoom;return new e({width:r,height:i,longitude:o,latitude:s,zoom:u})}}]),e}(p.a);y.displayName="WebMercatorViewport"},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(26),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(10),l=n.n(c),h=n(7),f=n.n(h),d=n(11),v=n.n(d),p=n(8),g=n(58),b=n(91),y=n(25),m=n(20),_=n(56),O=n(57),w={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new _.a,transitionInterruption:O.a.BREAK},j={transitionDuration:0},k={minZoom:0,maxZoom:20,minPitch:0,maxPitch:60},x={pitch:0,bearing:0,altitude:1.5},E=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,i=n.height,a=n.latitude,s=n.longitude,u=n.zoom,c=n.bearing,h=void 0===c?x.bearing:c,d=n.pitch,v=void 0===d?x.pitch:d,p=n.altitude,g=void 0===p?x.altitude:p,b=n.maxZoom,y=void 0===b?k.maxZoom:b,_=n.minZoom,O=void 0===_?k.minZoom:_,w=n.maxPitch,j=void 0===w?k.maxPitch:w,E=n.minPitch,P=void 0===E?k.minPitch:E,T=n.startPanLngLat,S=n.startZoomLngLat,A=n.startBearing,M=n.startPitch,L=n.startZoom;return o()(this,e),Object(m.a)(Number.isFinite(s),"`longitude` must be supplied"),Object(m.a)(Number.isFinite(a),"`latitude` must be supplied"),Object(m.a)(Number.isFinite(u),"`zoom` must be supplied"),(t=l()(this,f()(e).call(this,{width:r,height:i,latitude:a,longitude:s,zoom:u,bearing:h,pitch:v,altitude:g,maxZoom:y,minZoom:O,maxPitch:j,minPitch:P})))._interactiveState={startPanLngLat:T,startZoomLngLat:S,startBearing:A,startPitch:M,startZoom:L},t}return v()(e,t),u()(e,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._interactiveState.startPanLngLat||this._unproject(n);if(!r)return this;var a=this._calculateNewLngLat({startPanLngLat:r,pos:e}),o=i()(a,2),s=o[0],u=o[1];return this._getUpdatedState({longitude:s,latitude:u})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){t.pos;return this._getUpdatedState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e=t.deltaScaleX,n=void 0===e?0:e,r=t.deltaScaleY,i=void 0===r?0:r,a=this._interactiveState,o=a.startBearing,s=a.startPitch;if(!Number.isFinite(o)||!Number.isFinite(s))return this;var u=this._calculateNewPitchAndBearing({deltaScaleX:n,deltaScaleY:i,startBearing:o,startPitch:s}),c=u.pitch,l=u.bearing;return this._getUpdatedState({bearing:l,pitch:c})}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale,a=this._interactiveState,o=a.startZoom,s=a.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,s=this._unproject(n)||this._unproject(e));var u=this._calculateNewZoom({scale:r,startZoom:o}),c=new y.b(Object.assign({},this._viewportProps,{zoom:u})).getMapCenterByLngLatPosition({lngLat:s,pos:e}),l=i()(c,2),h=l[0],f=l[1];return this._getUpdatedState({zoom:u,longitude:h,latitude:f})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}},{key:"zoomIn",value:function(){return this._zoomFromCenter(2)}},{key:"zoomOut",value:function(){return this._zoomFromCenter(.5)}},{key:"moveLeft",value:function(){return this._panFromCenter([100,0])}},{key:"moveRight",value:function(){return this._panFromCenter([-100,0])}},{key:"moveUp",value:function(){return this._panFromCenter([0,100])}},{key:"moveDown",value:function(){return this._panFromCenter([0,-100])}},{key:"rotateLeft",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch+10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch-10})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.bearing,i=n.longitude;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_zoomFromCenter",value:function(t){var e=this._viewportProps,n=e.width,r=e.height;return this.zoom({pos:[n/2,r/2],scale:t})}},{key:"_panFromCenter",value:function(t){var e=this._viewportProps,n=e.width,r=e.height;return this.pan({startPos:[n/2,r/2],pos:[n/2+t[0],r/2+t[1]]})}},{key:"_getUpdatedState",value:function(t){return new e(Object.assign({},this._viewportProps,this._interactiveState,t))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=Object(p.e)(r,n,e);var i=t.maxPitch,a=t.minPitch,o=t.pitch;return t.pitch=Object(p.e)(o,a,i),Object.assign(t,Object(y.k)(t)),t}},{key:"_unproject",value:function(t){var e=new y.b(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new y.b(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom,a=r.minZoom,o=n+Math.log2(e);return Object(p.e)(o,a,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=Object(p.e)(n,-1,1);var a=this._viewportProps,o=a.minPitch,s=a.maxPitch,u=i;return n>0?u=i+n*(s-i):n<0&&(u=i-n*(o-i)),{pitch:u,bearing:r+180*e}}}]),e}(b.a),P=function(t){function e(t){var n;return o()(this,e),(n=l()(this,f()(e).call(this,E,t))).invertPan=!0,n}return v()(e,t),u()(e,[{key:"_getTransitionProps",value:function(){return w}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=t.deltaX,n=t.deltaY,r=this.getCenter(t),a=i()(r,2)[1],o=a-n,s=this.controllerState.getViewportProps(),u=s.width,c=s.height,l=e/u,h=0;n>0?Math.abs(c-o)>5&&(h=n/(o-c)*1.2):n<0&&o>5&&(h=1-a/o),h=Math.min(1,Math.max(-1,h));var f=this.controllerState.rotate({deltaScaleX:l,deltaScaleY:h});return this.updateViewport(f,j,{isDragging:!0,isRotating:!0})}}]),e}(g.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(20),u=n(188),c=n(86),l=n(34),h=n(16),f=n(33),d=n(59),v=n(158),p=n(44),g=n(118),b=Object.seal({layerManager:null,deck:null,gl:null,stats:null,shaderCache:null,pickingFBO:null,mousePosition:null,userData:{}}),y=function(t){return t instanceof c.a?"".concat(t):t?"invalid":"null"},m=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.deck,a=n.stats,o=n.viewport,s=void 0===o?null:o,c=n.timeline,l=void 0===c?null:c;i()(this,t),this.lastRenderedLayers=[],this.layers=[],this.context=Object.assign({},b,{layerManager:this,deck:r,gl:e,programManager:e&&Object(g.a)(e),stats:a||new v.a({id:"deck.gl"}),viewport:s||new p.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:l||new u.a}),this._needsRedraw="Initial render",this._needsUpdate=!1,this._debug=!1,this.activateViewport=this.activateViewport.bind(this),Object.seal(this)}return o()(t,[{key:"finalize",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.layers[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;this._finalizeLayer(a)}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var n=!0,r=!1,i=void 0;try{for(var a,o=this.layers[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=s.getNeedsRedraw(t);e=e||u}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return e}},{key:"needsUpdate",value:function(){return this._needsUpdate}},{key:"setNeedsRedraw",value:function(t){this._needsRedraw=this._needsRedraw||t}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t}},{key:"getLayers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.layerIds,n=void 0===e?null:e;return n?this.layers.filter((function(t){return n.find((function(e){return 0===t.id.indexOf(e)}))})):this.layers}},{key:"setProps",value:function(t){"debug"in t&&(this._debug=t.debug),"userData"in t&&(this.context.userData=t.userData),"layers"in t&&this.setLayers(t.layers)}},{key:"setLayers",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e||t!==this.lastRenderedLayers;if(Object(f.a)("layerManager.setLayers",this,n,t),!n)return this;this.lastRenderedLayers=t,t=Object(d.b)(t,{filter:Boolean});var r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;u.context=this.context}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return this._updateLayers(this.layers,t),this}},{key:"updateLayers",value:function(){var t=this.needsUpdate();if(t){this.setNeedsRedraw("updating layers: ".concat(t));this.setLayers(this.lastRenderedLayers,!0)}}},{key:"activateViewport",value:function(t){Object(s.a)(t,"LayerManager: viewport not set");var e=this.context.viewport;if(!e||!t.equals(e)){Object(f.a)("layerManager.activateViewport",this,t),this.context.viewport=t;var n={viewportChanged:!0},r=!0,i=!1,a=void 0;try{for(var o,u=this.layers[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var c=o.value;c.setChangeFlags(n),this._updateLayer(c)}}catch(t){i=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}}return this}},{key:"_updateLayers",value:function(t,e){var n={},r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;n[u.id]?h.a.warn("Multiple old layers with same id ".concat(y(u)))():n[u.id]=u}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}for(var c=[],l=this._updateSublayersRecursively(e,n,c),f=this._finalizeOldLayers(n),d=!1,v=0,p=c;v<p.length;v++){if(p[v].hasUniformTransition()){d=!0;break}}this._needsUpdate=d,this.layers=c;var g=l||f;if(g)throw g}},{key:"_updateSublayersRecursively",value:function(t,e,n){var r=null,i=!0,a=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;c.context=this.context;var l=e[c.id];null===l&&h.a.warn("Multiple new layers with same id ".concat(y(c)))(),e[c.id]=null;var f=null;try{if(this._debug&&l!==c&&c.validateProps(),l){this._transferLayerState(l,c);var d=this._updateLayer(c);r=r||d}else{var v=this._initializeLayer(c);r=r||v}n.push(c),f=c.isComposite&&c.getSubLayers()}catch(v){h.a.warn("error during matching of ".concat(y(c)),v)(),r=r||v}if(f){var p=this._updateSublayersRecursively(f,e,n);r=r||p}}}catch(v){a=!0,o=v}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}return r}},{key:"_finalizeOldLayers",value:function(t){var e=null;for(var n in t){var r=t[n];if(r){var i=this._finalizeLayer(r);e=e||i}}return e}},{key:"_initializeLayer",value:function(t){try{t._initialize(),t.lifecycle=l.a.INITIALIZED}catch(e){return h.a.warn("error while initializing ".concat(y(t),"\n"),e)(),e}return null}},{key:"_transferLayerState",value:function(t,e){e._transferState(t),e.lifecycle=l.a.MATCHED,e!==t&&(t.lifecycle=l.a.AWAITING_GC)}},{key:"_updateLayer",value:function(t){try{t._update()}catch(e){return h.a.warn("error during update of ".concat(y(t)),e)(),e}return null}},{key:"_finalizeLayer",value:function(t){this._needsRedraw=this._needsRedraw||"finalized ".concat(y(t)),t.lifecycle=l.a.AWAITING_FINALIZATION;try{t._finalize(),t.lifecycle=l.a.FINALIZED}catch(e){return h.a.warn("error during finalization of ".concat(y(t)),e)(),e}return null}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(6),i=n.n(r),a=n(15),o=n(1),s=n(3),u=n(117),c=function(){function t(e){var n=e.source,r=e.name,i=void 0===r?"unnamed":r,a=e.maxConcurrency,s=void 0===a?1:a,u=e.onMessage,c=e.onDebug,l=void 0===c?function(){}:c;Object(o.a)(this,t),this.source=n,this.name=i,this.maxConcurrency=s,this.onMessage=u,this.onDebug=l,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}var e;return Object(s.a)(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"process",value:(e=Object(a.a)(i.a.mark((function t(e,n){var r=this;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){r.jobQueue.push({data:e,jobName:n,resolve:t,reject:i}),r._startQueuedJob()})));case 1:case"end":return t.stop()}}),t)}))),function(t,n){return e.apply(this,arguments)})},{key:"_startQueuedJob",value:function(){var t=this;if(this.jobQueue.length){var e=this._getAvailableWorker();if(e){var n=this.jobQueue.shift();this.onDebug({message:"processing",worker:e.name,job:n.jobName,backlog:this.jobQueue.length}),e.process(n.data).then((function(t){return n.resolve(t)})).catch((function(t){return n.reject(t)})).then((function(){return t._onWorkerDone(e)}))}}}},{key:"_onWorkerDone",value:function(t){this.isDestroyed?t.destroy():(this.idleQueue.push(t),this._startQueuedJob())}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;var t="".concat(this.name.toLowerCase(),"-worker (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new u.a({source:this.source,onMessage:this.onMessage,name:t})}return null}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(84),i=n(137);function a(t){if(i.toArrayBuffer&&(t=Object(i.toArrayBuffer)(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.buffer;if("string"==typeof t){var e=t;return(new TextEncoder).encode(e).buffer}return Object(r.a)(!1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(22),i=n.n(r);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t,e){if(!e)return t;var n=Object.assign({},t,e);if("defines"in e&&(n.defines=Object.assign({},t.defines,e.defines)),"modules"in e&&(n.modules=(t.modules||[]).concat(e.modules),e.modules.some((function(t){return"project64"===t.name})))){var r=n.modules.findIndex((function(t){return"project32"===t.name}));r>=0&&n.modules.splice(r,1)}if("inject"in e)if(t.inject){var o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t.inject);for(var s in e.inject)o[s]=(o[s]||"")+e.inject[s];n.inject=o}else n.inject=e.inject;return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(41),i=n.n(r),a="count(): argument not an object",o="count(): argument not a container";function s(t){if(null===(e=t)||"object"!==i()(e))throw new Error(a);var e;if("function"==typeof t.count)return t.count();if(Number.isFinite(t.size))return t.size;if(Number.isFinite(t.length))return t.length;if(function(t){return null!==t&&"object"===i()(t)&&t.constructor===Object}(t))return Object.keys(t).length;throw new Error(o)}},function(t,e,n){"use strict";var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(22),u=n.n(s),c=n(26),l=n.n(c),h=n(10),f=n.n(h),d=n(7),v=n.n(d),p=n(47),g=n.n(p),b=n(11),y=n.n(b),m=n(187),_=n(136),O=n(36);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var j=function(){function t(e,n){i()(this,t),this.opts=n,this.source=e}return o()(t,[{key:"getValue",value:function(){var t=this.source.getBuffer(),e=this.getAccessor();if(t)return[t,e];var n=this.source.value,r=e.size,i=n;if(n&&n.length!==r){i=new Float32Array(r);for(var a=e.elementOffset||0,o=0;o<r;++o)i[o]=n[a+o]}return i}},{key:"getAccessor",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(n,!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.source.getAccessor(),{},this.opts)}},{key:"value",get:function(){return this.source.value}}]),t}();var k=n(71),x=n(38),E=n(16);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(n,!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t){return t.stride||t.size*t.bytesPerElement}function A(t,e){e.offset&&E.a.removed("shaderAttribute.offset","vertexOffset, elementOffset")();var n=S(t);return T({},e,{offset:("vertexOffset"in e?e.vertexOffset:t.vertexOffset||0)*n+(e.elementOffset||0)*t.bytesPerElement+(t.offset||0),stride:n})}var M=function(){function t(e,n){i()(this,t),this.gl=e,this.id=n.id,this.size=n.size;var r=n.logicalType||n.type,a=5130===r,o=n.defaultValue;o=Number.isFinite(o)?[o]:o||new Array(this.size).fill(0),n.defaultValue=o;var s=r;a?s=5126:!s&&n.isIndexed?s=e&&Object(m.b)(e,_.a.ELEMENT_INDEX_UINT32)?5125:5123:s||(s=5126),n.logicalType=r,n.type=s;var u=function(t){switch(t){case 5126:return Float32Array;case 5130:return Float64Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return Uint8ClampedArray;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Unknown GL type")}}(r||s||5126);this.shaderAttributes={},this.doublePrecision=a,a&&!1===n.fp64&&(u=Float32Array),n.bytesPerElement=u.BYTES_PER_ELEMENT,this.defaultType=u,this.value=null,this.settings=n,this.state={externalBuffer:null,bufferAccessor:n,allocatedValue:null,constant:!1},this._buffer=null,this.setData(n)}return o()(t,[{key:"delete",value:function(){this._buffer&&(this._buffer.delete(),this._buffer=null),k.a.release(this.state.allocatedValue)}},{key:"getShaderAttributes",value:function(t,e){if(this.doublePrecision){var n={},r=this.value instanceof Float64Array,i=(a=this.getAccessor(),{high:o=A(a,e||{}),low:T({},o,{offset:o.offset+4*a.size})});return n[t]=new j(this,i.high),n["".concat(t,"64Low")]=r?new j(this,i.low):new Float32Array(this.size),n}var a,o;if(e){var s=A(this.getAccessor(),e);return u()({},t,new j(this,s))}return u()({},t,this)}},{key:"getBuffer",value:function(){return this.state.constant?null:this.state.externalBuffer||this._buffer}},{key:"getValue",value:function(){return this.state.constant?this.value:[this.getBuffer(),this.getAccessor()]}},{key:"getAccessor",value:function(){return this.state.bufferAccessor}},{key:"setData",value:function(t){var e=this.state;ArrayBuffer.isView(t)?t={value:t}:t instanceof O.a&&(t={buffer:t});var n=T({},this.settings,{},t);if(e.bufferAccessor=n,t.constant){var r=t.value;if(r=this._normalizeValue(r,[],0),this.settings.normalized&&(r=this._normalizeConstant(r)),!(!e.constant||!this._areValuesEqual(r,this.value)))return!1;e.externalBuffer=null,e.constant=!0,this.value=r}else if(t.buffer){var i=t.buffer;e.externalBuffer=i,e.constant=!1,this.value=t.value;var a=t.value instanceof Float64Array;n.type=t.type||i.accessor.type,n.bytesPerElement=i.accessor.BYTES_PER_ELEMENT*(a?2:1),n.stride=S(n)}else if(t.value){this._checkExternalBuffer(t);var o=t.value;e.externalBuffer=null,e.constant=!1,this.value=o,n.bytesPerElement=o.BYTES_PER_ELEMENT,n.stride=S(n);var s=this.buffer,u=this.byteOffset;this.doublePrecision&&o instanceof Float64Array&&(o=Object(x.f)(o,n)),s.byteLength<o.byteLength+u&&s.reallocate(2*(o.byteLength+u)),s.setAccessor(null),s.subData({data:o,offset:u}),n.type=t.type||s.accessor.type}return!0}},{key:"updateSubBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.value,n=t.startOffset,r=void 0===n?0:n,i=t.endOffset;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?Object(x.f)(e,{size:this.size,startIndex:r,endIndex:i}):e.subarray(r,i),offset:r*e.BYTES_PER_ELEMENT+this.byteOffset})}},{key:"allocate",value:function(t){var e=t.numInstances,n=t.copy,r=void 0!==n&&n,i=this.state,a=i.allocatedValue,o=k.a.allocate(a,e+1,{size:this.size,type:this.defaultType,copy:r});this.value=o;var s=this.buffer,u=this.byteOffset;return s.byteLength<o.byteLength+u&&(s.reallocate(o.byteLength+u),r&&a&&s.subData({data:a instanceof Float64Array?Object(x.f)(a,this):a,offset:u})),i.allocatedValue=o,i.constant=!1,i.externalBuffer=null,i.bufferAccessor=this.settings,!0}},{key:"_checkExternalBuffer",value:function(t){var e=t.value;if(!t.constant&&e){var n=this.defaultType,r=!1;if(this.doublePrecision&&(r=e.BYTES_PER_ELEMENT<4),r)throw new Error("Attribute ".concat(this.id," does not support ").concat(e.constructor.name));e instanceof n||!this.settings.normalized||"normalized"in t||E.a.warn("Attribute ".concat(this.id," is normalized"))()}}},{key:"_normalizeConstant",value:function(t){switch(this.settings.type){case 5120:return new Float32Array(t).map((function(t){return(t+128)/255*2-1}));case 5122:return new Float32Array(t).map((function(t){return(t+32768)/65535*2-1}));case 5121:return new Float32Array(t).map((function(t){return t/255}));case 5123:return new Float32Array(t).map((function(t){return t/65535}));default:return t}}},{key:"_normalizeValue",value:function(t,e,n){var r=this.settings,i=r.defaultValue,a=r.size;if(Number.isFinite(t))return e[n]=t,e;if(!t)return e[n]=i[0],e;switch(a){case 4:e[n+3]=Number.isFinite(t[3])?t[3]:i[3];case 3:e[n+2]=Number.isFinite(t[2])?t[2]:i[2];case 2:e[n+1]=Number.isFinite(t[1])?t[1]:i[1];case 1:e[n+0]=Number.isFinite(t[0])?t[0]:i[0];break;default:for(var o=a;--o>=0;)e[n+o]=Number.isFinite(t[o])?t[o]:i[o]}return e}},{key:"_areValuesEqual",value:function(t,e){if(!t||!e)return!1;for(var n=this.size,r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}},{key:"buffer",get:function(){if(!this._buffer){var t=this.settings,e=t.isIndexed,n=t.type;this._buffer=new O.a(this.gl,{id:this.id,target:e?34963:34962,accessor:{type:n}})}return this._buffer}},{key:"byteOffset",get:function(){var t=this.getAccessor();return t.vertexOffset?t.vertexOffset*S(t):0}}]),t}(),L=n(20),C=n(53),I=n(59),R=[],F=[[0,1/0]];function D(t,e){if(t===F)return t;if(e[0]<0&&(e[0]=0),e[0]>=e[1])return t;for(var n=[],r=t.length,i=0,a=0;a<r;a++){var o=t[a];o[1]<e[0]?(n.push(o),i=a+1):o[0]>e[1]?n.push(o):e=[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}return n.splice(i,0,e),n}var N=n(45),B=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i()(this,e),n=f()(this,v()(e).call(this,t,r));var a=r.transition,o=void 0!==a&&a,s=r.noAlloc,u=void 0!==s&&s,c=r.update,l=void 0===c?null:c,h=r.accessor,d=void 0===h?null:h,p=r.transform,g=void 0===p?null:p,b=r.startIndices,y=void 0===b?null:b;return Object.assign(n.settings,{transition:o,noAlloc:u,update:l||d&&n._autoUpdater,accessor:d,transform:g}),Object.assign(n.state,{lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:F,startIndices:y}),Object.seal(n.settings),Object.seal(n.state),n._validateAttributeUpdaters(),n}return y()(e,t),o()(e,[{key:"needsUpdate",value:function(){return this.state.needsUpdate}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.clearChangedFlags,n=void 0!==e&&e,r=this.state.needsRedraw;return this.state.needsRedraw=r&&!n,r}},{key:"getUpdateTriggers",value:function(){var t=this.settings.accessor;return[this.id].concat("function"!=typeof t&&t||[])}},{key:"supportsTransition",value:function(){return Boolean(this.settings.transition)}},{key:"getTransitionSetting",value:function(t){var e=this.settings.accessor,n=this.settings.transition;if(!this.supportsTransition())return null;var r=Array.isArray(e)?t[e.find((function(e){return t[e]}))]:t[e];return Object(N.e)(r,n)}},{key:"setNeedsUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,e=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||t,this.setNeedsRedraw(t),e){var n=e.startRow,r=void 0===n?0:n,i=e.endRow,a=void 0===i?1/0:i;this.state.updateRanges=D(this.state.updateRanges,[r,a])}else this.state.updateRanges=F}},{key:"clearNeedsUpdate",value:function(){this.state.needsUpdate=!1,this.state.updateRanges=R}},{key:"setNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||t}},{key:"update",value:function(t){this.setData(t)}},{key:"allocate",value:function(t){var n=this.state,r=this.settings;return!r.noAlloc&&(!!r.update&&(Object(L.a)(Number.isFinite(t)),g()(v()(e.prototype),"allocate",this).call(this,{numInstances:t,copy:n.updateRanges!==F}),!0))}},{key:"updateBuffer",value:function(t){var n=t.numInstances,r=t.data,i=t.props,a=t.context;if(!this.needsUpdate())return!1;var o=this.state.updateRanges,s=this.settings,u=s.update,c=s.noAlloc,h=!0;if(u){var f=!0,d=!1,p=void 0;try{for(var b,y=o[Symbol.iterator]();!(f=(b=y.next()).done);f=!0){var m=l()(b.value,2),_=m[0],O=m[1];u.call(a,this,{data:r,startRow:_,endRow:O,props:i,numInstances:n})}}catch(t){d=!0,p=t}finally{try{f||null==y.return||y.return()}finally{if(d)throw p}}if(this.value)if(this.constant||this.buffer.byteLength<this.value.byteLength+this.byteOffset)this.setData({value:this.value,constant:this.constant});else{var w=!0,j=!1,k=void 0;try{for(var x,E=o[Symbol.iterator]();!(w=(x=E.next()).done);w=!0){var P=l()(x.value,2),T=(_=P[0],O=P[1],Number.isFinite(_)?this.getVertexOffset(_):0),S=Number.isFinite(O)?this.getVertexOffset(O):c||!Number.isFinite(n)?this.value.length:n*this.size;g()(v()(e.prototype),"updateSubBuffer",this).call(this,{startOffset:T,endOffset:S})}}catch(t){j=!0,k=t}finally{try{w||null==E.return||E.return()}finally{if(j)throw k}}}else;this._checkAttributeArray()}else h=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),h}},{key:"setConstantValue",value:function(t){return void 0!==t&&"function"!=typeof t&&(this.setData({constant:!0,value:t})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0)}},{key:"setExternalBuffer",value:function(t){var e=this.state;return t?(this.clearNeedsUpdate(),e.lastExternalBuffer===t||(e.lastExternalBuffer=t,this.setNeedsRedraw(),this.setData(t),!0)):(e.lastExternalBuffer=null,!1)}},{key:"setBinaryValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.state,r=this.settings;if(!t)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===t)return this.clearNeedsUpdate(),!0;n.binaryValue=t,this.setNeedsRedraw(),ArrayBuffer.isView(t)&&(t={value:t});var i=r.transform||e!==this.startIndices;if(i){Object(L.a)(ArrayBuffer.isView(t.value),"invalid ".concat(r.accessor));var a=t.size&&t.size!==this.size;return n.binaryAccessor=Object(C.b)(t.value,{size:t.size||this.size,stride:t.stride,offset:t.offset,startIndices:e,nested:a}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}},{key:"getVertexOffset",value:function(t){var e=this.startIndices;return(e?e[t]:t)*this.size}},{key:"getShaderAttributes",value:function(){var t=this.settings.shaderAttributes||u()({},this.id,null),n={};for(var r in t)Object.assign(n,g()(v()(e.prototype),"getShaderAttributes",this).call(this,r,t[r]));return n}},{key:"_autoUpdater",value:function(t,e){var n=e.data,r=e.startRow,i=e.endRow,a=e.props,o=e.numInstances,s=t.settings,u=t.state,c=t.value,l=t.size,h=t.startIndices,f=s.accessor,d=s.transform,v=u.binaryAccessor||("function"==typeof f?f:a[f]);Object(L.a)("function"==typeof v,'accessor "'.concat(f,'" is not a function'));var p=t.getVertexOffset(r),g=Object(C.a)(n,r,i),b=g.iterable,y=g.objectInfo,m=!0,_=!1,O=void 0;try{for(var w,j=b[Symbol.iterator]();!(m=(w=j.next()).done);m=!0){var k=w.value;y.index++;var x=v(k,y);if(d&&(x=d.call(this,x)),h){var E=(h[y.index+1]||o)-h[y.index];if(x&&Array.isArray(x[0])){var P=p,T=!0,S=!1,A=void 0;try{for(var M,R=x[Symbol.iterator]();!(T=(M=R.next()).done);T=!0){var F=M.value;t._normalizeValue(F,c,P),P+=l}}catch(t){S=!0,A=t}finally{try{T||null==R.return||R.return()}finally{if(S)throw A}}}else x&&x.length>l?c.set(x,p):(t._normalizeValue(x,y.target,0),Object(I.a)({target:c,source:y.target,start:p,count:E}));p+=E*l}else t._normalizeValue(x,c,p),p+=l}}catch(t){_=!0,O=t}finally{try{m||null==j.return||j.return()}finally{if(_)throw O}}t.constant=!1}},{key:"_validateAttributeUpdaters",value:function(){var t=this.settings;if(!(t.noAlloc||"function"==typeof t.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}},{key:"_checkAttributeArray",value:function(){var t=this.value,e=Math.min(4,this.size);if(t&&t.length>=e){var n=!0;switch(e){case 4:n=n&&Number.isFinite(t[3]);case 3:n=n&&Number.isFinite(t[2]);case 2:n=n&&Number.isFinite(t[1]);case 1:n=n&&Number.isFinite(t[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}},{key:"startIndices",get:function(){return this.state.startIndices},set:function(t){this.state.startIndices=t}}]),e}(M),z=n(33),U=n(197),V=n(63);function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(n,!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var W=function(){function t(e){var n=e.gl,r=e.attribute,a=e.timeline;i()(this,t),this.gl=n,this.type="interpolation",this.transition=new V.a(a),this.attribute=r,this.attributeInTransition=new B(n,r.settings),this.currentStartIndices=r.startIndices,this.currentLength=0,this.transform=function(t,e){var n=Object(N.c)(e.size);return new U.a(t,{vs:X,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(n,r);var o={byteLength:0,usage:35050};this.buffers=[new O.a(n,o),new O.a(n,o)]}return o()(t,[{key:"start",value:function(t,e){if(t.duration<=0)this.transition.cancel();else{var n=this.gl,r=this.buffers,i=this.attribute;Object(N.a)(r);var a={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter},o=!0,s=!1,u=void 0;try{for(var c,l=r[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var h=c.value;Object(N.f)(H({buffer:h},a))}}catch(t){s=!0,u=t}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}this.currentStartIndices=i.startIndices,this.currentLength=Object(N.b)(i,e),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:Object(N.d)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}}},{key:"update",value:function(){var t=this.transition.update();if(t){var e=this.transition,n=e.time,r=e.settings,i=r.duration,a=(0,r.easing)(n/i);this.transform.run({uniforms:{time:a}})}return t}},{key:"cancel",value:function(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete()}},{key:"inProgress",get:function(){return this.transition.inProgress}}]),t}(),X="\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n  vCurrent = mix(aFrom, aTo, time);\n  gl_Position = vec4(0.0);\n}\n";var Z=n(141),Y=n(92),q=n(62);function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(n,!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var J={interpolation:W,spring:function(){function t(e){var n=e.gl,r=e.attribute,a=e.timeline;i()(this,t),this.gl=n,this.type="spring",this.transition=new V.a(a),this.attribute=r,this.attributeInTransition=new B(n,Object.assign({},r.settings,{normalized:!1})),this.currentStartIndices=r.startIndices,this.currentLength=0,this.texture=function(t){return new Y.a(t,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(n),this.framebuffer=function(t,e){return new q.a(t,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:u()({},36064,e)})}(n,this.texture),this.transform=function(t,e,n){var r=Object(N.c)(e.size);return new U.a(t,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n  ATTRIBUTE_TYPE velocity = cur - prev;\n  ATTRIBUTE_TYPE delta = dest - cur;\n  ATTRIBUTE_TYPE spring = delta * stiffness;\n  ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n  return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n  bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n  vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n  vNext = getNextValue(aCur, aPrev, aTo);\n  gl_Position = vec4(0, 0, 0, 1);\n  gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n  if (vIsTransitioningFlag == 0.0) {\n    discard;\n  }\n  gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(n,r,this.framebuffer);var o={byteLength:0,usage:35050};this.buffers=[new O.a(n,o),new O.a(n,o),new O.a(n,o)]}return o()(t,[{key:"start",value:function(t,e){var n=this.gl,r=this.buffers,i=this.attribute,a={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter},o=!0,s=!1,u=void 0;try{for(var c,l=r[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var h=c.value;Object(N.f)(Q({buffer:h},a))}}catch(t){s=!0,u=t}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}this.currentStartIndices=i.startIndices,this.currentLength=Object(N.b)(i,e),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:Object(N.d)(n,i)}})}},{key:"update",value:function(){var t=this.buffers,e=this.transform,n=this.framebuffer,r=this.transition;return!!r.update()&&(e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:r.settings.stiffness,damping:r.settings.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(N.a)(t),this.attributeInTransition.update({buffer:t[1],value:this.attribute.value}),Object(Z.c)(n)[0]>0||r.end(),!0)}},{key:"cancel",value:function(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete();this.texture.delete(),this.texture=null,this.framebuffer.delete(),this.framebuffer=null}},{key:"inProgress",get:function(){return this.transition.inProgress}}]),t}()},$=function(){function t(e,n){var r=n.id,a=n.timeline;i()(this,t),this.id=r,this.gl=e,this.timeline=a,this.transitions={},this.needsRedraw=!1,this.numInstances=1,U.a.isSupported(e)?this.isSupported=!0:e&&E.a.warn("WebGL2 not supported by this browser. Transition animation is disabled.")()}return o()(t,[{key:"finalize",value:function(){for(var t in this.transitions)this._removeTransition(t)}},{key:"update",value:function(t){var e=t.attributes,n=t.transitions,r=void 0===n?{}:n,i=t.numInstances;if(this.numInstances=i||1,this.isSupported){for(var a in e){var o=e[a],s=o.getTransitionSetting(r);s&&this._updateAttribute(a,o,s)}for(var u in this.transitions){var c=e[u];c&&c.getTransitionSetting(r)||this._removeTransition(u)}}}},{key:"hasAttribute",value:function(t){var e=this.transitions[t];return e&&e.inProgress}},{key:"getAttributes",value:function(){var t={};for(var e in this.transitions){var n=this.transitions[e];n.inProgress&&(t[e]=n.attributeInTransition)}return t}},{key:"run",value:function(){if(!this.isSupported||0===this.numInstances)return!1;for(var t in this.transitions){this.transitions[t].update()&&(this.needsRedraw=!0)}var e=this.needsRedraw;return this.needsRedraw=!1,e}},{key:"_removeTransition",value:function(t){this.transitions[t].cancel(),delete this.transitions[t]}},{key:"_updateAttribute",value:function(t,e,n){var r=this.transitions[t],i=!r||r.type!==n.type;if(i){r&&this._removeTransition(t);var a=J[n.type];a?this.transitions[t]=new a({attribute:e,timeline:this.timeline,gl:this.gl}):(E.a.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(n,this.numInstances))}}]),t}();n.d(e,"a",(function(){return tt}));var tt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.id,a=void 0===r?"attribute-manager":r,o=n.stats,s=n.timeline;i()(this,t),this.id=a,this.gl=e,this.attributes={},this.updateTriggers={},this.accessors={},this.needsRedraw=!0,this.userData={},this.stats=o,this.attributeTransitionManager=new $(e,{id:"".concat(a,"-transitions"),timeline:s}),Object.seal(this)}return o()(t,[{key:"finalize",value:function(){for(var t in this.attributes)this.attributes[t].delete();this.attributeTransitionManager.finalize()}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!t.clearRedrawFlags,e&&this.id}},{key:"setNeedsRedraw",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.needsRedraw=!0,this}},{key:"add",value:function(t,e){this._add(t,e)}},{key:"addInstanced",value:function(t,e){this._add(t,e,{instanced:1})}},{key:"remove",value:function(t){for(var e=0;e<t.length;e++){var n=t[e];void 0!==this.attributes[n]&&(this.attributes[n].delete(),delete this.attributes[n])}}},{key:"invalidate",value:function(t,e){var n=this._invalidateTrigger(t,e);Object(z.a)("attributeManager.invalidate",this,t,n)}},{key:"invalidateAll",value:function(t){for(var e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);Object(z.a)("attributeManager.invalidate",this,"all")}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.data,n=t.numInstances,r=t.startIndices,i=void 0===r?null:r,a=t.transitions,o=t.props,s=void 0===o?{}:o,u=t.buffers,c=void 0===u?{}:u,l=t.context,h=void 0===l?{}:l,f=!1;for(var d in Object(z.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart(),this.attributes){var v=this.attributes[d],p=v.settings.accessor;v.startIndices=i,s[d]&&E.a.removed("props.".concat(d),"data.attributes.".concat(d))(),v.setExternalBuffer(c[d])||v.setBinaryValue(c[p],e.startIndices)||!c[p]&&v.setConstantValue(s[p])||v.needsUpdate()&&(f=!0,this._updateAttribute({attribute:v,numInstances:n,data:e,props:s,context:h})),this.needsRedraw|=v.needsRedraw()}f&&Object(z.a)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:a})}},{key:"updateTransition",value:function(){var t=this.attributeTransitionManager.run();return this.needsRedraw=this.needsRedraw||t,t}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getChangedAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1},e=this.attributes,n=this.attributeTransitionManager,r=Object.assign({},n.getAttributes());for(var i in e){var a=e[i];a.needsRedraw(t)&&!n.hasAttribute(i)&&(r[i]=a)}return r}},{key:"getShaderAttributes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t||(t=this.getAttributes());var n={};for(var r in t)e[r]||Object.assign(n,t[r].getShaderAttributes());return n}},{key:"getAccessors",value:function(){return this.updateTriggers}},{key:"_add",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e&&E.a.warn("AttributeManager.add({updaters}) - updater map no longer supported")();var r={};for(var i in t){var a=t[i],o=this._createAttribute(i,a,n);r[i]=o}Object.assign(this.attributes,r),this._mapUpdateTriggersToAttributes()}},{key:"_createAttribute",value:function(t,e,n){var r={id:t,constant:e.constant||!1,isIndexed:e.isIndexed||e.elements,size:e.elements?1:e.size,value:e.value||null,divisor:e.instanced||n.instanced?1:e.divisor};return new B(this.gl,Object.assign({},e,r))}},{key:"_mapUpdateTriggersToAttributes",value:function(){var t=this,e={},n=function(n){t.attributes[n].getUpdateTriggers().forEach((function(t){e[t]||(e[t]=[]),e[t].push(n)}))};for(var r in this.attributes)n(r);this.updateTriggers=e}},{key:"_invalidateTrigger",value:function(t,e){var n=this.attributes,r=this.updateTriggers[t];return r&&r.forEach((function(t){var r=n[t];r&&r.setNeedsUpdate(r.id,e)})),r}},{key:"_updateAttribute",value:function(t){var e=t.attribute,n=t.numInstances;Object(z.a)("attribute.updateStart",e),e.allocate(n)&&Object(z.a)("attribute.allocate",e,n),e.updateBuffer(t)&&(this.needsRedraw=!0,Object(z.a)("attribute.updateEnd",e,n))}}]),t}()},function(t,e,n){"use strict";var r=n(6),i=n.n(r),a=n(15),o=n(84),s="2.0.2";function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;Object(o.a)(t,"no loader provided");var n=t.version;e&&n&&(e=c(e),n=c(n))}function c(t){var e=t.split(".").map(Number);return{major:e[0],minor:e[1]}}var l=n(46),h=n(64),f=n(65),d=n(66),v=n(112),p=n(98),g=n(126),b="2.0.2";function y(t,e,n,r){if(!p.a.isSupported())return!1;var i=n&&n[t.id];return!!("local"===n.worker&&i&&i.localWorkerUrl||n.worker&&i&&i.workerUrl)&&(!t.useWorker||t.useWorker(n))}function m(t,e,n,r){var i=(n||{}).worker,a=n&&n[t.id]||{},o="local"===i?a.localWorkerUrl:a.workerUrl,s="url(".concat(o,")"),u=t.name,c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};t.maxConcurrency&&(e.maxConcurrency=t.maxConcurrency);t.onDebug&&(e.onDebug=t.onDebug);_||(_=new p.a({onMessage:O}));return _.setProps(e),_}(n);n=JSON.parse(JSON.stringify(n));var l=t.version!==b?"(core version ".concat(b,")"):"";return c.process(s,"loaders.gl@".concat(t.version).concat(l,":").concat(u),{arraybuffer:Object(v.a)(e),options:n,source:"loaders.gl@".concat(b),type:"parse"})}var _=null;function O(t){return w.apply(this,arguments)}function w(){return(w=Object(a.a)(i.a.mark((function t(e){var n,r,a,o,s;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.worker,r=e.data,a=e.resolve,o=e.reject,t.t0=r.type,t.next="done"===t.t0?4:"parse"===t.t0?6:"error"===t.t0?17:19;break;case 4:return a(r.result),t.abrupt("break",19);case 6:return t.prev=6,t.next=9,k(r.arraybuffer,r.options,r.url);case 9:s=t.sent,n.postMessage({type:"parse-done",id:r.id,result:s},Object(g.a)(s)),t.next=16;break;case 13:t.prev=13,t.t1=t.catch(6),n.postMessage({type:"parse-error",id:r.id,message:t.t1.message});case 16:return t.abrupt("break",19);case 17:return o(r.message),t.abrupt("break",19);case 19:case"end":return t.stop()}}),t,null,[[6,13]])})))).apply(this,arguments)}var j=n(60);function k(t,e,n,r){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function t(e,n,r,a){var o,s,u,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||Array.isArray(n)||Object(l.a)(n)||(a=r,r=n,n=null),o="","string"==typeof a&&(o=a,a=null),r=r||{},s=Object(f.e)(e,o),u=Object(d.b)(n,a),c=Object(j.a)(u,s,e)){t.next=9;break}return t.abrupt("return",null);case 9:return r=Object(h.a)(c,r,s),a=Object(d.a)({url:s,parse:k,loaders:u},r,a),t.next=13,E(c,e,r,a);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(t,e,n,r){return P.apply(this,arguments)}function P(){return(P=Object(a.a)(i.a.mark((function t(e,n,r,a){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(e),t.next=3,Object(f.a)(n,e);case 3:if(n=t.sent,!e.parseTextSync||"string"!=typeof n){t.next=7;break}return r.dataType="text",t.abrupt("return",e.parseTextSync(n,r,a,e));case 7:if(!y(e,0,r)){t.next=11;break}return t.next=10,m(e,n,r);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parse){t.next=15;break}return t.next=14,e.parse(n,r,a,e);case 14:return t.abrupt("return",t.sent);case 15:return Object(o.a)(!e.parseSync),t.abrupt("return",Object(o.a)(!1));case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}n.d(e,"a",(function(){return k}))},function(t,e,n){"use strict";var r=n(6),i=n.n(r),a=n(15),o=n(1),s=n(3),u=n(84),c=new Map;var l=n(126);n.d(e,"a",(function(){return d}));var h=0;function f(t){var e=t.data;(0,t.resolve)(e)}var d=function(){function t(e){var n=e.source,r=e.name,i=void 0===r?"web-worker-".concat(h++):r,a=e.onMessage;Object(o.a)(this,t);var s=function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],Object(u.a)("string"==typeof t,"worker source"),t.startsWith("url(")&&t.endsWith(")")){var e=t.match(/^url\((.*)\)$/)[1];if(e&&!e.startsWith("http"))return e;t=function(t){return"try {\n  importScripts('".concat(t,"');\n} catch (error) {\n  console.error(error);\n}")}(e)}var n=c.get(t);if(!n){var r=new Blob([t],{type:"application/javascript"});n=URL.createObjectURL(r),c.set(t,n)}return n}(n,i);this.worker=new Worker(s,{name:i}),this.name=i,this.onMessage=a||f}var e;return Object(s.a)(t,[{key:"process",value:(e=Object(a.a)(i.a.mark((function t(e){var n=this;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){n.worker.onmessage=function(e){return n.onMessage({worker:n.worker,data:e.data,resolve:t,reject:r})},n.worker.onerror=function(t){var e="".concat(n.name,": WorkerThread.process() failed");t.message&&(e+=" ".concat(t.message," ").concat(t.filename,":").concat(t.lineno,":").concat(t.colno));var i=new Error(e);console.error(t),r(i)};var i=Object(l.a)(e);n.worker.postMessage(e,i)})));case 1:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){this.worker.terminate(),this.worker=null}}]),t}()},function(t,e,n){"use strict";var r=n(157),i={name:"geometry",vs:"\nstruct VertexGeometry {\n  vec4 position;\n  vec3 worldPosition;\n  vec3 worldPositionAlt;\n  vec3 normal;\n  vec2 uv;\n  vec3 pickingColor;\n} geometry;\n",fs:"\n#define SMOOTH_EDGE_RADIUS 0.5\n\nstruct FragmentGeometry {\n  vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n  return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n"},a=n(81);n.d(e,"a",(function(){return u}));var o=[i,a.a],s=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function u(t){var e=r.a.getDefaultProgramManager(t),n=!0,i=!1,a=void 0;try{for(var u,c=o[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=u.value;e.addDefaultModule(l)}}catch(t){i=!0,a=t}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}var h=!0,f=!1,d=void 0;try{for(var v,p=s[Symbol.iterator]();!(h=(v=p.next()).done);h=!0){var g=v.value;e.addShaderHook(g)}}catch(t){f=!0,d=t}finally{try{h||null==p.return||p.return()}finally{if(f)throw d}}return e}},function(t,e,n){"use strict";var r=n(22),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(33),l=n(10),h=n.n(l),f=n(7),d=n.n(f),v=n(11),p=n.n(v),g=function(t){function e(){return o()(this,e),h()(this,d()(e).apply(this,arguments))}return p()(e,t),e}(n(74).a),b=n(127),y=n(62);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}n.d(e,"a",(function(){return _}));var _=function(){function t(e){o()(this,t),this.gl=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new g(e),this.pickLayersPass=new b.a(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}return u()(t,[{key:"setProps",value:function(t){"layerFilter"in t&&this.layerFilter!==t.layerFilter&&(this.layerFilter=t.layerFilter,this._needsRedraw="layerFilter changed"),"drawPickingColors"in t&&this.drawPickingColors!==t.drawPickingColors&&(this.drawPickingColors=t.drawPickingColors,this._needsRedraw="drawPickingColors changed")}},{key:"renderLayers",value:function(t){var e=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass;t.layerFilter=this.layerFilter,t.effects=t.effects||[],t.target=t.target||y.a.getDefaultFramebuffer(this.gl),this._preRender(t.effects,t);var n=this.lastPostProcessEffect?this.renderBuffers[0]:t.target,r=e.render(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(n,!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{target:n}));this._postRender(t.effects,t),this.renderCount++,Object(c.a)("deckRenderer.renderLayers",this,r,t)}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"finalize",value:function(){var t=this.renderBuffers,e=!0,n=!1,r=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.delete()}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}t.length=0}},{key:"_preRender",value:function(t,e){var n=null,r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;u.preRender(this.gl,e),u.postRender&&(n=u)}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}n&&this._resizeRenderBuffers(),this.lastPostProcessEffect=n}},{key:"_resizeRenderBuffers",value:function(){var t=this.renderBuffers;0===t.length&&t.push(new y.a(this.gl),new y.a(this.gl));var e=!0,n=!1,r=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.resize()}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"_postRender",value:function(t,e){var n=this.renderBuffers,r={inputBuffer:n[0],swapBuffer:n[1],target:null},i=!0,a=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(c.postRender){if(c===this.lastPostProcessEffect){r.target=e.target,c.postRender(this.gl,r);break}var l=c.postRender(this.gl,r);r.inputBuffer=l,r.swapBuffer=l===n[0]?n[1]:n[0]}}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(24),i=n(121);function a(){return!("object"===("undefined"==typeof process?"undefined":Object(r.a)(process))&&"[object process]"===String(process)&&!process.browser)||Object(i.a)()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(24);function i(t){if("undefined"!=typeof window&&"object"===Object(r.a)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"===Object(r.a)(process.versions)&&Boolean(process.versions.electron))return!0;var e="object"===("undefined"==typeof navigator?"undefined":Object(r.a)(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=t||e;return!!(n&&n.indexOf("Electron")>=0)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i()(this,t);var r=n.id,a=void 0===r?"pass":r;this.id=a,this.gl=e,this.props={},Object.assign(this.props,n)}return o()(t,[{key:"setProps",value:function(t){Object.assign(this.props,t)}},{key:"render",value:function(){}},{key:"cleanup",value:function(){}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(2),i=n.n(r),a=n(4),o=n.n(a),s=n(8),u=n(20),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),Array.isArray(e)&&(e={compare:e,extract:e,required:e});var n=e,r=n.compare,a=n.extract,o=n.required;this._propsToCompare=r,this._propsToExtract=a,this._requiredProps=o}return o()(t,[{key:"arePropsEqual",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=(this._propsToCompare||Object.keys(e))[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var u=a.value;if(!(u in t&&u in e&&Object(s.g)(t[u],e[u])))return!1}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return!0}},{key:"initializeProps",value:function(t,e){var n;if(this._propsToExtract){var r={},i={},a=!0,o=!1,s=void 0;try{for(var u,c=this._propsToExtract[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var l=u.value;r[l]=t[l],i[l]=e[l]}}catch(t){o=!0,s=t}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}n={start:r,end:i}}else n={start:t,end:e};return this._checkRequiredProps(n.start),this._checkRequiredProps(n.end),n}},{key:"interpolateProps",value:function(t,e,n){return e}},{key:"getDuration",value:function(t,e){return e.transitionDuration}},{key:"_checkRequiredProps",value:function(t){this._requiredProps&&this._requiredProps.forEach((function(e){var n=t[e];Object(u.a)(Number.isFinite(n)||Array.isArray(n),"".concat(e," is required for transition"))}))}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(6),i=n.n(r),a=n(15),o=n(1),s=n(3),u=n(84),c=function(){function t(e){Object(o.a)(this,t),this._fileOrBlob=e,this.bodyUsed=!1}var e,n,r;return Object(s.a)(t,[{key:"arrayBuffer",value:(r=Object(a.a)(i.a.mark((function t(){var e,n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this._getFileReader(),n=e.reader,r=e.promise,n.readAsArrayBuffer(this._fileOrBlob),t.abrupt("return",r);case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"text",value:(n=Object(a.a)(i.a.mark((function t(){var e,n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this._getFileReader(),n=e.reader,r=e.promise,n.readAsText(this._fileOrBlob),t.abrupt("return",r);case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"json",value:(e=Object(a.a)(i.a.mark((function t(){var e;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.text();case 2:return e=t.sent,t.abrupt("return",JSON.parse(e));case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"_getFileReader",value:function(){var t;Object(u.a)(!this.bodyUsed),this.bodyUsed=!0;var e=new Promise((function(e,n){try{(t=new FileReader).onerror=function(t){return n(new Error(t))},t.onabort=function(){return n(new Error("Read aborted."))},t.onload=function(){return e(t.result)}}catch(t){n(t)}}));return{reader:t,promise:e}}},{key:"headers",get:function(){return new Headers({"Content-Length":this._fileOrBlob.size,"Content-Type":this._fileOrBlob.type})}},{key:"ok",get:function(){return!0}},{key:"status",get:function(){return 200}},{key:"url",get:function(){return this._fileOrBlob.name||""}}]),t}();function l(t,e){return Promise.resolve(new c(t,e))}},function(t,e,n){"use strict";function r(t){this.wrapped=t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(24);function i(t){return!!t&&(t instanceof ArrayBuffer||t.buffer instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}function a(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t){if(i(t))n.push(t);else if(i(t.buffer))n.push(t.buffer);else if(e&&"object"===Object(r.a)(t))for(var o in t)a(t[o],e,n)}else;return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(22),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(10),l=n.n(c),h=n(7),f=n.n(h),d=n(47),v=n.n(d),p=n(11),g=n.n(p),b=n(74),y=n(5);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(n,!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var O={blendFunc:[1,0,32771,0],blendEquation:32774},w=function(t){function e(){return o()(this,e),l()(this,f()(e).apply(this,arguments))}return g()(e,t),u()(e,[{key:"render",value:function(t){t.pickingFBO?this._drawPickingBuffer(t):v()(f()(e.prototype),"render",this).call(this,t)}},{key:"_drawPickingBuffer",value:function(t){var n=this,r=t.layers,i=t.layerFilter,a=t.viewports,o=t.onViewportActive,s=t.pickingFBO,u=t.deviceRect,c=u.x,l=u.y,h=u.width,d=u.height,p=t.pass,g=void 0===p?"picking":p,b=t.redrawReason,m=t.pickZ,w=this.gl;return this.pickZ=m,Object(y.l)(w,_({scissorTest:!0,scissor:[c,l,h,d],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0]},O,{blend:!m}),(function(){v()(f()(e.prototype),"render",n).call(n,{target:s,layers:r,layerFilter:i,viewports:a,onViewportActive:o,pass:g,redrawReason:b})}))}},{key:"shouldDrawLayer",value:function(t){return t.props.pickable}},{key:"getModuleParameters",value:function(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}},{key:"getLayerParameters",value:function(t,e){var n=this.pickZ?{blend:!1}:_({},O,{blend:!0,blendColor:[0,0,0,(e+1)/255]});return Object.assign({},t.props.parameters,n)}}]),e}(b.a)},function(t,e,n){"use strict";var r=n(0),i=n(1),a=n(3),o=n(5),s=n(157),u=n(94),c=n(21),l=n(130),h=n(196),f=n(54),d=n(36),v=n(13),p=n(28),g=n(9),b=n(93),y=n(14),m=n(39),_=null;function O(t,e){var n;return new t((n=t.BYTES_PER_ELEMENT*e,(!_||_.byteLength<n)&&(_=new ArrayBuffer(n)),_),0,e)}var w=n(51),j=n(120),k=n(121);function x(t){if(!t&&!Object(j.a)())return"Node";if(Object(k.a)(t))return"Electron";var e="undefined"!=typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";var r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i?"IE":w.b.chrome?"Chrome":w.b.safari?"Safari":w.b.mozInnerScreenX?"Firefox":"Unknown"}var E="elements must be GL.ELEMENT_ARRAY_BUFFER",P=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e);var a=r.id||r.program&&r.program.id;return(n=Object(v.a)(this,Object(g.a)(e).call(this,t,Object.assign({},r,{id:a})))).hasVertexArrays=e.isSupported(t),n.buffer=null,n.bufferValue=null,n.initialize(r),Object.seal(Object(p.a)(n)),n}return Object(y.a)(e,t),Object(a.a)(e,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.constantAttributeZero?Object(o.g)(t)||"Chrome"===x():Object(o.g)(t)||t.getExtension("OES_vertex_array_object")}},{key:"getDefaultArray",value:function(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new e(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}},{key:"getMaxAttributes",value:function(t){return e.MAX_ATTRIBUTES=e.MAX_ATTRIBUTES||t.getParameter(34921),e.MAX_ATTRIBUTES}},{key:"setConstant",value:function(t,n,r){switch(r.constructor){case Float32Array:e._setConstantFloatArray(t,n,r);break;case Int32Array:e._setConstantIntArray(t,n,r);break;case Uint32Array:e._setConstantUintArray(t,n,r);break;default:Object(c.a)(!1)}}}]),Object(a.a)(e,[{key:"delete",value:function(){Object(b.a)(Object(g.a)(e.prototype),"delete",this).call(this),this.buffer&&this.buffer.delete()}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(t)}},{key:"setProps",value:function(t){return this}},{key:"setElementBuffer",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(c.a)(!e||34963===e.target,E),this.bind((function(){t.gl.bindBuffer(34963,e?e.handle:null)})),this}},{key:"setBuffer",value:function(t,e,n){if(34963===e.target)return this.setElementBuffer(e,n);var r=n.size,i=n.type,a=n.stride,s=n.offset,u=n.normalized,l=n.integer,h=n.divisor,f=this.gl;return t=Number(t),this.bind((function(){f.bindBuffer(34962,e.handle),l?(Object(c.a)(Object(o.g)(f)),f.vertexAttribIPointer(t,r,i,a,s)):f.vertexAttribPointer(t,r,i,u,a,s),f.enableVertexAttribArray(t),f.vertexAttribDivisor(t,h||0)})),this}},{key:"enable",value:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!r&&0===t&&!e.isSupported(this.gl,{constantAttributeZero:!0});return i||(t=Number(t),this.bind((function(){return r?n.gl.enableVertexAttribArray(t):n.gl.disableVertexAttribArray(t)}))),this}},{key:"getConstantBuffer",value:function(t,e,n){var r=this._normalizeConstantArrayValue(e,n),i=r.byteLength*t,a=r.length*t,o=!this.buffer;if(this.buffer=this.buffer||new d.a(this.gl,i),o=(o=o||this.buffer.reallocate(i))||!this._compareConstantArrayValues(r,this.bufferValue)){var s=O(e.constructor,a);!function(t){for(var e=t.target,n=t.source,r=t.start,i=void 0===r?0:r,a=t.count,o=void 0===a?1:a,s=n.length,u=o*s,c=0,l=i;c<s;c++)e[l++]=n[c];for(;c<u;)c<u-c?(e.copyWithin(i+c,i,i+c),c*=2):(e.copyWithin(i+c,i,i+u-c),c=u)}({target:s,source:r,start:0,count:a}),this.buffer.subData(s),this.bufferValue=e}return this.buffer}},{key:"_normalizeConstantArrayValue",value:function(t,e){return Array.isArray(t)?new Float32Array(t):t}},{key:"_compareConstantArrayValues",value:function(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(var n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}},{key:"_createHandle",value:function(){return this.hasVertexArrays=e.isSupported(this.gl),this.hasVertexArrays?this.gl.createVertexArray():null}},{key:"_deleteHandle",value:function(t){return this.hasVertexArrays&&this.gl.deleteVertexArray(t),[this.elements]}},{key:"_bindHandle",value:function(t){this.hasVertexArrays&&this.gl.bindVertexArray(t)}},{key:"_getParameter",value:function(t,e){var n=this,r=e.location;return Object(c.a)(Number.isFinite(r)),this.bind((function(){switch(t){case 34373:return n.gl.getVertexAttribOffset(r,t);default:return n.gl.getVertexAttrib(r,t)}}))}},{key:"MAX_ATTRIBUTES",get:function(){return e.getMaxAttributes(this.gl)}}],[{key:"_setConstantFloatArray",value:function(t,e,n){switch(n.length){case 1:t.vertexAttrib1fv(e,n);break;case 2:t.vertexAttrib2fv(e,n);break;case 3:t.vertexAttrib3fv(e,n);break;case 4:t.vertexAttrib4fv(e,n);break;default:Object(c.a)(!1)}}},{key:"_setConstantIntArray",value:function(t,e,n){switch(Object(c.a)(Object(o.g)(t)),n.length){case 1:t.vertexAttribI1iv(e,n);break;case 2:t.vertexAttribI2iv(e,n);break;case 3:t.vertexAttribI3iv(e,n);break;case 4:t.vertexAttribI4iv(e,n);break;default:Object(c.a)(!1)}}},{key:"_setConstantUintArray",value:function(t,e,n){switch(Object(c.a)(Object(o.g)(t)),n.length){case 1:t.vertexAttribI1uiv(e,n);break;case 2:t.vertexAttribI2uiv(e,n);break;case 3:t.vertexAttribI3uiv(e,n);break;case 4:t.vertexAttribI4uiv(e,n);break;default:Object(c.a)(!1)}}}]),e}(m.a),T=n(186),S=/^(.+)__LOCATION_([0-9]+)$/,A=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"],M=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,t);var r=n.id||n.program&&n.program.id;this.id=r,this.gl=e,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={},this.vertexArrayObject=P.isSupported(e)?new P(e):P.getDefaultArray(e),Object(T.a)(this,"VertexArray","v6.0",A),this.initialize(n),Object.seal(this)}return Object(a.a)(t,[{key:"delete",value:function(){this.buffer&&this.buffer.delete()}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(t)}},{key:"reset",value:function(){this.elements=null,this.elementsAccessor=null;var t=this.vertexArrayObject.MAX_ATTRIBUTES;return this.values=new Array(t).fill(null),this.accessors=new Array(t).fill(null),this.unused={},this.drawParams=null,this}},{key:"setProps",value:function(t){return"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"attributes"in t&&this.setAttributes(t.attributes),"elements"in t&&this.setElementBuffer(t.elements),"bindOnUse"in t&&(t=t.bindOnUse),this}},{key:"clearDrawParams",value:function(){this.drawParams=null}},{key:"getDrawParams",value:function(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}},{key:"setAttributes",value:function(t){var e=this;return Object.assign(this.attributes,t),this.vertexArrayObject.bind((function(){for(var n in t){var r=t[n];e._setAttribute(n,r)}e.gl.bindBuffer(34962,null)})),this}},{key:"setElementBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.isDefaultArray||this.vertexArrayObject.setElementBuffer(t,e),this}},{key:"setBuffer",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===e.target)return this.setElementBuffer(e,n);var r=this._resolveLocationAndAccessor(t,e,e.accessor,n),i=r.location,a=r.accessor;return i>=0&&(this.values[i]=e,this.accessors[i]=a,this.clearDrawParams(),this.vertexArrayObject.isDefaultArray||this.vertexArrayObject.setBuffer(i,e,a)),this}},{key:"setConstant",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._resolveLocationAndAccessor(t,e,Object.assign({size:e.length},n)),i=r.location,a=r.accessor;return i>=0&&(e=this.vertexArrayObject._normalizeConstantArrayValue(e,a),this.values[i]=e,this.accessors[i]=a,this.clearDrawParams(),this.vertexArrayObject.isDefaultArray||this.vertexArrayObject.enable(i,!1)),this}},{key:"unbindBuffers",value:function(){var t=this;return this.vertexArrayObject.bind((function(){t.elements&&(t.vertexArrayObject.isDefaultArray||t.vertexArrayObject.setElementBuffer(null)),t.buffer=t.buffer||new d.a(t.gl,{accessor:{size:4}});for(var e=0;e<t.vertexArrayObject.MAX_ATTRIBUTES;e++)t.values[e]instanceof d.a&&(t.gl.disableVertexAttribArray(e),t.gl.bindBuffer(34962,t.buffer.handle),t.gl.vertexAttribPointer(e,1,5126,!1,0,0))})),this}},{key:"bindBuffers",value:function(){var t=this;return this.vertexArrayObject.bind((function(){t.elements&&t.setElementBuffer(t.elements);for(var e=0;e<t.vertexArrayObject.MAX_ATTRIBUTES;e++){var n=t.values[e];n instanceof d.a&&t.setBuffer(e,n)}})),this}},{key:"bindForDraw",value:function(t,e,n){var r,i=this;return this.vertexArrayObject.bind((function(){i._setConstantAttributes(t,e),i.vertexArrayObject.hasVertexArrays||i.bindBuffers(),r=n(),i.vertexArrayObject.hasVertexArrays||i.unbindBuffers()})),r}},{key:"_resolveLocationAndAccessor",value:function(t,e,n,r){var i=this,a=this._getAttributeIndex(t),s=a.location,u=a.name;if(!Number.isFinite(s)||s<0)return this.unused[t]=e,o.h.once(3,(function(){return"unused value ".concat(t," in ").concat(i.id)}))(),this;var l=this._getAttributeInfo(u||s);if(!l)return{location:-1,accessor:null};var h=this.accessors[s]||{},d=f.a.resolve(l.accessor,h,n,r),v=d.size,p=d.type;return Object(c.a)(Number.isFinite(v)&&Number.isFinite(p)),{location:s,accessor:d}}},{key:"_getAttributeInfo",value:function(t){return this.configuration&&this.configuration.getAttributeInfo(t)}},{key:"_getAttributeIndex",value:function(t){var e=Number(t);if(Number.isFinite(e))return{location:e};var n=S.exec(t),r=n?n[1]:t,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}},{key:"_setAttribute",value:function(t,e){if(e instanceof d.a)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof d.a){var n=e[0],r=e[1];this.setBuffer(t,n,r)}else if(ArrayBuffer.isView(e)||Array.isArray(e)){var i=e;this.setConstant(t,i)}else{if(!(e.buffer instanceof d.a))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");var a=e;this.setBuffer(t,a.buffer,a)}}},{key:"_setConstantAttributes",value:function(t,e){var n=Math.max(0|t,0|e),r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(var i=1;i<this.vertexArrayObject.MAX_ATTRIBUTES;i++)r=this.values[i],ArrayBuffer.isView(r)&&this._setConstantAttribute(i,r)}},{key:"_setConstantAttributeZero",value:function(t,e){if(P.isSupported(this.gl,{constantAttributeZero:!0}))this._setConstantAttribute(0,t);else{var n=this.vertexArrayObject.getConstantBuffer(e,t);this.vertexArrayObject.setBuffer(0,n,this.accessors[0])}}},{key:"_setConstantAttribute",value:function(t,e){P.setConstant(this.gl,t,e),this.vertexArrayObject.isDefaultArray&&this.vertexArrayObject.enable(t,!1)}},{key:"_updateDrawParams",value:function(){for(var t={isIndexed:!1,isInstanced:!1,indexCount:1/0,vertexCount:1/0,instanceCount:1/0},e=0;e<this.vertexArrayObject.MAX_ATTRIBUTES;e++)this._updateDrawParamsForLocation(t,e);return this.elements&&(t.elementCount=this.elements.getElementCount(this.elements.accessor),t.isIndexed=!0,t.indexType=this.elementsAccessor.type||this.elements.accessor.type,t.indexOffset=this.elementsAccessor.offset||0),t.indexCount===1/0&&(t.indexCount=0),t.vertexCount===1/0&&(t.vertexCount=0),t.instanceCount===1/0&&(t.instanceCount=0),t}},{key:"_updateDrawParamsForLocation",value:function(t,e){var n=this.values[e],r=this.accessors[e];if(n){var i=r.divisor>0;if(t.isInstanced=t.isInstanced||i,n instanceof d.a){var a=n;if(i){var o=a.getVertexCount(r);t.instanceCount=Math.min(t.instanceCount,o)}else{var s=a.getVertexCount(r);t.vertexCount=Math.min(t.vertexCount,s)}}}}},{key:"setElements",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.h.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}]),t}(),L=n(195),C=n(78),I=n(69);function R(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.isInteger,r=void 0!==n&&n;if(Array.isArray(t)||ArrayBuffer.isView(t))return function(t,e){for(var n=e.maxElts,r=void 0===n?16:n,i=e.size,a=void 0===i?1:i,o="[",s=0;s<t.length&&s<r;++s)s>0&&(o+=",".concat(s%a==0?" ":"")),o+=R(t[s],e);var u=t.length>r?"...":"]";return"".concat(o).concat(u)}(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)<1e-16)return r?"0":"0.";if(r)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);var i=t.toPrecision(2);return i.indexOf(".0")===i.length-2?i.slice(0,-1):i}function F(t,e,n,i){var a,o,s=t.gl;if(!e)return o={},Object(r.a)(o,i,"null"),Object(r.a)(o,"Format ","N/A"),o;var u,c,l,h="NOT PROVIDED",f="N/A",v="N/A",p="N/A";if(n&&(h=n.type,f=n.size,u=-1!==(h=String(h).replace("Array","")).indexOf("nt")),e instanceof d.a){var g,b,y=e,m=y.getDebugData(),_=m.data;if(c=m.modified?"*":"",l=_,v=(p=y.byteLength)/_.BYTES_PER_ELEMENT/f,n){var O=n.divisor>0;b="".concat(O?"I ":"P "," ").concat(v," (x").concat(f,"=").concat(p," bytes ").concat(Object(C.a)(s,h),")")}else u=!0,b="".concat(p," bytes");return g={},Object(r.a)(g,i,"".concat(c).concat(R(l,{size:f,isInteger:u}))),Object(r.a)(g,"Format ",b),g}return l=e,f=e.length,u=-1!==(h=String(e.constructor.name).replace("Array","")).indexOf("nt"),a={},Object(r.a)(a,i,"".concat(R(l,{size:f,isInteger:u})," (constant)")),Object(r.a)(a,"Format ","".concat(f,"x").concat(h," (constant)")),a}function D(t,e){var n=e.type,r=e.size,i=Object(I.b)(n,r);return i?"".concat(t," (").concat(i.name,")"):t}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.header,n=void 0===e?"Uniforms":e,i=t.program,a=t.uniforms,o=t.undefinedOnly,s=void 0!==o&&o;Object(c.a)(i);var u=i._uniformSetters,l={},h=Object.keys(u).sort(),f=0,d=!0,v=!1,p=void 0;try{for(var g,b=h[Symbol.iterator]();!(d=(g=b.next()).done);d=!0){var y=g.value;y.match(".*_.*")||y.match(".*Matrix")||B({table:l,header:n,uniforms:a,uniformName:y,undefinedOnly:s})&&f++}}catch(t){v=!0,p=t}finally{try{d||null==b.return||b.return()}finally{if(v)throw p}}var m=!0,_=!1,O=void 0;try{for(var w,j=h[Symbol.iterator]();!(m=(w=j.next()).done);m=!0){var k=w.value;k.match(".*Matrix")&&B({table:l,header:n,uniforms:a,uniformName:k,undefinedOnly:s})&&f++}}catch(t){_=!0,O=t}finally{try{m||null==j.return||j.return()}finally{if(_)throw O}}var x=!0,E=!1,P=void 0;try{for(var T,S=h[Symbol.iterator]();!(x=(T=S.next()).done);x=!0){var A=T.value;l[A]||B({table:l,header:n,uniforms:a,uniformName:A,undefinedOnly:s})&&f++}}catch(t){E=!0,P=t}finally{try{x||null==S.return||S.return()}finally{if(E)throw P}}var M=0,L={};if(!s)for(var C in a){var I=a[C];l[C]||(M++,L[C]=Object(r.a)({Type:"NOT USED: ".concat(I)},n,R(I)))}return{table:l,count:f,unusedTable:L,unusedCount:M}}function B(t){var e,n=t.table,i=t.header,a=t.uniforms,o=t.uniformName,s=t.undefinedOnly,u=a[o],c=function(t){return null!=t}(u);return(!s||!c)&&(n[o]=(e={},Object(r.a)(e,i,c?R(u):"N/A"),Object(r.a)(e,"Uniform Type",c?u:"NOT PROVIDED"),e),!0)}function z(t){var e=t.accessor,n=e.type,r=e.size,i=Object(I.b)(n,r);return i?"".concat(i.name," ").concat(t.name):t.name}var U=n(32),V={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function G(t,e){var n=(e||{}).attributeMap,r=void 0===n?V:n;return r&&r[t]||t}function H(t,e){var n;switch(t){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":e.size=e.size||3;break;case"uvs":e.size=e.size||2}Object(c.a)(Number.isFinite(e.size),"attribute ".concat(t," needs size"))}n.d(e,"a",(function(){return Z}));var W=function(){},X={},Z=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,t);var r=n.id,a=void 0===r?Object(u.c)("model"):r;Object(c.a)(Object(o.f)(e)),this.id=a,this.gl=e,this.id=n.id||Object(u.c)("Model"),this.debug=n.debug||!1,this.lastLogTime=0,this.initialize(n)}return Object(a.a)(t,[{key:"initialize",value:function(t){this.props={},this.programManager=t.programManager||s.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;var e=t.program,n=void 0===e?null:e,r=t.vs,i=t.fs,a=t.modules,o=t.defines,u=t.inject,l=t.varyings,h=t.bufferMode;this.programProps={program:n,vs:r,fs:i,modules:a,defines:o,inject:u,varyings:l,bufferMode:h},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(t.moduleSettings))),this.drawMode=void 0!==t.drawMode?t.drawMode:4,this.vertexCount=t.vertexCount||0,this.geometryBuffers={},this.isInstanced=t.isInstanced||t.instanced||t.instanceCount>0,this._setModelProps(t),this.geometry={},Object(c.a)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}},{key:"setProps",value:function(t){this._setModelProps(t)}},{key:"delete",value:function(){for(var t in this._attributes)this._attributes[t]!==this.attributes[t]&&this._attributes[t].delete();this._managedProgram&&this.programManager.release(this.program),this.vertexArray.delete(),this._deleteGeometryBuffers()}},{key:"getDrawMode",value:function(){return this.drawMode}},{key:"getVertexCount",value:function(){return this.vertexCount}},{key:"getInstanceCount",value:function(){return this.instanceCount}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getProgram",value:function(){return this.program}},{key:"setProgram",value:function(t){var e=t.program,n=t.vs,r=t.fs,i=t.modules,a=t.defines,o=t.inject,s=t.varyings,u=t.bufferMode;this.programProps={program:e,vs:n,fs:r,modules:i,defines:a,inject:o,varyings:s,bufferMode:u},this._programDirty=!0}},{key:"getUniforms",value:function(){return this.uniforms}},{key:"setDrawMode",value:function(t){return this.drawMode=t,this}},{key:"setVertexCount",value:function(t){return Object(c.a)(Number.isFinite(t)),this.vertexCount=t,this}},{key:"setInstanceCount",value:function(t){return Object(c.a)(Number.isFinite(t)),this.instanceCount=t,this}},{key:"setGeometry",value:function(t){return this.drawMode=t.drawMode,this.vertexCount=t.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(t,e,n){var r={},i=e.indices;for(var a in e.attributes){var o=e.attributes[a],s=G(a,n);if("indices"===a)i=o;else if(o.constant)r[s]=o.value;else{var u=o.value,l=Object(U.a)({},o);delete l.value,r[s]=[new d.a(t,u),l],H(a,l)}}if(i){var h=i.value||i;Object(c.a)(h instanceof Uint16Array||h instanceof Uint32Array,'attribute array for "indices" must be of integer type');var f={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new d.a(t,{data:h,target:34963}),f]}return r}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}},{key:"setAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(u.a)(t))return this;var e={};for(var n in t){var r=t[n];e[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(e),this}},{key:"setUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,t),this}},{key:"getModuleUniforms",value:function(t){this._checkProgram();var e=this.programManager.getUniforms(this.program);return e?e(t):{}}},{key:"updateModuleSettings",value:function(t){var e=this.getModuleUniforms(t||{});return this.setUniforms(e)}},{key:"clear",value:function(t){return Object(l.a)(this.program.gl,t),this}},{key:"draw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();var e,n=t.moduleSettings,r=void 0===n?null:n,i=t.framebuffer,a=t.uniforms,s=void 0===a?{}:a,u=t.attributes,c=void 0===u?{}:u,l=t.transformFeedback,h=void 0===l?this.transformFeedback:l,f=t.parameters,d=void 0===f?{}:f,v=t.vertexArray,p=void 0===v?this.vertexArray:v;this.setAttributes(c),this.updateModuleSettings(r),this.setUniforms(s),this.debug&&(e=this._logDrawCallStart(2));var g=this.vertexArray.getDrawParams(),b=this.props,y=b.isIndexed,m=void 0===y?g.isIndexed:y,_=b.indexType,O=void 0===_?g.indexType:_,w=b.indexOffset,j=void 0===w?g.indexOffset:w,k=b.vertexArrayInstanced,x=void 0===k?g.isInstanced:k;x&&!this.isInstanced&&o.h.warn("Found instanced attributes on non-instanced model",this.id)();var E=this.isInstanced,P=this.instanceCount,T=this.props,S=T.onBeforeRender,A=void 0===S?W:S,M=T.onAfterRender,L=void 0===M?W:M;A(),this.program.setUniforms(this.uniforms);var C=this.program.draw(Object.assign(X,t,{logPriority:e,uniforms:null,framebuffer:i,parameters:d,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:p,transformFeedback:h,isIndexed:m,indexType:O,isInstanced:E,instanceCount:P,offset:m?j:0}));return L(),this.debug&&this._logDrawCallEnd(e,p,i),C}},{key:"transform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.discard,n=void 0===e||e,i=t.feedbackBuffers,a=t.unbindModels,o=void 0===a?[]:a,s=t.parameters;i&&this._setFeedbackBuffers(i),n&&(s=Object.assign({},s,Object(r.a)({},35977,n))),o.forEach((function(t){return t.vertexArray.unbindBuffers()}));try{this.draw(Object.assign({},t,{parameters:s}))}finally{o.forEach((function(t){return t.vertexArray.bindBuffers()}))}return this}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.h.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(t).draw()}},{key:"_setModelProps",value:function(t){Object.assign(this.props,t),"uniforms"in t&&this.setUniforms(t.uniforms),"pickable"in t&&(this.pickable=t.pickable),"instanceCount"in t&&(this.instanceCount=t.instanceCount),"geometry"in t&&this.setGeometry(t.geometry),"attributes"in t&&this.setAttributes(t.attributes),"_feedbackBuffers"in t&&this._setFeedbackBuffers(t._feedbackBuffers)}},{key:"_checkProgram",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=this._programDirty||this.programManager.stateHash!==this._programManagerState;if(t){var e=this.programProps.program;if(e)this._managedProgram=!1;else{var n=this.programProps,r=n.vs,i=n.fs,a=n.modules,o=n.inject,s=n.defines,u=n.varyings,l=n.bufferMode;e=this.programManager.get({vs:r,fs:i,modules:a,inject:o,defines:s,varyings:u,bufferMode:l}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(c.a)(e instanceof h.a,"Model needs a program"),this._programDirty=!1,e!==this.program&&(this.program=e,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new M(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}}},{key:"_deleteGeometryBuffers",value:function(){for(var t in this.geometryBuffers){var e=this.geometryBuffers[t][0]||this.geometryBuffers[t];e instanceof d.a&&e.delete()}}},{key:"_setAnimationProps",value:function(t){if(this.animated){Object(c.a)(t,"Model.draw(): animated uniforms but no animationProps");var e=this._evaluateAnimateUniforms(t);Object.assign(this.uniforms,e)}}},{key:"_setFeedbackBuffers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(u.a)(t))return this;var e=this.program.gl;return this.transformFeedback=this.transformFeedback||new L.a(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}},{key:"_logDrawCallStart",value:function(t){var e=t>3?0:1e4;if(!(o.h.level<t||Date.now()-this.lastLogTime<e))return this.lastLogTime=Date.now(),o.h.group(2,">>> DRAWING MODEL ".concat(this.id),{collapsed:o.h.level<=2})(),t}},{key:"_logDrawCallEnd",value:function(t,e,n,i){if(void 0!==t){var a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vertexArray,n=t.header,r=void 0===n?"Attributes":n;if(!e.configuration)return{};var i={};e.elements&&(i.ELEMENT_ARRAY_BUFFER=F(e,e.elements,null,r));var a=e.values;for(var o in a){var s=e._getAttributeInfo(o);if(s){var u="".concat(o,": ").concat(s.name),c=e.accessors[s.location];c&&(u="".concat(o,": ").concat(D(s.name,c))),i[u]=F(e,a[o],c,r)}}return i}({vertexArray:e,header:"".concat(this.id," attributes"),attributes:this._attributes}),s=N({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),u=s.table,c=s.unusedTable,l=s.unusedCount,h=N({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0}),f=h.table;h.count>0&&o.h.log("MISSING UNIFORMS",Object.keys(f))(),l>0&&o.h.log("UNUSED UNIFORMS",Object.keys(c))();var d=function(t){var e={},n="Accessors for ".concat(t.id),i=!0,a=!1,o=void 0;try{for(var s,u=t.attributeInfos[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(c){var l=z(c);e["in ".concat(l)]=Object(r.a)({},n,JSON.stringify(c.accessor))}}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}var h=!0,f=!1,d=void 0;try{for(var v,p=t.varyingInfos[Symbol.iterator]();!(h=(v=p.next()).done);h=!0){var g=v.value;if(g){var b=z(g);e["out ".concat(b)]=Object(r.a)({},n,JSON.stringify(g.accessor))}}}catch(t){f=!0,d=t}finally{try{h||null==p.return||p.return()}finally{if(f)throw d}}return e}(this.vertexArray.configuration);o.h.table(t,a)(),o.h.table(t,u)(),o.h.table(t+1,d)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),o.h.groupEnd(2,">>> DRAWING MODEL ".concat(this.id))()}}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return g}));var r=n(19),i=n(5),a=n(55),o=n(21),s=256,u=1024,c=16384,l=6144,h=6145,f=6146,d=34041,v="clear: bad arguments";function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.framebuffer,r=void 0===n?null:n,a=e.color,l=void 0===a?null:a,h=e.depth,f=void 0===h?null:h,d=e.stencil,p=void 0===d?null:d,g={};r&&(g.framebuffer=r);var b=0;l&&(b|=c,!0!==l&&(g.clearColor=l)),f&&(b|=s,!0!==f&&(g.clearDepth=f)),p&&(b|=u,!0!==f&&(g.clearStencil=f)),Object(o.a)(0!==b,v),Object(i.l)(t,g,(function(){t.clear(b)}))}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.framebuffer,s=void 0===n?null:n,u=e.buffer,c=void 0===u?l:u,p=e.drawBuffer,g=void 0===p?0:p,b=e.value,y=void 0===b?[0,0,0,0]:b;Object(a.a)(t),Object(i.l)(t,{framebuffer:s},(function(){switch(c){case l:switch(y.constructor){case Int32Array:t.clearBufferiv(c,g,y);break;case Uint32Array:t.clearBufferuiv(c,g,y);break;case Float32Array:default:t.clearBufferfv(c,g,y)}break;case h:t.clearBufferfv(h,0,[y]);break;case f:t.clearBufferiv(f,0,[y]);break;case d:var e=Object(r.a)(y,2),n=e[0],i=e[1];t.clearBufferfi(d,0,n,i);break;default:Object(o.a)(!1,v)}}))}},,function(t,e,n){"use strict";var r=n(96);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("undefined"!=typeof window&&"object"===(0,i.default)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"===(0,i.default)(process.versions)&&Boolean(process.versions.electron))return!0;var e="object"===("undefined"==typeof navigator?"undefined":(0,i.default)(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=t||e;if(n&&n.indexOf("Electron")>=0)return!0;return!1};var i=r(n(41))},function(t,e,n){"use strict";n.r(e);var r={};function i(t){var e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}n.r(r),n.d(r,"dirname",(function(){return i}));var a=n(68),o=n(189),s=n(143),u=n(138),c=n(84),l={dataType:"arraybuffer",nothrow:!0},h=function(t){return t.startsWith("data:")};function f(t,e){return e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},l,t)).responseType=t.responseType||t.dataType,t}(e),h(t),e.nothrow||Object(c.a)(!1),null}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=Object(o.b)(t),!s.c&&u.readFileSync?u.readFileSync(t,e):f(t,e)}var v=n(104);function p(t,e,n){return t=Object(o.b)(t),!s.c&&v.writeFile?v.writeFile(t,e,n):Object(c.a)(!1)}function g(t,e,n){return t=Object(o.b)(t),!s.c&&v.writeFileSync?v.writeFileSync(t,e,n):Object(c.a)(!1)}var b=n(6),y=n.n(b),m=n(15);function _(t){return"Failed to fetch resource ".concat(t.url,"(").concat(t.status,"): ").concat(t.statusText," ")}function O(t){return w.apply(this,arguments)}function w(){return(w=Object(m.a)(y.a.mark((function t(e){var n;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,!e.headers.get("Content-Type").includes("application/json")){t.next=10;break}return t.t0=n,t.next=7,e.text();case 7:n=t.t0+=t.sent,t.next=11;break;case 10:n+=e.statusText;case 11:t.next=16;break;case 13:return t.prev=13,t.t1=t.catch(1),t.abrupt("return",n);case 16:return t.abrupt("return",n);case 17:case"end":return t.stop()}}),t,null,[[1,13]])})))).apply(this,arguments)}var j=n(64);function k(t){Object(j.b)(t)}var x=n(85),E=n(116),P=n(60),T=n(46),S=n(65),A=n(66);function M(t,e,n,r){Array.isArray(e)||Object(T.a)(e)||(r=n,n=e,e=null);var i="";"string"==typeof r&&(i=r,r=null),n=n||{};var a=Object(A.b)(e,r),o=Object(P.a)(a,i,t);return o?function(t,e,n,r){if(e=Object(S.b)(e,t),t.parseTextSync&&"string"==typeof e)return t.parseTextSync(e,n,r,t);if(t.parseSync)return t.parseSync(e,n,r,t);throw new Error("".concat(t.name," loader: 'parseSync' not supported by this loader, use 'parse' instead. ").concat(r.url||""))}(o,t,n=Object(j.a)(o,n,i),r=Object(A.a)({url:i,parseSync:M,loaders:e},n)):null}var L=n(43),C=n(77);function I(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}function R(t,e){return F.apply(this,arguments)}function F(){return(F=Object(m.a)(y.a.mark((function t(e,n){var r,i,a;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,e.next();case 3:if(r=t.sent,i=r.done,a=r.value,!i){t.next=9;break}return e.return(),t.abrupt("return");case 9:if(!n(a)){t.next=12;break}return t.abrupt("return");case 12:t.next=0;break;case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){return N.apply(this,arguments)}function N(){return(N=Object(m.a)(y.a.mark((function t(e){var n,r,i,a,o,s,u,c,l;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new ArrayBuffer,r="",i=!0,a=!1,t.prev=4,s=I(e);case 6:return t.next=8,s.next();case 8:return u=t.sent,i=u.done,t.next=12,u.value;case 12:if(c=t.sent,i){t.next=19;break}"string"==typeof(l=c)?r+=l:(f=l,d=void 0,v=void 0,p=void 0,d=(h=n)instanceof ArrayBuffer?new Uint8Array(h):h,v=f instanceof ArrayBuffer?new Uint8Array(f):f,(p=new Uint8Array(d.byteLength+v.byteLength)).set(d,0),p.set(v,d.byteLength),n=p);case 16:i=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),a=!0,o=t.t0;case 25:if(t.prev=25,t.prev=26,i||null==s.return){t.next=30;break}return t.next=30,s.return();case 30:if(t.prev=30,!a){t.next=33;break}throw o;case 33:return t.finish(30);case 34:return t.finish(25);case 35:return t.abrupt("return",r||n);case 36:case"end":return t.stop()}var h,f,d,v,p}),t,null,[[4,21,25,35],[26,,30,34]])})))).apply(this,arguments)}function B(t,e){return z.apply(this,arguments)}function z(){return(z=Object(C.a)(y.a.mark((function t(e,n){var r,i,a,o,s,u,c,l;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new TextDecoder(n),i=!0,a=!1,t.prev=3,s=I(e);case 5:return t.next=7,Object(L.a)(s.next());case 7:return u=t.sent,i=u.done,t.next=11,Object(L.a)(u.value);case 11:if(c=t.sent,i){t.next=19;break}return l=c,t.next=16,"string"==typeof l?l:r.decode(l,{stream:!0});case 16:i=!0,t.next=5;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(3),a=!0,o=t.t0;case 25:if(t.prev=25,t.prev=26,i||null==s.return){t.next=30;break}return t.next=30,Object(L.a)(s.return());case 30:if(t.prev=30,!a){t.next=33;break}throw o;case 33:return t.finish(30);case 34:return t.finish(25);case 35:case"end":return t.stop()}}),t,null,[[3,21,25,35],[26,,30,34]])})))).apply(this,arguments)}function U(t){return V.apply(this,arguments)}function V(){return(V=Object(C.a)(y.a.mark((function t(e){var n,r,i,a,o,s,u,c,l;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="",r=!0,i=!1,t.prev=3,o=I(e);case 5:return t.next=7,Object(L.a)(o.next());case 7:return s=t.sent,r=s.done,t.next=11,Object(L.a)(s.value);case 11:if(u=t.sent,r){t.next=26;break}n+=u,c=void 0;case 16:if(!((c=n.indexOf("\n"))>=0)){t.next=23;break}return l=n.slice(0,c+1),n=n.slice(c+1),t.next=21,l;case 21:t.next=16;break;case 23:r=!0,t.next=5;break;case 26:t.next=32;break;case 28:t.prev=28,t.t0=t.catch(3),i=!0,a=t.t0;case 32:if(t.prev=32,t.prev=33,r||null==o.return){t.next=37;break}return t.next=37,Object(L.a)(o.return());case 37:if(t.prev=37,!i){t.next=40;break}throw a;case 40:return t.finish(37);case 41:return t.finish(32);case 42:if(!(n.length>0)){t.next=45;break}return t.next=45,n;case 45:case"end":return t.stop()}}),t,null,[[3,28,32,42],[33,,37,41]])})))).apply(this,arguments)}function G(t){return H.apply(this,arguments)}function H(){return(H=Object(C.a)(y.a.mark((function t(e){var n,r,i,a,o,s,u,c;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=1,r=!0,i=!1,t.prev=3,o=I(e);case 5:return t.next=7,Object(L.a)(o.next());case 7:return s=t.sent,r=s.done,t.next=11,Object(L.a)(s.value);case 11:if(u=t.sent,r){t.next=20;break}return c=u,t.next=16,{counter:n,line:c};case 16:n++;case 17:r=!0,t.next=5;break;case 20:t.next=26;break;case 22:t.prev=22,t.t0=t.catch(3),i=!0,a=t.t0;case 26:if(t.prev=26,t.prev=27,r||null==o.return){t.next=31;break}return t.next=31,Object(L.a)(o.return());case 31:if(t.prev=31,!i){t.next=34;break}throw a;case 34:return t.finish(31);case 35:return t.finish(26);case 36:case"end":return t.stop()}}),t,null,[[3,22,26,36],[27,,31,35]])})))).apply(this,arguments)}function W(t,e,n,r){return X.apply(this,arguments)}function X(){return(X=Object(m.a)(y.a.mark((function t(e,n,r,i){var a,o;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Array.isArray(n)||Object(T.a)(n)||(i=r,r=n,n=null),a=Object(P.a)(n,i,null),r=Object(j.a)(a,r,i),o=Object(A.a)({url:i,loaders:n},r),t.abrupt("return",Z(a,e,r,o));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Z(t,e,n,r){if(t.parseInBatches){var i=Object(S.c)(e);return t.text&&(i=B(i)),t.parseInBatches(i,n,r,t)}throw new Error("parseWithLoaderInBatchesSync not available")}function Y(t,e,n,r){return q.apply(this,arguments)}function q(){return(q=Object(m.a)(y.a.mark((function t(e,n,r,i){var a,o;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Array.isArray(n)||Object(T.a)(n)||(i=r,r=n,n=null),a=Object(P.a)(n,i,null),r=Object(j.a)(a,r),o=Object(A.a)({url:i,loaders:n},r),t.abrupt("return",K(a,e,r,o));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t,e,n,r){if(t.parseInBatchesSync){var i=Object(S.d)(e);return t.parseInBatchesSync(i,n,r,t)}throw new Error("parseWithLoaderInBatchesSync not available")}var Q=n(146);function J(t,e,n){return $.apply(this,arguments)}function $(){return($=Object(m.a)(y.a.mark((function t(e,n,r){var i;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.a)(e,r);case 2:return i=t.sent,t.abrupt("return",W(i,n,r,e));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tt(t,e,n,r){return et.apply(this,arguments)}function et(){return(et=Object(m.a)(y.a.mark((function t(e,n,r,i){return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.encode){t.next=4;break}return t.next=3,n.encode(e,r);case 3:return t.abrupt("return",t.sent);case 4:if(!n.encodeSync){t.next=6;break}return t.abrupt("return",n.encodeSync(e,r));case 6:throw new Error("Writer could not encode data");case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nt(t,e,n,r){if(e.encodeSync)return e.encodeSync(t,n);throw new Error("Writer could not synchronously encode data")}function rt(t,e,n,r){if(e.encodeInBatches)return e.encodeInBatches(t,n);throw new Error("Writer could not encode data in batches")}function it(t,e,n,r){return p(e,tt(t,n,r,e))}function at(t,e,n,r){return g(e,nt(t,n,r))}var ot=n(29),st=n(112),ut=n(97),ct=n(117),lt=n(98),ht=n(111);function ft(t,e){return dt.apply(this,arguments)}function dt(){return(dt=Object(m.a)(y.a.mark((function t(e,n){var r,i,a,o,s,u=arguments;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>2&&void 0!==u[2]?u[2]:function(){},i=u.length>3&&void 0!==u[3]?u[3]:function(){},t.next=4,e;case 4:if((e=t.sent).ok){t.next=7;break}return t.abrupt("return",e);case 7:if(e.body){t.next=9;break}return t.abrupt("return",e);case 9:if(a=e.headers.get("content-length"),o=a&&parseInt(a,10),a>0){t.next=13;break}return t.abrupt("return",e);case 13:if("undefined"!=typeof ReadableStream){t.next=15;break}return t.abrupt("return",e);case 15:return s=new ReadableStream({start:function(t){vt(t,e.body.getReader(),0,o,n,r,i)}}),t.abrupt("return",new Response(s));case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function vt(t,e,n,r,i,a,o){return pt.apply(this,arguments)}function pt(){return(pt=Object(m.a)(y.a.mark((function t(e,n,r,i,a,o,s){var u,c,l,h;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.read();case 3:if(u=t.sent,c=u.done,l=u.value,!c){t.next=10;break}return o(),e.close(),t.abrupt("return");case 10:return r+=l.byteLength,h=Math.round(r/i*100),a(h,{loadedBytes:r,totalBytes:i}),e.enqueue(l),t.next=16,vt(e,n,r,i,a,o,s);case 16:t.next=22;break;case 18:t.prev=18,t.t0=t.catch(0),e.error(t.t0),s(t.t0);case 22:case"end":return t.stop()}}),t,null,[[0,18]])})))).apply(this,arguments)}n.d(e,"path",(function(){return r})),n.d(e,"fetchFile",(function(){return a.a})),n.d(e,"readFileSync",(function(){return d})),n.d(e,"writeFile",(function(){return p})),n.d(e,"writeFileSync",(function(){return g})),n.d(e,"_getErrorMessageFromResponseSync",(function(){return _})),n.d(e,"_getErrorMessageFromResponse",(function(){return O})),n.d(e,"setLoaderOptions",(function(){return k})),n.d(e,"registerLoaders",(function(){return x.c})),n.d(e,"parse",(function(){return E.a})),n.d(e,"parseSync",(function(){return M})),n.d(e,"parseInBatches",(function(){return W})),n.d(e,"parseInBatchesSync",(function(){return Y})),n.d(e,"load",(function(){return Q.a})),n.d(e,"loadInBatches",(function(){return J})),n.d(e,"encode",(function(){return tt})),n.d(e,"encodeSync",(function(){return nt})),n.d(e,"encodeInBatches",(function(){return rt})),n.d(e,"save",(function(){return it})),n.d(e,"saveSync",(function(){return at})),n.d(e,"isPromise",(function(){return ot.f})),n.d(e,"isIterable",(function(){return ot.d})),n.d(e,"isAsyncIterable",(function(){return ot.a})),n.d(e,"isIterator",(function(){return ot.e})),n.d(e,"isFetchResponse",(function(){return ot.b})),n.d(e,"isReadableStream",(function(){return ot.g})),n.d(e,"isWritableStream",(function(){return ot.h})),n.d(e,"toArrayBuffer",(function(){return st.a})),n.d(e,"getStreamIterator",(function(){return ut.a})),n.d(e,"forEach",(function(){return R})),n.d(e,"concatenateAsyncIterator",(function(){return D})),n.d(e,"lineAsyncIterator",(function(){return U})),n.d(e,"textDecoderAsyncIterator",(function(){return B})),n.d(e,"numberedLineAsyncIterator",(function(){return G})),n.d(e,"isBrowser",(function(){return s.c})),n.d(e,"isWorker",(function(){return s.d})),n.d(e,"self",(function(){return s.f})),n.d(e,"window",(function(){return s.g})),n.d(e,"global",(function(){return s.b})),n.d(e,"document",(function(){return s.a})),n.d(e,"assert",(function(){return c.a})),n.d(e,"setPathPrefix",(function(){return o.c})),n.d(e,"getPathPrefix",(function(){return o.a})),n.d(e,"resolvePath",(function(){return o.b})),n.d(e,"_selectLoader",(function(){return P.a})),n.d(e,"_WorkerThread",(function(){return ct.a})),n.d(e,"_WorkerFarm",(function(){return lt.a})),n.d(e,"_WorkerPool",(function(){return ht.a})),n.d(e,"_fetchProgress",(function(){return ft})),n.d(e,"_unregisterLoaders",(function(){return x.a}))},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";var r=n(85),i=n(6),a=n.n(i),o=n(15);function s(t,e){if(!t)throw new Error(e)}var u=n(24),c={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},l=c.global||c.self||c.window,h="object"!==("undefined"==typeof process?"undefined":Object(u.a)(process))||"[object process]"!==String(process)||process.browser,f="undefined"!=typeof process&&process.version&&process.version.match(/v([0-9]*)/),d=(f&&parseFloat(f[1]),"undefined"!=typeof ImageBitmap),v="undefined"!=typeof Image,p=Boolean(l._parseImageNode);function g(t){switch(t){case"auto":return!0;case"imagebitmap":return d;case"html":return v;case"ndarray":return p;default:throw new Error("Unknown image format ".concat(t))}}function b(){var t=((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).image||{}).type||"auto";switch(t){case"imagebitmap":case"html":case"ndarray":if(!g(t))throw new Error("Requested image type ".concat(t," not available in current environment"));return t;case"auto":return function(){if(g("ndarray"))return"ndarray";if(g("html"))return"html";if(g("imagebitmap"))return"imagebitmap";if(!h)throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js");return s(!1)}();default:throw new Error("Unknown image format ".concat(t))}}var y=n(19),m=!1,_=!0,O=new Map([["image/png",{test:w,getSize:function(t){return{width:t.getUint32(16,m),height:t.getUint32(20,m)}}}],["image/jpeg",{test:x,getSize:function(t){if(t.byteLength<2||65496!==t.getUint16(0,m))return null;var e=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:n}}(),n=e.tableMarkers,r=e.sofMarkers,i=2;for(;i<t.byteLength;){var a=t.getUint16(i,m);if(r.has(a))return{height:t.getUint16(i+5,m),width:t.getUint16(i+7,m)};if(!n.has(a))return null;i+=2,i+=t.getUint16(i,m)}return null}}],["image/gif",{test:j,getSize:function(t){return{width:t.getUint16(6,_),height:t.getUint16(8,_)}}}],["image/bmp",{test:k,getSize:function(t){return{width:t.getUint32(18,_),height:t.getUint32(22,_)}}}]]);function w(t){return t.byteLength>=24&&2303741511===t.getUint32(0,m)}function j(t){return t.byteLength>=10&&1195984440===t.getUint32(0,m)}function k(t){return t.byteLength>=2&&16973===t.getUint16(0,m)}function x(t){return t.byteLength>=3&&65496===t.getUint16(0,m)&&255===t.getUint8(2,m)}"Invalid MIME type. Supported MIME types are: ".concat(Array.from(O.keys()).join(", "));function E(t){var e=P(t),n=!0,r=!1,i=void 0;try{for(var a,o=O.entries()[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=Object(y.a)(a.value,2),u=s[0];if((0,s[1].test)(e))return u}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}function P(t){if((t=t.buffer||t)instanceof ArrayBuffer||ArrayBuffer.isView(t))return new DataView(t.buffer||t);throw new Error("toDataView")}function T(t,e){s(l._parseImageNode);var n=E(t);return l._parseImageNode(t,n,e)}function S(t,e){return A.apply(this,arguments)}function A(){return(A=Object(o.a)(a.a.mark((function t(e,n){var r,i,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"image/jpeg",r=new Blob([e],{type:"image/jpeg"}),i=self.URL||self.webkitURL,o=i.createObjectURL(r),t.prev=4,t.next=7,M(o,n);case 7:return t.abrupt("return",t.sent);case 8:return t.prev=8,i.revokeObjectURL(o),t.finish(8);case 11:case"end":return t.stop()}}),t,null,[[4,,8,11]])})))).apply(this,arguments)}function M(t,e){return L.apply(this,arguments)}function L(){return(L=Object(o.a)(a.a.mark((function t(e,n){var r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=new Image).src=e,!(n.image&&n.image.decode&&r.decode)){t.next=6;break}return t.next=5,r.decode();case 5:return t.abrupt("return",r);case 6:return t.next=8,new Promise((function(t,n){try{r.onload=function(){return t(r)},r.onerror=function(t){return n(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(t){n(t)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t,e){var n=new Blob([new Uint8Array(t)]),r=e&&e.imagebitmap;return r?createImageBitmap(n):createImageBitmap(n,r)}function I(t,e){return R.apply(this,arguments)}function R(){return(R=Object(o.a)(a.a.mark((function t(e,n){var r,i,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new TextDecoder,i=r.decode(e),o="data:image/svg+xml;base64,".concat(btoa(i)),t.next=5,M(o,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var F=/^data:image\/svg\+xml/,D=/\.svg((\?|#).*)?$/;function N(){return(N=Object(o.a)(a.a.mark((function t(e,n,r){var i,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=n||{},!(i=(r||{}).url)||!F.test(i)&&!D.test(i)){t.next=6;break}return t.next=5,I(e,n);case 5:return t.abrupt("return",t.sent);case 6:o=b(n),t.t0=o,t.next="imagebitmap"===t.t0?10:"html"===t.t0?13:"ndarray"===t.t0?16:19;break;case 10:return t.next=12,C(e,n);case 12:return t.abrupt("return",t.sent);case 13:return t.next=15,S(e,n);case 15:return t.abrupt("return",t.sent);case 16:return t.next=18,T(e,n);case 18:return t.abrupt("return",t.sent);case 19:return t.abrupt("return",s(!1));case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B={name:"Images",version:"2.0.2",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vndmicrosofticon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:function(t,e,n){return N.apply(this,arguments)},test:function(t){var e=new DataView(t);return x(e)||k(e)||j(e)||w(e)},options:{image:{format:"auto",decodeHTML:!0}}},z=n(30),U=n(16),V=n(33);var G={name:"JSON",extensions:["json","geojson"],testText:function(t){var e=t[0],n=t[t.length-1];return"{"===e&&"}"===n||"["===e&&"]"===n},parseTextSync:JSON.parse},H=z.global.deck&&z.global.deck.VERSION;if(H&&"8.0.17"!==H)throw new Error("deck.gl - multiple versions detected: ".concat(H," vs ").concat("8.0.17"));H||(z.global.deck=Object.assign(z.global.deck||{},{VERSION:"8.0.17",version:"8.0.17",log:U.a,_registerLoggers:V.b}),Object(r.c)([G,B]));e.a=z.global.deck},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r,i=n(0),a=n(62),o=n(92),s={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};e.b=(r={},Object(i.a)(r,s.WEBGL2,[!1,!0]),Object(i.a)(r,s.VERTEX_ARRAY_OBJECT,["OES_vertex_array_object",!0]),Object(i.a)(r,s.TIMER_QUERY,["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"]),Object(i.a)(r,s.INSTANCED_RENDERING,["ANGLE_instanced_arrays",!0]),Object(i.a)(r,s.MULTIPLE_RENDER_TARGETS,["WEBGL_draw_buffers",!0]),Object(i.a)(r,s.ELEMENT_INDEX_UINT32,["OES_element_index_uint",!0]),Object(i.a)(r,s.BLEND_EQUATION_MINMAX,["EXT_blend_minmax",!0]),Object(i.a)(r,s.FLOAT_BLEND,["EXT_float_blend"]),Object(i.a)(r,s.COLOR_ENCODING_SRGB,["EXT_sRGB",!0]),Object(i.a)(r,s.TEXTURE_DEPTH,["WEBGL_depth_texture",!0]),Object(i.a)(r,s.TEXTURE_FLOAT,["OES_texture_float",!0]),Object(i.a)(r,s.TEXTURE_HALF_FLOAT,["OES_texture_half_float",!0]),Object(i.a)(r,s.TEXTURE_FILTER_LINEAR_FLOAT,["OES_texture_float_linear"]),Object(i.a)(r,s.TEXTURE_FILTER_LINEAR_HALF_FLOAT,["OES_texture_half_float_linear"]),Object(i.a)(r,s.TEXTURE_FILTER_ANISOTROPIC,["EXT_texture_filter_anisotropic"]),Object(i.a)(r,s.COLOR_ATTACHMENT_RGBA32F,[function(t){var e=new o.a(t,{format:6408,type:5126,dataFormat:6408}),n=new a.a(t,{id:"test-framebuffer",check:!1,attachments:Object(i.a)({},36064,e)}),r=n.getStatus();return e.delete(),n.delete(),36053===r},"EXT_color_buffer_float"]),Object(i.a)(r,s.COLOR_ATTACHMENT_FLOAT,[!1,"EXT_color_buffer_float"]),Object(i.a)(r,s.COLOR_ATTACHMENT_HALF_FLOAT,["EXT_color_buffer_half_float"]),Object(i.a)(r,s.GLSL_FRAG_DATA,["WEBGL_draw_buffers",!0]),Object(i.a)(r,s.GLSL_FRAG_DEPTH,["EXT_frag_depth",!0]),Object(i.a)(r,s.GLSL_DERIVATIVES,["OES_standard_derivatives",!0]),Object(i.a)(r,s.GLSL_TEXTURE_LOD,["EXT_shader_texture_lod",!0]),r)},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(1),i=n(3);function a(t,e,n){switch(e){case 300:return n?function(t){return t.replace(/attribute\s+/g,"in ").replace(/varying\s+/g,"out ").replace(/texture2D\(/g,"texture(").replace(/textureCube\(+/g,"texture(").replace(/texture2DLodEXT\(/g,"textureLod(").replace(/textureCubeLodEXT\(/g,"textureLod(")}(t):function(t){return t.replace(/varying\s+/g,"in ").replace(/texture2D\(/g,"texture(").replace(/textureCube\(/g,"texture(").replace(/texture2DLodEXT\(/g,"textureLod(").replace(/textureCubeLodEXT\(/g,"textureLod(")}(t);case 100:return n?function(t){return t.replace(/^in\s+/gm,"attribute ").replace(/^out\s+/gm,"varying ").replace(/texture\(/g,"texture2D(")}(t):function(t){return t.replace(/^in\s+/gm,"varying ").replace(/texture\(/g,"texture2D(")}(t);default:throw new Error("unknown GLSL version ".concat(e))}}var o=n(129),s=n(24),u={number:{validate:function(t,e){return Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)}},array:{validate:function(t,e){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function c(t){var e=l(t);return"object"===e?t?"type"in t?Object.assign({},t,u[t.type]):"value"in t?(e=l(t.value),Object.assign({type:e},t,u[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},u[e])}function l(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":Object(s.a)(t)}n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return f}));var h=function(){function t(e){var n=e.name,i=e.vs,a=e.fs,s=e.dependencies,u=void 0===s?[]:s,l=e.uniforms,h=e.getUniforms,f=e.deprecations,d=void 0===f?[]:f,v=e.defines,p=void 0===v?{}:v,g=e.inject,b=void 0===g?{}:g,y=e.vertexShader,m=e.fragmentShader;Object(r.a)(this,t),Object(o.a)("string"==typeof n),this.name=n,this.vs=i||y,this.fs=a||m,this.getModuleUniforms=h,this.dependencies=u,this.deprecations=this._parseDeprecationDefinitions(d),this.defines=p,this.injections=function(t){var e={vs:{},fs:{}};for(var n in t){var r=t[n],i=n.slice(0,2);"string"==typeof r&&(r={injection:r}),e[i][n]=r}return e}(b),l&&(this.uniforms=function(t){var e={};for(var n in t){var r=c(t[n]);e[n]=r}return e}(l))}return Object(i.a)(t,[{key:"getModuleSource",value:function(t,e){var n;switch(t){case"vs":n=a(this.vs||"",e,!0);break;case"fs":n=a(this.fs||"",e,!1);break;default:Object(o.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(n,"// END MODULE_").concat(this.name,"\n\n")}},{key:"getUniforms",value:function(t,e){return this.getModuleUniforms?this.getModuleUniforms(t,e):this.uniforms?this._defaultGetUniforms(t):{}}},{key:"getDefines",value:function(){return this.defines}},{key:"checkDeprecations",value:function(t,e){this.deprecations.forEach((function(n){n.regex.test(t)&&(n.deprecated?e.deprecated(n.old,n.new)():e.removed(n.old,n.new)())}))}},{key:"_parseDeprecationDefinitions",value:function(t){return t.forEach((function(t){switch(t.type){case"function":t.regex=new RegExp("\\b".concat(t.old,"\\("));break;default:t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))}})),t}},{key:"_defaultGetUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},n=this.uniforms;for(var r in n){var i=n[r];r in t&&!i.private?(i.validate&&Object(o.a)(i.validate(t[r],i),"".concat(this.name,": invalid ").concat(r)),e[r]=t[r]):e[r]=i.value}return e}}]),t}();function f(t){if(!t.normalized&&(t.normalized=!0,t.uniforms&&!t.getUniforms)){var e=new h(t);t.getUniforms=e.getUniforms.bind(e)}return t}},function(t,e,n){"use strict";var r,i=n(0),a=n(67),o=n(129);n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return f})),n.d(e,"b",(function(){return d}));var s=(r={},Object(i.a)(r,a.b,"#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n"),Object(i.a)(r,a.a,"#ifdef MODULE_MATERIAL\n  gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n  gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n  gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n  logdepth_setFragDepth();\n#endif\n"),r),u="__LUMA_INJECT_DECLARATIONS__",c=/void main\s*\([^)]*\)\s*\{\n?/,l=/}\n?[^{}]*$/,h=[];function f(t,e,n,r){var i=e===a.b,o=function(e){var r=n[e];r.sort((function(t,e){return t.order-e.order})),h.length=r.length;for(var a=0,o=r.length;a<o;++a)h[a]=r[a].injection;var s="".concat(h.join("\n"),"\n");switch(e){case"vs:#decl":i&&(t=t.replace(u,s));break;case"vs:#main-start":i&&(t=t.replace(c,(function(t){return t+s})));break;case"vs:#main-end":i&&(t=t.replace(l,(function(t){return s+t})));break;case"fs:#decl":i||(t=t.replace(u,s));break;case"fs:#main-start":i||(t=t.replace(c,(function(t){return t+s})));break;case"fs:#main-end":i||(t=t.replace(l,(function(t){return s+t})));break;default:t=t.replace(e,(function(t){return t+s}))}};for(var f in n)o(f);return t=t.replace(u,""),r&&(t=t.replace(/\}\s*$/,(function(t){return t+s[e]}))),t}function d(t){var e={};return Object(o.a)(Array.isArray(t)&&t.length>1),t.forEach((function(t){for(var n in t)e[n]=e[n]?"".concat(e[n],"\n").concat(t[n]):t[n]})),e}},function(t,e,n){"use strict";var r=n(36),i=n(62),a=n(49),o=n(5),s=n(55),u=n(73),c=n(21);function l(t){switch(t){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return Object(c.a)(!1),0}}var h=n(151);function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sourceX,r=void 0===n?0:n,i=e.sourceY,a=void 0===i?0:i,o=e.sourceFormat,s=void 0===o?6408:o,h=e.sourceAttachment,f=void 0===h?36064:h,d=e.target,v=void 0===d?null:d,p=e.sourceWidth,b=e.sourceHeight,y=e.sourceType,m=g(t),_=m.framebuffer,O=m.deleteFramebuffer;Object(c.a)(_);var w=_.gl,j=_.handle,k=_.attachments;p=p||_.width,b=b||_.height,36064===f&&null===j&&(f=1028),Object(c.a)(k[f]),v=function(t,e,n,r,i){if(t)return t;e=e||5121;var a=Object(u.c)(e,{clamped:!1}),o=l(n);return new a(r*i*o)}(v,y=y||k[f].type,s,p,b),y=y||Object(u.b)(v);var x=w.bindFramebuffer(36160,j);return w.readPixels(r,a,p,b,s,y,v),w.bindFramebuffer(36160,x||null),O&&_.delete(),v}function d(t,e){var n=e.sourceX,i=void 0===n?0:n,a=e.sourceY,u=void 0===a?0:a,h=e.sourceFormat,f=void 0===h?6408:h,d=e.target,v=void 0===d?null:d,p=e.targetByteOffset,b=void 0===p?0:p,y=e.sourceWidth,m=e.sourceHeight,_=e.sourceType,O=g(t),w=O.framebuffer,j=O.deleteFramebuffer;Object(c.a)(w);var k=w.gl;if(y=y||w.width,m=m||w.height,Object(s.a)(k),_=_||(v?v.type:5121),!v){var x=l(f),E=function(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(c.a)(!1),0}}(_),P=b+y*m*x*E;v=new r.a(k,{byteLength:P,accessor:{type:_,size:x}})}return v.bind({target:35051}),Object(o.l)(k,{framebuffer:w},(function(){k.readPixels(i,u,y,m,f,_,b)})),v.unbind({target:35051}),j&&w.delete(),v}function v(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sourceAttachment,r=void 0===n?36064:n,i=e.targetMaxHeight,a=void 0===i?Number.MAX_SAFE_INTEGER:i,o=f(t,{sourceAttachment:r}),s=t.width,c=t.height;c>a;){var l=Object(u.d)({data:o,width:s,height:c});o=l.data,s=l.width,c=l.height}Object(u.a)({data:o,width:s,height:c});var h=document.createElement("canvas");h.width=s,h.height=c;var d=h.getContext("2d"),v=d.createImageData(s,c);return v.data.set(o),d.putImageData(v,0,0),h.toDataURL()}function p(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.sourceX,i=void 0===r?0:r,o=n.sourceY,s=void 0===o?0:o,u=n.targetX,l=n.targetY,h=n.targetZ,f=n.targetMipmaplevel,d=void 0===f?0:f,v=n.targetInternalFormat,p=void 0===v?6408:v,b=n.width,y=n.height,m=g(t),_=m.framebuffer,O=m.deleteFramebuffer;Object(c.a)(_);var w=_.gl,j=_.handle,k=void 0!==u||void 0!==l||void 0!==h;u=u||0,l=l||0,h=h||0;var x=w.bindFramebuffer(36160,j);Object(c.a)(e);var E=null;if(e instanceof a.a&&(E=e,b=Number.isFinite(b)?b:E.width,y=Number.isFinite(y)?y:E.height,E.bind(0),e=E.target),k)switch(e){case 3553:case 34067:w.copyTexSubImage2D(e,d,u,l,i,s,b,y);break;case 35866:case 32879:w.copyTexSubImage3D(e,d,u,l,h,i,s,b,y)}else w.copyTexImage2D(e,d,p,i,s,b,y,0);return E&&E.unbind(),w.bindFramebuffer(36160,x||null),O&&_.delete(),E}function g(t){return t instanceof i.a?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:Object(h.b)(t),deleteFramebuffer:!0}}n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return d})),n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return p}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5);function i(t,e,n){var i=n.removedProps,a=void 0===i?{}:i,o=n.deprecatedProps,s=void 0===o?{}:o,u=n.replacedProps,c=void 0===u?{}:u;for(var l in a)if(l in e){var h=a[l]?"".concat(t,".").concat(a[l]):"N/A";r.h.removed("".concat(t,".").concat(l),h)()}for(var f in s)if(f in e){var d=s[f];r.h.deprecated("".concat(t,".").concat(f),"".concat(t,".").concat(d))()}var v=null;for(var p in c)if(p in e){var g=c[p];r.h.deprecated("".concat(t,".").concat(p),"".concat(t,".").concat(g))(),(v=v||Object.assign({},e))[g]=e[p],delete v[p]}return v||e}},function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return f}));var r=n(24),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},a=i.self||i.window||i.global,o=i.window||i.self||i.global,s=i.global||i.self||i.window,u=i.document||{},c="object"!==("undefined"==typeof process?"undefined":Object(r.a)(process))||"[object process]"!==String(process)||process.browser,l="function"==typeof importScripts,h="undefined"!=typeof process&&process.version&&process.version.match(/v([0-9]*)/),f=h&&parseFloat(h[1])||0},function(t,e,n){"use strict";var r=n(96);Object.defineProperty(e,"__esModule",{value:!0}),e.console=e.process=e.document=e.global=e.window=e.self=void 0;var i=r(n(41)),a={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"===("undefined"==typeof process?"undefined":(0,i.default)(process))&&process},o=a.self||a.window||a.global;e.self=o;var s=a.window||a.self||a.global;e.window=s;var u=a.global||a.self||a.window;e.global=u;var c=a.document||{};e.document=c;var l=a.process||{};e.process=l;var h=console;e.console=h},function(t,e,n){"use strict";var r=n(96);Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,e.isBrowserMainThread=function(){return o()&&"undefined"!=typeof document};var i=r(n(41)),a=r(n(132));function o(){return!("object"===("undefined"==typeof process?"undefined":(0,i.default)(process))&&"[object process]"===String(process)&&!process.browser)||(0,a.default)()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(6),i=n.n(r),a=n(15),o=n(29),s=n(68),u=n(46),c=n(116);function l(t,e,n){return h.apply(this,arguments)}function h(){return(h=Object(a.a)(i.a.mark((function t(e,n,r){var a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||Object(u.a)(n)||(r=n,n=null),a=e,"string"!=typeof e){t.next=6;break}return t.next=5,Object(s.a)(e,r);case 5:a=t.sent;case 6:if(!Object(o.c)(e)){t.next=11;break}return t.next=9,Object(s.a)(e,r);case 9:a=t.sent,e=null;case 11:return t.next=13,Object(c.a)(a,n,r,e);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,n){"use strict";var r=n(81);e.a={name:"project32",dependencies:[r.a],vs:"\nvec4 project_position_to_clipspace(\n  vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n  vec3 projectedPosition = project_position(position, position64Low);\n  commonPosition = vec4(projectedPosition + offset, 1.0);\n  return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n  vec3 position, vec3 position64Low, vec3 offset\n) {\n  vec4 commonPosition;\n  return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},function(t,e,n){"use strict";var r=n(22),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(110),l=n(20),h=n(76),f=n(16),d=n(59),v=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o()(this,t),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="Initial render",this._needsUpdate=!0,this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractiveStateChange:e.onInteractiveStateChange},Object.seal(this),this.setProps(e)}return u()(t,[{key:"finalize",value:function(){for(var t in this.controllers)this.controllers[t]&&this.controllers[t].finalize();this.controllers={}}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t,this._needsRedraw=this._needsRedraw||t}},{key:"updateViewStates",value:function(){for(var t in this.controllers){var e=this.controllers[t];e&&e.updateTransition()}}},{key:"getViewports",value:function(t){return t?this._viewports.filter((function(e){return e.containsPixel(t)})):this._viewports}},{key:"getViews",value:function(){var t={};return this.views.forEach((function(e){t[e.id]=e})),t}},{key:"getView",value:function(t){return"string"==typeof t?this.views.find((function(e){return e.id===t})):t}},{key:"getViewState",value:function(t){var e=this.getView(t),n=e&&this.viewState[e.getViewStateId()]||this.viewState;return e?e.filterViewState(n):n}},{key:"getViewport",value:function(t){return this._viewportMap[t]}},{key:"unproject",value:function(t,e){for(var n=this.getViewports(),r={x:t[0],y:t[1]},i=n.length-1;i>=0;--i){var a=n[i];if(a.containsPixel(r)){var o=t.slice();return o[0]-=a.x,o[1]-=a.y,a.unproject(o,e)}}return null}},{key:"setProps",value:function(t){"views"in t&&this._setViews(t.views),"viewState"in t&&this._setViewState(t.viewState),("width"in t||"height"in t)&&this._setSize(t.width,t.height),this._isUpdating||this._update()}},{key:"_update",value:function(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}},{key:"_setSize",value:function(t,e){Object(l.a)(Number.isFinite(t)&&Number.isFinite(e)),t===this.width&&e===this.height||(this.width=t,this.height=e,this.setNeedsUpdate("Size changed"))}},{key:"_setViews",value:function(t){t=Object(d.b)(t,{filter:Boolean}),this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}},{key:"_setViewState",value:function(t){t?(!Object(h.a)(t,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=t):f.a.warn("missing `viewState` or `initialViewState`")()}},{key:"_onViewStateChange",value:function(t,e){e.viewId=t,this._eventCallbacks.onViewStateChange(e)}},{key:"_createController",value:function(t){return new(0,t.type)(Object.assign({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,t.id),onStateChange:this._eventCallbacks.onInteractiveStateChange},t))}},{key:"_updateController",value:function(t,e,n,r){if(t.controller){var i=Object.assign({},t.controller,e,{id:t.id,x:n.x,y:n.y,width:n.width,height:n.height});return r?r.setProps(i):r=this._createController(i),r}return null}},{key:"_rebuildViewports",value:function(){var t=this.width,e=this.height,n=this.views,r=this.controllers;this._viewports=[],this.controllers={};for(var i=n.length;i--;){var a=n[i],o=this.getViewState(a),s=a.makeViewport({width:t,height:e,viewState:o});this.controllers[a.id]=this._updateController(a,o,s,r[a.id]),this._viewports.unshift(s)}for(var u in r)r[u]&&!this.controllers[u]&&r[u].finalize();this._buildViewportMap()}},{key:"_buildViewportMap",value:function(){var t=this;this._viewportMap={},this._viewports.forEach((function(e){e.id&&(t._viewportMap[e.id]=t._viewportMap[e.id]||e)}))}},{key:"_diffViews",value:function(t,e){return t.length!==e.length||t.some((function(n,r){return!t[r].equals(e[r])}))}}]),t}(),p=n(107),g=n(100),b=new g.a,y=function(){function t(){o()(this,t),this.effects=[],this._internalEffects=[],this._needsRedraw="Initial render",this.setEffects()}return u()(t,[{key:"setProps",value:function(t){"effects"in t&&(t.effects.length===this.effects.length&&Object(h.a)(t.effects,this.effects)||(this.setEffects(t.effects),this._needsRedraw="effects changed"))}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"getEffects",value:function(){return this._internalEffects}},{key:"finalize",value:function(){this.cleanup()}},{key:"setEffects",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.cleanup(),this.effects=t,this._createInternalEffects()}},{key:"cleanup",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.effects[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){r.value.cleanup()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}var a=!0,o=!1,s=void 0;try{for(var u,c=this._internalEffects[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){u.value.cleanup()}}catch(t){o=!0,s=t}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}this.effects.length=0,this._internalEffects.length=0}},{key:"_createInternalEffects",value:function(){this._internalEffects=this.effects.slice(),this.effects.some((function(t){return t instanceof g.a}))||this._internalEffects.push(b)}}]),t}(),m=n(75),_=n(119),O=n(62),w=n(92),j=n(5),k=n(141),x=n(127),E={pickedColor:null,pickedLayer:null,pickedObjectIndex:-1};function P(t){var e=t.pickedColors,n=t.layers,r=t.deviceX,i=t.deviceY,a=t.deviceRadius,o=t.deviceRect;if(e){for(var s=o.x,u=o.y,c=o.width,l=o.height,h=a*a,d=-1,v=0,p=0;p<l;p++){var g=p+u-i,b=g*g;if(b>h)v+=4*c;else for(var y=0;y<c;y++){if(e[v+3]-1>=0){var m=y+s-r,_=m*m+b;_<=h&&(h=_,d=v)}v+=4}}if(d>=0){var O=e[d+3]-1,w=e.slice(d,d+4),j=n[O];if(j){var k=j.decodePickingColor(w),x=Math.floor(d/4/c);return{pickedColor:w,pickedLayer:j,pickedObjectIndex:k,pickedX:s+(d/4-x*c),pickedY:u+x}}f.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return E}function T(t){var e=t.pickInfo,n=t.lastPickedInfo,r=t.mode,i=t.layers,a=t.viewports,o=t.x,s=t.y,u=t.z,c=t.pixelRatio,l=e.pickedColor,h=e.pickedLayer,f=e.pickedObjectIndex,d=h?[h]:[];if("hover"===r){var v=n.index,p=n.layerId,g=h&&h.props.id;if(g!==p||f!==v){if(g!==p){var b=i.find((function(t){return t.props.id===p}));b&&d.unshift(b)}n.layerId=g,n.index=f,n.info=null}}var y={viewports:a}.viewports[0],m=y&&y.unproject([o,s],{targetZ:u}),_={color:null,layer:null,index:-1,picked:!1,x:o,y:s,pixel:[o,s],coordinate:m,lngLat:m,devicePixel:[e.pickedX,e.pickedY],pixelRatio:c},O=new Map;return O.set(null,_),d.forEach((function(t){var e=Object.assign({},_);t===h&&(e.color=l,e.index=f,e.picked=!0),e=S({layer:t,info:e,mode:r}),t===h&&"hover"===r&&(n.info=e),e&&O.set(e.layer.id,e),"hover"===r&&t.props.autoHighlight&&(t.setModuleParameters({pickingSelectedColor:h===t?l:null}),t.setNeedsRedraw())})),O}function S(t){for(var e=t.layer,n=t.info,r=t.mode;e&&n;){var i=n.layer||e;n.layer=e,n=e.getPickingInfo({info:n,mode:r,sourceLayer:i}),e=e.parent}return n}function A(t,e,n){var r=[];return t.forEach((function(t){if(t.layer){switch(e){case"hover":t.handled=t.layer.onHover(t,n)}r.push(t)}})),r}var M=function(){function t(e){o()(this,t),this.gl=e,this.pickingFBO=null,this.pickLayersPass=new x.a(e),this.layerFilter=null,this.lastPickedInfo={index:-1,layerId:null,info:null}}return u()(t,[{key:"setProps",value:function(t){"layerFilter"in t&&(this.layerFilter=t.layerFilter)}},{key:"finalize",value:function(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}},{key:"pickObject",value:function(t){return this._pickClosestObject(t)}},{key:"pickObjects",value:function(t){return this._pickVisibleObjects(t)}},{key:"getLastPickedObject",value:function(t){var e=t.x,n=t.y,r=t.layers,i=t.viewports,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info,o=a&&a.layer&&a.layer.id,s=o?r.find((function(t){return t.id===o})):null,u=i[0]&&i[0].unproject([e,n]),c={x:e,y:n,coordinate:u,lngLat:u,layer:s};return s?Object.assign({},a,c):Object.assign(c,{color:null,object:null,index:-1})}},{key:"_resizeBuffer",value:function(){var t=this.gl;return this.pickingFBO||(this.pickingFBO=new O.a(t),O.a.isSupported(t,{colorBufferFloat:!0})&&(this.depthFBO=new O.a(t),this.depthFBO.attach(i()({},36064,new w.a(t,{format:Object(j.g)(t)?34836:6408,type:5126}))))),this.pickingFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.depthFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.pickingFBO}},{key:"_pickClosestObject",value:function(t){var e=t.layers,n=t.viewports,r=t.x,i=t.y,a=t.radius,o=void 0===a?0:a,s=t.depth,u=void 0===s?1:s,c=t.mode,l=void 0===c?"query":c,h=t.event,f=t.unproject3D,d=t.onViewportActive;this._resizeBuffer();for(var v,p=Object(j.c)(this.gl),g=Object(j.b)(this.gl,[r,i],!0),b=[g.x+Math.floor(g.width/2),g.y+Math.floor(g.height/2)],y=Math.round(o*p),m=this.pickingFBO,_=m.width,O=m.height,w=this._getPickingRect({deviceX:b[0],deviceY:b[1],deviceRadius:y,deviceWidth:_,deviceHeight:O}),k=[],x={},E=0;E<u;E++){var S=P({pickedColors:w&&this._drawAndSample({layers:e,viewports:n,onViewportActive:d,deviceRect:w,pass:"picking:".concat(l),redrawReason:l}),layers:e,deviceX:b[0],deviceY:b[1],deviceRadius:y,deviceRect:w}),M=void 0;if(S.pickedLayer&&f&&this.depthFBO)M=this._drawAndSample({layers:[S.pickedLayer],viewports:n,onViewportActive:d,deviceRect:{x:S.pickedX,y:S.pickedY,width:1,height:1},pass:"picking:".concat(l),redrawReason:"pick-z",pickZ:!0})[0]*n[0].distanceScales.metersPerUnit[2]+n[0].position[2];if(S.pickedColor&&E+1<u){var L=S.pickedColor[3]-1;x[L]=!0,e[L].clearPickingColor(S.pickedColor)}var C=A(v=T({pickInfo:S,lastPickedInfo:this.lastPickedInfo,mode:l,layers:e,viewports:n,x:r,y:i,z:M,pixelRatio:p}),l,h);if(C&&C.forEach((function(t){return k.push(t)})),!S.pickedColor)break}for(var I in x)e[I].restorePickingColors();return{result:k,emptyInfo:v&&v.get(null)}}},{key:"_pickVisibleObjects",value:function(t){var e=t.layers,n=t.viewports,r=t.x,i=t.y,a=t.width,o=void 0===a?1:a,s=t.height,u=void 0===s?1:s,c=t.mode,l=void 0===c?"query":c,h=t.onViewportActive;this._resizeBuffer();var d=Object(j.c)(this.gl),v=Object(j.b)(this.gl,[r,i],!0),p=v.x,g=v.y+v.height,b=Object(j.b)(this.gl,[r+o,i+u],!0),y=b.x+b.width,m=b.y,_={x:p,y:m,width:y-p,height:g-m},O=function(t){var e=t.pickedColors,n=t.layers,r=new Map;if(e)for(var i=0;i<e.length;i+=4){var a=e[i+3]-1;if(a>=0){var o=e.slice(i,i+4),s=o.join(",");if(!r.has(s)){var u=n[a];u?r.set(s,{pickedColor:o,pickedLayer:u,pickedObjectIndex:u.decodePickingColor(o)}):f.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}}return Array.from(r.values())}({pickedColors:this._drawAndSample({layers:e,viewports:n,onViewportActive:h,deviceRect:_,pass:"picking:".concat(l),redrawReason:l}),layers:e}),w=new Map;return O.forEach((function(t){var e={color:t.pickedColor,layer:null,index:t.pickedObjectIndex,picked:!0,x:r,y:i,width:o,height:u,pixelRatio:d};e=S({layer:t.pickedLayer,info:e,mode:l}),w.has(e.object)||w.set(e.object,e)})),Array.from(w.values())}},{key:"_drawAndSample",value:function(t){var e=t.layers,n=t.viewports,r=t.onViewportActive,i=t.deviceRect,a=t.pass,o=t.redrawReason,s=t.pickZ;if(Object(l.a)(i.width>0&&i.height>0),e.filter((function(t){return t.isPickable()})).length<1)return null;var u=s?this.depthFBO:this.pickingFBO;this.pickLayersPass.render({layers:e,layerFilter:this.layerFilter,viewports:n,onViewportActive:r,pickingFBO:u,deviceRect:i,pass:a,redrawReason:o,pickZ:s});var c=i.x,h=i.y,f=i.width,d=i.height,v=new(s?Float32Array:Uint8Array)(f*d*4);return Object(k.c)(u,{sourceX:c,sourceY:h,sourceWidth:f,sourceHeight:d,target:v}),v}},{key:"_getPickingRect",value:function(t){var e=t.deviceX,n=t.deviceY,r=t.deviceRadius,i=t.deviceWidth,a=t.deviceHeight,o=Math.max(0,e-r),s=Math.max(0,n-r),u=Math.min(i,e+r+1)-o,c=Math.min(a,n+r+1)-s;return u<=0||c<=0?null:{x:o,y:s,width:u,height:c}}}]),t}(),L={zIndex:1,position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:0,left:0,display:"none"},C=function(){function t(e){o()(this,t);var n=e.parentElement;n&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,L),n.appendChild(this.el))}return u()(t,[{key:"setTooltip",value:function(t,e,n){var r=this.el;if("string"==typeof t)r.innerText=t;else{if(!t)return void(r.style.display="none");"text"in t&&(r.innerText=t.text),"html"in t&&(r.innerHTML=t.html),"className"in t&&(r.className=t.className),Object.assign(r.style,t.style)}r.style.display="block",r.style.transform="translate(".concat(e,"px, ").concat(n,"px)")}},{key:"remove",value:function(){this.el&&this.el.remove()}}]),t}(),I=n(135),R=n(30),F=n(24),D=n(6),N=n.n(D),B=n(15),z=n(1),U=n(3),V=n(102),G=n(21),H=n(13),W=n(9),X=n(28),Z=n(14),Y=n(39),q=n(187),K=n(136),Q=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(z.a)(this,e),(n=Object(H.a)(this,Object(W.a)(e).call(this,t,r))).target=null,n._queryPending=!1,n._pollingPromise=null,Object.seal(Object(X.a)(n)),n}return Object(Z.a)(e,t),Object(U.a)(e,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(j.g)(t),r=Object(q.c)(t,K.a.TIMER_QUERY),i=n||r,a=!0,o=!1,s=void 0;try{for(var u,c=e[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var l=u.value;switch(l){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:Object(G.a)(!1)}}}catch(t){o=!0,s=t}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}return i}}]),Object(U.a)(e,[{key:"beginTimeElapsedQuery",value:function(){return this.begin(35007)}},{key:"beginOcclusionQuery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.conservative,n=void 0!==e&&e;return this.begin(n?36202:35887)}},{key:"beginTransformFeedbackQuery",value:function(){return this.begin(35976)}},{key:"begin",value:function(t){return this._queryPending?this:(this.target=t,this.gl.beginQuery(this.target,this.handle),this)}},{key:"end",value:function(){return this._queryPending?this:(this.target&&(this.gl.endQuery(this.target),this.target=null,this._queryPending=!0),this)}},{key:"isResultAvailable",value:function(){if(!this._queryPending)return!1;var t=this.gl.getQueryParameter(this.handle,34919);return t&&(this._queryPending=!1),t}},{key:"isTimerDisjoint",value:function(){return this.gl.getParameter(36795)}},{key:"getResult",value:function(){return this.gl.getQueryParameter(this.handle,34918)}},{key:"getTimerMilliseconds",value:function(){return this.getResult()/1e6}},{key:"createPoll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;var n=0;return this._pollingPromise=new Promise((function(r,i){requestAnimationFrame((function a(){t.isResultAvailable()?(r(t.getResult()),t._pollingPromise=null):n++>e?(i("Timed out"),t._pollingPromise=null):requestAnimationFrame(a)}))})),this._pollingPromise}},{key:"_createHandle",value:function(){return e.isSupported(this.gl)?this.gl.createQuery():null}},{key:"_deleteHandle",value:function(){this.gl.deleteQuery(this.handle)}}]),e}(Y.a);function J(t){return"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t)}var $,tt,et=Object(R.isBrowser)()&&"undefined"!=typeof document,nt=0,rt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(z.a)(this,t);var n=e.onCreateContext,r=void 0===n?function(t){return Object(j.a)(t)}:n,i=e.onAddHTML,a=void 0===i?null:i,o=e.onInitialize,s=void 0===o?function(){}:o,u=e.onRender,c=void 0===u?function(){}:u,l=e.onFinalize,h=void 0===l?function(){}:l,f=e.gl,d=void 0===f?null:f,v=e.glOptions,p=void 0===v?{}:v,g=e.debug,b=void 0!==g&&g,y=e.createFramebuffer,m=void 0!==y&&y,_=e.autoResizeViewport,O=void 0===_||_,w=e.autoResizeDrawingBuffer,k=void 0===w||w,x=e.stats,E=void 0===x?V.a.get("animation-loop-".concat(nt++)):x,P=e.useDevicePixels,T=void 0===P||P;"useDevicePixelRatio"in e&&(j.h.deprecated("useDevicePixelRatio","useDevicePixels")(),T=e.useDevicePixelRatio),this.props={onCreateContext:r,onAddHTML:a,onInitialize:s,onRender:c,onFinalize:h,gl:d,glOptions:p,debug:b,createFramebuffer:m},this.gl=d,this.needsRedraw=null,this.timeline=null,this.stats=E,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:O,autoResizeDrawingBuffer:k,useDevicePixels:T}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}var e;return Object(U.a)(t,[{key:"delete",value:function(){this.stop(),this._setDisplay(null)}},{key:"setNeedsRedraw",value:function(t){return Object(G.a)("string"==typeof t),this.needsRedraw=this.needsRedraw||t,this}},{key:"setProps",value:function(t){return"autoResizeViewport"in t&&(this.autoResizeViewport=t.autoResizeViewport),"autoResizeDrawingBuffer"in t&&(this.autoResizeDrawingBuffer=t.autoResizeDrawingBuffer),"useDevicePixels"in t&&(this.useDevicePixels=t.useDevicePixels),this}},{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._running?this:(this._running=!0,this._getPageLoadPromise().then((function(){return!t._running||t._initialized?null:(t._createWebGLContext(e),t._createFramebuffer(),t._startEventHandling(),t._initializeCallbackData(),t._updateCallbackData(),t._resizeCanvasDrawingBuffer(),t._resizeViewport(),t._gpuTimeQuery=Q.isSupported(t.gl,["timers"])?new Q(t.gl):null,t._initialized=!0,t.onInitialize(t.animationProps))})).then((function(e){t._running&&(t._addCallbackData(e||{}),!1!==e&&t._startLoop())})),this)}},{key:"redraw",value:function(){return this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers(),this}},{key:"stop",value:function(){return this._running&&(this._finalizeCallbackData(),J(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}},{key:"attachTimeline",value:function(t){return this.timeline=t,this.timeline}},{key:"detachTimeline",value:function(){this.timeline=null}},{key:"waitForRender",value:function(){var t=this;return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((function(e){t._resolveNextFrame=e}))),this._nextFramePromise}},{key:"toDataURL",value:(e=Object(B.a)(N.a.mark((function t(){return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.setNeedsRedraw("toDataURL"),t.next=3,this.waitForRender();case 3:return t.abrupt("return",this.gl.canvas.toDataURL());case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"onCreateContext",value:function(){var t;return(t=this.props).onCreateContext.apply(t,arguments)}},{key:"onInitialize",value:function(){var t;return(t=this.props).onInitialize.apply(t,arguments)}},{key:"onRender",value:function(){var t;return(t=this.props).onRender.apply(t,arguments)}},{key:"onFinalize",value:function(){var t;return(t=this.props).onFinalize.apply(t,arguments)}},{key:"getHTMLControlValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=document.getElementById(t);return n?Number(n.value):e}},{key:"setViewParameters",value:function(){return j.h.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}},{key:"_startLoop",value:function(){var t=this;J(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame((function e(){t._running&&(t.redraw(),t._animationFrameId=t._requestAnimationFrame(e))}))}},{key:"_getPageLoadPromise",value:function(){return this._pageLoadPromise||(this._pageLoadPromise=et?new Promise((function(t,e){et&&"complete"===document.readyState?t(document):window.addEventListener("load",(function(){t(document)}))})):Promise.resolve({})),this._pageLoadPromise}},{key:"_setDisplay",value:function(t){this.display&&(this.display.delete(),this.display.animationLoop=null),t&&(t.animationLoop=this),this.display=t}},{key:"_requestAnimationFrame",value:function(t){var e;this.display&&this.display.requestAnimationFrame(t)||(e=t,"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60))}},{key:"_renderFrame",value:function(){var t;this.display?(t=this.display)._renderFrame.apply(t,arguments):this.onRender.apply(this,arguments)}},{key:"_clearNeedsRedraw",value:function(){this.needsRedraw=null}},{key:"_setupFrame",value:function(){this._onSetupFrame?this._onSetupFrame(this.animationProps):(this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer())}},{key:"_initializeCallbackData",value:function(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}},{key:"_updateCallbackData",value:function(){var t=this._getSizeAndAspect(),e=t.width,n=t.height,r=t.aspect;e===this.animationProps.width&&n===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),r!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=n,this.animationProps.aspect=r,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}},{key:"_finalizeCallbackData",value:function(){this.onFinalize(this.animationProps)}},{key:"_addCallbackData",value:function(t){"object"===Object(F.a)(t)&&null!==t&&(this.animationProps=Object.assign({},this.animationProps,t))}},{key:"_createWebGLContext",value:function(t){if(this.offScreen=t.canvas&&"undefined"!=typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas,t=Object.assign({},t,this.props.glOptions),this.gl=this.props.gl?Object(j.e)(this.props.gl,t):this.onCreateContext(t),!Object(j.f)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");Object(j.i)(this.gl),this._createInfoDiv()}},{key:"_createInfoDiv",value:function(){if(this.gl.canvas&&this.props.onAddHTML){var t=document.createElement("div");document.body.appendChild(t),t.style.position="relative";var e=document.createElement("div");e.style.position="absolute",e.style.left="10px",e.style.bottom="10px",e.style.width="300px",e.style.background="white",t.appendChild(this.gl.canvas),t.appendChild(e);var n=this.props.onAddHTML(e);n&&(e.innerHTML=n)}}},{key:"_getSizeAndAspect",value:function(){var t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight,n=1,r=this.gl.canvas;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:t>0&&e>0&&(n=t/e),{width:t,height:e,aspect:n}}},{key:"_resizeViewport",value:function(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}},{key:"_resizeCanvasDrawingBuffer",value:function(){this.autoResizeDrawingBuffer&&Object(j.j)(this.gl,{useDevicePixels:this.useDevicePixels})}},{key:"_createFramebuffer",value:function(){this.props.createFramebuffer&&(this.framebuffer=new O.a(this.gl))}},{key:"_resizeFramebuffer",value:function(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}},{key:"_beginTimers",value:function(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}},{key:"_endTimers",value:function(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}},{key:"_startEventHandling",value:function(){var t=this.gl.canvas;t&&(t.addEventListener("mousemove",this._onMousemove),t.addEventListener("mouseleave",this._onMouseleave))}},{key:"_onMousemove",value:function(t){this.animationProps._mousePosition=[t.offsetX,t.offsetY]}},{key:"_onMouseleave",value:function(t){this.animationProps._mousePosition=null}}]),t}(),it=n(188),at=n(158),ot=n(19),st=n(103),ut=n.n(st),ct=1,lt=2,ht=4,ft={mousedown:ct,mousemove:lt,mouseup:ht};$=ut.a.PointerEventInput,tt=$.prototype.handler,$.prototype.handler=function(t){var e=this.store;t.button>0&&(function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(e,(function(e){return e.pointerId===t.pointerId}))||e.push(t)),tt.call(this,t)},ut.a.MouseInput.prototype.handler=function(t){var e=ft[t.type];e&ct&&t.button>=0&&(this.pressed=!0),e&lt&&0===t.which&&(e=ht),this.pressed&&(e&ht&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};var dt=ut.a.Manager,vt=ut.a,pt=vt?[[vt.Rotate,{enable:!1}],[vt.Pinch,{enable:!1}],[vt.Swipe,{enable:!1}],[vt.Pan,{threshold:0,enable:!1}],[vt.Press,{enable:!1}],[vt.Tap,{event:"doubletap",taps:2,enable:!1}],[vt.Tap,{event:"anytap",enable:!1}],[vt.Tap,{enable:!1}]]:null,gt={rotate:["pinch"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},bt={doubletap:["tap"]},yt={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},mt=["keydown","keyup"],_t=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],Ot=["wheel","mousewheel","DOMMouseScroll"],wt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},jt={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},kt="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",xt="undefined"!=typeof window?window:global,Et=("undefined"!=typeof global?global:window,"undefined"!=typeof document&&document,!1);try{var Pt={get passive(){return Et=!0,!0}};xt.addEventListener("test",Pt,Pt),xt.removeEventListener("test",Pt,Pt)}catch(t){}var Tt=-1!==kt.indexOf("firefox"),St=Ot,At=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(z.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},i),this.events=St.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent,!!Et&&{passive:!1})}))}return Object(U.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"wheel"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){if(this.options.enable){var e=t.deltaY;xt.WheelEvent&&(Tt&&t.deltaMode===xt.WheelEvent.DOM_DELTA_PIXEL&&(e/=xt.devicePixelRatio),t.deltaMode===xt.WheelEvent.DOM_DELTA_LINE&&(e*=40));var n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625==0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}}},{key:"_onWheel",value:function(t,e,n){this.callback({type:"wheel",center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),Mt=_t,Lt=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(z.a)(this,t),this.element=e,this.callback=n,this.pressed=!1,this.options=Object.assign({enable:!0},i),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=Mt.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(U.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"pointermove"===t&&(this.enableMoveEvent=e),"pointerover"===t&&(this.enableOverEvent=e),"pointerout"===t&&(this.enableOutEvent=e),"pointerleave"===t&&(this.enableLeaveEvent=e)}},{key:"handleEvent",value:function(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}},{key:"handleOverEvent",value:function(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:"pointerover",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleOutEvent",value:function(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:"pointerout",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleLeaveEvent",value:function(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:"pointerleave",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleMoveEvent",value:function(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}]),t}(),Ct=mt,It=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(z.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},i),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=Ct.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),e.tabIndex=1,e.style.outline="none",this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(U.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"keydown"===t&&(this.enableDownEvent=e),"keyup"===t&&(this.enableUpEvent=e)}},{key:"handleEvent",value:function(t){var e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:"keydown",srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:"keyup",srcEvent:t,key:t.key,target:t.target}))}}]),t}(),Rt=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(z.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},r),this.handleEvent=this.handleEvent.bind(this),e.addEventListener("contextmenu",this.handleEvent)}return Object(U.a)(t,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(t,e){"contextmenu"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){this.options.enable&&this.callback({type:"contextmenu",center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),Ft=1,Dt=2,Nt=4,Bt={pointerdown:Ft,pointermove:Dt,pointerup:Nt,mousedown:Ft,mousemove:Dt,mouseup:Nt},zt=1,Ut=2,Vt=3,Gt=0,Ht=1,Wt=2,Xt=1,Zt=2,Yt=4;var qt={srcElement:"root",priority:0},Kt=function(){function t(e){Object(z.a)(this,t),this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this)}return Object(U.a)(t,[{key:"isEmpty",value:function(){return 0===this.handlers.length}},{key:"add",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.handlers,a=this.handlersByElement;n&&("object"!==Object(F.a)(n)||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},qt,n):qt;var o=a.get(n.srcElement);o||(o=[],a.set(n.srcElement,o));var s={type:t,handler:e,srcElement:n.srcElement,priority:n.priority,once:r};i.push(s);for(var u=o.length-1;u>=0&&!(o[u].priority>=s.priority);)u--;o.splice(u+1,0,s)}},{key:"remove",value:function(t,e){for(var n=this.handlers,r=this.handlersByElement,i=n.length-1;i>=0;i--){var a=n[i];if(a.type===t&&a.handler===e){n.splice(i,1);var o=r.get(a.srcElement);o.splice(o.indexOf(a),1),0===o.length&&r.delete(a.srcElement)}}}},{key:"handleEvent",value:function(t){if(!this.isEmpty()){for(var e=this._normalizeEvent(t),n=t.srcEvent.target;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}}},{key:"_emit",value:function(t,e){var n=this.handlersByElement.get(e);if(n){for(var r=!1,i=function(){t.handled=!0},a=function(){t.handled=!0,r=!0},o=[],s=0;s<n.length;s++){var u=n[s],c=u.type,l=u.handler,h=u.once;if(l(Object.assign({},t,{type:c,stopPropagation:i,stopImmediatePropagation:a})),h&&o.push(n[s]),r)break}for(var f=0;f<o.length;f++){var d=o[f];c=d.type,l=d.handler;this.remove(c,l)}}}},{key:"_normalizeEvent",value:function(t){var e=this.eventManager.element;return Object.assign({},t,function(t){var e=Bt[t.srcEvent.type];if(!e)return null;var n=t.srcEvent,r=n.buttons,i=n.button,a=n.which,o=!1,s=!1,u=!1;return e===Nt||e===Dt&&!Number.isFinite(r)?(o=a===zt,s=a===Ut,u=a===Vt):e===Dt?(o=Boolean(r&Xt),s=Boolean(r&Yt),u=Boolean(r&Zt)):e===Ft&&(o=i===Gt,s=i===Ht,u=i===Wt),{leftButton:o,middleButton:s,rightButton:u}}(t),function(t,e){var n=t.srcEvent;if(!t.center&&!Number.isFinite(n.clientX))return null;var r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),a=i.width/e.offsetWidth,o=i.height/e.offsetHeight;return{center:r,offsetCenter:{x:(r.x-i.left-e.clientLeft)/a,y:(r.y-i.top-e.clientTop)/o}}}(t,e),{handled:!1,rootElement:e})}}]),t}(),Qt={events:null,recognizers:null,recognizerOptions:{},Manager:dt,touchAction:"none"},Jt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(z.a)(this,t),this.options=Object.assign({},Qt,n),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(e);var r=n.events;r&&this.on(r)}return Object(U.a)(t,[{key:"setElement",value:function(t){var e=this;if(this.element&&this.destroy(),this.element=t,t){var n=this.options,r=n.Manager;for(var i in this.manager=new r(t,{touchAction:n.touchAction,recognizers:n.recognizers||pt}).on("hammer.input",this._onBasicInput),n.recognizers||Object.keys(gt).forEach((function(t){var n=e.manager.get(t);n&&gt[t].forEach((function(t){n.recognizeWith(t)}))})),n.recognizerOptions){var a=this.manager.get(i);if(a){var o=n.recognizerOptions[i];delete o.enable,a.set(o)}}this.wheelInput=new At(t,this._onOtherEvent,{enable:!1}),this.moveInput=new Lt(t,this._onOtherEvent,{enable:!1}),this.keyInput=new It(t,this._onOtherEvent,{enable:!1}),this.contextmenuInput=new Rt(t,this._onOtherEvent,{enable:!1});var s=!0,u=!1,c=void 0;try{for(var l,h=this.events[Symbol.iterator]();!(s=(l=h.next()).done);s=!0){var f=Object(ot.a)(l.value,2),d=f[0],v=f[1];v.isEmpty()||(this._toggleRecognizer(v.recognizerName,!0),this.manager.on(d,v.handleEvent))}}catch(t){u=!0,c=t}finally{try{s||null==h.return||h.return()}finally{if(u)throw c}}}}},{key:"destroy",value:function(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}},{key:"on",value:function(t,e,n){this._addEventHandler(t,e,n,!1)}},{key:"once",value:function(t,e,n){this._addEventHandler(t,e,n,!0)}},{key:"off",value:function(t,e){this._removeEventHandler(t,e)}},{key:"_toggleRecognizer",value:function(t,e){var n=this.manager;if(n){var r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});var i=bt[t];i&&!this.options.recognizers&&i.forEach((function(i){var a=n.get(i);e?(a.requireFailure(t),r.dropRequireFailure(i)):a.dropRequireFailure(t)}))}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}}},{key:"_addEventHandler",value:function(t,e,n,r){if("string"==typeof t){var i=this.manager,a=this.events,o=jt[t]||t,s=a.get(o);s||(s=new Kt(this),a.set(o,s),s.recognizerName=wt[o]||o,i&&i.on(o,s.handleEvent)),this._toggleRecognizer(s.recognizerName,!0),s.add(t,e,n,r)}else for(var u in n=e,t)this._addEventHandler(u,t[u],n,r)}},{key:"_removeEventHandler",value:function(t,e){if("string"==typeof t){var n=this.events,r=jt[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){var a=i.recognizerName,o=!1,s=!0,u=!1,c=void 0;try{for(var l,h=n.values()[Symbol.iterator]();!(s=(l=h.next()).done);s=!0){var f=l.value;if(f.recognizerName===a&&!f.isEmpty()){o=!0;break}}}catch(t){u=!0,c=t}finally{try{s||null==h.return||h.return()}finally{if(u)throw c}}o||this._toggleRecognizer(a,!1)}}else for(var d in t)this._removeEventHandler(d,t[d])}},{key:"_onBasicInput",value:function(t){var e=t.srcEvent,n=yt[e.type];n&&this.manager.emit(n,t)}},{key:"_onOtherEvent",value:function(t){this.manager.emit(t.type,t)}}]),t}(),$t=n(17);function te(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ee(){}n.d(e,"a",(function(){return re}));var ne={id:"deckgl-overlay",width:"100%",height:"100%",pickingRadius:0,layerFilter:null,glOptions:{},gl:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",_framebuffer:null,_animate:!1,onWebGLInitialized:ee,onResize:ee,onViewStateChange:ee,onBeforeRender:ee,onAfterRender:ee,onLoad:ee,_onMetrics:null,getCursor:function(t){return t.isDragging?"grabbing":"grab"},debug:!1,drawPickingColors:!1},re=function(){function t(e){o()(this,t),e=Object.assign({},ne,e),this.width=0,this.height=0,this.viewManager=null,this.layerManager=null,this.effectManager=null,this.deckRenderer=null,this.deckPicker=null,this._needsRedraw=!0,this._pickRequest={},this._lastPointerDownInfo=null,this.viewState=e.initialViewState||null,this.interactiveState={isDragging:!1},this._onEvent=this._onEvent.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._pickAndCallback=this._pickAndCallback.bind(this),this._onRendererInitialized=this._onRendererInitialized.bind(this),this._onRenderFrame=this._onRenderFrame.bind(this),this._onViewStateChange=this._onViewStateChange.bind(this),this._onInteractiveStateChange=this._onInteractiveStateChange.bind(this),e.viewState&&e.initialViewState&&f.a.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===Object(R.getBrowser)()&&f.a.warn("IE 11 support will be deprecated in v8.0")(),e.gl||"undefined"!=typeof document&&(this.canvas=this._createCanvas(e)),this.animationLoop=this._createAnimationLoop(e),this.stats=new at.a({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(e),this.animationLoop.start()}return u()(t,[{key:"finalize",value:function(){this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,this.layerManager&&(this.layerManager.finalize(),this.layerManager=null),this.viewManager&&(this.viewManager.finalize(),this.viewManager=null),this.effectManager&&(this.effectManager.finalize(),this.effectManager=null),this.deckRenderer&&(this.deckRenderer.finalize(),this.deckRenderer=null),this.deckPicker&&(this.deckPicker.finalize(),this.deckPicker=null),this.eventManager&&this.eventManager.destroy(),this.tooltip&&(this.tooltip.remove(),this.tooltip=null),this.props.canvas||this.props.gl||!this.canvas||(this.canvas.parentElement.removeChild(this.canvas),this.canvas=null)}},{key:"setProps",value:function(t){this.stats.get("setProps Time").timeStart(),"onLayerHover"in t&&f.a.removed("onLayerHover","onHover")(),"onLayerClick"in t&&f.a.removed("onLayerClick","onClick")(),t=Object.assign({},this.props,t),this.props=t,this._setCanvasSize(t);var e=Object.assign({},t,{views:this._getViews(this.props),width:this.width,height:this.height}),n=this._getViewState(t);n&&(e.viewState=n),this.viewManager&&this.viewManager.setProps(e),this.layerManager&&this.layerManager.setProps(e),this.effectManager&&this.effectManager.setProps(e),this.animationLoop&&this.animationLoop.setProps(e),this.deckRenderer&&this.deckRenderer.setProps(e),this.deckPicker&&this.deckPicker.setProps(e),this.stats.get("setProps Time").timeEnd()}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(this.props._animate)return"Deck._animate";var e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var n=this.viewManager.needsRedraw(t),r=this.layerManager.needsRedraw(t),i=this.effectManager.needsRedraw(t),a=this.deckRenderer.needsRedraw(t);return e=e||n||r||i||a}},{key:"redraw",value:function(t){if(this.layerManager){var e=t||this.needsRedraw({clearRedrawFlags:!0});e&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}}},{key:"getViews",value:function(){return this.viewManager.views}},{key:"getViewports",value:function(t){return this.viewManager.getViewports(t)}},{key:"pickObject",value:function(t){var e=this._pick("pickObject","pickObject Time",t).result;return e.length?e[0]:null}},{key:"pickMultipleObjects",value:function(t){return t.depth=t.depth||10,this._pick("pickObject","pickMultipleObjects Time",t).result}},{key:"pickObjects",value:function(t){return this._pick("pickObjects","pickObjects Time",t)}},{key:"_pick",value:function(t,e,n){var r=this.stats;r.get("Pick Count").incrementCount(),r.get(e).timeStart();var i=this.deckPicker[t](Object.assign({layers:this.layerManager.getLayers(n),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport},n));return r.get(e).timeEnd(),i}},{key:"_createCanvas",value:function(t){var e=t.canvas;("string"==typeof e&&(e=document.getElementById(e),Object(l.a)(e)),e)||(e=document.createElement("canvas"),(t.parent||document.body).appendChild(e));var n=t.id,r=t.style;return e.id=n,Object.assign(e.style,r),e}},{key:"_setCanvasSize",value:function(t){if(this.canvas){var e=t.width,n=t.height;(e||0===e)&&(e=Number.isFinite(e)?"".concat(e,"px"):e,this.canvas.style.width=e),(n||0===n)&&(n=Number.isFinite(n)?"".concat(n,"px"):n,this.canvas.style.position="absolute",this.canvas.style.height=n)}}},{key:"_updateCanvasSize",value:function(){if(this._checkForCanvasSizeChange()){var t=this.width,e=this.height;this.viewManager.setProps({width:t,height:e}),this.props.onResize({width:this.width,height:this.height})}}},{key:"_checkForCanvasSizeChange",value:function(){var t=this.canvas;if(!t)return!1;var e=t.clientWidth||t.width,n=t.clientHeight||t.height;return(e!==this.width||n!==this.height)&&(this.width=e,this.height=n,!0)}},{key:"_createAnimationLoop",value:function(t){var e=this,n=t.width,r=t.height,i=t.gl,a=t.glOptions,o=t.debug,s=t.useDevicePixels,u=t.autoResizeDrawingBuffer;return new rt({width:n,height:r,useDevicePixels:s,autoResizeDrawingBuffer:u,autoResizeViewport:!1,gl:i,onCreateContext:function(t){return Object(j.a)(Object.assign({},a,t,{canvas:e.canvas,debug:o}))},onInitialize:this._onRendererInitialized,onRender:this._onRenderFrame,onBeforeRender:t.onBeforeRender,onAfterRender:t.onAfterRender})}},{key:"_getViewState",value:function(t){return t.viewState||this.viewState}},{key:"_getViews",value:function(t){var e=t.views||[new p.a({id:"default-view"})];return(e=Array.isArray(e)?e:[e]).length&&t.controller&&(e[0].props.controller=t.controller),e}},{key:"_onPointerMove",value:function(t){var e=this._pickRequest;if("pointerleave"===t.type)e.x=-1,e.y=-1,e.radius=0;else{if(t.leftButton||t.rightButton)return;var n=t.offsetCenter;if(!n)return;e.x=n.x,e.y=n.y,e.radius=this.props.pickingRadius}this.layerManager&&(this.layerManager.context.mousePosition={x:e.x,y:e.y}),e.callback=this.props.onHover,e.event=t,e.mode="hover"}},{key:"_pickAndCallback",value:function(){var t=this._pickRequest;if(t.mode){var e=this._pick("pickObject","pickObject Time",t),n=e.result,r=e.emptyInfo,i=(t.callback||this.props.getTooltip)&&(n.find((function(t){return t.index>=0}))||r);if(this.props.getTooltip){var a=this.props.getTooltip(i);this.tooltip.setTooltip(a,i.x,i.y)}t.callback&&!i.handled&&t.callback(i,t.event),t.mode=null}}},{key:"_updateCursor",value:function(){var t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.interactiveState))}},{key:"_setGLContext",value:function(t){if(!this.layerManager){this.canvas||(this.canvas=t.canvas,Object(j.e)(t,{enable:!0,copyState:!0})),this.tooltip=new C(this.canvas),Object(j.k)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);var e=new it.a;for(var n in e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new Jt(this.props.parent||t.canvas,{touchAction:this.props.touchAction,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}}),$t.b)this.eventManager.on(n,this._onEvent);this.viewManager=new v({timeline:e,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange,onInteractiveStateChange:this._onInteractiveStateChange,views:this._getViews(this.props),viewState:this._getViewState(this.props),width:this.width,height:this.height});var r=this.viewManager.getViewports()[0];this.layerManager=new c.a(t,{deck:this,stats:this.stats,viewport:r,timeline:e}),this.effectManager=new y,this.deckRenderer=new _.a(t),this.deckPicker=new M(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}}},{key:"_drawLayers",value:function(t,e){var n=this.layerManager.context.gl;Object(j.k)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers(Object.assign({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",redrawReason:t,effects:this.effectManager.getEffects()},e)),this.props.onAfterRender({gl:n})}},{key:"_onRendererInitialized",value:function(t){var e=t.gl;this._setGLContext(e)}},{key:"_onRenderFrame",value:function(t){this._getFrameStats(),this._metricsCounter++%60==0&&(this._getMetrics(),this.stats.reset(),f.a.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(!1),this.viewManager&&this.viewManager.updateViewStates()}},{key:"_onViewStateChange",value:function(t){var e=this.props.onViewStateChange(t)||t.viewState;this.viewState&&(this.viewState=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?te(n,!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):te(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.viewState,i()({},t.viewId,e)),this.props.viewState||this.viewManager.setProps({viewState:this.viewState}))}},{key:"_onInteractiveStateChange",value:function(t){var e=t.isDragging,n=void 0!==e&&e;n!==this.interactiveState.isDragging&&(this.interactiveState.isDragging=n)}},{key:"_onEvent",value:function(t){var e=$t.b[t.type],n=t.offsetCenter;if(e&&n){var r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),a=i.layer,o=a&&(a[e.handler]||a.props[e.handler]),s=this.props[e.handler],u=!1;o&&(u=o.call(a,i,t)),!u&&s&&s(i,t)}}},{key:"_onPointerDown",value:function(t){var e=t.offsetCenter;this._lastPointerDownInfo=this.pickObject({x:e.x,y:e.y,radius:this.props.pickingRadius})}},{key:"_getFrameStats",value:function(){var t=this.stats;t.get("frameRate").timeEnd(),t.get("frameRate").timeStart();var e=this.animationLoop.stats;t.get("GPU Time").addTime(e.get("GPU Time").lastTiming),t.get("CPU Time").addTime(e.get("CPU Time").lastTiming)}},{key:"_getMetrics",value:function(){var t=this.metrics,e=this.stats;t.fps=e.get("frameRate").getHz(),t.setPropsTime=e.get("setProps Time").time,t.updateAttributesTime=e.get("Update Attributes").time,t.framesRedrawn=e.get("Redraw Count").count,t.pickTime=e.get("pickObject Time").time+e.get("pickMultipleObjects Time").time+e.get("pickObjects Time").time,t.pickCount=e.get("Pick Count").count,t.gpuTime=e.get("GPU Time").time,t.cpuTime=e.get("CPU Time").time,t.gpuTimePerFrame=e.get("GPU Time").getAverageTime(),t.cpuTimePerFrame=e.get("CPU Time").getAverageTime();var n=V.a.get("Memory Usage");t.bufferMemory=n.get("Buffer Memory").count,t.textureMemory=n.get("Texture Memory").count,t.renderbufferMemory=n.get("Renderbuffer Memory").count,t.gpuMemory=n.get("GPU Memory").count}}]),t}();re.getPropTypes=function(t){return{id:t.string,width:t.oneOfType([t.number,t.string]),height:t.oneOfType([t.number,t.string]),layers:t.oneOfType([t.object,t.array]),layerFilter:t.func,views:t.oneOfType([t.object,t.array]),viewState:t.object,effects:t.arrayOf(t.instanceOf(m.a)),controller:t.oneOfType([t.func,t.bool,t.object]),gl:t.object,glOptions:t.object,parameters:t.object,pickingRadius:t.number,useDevicePixels:t.oneOfType([t.bool,t.number]),touchAction:t.string,onWebGLInitialized:t.func,onResize:t.func,onViewStateChange:t.func,onBeforeRender:t.func,onAfterRender:t.func,onLoad:t.func,debug:t.bool,drawPickingColors:t.bool,_framebuffer:t.object,_animate:t.bool}},re.defaultProps=ne,re.VERSION=I.a.VERSION},function(t,e,n){"use strict";n.r(e);var r=n(17),i=n(100),a=n(106),o=n(80),s=n(2),u=n.n(s),c=n(4),l=n.n(c),h=n(101),f=[255,255,255],d=1,v=[0,0,1],p=[0,0,1],g=0,b=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t);var n=e.color,r=void 0===n?f:n,i=e.intensity,a=void 0===i?d:i,o=e.position,s=void 0===o?p:o;this.id=e.id||"point-".concat(g++),this.color=r,this.intensity=a,this.type="point",this.position=s,this.attenuation=function(t){if("attenuation"in t)return t.attenuation;if("intensity"in t)return[0,0,t.intensity];return v}(e),this.projectedLight=Object.assign({},this)}return l()(t,[{key:"getProjectedLight",value:function(t){var e=t.layer,n=this.projectedLight,i=e.context.viewport,a=e.props,o=a.coordinateSystem,s=a.coordinateOrigin,u=Object(h.b)(this.position,{viewport:i,coordinateSystem:o,coordinateOrigin:s,fromCoordinateSystem:i.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),t}();var y=n(10),m=n.n(y),_=n(7),O=n.n(_),w=n(11),j=n.n(w),k=n(90),x=function(t){function e(){return u()(this,e),m()(this,O()(e).apply(this,arguments))}return j()(e,t),l()(e,[{key:"getProjectedLight",value:function(t){var e=t.layer,n=this.projectedLight,r=e.context.viewport,i=e.props,a=i.coordinateSystem,o=i.coordinateOrigin,s=i.modelMatrix,u=Object(k.b)({viewport:r,modelMatrix:s,coordinateSystem:a,coordinateOrigin:o}).project_uCameraPosition;return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),e}(b),E=n(154),P=n.n(E),T=Math.PI/180,S=864e5,A=2440588,M=2451545,L=23.4397*T,C=357.5291,I=.98560028,R=280.147,F=360.9856235;function D(t,e,n){var r,i,a,o,s,u,c=T*-n,l=T*e,h=function(t){return function(t){return t/S-.5+A}(t)-M}(t),f=(r=T*(C+I*h),i=T*(1.9148*Math.sin(r)+.02*Math.sin(2*r)+3e-4*Math.sin(3*r)),a=r+i+102.9372*T+Math.PI,{declination:(o=a,s=0,u=o,Math.asin(Math.sin(s)*Math.cos(L)+Math.cos(s)*Math.sin(L)*Math.sin(u))),rightAscension:N(a,0)}),d=function(t,e){return T*(R+F*t)-e}(h,c)-f.rightAscension;return{azimuth:B(d,l,f.declination),altitude:z(d,l,f.declination)}}function N(t,e){var n=t;return Math.atan2(Math.sin(n)*Math.cos(L)-Math.tan(e)*Math.sin(L),Math.cos(n))}function B(t,e,n){var r=t,i=e,a=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(a)*Math.cos(i))}function z(t,e,n){var r=t,i=e,a=n;return Math.asin(Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos(r))}var U=function(t){function e(t){var n,r=t.timestamp,i=P()(t,["timestamp"]);return u()(this,e),(n=m()(this,O()(e).call(this,i))).timestamp=r,n}return j()(e,t),l()(e,[{key:"getProjectedLight",value:function(t){var e=t.layer.context.viewport,n=e.latitude,r=e.longitude;return this.direction=function(t,e,n){var r=D(t,e,n),i=r.azimuth,a=r.altitude,o=i+Math.PI;return[-Math.sin(o),-Math.cos(o),-Math.sin(a)]}(this.timestamp,n,r),this}}]),e}(o.a),V=n(75),G=n(5),H=n(1),W=n(13),X=n(9),Z=n(14),Y=n(128),q=n(52),K="attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n  gl_Position = vec4(aClipSpacePosition, 0., 1.);\n  position = aClipSpacePosition;\n  coordinate = aCoordinate;\n  uv = aTexCoord;\n}\n",Q=[-1,-1,1,-1,-1,1,1,1],J=function(t){function e(t,n){var r;Object(H.a)(this,e);var i=Q.map((function(t){return-1===t?0:t}));return(r=Object(W.a)(this,Object(X.a)(e).call(this,t,Object.assign({},n,{vs:K,geometry:new q.a({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(Q)},aTexCoord:{size:2,value:new Float32Array(i)},aCoordinate:{size:2,value:new Float32Array(i)}}})})))).setVertexCount(4),r}return Object(Z.a)(e,t),e}(Y.a),$=n(130),tt=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,e),n=m()(this,O()(e).call(this,t,r));var i=r.module,a=r.fs,o=r.id,s=r.moduleProps;return n.model=n._getModel(t,i,a,o,s),n}return j()(e,t),l()(e,[{key:"render",value:function(t){var e=this,n=this.gl;Object(G.l)(n,{framebuffer:t.outputBuffer,clearColor:[0,0,0,0]},(function(){return e._renderPass(n,t)}))}},{key:"delete",value:function(){this.model.delete(),this.model=null}},{key:"_getModel",value:function(t,e,n,r,i){var a=new J(t,{id:r,fs:n,modules:[e]}),o=Object.assign(e.getUniforms(),e.getUniforms(i));return a.setUniforms(o),a}},{key:"_renderPass",value:function(t,e){var n=e.inputBuffer;e.outputBuffer;Object($.a)(t,{color:!0}),this.model.draw({uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}]),e}(n(122).a),et=n(139),nt=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,e),(n=m()(this,O()(e).call(this,r))).id="".concat(t.name,"-pass"),Object(et.b)(t),n.module=t,n}return j()(e,t),l()(e,[{key:"postRender",value:function(t,e){this.passes||(this.passes=function(t,e,n,r){if(e.filter||e.sampler){var i=at(e);return[new tt(t,{id:n,module:e,fs:i,moduleProps:r})]}return(e.passes||[]).map((function(i,a){var o=at(e,i),s="".concat(n,"-").concat(a);return new tt(t,{id:s,module:e,fs:o,moduleProps:r})}))}(t,this.module,this.id,this.props));for(var n=e.target,r=e.inputBuffer,i=e.swapBuffer,a=0;a<this.passes.length;a++){n&&a===this.passes.length-1&&(i=n),this.passes[a].render({inputBuffer:r,outputBuffer:i});var o=i;i=r,r=o}return r}},{key:"cleanup",value:function(){if(this.passes){var t=!0,e=!1,n=void 0;try{for(var r,i=this.passes[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){r.value.delete()}}catch(t){e=!0,n=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw n}}this.passes=null}}}]),e}(V.a);var rt=function(t){return"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = texture2D(texture, texCoord);\n  gl_FragColor = ".concat(t,"(gl_FragColor, texSize, texCoord);\n}\n")},it=function(t){return"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = ".concat(t,"(texture, texSize, texCoord);\n}\n")};function at(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(e.filter){var n="string"==typeof e.filter?e.filter:"".concat(t.name,"_filterColor");return rt(n)}if(e.sampler){var r="string"==typeof e.sampler?e.sampler:"".concat(t.name,"_sampleColor");return it(r)}return null}var ot=n(74),st=n(148),ut=n(110),ct=n(115),lt=n(86),ht=n(47),ft=n.n(ht),dt=n(33),vt=n(59),pt=function(t){function e(){return u()(this,e),m()(this,O()(e).apply(this,arguments))}return j()(e,t),l()(e,[{key:"getSubLayers",value:function(){return this.internalState&&this.internalState.subLayers||[]}},{key:"initializeState",value:function(){}},{key:"setState",value:function(t){ft()(O()(e.prototype),"setState",this).call(this,t),this.setNeedsUpdate()}},{key:"getPickingInfo",value:function(t){var e=t.info,n=e.object;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id?Object.assign(e,{object:n.__source.object,index:n.__source.index}):e}},{key:"renderLayers",value:function(){return null}},{key:"shouldRenderSubLayer",value:function(t,e){var n=this.props._subLayerProps;return e&&e.length||n&&n[t]}},{key:"getSubLayerClass",value:function(t,e){var n=this.props._subLayerProps;return n&&n[t]&&n[t].type||e}},{key:"getSubLayerRow",value:function(t,e,n){return t.__source={parent:this,object:e,index:n},t}},{key:"getSubLayerAccessor",value:function(t){if("function"==typeof t){var e={data:this.props.data,target:[]};return function(n,r){return n.__source?(e.index=n.__source.index,t(n.__source.object,e)):t(n,r)}}return t}},{key:"getSubLayerProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.props,n=e.opacity,r=e.pickable,i=e.visible,a=e.parameters,o=e.getPolygonOffset,s=e.highlightedObjectIndex,u=e.autoHighlight,c=e.highlightColor,l=e.coordinateSystem,h=e.coordinateOrigin,f=e.wrapLongitude,d=e.positionFormat,v=e.modelMatrix,p=e.extensions,g=e._subLayerProps,b={opacity:n,pickable:r,visible:i,parameters:a,getPolygonOffset:o,highlightedObjectIndex:s,autoHighlight:u,highlightColor:c,coordinateSystem:l,coordinateOrigin:h,wrapLongitude:f,positionFormat:d,modelMatrix:v,extensions:p},y=g&&g[t.id],m=y&&y.updateTriggers,_=t.id||"sublayer";if(y){var O=this.constructor._propTypes;for(var w in y){var j=O[w];j&&"accessor"===j.type&&(y[w]=this.getSubLayerAccessor(y[w]))}}Object.assign(b,t,y,{id:"".concat(this.props.id,"-").concat(_),updateTriggers:Object.assign({all:this.props.updateTriggers.all},t.updateTriggers,m)});var k=!0,x=!1,E=void 0;try{for(var P,T=p[Symbol.iterator]();!(k=(P=T.next()).done);k=!0){var S=P.value,A=S.getSubLayerProps.call(this,S);A&&Object.assign(b,A,{updateTriggers:Object.assign(b.updateTriggers,A.updateTriggers)})}}catch(t){x=!0,E=t}finally{try{k||null==T.return||T.return()}finally{if(x)throw E}}return b}},{key:"_getAttributeManager",value:function(){return null}},{key:"_renderLayers",value:function(){var t=this.internalState.subLayers,e=!t||this.needsUpdate();e&&(t=this.renderLayers(),t=Object(vt.b)(t,{filter:Boolean}),this.internalState.subLayers=t),Object(dt.a)("compositeLayer.renderLayers",this,e,t);var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){a.value.parent=this}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"isComposite",get:function(){return!0}}]),e}(lt.a);pt.layerName="CompositeLayer";var gt=n(119),bt=n(44),yt=n(108),mt=n(150),_t=n(81),Ot=n(147),wt=n(198),jt=n(89),kt=n(61),xt=n(107),Et=n(25),Pt=n(8),Tt=n(58),St=n(91),At=n(38),Mt={position:[0,0,0],pitch:0,bearing:0,maxPitch:90,minPitch:-90},Lt=function(t){function e(t){var n,r=t.width,i=t.height,a=t.position,o=void 0===a?Mt.position:a,s=t.bearing,c=void 0===s?Mt.bearing:s,l=t.pitch,h=void 0===l?Mt.pitch:l,f=t.longitude,d=t.latitude,v=t.maxPitch,p=void 0===v?Mt.maxPitch:v,g=t.minPitch,b=void 0===g?Mt.minPitch:g,y=t.startBearing,_=t.startPitch,w=t.startZoomPosition,j=t.startZoom;return u()(this,e),(n=m()(this,O()(e).call(this,{width:r,height:i,position:o,bearing:c,pitch:h,longitude:f,latitude:d,maxPitch:p,minPitch:b})))._interactiveState={startBearing:y,startPitch:_,startZoomPosition:w,startZoom:j},n}return j()(e,t),l()(e,[{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"getDirection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=new Pt.d({bearing:this._viewportProps.bearing,pitch:t?90:90+this._viewportProps.pitch}),n=e.toVector3().normalize();return n}},{key:"panStart",value:function(){return this}},{key:"pan",value:function(){return this}},{key:"panEnd",value:function(){return this}},{key:"rotateStart",value:function(t){t.pos;return this._getUpdatedState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=this._interactiveState,i=r.startBearing,a=r.startPitch;return Number.isFinite(i)&&Number.isFinite(a)?this._getUpdatedState({bearing:i-180*e,pitch:a-90*n}):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(){return this._getUpdatedState({startZoomPosition:this._viewportProps.position,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.scale,n=this._interactiveState.startZoomPosition;n||(n=this._viewportProps.position);var r=this.getDirection();return this._move(r,Math.log2(e),n)}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}},{key:"moveLeft",value:function(){var t=this.getDirection(!0);return this._move(t.rotateZ({radians:Math.PI/2}))}},{key:"moveRight",value:function(){var t=this.getDirection(!0);return this._move(t.rotateZ({radians:-Math.PI/2}))}},{key:"moveUp",value:function(){var t=this.getDirection(!0);return this._move(t)}},{key:"moveDown",value:function(){var t=this.getDirection(!0);return this._move(t.negate())}},{key:"rotateLeft",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch+10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch-10})}},{key:"zoomIn",value:function(){return this.zoom({scale:2})}},{key:"zoomOut",value:function(){return this.zoom({scale:.5})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.bearing,i=n.longitude;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_move",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._viewportProps.position,r=t.scale(20*e);return this._getUpdatedState({position:new Pt.c(n).add(r)})}},{key:"_getUpdatedState",value:function(t){return new e(Object.assign({},this._viewportProps,this._interactiveState,t))}},{key:"_applyConstraints",value:function(t){var e=t.pitch,n=t.maxPitch,r=t.minPitch,i=t.longitude,a=t.bearing;return t.pitch=Object(Pt.e)(e,r,n),(i<-180||i>180)&&(t.longitude=Object(At.e)(i+180,360)-180),(a<-180||a>180)&&(t.bearing=Object(At.e)(a+180,360)-180),t}}]),e}(St.a),Ct=function(t){function e(t){return u()(this,e),m()(this,O()(e).call(this,Lt,t))}return j()(e,t),e}(Tt.a);var It=function(t){function e(){return u()(this,e),m()(this,O()(e).apply(this,arguments))}return j()(e,t),l()(e,[{key:"_getViewport",value:function(t){var e=t.viewState,n=e.modelMatrix,r=void 0===n?null:n,i=e.bearing,a=void 0===i?0:i,o=e.pitch,s=void 0===o?0:o,u=e.up,c=void 0===u?[0,0,1]:u,l=function(t){var e=t.bearing,n=t.pitch;return new Pt.d({bearing:e,pitch:n}).toVector3().normalize()}({bearing:a,pitch:90+s}),h=r?r.transformDirection(l):l,f=Object(Et.g)(t),d=Math.pow(2,f),v=(new Pt.a).lookAt({eye:[0,0,0],center:h,up:c}).scale(d);return new bt.a(Object.assign({},t,{zoom:f,viewMatrix:v}))}},{key:"controller",get:function(){return this._getControllerProps({type:Ct})}}]),e}(kt.a);It.displayName="FirstPersonView";var Rt=n(56),Ft=n(57),Dt={orbitAxis:"Z",rotationX:0,rotationOrbit:0,zoom:0,target:[0,0,0],minRotationX:-90,maxRotationX:90,minZoom:-1/0,maxZoom:1/0},Nt={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new Rt.a(["target","zoom","rotationX","rotationOrbit"]),transitionInterruption:Ft.a.BREAK},Bt=function(t){return Math.pow(2,t)},zt=function(t){function e(t){var n,r=t.ViewportType,i=t.width,a=t.height,o=t.orbitAxis,s=void 0===o?Dt.orbitAxis:o,c=t.rotationX,l=void 0===c?Dt.rotationX:c,h=t.rotationOrbit,f=void 0===h?Dt.rotationOrbit:h,d=t.target,v=void 0===d?Dt.target:d,p=t.zoom,g=void 0===p?Dt.zoom:p,b=t.minRotationX,y=void 0===b?Dt.minRotationX:b,_=t.maxRotationX,w=void 0===_?Dt.maxRotationX:_,j=t.minZoom,k=void 0===j?Dt.minZoom:j,x=t.maxZoom,E=void 0===x?Dt.maxZoom:x,P=t.startPanPosition,T=t.startTarget,S=t.startRotationX,A=t.startRotationOrbit,M=t.startZoomPosition,L=t.startZoom;return u()(this,e),(n=m()(this,O()(e).call(this,{width:i,height:a,orbitAxis:s,rotationX:l,rotationOrbit:f,target:v,zoom:g,minRotationX:y,maxRotationX:w,minZoom:k,maxZoom:E})))._interactiveState={startPanPosition:P,startTarget:T,startRotationX:S,startRotationOrbit:A,startZoomPosition:M,startZoom:L},n.ViewportType=r,n}return j()(e,t),l()(e,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(t){var e=t.pos,n=this._viewportProps.target;return this._getUpdatedState({startPanPosition:e,startTarget:n})}},{key:"pan",value:function(t){var e=t.pos,n=(t.startPos,this._interactiveState),r=n.startPanPosition,i=n.startTarget,a=new Pt.b(e).subtract(r);return this._getUpdatedState({target:this._calculateNewTarget({startTarget:i,pixelOffset:a})})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanPosition:null,startTarget:null})}},{key:"rotateStart",value:function(t){t.pos;return this._getUpdatedState({startRotationX:this._viewportProps.rotationX,startRotationOrbit:this._viewportProps.rotationOrbit})}},{key:"rotate",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=this._interactiveState,i=r.startRotationX,a=r.startRotationOrbit;return Number.isFinite(i)&&Number.isFinite(a)?((i<-90||i>90)&&(e*=-1),this._getUpdatedState({rotationX:i+180*n,rotationOrbit:a+180*e,isRotating:!0})):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.rotationOrbit;return Math.abs(r-e.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedState({startZoomPosition:e,startTarget:this._viewportProps.target,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale,i=this._viewportProps,a=i.zoom,o=i.width,s=i.height,u=i.target,c=this._interactiveState,l=c.startZoom,h=c.startZoomPosition,f=c.startTarget;Number.isFinite(l)||(l=a,f=u,h=n||e);var d=this._calculateNewZoom({scale:r,startZoom:l}),v=Bt(l),p=Bt(d),g=(o/2-h[0])*(p/v-1),b=(s/2-h[1])*(p/v-1);return this._getUpdatedState({zoom:d,target:this._calculateNewTarget({startTarget:f,zoom:d,pixelOffset:[g,b]})})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startTarget:null,startZoom:null})}},{key:"zoomIn",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:2})})}},{key:"zoomOut",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:.5})})}},{key:"moveLeft",value:function(){var t=[-50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:t})})}},{key:"moveRight",value:function(){var t=[50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:t})})}},{key:"moveUp",value:function(){var t=[0,-50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:t})})}},{key:"moveDown",value:function(){var t=[0,50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:t})})}},{key:"rotateLeft",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX-10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX+10})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom,a=r.minZoom;Number.isFinite(n)||(n=this._viewportProps.zoom);var o=n+Math.log2(e);return Object(Pt.e)(o,a,i)}},{key:"_calculateNewTarget",value:function(t){var e=t.startTarget,n=t.zoom,r=t.pixelOffset,i=Object.assign({},this._viewportProps);Number.isFinite(n)&&(i.zoom=n),e&&(i.target=e);var a=new this.ViewportType(i),o=a.project(i.target);return a.unproject([o[0]-r[0],o[1]-r[1],o[2]])}},{key:"_getUpdatedState",value:function(t){return new e(Object.assign({},this._viewportProps,this._interactiveState,t))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom,i=t.maxRotationX,a=t.minRotationX,o=t.rotationOrbit;return t.zoom=Object(Pt.e)(r,n,e),t.rotationX=Object(Pt.e)(t.rotationX,a,i),(o<-180||o>180)&&(t.rotationOrbit=Object(At.e)(o+180,360)-180),t}}]),e}(St.a),Ut=function(t){function e(t){return u()(this,e),m()(this,O()(e).call(this,zt,t))}return j()(e,t),l()(e,[{key:"_getTransitionProps",value:function(){return Nt}}]),e}(Tt.a),Vt=Math.PI/180;function Gt(t){var e=t.height,n=t.fovy,r=t.orbitAxis,i=t.rotationX,a=t.rotationOrbit,o=t.zoom,s=.5/Math.tan(n*Vt/2),u="Z"===r?[0,0,1]:[0,1,0],c="Z"===r?[0,-s,0]:[0,0,s],l=(new Pt.a).lookAt({eye:c,up:u});l.rotateX(i*Vt),"Z"===r?l.rotateZ(a*Vt):l.rotateY(a*Vt);var h=Math.pow(2,o)/(e||1);return l.scale(h),l}var Ht=function(t){function e(t){u()(this,e);var n=t.id,r=t.x,i=t.y,a=t.width,o=t.height,s=t.fovy,c=void 0===s?50:s,l=t.near,h=t.far,f=t.orbitAxis,d=void 0===f?"Z":f,v=t.target,p=void 0===v?[0,0,0]:v,g=t.rotationX,b=void 0===g?0:g,y=t.rotationOrbit,_=void 0===y?0:y,w=t.zoom,j=void 0===w?0:w;return m()(this,O()(e).call(this,{id:n,viewMatrix:Gt({height:o,fovy:c,orbitAxis:d,rotationX:b,rotationOrbit:_,zoom:j}),fovy:c,near:l,far:h,x:r,y:i,position:p,width:a,height:o,zoom:j}))}return j()(e,t),e}(bt.a),Wt=function(t){function e(t){return u()(this,e),m()(this,O()(e).call(this,Object.assign({},t,{type:Ht})))}return j()(e,t),l()(e,[{key:"controller",get:function(){return this._getControllerProps({type:Ut,ViewportType:Ht})}}]),e}(kt.a);Wt.displayName="OrbitView";var Xt={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new Rt.a(["target","zoom"]),transitionInterruption:Ft.a.BREAK},Zt=function(t){function e(t){var n;return u()(this,e),(n=m()(this,O()(e).call(this,zt,t))).invertPan=!0,n}return j()(e,t),l()(e,[{key:"_onPanRotate",value:function(t){return!1}},{key:"_getTransitionProps",value:function(){return Xt}}]),e}(Tt.a),Yt=(new Pt.a).lookAt({eye:[0,0,1]});function qt(t){var e=t.width,n=t.height,r=t.near,i=t.far;return e=e||1,n=n||1,(new Pt.a).ortho({left:-e/2,right:e/2,bottom:n/2,top:-n/2,near:r,far:i})}var Kt=function(t){function e(t){var n=t.id,r=t.x,i=t.y,a=t.width,o=t.height,s=t.near,c=void 0===s?.1:s,l=t.far,h=void 0===l?1e3:l,f=t.zoom,d=void 0===f?0:f,v=t.target,p=void 0===v?[0,0,0]:v;u()(this,e);var g=Math.pow(2,d);return m()(void 0,new bt.a({id:n,x:r,y:i,width:a,height:o,position:p,viewMatrix:Yt.clone().scale(g),projectionMatrix:qt({width:a,height:o,near:c,far:h}),zoom:d}))}return j()(e,t),e}(bt.a),Qt=function(t){function e(t){return u()(this,e),m()(this,O()(e).call(this,Object.assign({},t,{type:Kt})))}return j()(e,t),l()(e,[{key:"controller",get:function(){return this._getControllerProps({type:Zt,ViewportType:Kt})}}]),e}(kt.a);Qt.displayName="OrthographicView";var Jt=n(109),$t=n(76),te=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),this.opts=e}return l()(t,[{key:"equals",value:function(t){return this===t||this.constructor===t.constructor&&Object($t.a)(this.opts,t.opts)}},{key:"getShaders",value:function(t){return null}},{key:"getSubLayerProps",value:function(t){var e=t.constructor.defaultProps,n=void 0===e?{}:e,r={updateTriggers:{}};for(var i in n)if(i in this.props){var a=n[i],o=this.props[i];r[i]=o,a&&"accessor"===a.type&&(r.updateTriggers[i]=this.props.updateTriggers[i],"function"==typeof o&&(r[i]=this.getSubLayerAccessor(o,!0)))}return r}},{key:"initializeState",value:function(t,e){}},{key:"updateState",value:function(t,e){}},{key:"finalizeState",value:function(t){}}]),t}(),ee=n(123),ne=["bearing","pitch"],re={speed:1.2,curve:1.414},ie=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u()(this,e),(t=m()(this,O()(e).call(this,{compare:["longitude","latitude","zoom","bearing","pitch"],extract:["width","height","longitude","latitude","zoom","bearing","pitch"],required:["width","height","latitude","longitude","zoom"]}))).props=Object.assign({},re,n),t}return j()(e,t),l()(e,[{key:"interpolateProps",value:function(t,e,n){var r=Object(Et.d)(t,e,n,this.props),i=!0,a=!1,o=void 0;try{for(var s,u=ne[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;r[c]=Object(Pt.h)(t[c]||0,e[c]||0,n)}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}return r}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=Object(Et.f)(t,e,this.props)),n}}]),e}(ee.a),ae=n(16),oe=n(53),se=n(71),ue=n(20),ce=n(36),le=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t);var n=e.attributes,r=void 0===n?{}:n;this.typedArrayManager=se.a,this.indexStarts=null,this.vertexStarts=null,this.vertexCount=0,this.instanceCount=0,this.attributes={},this._attributeDefs=r,this.opts=e,this.updateGeometry(e),Object.seal(this)}return l()(t,[{key:"updateGeometry",value:function(t){Object.assign(this.opts,t);var e=this.opts,n=e.data,r=e.buffers,i=void 0===r?{}:r,a=e.getGeometry,o=e.geometryBuffer,s=e.positionFormat,u=e.dataChanged,c=e.normalize,l=void 0===c||c;if(this.data=n,this.getGeometry=a,this.positionSize=o&&o.size||("XY"===s?2:3),this.buffers=i,this.normalize=l,o&&(Object(ue.a)(n.startIndices,"binary data missing startIndices"),this.getGeometry=this.getGeometryFromBuffer(o),l||(i.positions=o)),this.geometryBuffer=i.positions,Array.isArray(u)){var h=!0,f=!1,d=void 0;try{for(var v,p=u[Symbol.iterator]();!(h=(v=p.next()).done);h=!0){var g=v.value;this._rebuildGeometry(g)}}catch(t){f=!0,d=t}finally{try{h||null==p.return||p.return()}finally{if(f)throw d}}}else this._rebuildGeometry()}},{key:"updatePartialGeometry",value:function(t){var e=t.startRow,n=t.endRow;this._rebuildGeometry({startRow:e,endRow:n})}},{key:"updateGeometryAttributes",value:function(t,e,n){throw new Error("Not implemented")}},{key:"getGeometrySize",value:function(t){throw new Error("Not implemented")}},{key:"getGeometryFromBuffer",value:function(t){var e=t.value||t;return Object(ue.a)(ArrayBuffer.isView(e),"cannot read geometries"),Object(oe.b)(e,{size:this.positionSize,offset:t.offset,stride:t.stride,startIndices:this.data.startIndices})}},{key:"_allocate",value:function(t,e){var n=this.attributes,r=this.buffers,i=this._attributeDefs,a=this.typedArrayManager;for(var o in i)if(o in r)a.release(n[o]),n[o]=null;else{var s=i[o];s.copy=e,n[o]=a.allocate(n[o],t,s)}}},{key:"_forEachGeometry",value:function(t,e,n){var r=this.data,i=this.getGeometry,a=Object(oe.a)(r,e,n),o=a.iterable,s=a.objectInfo,u=!0,c=!1,l=void 0;try{for(var h,f=o[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){var d=h.value;s.index++,t(i(d,s),s.index)}}catch(t){c=!0,l=t}finally{try{u||null==f.return||f.return()}finally{if(c)throw l}}}},{key:"_rebuildGeometry",value:function(t){var e=this;if(this.data&&this.getGeometry){var n=this.indexStarts,r=this.vertexStarts,i=this.instanceCount,a=this.data,o=this.geometryBuffer,s=t||{},u=s.startRow,c=void 0===u?0:u,l=s.endRow,h=void 0===l?1/0:l;if(t||(n=[0],r=[0]),this.normalize||!o)this._forEachGeometry((function(t,n){r[n+1]=r[n]+e.getGeometrySize(t)}),c,h),i=r[r.length-1];else if(o.buffer instanceof ce.a){var f=o.stride||4*this.positionSize;r=a.startIndices,i=r[a.length]||o.buffer.byteLength/f}else{var d=o.value||o,v=o.stride/d.BYTES_PER_ELEMENT||this.positionSize;r=a.startIndices,i=r[a.length]||d.length/v}this._allocate(i,Boolean(t)),this.indexStarts=n,this.vertexStarts=r,this.instanceCount=i;var p={};this._forEachGeometry((function(t,a){p.vertexStart=r[a],p.indexStart=n[a];var o=a<r.length-1?r[a+1]:i;p.geometrySize=o-r[a],p.geometryIndex=a,e.updateGeometryAttributes(t,p)}),c,h),this.vertexCount=n[n.length-1]}}}]),t}(),he=n(114),fe=n(79),de=n(113),ve=n(99);n.d(e,"COORDINATE_SYSTEM",(function(){return r.a})),n.d(e,"LightingEffect",(function(){return i.a})),n.d(e,"AmbientLight",(function(){return a.a})),n.d(e,"DirectionalLight",(function(){return o.a})),n.d(e,"PointLight",(function(){return b})),n.d(e,"_CameraLight",(function(){return x})),n.d(e,"_SunLight",(function(){return U})),n.d(e,"PostProcessEffect",(function(){return nt})),n.d(e,"_LayersPass",(function(){return ot.a})),n.d(e,"Deck",(function(){return st.a})),n.d(e,"LayerManager",(function(){return ut.a})),n.d(e,"AttributeManager",(function(){return ct.a})),n.d(e,"Layer",(function(){return lt.a})),n.d(e,"CompositeLayer",(function(){return pt})),n.d(e,"DeckRenderer",(function(){return gt.a})),n.d(e,"Viewport",(function(){return bt.a})),n.d(e,"WebMercatorViewport",(function(){return yt.a})),n.d(e,"picking",(function(){return mt.a})),n.d(e,"project",(function(){return _t.a})),n.d(e,"project32",(function(){return Ot.a})),n.d(e,"gouraudLighting",(function(){return wt.a})),n.d(e,"phongLighting",(function(){return wt.b})),n.d(e,"shadow",(function(){return jt.a})),n.d(e,"View",(function(){return kt.a})),n.d(e,"MapView",(function(){return xt.a})),n.d(e,"FirstPersonView",(function(){return It})),n.d(e,"OrbitView",(function(){return Wt})),n.d(e,"OrthographicView",(function(){return Qt})),n.d(e,"Controller",(function(){return Tt.a})),n.d(e,"MapController",(function(){return Jt.a})),n.d(e,"FirstPersonController",(function(){return Ct})),n.d(e,"OrbitController",(function(){return Ut})),n.d(e,"OrthographicController",(function(){return Zt})),n.d(e,"Effect",(function(){return V.a})),n.d(e,"LayerExtension",(function(){return te})),n.d(e,"TRANSITION_EVENTS",(function(){return Ft.a})),n.d(e,"LinearInterpolator",(function(){return Rt.a})),n.d(e,"FlyToInterpolator",(function(){return ie})),n.d(e,"log",(function(){return ae.a})),n.d(e,"createIterable",(function(){return oe.a})),n.d(e,"fp64LowPart",(function(){return At.c})),n.d(e,"Tesselator",(function(){return le})),n.d(e,"_fillArray",(function(){return vt.a})),n.d(e,"_count",(function(){return he.a})),n.d(e,"_memoize",(function(){return fe.a})),n.d(e,"_mergeShaders",(function(){return de.a})),n.d(e,"_compareProps",(function(){return ve.a}))},function(t,e,n){"use strict";var r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};var i={name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n  return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n  return\n    picking_uSelectedColorValid &&\n    !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n  if (picking_uActive) {\n    picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n    if (!picking_uAttribute) {\n      picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n    }\n  } else {\n    picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n  }\n}\n\nvoid picking_setPickingAttribute(float value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.r = value;\n  }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.rg = value;\n  }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.rgb = value;\n  }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n  if (picking_uActive) {\n    return color;\n  }\n  bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n  if (selected) {\n    float highLightAlpha = picking_uHighlightColor.a;\n    float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n    float highLightRatio = highLightAlpha / blendedAlpha;\n\n    vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n    return vec4(blendedRGB, blendedAlpha);\n  } else {\n    return color;\n  }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n  if (picking_uActive) {\n    if (picking_vRGBcolor_Avalid.a == 0.0) {\n      discard;\n    }\n    return picking_vRGBcolor_Avalid;\n  }\n  return color;\n}\nvec4 picking_filterColor(vec4 color) {\n  vec4 highightColor = picking_filterHighlightColor(color);\n  return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,e={};if(void 0!==t.pickingSelectedColor)if(t.pickingSelectedColor){var n=t.pickingSelectedColor.slice(0,3);e.picking_uSelectedColorValid=1,e.picking_uSelectedColor=n}else e.picking_uSelectedColorValid=0;return t.pickingHighlightColor&&(e.picking_uHighlightColor=t.pickingHighlightColor.map((function(t){return t/255}))),void 0!==t.pickingActive&&(e.picking_uActive=Boolean(t.pickingActive),e.picking_uAttribute=Boolean(t.pickingAttribute)),e}};e.a=Object.assign({inject:{"vs:DECKGL_FILTER_COLOR":"\n    picking_setPickingColor(geometry.pickingColor);\n    // for picking depth values\n    picking_setPickingAttribute(geometry.position.z);\n    ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n    // use highlight color if this fragment belongs to the selected object.\n    color = picking_filterHighlightColor(color);\n\n    // use picking color if rendering to picking FBO.\n    color = picking_filterPickingColor(color);\n      "}}},i)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),i=n(92),a=n(152),o=n(153),s=n(62),u=n(21);function c(t,e){Object(u.a)(t instanceof i.a||t instanceof a.a||t instanceof o.a);var n=t.constructor,r=t.gl,s=t.width,c=t.height,l=t.format,h=t.type,f=t.dataFormat,d=t.border,v=t.mipmaps;return new n(r,Object.assign({width:s,height:c,format:l,type:h,dataFormat:f,border:d,mipmaps:v},e))}function l(t,e){var n=t.gl,i=t.width,a=t.height,o=t.id;return new s.a(n,Object.assign({},e,{id:"framebuffer-for-".concat(o),width:i,height:a,attachments:Object(r.a)({},36064,t)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(6),i=n.n(r),a=n(15),o=n(1),s=n(3),u=n(13),c=n(9),l=n(28),h=n(14),f=n(5),d=n(49),v=n(55),p=[34069,34070,34071,34072,34073,34074],g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(this,e),Object(v.b)(t),(n=Object(u.a)(this,Object(c.a)(e).call(this,t,Object.assign({},r,{target:34067})))).initialize(r),Object.seal(Object(l.a)(n)),n}var n;return Object(h.a)(e,t),Object(s.a)(e,[{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.mipmaps,r=void 0===n||n,i=e.parameters,a=void 0===i?{}:i;this.opts=e,this.setCubeMapImageData(e).then((function(){t.loaded=!0,r&&t.generateMipmap(e),t.setParameters(a)}))}},{key:"subImage",value:function(t){var e=t.face,n=t.data,r=t.x,i=void 0===r?0:r,a=t.y,o=void 0===a?0:a,s=t.mipmapLevel,u=void 0===s?0:s;return this._subImage({target:e,data:n,x:i,y:o,mipmapLevel:u})}},{key:"setCubeMapImageData",value:(n=Object(a.a)(i.a.mark((function t(e){var n,r,a,o,s,u,c,l,h,d,v,g,b,y=this;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.width,r=e.height,a=e.pixels,o=e.data,s=e.border,u=void 0===s?0:s,c=e.format,l=void 0===c?6408:c,h=e.type,d=void 0===h?5121:h,v=this.gl,g=a||o,t.next=5,Promise.all(p.map((function(t){var e=g[t];return Promise.all(Array.isArray(e)?e:[e])})));case 5:b=t.sent,this.bind(),p.forEach((function(t,e){b[e].length>1&&!1!==y.opts.mipmaps&&f.h.warn("".concat(y.id," has mipmap and multiple LODs."))(),b[e].forEach((function(e,i){n&&r?v.texImage2D(t,i,l,n,r,u,l,d,e):v.texImage2D(t,i,l,l,d,e)}))})),this.unbind();case 9:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"setImageDataForFace",value:function(t){var e=this,n=t.face,r=t.width,i=t.height,a=t.pixels,o=t.data,s=t.border,u=void 0===s?0:s,c=t.format,l=void 0===c?6408:c,h=t.type,f=void 0===h?5121:h,d=this.gl,v=a||o;return this.bind(),v instanceof Promise?v.then((function(r){return e.setImageDataForFace(Object.assign({},t,{face:n,data:r,pixels:r}))})):this.width||this.height?d.texImage2D(n,0,l,r,i,u,l,f,v):d.texImage2D(n,0,l,l,f,v),this}}]),e}(d.a);g.FACES=p},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(1),i=n(13),a=n(9),o=n(28),s=n(3),u=n(14),c=n(5),l=n(55),h=n(49),f=n(72),d=n(36),v=function(t){function e(t){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,e),Object(l.a)(t),s=Object.assign({depth:1},s,{target:32879,unpackFlipY:!1}),(n=Object(i.a)(this,Object(a.a)(e).call(this,t,s))).initialize(s),Object.seal(Object(o.a)(n)),n}return Object(u.a)(e,t),Object(s.a)(e,null,[{key:"isSupported",value:function(t){return Object(c.g)(t)}}]),Object(s.a)(e,[{key:"setImageData",value:function(t){var e=this,n=t.level,r=void 0===n?0:n,i=t.dataFormat,a=void 0===i?6408:i,o=t.width,s=t.height,u=t.depth,l=void 0===u?1:u,h=t.border,v=void 0===h?0:h,p=t.format,g=t.type,b=void 0===g?5121:g,y=t.offset,m=void 0===y?0:y,_=t.data,O=t.parameters,w=void 0===O?{}:O;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),Object(c.l)(this.gl,w,(function(){ArrayBuffer.isView(_)&&e.gl.texImage3D(e.target,r,a,o,s,l,v,p,b,_),_ instanceof d.a&&(e.gl.bindBuffer(35052,_.handle),e.gl.texImage3D(e.target,r,a,o,s,l,v,p,b,m))})),_&&_.byteLength)this._trackAllocatedMemory(_.byteLength,"Texture");else{var j=f.a[this.dataFormat]||4,k=f.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*j*k,"Texture")}return this.loaded=!0,this}}]),e}(h.a)},function(t,e,n){var r=n(181);t.exports=function(t,e){if(null==t)return{};var n,i,a=r(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},function(t,e){function n(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var o=t.apply(e,r);function s(t){n(o,i,a,s,u,"next",t)}function u(t){n(o,i,a,s,u,"throw",t)}s(void 0)}))}}},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}},function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(19),o=n(0),s=n(67),u=n(139),c=n(129);function l(t){return h(function t(e,n){return e.map((function(e){return e instanceof u.a?e:(Object(c.a)("string"!=typeof e,"Shader module use by name is deprecated. Import shader module '".concat(e,"' and use it directly.")),Object(c.a)(e.name,"shader module has no name"),(e=new u.a(e)).dependencies=t(e.dependencies),e)}))}(t))}function h(t){var e={},n={};return f({modules:t,level:0,moduleMap:e,moduleDepth:n}),Object.keys(n).sort((function(t,e){return n[e]-n[t]})).map((function(t){return e[t]}))}function f(t){var e=t.modules,n=t.level,r=t.moduleMap,i=t.moduleDepth;if(n>=5)throw new Error("Possible loop in shader dependency graph");var a=!0,o=!1,s=void 0;try{for(var u,c=e[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var l=u.value;r[l.name]=l,(void 0===i[l.name]||i[l.name]<n)&&(i[l.name]=n)}}catch(t){o=!0,s=t}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}var h=!0,d=!1,v=void 0;try{for(var p,g=e[Symbol.iterator]();!(h=(p=g.next()).done);h=!0){var b=p.value;b.dependencies&&f({modules:b.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}}catch(t){d=!0,v=t}finally{try{h||null==g.return||g.return()}finally{if(d)throw v}}}var d=7936,v=7937,p=7938,g=35724,b={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},y={};Object.keys(b).forEach((function(t){y[t]=t}));var m={};function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=b[e];if(Object(c.a)(r,e),!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="undefined"!=typeof window&&window.navigator||{},n=t.userAgent||e.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}(n))return!0;if(e in m)return m[e];var i=r[0],a=n.behavior||"enable",o="#extension GL_".concat(i," : ").concat(a,"\nvoid main(void) {}"),s=t.createShader(35633);t.shaderSource(s,o),t.compileShader(s);var u=t.getShaderParameter(s,35713);return t.deleteShader(s),m[e]=u,u}function O(t,e){var n=b[e];Object(c.a)(n,e);var r=function(t){return Boolean(t&&2===t._version)}(t)&&n[1]||n[0],i="string"==typeof r?Boolean(t.getExtension(r)):r;return Object(c.a)(!1===i||!0===i),i}function w(t,e){return(e=Array.isArray(e)?e:[e]).every((function(e){return O(t,e)}))}function j(t){switch(function(t){var e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e&&e.UNMASKED_VENDOR_WEBGL||d),r=t.getParameter(e&&e.UNMASKED_RENDERER_WEBGL||v);return{gpuVendor:function(t,e){if(t.match(/NVIDIA/i)||e.match(/NVIDIA/i))return"NVIDIA";if(t.match(/INTEL/i)||e.match(/INTEL/i))return"INTEL";if(t.match(/AMD/i)||e.match(/AMD/i)||t.match(/ATI/i)||e.match(/ATI/i))return"AMD";return"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:t.getParameter(p),shadingLanguageVersion:t.getParameter(g)}}(t).gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}var k,x=n(140),E="\n\n".concat(x.a,"\n\n"),P=(k={},Object(o.a)(k,s.b,"vertex"),Object(o.a)(k,s.a,"fragment"),k),T="precision highp float;\n\n";function S(t,e){var n=e.vs,r=e.fs,i=l(e.modules||[]);return{gl:t,vs:A(t,Object.assign({},e,{source:n,type:s.b,modules:i})),fs:A(t,Object.assign({},e,{source:r,type:s.a,modules:i})),getUniforms:M(i)}}function A(t,e){var n=e.id,r=e.source,i=e.type,o=e.modules,u=e.defines,l=void 0===u?{}:u,h=e.hookFunctions,f=void 0===h?[]:h,d=e.inject,v=void 0===d?{}:d,p=e.prologue,g=void 0===p||p,b=e.log;Object(c.a)("string"==typeof r,"shader source must be a string");var m=i===s.b,O=r.split("\n"),k=100,S="",A=r;0===O[0].indexOf("#version ")?(k=300,S=O[0],A=O.slice(1).join("\n")):S="#version ".concat(k);var M={};o.forEach((function(t){Object.assign(M,t.getDefines())})),Object.assign(M,l);var L=g?"".concat(S,"\n").concat(function(t){var e=t.id,n=t.source,r=t.type;return e&&"string"==typeof e&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(e,"_").concat(P[r],"\n\n"):""}({id:n,source:r,type:i}),"\n").concat(function(t){var e=t.type;return"\n#define SHADER_TYPE_".concat(P[e].toUpperCase(),"\n")}({type:i}),"\n").concat(j(t),"\n").concat(function(t,e,n){var r="#if (__VERSION__ > 120)\n\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return w(t,y.GLSL_FRAG_DEPTH)&&(r+="// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),w(t,y.GLSL_DERIVATIVES)&&_(t,y.GLSL_DERIVATIVES)&&(r+="// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define DERIVATIVES\n#endif\n"),w(t,y.GLSL_FRAG_DATA)&&_(t,y.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define DRAW_BUFFERS\n#endif\n"),w(t,y.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n# define TEXTURE_LOD\n#define texture2DLod texture2DLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define textureCubeLod textureCubeLodEXT\n#define texture2DGrad texture2DGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define textureCubeGrad textureCubeGradEXT\n#endif\n"),r}(t),"\n").concat(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=0,n="";for(var r in t){0===e&&(n+="\n// APPLICATION DEFINES\n"),e++;var i=t[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(t[r],"\n"))}0===e&&(n+="\n");return n}(M),"\n").concat(m?"":T,"\n"):"".concat(S,"\n");f=function(t){var e={vs:{},fs:{}};return t.forEach((function(t){var n;"string"!=typeof t?t=(n=t).hook:n={};var r=(t=t.trim()).split(":"),i=Object(a.a)(r,2),o=i[0],s=i[1],u=t.replace(/\(.+/,"");e[o][u]=Object.assign(n,{signature:s})})),e}(f);var C={},I={};for(var R in v){var F="string"==typeof v[R]?{injection:v[R],order:0}:v[R];R.match(/^(v|f)s:/)?"#"===R[3]?I[R]=[F]:C[R]=[F]:I[R]=[F]}var D=!0,N=!1,B=void 0;try{for(var z,U=o[Symbol.iterator]();!(D=(z=U.next()).done);D=!0){var V=z.value;b&&V.checkDeprecations(A,b),L+=V.getModuleSource(i,k);var G=V.injections[i];for(var H in G)H.match(/^(v|f)s:#/)?(I[H]=I[H]||[],I[H].push(G[H])):(C[H]=C[H]||[],C[H].push(G[H]))}}catch(t){N=!0,B=t}finally{try{D||null==U.return||U.return()}finally{if(N)throw B}}return L+=E,L+=function(t,e){var n="";for(var r in t){var i=t[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+="  ".concat(i.header)),e[r]){var a=e[r];a.sort((function(t,e){return t.order-e.order}));var o=!0,s=!1,u=void 0;try{for(var c,l=a[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var h=c.value;n+="  ".concat(h.injection,"\n")}}catch(t){s=!0,u=t}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}}i.footer&&(n+="  ".concat(i.footer)),n+="}\n"}return n}(f[i],C),L+=A,L=Object(x.c)(L,i,I)}function M(t){return function(e){var n={},r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value.getUniforms(e,n);Object.assign(n,u)}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}var L=n(196);n.d(e,"a",(function(){return C}));var C=function(){function t(e){Object(r.a)(this,t),this.gl=e,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}return Object(i.a)(t,null,[{key:"getDefaultProgramManager",value:function(e){return e.luma=e.luma||{},e.luma.defaultProgramManager=e.luma.defaultProgramManager||new t(e),e.luma.defaultProgramManager}}]),Object(i.a)(t,[{key:"addDefaultModule",value:function(t){this._defaultModules.find((function(e){return e.name===t.name}))||this._defaultModules.push(t),this.stateHash++}},{key:"removeDefaultModule",value:function(t){var e="string"==typeof t?t:t.name;this._defaultModules=this._defaultModules.filter((function(t){return t.name!==e})),this.stateHash++}},{key:"addShaderHook",value:function(t,e){e&&(t=Object.assign(e,{hook:t})),this._hookFunctions.push(t),this.stateHash++}},{key:"get",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.vs,r=void 0===n?"":n,i=e.fs,a=void 0===i?"":i,o=e.defines,s=void 0===o?{}:o,u=e.inject,c=void 0===u?{}:u,l=e.varyings,h=void 0===l?[]:l,f=e.bufferMode,d=void 0===f?35981:f,v=this._getModuleList(e.modules),p=this._getHash(r),g=this._getHash(a),b=v.map((function(e){return t._getHash(e.name)})).sort(),y=h.map((function(e){return t._getHash(e)})),m=Object.keys(s).sort(),_=Object.keys(c).sort(),O=[],w=[],j=!0,k=!1,x=void 0;try{for(var E,P=m[Symbol.iterator]();!(j=(E=P.next()).done);j=!0){var T=E.value;O.push(this._getHash(T)),O.push(this._getHash(s[T]))}}catch(t){k=!0,x=t}finally{try{j||null==P.return||P.return()}finally{if(k)throw x}}var A=!0,M=!1,C=void 0;try{for(var I,R=_[Symbol.iterator]();!(A=(I=R.next()).done);A=!0){var F=I.value;w.push(this._getHash(F)),w.push(this._getHash(c[F]))}}catch(t){M=!0,C=t}finally{try{A||null==R.return||R.return()}finally{if(M)throw C}}var D="".concat(p,"/").concat(g,"D").concat(O.join("/"),"M").concat(b.join("/"),"I").concat(w.join("/"),"V").concat(y.join("/"),"H").concat(this.stateHash,"B").concat(d);if(!this._programCache[D]){var N=S(this.gl,{vs:r,fs:a,modules:v,inject:c,defines:s,hookFunctions:this._hookFunctions});this._programCache[D]=new L.a(this.gl,{hash:D,vs:N.vs,fs:N.fs,varyings:h,bufferMode:d}),this._getUniforms[D]=N.getUniforms||function(t){},this._useCounts[D]=0}return this._useCounts[D]++,this._programCache[D]}},{key:"getUniforms",value:function(t){return this._getUniforms[t.hash]||null}},{key:"release",value:function(t){var e=t.hash;this._useCounts[e]--,0===this._useCounts[e]&&(this._programCache[e].delete(),delete this._programCache[e],delete this._getUniforms[e],delete this._useCounts[e])}},{key:"_getHash",value:function(t){return void 0===this._hashes[t]&&(this._hashes[t]=this._hashCounter++),this._hashes[t]}},{key:"_getModuleList",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Array(this._defaultModules.length+t.length),n={},r=0,i=0,a=this._defaultModules.length;i<a;++i){var o=this._defaultModules[i],s=o.name;e[r++]=o,n[s]=!0}for(var u=0,c=t.length;u<c;++u){var l=t[u],h=l.name;n[h]||(e[r++]=l,n[h]=!0)}return e.length=r,e}}]),t}()},function(t,e,n){"use strict";var r=n(1),i=n(3);function a(){var t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if("undefined"!=typeof process&&process.hrtime){var e=process.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}var o=function(){function t(e,n){Object(r.a)(this,t),this.name=e,this.type=n,this.sampleSize=1,this.reset()}return Object(i.a)(t,[{key:"setSampleSize",value:function(t){return this.sampleSize=t,this}},{key:"incrementCount",value:function(){return this.addCount(1),this}},{key:"decrementCount",value:function(){return this.subtractCount(1),this}},{key:"addCount",value:function(t){return this._count+=t,this._samples++,this._checkSampling(),this}},{key:"subtractCount",value:function(t){return this._count-=t,this._samples++,this._checkSampling(),this}},{key:"addTime",value:function(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}},{key:"timeStart",value:function(){return this._startTime=a(),this._timerPending=!0,this}},{key:"timeEnd",value:function(){return this._timerPending?(this.addTime(a()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}},{key:"getSampleAverageCount",value:function(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}},{key:"getSampleAverageTime",value:function(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}},{key:"getSampleHz",value:function(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}},{key:"getAverageCount",value:function(){return this.samples>0?this.count/this.samples:0}},{key:"getAverageTime",value:function(){return this.samples>0?this.time/this.samples:0}},{key:"getHz",value:function(){return this.time>0?this.samples/(this.time/1e3):0}},{key:"reset",value:function(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}},{key:"_checkSampling",value:function(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}]),t}(),s=function(){function t(e){var n=e.id,i=e.stats;Object(r.a)(this,t),this.id=n,this.stats={},this._initializeStats(i),Object.seal(this)}return Object(i.a)(t,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}},{key:"reset",value:function(){for(var t in this.stats)this.stats[t].reset();return this}},{key:"forEach",value:function(t){for(var e in this.stats)t(this.stats[e])}},{key:"getTable",value:function(){var t={};return this.forEach((function(e){t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}})),t}},{key:"_initializeStats",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){return t._getOrCreate(e)}))}},{key:"_getOrCreate",value:function(t){if(!t||!t.name)return null;var e=t.name,n=t.type;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,n)),this.stats[e]}},{key:"size",get:function(){return Object.keys(this.stats).length}}]),t}();n.d(e,"a",(function(){return s}))},,,,,,,,,function(t,e,n){var r=n(184),i=n(149),a=n(185).default,o=n(133),s=o.registerLoaders,u=o.load,c=o.parse,l="undefined"==typeof window?global:window;l.deck=l.deck||{},l.luma=l.luma||{},l.loaders=l.loaders||{},Object.assign(l.deck,i,{DeckGL:a}),Object.assign(l.luma,r),Object.assign(l.loaders,{registerLoaders:s,load:u,parse:c}),t.exports=l.deck},function(t,e){},function(t,e,n){"use strict";var r=n(96),i=n(170);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"self",{enumerable:!0,get:function(){return a.self}}),Object.defineProperty(e,"window",{enumerable:!0,get:function(){return a.window}}),Object.defineProperty(e,"global",{enumerable:!0,get:function(){return a.global}}),Object.defineProperty(e,"document",{enumerable:!0,get:function(){return a.document}}),Object.defineProperty(e,"process",{enumerable:!0,get:function(){return a.process}}),Object.defineProperty(e,"console",{enumerable:!0,get:function(){return a.console}}),Object.defineProperty(e,"isBrowser",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"isBrowserMainThread",{enumerable:!0,get:function(){return o.isBrowserMainThread}}),Object.defineProperty(e,"getBrowser",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"isMobile",{enumerable:!0,get:function(){return s.isMobile}}),Object.defineProperty(e,"isElectron",{enumerable:!0,get:function(){return u.default}});var a=n(144),o=i(n(145)),s=i(n(171)),u=r(n(132))},function(t,e){function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=t[a]}}return r.default=t,e&&e.set(t,r),r}},function(t,e,n){"use strict";var r=n(96);Object.defineProperty(e,"__esModule",{value:!0}),e.isMobile=function(){return void 0!==i.window.orientation},e.default=function(t){if(!t&&!(0,a.default)())return"Node";if((0,o.default)(t))return"Electron";var e="undefined"!=typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";var r=-1!==n.indexOf("MSIE "),s=-1!==n.indexOf("Trident/");if(r||s)return"IE";if(i.window.chrome)return"Chrome";if(i.window.safari)return"Safari";if(i.window.mozInnerScreenX)return"Firefox";return"Unknown"};var i=n(144),a=r(n(145)),o=r(n(132))},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),o=new P(r||[]);return a._invoke=function(t,e,n){var r=l;return function(i,a){if(r===f)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw a;return S()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=c(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,o),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",h="suspendedYield",f="executing",d="completed",v={};function p(){}function g(){}function b(){}var y={};y[a]=function(){return this};var m=Object.getPrototypeOf,_=m&&m(m(T([])));_&&_!==n&&r.call(_,a)&&(y=_);var O=b.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function j(t){var e;this._invoke=function(n,i){function a(){return new Promise((function(e,a){!function e(n,i,a,o){var s=c(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,o)}))}o(s.arg)}(n,i,e,a)}))}return e=e?e.then(a,a):a()}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=c(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:S}}function S(){return{value:e,done:!0}}return g.prototype=O.constructor=b,b.constructor=g,b[s]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},w(j.prototype),j.prototype[o]=function(){return this},t.AsyncIterator=j,t.async=function(e,n,r,i){var a=new j(u(e,n,r,i));return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(O),O[s]="Generator",O[a]=function(){return this},O.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(7);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}},function(t,e,n){"use strict";var r=n(183);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";n.r(e);var r=n(128),i=n(197),a=n(157),o=n(188),s=n(5),u=n(136),c=n(187),l=n(141),h=n(151),f=n(36),d=n(196),v=n(62),p=n(82),g=n(92),b=n(152),y=n(153),m=n(195),_=n(52),O=n(32),w=n(1),j=n(13),k=n(9),x=n(14),E=n(94),P={x:[2,0,1],y:[0,1,2],z:[1,2,0]},T=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("truncated-code-geometry"):n,i=function(t){for(var e=t.bottomRadius,n=void 0===e?0:e,r=t.topRadius,i=void 0===r?0:r,a=t.height,o=void 0===a?1:a,s=t.nradial,u=void 0===s?10:s,c=t.nvertical,l=void 0===c?10:c,h=t.verticalAxis,f=void 0===h?"y":h,d=t.topCap,v=void 0!==d&&d,p=t.bottomCap,g=void 0!==p&&p,b=(v?2:0)+(g?2:0),y=(u+1)*(l+1+b),m=Math.atan2(n-i,o),_=Math.sin,O=Math.cos,w=Math.PI,j=O(m),k=_(m),x=v?-2:0,E=l+(g?2:0),T=u+1,S=new Uint16Array(u*(l+b)*6),A=P[f],M=new Float32Array(3*y),L=new Float32Array(3*y),C=new Float32Array(2*y),I=0,R=0,F=x;F<=E;F++){var D=F/l,N=o*D,B=void 0;F<0?(N=0,D=1,B=n):F>l?(N=o,D=1,B=i):B=n+F/l*(i-n),-2!==F&&F!==l+2||(B=0,D=0),N-=o/2;for(var z=0;z<T;z++){var U=_(z*w*2/u),V=O(z*w*2/u);M[I+A[0]]=U*B,M[I+A[1]]=N,M[I+A[2]]=V*B,L[I+A[0]]=F<0||F>l?0:U*j,L[I+A[1]]=F<0?-1:F>l?1:k,L[I+A[2]]=F<0||F>l?0:V*j,C[R+0]=z/u,C[R+1]=D,R+=2,I+=3}}for(var G=0;G<l+b;G++)for(var H=0;H<u;H++){var W=6*(G*u+H);S[W+0]=T*(G+0)+0+H,S[W+1]=T*(G+0)+1+H,S[W+2]=T*(G+1)+1+H,S[W+3]=T*(G+0)+0+H,S[W+4]=T*(G+1)+1+H,S[W+5]=T*(G+1)+0+H}return{indices:S,attributes:{POSITION:{size:3,value:M},NORMAL:{size:3,value:L},TEXCOORD_0:{size:2,value:C}}}}(t),a=i.indices,o=i.attributes;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,indices:a,attributes:Object(O.a)({},o,t.attributes)})))}return Object(x.a)(e,t),e}(_.a);var S=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("cone-geometry"):n,i=t.radius,a=void 0===i?1:i,o=t.cap,s=void 0===o||o;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,topRadius:0,topCap:Boolean(s),bottomCap:Boolean(s),bottomRadius:a})))}return Object(x.a)(e,t),e}(T),A=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),M=new Float32Array([-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,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,-1,1,-1,1,1,-1,1,-1]),L=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),C=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),I={POSITION:{size:3,value:new Float32Array(M)},NORMAL:{size:3,value:new Float32Array(L)},TEXCOORD_0:{size:2,value:new Float32Array(C)}},R=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("cube-geometry"):n;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,indices:{size:1,value:new Uint16Array(A)},attributes:Object(O.a)({},I,t.attributes)})))}return Object(x.a)(e,t),e}(_.a),F=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("cylinder-geometry"):n,i=t.radius,a=void 0===i?1:i;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,bottomRadius:a,topRadius:a})))}return Object(x.a)(e,t),e}(T),D=n(8),N=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],B=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1],z=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("ico-sphere-geometry"):n,i=function(t){var e=t.iterations,n=void 0===e?0:e,r=Math.PI,i=2*r,a=[].concat(N),o=[].concat(B);a.push(),o.push();for(var s=function(){var t={};return function(e,n){var r=(e*=3)>(n*=3)?e:n,i="".concat(e<n?e:n,"|").concat(r);if(i in t)return t[i];var o=a[e],s=a[e+1],u=a[e+2],c=(o+a[n])/2,l=(s+a[n+1])/2,h=(u+a[n+2])/2,f=Math.sqrt(c*c+l*l+h*h);return c/=f,l/=f,h/=f,a.push(c,l,h),t[i]=a.length/3-1}}(),u=0;u<n;u++){for(var c=[],l=0;l<o.length;l+=3){var h=s(o[l+0],o[l+1]),f=s(o[l+1],o[l+2]),d=s(o[l+2],o[l+0]);c.push(d,o[l+0],h,h,o[l+1],f,f,o[l+2],d,h,f,d)}o=c}for(var v=new Array(a.length),p=new Array(a.length/3*2),g=o.length-3;g>=0;g-=3){var b=o[g+0],y=o[g+1],m=o[g+2],_=3*b,O=3*y,w=3*m,j=2*b,k=2*y,x=2*m,E=a[_+0],P=a[_+1],T=a[_+2],S=Math.acos(T/Math.sqrt(E*E+P*P+T*T)),A=Math.atan2(P,E)+r,M=S/r,L=1-A/i,C=a[O+0],I=a[O+1],R=a[O+2],F=Math.acos(R/Math.sqrt(C*C+I*I+R*R)),z=Math.atan2(I,C)+r,U=F/r,V=1-z/i,G=a[w+0],H=a[w+1],W=a[w+2],X=Math.acos(W/Math.sqrt(G*G+H*H+W*W)),Z=Math.atan2(H,G)+r,Y=X/r,q=1-Z/i,K=[G-C,H-I,W-R],Q=[E-C,P-I,T-R],J=new D.c(K).cross(Q).normalize(),$=void 0;(0===L||0===V||0===q)&&(0===L||L>.5)&&(0===V||V>.5)&&(0===q||q>.5)&&(a.push(a[_+0],a[_+1],a[_+2]),$=a.length/3-1,o.push($),p[2*$+0]=1,p[2*$+1]=M,v[3*$+0]=J.x,v[3*$+1]=J.y,v[3*$+2]=J.z,a.push(a[O+0],a[O+1],a[O+2]),$=a.length/3-1,o.push($),p[2*$+0]=1,p[2*$+1]=U,v[3*$+0]=J.x,v[3*$+1]=J.y,v[3*$+2]=J.z,a.push(a[w+0],a[w+1],a[w+2]),$=a.length/3-1,o.push($),p[2*$+0]=1,p[2*$+1]=Y,v[3*$+0]=J.x,v[3*$+1]=J.y,v[3*$+2]=J.z),v[_+0]=v[O+0]=v[w+0]=J.x,v[_+1]=v[O+1]=v[w+1]=J.y,v[_+2]=v[O+2]=v[w+2]=J.z,p[j+0]=L,p[j+1]=M,p[k+0]=V,p[k+1]=U,p[x+0]=q,p[x+1]=Y}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(a)},NORMAL:{size:3,value:new Float32Array(v)},TEXCOORD_0:{size:2,value:new Float32Array(p)}}}}(t),a=i.indices,o=i.attributes;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,indices:a,attributes:Object(O.a)({},o,t.attributes)})))}return Object(x.a)(e,t),e}(_.a);var U=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("plane-geometry"):n,i=function(t){var e=t.type,n=void 0===e?"x,y":e,r=t.offset,i=void 0===r?0:r,a=t.flipCull,o=void 0!==a&&a,s=t.unpack,u=void 0!==s&&s,c=n.split(","),l=t["".concat(c[0],"len")]||1,h=t["".concat(c[1],"len")]||1,f=t["n".concat(c[0])]||1,d=t["n".concat(c[1])]||1,v=(f+1)*(d+1),p=new Float32Array(3*v),g=new Float32Array(3*v),b=new Float32Array(2*v);o&&(l=-l);for(var y=0,m=0,_=0;_<=d;_++)for(var O=0;O<=f;O++){var w=O/f,j=_/d;switch(b[y+0]=o?1-w:w,b[y+1]=j,n){case"x,y":p[m+0]=l*w-.5*l,p[m+1]=h*j-.5*h,p[m+2]=i,g[m+0]=0,g[m+1]=0,g[m+2]=o?1:-1;break;case"x,z":p[m+0]=l*w-.5*l,p[m+1]=i,p[m+2]=h*j-.5*h,g[m+0]=0,g[m+1]=o?1:-1,g[m+2]=0;break;case"y,z":p[m+0]=i,p[m+1]=l*w-.5*l,p[m+2]=h*j-.5*h,g[m+0]=o?1:-1,g[m+1]=0,g[m+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}y+=2,m+=3}for(var k=f+1,x=new Uint16Array(f*d*6),E=0;E<d;E++)for(var P=0;P<f;P++){var T=6*(E*f+P);x[T+0]=(E+0)*k+P,x[T+1]=(E+1)*k+P,x[T+2]=(E+0)*k+P+1,x[T+3]=(E+1)*k+P,x[T+4]=(E+1)*k+P+1,x[T+5]=(E+0)*k+P+1}var S={indices:{size:1,value:x},attributes:{POSITION:{size:3,value:p},NORMAL:{size:3,value:g},TEXCOORD_0:{size:2,value:b}}};return u?function(t){var e=t.indices,n=t.attributes;if(!e)return t;var r=e.value.length,i={};for(var a in n){var o=n[a],s=o.constant,u=o.value,c=o.size;if(!s&&c){for(var l=new u.constructor(r*c),h=0;h<r;++h)for(var f=e.value[h],d=0;d<c;d++)l[h*c+d]=u[f*c+d];i[a]={size:c,value:l}}}return{attributes:Object.assign({},n,i)}}(S):S}(t),a=i.indices,o=i.attributes;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,indices:a,attributes:Object(O.a)({},o,t.attributes)})))}return Object(x.a)(e,t),e}(_.a);var V=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(w.a)(this,e);var n=t.id,r=void 0===n?Object(E.c)("sphere-geometry"):n,i=function(t){var e=t.nlat,n=void 0===e?10:e,r=t.nlong,i=void 0===r?10:r,a=t.radius,o=void 0===a?1:a,s=Math.PI-0,u=2*Math.PI-0,c=(n+1)*(i+1);if("number"==typeof o){var l=o;o=function(t,e,n,r,i){return l}}for(var h=new Float32Array(3*c),f=new Float32Array(3*c),d=new Float32Array(2*c),v=new Uint16Array(n*i*6),p=0;p<=n;p++)for(var g=0;g<=i;g++){var b=g/i,y=p/n,m=g+p*(i+1),_=2*m,O=3*m,w=u*b,j=s*y,k=Math.sin(w),x=Math.cos(w),E=Math.sin(j),P=Math.cos(j),T=x*E,S=P,A=k*E,M=o(T,S,A,b,y);h[O+0]=M*T,h[O+1]=M*S,h[O+2]=M*A,f[O+0]=T,f[O+1]=S,f[O+2]=A,d[_+0]=b,d[_+1]=1-y}for(var L=n+1,C=0;C<n;C++)for(var I=0;I<i;I++){var R=6*(C*i+I);v[R+0]=I*L+C,v[R+1]=I*L+C+1,v[R+2]=(I+1)*L+C,v[R+3]=(I+1)*L+C,v[R+4]=I*L+C+1,v[R+5]=(I+1)*L+C+1}return{indices:{size:1,value:v},attributes:{POSITION:{size:3,value:h},NORMAL:{size:3,value:f},TEXCOORD_0:{size:2,value:d}}}}(t),a=i.indices,o=i.attributes;return Object(j.a)(this,Object(k.a)(e).call(this,Object(O.a)({},t,{id:r,indices:a,attributes:Object(O.a)({},o,t.attributes)})))}return Object(x.a)(e,t),e}(_.a);n.d(e,"Model",(function(){return r.a})),n.d(e,"Transform",(function(){return i.a})),n.d(e,"ProgramManager",(function(){return a.a})),n.d(e,"Timeline",(function(){return o.a})),n.d(e,"isWebGL2",(function(){return s.g})),n.d(e,"FEATURES",(function(){return u.a})),n.d(e,"hasFeatures",(function(){return c.c})),n.d(e,"getParameters",(function(){return s.d})),n.d(e,"setParameters",(function(){return s.k})),n.d(e,"withParameters",(function(){return s.l})),n.d(e,"cssToDeviceRatio",(function(){return s.c})),n.d(e,"readPixelsToBuffer",(function(){return l.d})),n.d(e,"copyToTexture",(function(){return l.b})),n.d(e,"cloneTextureFrom",(function(){return h.a})),n.d(e,"Buffer",(function(){return f.a})),n.d(e,"Program",(function(){return d.a})),n.d(e,"Framebuffer",(function(){return v.a})),n.d(e,"Renderbuffer",(function(){return p.a})),n.d(e,"Texture2D",(function(){return g.a})),n.d(e,"TextureCube",(function(){return b.a})),n.d(e,"Texture3D",(function(){return y.a})),n.d(e,"TransformFeedback",(function(){return m.a})),n.d(e,"Geometry",(function(){return _.a})),n.d(e,"ConeGeometry",(function(){return S})),n.d(e,"CubeGeometry",(function(){return R})),n.d(e,"CylinderGeometry",(function(){return F})),n.d(e,"IcoSphereGeometry",(function(){return z})),n.d(e,"PlaneGeometry",(function(){return U})),n.d(e,"SphereGeometry",(function(){return V})),n.d(e,"TruncatedConeGeometry",(function(){return T}))},function(t,e,n){"use strict";n.r(e);var r=n(22),i=n.n(r),a=n(2),o=n.n(a),s=n(4),u=n.n(s),c=n(10),l=n.n(c),h=n(7),f=n.n(h),d=n(47),v=n.n(d),p=n(11),g=n.n(p),b=n(1),y=n(3),m=n(0),_=n(27),O=n.n(_),w=("undefined"!=typeof window?window:global,"undefined"!=typeof global?global:window,"undefined"!=typeof document?document:{});var j={container:O.a.object,gl:O.a.object,mapboxApiAccessToken:O.a.string,mapboxApiUrl:O.a.string,attributionControl:O.a.bool,preserveDrawingBuffer:O.a.bool,reuseMaps:O.a.bool,transformRequest:O.a.func,mapOptions:O.a.object,mapStyle:O.a.oneOfType([O.a.string,O.a.object]),visible:O.a.bool,asyncRender:O.a.bool,onLoad:O.a.func,onError:O.a.func,width:O.a.number,height:O.a.number,viewState:O.a.object,longitude:O.a.number,latitude:O.a.number,zoom:O.a.number,bearing:O.a.number,pitch:O.a.number,altitude:O.a.number},k={container:w.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!=typeof window&&window.location){var e=window.location.search.match(/access_token=([^&\/]*)/);t=e&&e[1]}t||"undefined"==typeof process||(t=t||process.env.MapboxAccessToken||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN);return t||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",visible:!0,asyncRender:!1,onLoad:function(){},onError:function(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0};function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&O.a.checkPropTypes(j,t,"prop",e)}var E=function(){function t(e){var n=this;if(Object(b.a)(this,t),Object(m.a)(this,"mapboxgl",void 0),Object(m.a)(this,"props",k),Object(m.a)(this,"_map",null),Object(m.a)(this,"width",0),Object(m.a)(this,"height",0),Object(m.a)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),!e.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return Object(y.a)(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"resize",value:function(){return this._map.resize(),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(e.mapStyle,{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:e.mapStyle,interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",e.onLoad),this._map.on("error",e.onError)}return this}},{key:"_destroy",value:function(){this._map&&(t.savedMap?this._map.remove():(t.savedMap=this._map,this._map.off("load",this.props.onLoad),this._map.off("error",this.props.onError),this._map.off("styledata",this._fireLoadEvent)),this._map=null)}},{key:"_initialize",value:function(t){var e=this;x(t=Object.assign({},k,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||k.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){x(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);e.asyncRender||!n&&!r||this.redraw(),this.props=e}}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,a=e.pitch,o=void 0===a?0:a,s=e.bearing,u=void 0===s?0:s,c=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:o,bearing:u,altitude:void 0===c?1.5:c}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==w)try{var e=w.createElement("div");e.className="mapboxgl-map",e.style.display="none",w.body.append(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=w.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),w.head.append(r)}}catch(t){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();Object(m.a)(E,"initialized",!1),Object(m.a)(E,"propTypes",j),Object(m.a)(E,"defaultProps",k),Object(m.a)(E,"savedMap",null);var P=n(148);function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}n.d(e,"default",(function(){return A}));var S={position:"absolute",left:0,top:0,width:"100%",height:"100%"};var A=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o()(this,e),"undefined"==typeof document)throw Error("Deck can only be used in the browser");var r=function(t){var e=t.container,n=void 0===e?document.body:e;if("string"==typeof n&&(n=document.getElementById(n)),!n)throw Error("Deck: container not found");"static"===window.getComputedStyle(n).position&&(n.style.position="relative");var r=document.createElement("div");n.appendChild(r),Object.assign(r.style,S);var i=document.createElement("canvas");return n.appendChild(i),Object.assign(i.style,S),{container:n,mapCanvas:r,deckCanvas:i}}(n),a=r.mapCanvas,s=r.deckCanvas,u=n.viewState||n.initialViewState,c=Number.isFinite(u&&u.latitude),h=n.map,d=void 0===h?window.mapboxgl:h;return t=l()(this,f()(e).call(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(n,!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({canvas:s},n))),d&&d.Map?t._map=c&&new E(Object.assign({},n,{viewState:u,container:a,mapboxgl:d})):t._map=d,t._onBeforeRender=function(e){if(t.onBeforeRender(e),t._map){var n=t.getViewports()[0];t._map.setProps({width:n.width,height:n.height,viewState:n})}},t}return g()(e,t),u()(e,[{key:"getMapboxMap",value:function(){return this._map&&this._map.getMap()}},{key:"finalize",value:function(){this._map&&this._map.finalize(),v()(f()(e.prototype),"finalize",this).call(this)}},{key:"setProps",value:function(t){"onBeforeRender"in t&&this._onBeforeRender&&t.onBeforeRender!==this._onBeforeRender&&(this.onBeforeRender=t.onBeforeRender,t.onBeforeRender=this._onBeforeRender),v()(f()(e.prototype),"setProps",this).call(this,t)}}]),e}(P.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5);function i(t,e,n,i){var a="See luma.gl ".concat(n," Upgrade Guide at http://uber.github.io/luma.gl/#/documentation/overview/upgrade-guide"),o=Object.getPrototypeOf(t);i.forEach((function(t){o.methodName||(o[t]=function(){throw r.h.removed("Calling removed method ".concat(e,".").concat(t,": "),a)(),new Error(t)})}))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return c}));var r=n(136),i=n(5),a=n(21),o=2;function s(t,e){return u(t,e)}function u(t,e){return(e=Array.isArray(e)?e:[e]).every((function(e){return l(t,e)}))}function c(t){for(var e in t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},r.b)void 0===t.luma.caps[e]&&(t.luma.caps[e]=l(t,e));return t.luma.caps}function l(t,e){return t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},void 0===t.luma.caps[e]&&(t.luma.caps[e]=function(t,e){var n,o=r.b[e];Object(a.a)(o,e);var s=Object(i.g)(t)&&o[1]||o[0];if("function"==typeof s)n=s(t);else if(Array.isArray(s)){n=!0;var u=!0,c=!1,l=void 0;try{for(var h,f=s[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){var d=h.value;n=n&&Boolean(t.getExtension(d))}}catch(t){c=!0,l=t}finally{try{u||null==f.return||f.return()}finally{if(c)throw l}}}else"string"==typeof s?n=Boolean(t.getExtension(s)):"boolean"==typeof s?n=s:Object(a.a)(!1);return n}(t,e)),t.luma.caps[e]||i.h.log(o,"Feature: ".concat(e," not supported"))(),t.luma.caps[e]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(19),i=n(1),a=n(3),o=1,s=1,u=function(){function t(){Object(i.a)(this,t),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}return Object(a.a)(t,[{key:"addChannel",value:function(t){var e=t.delay,n=void 0===e?0:e,r=t.duration,i=void 0===r?Number.POSITIVE_INFINITY:r,a=t.rate,s=void 0===a?1:a,u=t.repeat,c=o++,l={time:0,delay:n,duration:i,rate:s,repeat:void 0===u?1:u};return this._setChannelTime(l,this.time),this.channels.set(c,l),c}},{key:"removeChannel",value:function(t){this.channels.delete(t);var e=!0,n=!1,i=void 0;try{for(var a,o=this.animations[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var s=Object(r.a)(a.value,2),u=s[0];s[1].channel===t&&this.detachAnimation(u)}}catch(t){n=!0,i=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"isFinished",value:function(t){var e=this.channels.get(t);return void 0!==e&&this.time>=e.delay+e.duration*e.repeat}},{key:"getTime",value:function(t){if(void 0===t)return this.time;var e=this.channels.get(t);return void 0===e?-1:e.time}},{key:"setTime",value:function(t){this.time=Math.max(0,t);var e=this.channels.values(),n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;this._setChannelTime(s,this.time)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}var u=this.animations.values(),c=!0,l=!1,h=void 0;try{for(var f,d=u[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var v=f.value,p=v.animation,g=v.channel;p.setTime(this.getTime(g))}}catch(t){l=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(l)throw h}}}},{key:"play",value:function(){this.playing=!0}},{key:"pause",value:function(){this.playing=!1,this.lastEngineTime=-1}},{key:"reset",value:function(){this.setTime(0)}},{key:"attachAnimation",value:function(t,e){var n=s++;return this.animations.set(n,{animation:t,channel:e}),t.setTime(this.getTime(e)),n}},{key:"detachAnimation",value:function(t){this.animations.delete(t)}},{key:"update",value:function(t){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=t),this.setTime(this.time+(t-this.lastEngineTime)),this.lastEngineTime=t)}},{key:"_setChannelTime",value:function(t,e){var n=e-t.delay;n>=t.duration*t.repeat?t.time=t.duration*t.rate:(t.time=Math.max(0,n)%t.duration,t.time*=t.rate)}}]),t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s}));var r="",i={};function a(t){r=t}function o(){return r}function s(t){for(var e in i)if(t.startsWith(e)){var n=i[e];return t.replace(e,n)}return t+=r}},function(t,e,n){"use strict";var r=n(24),i=n(23),a=n(0),o=n(1),s=n(3),u=n(120),c="8.0.17",l=Object(u.a)();var h=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Object(o.a)(this,t),this.storage=function(t){try{var e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(t){return null}}(r),this.id=e,this.config={},Object.assign(this.config,n),this._loadConfiguration()}return Object(s.a)(t,[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(t){return this.config={},this.updateConfiguration(t)}},{key:"updateConfiguration",value:function(t){if(Object.assign(this.config,t),this.storage){var e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}},{key:"_loadConfiguration",value:function(){var t={};if(this.storage){var e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}]),t}();function f(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>r&&(n=Math.min(n,r/t.width));var a=t.width*n,o=t.height*n,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}var d={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function v(t){return"string"==typeof t?d[t.toUpperCase()]||d.WHITE:t}function p(t,e){if(!t)throw new Error(e||"Assertion failed")}var g=n(51);function b(){var t;if(l&&g.b.performance)t=g.b.performance.now();else if(g.a.hrtime){var e=g.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}n.d(e,"a",(function(){return k}));var y={debug:l&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},m={enabled:!0,level:0};function _(){}var O={},w={once:!0};function j(t){for(var e in t)for(var n in t[e])return n||"untitled";return"empty"}var k=function(){function t(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id;Object(o.a)(this,t),this.id=e,this.VERSION=c,this._startTs=b(),this._deltaTs=b(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new h("__probe-".concat(this.id,"__"),m),this.userData={},this.timeStamp("".concat(this.id," started")),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n),i=!0,a=!1,o=void 0;try{for(var s,u=function(){var n=s.value;"function"==typeof t[n]&&(e.find((function(t){return n===t}))||(t[n]=t[n].bind(t)))},c=r[Symbol.iterator]();!(i=(s=c.next()).done);i=!0)u()}catch(t){a=!0,o=t}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}}(this),Object.seal(this)}return Object(s.a)(t,[{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((b()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((b()-this._deltaTs).toPrecision(10))}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:t}),this}},{key:"setLevel",value:function(t){return this._storage.updateConfiguration({level:t}),this}},{key:"assert",value:function(t,e){p(t,e)}},{key:"warn",value:function(t){return this._getLogFunction(0,t,y.warn,arguments,w)}},{key:"error",value:function(t){return this._getLogFunction(0,t,y.error,arguments)}},{key:"deprecated",value:function(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}},{key:"removed",value:function(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}},{key:"probe",value:function(t,e){return this._getLogFunction(t,e,y.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(t,e){return this._getLogFunction(t,e,y.debug,arguments)}},{key:"info",value:function(t,e){return this._getLogFunction(t,e,console.info,arguments)}},{key:"once",value:function(t,e){return this._getLogFunction(t,e,y.debug||y.info,arguments,w)}},{key:"table",value:function(t,e,n){return e?this._getLogFunction(t,e,console.table||_,n&&[n],{tag:j(e)}):_}},{key:"image",value:function(t){var e=t.logLevel,r=t.priority,a=t.image,o=t.message,s=void 0===o?"":o,u=t.scale,c=void 0===u?1:u;return this._shouldLog(e||r)?l?function(t){var e=t.image,n=t.message,r=void 0===n?"":n,a=t.scale,o=void 0===a?1:a;if("string"==typeof e){var s=new Image;return s.onload=function(){var t,e=f(s,r,o);(t=console).log.apply(t,Object(i.a)(e))},s.src=e,_}var u=e.nodeName||"";if("img"===u.toLowerCase()){var c;return(c=console).log.apply(c,Object(i.a)(f(e,r,o))),_}if("canvas"===u.toLowerCase()){var l=new Image;return l.onload=function(){var t;return(t=console).log.apply(t,Object(i.a)(f(l,r,o)))},l.src=e.toDataURL(),_}return _}({image:a,message:s,scale:c}):function(t){var e=t.image,r=(t.message,t.scale),i=void 0===r?1:r,a=null;try{a=n(168)}catch(t){}if(a)return function(){return a(e,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((function(t){return console.log(t)}))};return _}({image:a,message:s,scale:c}):_}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"get",value:function(t){return this._storage.config[t]}},{key:"set",value:function(t,e){this._storage.updateConfiguration(Object(a.a)({},t,e))}},{key:"time",value:function(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}},{key:"timeEnd",value:function(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(t,e){return this._getLogFunction(t,e,console.timeStamp||_)}},{key:"group",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},r=n=E({logLevel:t,message:e,opts:n}),i=r.collapsed;return n.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}},{key:"groupCollapsed",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}},{key:"groupEnd",value:function(t){return this._getLogFunction(t,"",console.groupEnd||_)}},{key:"withGroup",value:function(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(t){return this.isEnabled()&&this.getLevel()>=x(t)}},{key:"_getLogFunction",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0;if(this._shouldLog(t)){var o;a=E({logLevel:t,message:e,args:r,opts:a}),p(n=n||a.method),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=b();var s=a.tag||a.message;if(a.once){if(O[s])return _;O[s]=b()}return e=P(this.id,a.message,a),(o=n).bind.apply(o,[console,e].concat(Object(i.a)(a.args)))}return _}},{key:"level",set:function(t){this.setLevel(t)},get:function(){return this.getLevel()}},{key:"priority",set:function(t){this.level=t},get:function(){return this.level}}]),t}();function x(t){if(!t)return 0;var e;switch(Object(r.a)(t)){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return p(Number.isFinite(e)&&e>=0),e}function E(t){var e=t.logLevel,n=t.message;t.logLevel=x(e);for(var i=t.args?Array.from(t.args):[];i.length&&i.shift()!==n;);switch(t.args=i,Object(r.a)(e)){case"string":case"function":void 0!==n&&i.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());var a=Object(r.a)(t.message);return p("string"===a||"object"===a),Object.assign(t,t.opts)}function P(t,e,n){if("string"==typeof e){var r=n.time?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=Math.max(e-t.length,0);return"".concat(" ".repeat(n)).concat(t)}((s=n.total)<10?"".concat(s.toFixed(2),"ms"):s<100?"".concat(s.toFixed(1),"ms"):s<1e3?"".concat(s.toFixed(0),"ms"):"".concat((s/1e3).toFixed(2),"s")):"";e=n.time?"".concat(t,": ").concat(r,"  ").concat(e):"".concat(t,": ").concat(e),i=e,a=n.color,o=n.background,l||"string"!=typeof i||(a&&(a=v(a),i="[".concat(a,"m").concat(i,"[39m")),o&&(a=v(o),i="[".concat(o+10,"m").concat(i,"[49m"))),e=i}var i,a,o,s;return e}k.VERSION=c},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(1),i=n(13),a=n(9),o=n(28),s=n(3),u=n(14),c=n(5),l=n(39),h=n(36),f=n(55),d=n(94),v=function(t){function e(t){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,e),Object(f.a)(t),(n=Object(i.a)(this,Object(a.a)(e).call(this,t,s))).initialize(s),n.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(Object(o.a)(n)),n}return Object(u.a)(e,t),Object(s.a)(e,null,[{key:"isSupported",value:function(t){return Object(c.g)(t)}}]),Object(s.a)(e,[{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,Object(d.a)(this.buffers)||this.bind((function(){return t._unbindBuffers()})),this.setProps(e),this}},{key:"setProps",value:function(t){"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"bindOnUse"in t&&(t=t.bindOnUse),"buffers"in t&&this.setBuffers(t.buffers)}},{key:"setBuffers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind((function(){for(var n in e)t.setBuffer(n,e[n])})),this}},{key:"setBuffer",value:function(t,e){var n=this,r=this._getVaryingIndex(t),i=this._getBufferParams(e),a=i.buffer,o=i.byteSize,s=i.byteOffset;return r<0?(this.unused[t]=a,c.h.warn((function(){return"".concat(n.id," unused varying buffer ").concat(t)}))(),this):(this.buffers[r]=e,this.bindOnUse||this._bindBuffer(r,a,s,o),this)}},{key:"begin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(t),this}},{key:"end",value:function(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}},{key:"_getBufferParams",value:function(t){var e,n,r;return t instanceof h.a==!1?(r=t.buffer,n=t.byteSize,e=t.byteOffset):r=t,void 0===e&&void 0===n||(e=e||0,n=n||r.byteLength-e),{buffer:r,byteOffset:e,byteSize:n}}},{key:"_getVaryingInfo",value:function(t){return this.configuration&&this.configuration.getVaryingInfo(t)}},{key:"_getVaryingIndex",value:function(t){if(this.configuration)return this.configuration.getVaryingInfo(t).location;var e=Number(t);return Number.isFinite(e)?e:-1}},{key:"_bindBuffers",value:function(){if(this.bindOnUse)for(var t in this.buffers){var e=this._getBufferParams(this.buffers[t]),n=e.buffer,r=e.byteSize,i=e.byteOffset;this._bindBuffer(t,n,i,r)}}},{key:"_unbindBuffers",value:function(){if(this.bindOnUse)for(var t in this.buffers)this._bindBuffer(t,null)}},{key:"_bindBuffer",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=e&&e.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,t,i,n,r):this.gl.bindBufferBase(35982,t,i),this}},{key:"_createHandle",value:function(){return this.gl.createTransformFeedback()}},{key:"_deleteHandle",value:function(){this.gl.deleteTransformFeedback(this.handle)}},{key:"_bindHandle",value:function(t){this.gl.bindTransformFeedback(36386,this.handle)}}]),e}(l.a)},function(t,e,n){"use strict";var r,i=n(1),a=n(3),o=n(13),s=n(28),u=n(9),c=n(93),l=n(14),h=n(39),f=n(49),d=n(62),v=n(0),p=n(5),g=n(82),b=n(21),y=(r={},Object(v.a)(r,5126,C.bind(null,"uniform1fv",k,1,I)),Object(v.a)(r,35664,C.bind(null,"uniform2fv",k,2,I)),Object(v.a)(r,35665,C.bind(null,"uniform3fv",k,3,I)),Object(v.a)(r,35666,C.bind(null,"uniform4fv",k,4,I)),Object(v.a)(r,5124,C.bind(null,"uniform1iv",x,1,I)),Object(v.a)(r,35667,C.bind(null,"uniform2iv",x,2,I)),Object(v.a)(r,35668,C.bind(null,"uniform3iv",x,3,I)),Object(v.a)(r,35669,C.bind(null,"uniform4iv",x,4,I)),Object(v.a)(r,35670,C.bind(null,"uniform1iv",x,1,I)),Object(v.a)(r,35671,C.bind(null,"uniform2iv",x,2,I)),Object(v.a)(r,35672,C.bind(null,"uniform3iv",x,3,I)),Object(v.a)(r,35673,C.bind(null,"uniform4iv",x,4,I)),Object(v.a)(r,35674,C.bind(null,"uniformMatrix2fv",k,4,R)),Object(v.a)(r,35675,C.bind(null,"uniformMatrix3fv",k,9,R)),Object(v.a)(r,35676,C.bind(null,"uniformMatrix4fv",k,16,R)),Object(v.a)(r,35678,L),Object(v.a)(r,35680,L),Object(v.a)(r,5125,C.bind(null,"uniform1uiv",E,1,I)),Object(v.a)(r,36294,C.bind(null,"uniform2uiv",E,2,I)),Object(v.a)(r,36295,C.bind(null,"uniform3uiv",E,3,I)),Object(v.a)(r,36296,C.bind(null,"uniform4uiv",E,4,I)),Object(v.a)(r,35685,C.bind(null,"uniformMatrix2x3fv",k,6,R)),Object(v.a)(r,35686,C.bind(null,"uniformMatrix2x4fv",k,8,R)),Object(v.a)(r,35687,C.bind(null,"uniformMatrix3x2fv",k,6,R)),Object(v.a)(r,35688,C.bind(null,"uniformMatrix3x4fv",k,12,R)),Object(v.a)(r,35689,C.bind(null,"uniformMatrix4x2fv",k,8,R)),Object(v.a)(r,35690,C.bind(null,"uniformMatrix4x3fv",k,12,R)),Object(v.a)(r,35679,L),Object(v.a)(r,35682,L),Object(v.a)(r,36289,L),Object(v.a)(r,36292,L),Object(v.a)(r,36293,L),Object(v.a)(r,36298,L),Object(v.a)(r,36299,L),Object(v.a)(r,36300,L),Object(v.a)(r,36303,L),Object(v.a)(r,36306,L),Object(v.a)(r,36307,L),Object(v.a)(r,36308,L),Object(v.a)(r,36311,L),r),m={},_={},O={},w=[0];function j(t,e,n,r){1===e&&"boolean"==typeof t&&(t=t?1:0),Number.isFinite(t)&&(w[0]=t,t=w);var i=t.length;if(i%e&&p.h.warn("Uniform size should be multiples of ".concat(e),t)(),t instanceof n)return t;var a=r[i];a||(a=new n(i),r[i]=a);for(var o=0;o<i;o++)a[o]=t[o];return a}function k(t,e){return j(t,e,Float32Array,m)}function x(t,e){return j(t,e,Int32Array,_)}function E(t,e){return j(t,e,Uint32Array,O)}function P(t){if("]"!==t[t.length-1])return{name:t,length:1,isArray:!1};var e=t.match(/([^[]*)(\[[0-9]+\])?/);if(!e||e.length<2)throw new Error("Failed to parse GLSL uniform name ".concat(t));return{name:e[1],length:e[2]||1,isArray:Boolean(e[2])}}function T(t,e,n){var r=y[n.type];if(!r)throw new Error("Unknown GLSL uniform type ".concat(n.type));return r().bind(null,t,e)}function S(t,e,n){for(var r in t){var i=t[r];if((!n||Boolean(n[r]))&&!A(i))throw e=e?"".concat(e," "):"",console.error("".concat(e," Bad uniform ").concat(r),i),new Error("".concat(e," Bad uniform ").concat(r))}return!0}function A(t){return Array.isArray(t)||ArrayBuffer.isView(t)?function(t){if(0===t.length)return!1;for(var e=Math.min(t.length,16),n=0;n<e;++n)if(!Number.isFinite(t[n]))return!1;return!0}(t):!!isFinite(t)||(!0===t||!1===t||(t instanceof f.a||(t instanceof g.a||t instanceof d.a&&Boolean(t.texture))))}function M(t,e,n){if(Array.isArray(n)||ArrayBuffer.isView(n))if(t[e])for(var r=t[e],i=0,a=n.length;i<a;++i)r[i]=n[i];else t[e]=n.slice();else t[e]=n}function L(){var t=null;return function(e,n,r){var i=t!==r;return i&&(e.uniform1i(n,r),t=r),i}}function C(t,e,n,r){var i=null,a=null;return function(o,s,u){var c=e(u,n),l=c.length,h=!1;if(null===i)i=new Float32Array(l),a=l,h=!0;else{Object(b.a)(a===l,"Uniform length cannot change.");for(var f=0;f<l;++f)if(c[f]!==i[f]){h=!0;break}}return h&&(r(o,t,s,c),i.set(c)),h}}function I(t,e,n,r){t[e](n,r)}function R(t,e,n,r){t[e](n,!1,r)}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed",n=t.match(/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/);return n?n[1]:e}var D=35632,N=35633;function B(t,e,n,r){for(var i=t.split(/\r?\n/),a={},o={},s=r||F(e)||"(unnamed)",u="".concat(function(t){switch(t){case D:return"fragment";case N:return"vertex";default:return"unknown type"}}(n)," shader ").concat(s),c=0;c<i.length;c++){var l=i[c];if(!(l.length<=1)){var h=l.split(":"),f=h[0],d=parseInt(h[2],10);if(isNaN(d))throw new Error("GLSL compilation error in ".concat(u,": ").concat(t));"WARNING"!==f?a[d]=l:o[d]=l}}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ",r=t.split(/\r?\n/),i=String(r.length+e-1).length;return r.map((function(t,r){var a=r+e,o=String(a).length;return U(a,i-o)+n+t}))}(e);return{shaderName:u,errors:z(a,v),warnings:z(o,v)}}function z(t,e){for(var n="",r=0;r<e.length;r++){var i=e[r];if((t[r+3]||t[r+2]||t[r+1])&&(n+="".concat(i,"\n"),t[r+1])){var a=t[r+1],o=a.split(":",3),s=o[0],u=parseInt(o[1],10)||0,c=a.substring(o.join(":").length+1).trim();n+=U("^^^ ".concat(s,": ").concat(c,"\n\n"),u)}}return n}function U(t,e){for(var n="",r=0;r<e;++r)n+=" ";return"".concat(n).concat(t)}var V=n(55),G=n(94),H="Shader: GLSL source code must be a JavaScript string",W=function(t){function e(t,n){var r;Object(i.a)(this,e),Object(V.b)(t),Object(b.a)("string"==typeof n.source,H);var a=F(n.source,null)||n.id||Object(G.c)("unnamed ".concat(e.getTypeName(n.shaderType)));return(r=Object(o.a)(this,Object(u.a)(e).call(this,t,{id:a}))).shaderType=n.shaderType,r.source=n.source,r.initialize(n),r}return Object(l.a)(e,t),Object(a.a)(e,null,[{key:"getTypeName",value:function(t){switch(t){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return Object(b.a)(!1),"unknown"}}}]),Object(a.a)(e,[{key:"initialize",value:function(t){var e=t.source,n=F(e,null);n&&(this.id=Object(G.c)(n)),this._compile(e)}},{key:"getParameter",value:function(t){return this.gl.getShaderParameter(this.handle,t)}},{key:"toString",value:function(){return"".concat(e.getTypeName(this.shaderType),":").concat(this.id)}},{key:"getName",value:function(){return F(this.source)||"unnamed-shader"}},{key:"getSource",value:function(){return this.gl.getShaderSource(this.handle)}},{key:"getTranslatedSource",value:function(){var t=this.gl.getExtension("WEBGL.debug_shaders");return t?t.getTranslatedShaderSource(this.handle):"No translated source available. WEBGL.debug_shaders not implemented"}},{key:"_compile",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.source;t.startsWith("#version ")||(t="#version 100\n".concat(t)),this.source=t,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);var e=this.getParameter(35713);if(!e){var n=this.gl.getShaderInfoLog(this.handle),r=B(n,this.source,this.shaderType,this.id),i=r.shaderName,a=r.errors,o=r.warnings;throw p.h.error("GLSL compilation errors in ".concat(i,"\n").concat(a))(),p.h.warn("GLSL compilation warnings in ".concat(i,"\n").concat(o))(),new Error("GLSL compilation errors in ".concat(i))}}},{key:"_deleteHandle",value:function(){this.gl.deleteShader(this.handle)}},{key:"_getOptsFromHandle",value:function(){return{type:this.getParameter(35663),source:this.getSource()}}}]),e}(h.a),X=function(t){function e(t,n){return Object(i.a)(this,e),"string"==typeof n&&(n={source:n}),Object(o.a)(this,Object(u.a)(e).call(this,t,Object.assign({},n,{shaderType:35633})))}return Object(l.a)(e,t),Object(a.a)(e,[{key:"_createHandle",value:function(){return this.gl.createShader(35633)}}]),e}(W),Z=function(t){function e(t,n){return Object(i.a)(this,e),"string"==typeof n&&(n={source:n}),Object(o.a)(this,Object(u.a)(e).call(this,t,Object.assign({},n,{shaderType:35632})))}return Object(l.a)(e,t),Object(a.a)(e,[{key:"_createHandle",value:function(){return this.gl.createShader(35632)}}]),e}(W),Y=n(54),q=n(69),K=function(){function t(e){Object(i.a)(this,t),this.id=e.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(e),this._readVaryingsFromProgram(e)}return Object(a.a)(t,[{key:"getAttributeInfo",value:function(t){var e=Number(t);return Number.isFinite(e)?this.attributeInfosByLocation[e]:this.attributeInfosByName[t]||null}},{key:"getAttributeLocation",value:function(t){var e=this.getAttributeInfo(t);return e?e.location:-1}},{key:"getAttributeAccessor",value:function(t){var e=this.getAttributeInfo(t);return e?e.accessor:null}},{key:"getVaryingInfo",value:function(t){var e=Number(t);return Number.isFinite(e)?this.varyingInfos[e]:this.varyingInfosByName[t]||null}},{key:"getVaryingIndex",value:function(t){var e=this.getVaryingInfo();return e?e.location:-1}},{key:"getVaryingAccessor",value:function(t){var e=this.getVaryingInfo();return e?e.accessor:null}},{key:"_readAttributesFromProgram",value:function(t){for(var e=t.gl,n=e.getProgramParameter(t.handle,35721),r=0;r<n;r++){var i=e.getActiveAttrib(t.handle,r),a=i.name,o=i.type,s=i.size,u=e.getAttribLocation(t.handle,a);u>=0&&this._addAttribute(u,a,o,s)}this.attributeInfos.sort((function(t,e){return t.location-e.location}))}},{key:"_readVaryingsFromProgram",value:function(t){var e=t.gl;if(Object(p.g)(e)){for(var n=e.getProgramParameter(t.handle,35971),r=0;r<n;r++){var i=e.getTransformFeedbackVarying(t.handle,r),a=i.name,o=i.type,s=i.size;this._addVarying(r,a,o,s)}this.varyingInfos.sort((function(t,e){return t.location-e.location}))}}},{key:"_addAttribute",value:function(t,e,n,r){var i=Object(q.a)(n),a={type:i.type,size:r*i.components};this._inferProperties(t,e,a);var o={location:t,name:e,accessor:new Y.a(a)};this.attributeInfos.push(o),this.attributeInfosByLocation[t]=o,this.attributeInfosByName[o.name]=o}},{key:"_inferProperties",value:function(t,e,n){/instance/i.test(e)&&(n.divisor=1)}},{key:"_addVarying",value:function(t,e,n,r){var i=Object(q.a)(n),a=i.type,o=i.components,s={location:t,name:e,accessor:new Y.a({type:a,size:r*o})};this.varyingInfos.push(s),this.varyingInfosByName[s.name]=s}}]),t}(),Q=n(78);n.d(e,"a",(function(){return $}));var J=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"],$=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(this,e),(n=Object(o.a)(this,Object(u.a)(e).call(this,t,r))).stubRemovedMethods("Program","v6.0",J),n._isCached=!1,n.initialize(r),Object.seal(Object(s.a)(n)),n._setId(r.id),n}return Object(l.a)(e,t),Object(a.a)(e,[{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.hash,n=t.vs,r=t.fs,i=t.varyings,a=t.bufferMode,o=void 0===a?35981:a,s=t.debug,u=void 0!==s&&s;return this.hash=e||"",this.debug=u,this.vs="string"==typeof n?new X(this.gl,{id:"".concat(t.id,"-vs"),source:n}):n,this.fs="string"==typeof r?new Z(this.gl,{id:"".concat(t.id,"-fs"),source:r}):r,Object(b.a)(this.vs instanceof X),Object(b.a)(this.fs instanceof Z),this.uniforms={},this._textureUniforms={},this._texturesRenderable=!0,i&&i.length>0&&(Object(V.a)(this.gl),this.varyings=i,this.gl.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new K(this),this.setProps(t)}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:Object(c.a)(Object(u.a)(e.prototype),"delete",this).call(this,t)}},{key:"setProps",value:function(t){return"uniforms"in t&&this.setUniforms(t.uniforms),this}},{key:"draw",value:function(t){var e=this,n=t.logPriority,r=t.drawMode,i=void 0===r?4:r,a=t.vertexCount,o=t.offset,s=void 0===o?0:o,u=t.start,c=t.end,l=t.isIndexed,h=void 0!==l&&l,f=t.indexType,d=void 0===f?5123:f,v=t.instanceCount,g=void 0===v?0:v,y=t.isInstanced,m=void 0===y?g>0:y,_=t.vertexArray,O=void 0===_?null:_,w=t.transformFeedback,j=t.framebuffer,k=t.parameters,x=void 0===k?{}:k,E=t.uniforms,P=t.samplers;if((E||P)&&(p.h.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(E||{})),this.debug&&void 0!==n){var T=j?j.id:"default",S="mode=".concat(Object(Q.a)(this.gl,i)," verts=").concat(a," ")+"instances=".concat(g," indexType=").concat(Object(Q.a)(this.gl,d)," ")+"isInstanced=".concat(m," isIndexed=").concat(h," ")+"Framebuffer=".concat(T);p.h.log(n,S)()}return Object(b.a)(O),this.gl.useProgram(this.handle),!!this._areTexturesRenderable()&&(O.bindForDraw(a,g,(function(){if(void 0!==j&&(x=Object.assign({},x,{framebuffer:j})),w){var t=Object(q.c)(i);w.begin(t)}e._bindTextures(),Object(p.l)(e.gl,x,(function(){h&&m?e.gl.drawElementsInstanced(i,a,d,s,g):h&&Object(p.g)(e.gl)&&!isNaN(u)&&!isNaN(c)?e.gl.drawRangeElements(i,u,c,a,d,s):h?e.gl.drawElements(i,a,d,s):m?e.gl.drawArraysInstanced(i,s,a,g):e.gl.drawArrays(i,s,a)})),w&&w.end()})),!0)}},{key:"setUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in this.debug&&S(t,this.id,this._uniformSetters),this.gl.useProgram(this.handle),t){var n=t[e],r=this._uniformSetters[e];if(r){var i=n,a=!1;if(i instanceof d.a&&(i=i.texture),i instanceof f.a)if(a=this.uniforms[e]!==n){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);var o=i,s=r.textureIndex;o.bind(s),i=s,o.loaded||(this._texturesRenderable=!1),this._textureUniforms[e]=o}else i=r.textureIndex;else this._textureUniforms[e]&&delete this._textureUniforms[e];(r(i)||a)&&M(this.uniforms,e,n)}}return this}},{key:"_areTexturesRenderable",value:function(){if(this._texturesRenderable)return!0;for(var t in this._texturesRenderable=!0,this._textureUniforms){var e=this._textureUniforms[t];this._texturesRenderable=this._texturesRenderable&&e.loaded}return this._texturesRenderable}},{key:"_bindTextures",value:function(){for(var t in this._textureUniforms){var e=this._uniformSetters[t].textureIndex;this._textureUniforms[t].bind(e)}}},{key:"_createHandle",value:function(){return this.gl.createProgram()}},{key:"_deleteHandle",value:function(){this.gl.deleteProgram(this.handle)}},{key:"_getOptionsFromHandle",value:function(t){var e=this.gl.getAttachedShaders(t),n={},r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new X({handle:u});break;case 35632:n.fs=new Z({handle:u})}}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}},{key:"_getParameter",value:function(t){return this.gl.getProgramParameter(this.handle,t)}},{key:"_setId",value:function(t){if(!t){var e=this._getName();this.id=Object(G.c)(e)}}},{key:"_getName",value:function(){var t=this.vs.getName()||this.fs.getName();return t=(t=t.replace(/shader/i,""))?"".concat(t,"-program"):"program"}},{key:"_compileAndLink",value:function(){var t=this.gl;if((t.attachShader(this.handle,this.vs.handle),t.attachShader(this.handle,this.fs.handle),p.h.time(4,"linkProgram for ".concat(this._getName()))(),t.linkProgram(this.handle),p.h.timeEnd(4,"linkProgram for ".concat(this._getName()))(),t.debug||p.h.level>0)&&(t.validateProgram(this.handle),!t.getProgramParameter(this.handle,35714)))throw new Error("Error linking: ".concat(t.getProgramInfoLog(this.handle)))}},{key:"_readUniformLocationsFromLinkedProgram",value:function(){var t=this.gl;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(var e=0;e<this._uniformCount;e++){var n=this.gl.getActiveUniform(this.handle,e),r=P(n.name),i=r.name,a=(r.isArray,t.getUniformLocation(this.handle,i));if(this._uniformSetters[i]=T(t,a,n),n.size>1)for(var o=0;o<n.size;o++)a=t.getUniformLocation(this.handle,"".concat(i,"[").concat(o,"]")),this._uniformSetters["".concat(i,"[").concat(o,"]")]=T(t,a,n)}this._textureIndexCounter=0}},{key:"getActiveUniforms",value:function(t,e){return this.gl.getActiveUniforms(this.handle,t,e)}},{key:"getUniformBlockIndex",value:function(t){return this.gl.getUniformBlockIndex(this.handle,t)}},{key:"getActiveUniformBlockParameter",value:function(t,e){return this.gl.getActiveUniformBlockParameter(this.handle,t,e)}},{key:"uniformBlockBinding",value:function(t,e){this.gl.uniformBlockBinding(this.handle,t,e)}}]),e}(h.a)},function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(19),o=n(129),s="void main() {gl_FragColor = vec4(0);}",u="out vec4 transform_output;\nvoid main() {\n  transform_output = vec4(0);\n}",c="#version 300 es\n".concat(u);function l(t,e){e=Array.isArray(e)?e:[e];var n=t.replace(/^\s+/,"").split(/\s+/),r=Object(a.a)(n,3),i=r[0],o=r[1],s=r[2];return e.includes(i)&&o&&s?{qualifier:i,type:o,name:s.split(";")[0]}:null}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.version,n=void 0===e?100:e,r=t.input,i=t.inputType,a=t.output;if(!r)return 300===n?c:n>300?"#version ".concat(n,"\n").concat(u):s;var l=function(t,e){switch(e){case"float":return"vec4(".concat(t,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(t,", 0.0, 1.0)");case"vec3":return"vec4(".concat(t,", 1.0)");case"vec4":return t;default:return Object(o.a)(!1),null}}(r,i);return n>=300?"#version ".concat(n," ").concat(300===n?"es":"","\nin ").concat(i," ").concat(r,";\nout vec4 ").concat(a,";\nvoid main() {\n  ").concat(a," = ").concat(l,";\n}"):"varying ".concat(i," ").concat(r,";\nvoid main() {\n  gl_FragColor = ").concat(l,";\n}")}function f(t){switch(t){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return Object(o.a)(!1),null}}var d=n(5),v=n(36),p=n(195),g=n(21),b=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),this.gl=e,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(n),Object.seal(this)}return Object(i.a)(t,[{key:"setupResources",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,a=this.bindings[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;this._setupTransformFeedback(o,t)}}catch(t){n=!0,r=t}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"updateModelProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.varyings;return e.length>0&&(t=Object.assign({},t,{varyings:e})),t}},{key:"getDrawOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],n=e.sourceBuffers,r=e.transformFeedback,i=Object.assign({},n,t.attributes);return{attributes:i,transformFeedback:r}}},{key:"swap",value:function(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t)}},{key:"getBuffer",value:function(t){var e=this.bindings[this.currentIndex].feedbackBuffers,n=t?e[t]:null;return n?n instanceof v.a?n:n.buffer:null}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.varyingName,n=this.getBuffer(e);return n?n.getData():null}},{key:"delete",value:function(){for(var t in this.resources)this.resources[t].delete()}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t),this.varyings=t.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&Object(g.a)(Object(d.g)(this.gl))}},{key:"_getFeedbackBuffers",value:function(t){var e=t.sourceBuffers,n=void 0===e?{}:e,r={};if(this.bindings[this.currentIndex]&&Object.assign(r,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(var i in this.feedbackMap){var a=this.feedbackMap[i];i in n&&(r[a]=i)}for(var o in Object.assign(r,t.feedbackBuffers),r){var s=r[o];if("string"==typeof s){var u=n[s],c=u.byteLength,l=u.usage,h=u.accessor;r[o]=this._createNewBuffer(o,{byteLength:c,usage:l,accessor:h})}}return r}},{key:"_setupBuffers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.sourceBuffers,n=void 0===e?null:e;Object.assign(this.feedbackMap,t.feedbackMap);var r=this._getFeedbackBuffers(t);this._updateBindings({sourceBuffers:n,feedbackBuffers:r})}},{key:"_setupTransformFeedback",value:function(t,e){var n=e.model.program;t.transformFeedback=new p.a(this.gl,{program:n,buffers:t.feedbackBuffers})}},{key:"_updateBindings",value:function(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this.feedbackMap){var e=this._swapBuffers(this.bindings[this.currentIndex]),n=e.sourceBuffers,r=e.feedbackBuffers,i=this._getNextIndex();this.bindings[i]=this._updateBinding(this.bindings[i],{sourceBuffers:n,feedbackBuffers:r})}}},{key:"_updateBinding",value:function(t,e){return t?(Object.assign(t.sourceBuffers,e.sourceBuffers),Object.assign(t.feedbackBuffers,e.feedbackBuffers),t.transformFeedback&&t.transformFeedback.setBuffers(t.feedbackBuffers),t):{sourceBuffers:Object.assign({},e.sourceBuffers),feedbackBuffers:Object.assign({},e.feedbackBuffers)}}},{key:"_swapBuffers",value:function(t){if(!this.feedbackMap)return null;var e=Object.assign({},t.sourceBuffers),n=Object.assign({},t.feedbackBuffers);for(var r in this.feedbackMap){var i=this.feedbackMap[r];e[r]=t.feedbackBuffers[i],n[i]=t.sourceBuffers[r],Object(g.a)(n[i]instanceof v.a)}return{sourceBuffers:e,feedbackBuffers:n}}},{key:"_createNewBuffer",value:function(t,e){var n=new v.a(this.gl,e);return this.resources[t]&&this.resources[t].delete(),this.resources[t]=n,n}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}}]),t}(),y=n(0),m=n(141),_=n(92),O=n(62),w=n(151);function j(t){var e=100,n=t.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){var r=parseInt(n[1],10);Number.isFinite(r)&&(e=r)}return e}var k,x=n(140),E={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n  return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n  float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n  float xIndex = transform_elementID - (yIndex * texSize[0]);\n  return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n  vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n  vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n  vec2 coord = indices / size + pixelSizeHalf;\n  return coord;\n}\nvec2 transform_getPos(vec2 size) {\n  vec2 texCoord = transform_getTexCoord(size);\n  vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n  return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n  vec2 texCoord = transform_getTexCoord(size);\n  vec4 textureColor = texture2D(texSampler, texCoord);\n  return textureColor;\n}\n",fs:null},P="transform_uSampler_",T="transform_uSize_",S="transform_position";function A(t){var e=t.vs,n=t.sourceTextureMap,r=t.targetTextureVarying,i=t.targetTexture,a=Object.keys(n).length,s=null,u={},c=e,h={};if(a>0||r){var f=c.split("\n"),d=f.slice();if(f.forEach((function(t,e,i){if(a>0){var c=function(t,e){var n={},r=function(t){return l(t,["attribute","in"])}(t);if(!r)return null;var i=r.type,a=r.name;if(a&&e[a]){var s="// ".concat(t," => Replaced by Transform with a sampler"),u=function(t){var e="".concat(P).concat(t),n="".concat(T).concat(t),r="  uniform sampler2D ".concat(e,";\n  uniform vec2 ").concat(n,";");return{samplerName:e,sizeName:n,uniformDeclerations:r}}(a),c=u.samplerName,h=u.sizeName,f=u.uniformDeclerations,d=function(t){switch(t){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return Object(o.a)(!1),null}}(i),v="  ".concat(i," ").concat(a," = transform_getInput(").concat(c,", ").concat(h,").").concat(d,";\n");return n[c]=a,{updatedLine:s,inject:{"vs:#decl":f,"vs:#main-start":v},samplerTextureMap:n}}return null}(t,n);if(c){var f=c.updatedLine,v=c.inject;d[e]=f,h=Object(x.b)([h,v]),Object.assign(u,c.samplerTextureMap),a--}}r&&!s&&(s=function(t,e){var n=l(t,["varying","out"]);if(!n)return null;return n.name===e?n.type:null}(t,r))})),r){Object(g.a)(i);var v="".concat(T).concat(r),p={"vs:#decl":"uniform vec2 ".concat(v,";\n"),"vs:#main-start":"     vec2 ".concat(S," = transform_getPos(").concat(v,");\n     gl_Position = vec4(").concat(S,", 0, 1.);\n")};h=Object(x.b)([h,p])}c=d.join("\n")}return{vs:c,targetTextureType:s,inject:h,samplerTextureMap:u}}function M(t){var e,n,r=t.sourceTextureMap,i=t.targetTextureVarying,a=t.targetTexture,o={};for(var s in i&&(e=a.width,n=a.height,o["".concat(T).concat(i)]=[e,n]),r){var u=r[s];e=u.width,n=u.height,o["".concat(T).concat(s)]=[e,n]}return o}var L=(k={},Object(y.a)(k,10241,9728),Object(y.a)(k,10240,9728),Object(y.a)(k,10242,33071),Object(y.a)(k,10243,33071),k),C=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),this.gl=e,this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(n),Object.seal(this)}return Object(i.a)(t,[{key:"updateModelProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._processVertexShader(t);return Object.assign({},t,e)}},{key:"getDrawOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],n=e.sourceTextures,r=e.framebuffer,i=e.targetTexture,a=Object.assign({},t.attributes),o=Object.assign({},t.uniforms),s=Object.assign({},t.parameters),u=t.discard;if(this.hasSourceTextures||this.hasTargetTexture){for(var c in a.transform_elementID=this.elementIDBuffer,this.samplerTextureMap){var l=this.samplerTextureMap[c];o[c]=n[l]}this._setSourceTextureParameters();var h=M({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(o,h)}return this.hasTargetTexture&&(u=!1,s.viewport=[0,0,r.width,r.height]),{attributes:a,framebuffer:r,uniforms:o,discard:u,parameters:s}}},{key:"swap",value:function(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(t)}},{key:"getTargetTexture",value:function(){return this.bindings[this.currentIndex].targetTexture}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.packed,n=void 0!==e&&e,r=this.bindings[this.currentIndex].framebuffer,i=Object(m.c)(r);if(!n)return i;for(var a=i.constructor,o=f(this.targetTextureType),s=new a(i.length*o/4),u=0,c=0;c<i.length;c+=4)for(var l=0;l<o;l++)s[u++]=i[c+l];return s}},{key:"getFramebuffer",value:function(){return this.bindings[this.currentIndex].framebuffer}},{key:"delete",value:function(){this.ownTexture&&this.ownTexture.delete(),this.elementIDBuffer&&this.elementIDBuffer.delete()}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t._targetTextureVarying,n=t._swapTexture;this._swapTexture=n,this.targetTextureVarying=e,this.hasTargetTexture=e,this._setupTextures(t)}},{key:"_createTargetTexture",value:function(t){var e=t.sourceTextures,n=t.textureOrReference;if(n instanceof _.a)return n;var r=e[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}},{key:"_setupTextures",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t._sourceTextures,n=void 0===e?{}:e,r=t._targetTexture,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceTextures:n,targetTexture:i}),"elementCount"in t&&this._updateElementIDBuffer(t.elementCount)}},{key:"_updateElementIDBuffer",value:function(t){if(!("number"!=typeof t||this.elementCount>=t)){var e=new Float32Array(t);e.forEach((function(t,e,n){n[e]=e})),this.elementIDBuffer?this.elementIDBuffer.setData({data:e}):this.elementIDBuffer=new v.a(this.gl,{data:e,accessor:{size:1}}),this.elementCount=t}}},{key:"_updateBindings",value:function(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this._swapTexture){var e=this._swapTextures(this.bindings[this.currentIndex]),n=e.sourceTextures,r=e.targetTexture,i=this._getNextIndex();this.bindings[i]=this._updateBinding(this.bindings[i],{sourceTextures:n,targetTexture:r})}}},{key:"_updateBinding",value:function(t,e){var n=e.sourceTextures,r=e.targetTexture;if(t||(t={sourceTextures:{},targetTexture:null}),Object.assign(t.sourceTextures,n),r){t.targetTexture=r;var i=r.width,a=r.height,o=t.framebuffer;o?(o.update({attachments:Object(y.a)({},36064,r),resizeAttachments:!1}),o.resize({width:i,height:a})):t.framebuffer=new O.a(this.gl,{id:"".concat(this.id||"transform","-framebuffer"),width:i,height:a,attachments:Object(y.a)({},36064,r)})}return t}},{key:"_setSourceTextureParameters",value:function(){var t=this.currentIndex,e=this.bindings[t].sourceTextures;for(var n in e)e[n].setParameters(L)}},{key:"_swapTextures",value:function(t){if(!this._swapTexture)return null;var e=Object.assign({},t.sourceTextures);return e[this._swapTexture]=t.targetTexture,{sourceTextures:e,targetTexture:t.sourceTextures[this._swapTexture]}}},{key:"_createNewTexture",value:function(t){var e,n=Object(w.a)(t,{parameters:(e={},Object(y.a)(e,10241,9728),Object(y.a)(e,10240,9728),Object(y.a)(e,10242,33071),Object(y.a)(e,10243,33071),e),pixelStore:Object(y.a)({},37440,!1)});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=n,n}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}},{key:"_processVertexShader",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],n=e.sourceTextures,r=e.targetTexture,i=A({vs:t.vs,sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:r}),a=i.vs,o=i.uniforms,s=i.targetTextureType,u=i.inject,c=i.samplerTextureMap,l=Object(x.b)([t.inject||{},u]);this.targetTextureType=s,this.samplerTextureMap=c;var f=t._fs||h({version:j(a),input:this.targetTextureVarying,inputType:s,output:"transform_output"}),d=this.hasSourceTextures||this.targetTextureVarying?[E].concat(t.modules||[]):t.modules;return{vs:a,fs:f,modules:d,uniforms:o,inject:l}}}]),t}(),I=n(94),R=n(128);n.d(e,"a",(function(){return F}));var F=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),this.gl=e,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(n),Object.seal(this)}return Object(i.a)(t,null,[{key:"isSupported",value:function(t){return Object(d.g)(t)}}]),Object(i.a)(t,[{key:"delete",value:function(){var t=this.model,e=this.bufferTransform,n=this.textureTransform;t&&t.delete(),e&&e.delete(),n&&n.delete()}},{key:"run",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.clearRenderTarget,n=void 0===e||e,r=this._updateDrawOptions(t);n&&r.framebuffer&&r.framebuffer.clear({color:!0}),this.model.transform(r)}},{key:"swap",value:function(){var t=!1,e=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t=t||s.swap()}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}Object(g.a)(t,"Nothing to swap")}},{key:"getBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(t)}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=s.getData(t);if(u)return u}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}},{key:"getFramebuffer",value:function(){return this.textureTransform&&this.textureTransform.getFramebuffer()}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in t&&this.model.setVertexCount(t.elementCount);var e=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.update(t)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.gl;this._buildResourceTransforms(e,t),t=this._updateModelProps(t),this.model=new R.a(e,Object.assign({},t,{fs:t.fs||h({version:j(t.vs)}),id:t.id||"transform-model",drawMode:t.drawMode||0,vertexCount:t.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}},{key:"_updateModelProps",value:function(t){var e=Object.assign({},t),n=[this.bufferTransform,this.textureTransform].filter(Boolean),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){e=o.value.updateModelProps(e)}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return e}},{key:"_buildResourceTransforms",value:function(t,e){(function(t){if(!Object(I.a)(t.sourceBuffers)||!Object(I.a)(t.feedbackBuffers)||t.varyings&&t.varyings.length>0)return!0;return!1})(e)&&(this.bufferTransform=new b(t,e)),function(t){if(!Object(I.a)(t._sourceTextures)||t._targetTexture||t._targetTextureVarying)return!0;return!1}(e)&&(this.textureTransform=new C(t,e)),Object(g.a)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}},{key:"_updateDrawOptions",value:function(t){var e=Object.assign({},t),n=[this.bufferTransform,this.textureTransform].filter(Boolean),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;e=Object.assign(e,u.getDrawOptions(e))}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return e}}]),t}()},function(t,e,n){"use strict";var r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n  vec3 color;\n  vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n  return pointLight.attenuation.x\n       + pointLight.attenuation.y * distance\n       + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n",i={name:"lights",vs:r,fs:r,getUniforms:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;if("lightSources"in e){var n=e.lightSources||{},r=n.ambientLight,i=n.pointLights,s=n.directionalLights;return r||i&&i.length>0||s&&s.length>0?Object.assign({},function(t){var e=t.ambientLight,n=t.pointLights,r=void 0===n?[]:n,i=t.directionalLights,a=void 0===i?[]:i,s={};s["lighting_uAmbientLight.color"]=e?o(e):[0,0,0];return r.forEach((function(t,e){s["lighting_uPointLight[".concat(e,"].color")]=o(t),s["lighting_uPointLight[".concat(e,"].position")]=t.position,s["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]})),s.lighting_uPointLightCount=r.length,a.forEach((function(t,e){s["lighting_uDirectionalLight[".concat(e,"].color")]=o(t),s["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction})),s.lighting_uDirectionalLightCount=a.length,s}({ambientLight:r,pointLights:i,directionalLights:s}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in e){var u={pointLights:[],directionalLights:[]},c=!0,l=!1,h=void 0;try{for(var f,d=(e.lights||[])[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var v=f.value;switch(v.type){case"ambient":u.ambientLight=v;break;case"directional":u.directionalLights.push(v);break;case"point":u.pointLights.push(v)}}}catch(t){l=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(l)throw h}}return t({lightSources:u})}return{}},defines:{MAX_LIGHTS:3}},a={};function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color,n=void 0===e?[0,0,0]:e,r=t.intensity,i=void 0===r?1:r;return n.map((function(t){return t*i/255}))}var s="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3  lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n    vec3 halfway_direction = normalize(light_direction + view_direction);\n    float lambertian = dot(light_direction, normal_worldspace);\n    float specular = 0.0;\n    if (lambertian > 0.0) {\n      float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n      specular = pow(specular_angle, lighting_uShininess);\n    }\n    lambertian = max(lambertian, 0.0);\n    return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = surfaceColor;\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n    lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = vec3(0, 0, 0);\n  vec3 surfaceColor = vec3(0, 0, 0);\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return c}));var u={name:"gouraud-lighting",dependencies:[i],vs:s,defines:{LIGHTING_VERTEX:1},getUniforms:h},c={name:"phong-lighting",dependencies:[i],fs:s,defines:{LIGHTING_FRAGMENT:1},getUniforms:h},l={};function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;if(!("material"in t))return{};var e=t.material;return e?function(t){var e=t.ambient,n=void 0===e?.35:e,r=t.diffuse,i=void 0===r?.6:r,a=t.shininess,o=void 0===a?32:a,s=t.specularColor;return{lighting_uAmbient:n,lighting_uDiffuse:i,lighting_uShininess:o,lighting_uSpecularColor:(void 0===s?[30,30,30]:s).map((function(t){return t/255}))}}(e):{lighting_uEnabled:!1}}}])}));