/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mapgl=e():t.mapgl=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},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=18)}([function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},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=116)}([function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return c}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function c(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create,Object.create},function(t,e,n){"use strict";n.r(e),n.d(e,"MAP_DEFAULTS",(function(){return o})),n.d(e,"tiles",(function(){return a})),n.d(e,"hillshade",(function(){return s})),n.d(e,"commercialPoi",(function(){return c})),n.d(e,"modelCacheSize",(function(){return l})),n.d(e,"loadModelsInfoStyleZoom",(function(){return u})),n.d(e,"atlasSize",(function(){return d})),n.d(e,"urls",(function(){return f})),n.d(e,"traffic",(function(){return h})),n.d(e,"fonts",(function(){return p})),n.d(e,"icons",(function(){return m})),n.d(e,"styles",(function(){return v})),n.d(e,"events",(function(){return _})),n.d(e,"analytics",(function(){return y})),n.d(e,"workerResetDebounceTime",(function(){return g})),n.d(e,"houseHover",(function(){return b})),n.d(e,"tileAnimation",(function(){return w})),n.d(e,"buildingAnimation",(function(){return x})),n.d(e,"entranceAnimation",(function(){return S})),n.d(e,"identify",(function(){return I})),n.d(e,"labeling",(function(){return j})),n.d(e,"render",(function(){return O})),n.d(e,"defaultLang",(function(){return M})),n.d(e,"zoom",(function(){return P})),n.d(e,"inertia",(function(){return L})),n.d(e,"camera",(function(){return T})),n.d(e,"floors",(function(){return k})),n.d(e,"fences",(function(){return z})),n.d(e,"performanceCheck",(function(){return C})),n.d(e,"commercialSublayers",(function(){return E})),n.d(e,"personalSublayers",(function(){return A})),n.d(e,"landmarkPoiSublayers",(function(){return D})),n.d(e,"landmarkRasterSizes",(function(){return F})),n.d(e,"defaultMarkerIcon",(function(){return R})),n.d(e,"defaultMarkerAnchor",(function(){return B}));var i=n(58),r=n(55),o={minZoom:2,maxZoom:20},a={protocol:"https",server:r.h,subdomains:"0123",tileSet:i.a?"web":"vector_b",tileKey:"empty",appId:"empty",cacheRatio:2,maxUniverseZoom:8,maxRegionalZoom:15,maxDetailLevel:17,displayBounds:!1},s={minZoom:5,maxZoom:11},c={minZoom:14,maxZoom:14,rasterSizes:[96,84,72,60,48,36,24]},l=100,u=13.5,d=[2048,2048],f={tiles:"{protocol}://{host}/vt?r={request}&ts={tileSet}&key={tileKey}&appId={appId}&lang={lang}&default_lang={defaultLang}&s={sessionId}",metatile:"{protocol}://{host}/metafiles/{hash}/metatile.json?ts={tileSet}",modelInfo:"{protocol}://{host}/metafiles/{regionId}/models.json?ts={tileSet}",model:"{protocol}://{host}/metafiles/{regionId}/{name}?ts={tileSet}",convertData:"{protocol}://{host}/metafiles/{hash}/convert.json?ts={tileSet}",dynamicPoi:"{protocol}://{host}/metafiles/{regionId}/poi/{id}_{width}_{height}.png?ts={tileSet}"},h={protocol:"https",host:r.i,url:"{protocol}://{host}/tiles?tls={tiles}&reg={regions}&tm={time}&fmt=json&z={z}",timestampUrl:"{protocol}://{host}/meta?reg={regions}&time&score",updateInterval:12e4,minZoom:10,maxZoom:16,maxDetailLevel:17},p={defaultUrl:r.a,gamma:.08,baseSize:24,baseLineHeight:1.2,bomCharCode:65279},m={defaultUrl:r.b,nameTemplate:"{name}"},v={url:r.g,path:"styles/{id}"},_={doubleClickTime:185,dragThreshold:2,pitchWaitingTime:200,pitchThreshold:7},y={gaCode:"UA-25529177-4",gaName:"mapglEngine"},g=3e3,b={inAnimationTime:180,inAnimationType:"linear",outAnimationTime:800,outAnimationType:"linear"},w={time:300,type:"linear"},x={minStyleZoom:16,duration:500,easing:"easeOutQuint"},S={bounceType:"easeOutElastic",bounceTime:750,growType:"easeInOutQuad",growTime:750,stagger:0},I={pixelDensity:.5,sceneOpacity:0,cacheDebounceTime:400,pickDistance:3},j={interval:220,animationTime:200,animationType:"linear",tileMultiplier:1.5,axisAngleToleranceDeg:45,axisCheckDistancePx:12,boundsDead:!1,boundsAlive:!1,commercialBoundsDead:!1,commercialBoundsAlive:!1,boundsUnused:!1,commercialMargins:{visibleLeftRight:60,visibleTopBottom:60,appearLeftRight:70,appearTopBottom:70},lineLabelsHidePitchDeg:40,maxLabelLength:30},O={alwaysRerender:!1},M="en",P={mouseDelta:.65,macTouchDelta:.0018,animDuration:400,throttleDelay:100,mouseRotateDelta:2.5,mousePitchDelta:2.5,mobilePinchDelta:1,mobileTapDelta:10},L={duration:1300,maxSpeed:8,minSpeed:.02,nonLinearity:5},T={fov:60,near:1e3,far:Math.pow(2,34),minCalculationScreenHeight:1e3,hidePointObjectsAtPitch:30,viewportLimitRatio:2},k={enabled:!0,url:r.c,displayStyleZoom:17,wallHeight:800,islandHeight:400,wallMinBrightness:.8265,wallMaxBrightness:.95,viewportPadding:.2},z={lightIntensity:.1},C={fpsCaveat:10},E=["Commercial_poi_default","Commercial_poi_custom","Commercial_poi_navi"],A=["s_personal_poi"],D=["Landmark_poi","Landmark_point"],F=[105,84,63,42,21],R="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",B=[15,43]},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"l",(function(){return a})),n.d(e,"j",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"r",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"n",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"p",(function(){return h})),n.d(e,"q",(function(){return p})),n.d(e,"o",(function(){return m})),n.d(e,"g",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"u",(function(){return y})),n.d(e,"t",(function(){return g})),n.d(e,"i",(function(){return b})),n.d(e,"h",(function(){return w})),n.d(e,"s",(function(){return x})),n.d(e,"f",(function(){return S})),n.d(e,"k",(function(){return I}));var i=n(10);function r(){var t=new i.a(3);return t[0]=0,t[1]=0,t[2]=0,t}function o(t){var e=new i.a(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var r=new i.a(3);return r[0]=t,r[1]=e,r[2]=n,r}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function f(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function h(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function p(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function m(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=r*c-o*s,t[1]=o*a-i*c,t[2]=i*s-r*a,t}function y(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}function g(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function b(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function w(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],c=e[2];return Math.abs(n-a)<=i.b*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i.b*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-c)<=i.b*Math.max(1,Math.abs(o),Math.abs(c))}var x=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},S=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)},I=a;r()},function(t,e,n){"use strict";n.d(e,"e",(function(){return p})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return v})),n.d(e,"q",(function(){return _})),n.d(e,"x",(function(){return y})),n.d(e,"y",(function(){return g})),n.d(e,"d",(function(){return b})),n.d(e,"p",(function(){return w})),n.d(e,"h",(function(){return x})),n.d(e,"m",(function(){return S})),n.d(e,"n",(function(){return I})),n.d(e,"k",(function(){return O})),n.d(e,"w",(function(){return M})),n.d(e,"v",(function(){return P})),n.d(e,"a",(function(){return L})),n.d(e,"b",(function(){return T})),n.d(e,"f",(function(){return k})),n.d(e,"g",(function(){return z})),n.d(e,"o",(function(){return C})),n.d(e,"C",(function(){return E})),n.d(e,"t",(function(){return A})),n.d(e,"D",(function(){return D})),n.d(e,"u",(function(){return F})),n.d(e,"B",(function(){return R})),n.d(e,"r",(function(){return B})),n.d(e,"z",(function(){return N})),n.d(e,"s",(function(){return U})),n.d(e,"l",(function(){return H})),n.d(e,"i",(function(){return G})),n.d(e,"A",(function(){return W}));var i=n(9),r=n(2),o=n(93),a=n(70),s=n.n(a),c=n(15),l=n(29),u=n(43),d=n(105),f=n(6),h=n(12);function p(t){return{coords:t,size:D(t[2]),offset:N(t)}}function m(t){return t[0]+"_"+t[1]+"_"+t[2]+"_"+t[3]}function v(t,e){return m(t)+"_"+e.stringify()}function _(t){var e=t.split("_");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}function y(t){var e=new s.a(t),n=d.TileResponseData.read(e).tileGroups[0],i=n.x,r=n.y,o=n.zoom;return n.tiles.map((function(t){var e=t.regionId,n=t.hash,a=t.data;return a||(console.warn("Tile "+o+"_"+i+"_"+r+" from region "+e+" is corrupt (has no data)"),a=new Uint8Array(0)),{data:a,regionId:e,metatileHash:Object(c.e)(n)}}))}function g(t){return t.map((function(t){return{regionId:t.regionId,metatileHash:t.metatileHash}}))}function b(t){var e=4*Math.ceil(t.byteLength/4),n=new ArrayBuffer(e);return new Uint8Array(n).set(t),n}function w(t,e){var n=t[0],i=t[1],r=t[2],o={min:N([n,i,r,r]),max:N([n+1,i+1,r,r])};return Object(u.b)(e,o)}function x(t,e,n){for(var i=Object(u.a)(t),r=D(e),o=Math.pow(2,e)-1,a=Math.max(Math.floor((i.min[0]+2147483648)/r),0),s=Math.min(Math.floor((i.max[0]+2147483648)/r),o),c=Math.max(Math.floor((i.min[1]+2147483648)/r),0),l=Math.min(Math.floor((i.max[1]+2147483648)/r),o),d=[],f=a;f<=s;f++)for(var h=c;h<=l;h++){var p=[f,h,e,n];w(p,t)&&d.push(m(p))}return d}function S(t,e,n,i,r,a,c,u,f,h){var p=new s.a,m={tiles:[{x:r[0],y:r[1],zoom:r[2]}]};return d.TileRequestUrl.write(m,p),Object(l.b)("tiles",{host:t,tileSet:e,tileKey:a,sessionId:h,protocol:n,appId:c,lang:u,defaultLang:f,subdomain:i[Math.abs(r[0]+r[1])%i.length],request:encodeURIComponent(o.encode(p.finish()))})}function I(t,e){var n=t.coords,i=e.coords,r=n[2],o=i[2];return r===o?n[0]===i[0]&&n[1]===i[1]:r<o?j(t,e):j(e,t)}function j(t,e){if(e.zoomLevel<t.zoomLevel)return!1;if(e.zoomLevel===t.zoomLevel)return e.coords[0]===t.coords[0]&&e.coords[1]===t.coords[1]&&e.detailLevel>t.detailLevel;var n=Math.pow(2,e.coords[2]-t.coords[2]),i=t.coords[0]*n,r=i+n,o=t.coords[1]*n,a=o+n,s=e.coords[0],c=e.coords[1];return s>=i&&s<r&&c>=o&&c<a}function O(t,e,n){var i=t.coords,r=Math.min(e,n),o=Math.pow(2,t.zoomLevel-r);return m([Math.floor(i[0]/o),Math.floor(i[1]/o),r,e])}function M(t,e,n,i){return t[O(e,n,i)]}function P(t,e){var n=[];for(var i in t){var r=t[i];j(e,r)&&n.push(r)}return n}function L(t,e,n){return i.f(t,Z(e.coords))-i.f(t,Z(n.coords))}function T(t,e){return t[1]-e[1]||t[0]-e[0]}function k(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return!1}return!0}function z(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i];e.has(r)&&n.push(r)}return n}function C(t){return t>=1&&t<=65535}function E(t,e,n){t[0]=e[0]*n.size/f.j+n.offset[0],t[1]=e[1]*n.size/f.j+n.offset[1],t[2]=e[2]*f.m/f.j}function A(t,e,n){t[0]=(e[0]-n.offset[0])*f.j/n.size,t[1]=(e[1]-n.offset[1])*f.j/n.size,t[2]=e[2]*f.j/f.m}function D(t){return Math.pow(2,32-t)}function F(t){return t[0]>=0&&t[0]<=f.j&&t[1]>=0&&t[1]<=f.j}function R(t,e){return t*f.o/(f.j*Math.pow(2,e))}function B(t){return t/f.m*f.j}function N(t){var e=D(t[2]);return r.j(t[0]*e-2147483648,t[1]*e-2147483648,0)}function U(t){return[t[0]+2147483648,t[1]+2147483648,32,32]}function Z(t){var e=D(t[2]);return r.j((t[0]+.5)*e-2147483648,(t[1]+.5)*e-2147483648,0)}function H(t,e){var n=D(e);return[(t[0]-n/2+2147483648)/n,(t[1]-n/2+2147483648)/n,e,e]}function G(t,e){void 0===e&&(e=1);var n=Math.max(t.max[0]-t.min[0],t.max[1]-t.min[1],1)*e,r=32-Math.log(n)/Math.LN2,o=i.d();return Object(h.a)(o,t),H(o,r)}var W=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return[e,Math.pow(2,i)-1-n,i,r]}},function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"f",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"b",(function(){return _})),n.d(e,"a",(function(){return y}));var i=n(18),r=n(53),o=n(37);function a(t,e){if(!Object(i.d)(t))return t;if(e.allowedExpressions&&!e.allowedExpressions.has(t.type))return Object(o.a)("Expression of type "+t.type+" is not allowed here"),null;switch(t.type){case"all":return function(t,e){return t.array.every((function(t){return!0===a(t,e)}))}(t,e);case"any":return function(t,e){return t.array.some((function(t){return!0===a(t,e)}))}(t,e);case"get":return function(t,e){var n,i,r;if("binder"===e.type||"labeling"===e.type)return null!==(n=e.tileData[t.dataIndex])&&void 0!==n?n:null;var o=null!==(r=null===(i=e.tileAttrs)||void 0===i?void 0:i[e.tileProps[t.property]])&&void 0!==r?r:null;return Number.isNaN(o)?null:o}(t,e);case"global":return function(t,e){var n;return null!==(n=e.styleState[t.property])&&void 0!==n?n:null}(t,e);case"sourceAttr":return function(t,e){var n,i;return"geojsonFilter"===e.type||"filter"===e.type?null!==(n=e.sourceAttrs[t.property])&&void 0!==n?n:null:"binder"!==e.type&&"labeling"!==e.type||null===(i=e.tileData[t.dataIndex])||void 0===i?null:i}(t,e);case"in":return function(t,e){var n=a(t.element,e),i=a(t.array,e);return null!==i&&(Array.isArray(i)?i.some((function(t){return t===n})):(Object(o.a)("InExpression second argument resolved to non-array value: "+i),null))}(t,e);case"interpolate":return function(t,e){if(0===t.steps.length)return Object(o.a)("Interpolate expression contains 0 steps, cannot interpolate"),null;var n=a(t.steps[0].value,e),i=a(t.argument,e);return"number"!=typeof i?(Object(o.a)("Interpolate value resolved to non-number value: "+i+" "+t.argument),0):Object(r.c)(n)?u(t,i,e):function(t,e,n){var i=m(t,e);if(0===i)return Number(a(t.steps[0].value,n));if(i===t.steps.length)return function(t,e,n){var i=t.steps[t.steps.length-1],r=t.base;return 1===r?c(i.value,e):c(i.value,e)*Math.pow(r,n-i.key)}(t,n,e);var r=Number(a(t.steps[i-1].value,n));if("labeling"===n.type&&n.interpolateExpressionAsStep)return r;var o=v(t,e,i);return(1-o)*r+o*Number(a(t.steps[i].value,n))}(t,i,e)}(t,e);case"match":return function(t,e){var n,i=a(t.input,e),r=t.cases.find((function(t){return t.values.has(i)}));return a(null!==(n=null==r?void 0:r.output)&&void 0!==n?n:t.defaultOutput,e)}(t,e);case"step":return function(t,e){var n=m(t,Number(a(t.value,e)))-1;return a(t.steps[n].value,e)}(t,e);case"to-boolean":return function(t,e){return Boolean(a(t.value,e))}(t,e);case"!":return function(t,e){return!a(t.value,e)}(t,e);case"==":case"!=":return function(t,e){var n=a(t.leftValue,e),i=a(t.rightValue,e);switch(t.type){case"==":return n===i;case"!=":return n!==i}}(t,e);case">":case"<":case">=":case"<=":return function(t,e){var n=a(t.leftValue,e);if(null===n)return null;var i=a(t.rightValue,e);if(null===i)return null;switch(t.type){case"<":return n<i;case">":return n>i;case"<=":return n<=i;case">=":return n>=i}}(t,e);case"zoom":return"binder"===e.type||"labeling"===e.type?e.styleZoom:(Object(o.a)("Zoom expression cannot be used in filter context"),null);default:return Object(o.a)("Not supported expression type <<"+t.type+">> in "+JSON.stringify(t)),null}}function s(t,e,n){void 0===n&&(n=[0,0,0,0]);var i=a(t,e);return Object(r.c)(i)?i:n}function c(t,e,n){void 0===n&&(n=NaN);var i=a(t,e);return"number"==typeof i?i:n}function l(t,e,n){void 0===n&&(n="");var i=a(t,e);return"string"==typeof i?i:n}function u(t,e,n){var i=m(t,e);if(0===i)return s(t.steps[0].value,n);if(i===t.steps.length)return s(t.steps[t.steps.length-1].value,n);var r=v(t,e,i),o=s(t.steps[i-1].value,n),a=s(t.steps[i].value,n);return[o[0]*(1-r)+a[0]*r,o[1]*(1-r)+a[1]*r,o[2]*(1-r)+a[2]*r,o[3]*(1-r)+a[3]*r]}function d(t,e,n){return{type:"binder",styleZoom:t,styleState:e,tileData:n}}function f(t,e,n,i){return{type:"labeling",styleZoom:t,styleState:e,interpolateExpressionAsStep:n,tileData:i}}function h(t,e,n,i,r){return{type:"filter",metatile:t,styleState:e,tileProps:i,tileAttrs:r,sourceAttrs:n}}function p(t,e,n,i,r){return{type:"geojsonFilter",metatile:t,styleState:e,sourceAttrs:n,tileProps:i,tileAttrs:r}}function m(t,e){for(var n=0;n<t.steps.length&&!(e<t.steps[n].key);)n++;return n}function v(t,e,n){var i=t.base,r=t.steps[n].key-t.steps[n-1].key,o=e-t.steps[n-1].key;return 1===i?o/r:(Math.pow(i,o)-1)/(Math.pow(i,r)-1)}function _(t){var e=t[0],n=t[1],i=t[2],r=t[3];return[((e*r+127)/255>>>0)/255,((n*r+127)/255>>>0)/255,((i*r+127)/255>>>0)/255,r/255]}function y(t){var e=new Set;return function t(e,n){if(Object(i.d)(n))switch(n.type){case"all":return function(e,n){n.array.forEach((function(n){return t(e,n)}))}(e,n);case"match":return function(e,n){t(e,n.defaultOutput),n.cases.forEach((function(n){return t(e,n.output)}))}(e,n);case"step":case"interpolate":return function(e,n){n.steps.forEach((function(n){return t(e,n.value)}))}(e,n)}else e.add(n)}(e,t),Array.from(e)}},function(t,e,n){"use strict";n.d(e,"l",(function(){return c})),n.d(e,"m",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"o",(function(){return d})),n.d(e,"f",(function(){return f})),n.d(e,"p",(function(){return h})),n.d(e,"d",(function(){return m})),n.d(e,"e",(function(){return v})),n.d(e,"q",(function(){return _})),n.d(e,"c",(function(){return y})),n.d(e,"b",(function(){return g})),n.d(e,"n",(function(){return b})),n.d(e,"j",(function(){return w})),n.d(e,"i",(function(){return x})),n.d(e,"k",(function(){return S})),n.d(e,"h",(function(){return O})),n.d(e,"g",(function(){return M}));var i=n(9),r=n(2),o=n(1),a=n(6),s=n(7);function c(t){var e=a.o/2,n=Math.sin(Object(s.e)(t[1])),i=t[0]*a.o/360,o=Math.log((1+n)/(1-n))*a.o/(4*Math.PI);return r.j(Object(s.c)(i,-e,e),Object(s.c)(o,-e,e),0)}function l(t){var e=[0,0];e[0]=360*t[0]/a.o;var n=-2*Math.PI/a.o;return e[1]=90-2*Object(s.m)(Math.atan(Math.exp(t[1]*n))),e}function u(t){return Math.max(t,o.camera.minCalculationScreenHeight)}function d(t,e){return u(e[1])*a.o/(2*a.n*Math.tan(Object(s.e)(o.camera.fov)/2)*Math.pow(2,t))}function f(t,e){return Math.log(u(e[1])*a.o/(2*a.n*Math.tan(Object(s.e)(o.camera.fov)/2)*t))/Math.LN2}function h(t){return a.p*Math.pow(2,-t)}function p(t){var e=l(t)[1],n=1/(2*Math.cos(Object(s.e)(e)));return Math.log(n)/Math.log(2)}function m(t,e){var n=p(e)*Object(s.a)(9,10,t);return t+Object(s.c)(n,-1,0)}function v(t,e){var n=p(e),i=n*Object(s.a)(9,10+n,t);return t-Object(s.c)(i,-1,0)}function _(t,e){return a.f*(t/a.q)/e}function y(t,e){return e*(a.o/40075e3)*function(t){return 1/Math.cos(t[1]*Math.PI/180)}(t)}function g(t,e){var n=Math.PI/180,i=t[1]*n,r=e[1]*n,o=Math.sin((e[1]-t[1])*n/2),a=Math.sin((e[0]-t[0])*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return Math.round(6371e3*c)}var b=n(12).e([-a.o/2,-a.o/2],[a.o/2,a.o/2]);function w(t,e){return t*Math.pow(2,-e)*a.o/a.n}function x(t,e){return t*Math.pow(2,e)*a.n/a.o}function S(t,e){return 0===t?-1/0:-Math.log(e*a.n/(t*a.o))/Math.LN2}var I=i.d(),j=i.d();function O(t,e,n){i.q(I,n,t),i.q(j,e,t);var r=i.g(I,j)/i.k(I);return Math.atan2(r,t[2])}function M(t){var e=t[0],n=t[1];return Object(s.j)(e,-180,180)&&Object(s.j)(n,-90,90)}},function(t,e,n){"use strict";n.d(e,"n",(function(){return i})),n.d(e,"o",(function(){return r})),n.d(e,"m",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"q",(function(){return c})),n.d(e,"p",(function(){return l})),n.d(e,"i",(function(){return u})),n.d(e,"k",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"g",(function(){return p})),n.d(e,"b",(function(){return m})),n.d(e,"a",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"l",(function(){return y})),n.d(e,"h",(function(){return g}));var i=256,r=Math.pow(2,32),o=Math.pow(2,20),a=Math.pow(2,16)-1,s=2.54,c=96,l=r/(i/c*s),u=.7071067811865475,d=4294967295,f=1175494351e-47,h=3402823466e29,p=["Arial","Helvetica","HelveticaNeueCyr","Open_Sans","Open_Sans_Semibold","Open_Sans_Italic","Segoe_UI","PT_Sans_Caption","PT_Sans","Verdana","Verdana_bold","Noto_Sans","Noto_Sans_Semibold","Noto_Sans_Italic","SuisseIntl_Bold"],m="Noto_Sans",v=1,_=v/2,y=-3,g=-4},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"k",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"m",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"n",(function(){return p})),n.d(e,"p",(function(){return m})),n.d(e,"a",(function(){return v})),n.d(e,"i",(function(){return _})),n.d(e,"j",(function(){return y})),n.d(e,"f",(function(){return g})),n.d(e,"d",(function(){return b})),n.d(e,"g",(function(){return w}));var i=n(0),r=n(2),o=n(44);function a(t,e,n){return t=Math.max(t,e),Math.min(t,n)}function s(t){return 0==(t=+t)||Number.isNaN(t)?t:t>0?1:-1}function c(t,e){return[e[0]/t[0]*2-1,-e[1]/t[1]*2+1]}function l(t){return t*Math.PI/180}function u(t){return t/Math.PI*180}function d(t,e,n){void 0!==n.zoom&&(n.zoom=a(n.zoom,t.minZoom,t.maxZoom));var s=new o.a(t),c=s.unproject(e);s.setState(Object(i.a)(Object(i.a)({},t),n));var l=s.unproject(e),u=r.d();return r.s(u,c,l),u}function f(t){return t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16)}function h(t,e){var n=Object(i.a)({},e);for(var r in t)void 0!==t[r]&&(n[r]=t[r]);return n}function p(t){var e={};for(var n in t)e[t[n]]=n;return e}function m(t,e){var n=[];for(var i in t)e[i]||n.push(t[i]);return n}function v(t,e,n){return a((n-t)/(e-t),0,1)}function _(t){return t%1}function y(t,e,n){return t>=e&&t<=n}function g(t,e){if(t.size!==e.size)return!1;for(var n=0,i=Array.from(t);n<i.length;n++){var r=i[n];if(!e.has(r))return!1}return!0}function b(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var n=Array.isArray(t),i=Array.isArray(e),r=void 0,o=void 0,a=void 0;if(n&&i){if((o=t.length)!==e.length)return!1;for(r=o;0!=r--;)if(!b(t[r],e[r]))return!1;return!0}if(n!==i)return!1;var s=t instanceof Date,c=e instanceof Date;if(s!==c)return!1;if(s&&c)return t.getTime()===e.getTime();var l=t instanceof RegExp,u=e instanceof RegExp;if(l!==u)return!1;if(l&&u)return t.toString()===e.toString();var d=Object.keys(t);if((o=d.length)!==Object.keys(e).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,d[r]))return!1;for(r=o;0!=r--;)if(!b(t[a=d[r]],e[a]))return!1;return!0}return t!=t&&e!=e}function w(t,e){var n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)}},function(t,e,n){"use strict";var i=function(){function t(e,n){this._initData=e,this.byteLength=void 0!==e.byteLength?e.byteLength:e,this.type=t.ArrayBuffer,this.drawType=t.StaticDraw,this.options=Object.assign({},t.defaultOptions,n),this._glBuffer=null,this._glContext=null}return t.prototype.bind=function(e,n,i){return this._glBuffer||this.prepare(e),this.type===t.ArrayBuffer?(e.bindBuffer(e.ARRAY_BUFFER,this._glBuffer),i=i||this.options,e.vertexAttribPointer(n,i.itemSize,this._toGlParam(e,i.dataType),i.normalized,i.stride,i.offset)):this.type===t.ElementArrayBuffer&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._glBuffer),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.subData=function(t,e,n){return t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferSubData(this._toGlParam(t,this.type),e,n),this},t.prototype.prepare=function(t){return this._glContext=t,this._glBuffer=t.createBuffer(),t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferData(this._toGlParam(t,this.type),this._initData,this._toGlParam(t,this.drawType)),this._initData=null,this},t.prototype._unprepare=function(){this._glBuffer&&(this._glContext.deleteBuffer(this._glBuffer),this._glBuffer=null,this._glContext=null)},t.prototype._toGlParam=function(e,n){return n===t.ArrayBuffer?e.ARRAY_BUFFER:n===t.ElementArrayBuffer?e.ELEMENT_ARRAY_BUFFER:n===t.StaticDraw?e.STATIC_DRAW:n===t.DynamicDraw?e.DYNAMIC_DRAW:n===t.Byte?e.BYTE:n===t.Short?e.SHORT:n===t.Int?e.INT:n===t.Float?e.FLOAT:n===t.UnsignedByte?e.UNSIGNED_BYTE:n===t.UnsignedShort?e.UNSIGNED_SHORT:n===t.UnsignedInt?e.UNSIGNED_INT:null},t}();i.ArrayBuffer=1,i.ElementArrayBuffer=2,i.StaticDraw=10,i.DynamicDraw=11,i.Float=20,i.UnsignedByte=21,i.UnsignedShort=22,i.UnsignedInt=23,i.Byte=24,i.Short=25,i.Int=26,i.defaultOptions={itemSize:3,dataType:i.Float,stride:0,offset:0,normalized:!1},e.a=i},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"o",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"q",(function(){return u})),n.d(e,"m",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return h})),n.d(e,"k",(function(){return p})),n.d(e,"n",(function(){return m})),n.d(e,"g",(function(){return v})),n.d(e,"i",(function(){return _})),n.d(e,"h",(function(){return y})),n.d(e,"p",(function(){return g})),n.d(e,"e",(function(){return b}));var i=n(10);function r(){var t=new i.a(2);return t[0]=0,t[1]=0,t}function o(t){var e=new i.a(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var n=new i.a(2);return n[0]=t,n[1]=e,n}function s(t,e){return t[0]=e[0],t[1]=e[1],t}function c(t,e,n){return t[0]=e,t[1]=n,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function f(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function p(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function m(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function _(t,e){return t[0]===e[0]&&t[1]===e[1]}function y(t,e){var n=t[0],r=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=i.b*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.b*Math.max(1,Math.abs(r),Math.abs(a))}var g=u,b=h;r()},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s}));var i=1e-6,r="undefined"!=typeof Float64Array?Float64Array:Array,o=Math.random,a=Math.PI/180;function s(t){return t*a}},function(t,e,n){"use strict";var i,r,o,a;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a})),function(t){t[t.Common=0]="Common",t[t.Commercial=1]="Commercial",t[t.Landmark=2]="Landmark"}(i||(i={})),function(t){t[t.Tile=0]="Tile",t[t.Floor=1]="Floor",t[t.DynamicObject=2]="DynamicObject",t[t.PersonalPoi=3]="PersonalPoi"}(r||(r={})),function(t){t[t.Dead=0]="Dead",t[t.Alive=1]="Alive",t[t.Unused=2]="Unused",t[t.CommercialAlive=3]="CommercialAlive",t[t.CommercialDead=4]="CommercialDead"}(o||(o={})),function(t){t[t.Text=0]="Text",t[t.Icon=1]="Icon",t[t.PoiText=2]="PoiText",t[t.PoiText2=3]="PoiText2",t[t.OneWayLine=4]="OneWayLine",t[t.LineText=5]="LineText",t[t.Box=6]="Box"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"e",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"i",(function(){return u})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"h",(function(){return p}));var i=n(9),r=n(7),o=n(5);function a(t,e){return{min:t||i.j(1/0,1/0),max:e||i.j(-1/0,-1/0)}}function s(t){return a(Object(o.l)(t.southWest),Object(o.l)(t.northEast))}function c(t,e){i.m(t.min,t.min,e),i.l(t.max,t.max,e)}function l(t,e){t.min[0]=e.min[0],t.max[0]=e.max[0],t.min[1]=e.min[1],t.max[1]=e.max[1]}function u(t){t.min[0]=1/0,t.max[0]=-1/0,t.min[1]=1/0,t.max[1]=-1/0}function d(t,e){t[0]=e.min[0]+(e.max[0]-e.min[0])/2,t[1]=e.min[1]+(e.max[1]-e.min[1])/2}function f(t,e,n){t[0]=Object(r.c)(n[0],e.min[0],e.max[0]),t[1]=Object(r.c)(n[1],e.min[1],e.max[1])}function h(t,e){return e[0]<=t.max[0]&&e[0]>=t.min[0]&&e[1]<=t.max[1]&&e[1]>=t.min[1]}function p(t,e){var n=t.min[0]<=e.max[0]&&e.min[0]<=t.max[0],i=t.min[1]<=e.max[1]&&e.min[1]<=t.max[1];return n&&i}},function(t,e,n){"use strict";n.d(e,"b",(function(){return B})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return U})),n.d(e,"a",(function(){return Z})),n.d(e,"e",(function(){return H}));var i={};n.r(i),n.d(i,"linear",(function(){return a})),n.d(i,"ease",(function(){return c})),n.d(i,"easeInQuad",(function(){return l})),n.d(i,"easeOutQuad",(function(){return u})),n.d(i,"easeInOutQuad",(function(){return d})),n.d(i,"easeInCubic",(function(){return f})),n.d(i,"easeOutCubic",(function(){return h})),n.d(i,"easeInOutCubic",(function(){return p})),n.d(i,"easeInQuart",(function(){return m})),n.d(i,"easeOutQuart",(function(){return v})),n.d(i,"easeInOutQuart",(function(){return _})),n.d(i,"easeInQuint",(function(){return y})),n.d(i,"easeOutQuint",(function(){return g})),n.d(i,"easeInOutQuint",(function(){return b})),n.d(i,"easeInSine",(function(){return w})),n.d(i,"easeOutSine",(function(){return x})),n.d(i,"easeInOutSine",(function(){return S})),n.d(i,"easeInExpo",(function(){return I})),n.d(i,"easeOutExpo",(function(){return j})),n.d(i,"easeInOutExpo",(function(){return O})),n.d(i,"easeInCirc",(function(){return M})),n.d(i,"easeOutCirc",(function(){return P})),n.d(i,"easeInOutCirc",(function(){return L})),n.d(i,"easeInElastic",(function(){return T})),n.d(i,"easeOutElastic",(function(){return k})),n.d(i,"easeInOutElastic",(function(){return z})),n.d(i,"easeInBack",(function(){return C})),n.d(i,"easeOutBack",(function(){return E})),n.d(i,"easeInOutBack",(function(){return A})),n.d(i,"easeOutBounce",(function(){return D})),n.d(i,"inertia",(function(){return F}));var r=n(0),o=n(1);function a(t,e,n,i,r){return n+i/r*e}var s=n(107)(.25,.1,.25,1);function c(t,e,n,i,r){return n+i*s(e/r)}function l(t,e,n,i,r){return i*(e/=r)*e+n}function u(t,e,n,i,r){return-i*(e/=r)*(e-2)+n}function d(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n}function f(t,e,n,i,r){return i*(e/=r)*e*e+n}function h(t,e,n,i,r){return i*((e=e/r-1)*e*e+1)+n}function p(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}function m(t,e,n,i,r){return i*(e/=r)*e*e*e+n}function v(t,e,n,i,r){return-i*((e=e/r-1)*e*e*e-1)+n}function _(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e+n:-i/2*((e-=2)*e*e*e-2)+n}function y(t,e,n,i,r){return i*(e/=r)*e*e*e*e+n}function g(t,e,n,i,r){return i*((e=e/r-1)*e*e*e*e+1)+n}function b(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+n:i/2*((e-=2)*e*e*e*e+2)+n}function w(t,e,n,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+n}function x(t,e,n,i,r){return i*Math.sin(e/r*(Math.PI/2))+n}function S(t,e,n,i,r){return-i/2*(Math.cos(Math.PI*e/r)-1)+n}function I(t,e,n,i,r){return 0==e?n:i*Math.pow(2,10*(e/r-1))+n}function j(t,e,n,i,r){return e==r?n+i:i*(1-Math.pow(2,-10*e/r))+n}function O(t,e,n,i,r){return 0==e?n:e==r?n+i:(e/=r/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(2-Math.pow(2,-10*--e))+n}function M(t,e,n,i,r){return-i*(Math.sqrt(1-(e/=r)*e)-1)+n}function P(t,e,n,i,r){return i*Math.sqrt(1-(e=e/r-1)*e)+n}function L(t,e,n,i,r){return(e/=r/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+n:i/2*(Math.sqrt(1-(e-=2)*e)+1)+n}function T(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)+n)}function k(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+i+n)}function z(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:2==(e/=r/2)?n+i:(a||(a=r*(.3*1.5)),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+i+n)}function C(t,e,n,i,r,o){return null==o&&(o=1.70158),i*(e/=r)*e*((o+1)*e-o)+n}function E(t,e,n,i,r,o){return null==o&&(o=1.70158),i*((e=e/r-1)*e*((o+1)*e+o)+1)+n}function A(t,e,n,i,r,o){return null==o&&(o=1.70158),(e/=r/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+n:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+n}function D(t,e,n,i,r){return(e/=r)<1/2.75?i*(7.5625*e*e)+n:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+n:i*(7.5625*(e-=2.625/2.75)*e+.984375)+n}function F(t,e,n,i,r){return i*(1-Math.pow(1-e/r,o.inertia.nonLinearity+1))+n}var R={easing:"easeInOutQuad",forceFinalValue:!0,renderAfterUpdate:!0};function B(t,e){return e.tickers[t]}function N(t,e,n,i,o,a,s){n.tickers[t]=Object(r.a)(Object(r.a)(Object(r.a)({},R),e),{from:i,to:o,duration:a,attributes:s,startTime:n.time})}function U(t,e){delete e.tickers[t]}function Z(t,e){return!!e.tickers[t]}function H(t,e,n){var i=n.tickers[t];if(i){var r,o=n.time-i.startTime;if(i.from.length){r=[];for(var a=0;a<i.from.length;a++){var s=G(i.easing,i.from[a],i.to[a],i.duration,o);r.push(s)}}else r=G(i.easing,i.from,i.to,i.duration,o);var c=!1;o>=i.duration&&(i.forceFinalValue&&(r=i.to),c=!0),e.step&&e.step(n,r,i.attributes),c&&(U(t,n),e.complete&&e.complete(n)),i.renderAfterUpdate&&(n.needRerender=!0)}}function G(t,e,n,r,o){return i[t](null,o,e,n-e,r)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return V})),n.d(e,"c",(function(){return q})),n.d(e,"f",(function(){return X})),n.d(e,"a",(function(){return K})),n.d(e,"e",(function(){return J})),n.d(e,"d",(function(){return Q}));var i=n(0),r=n(48),o=n(26),a=n(94),s=n(23),c=Object(o.a)({symbol:"shiftedLine",sinks:{solid:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int8Array(e,4),t.views.normal=new Int8Array(e,6),t.views.shift=new Float32Array(e,8)},packObjectAttributes:function(t,e,n,i,r){return Object(s.c)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,o){var s=!Number.isNaN(r[i.beginningIsCut])&&0!==r[i.beginningIsCut],l=!Number.isNaN(r[i.endingIsCut])&&0!==r[i.endingIsCut],u=t.getBucket(n.type,"solid",c.sinks.solid.packObjectAttributes(e,n.innerId,n.dataKeys,i,r),c.sinks.solid.binder);Object(a.a)(u,o[0],o[1],o[0].length,!s,!l,0,o[2],o[3])}}),l=n(82),u=n(88),d=n(89),f=n(90),h=n(97),p=n(9),m=n(95),v=n(66),_=n(68),y=p.d(),g=p.d(),b=p.d(),w=p.d(),x=function(t,e,n,i,r,o){return Object(s.c)([t,e],n,i,r,o)},S=function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}},I=Object(o.a)({symbol:"lineExtrusion",sinks:{fill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8)},packObjectAttributes:x,unpackObjectAttributes:S},topStroke:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8)},packObjectAttributes:x,unpackObjectAttributes:S},sideStroke:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.distance=new Int16Array(e,6),t.views.normals=new Uint16Array(e,8),t.views.direction=new Uint16Array(e,12)},packObjectAttributes:x,unpackObjectAttributes:S}},generate:function(t,e,n,i,r,o,a){for(var s=a[0],c=a[1],l=s.length,u=t.getBucket(n.type,"fill",I.sinks.fill.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.fill.binder),d=t.getBucket(n.type,"topStroke",I.sinks.topStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.topStroke.binder),f=t.getBucket(n.type,"sideStroke",I.sinks.sideStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),I.sinks.sideStroke.binder),h=0;h<l-1;h++){var x=s[h],S=c[h],j=s[h+1],O=c[h+1];p.o(y,x,j),p.o(g,S,O),p.o(b,j,x),p.o(w,O,S),Object(m.a)(u,2,y,g,void 0,1),Object(v.a)(d,x,S,1,j,O,1),Object(_.a)(f,2,y,g,void 0),Object(_.a)(f,2,b,w,void 0),Object(_.b)(f,2,y,g,void 0,1)}p.o(y,s[l-1],s[0]),p.o(g,c[l-1],c[0]),Object(_.b)(f,2,y,g,void 0,1)}}),j=n(74),O=n(62),M=n(3),P=n(5),L=n(75),T=n(1),k=n(7),z=n(4),C=n(6),E=[0,0,0],A=[0,0],D=Object(o.a)({symbol:"labelLine",sinks:{raster:{stride:28,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.texCoords=new Uint16Array(e,8),t.views.cornerOffset=new Float32Array(e,12),t.views.styleZoomLimits=new Float32Array(e,20)},packObjectAttributes:function(t,e,n,i){return Object(s.b)([t.styleId,t.layer.innerId,e,n,i],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],fontIndex:t[4],tileData:t.slice(5)}}}},processElement:function(t,e,n,i,r,o,a){var s,c=n.label,l=n.anchorPosition,u=n.anchorSegmentIndex,d=n.halfLabelWidth,f=n.layer;if("labelLine"===f.type){for(var h=c.axis,p=o.center,m=o.styleZoom,v=Object(z.f)(m,o.styleState,!1,c.tileData),_=Object(z.j)(f.style.textFont,v),y=null!==(s=t.fontNameToIndex[_])&&void 0!==s?s:t.fontNameToIndex[C.b],g={},b=0,w=c.ranges;b<w.length;b++){var x=w[b];g[x]=e.getBucket("labelLine","raster",D.sinks.raster.packObjectAttributes(c,i,x,y),D.sinks.raster.binder)}var S=c.textMetrics.lines[0],I=Object(z.i)(f.style.textFontSize,v)/T.fonts.baseSize,j=S.glyphs,O=function(t,e,n,i){var r=t.interpolate(e-n,t.getSegmentIndex(e-n)),o=t.interpolate(e+n,t.getSegmentIndex(e+n)),a=Math.atan2(o[1]-r[1],o[0]-r[0])-i;return Math.cos(a)<0}(h,l,d,o.rotation);A[0]=-S.width/2,A[1]=0;for(var F=0;F<j.length;F++){for(var R=j[F],B=(A[0]+R.left+R.width/2)*I*(O?-1:1),N=Object(k.o)(B)||1,U=-1/0,Z=1/0,H=u;H>=1&&H<h.vertexCount&&!(Z<n.overflowStyleZoom);H+=N,Z=U){var G=1===N?H:H-1;U=Object(P.d)(Object(P.k)(B,h.lengths[G]-l),p);var W=h.interpolate(l,H);Object(M.t)(E,W,a),Object(M.u)(E)&&void 0!==R.bitmap&&Object(L.a)(g[R.range],E,A,R,W[3]+(O?Math.PI:0),Math.max(U,n.overflowStyleZoom),Z)}A[0]+=R.advance+T.fonts.baseSize*f.style.textLetterSpacing}}},getLabelingInfo:function(){}}),F=[0,0,0],R=Object(o.a)({symbol:"oneWayLine",sinks:{raster:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.direction=new Uint16Array(e,8),t.views.widenDirection=new Uint16Array(e,12)},packObjectAttributes:function(t,e){return[t.styleId,t.layer.innerId,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],tileData:t.slice(3)}}}},processElement:function(t,e,n,i,r,o,a){var s=n.label,c=n.anchorWorld;if(Object(M.t)(F,c,a),Object(M.u)(F)){var l=e.getBucket("oneWayLine","raster",R.sinks.raster.packObjectAttributes(s,i),R.sinks.raster.binder);Object(L.b)(l,F,c[3])}},getLabelingInfo:function(){}}),B=n(36),N=n(72),U=n(63),Z=n(59),H=n(32),G=function(t,e,n,i,r,o,a,c,l){var u=a.tileProps,d={type:H.a.Line,styleId:e,layerId:n.innerId,sourceId:r,tileCoords:i,id:c[u.id],componentDistanceStart:Object(H.b)(c[u.componentDistanceStart],0),componentDistanceEnd:Object(H.b)(c[u.componentDistanceEnd],0),objectLength:Object(H.b)(c[u.objectLength],0),labelPriority:Object(H.b)(c[u.labelPriority],0),vertices:[l[0],l[1]],tileData:Object(s.c)([],n.dataKeys,u,c,o)};t.addLabel(d)},W=function(t,e,n,i,r,o,a,c,l){var u=a.tileProps,d={type:H.a.OneWayLine,styleId:e,layerId:n.innerId,sourceId:r,tileCoords:i,id:c[u.id],componentDistanceStart:Object(H.b)(c[u.componentDistanceStart],0),componentDistanceEnd:Object(H.b)(c[u.componentDistanceEnd],0),objectLength:Object(H.b)(c[u.objectLength],0),labelPriority:Object(H.b)(c[u.labelPriority],0),vertices:[l[0],l[1]],tileData:Object(s.c)([],n.dataKeys,u,c,o)};t.addLabel(d)};function V(t){var e=t.collector,n=t.generator,r=t.args;do{n.apply(void 0,Object(i.e)([e],r))}while(e.isOverloaded())}var q={arrow:f.a,line:r.a,polygon:O.a,labelLine:D,lineExtrusion:I,polygonExtrusion:l.a,oneWayLine:R,dashedLine:u.a,shiftedLine:c,circle:h.a,buildingModel:d.a,point:B.b,stretchableImage:N.a,raster:j.a,heatmap:U.a},Y={labelLine:D,oneWayLine:R,point:B.b};function X(t,e){var n=q[t];return n?n.sinks[e].stride:0}function K(t,e,n,i,o,a,s,d,h,p,m,v,_,y,g){n.forEach((function(n){if((void 0===i||!(n.maxzoom<=i||n.minzoom>=i+1&&i!==T.tiles.maxDetailLevel))&&(!a.hovered||Number.isNaN(s[a.hovered])||1!==s[a.hovered]||"polygon"===n.type||"polygonExtrusion"===n.type||"point"===n.type))do{switch(n.type){case"line":r.a.generate(t,e.id,n,a,s,_);break;case"dashedLine":u.a.generate(t,e.id,n,a,s,_);break;case"shiftedLine":c.generate(t,e.id,n,a,s,_);break;case"polygon":O.a.generate(t,e.id,n,a,s,_,y);break;case"polygonExtrusion":l.a.generate(t,e.id,n,o,p,h,a,s,_,!0,y);break;case"labelLine":G(t,e.id,n,m,d,h,o,s,_);break;case"oneWayLine":W(t,e.id,n,m,d,h,o,s,_);break;case"point":Object(Z.a)(t,e,n,m,d,h,o,s,_,v,g);break;case"lineExtrusion":I.generate(t,e.id,n,h,a,s,_);break;case"arrow":f.a.generate(t,e.id,n,a,s,_);break;case"heatmap":var b=Object(z.e)(o,p,h,a,s);U.a.generate(t,e.id,n,_,b)}}while(t.isOverloaded())}))}function J(t,e,n,i,r,o,a,s){var c=Y[e.type];if(c)do{c.processElement(t,n,i,r,o,a,s)}while(n.isOverloaded())}function Q(t,e,n,i,r,o){var a=Y[n.type];a&&a.getLabelingInfo(t,e,i,r,o)}},function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return f}));var i=n(7),r=n(93);function o(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]*Math.pow(256,t.length-1-n);return e}function a(t){for(var e=new Uint8Array(6),n=0;n<6;n++)e[n]=255&Math.floor(t/Math.pow(256,5-n));return encodeURIComponent(r.encode(e))}function s(t){var e=function(t,e){var n={};t.forEach((function(t,e){n[t]=e}));var i=t.length;for(var r in n.selected=i++,n.hovered=i++,n.dpi=i++,n.isRealtime=i++,n.pixelDensityPreset=i++,e)void 0===n[r]&&(n[r]=i++);return n}(t.tileProps,t.defaultProps),n={};for(var r in t.defaultProps)n[r]={index:e[r],value:t.defaultProps[r]};return{version:t.version,dictionaries:t.enumerationValues,reverseDictionaries:Object.keys(t.enumerationValues).reduce((function(e,n){return e[n]=Object(i.n)(t.enumerationValues[n]),e}),{}),tileProps:e,tilePropsByIndex:Object(i.n)(e),defaultProps:n}}function c(t,e){var n={};if(e)for(var i=0;i<e.length;i++)n[e[i]]=i;return s({enumerationValues:{db_sublayer:n},version:"",zenithVersion:"",date:"",defaultProps:{},tileProps:t})}function l(t,e){for(var n=t.tileProps,i=Object.keys(n).length,r=0,o=e;r<o.length;r++){var a=o[r];void 0===n[a]&&(n[a]=i,i+=1)}}var u=0,d={beginningIsCut:u++,class:u++,componentDistanceEnd:u++,componentDistanceStart:u++,iconPriority:u++,labelPriority:u++,label2Priority:u++,dpi:u++,endingIsCut:u++,height:u++,hiddenByPlanBuildingId:u++,id:u++,isRealtime:u++,db_label:u++,db_label2:u++,nextPointX:u++,nextPointY:u++,db_object_class:u++,objectLength:u++,pixelDensityPreset:u++,previousPointX:u++,previousPointY:u++,db_region:u++,selected:u++,hovered:u++,db_sublayer:u++,traffic_color:u++,traffic_road_class:u++,traffic_road_z_level:u++},f={version:"0.0.0",tileProps:d,tilePropsByIndex:Object(i.n)(d),defaultProps:{},dictionaries:{},reverseDictionaries:{}}},function(t,e,n){"use strict";var i,r;n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),function(t){t[t.Main=0]="Main",t[t.Parser=1]="Parser",t[t.Labeling=2]="Labeling",t[t.All=3]="All"}(i||(i={})),function(t){t[t.FunctionUse=0]="FunctionUse",t[t.FunctionResult=1]="FunctionResult"}(r||(r={}))},function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"l",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return m}));var i=n(9);function r(t,e,n,i,r){if(e!==i||n!==r){var o=r-n,a=e-i,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function o(t,e,n,i){var r=0;if(t!==n||e!==i){var o=i-e,a=t-n,s=1/Math.sqrt(o*o+a*a);r=(a=127*(a*=s)+(a<0?-.5:.5)<<24>>>16)+(o=127*(o*=s)+(o<0?-.5:.5)<<24>>>24)}return r}function a(t,e,n,i,r){if(e!==i||n!==r){var o=i-e,a=r-n,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function s(t,e,n,i,r){var o=e+i,a=n+r,s=e*o+n*a;if(0!==s){var c=1/s;t[0]=o*c,t[1]=a*c}else t[0]=0,t[1]=0}function c(t,e){return(127*e+(e<0?-.5:.5)<<24>>>16)+(127*t+(t<0?-.5:.5)<<24>>>24)}function l(t){var e=127*t[0]+(t[0]<0?-.5:.5)<<24>>>24;return(127*t[1]+(t[1]<0?-.5:.5)<<24>>>16)+e}function u(t,e,n,i,r){t[0]=e*i+n*r,t[1]=n*i-e*r}function d(t,e){t[0]=-e[1],t[1]=e[0]}function f(t){return 0===t[0]&&0===t[1]}function h(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function p(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function m(t,e){var n=Math.cos(e)*t[0]-Math.sin(e)*t[1],r=Math.sin(e)*t[0]+Math.cos(e)*t[1];i.o(t,n,r)}},function(t,e,n){"use strict";function i(t){return"number"==typeof t||"boolean"==typeof t||"string"==typeof t||null===t}function r(t){if(Array.isArray(t)){var e=t;if(!e.length)return!1;if({zoom:!0,"heatmap-density":!0,step:!0,interpolate:!0,all:!0,get:!0,sourceAttr:!0,global:!0,match:!0,in:!0,any:!0,"!":!0,"==":!0,"!=":!0,">=":!0,">":!0,"<=":!0,"<":!0,"to-boolean":!0}[e[0]])return!0}return!1}function o(t){return!Array.isArray(t)&&"object"==typeof t&&null!==t&&void 0!==t.type}function a(t,e,n){return t+"_"+e+"_"+n}function s(t,e){return"unique-"+t+"_"+e}function c(t){return Array.isArray(t)?r(t)?t:t[0]:t}function l(t){if(Array.isArray(t)&&!r(t)&&void 0!==t[1])return t[1]}n.d(e,"e",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return l}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"m",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"l",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return m})),n.d(e,"d",(function(){return v}));var i=n(10);function r(){var t=new i.a(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=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]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,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 s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],d=e[9],f=e[10],h=e[11],p=e[12],m=e[13],v=e[14],_=e[15],y=n*s-i*a,g=n*c-r*a,b=n*l-o*a,w=i*c-r*s,x=i*l-o*s,S=r*l-o*c,I=u*m-d*p,j=u*v-f*p,O=u*_-h*p,M=d*v-f*m,P=d*_-h*m,L=f*_-h*v,T=y*L-g*P+b*M+w*O-x*j+S*I;return T?(T=1/T,t[0]=(s*L-c*P+l*M)*T,t[1]=(r*P-i*L-o*M)*T,t[2]=(m*S-v*x+_*w)*T,t[3]=(f*x-d*S-h*w)*T,t[4]=(c*O-a*L-l*j)*T,t[5]=(n*L-r*O+o*j)*T,t[6]=(v*b-p*S-_*g)*T,t[7]=(u*S-f*b+h*g)*T,t[8]=(a*P-s*O+l*I)*T,t[9]=(i*O-n*P-o*I)*T,t[10]=(p*x-m*b+_*y)*T,t[11]=(d*b-u*x-h*y)*T,t[12]=(s*j-a*M-c*I)*T,t[13]=(n*M-i*j+r*I)*T,t[14]=(m*g-p*w-v*y)*T,t[15]=(u*w-d*g+f*y)*T,t):null}function c(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],d=e[8],f=e[9],h=e[10],p=e[11],m=e[12],v=e[13],_=e[14],y=e[15],g=n[0],b=n[1],w=n[2],x=n[3];return t[0]=g*i+b*s+w*d+x*m,t[1]=g*r+b*c+w*f+x*v,t[2]=g*o+b*l+w*h+x*_,t[3]=g*a+b*u+w*p+x*y,g=n[4],b=n[5],w=n[6],x=n[7],t[4]=g*i+b*s+w*d+x*m,t[5]=g*r+b*c+w*f+x*v,t[6]=g*o+b*l+w*h+x*_,t[7]=g*a+b*u+w*p+x*y,g=n[8],b=n[9],w=n[10],x=n[11],t[8]=g*i+b*s+w*d+x*m,t[9]=g*r+b*c+w*f+x*v,t[10]=g*o+b*l+w*h+x*_,t[11]=g*a+b*u+w*p+x*y,g=n[12],b=n[13],w=n[14],x=n[15],t[12]=g*i+b*s+w*d+x*m,t[13]=g*r+b*c+w*f+x*v,t[14]=g*o+b*l+w*h+x*_,t[15]=g*a+b*u+w*p+x*y,t}function l(t,e,n){var i,r,o,a,s,c,l,u,d,f,h,p,m=n[0],v=n[1],_=n[2];return e===t?(t[12]=e[0]*m+e[4]*v+e[8]*_+e[12],t[13]=e[1]*m+e[5]*v+e[9]*_+e[13],t[14]=e[2]*m+e[6]*v+e[10]*_+e[14],t[15]=e[3]*m+e[7]*v+e[11]*_+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],d=e[8],f=e[9],h=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=h,t[11]=p,t[12]=i*m+s*v+d*_+e[12],t[13]=r*m+c*v+f*_+e[13],t[14]=o*m+l*v+h*_+e[14],t[15]=a*m+u*v+p*_+e[15]),t}function u(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3],c=r+r,l=o+o,u=a+a,d=r*c,f=r*l,h=r*u,p=o*l,m=o*u,v=a*u,_=s*c,y=s*l,g=s*u,b=i[0],w=i[1],x=i[2];return t[0]=(1-(p+v))*b,t[1]=(f+g)*b,t[2]=(h-y)*b,t[3]=0,t[4]=(f-g)*w,t[5]=(1-(d+v))*w,t[6]=(m+_)*w,t[7]=0,t[8]=(h+y)*x,t[9]=(m-_)*x,t[10]=(1-(d+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function f(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);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[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t}function h(t,e,n,i,r,o,a){var s=1/(e-n),c=1/(i-r),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*c,t[14]=(a+o)*l,t[15]=1,t}function p(t,e,n,r){var o,a,s,c,l,u,d,f,h,p,m=e[0],v=e[1],_=e[2],y=r[0],g=r[1],b=r[2],w=n[0],x=n[1],S=n[2];return Math.abs(m-w)<i.b&&Math.abs(v-x)<i.b&&Math.abs(_-S)<i.b?mat4.identity(t):(d=m-w,f=v-x,h=_-S,o=g*(h*=p=1/Math.sqrt(d*d+f*f+h*h))-b*(f*=p),a=b*(d*=p)-y*h,s=y*f-g*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),c=f*s-h*a,l=h*o-d*s,u=d*a-f*o,(p=Math.sqrt(c*c+l*l+u*u))?(c*=p=1/p,l*=p,u*=p):(c=0,l=0,u=0),t[0]=o,t[1]=c,t[2]=d,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=s,t[9]=u,t[10]=h,t[11]=0,t[12]=-(o*m+a*v+s*_),t[13]=-(c*m+l*v+u*_),t[14]=-(d*m+f*v+h*_),t[15]=1,t)}var m=c;function v(t,e,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"c",(function(){return p})),n.d(e,"b",(function(){return m}));var i=n(41),r=n(15),o=n(6),a=n(18),s=n(21),c=n(65),l=0,u={type:i.b.Static,index:-1,key:Object(a.b)("",.5,.5),isSvg:!1,name:"",fileName:"",rasters:[],anchorX:.5,anchorY:.5},d=["default","marker","markerText","htmlLabel"],f={default:0,marker:1,markerText:2,htmlLabel:3},h={default:{default:!0,marker:!1,markerText:!0,htmlLabel:!0},marker:{default:!1,marker:!1,markerText:!0,htmlLabel:!1},markerText:{default:!0,marker:!0,markerText:!0,htmlLabel:!1},htmlLabel:{default:!0,marker:!1,markerText:!1,htmlLabel:!1}};function p(t){for(var e=[],n=Object.keys(r.d).length,i=0;i<n;i++)e[i]=NaN;for(var o in t){if(void 0===r.d[o])throw new Error("No such tile prop '"+o+"'");e[r.d[o]]=t[o]}return e}var m=function(){function t(){this.style={id:l,layers:[],layersById:{},layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",rasterSets:{byIndex:{},byKey:{}},labelingGroups:{indexToGroup:d,groupToIndex:f,table:h},fonts:o.g,fontNameToIndex:Object(c.a)(o.g),icons:{}},this.needRenderIndexRebuild=!1,this.zIndexById={};var t=Object(s.d)({type:"line",id:"debug-tile-bounds",minzoom:-1/0,maxzoom:1/0,style:{color:"#ff0000",width:1}});t&&this.addLayer(t,0)}return t.prototype.getStyle=function(){return this.style},t.prototype.appendRasterSet=function(t,e){this.style.rasterSets.byIndex[t.index]=t,void 0!==e&&(this.style.rasterSets.byKey[e]=t)},t.prototype.removeRasterSet=function(t){this.style.rasterSets.byIndex[t]=u},t.prototype.getLabelingGroupIndex=function(t){var e=this.style.labelingGroups.groupToIndex;return void 0!==e[t]?e[t]:e.default},t.prototype.addLayer=function(t,e){this.style.layers.push(t),this.style.layersById[t.innerId]=t,void 0!==e&&(this.zIndexById[t.innerId]=e),this.needRenderIndexRebuild=!0},t.prototype.removeLayer=function(t){var e=this.style.layersById[t];if(e){var n=this.style.layers.indexOf(e);-1!==n&&this.style.layers.splice(n,1),delete this.style.layersById[t]}},t.prototype.update=function(){this.needRenderIndexRebuild&&(this.rebuildRenderIndex(),this.needRenderIndexRebuild=!1)},t.prototype.updateLayerStyle=function(t,e){var n=e.style,i=e.dataKeys,r=this.style.layersById[t];r&&(r.style=n,r.dataKeys=i)},t.prototype.rebuildRenderIndex=function(){var t=this;this.style.layers.sort((function(e,n){var i,r;return(null!==(i=t.zIndexById[e.innerId])&&void 0!==i?i:0)-(null!==(r=t.zIndexById[n.innerId])&&void 0!==r?r:0)}));for(var e=0;e<this.style.layers.length;e++)this.style.layers[e].renderIndex=e},t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return w})),n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return S})),n.d(e,"d",(function(){return O}));var i=n(0),r=n(53),o=n(24),a=n(18),s=n(69),c=n(6),l=n(41),u=n(4);function d(t){for(var e=function(t){for(var e=t.groups,n=t.overlay,i=t.intersect,r=e.reduce((function(t,e,n){return t[e]=n,t}),{}),o=[],a=0;a<e.length;a++){for(var s=[],c=0;c<e.length;c++)s.push(!0);o.push(s)}for(var l=0;l<n.length;l++){var u=n[l];for(a=0;a<u.length;a++)for(c=a+1;c<u.length;c++){var d=r[u[a]],f=r[u[c]];o[d][f]=!1,o[f][d]=!1}}for(l=0;l<i.length;l++){var h=i[l];for(a=0;a<h.length;a++)for(c=a+1;c<h.length;c++)d=r[h[a]],f=r[h[c]],o[d][f]=!0,o[f][d]=!0}return{groups:e,table:o}}(function(t){var e=(t.groups||[]).concat(o.q.groups).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[]),n=(t.overlay||[]).concat(o.q.overlay).concat(e.reduce((function(t,e){return e===o.p||e===o.r||e===o.o||t.push([e,o.r]),t}),[])).reduce((function(t,n){for(var i=[],r=0,o=n;r<o.length;r++){var a=o[r];e.includes(a)&&i.push(a)}return i.length>1&&t.push(i),1===n.length&&1===i.length&&t.push(i),t}),[]);return{groups:e,overlay:n,intersect:o.q.intersect}}(t)),n=e.groups,i=e.table,r={},a=0;a<i.length;a++){var s=i[a],c=n[a];r[c]={};for(var l=0;l<s.length;l++){var u=n[l];r[c][u]=i[a][l]}}var d=n.reduce((function(t,e,n){return t[e]=n,t}),{});return{indexToGroup:n,groupToIndex:d,table:r}}var f=n(65),h=n(71),p=0;function m(){return++p}var v=n(98),_=function(t){function e(e){var n=this.constructor,i=t.call(this,"Unknown expression type '"+e[0]+"' in '"+JSON.stringify(e)+"'")||this;return i.name="UnknownExpressionTypeError",Object.setPrototypeOf(i,n.prototype),i}return Object(i.c)(e,t),e}(Error);function y(t,e){if(Object(a.e)(t))return Object(r.b)(t)?Object(r.a)(t):t;switch(t[0]){case"all":return function(t,e){return{type:"all",array:t.slice(1).map((function(t){return y(t,e)}))}}(t,e);case"any":return function(t,e){return{type:"any",array:t.slice(1).map((function(t){return y(t,e)}))}}(t,e);case"match":return function(t,e){for(var n={type:"match",input:y(t[1],e),cases:[],defaultOutput:y(t[t.length-1],e)},i=t.slice(2,-1),r=0;r<i.length;r+=2){var o=i[r].reduce((function(t,e){return"boolean"==typeof e&&t.push(Number(e)),t.push(e),t}),[]),a={values:new Set(o),output:y(i[r+1],e)};n.cases.push(a)}return n}(t,e);case"in":return function(t,e){var n=y(t[1],e),i=t[2][0];if("get"!==i&&"global"!==i&&"sourceAttr"!==i)throw new Error("InExpression supports only get, global or source attr expression as a second argument");return{type:"in",element:n,array:y(t[2],e)}}(t,e);case"interpolate":return function(t,e){var n={type:"interpolate",base:1,argument:y(t[2],e),steps:[]};"exponential"===t[1][0]&&void 0!==t[1][1]&&(n.base=t[1][1]);for(var i=t.slice(3),r=0;r<i.length;r+=2){var o={key:i[r],value:y(i[r+1],e)};n.steps.push(o)}return n}(t,e);case"step":return function(t,e){var n={type:"step",steps:[],value:y(t[1],e)},i={key:0,value:y(t[2],e)};n.steps.push(i);for(var r=t.slice(3),o=0;o<r.length;o+=2){var a={key:r[o],value:y(r[o+1],e)};n.steps.push(a)}return n}(t,e);case"get":case"sourceAttr":case"global":return b(t,e);case"zoom":return{type:"zoom"};case"heatmap-density":return{type:"heatmap-density"};case"to-boolean":case"!":return function(t,e){return{type:t[0],value:y(t[1],e)}}(t,e);case"==":case"!=":case"<":case"<=":case">":case">=":return function(t,e){var n=y(t[1],e),i=y(t[2],e);return{type:t[0],leftValue:n,rightValue:i}}(t,e);default:throw new _(t)}}function g(t,e){return void 0===t?t:y(t,e)}function b(t,e){var n=t[0],i=Object(h.b)(t[1]);return{type:n,dataIndex:e?e.getUniqueIndex(n+":"+i):NaN,property:i}}function w(t,e,n){var r,o={id:e,layers:[],layersById:{},layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",fonts:c.g,fontNameToIndex:Object(f.a)(c.g),rasterSets:{byIndex:{},byKey:{}},icons:t.icons||{},labelingGroups:d(null!==(r=t.labelingGroups)&&void 0!==r?r:{})},a=new s.a,l=t.layers;n&&(l=function(t,e){var n=0,r=0;function o(t,e){"custom"!==t.type&&(Object(f.c)(t.filter)&&(n=e),"point"===t.type&&t.style.iconPriority&&t.style.iconPriority>r&&(r=t.style.iconPriority))}return t.forEach((function(t,e){"group"===t.type?t.layers.forEach((function(t){return o(t,e)})):o(t,e)})),e.forEach((function(t){"point"===t.type&&(t.style.iconPriority=r)})),Object(i.e)(Object(i.e)(Object(i.e)([],t.slice(0,n+1)),e),t.slice(n+1))}(t.layers,v.a));for(var u=0,h=l;u<h.length;u++){var p=x(h[u]);p&&("group"===p.type&&(o.groupsById[p.innerId]=p,o.layerIdToInnerId[p.id]=p.innerId),("group"===p.type?p.layers:[p]).forEach((function(t){o.layers.push(t),o.layersById[t.innerId]=t,o.layerIdToInnerId[t.id]=t.innerId,"point"===t.type&&S(t,a).forEach((function(t){o.rasterSets.byKey[t.key]||(o.rasterSets.byIndex[t.index]=t,o.rasterSets.byKey[t.key]=t)}))})))}return o}function x(t){return"group"===t.type?(e=t,i=new s.a,r=null===(n=e.orderBy)||void 0===n?void 0:n.map((function(t){return b(t,i)})),o={id:e.id,innerId:m(),renderIndex:I.getIndex(),type:e.type,layers:[],orderBy:null!=r?r:[]},e.layers.forEach((function(t,e){var n=O(t,r);n&&(n.groupId=o.innerId,n.groupIndex=e,n.renderIndex=o.renderIndex,o.layers.push(n))})),o):O(t);var e,n,i,r,o}function S(t,e){var n=[];return t.style.iconImage&&Object(u.a)(t.style.iconImage).forEach((function(i){if(i.length){var r=Object(a.b)(i,t.style.iconAnchor[0],t.style.iconAnchor[1]),o={type:l.b.Static,index:e.getUniqueIndex(r),key:r,isSvg:!0,name:i,fileName:i,anchorX:t.style.iconAnchor[0],anchorY:t.style.iconAnchor[1],rasters:[]};n.push(o)}})),n}var I=new s.a;function j(t,e){return"appearance"===t.type?{type:t.type,tipMovementAmplitude:y(t.tipMovementAmplitude,e)}:t}function O(t,e){if("custom"===t.type)return{type:"custom",id:t.id,innerId:m(),renderIndex:I.getIndex(),filter:!1,minzoom:-1/0,maxzoom:1/0,dataKeys:[],style:{}};if("none"!==t.style.visibility){var n,r=new s.a(e?e.length:0);try{var c={id:t.id,innerId:m(),renderIndex:I.getIndex(),filter:y(t.filter||!1),minzoom:M(t.minzoom,-1/0),maxzoom:M(t.maxzoom,1/0),dataKeys:[]};switch(t.type){case"line":var l=Object(o.h)(t.style);n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),width:y(l.width,r)}});break;case"lineExtrusion":l=Object(o.g)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{sideColor:y(l.sideColor,r),strokeWidth:y(l.strokeWidth,r),strokeColor:y(l.strokeColor,r),height:y(l.height,r)}});break;case"polygon":l=Object(o.l)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),strokeColor:y(l.strokeColor,r),strokeWidth:y(l.strokeWidth,r)}});break;case"polygonExtrusion":l=Object(o.k)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{topColor:y(l.topColor,r),sideColor:y(l.sideColor,r),strokeColor:y(l.strokeColor,r),strokeWidth:y(l.strokeWidth,r)}});break;case"dashedLine":l=Object(o.d)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),gapColor:y(l.gapColor,r),width:y(l.width,r),gapLength:y(l.gapLength,r),dashLength:y(l.dashLength,r)}});break;case"shiftedLine":l=Object(o.n)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),width:y(l.width,r),shift:y(l.shift,r)}});break;case"oneWayLine":l=Object(o.i)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),lineWidth:y(l.lineWidth,r),lineLength:y(l.lineLength,r),tipWidth:l.tipWidth,tipHeight:l.tipHeight,priority:l.priority,duplicationSpacing:y(l.duplicationSpacing,r),endingOffsets:l.endingOffsets,labelingGroup:l.labelingGroup}});break;case"buildingModel":l=Object(o.b)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),strokeColor:y(l.strokeColor,r),strokeWidth:y(l.strokeWidth,r)}});break;case"labelLine":l=Object(o.f)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{textField:y(l.textField,r),textFont:l.textFont,textColor:y(l.textColor,r),textFontSize:y(l.textFontSize,r),textLetterSpacing:l.textLetterSpacing,textHaloColor:y(l.textHaloColor,r),textHaloWidth:l.textHaloWidth,textPriority:l.textPriority,textLabelingSideMargin:l.textLabelingSideMargin,textDuplicationSpacing:y(l.textDuplicationSpacing,r),labelingGroup:l.labelingGroup,lineEndingOffsets:l.lineEndingOffsets}});break;case"point":l=Object(o.j)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{allowOverlap:l.allowOverlap,allowElevation:l.allowElevation,iconImage:y(l.iconImage,r),iconAnchor:l.iconAnchor,iconOffset:l.iconOffset,iconWidth:y(l.iconWidth,r),iconTextField:y(l.iconTextField,r),iconTextFont:g(l.iconTextFont,r),iconTextAnchor:l.iconTextAnchor,iconTextOffset:l.iconTextOffset,iconTextColor:y(l.iconTextColor,r),iconTextFontSize:y(l.iconTextFontSize,r),iconTextLineHeight:l.iconTextLineHeight,iconTextLetterSpacing:l.iconTextLetterSpacing,iconTextPadding:l.iconTextPadding,iconTextHaloWidth:Object(a.a)(l.iconTextHaloWidth),iconTextHaloColor:y(l.iconTextHaloColor,r),iconOpacity:y(l.iconOpacity,r),iconPriority:l.iconPriority,iconLabelingMargin:l.iconLabelingMargin,iconLabelingGroup:l.iconLabelingGroup,iconRotation:y(l.iconRotation,r),textField:y(Object(a.a)(l.textField),r),textFont:y(Object(a.a)(l.textFont),r),textColor:y(Object(a.a)(l.textColor),r),textFontSize:y(Object(a.a)(l.textFontSize),r),textLineHeight:Object(a.a)(l.textLineHeight),textLetterSpacing:Object(a.a)(l.textLetterSpacing),textField2:g(Object(a.f)(l.textField),r),textFont2:g(Object(a.f)(l.textFont),r),textColor2:g(Object(a.f)(l.textColor),r)||y(Object(a.a)(l.textColor),r),textFontSize2:g(Object(a.f)(l.textFontSize),r)||y(Object(a.a)(l.textFontSize),r),textMaxLengthPerLine:l.textMaxLengthPerLine,textPlacement:l.textPlacement,textPriority:l.textPriority,textOffset:y(Object(a.a)(l.textOffset),r),textOffset2:g(Object(a.f)(l.textOffset),r),textHaloColor:y(Object(a.a)(l.textHaloColor),r),textHaloColor2:g(Object(a.f)(l.textHaloColor),r)||y(Object(a.a)(l.textHaloColor),r),textHaloWidth:Object(a.a)(l.textHaloWidth),textHaloWidth2:Object(a.f)(l.textHaloWidth)||Object(a.a)(l.textHaloWidth),textLabelingMargin:Object(a.a)(l.textLabelingMargin),textLabelingMargin2:Object(a.f)(l.textLabelingMargin)||Object(a.a)(l.textLabelingMargin),textLabelingGroup:Object(a.a)(l.textLabelingGroup),textLabelingGroup2:Object(a.f)(l.textLabelingGroup)||Object(a.a)(l.textLabelingGroup)}});break;case"arrow":l=Object(o.a)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),strokeColor:y(l.strokeColor,r),lineWidth:y(l.lineWidth,r),strokeWidth:y(l.strokeWidth,r),tipWidth:y(l.tipWidth,r),tipHeight:y(l.tipHeight,r),animation:j(l.animation,r)}});break;case"stretchableImage":n=Object(i.a)(Object(i.a)({},c),{type:"stretchableImage",style:t.style});break;case"raster":l=Object(o.m)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{opacity:y(l.opacity,r)}});break;case"circle":l=Object(o.c)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),strokeColor:y(l.strokeColor,r),strokeColor2:y(l.strokeColor2,r),width:y(l.width,r),strokeWidth:y(l.strokeWidth,r),strokeWidth2:y(l.strokeWidth2,r)}});break;case"heatmap":l=Object(o.e)(t.style),n=Object(i.a)(Object(i.a)({},c),{type:t.type,style:{color:y(l.color,r),radius:y(l.radius,r),opacity:y(l.opacity,r),intensity:y(l.intensity,r),weight:y(l.weight,r),downscale:l.downscale}})}}catch(e){if(e instanceof _)return void console.warn("Problem with layer #"+t.id+": "+e);throw e}if(n){n.dataKeys=function(t){var e=[];for(var n in t){var i=n.split(":"),r=i[0],o=i.slice(1);e[t[n]]={type:r,key:o.join(":")}}return e}(r.getIndexedKeys());for(var u=0,d=null!=e?e:[];u<d.length;u++){var f=d[u];n.dataKeys[f.dataIndex]={type:f.type,key:f.property}}}return n}}function M(t,e){return"number"!=typeof t||Number.isNaN(t)?e:t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(19),r=n(2),o=n(3),a=n(73),s=n(8),c=n(14);function l(t,e,n){var i=new s.a(n);i.drawType=s.a.StaticDraw,i.prepare(t.getRenderingContext());var r=[];return e.forEach((function(e){var n=t.getShaderProgram(e.programName);r.push(e.vaoCreator(i,n))})),{buffer:i,vaos:r}}var u=n(6),d=n(13),f=0,h=function(){function t(t,e,n,r,o){void 0===r&&(r=[0,0,0,0]),this.tickerName="tile-fade-"+t+"-"+f++,this.readiness=1,this.purpose=t,this.dynamicObject=o,this.mvpMatrix=new Float32Array(i.b()),this.setTileCoords(r);var s=function(t,e,n){for(var i=[],r=[],o=[],s=0;s<e.length;s++){var u=e[s],d=u.symbol,f=u.sink,h=u.generatedObjects,p=u.buffer,m=t.symbolSettingsList[d];if(void 0!==m){var v=m[f];if(void 0!==v){var _=l(t,v,p),y=_.buffer,g=_.vaos;i.push(y);for(var b=0;b<h.length;b++)for(var w=h[b],x=w.rangeStart,S=w.rangeEnd,I=w.attributes,j=c.c[d].sinks[f].unpackObjectAttributes(I),O=0;O<v.length;O++){var M=v[O],P=M.uniformSet||"fill",L={type:a.a.Tile,layerSettings:M,stride:Object(c.f)(d,f),rangeStart:x,rangeEnd:S,attributes:j,attributesHash:JSON.stringify(I)+"_"+P+"_"+n.detailLevel,vao:g[O],tile:n,symbol:d,sink:f};M.identify?o.push(L):r.push(L)}}}}return{buffers:i,objects:r,identifyObjects:o}}(n,e,this),u=s.buffers,d=s.objects,h=s.identifyObjects;this.buffers=u,this.children=d,this.identifyChildren=h}return t.prototype.setTileCoords=function(t){var e=t[2],n=t[3],a=Object(o.D)(e);this.size=a,this.zoomLevel=e,this.detailLevel=n,this.modelMatrix=i.d(i.b(),Object(o.z)(t),r.j(a,a,u.m))},t.prototype.updateMvpMatrix=function(t){i.g(this.mvpMatrix,t,this.modelMatrix)},t.prototype.startTicker=function(t,e,n,i,r){d.c(this.tickerName,{easing:e},t,i,r,n)},t.prototype.updateTicker=function(t){var e=this;d.e(this.tickerName,{step:function(t,n){e.readiness=n}},t)},t.prototype.tickerFinished=function(t){return!d.a(this.tickerName,t)},t.prototype.clean=function(t){for(var e=0,n=this.buffers;e<n.length;e++)n[e].remove();this.buffers=[],this.children=[],this.identifyChildren=[],d.d(this.tickerName,t)},t}()},function(t,e,n){"use strict";function i(t,e,n,i,r){for(var o=0,a=e.length;o<a;o++){var s=e[o],c=0;"get"===s.type?c=i[n[s.key]]:r&&"sourceAttr"===s.type&&(c=r[s.key]),t.push(c)}return t}function r(t,e){for(var n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function o(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(Array.isArray(i))return!!Array.isArray(r)&&o(i,r);if(!(i===r||"number"==typeof i&&"number"==typeof r&&Number.isNaN(i)&&Number.isNaN(r)))return!1}return!0}n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"l",(function(){return r})),n.d(e,"k",(function(){return o})),n.d(e,"h",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"g",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"i",(function(){return u})),n.d(e,"d",(function(){return d})),n.d(e,"n",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"j",(function(){return p})),n.d(e,"a",(function(){return m})),n.d(e,"m",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"r",(function(){return y})),n.d(e,"o",(function(){return g})),n.d(e,"p",(function(){return b})),n.d(e,"q",(function(){return w}));var i=n(7);function r(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function o(t){var e={topColor:"#000000",strokeColor:"#000000",strokeWidth:1,sideColor:"#000000",visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.topColor),void 0===t.sideColor&&(e.sideColor=e.topColor),e}function a(t){var e={color:"#000000",width:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function s(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function c(t){var e={sideColor:"#000000",strokeColor:"#000000",strokeWidth:1,height:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.sideColor),e}function l(t){var e={textField:["get","db_label"],textFont:"Noto_Sans",textColor:"#000000",textFontSize:16,textLetterSpacing:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textPriority:0,textLabelingSideMargin:0,textDuplicationSpacing:0,lineEndingOffsets:0,visibility:"visible",labelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function u(t){var e={color:"#000000",lineWidth:2,lineLength:10,tipWidth:1.5,tipHeight:2,priority:0,duplicationSpacing:0,endingOffsets:0,visibility:"visible",labelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function d(t){var e={color:"#000000",gapColor:"#00000000",width:1,gapLength:1,dashLength:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function f(t){var e={color:"#000000",width:1,shift:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function h(t){var e={color:"#ffffff",strokeColor:"#3388ff",strokeColor2:"#00000000",width:20,strokeWidth:3,strokeWidth2:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function p(t){var e={allowOverlap:!1,allowElevation:!1,iconOpacity:1,iconImage:"",iconAnchor:[.5,.5],iconOffset:[0,0],iconWidth:16,iconTextField:["get","db_label2"],iconTextFont:"",iconTextAnchor:[.5,.5],iconTextOffset:[0,0],iconTextColor:"#000000",iconTextFontSize:16,iconTextLineHeight:1.2,iconTextLetterSpacing:0,iconTextPadding:[0,0,0,0],iconTextHaloWidth:0,iconTextHaloColor:"rgba(0, 0, 0, 0)",iconPriority:0,iconRotation:0,iconLabelingGroup:b,iconLabelingMargin:{topBottom:0,leftRight:0},textField:[["get","db_label"],["get","db_label2"]],textFont:"",textColor:"#000000",textFontSize:16,textLineHeight:1.2,textLetterSpacing:0,textPlacement:"bottomCenter",textOffset:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textLabelingMargin:{topBottom:0,leftRight:0},textPriority:0,textMaxLengthPerLine:30,visibility:"visible",textLabelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function m(t){var e={color:"#000000",strokeColor:"#000000",lineWidth:1,strokeWidth:0,tipWidth:1,tipHeight:1,animation:{type:"appearance",tipMovementAmplitude:0},visibility:"visible"};for(var n in void 0===t.strokeColor&&(e.strokeColor=e.color),t)void 0!==t[n]&&(e[n]=t[n]);return e}function v(t){var e={opacity:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function _(t){return Object(i.b)(t,{color:["interpolate",["linear"],["heatmap-density"],0,"rgba(53, 136, 253, 0)",.2,"rgba(53, 136, 253, 0.2)",.4,"rgb(255, 201, 77)",.6,"rgb(255, 202, 20)",.75,"rgb(245, 0, 7)",1,"rgb(255, 0, 0)"],radius:30,opacity:1,intensity:1,weight:1,downscale:1,visibility:"visible"})}var y="__overlapped",g="__commercial",b="default",w={groups:[b,y,g],overlay:[[b,y]],intersect:[[]]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d}));var i=1e5;function r(t){return[t%i,Math.floor(t/i)%i,0,0]}function o(t){for(var e=0,n=0;n<4;n++){var r=4294967296*t[n]+e;e=Math.floor(r/i),t[n]=r%i}}function a(t,e){for(var n=4294967296,r=4,o=0;--r>=0;){var a=o*i+e[r],s=Math.floor(a/n);o=a-s*n,t[r]=s}}function s(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]+e[r]+n;n=Math.floor(o/i),t[r]=o%i}}function c(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]-e[r]-n;o<0?(o+=i,n=1):n=0,t[r]=o}}function l(t){for(var e=4,n=0;--e>=0;)n=n*i+t[e];return n}function u(t,e){var n=r(t),i=r(e);return o(i),s(i,n),function(t){for(var e=!0,n=4,i="";--n>=0;){var r=String(t[n]);e?0!==t[n]&&(i+=r,e=!1):i+="00000".slice(r.length)+r}return i.length||(i="0"),i}(i)}function d(t){var e=function(t){t="00000000000000000000".slice(t.length)+t;for(var e=[0,0,0,0],n=0;n<4;n++){var i=parseInt(t.slice(5*n,5*(n+1)),10);e[3-n]=i}return e}(t),n=r(0);a(n,e);var i=l(n);return o(n),c(e,n),[l(e),i]}},function(t,e,n){"use strict";function i(t){return t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"g",(function(){return p})),n.d(e,"b",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"j",(function(){return _})),n.d(e,"h",(function(){return y})),n.d(e,"k",(function(){return g})),n.d(e,"l",(function(){return b})),n.d(e,"n",(function(){return x})),n.d(e,"c",(function(){return S})),n.d(e,"e",(function(){return I})),n.d(e,"i",(function(){return j}));var i,r=n(31),o=n(45),a=n(3),s=n(22),c=n(1),l=n(91),u=n(11);function d(t,e,n){return{type:t,sourceId:n,key:Object(a.c)(e),labelsKey:t+"_"+n,coords:e,zoomLevel:e[2],detailLevel:e[3],needFetch:!1,revision:0,needAbortFetch:!1,needGenerate:!1,status:i.Initial,oldHoverTileObjects:[]}}function f(t,e,n,i,r,o){var l=[];n.oldHoverTileObjects.forEach((function(n){n.tickerFinished(e)?(t.tileManager.removeObject(n),n.clean(e)):l.push(n)})),n.oldHoverTileObjects=l,void 0!==r?e.performanceCaveatEmitted||!o&&n.hover&&n.hover.id[0]===r[0]&&n.hover.id[1]===r[1]||function(t,e,n,i,r){n.idSet&&n.idSet.has(i)&&function(t,e){return Math.min(Math.floor(t.styleZoom),c.tiles.maxDetailLevel)===e.coords[3]}(e,n)?function(t,e,n,i){var r=e.newMod||e.currentMod,o=t.map.state,s={tileInfo:Object(a.e)(e.coords),pixelRatio:self.devicePixelRatio,selectedIds:(null==r?void 0:r.params.get("selectedIds"))||[],styleId:o.handyStyleId,styleState:o.styleState,floorsEnabled:t.map.state.floorsEnabled,hoverId:n,sourceId:i};return t.workers.parser.generateTile(s)}(t,n,i,r).then((function(r){h(t,n,e);var o={id:i,tileObjects:[],generatedData:[]},a=[];r.results.forEach((function(i){var r=new s.a("hover",i.collectorOutput.data,t.renderer,n.coords),l=i.collectorOutput,u=l.packedRasters,d=l.rastersToLoad;void 0!==u&&t.assetManager.prepareRasters(i.styleId,u),t.assetManager.loadRasters(d),o.tileObjects.push(r),t.tileManager.addObject(r),r.startTicker(e,c.houseHover.inAnimationType,c.houseHover.inAnimationTime,0,1),i.collectorOutput.labels.length&&a.push({metatileHash:i.metatileHash,labels:i.collectorOutput.labels,styleId:i.styleId})})),o.generatedData=r.results,t.labeler.addLabels("label_hover",u.c.Tile,a),t.identifier.debouncedFillCache(),n.hover=o})):h(t,n,e)}(t,e,n,r,i):h(t,n,e)}function h(t,e,n){e.hover&&(e.hover.tileObjects.forEach((function(t){e.oldHoverTileObjects.push(t),t.startTicker(n,c.houseHover.outAnimationType,c.houseHover.outAnimationTime,1,0)})),e.hover=void 0,t.labeler.removeLabels("label_hover"),t.identifier.debouncedFillCache())}function p(t){if(t.newMod&&t.newMod.needGenerate)return t.newMod.needGenerate=!1,t.newMod}function m(t){return(!t.currentMod||Object(o.b)(t.currentMod))&&(!t.newMod||Object(o.b)(t.newMod))}function v(t,e){t.currentMod&&Object(o.d)(t.currentMod,e),t.newMod&&Object(o.d)(t.newMod,e)}function _(t){t.currentMod=void 0}function y(t){return t.currentMod&&t.currentMod.useful?t.currentMod:t.newMod&&t.newMod.useful?t.newMod:void 0}function g(t){t.currentMod&&(t.currentMod.useful=!1),t.newMod&&(t.newMod.useful=!1)}function b(t,e,n){if(t.idSet&&e.setTileIds(t.idSet),t.currentMod||t.newMod){if(t.currentMod&&l.a.equal(t.currentMod.params,e))return t.currentMod.useful=!0,void(t.newMod=void 0);t.newMod&&l.a.equal(t.newMod.params,e)?t.newMod.useful=!0:w(t,e,n)}else w(t,e,n)}function w(t,e,n){var i=Object(a.j)(t.coords,e),r=n.get(i);r?(t.newMod=r,t.newMod.useful=!0):(t.newMod=Object(o.c)(t,i,e),t.idSet&&t.newMod.params.setTileIds(t.idSet))}function x(t,e,n,r){switch(t.status){case i.Initial:t.newMod&&t.newMod.useful&&(t.status=i.Loading,t.needFetch=!0);break;case i.Loading:t.newMod&&t.newMod.useful?t.serverMetadata&&(t.status=i.Loaded):(t.status=i.Initial,t.needAbortFetch=!0);break;case i.Loaded:}t.currentMod&&Object(o.f)(t.currentMod,e,n,r),t.newMod&&(Object(o.f)(t.newMod,e,n,r),t.newMod.needGenerate&&(t.needGenerate=!0))}function S(t){t.newMod&&t.newMod.ready&&(t.currentMod=t.newMod,t.newMod=void 0)}function I(t){var e=new r.a;return t.forEach((function(t){e.addFromFlatArray(t.collectorOutput.geoIds)})),e}function j(t){t.status===i.Loading&&(t.needAbortFetch=!0),t.status=i.Initial,t.serverMetadata=void 0,t.revision++}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"i",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"c",(function(){return p})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return y})),n.d(e,"g",(function(){return g})),n.d(e,"h",(function(){return b}));var i=n(7),r=n(27),o=n(3),a=n(76),s=n(33),c=n(45),l=n(1),u=n(91);function d(t){var e=t.viewportTiles;for(var n in t.tiles)Object(r.k)(t.tiles[n]);for(var i=0;i<e.length;i++){n=e[i];var a=t.tiles[n];a||(a=t.tiles[n]=Object(r.d)(t.type,Object(o.q)(n),t.sourceId));var s=new u.a(t.selectedIds,t.mapState.styleState,a.revision);Object(r.l)(a,s,t.tileModsCache)}}function f(t,e){for(var n=0;n<e.length;n++){var i=t[e[n]],o=Object(r.h)(i);if(!o||!o.ready)return!1}return!0}function h(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}function p(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}function m(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needGenerate&&(i.needGenerate=!1,e.push(i))}return e}function v(t){var e=new Set(t.viewportTiles),n=new Set(t.tileModsCache.getData().map((function(t){return t.tile}))),i=[];for(var o in t.tiles){var a=t.tiles[o];!Object(r.b)(a)||e.has(o)||t.zoomDirection!==s.b.Stationary||n.has(a)||i.push(a)}return i}function _(t,e,n,i,r,o,l,u){return{type:t,sourceId:e,minZoomLevel:n,maxZoomLevel:i,minDetailLevel:r,maxDetailLevel:o,tiles:{},viewportTiles:[],zoomLevel:y(t,u.zoom,u.styleZoom),zoomDirection:s.b.Stationary,zoomStartZoom:0,tileModsCache:new a.a(0,(function(t,e){l.labeler.removeLabels(e.labelsKey),Object(c.d)(e,u)})),tileModsCacheMaxCount:0,selectedIds:[],displayedMods:{},tilesAppearance:s.a.ByOne,mapState:u}}function y(t,e,n){return"raster"===t?Math.round(e):Math.floor(n)}function g(t){for(var e in t.tiles)Object(r.f)(t.tiles[e],t.mapState);t.tiles={},t.viewportTiles=[],t.zoomDirection=s.b.Stationary,t.tileModsCache.reset(),t.displayedMods={},t.tilesAppearance=s.a.ByOne}function b(t,e,n,r){var a=n.displayedMods,s=Object(i.p)(a,r);s.forEach((function(n){if(void 0!==n.objects){var i=!0;for(var a in r)if(Object(o.n)(n.tile,r[a].tile)){i=!1;break}n.objects.forEach((function(n){t.addObject(n),i&&n.startTicker(e,l.tileAnimation.type,l.tileAnimation.time,0,1)}))}}));var c=Object(i.p)(r,a);c.forEach((function(e){var n;void 0!==e.objects&&(e.objects.forEach((function(e){return t.removeObject(e)})),null===(n=e.tile.hover)||void 0===n||n.tileObjects.forEach((function(e){return t.removeObject(e)})))}));var u=s.length>0||c.length>0;return u&&(e.needLabeling=!0,e.needRerender=!0),u}},function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return u}));var i=n(0),r=n(1),o=/\{(\w+)\}/g;function a(t,e){return t.replace(o,(function(t,n){return e[n]}))}function s(t){var e=t.split("?"),n=e[0],i=e[1];if(!i)return n;var r=i.split("&").map((function(t){return t.split("=")})).filter((function(t){return"undefined"!==t[1]})).map((function(t){return t.join("=")})).join("&");return r.length?n+"?"+r:n}function c(t,e){var n=a(e.host,{subdomain:e.subdomain});return s(a(r.urls[t],Object(i.a)(Object(i.a)({},e),{host:n})))}function l(t,e){return s(a(t,e))}function u(t,e){for(var n=0,i=0;i<e.length;i++)n+=e.charCodeAt(i);return t[n%t.length]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"l",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"d",(function(){return p})),n.d(e,"i",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"e",(function(){return _}));var i,r=n(10);function o(t){var e=new r.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(t,e,n,i){var o=new r.a(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function u(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 d(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)}function f(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}function h(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a),t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function m(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t}function v(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function _(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],c=e[1],l=e[2],u=e[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-c)<=r.b*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-l)<=r.b*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(a-u)<=r.b*Math.max(1,Math.abs(a),Math.abs(u))}(i=new r.a(4))[0]=0,i[1]=0,i[2]=0,i[3]=0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t=[]),this.map={};for(var e=0;e<t.length;e++)this.add(t[e])}return t.prototype.has=function(t){var e=this.map[t[1]];return void 0!==e&&void 0!==e[t[0]]},t.prototype.add=function(t){var e=this.map[t[1]];e||(e=this.map[t[1]]={}),e[t[0]]=!0},t.prototype.addFromFlatArray=function(t){for(var e=this.map,n=0;n<t.length/2;n++){var i=t[2*n+1],r=e[i];r||(r=e[i]={}),r[t[2*n]]=!0}},t.prototype.toFlatArray=function(){var t=this.map,e=[];for(var n in t){var i=t[n];for(var r in i)e.push(Number(r),Number(n))}return e},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));var i,r=n(4);function o(t,e){return Number.isNaN(t)?e:t}function a(t,e){if(!t)return"";var n=Object(r.h)(t,e);return Number.isNaN(n)||!n&&0!==n?"":String(n)}!function(t){t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.OneWayLine=2]="OneWayLine"}(i||(i={}))},function(t,e,n){"use strict";var i,r;n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),function(t){t[t.Stationary=0]="Stationary",t[t.ZoomingIn=1]="ZoomingIn",t[t.ZoomingOut=2]="ZoomingOut"}(i||(i={})),function(t){t[t.ByOne=0]="ByOne",t[t.WaitingAll=1]="WaitingAll"}(r||(r={}))},function(t,e,n){"use strict";var i,r,o,a;n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),function(t){t.Striped="Striped",t.Entrance="Entrance"}(i||(i={})),function(t){t[t.Line=0]="Line",t[t.Arrow=1]="Arrow",t[t.StartBorder=2]="StartBorder",t[t.LineEnding=3]="LineEnding"}(r||(r={})),function(t){t[t.TileCut=0]="TileCut",t[t.ObjectEnding=1]="ObjectEnding"}(o||(o={})),function(t){t[t.Flat=0]="Flat",t[t.Circle=1]="Circle"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n(6);function r(t){return i.q*t}function o(t){return t/i.q}function a(t){return!!t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return A})),n.d(e,"d",(function(){return D})),n.d(e,"c",(function(){return F}));var i=n(39),r=n(6);function o(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:a(t)}}function a(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function s(t,e,n,i){if(t.coords.length<2)throw new Error("The source coords array must have at least two coordinates");return t.coords.map((function(r,o){return(e+r+i*(0===o?-1:o===t.coords.length-1?1:0))/n}))}function c(t,e){for(var n=function(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,c=[o[0]],l=1;l<o.length;l++){var u=o[l-1],d=o[l],f=l%2==(a?1:0),h=c[c.length-1];f?c.push(Math.round((s-r)*(d-u)/i)+h):c.push(h+d-u)}return c}function l(t,e,n){void 0===n&&(n=0);var i=t[t.length-1]-t[0],r=t.map((function(t){return Math.round(t-i/2+n)}));return 2===r.length?r[r.length-1]+=2*e:(r[0]-=e,r[r.length-1]+=e),r}function u(t,e,n,i,a,u,d,f,h){var p=function(t,e,n,i){return void 0===n&&(n=[]),void 0===i&&(i=[]),{x:o(n,t),y:o(i,e)}}(n.w,n.h,f,h),m=function(t,e,n,i,r){return[s(t.x,e,i[0],r),s(t.y,n,i[1],r)]}(p,n.x,n.y,e,r.e),v=function(t,e,n,i,r,o){return void 0===r&&(r=0),void 0===o&&(o=0),[l(c(t.x,e),i,r),l(c(t.y,n),i,o)]}(p,i,a,r.e,u,d);t.set(v,m)}function d(t,e,n,r,o,a,s,c,l,u,d){var f=12*t.elements.offset;t.views.position[f]=e,t.views.position[f+1]=n,t.views.position[f+2]=r,t.views.cornerOffset[f]=o,t.views.cornerOffset[f+1]=-a,t.views.texCoords[f]=Object(i.c)(s),t.views.texCoords[f+1]=Object(i.c)(c),t.views.scales[f]=Object(i.b)(l),t.views.scales[f+1]=Object(i.a)(u),f>>=1,t.views.localID[f]=d,t.elements.offset++}function f(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+e,l[u+1]=d+n,l[u+2]=d+i,l[u+3]=d+r,l[u+4]=d+o,l[u+5]=d+a,c.offset=u+6}var h=function(){function t(){this.countX=0,this.countY=0,this.textureX=[],this.textureY=[],this.stretchedX=[],this.stretchedY=[]}return t.prototype.reset=function(){this.countX=0,this.countY=0},t.prototype.set=function(t,e){this.countX=e[0].length,this.countY=e[1].length,this.textureX=e[0],this.textureY=e[1],this.stretchedX=t[0],this.stretchedY=t[1]},t.prototype.isEmpty=function(){return 0===this.countX||0===this.countY},t}(),p=n(75),m=n(83),v=n(1),_=n(4);function y(t,e,n,i,r){if(!r)return[t.w/e,t.h/e];var o=w(n,i,r),a=n.style.iconTextPadding;return[a[3]+a[1]+o[0],a[0]+a[2]+o[1]]}function g(t,e,n){return x(Object(_.i)(t.style.textFontSize,e),t.style.textLineHeight,n)}function b(t,e,n){return x(Object(_.i)(t.style.textFontSize2,e),t.style.textLineHeight,n)}function w(t,e,n){return x(Object(_.i)(t.style.iconTextFontSize,e),t.style.iconTextLineHeight,n)}function x(t,e,n){return[t/v.fonts.baseSize*n.maxWidth,t*e*n.lines.length]}function S(t,e,n){var i,r,o=null!==(i=n[0])&&void 0!==i?i:0,a=null!==(r=n[1])&&void 0!==r?r:0;return[(.5-t.anchorX)*e[0]+o,(.5-t.anchorY)*e[1]+a]}function I(t,e,n,i,r){var o,a,s,c,l=null!==(o=n[0])&&void 0!==o?o:.5,u=null!==(a=n[1])&&void 0!==a?a:.5,d=null!==(s=r[0])&&void 0!==s?s:0,f=null!==(c=r[1])&&void 0!==c?c:0;return[t[0]/2-l*e[0]-i[3]+d,t[1]/2-u*e[1]-i[0]+f]}function j(t,e,n,i,r){var o=e[0],a=e[1],s=n[0],c=n[1],l=0,u=0,d=c/2+a/2,f=c/2-a/2,h=-d,p=-f,m=s/2+o/2,v=s/2-o/2,_=-m,y=-v;switch(t){case"bottomCenter":u=d+r;break;case"rightCenter":l=m+r;break;case"topCenter":u=h-r;break;case"leftCenter":l=_-r;break;case"bottomRight":l=v,u=d+r;break;case"topRight":l=v,u=h-r;break;case"bottomLeft":l=y,u=d+r;break;case"rightBottom":l=m+r,u=p;break;case"rightTop":l=m+r,u=f;break;case"topLeft":l=y,u=h-r;break;case"leftTop":l=_-r,u=f;break;case"leftBottom":l=_-r,u=p}return[l+i[0],u+i[1]]}var O,M=n(26),P=n(3),L=n(11),T=n(18),k=n(67),z=n(23);!function(t){t[t.Icon=0]="Icon",t[t.First=1]="First",t[t.Second=2]="Second"}(O||(O={}));var C=new h,E=[0,0,0],A=Object(M.a)({symbol:"point",sinks:{raster:{stride:24,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.cornerOffset=new Int16Array(e,8),t.views.texCoords=new Uint16Array(e,12),t.views.scales=new Int16Array(e,16),t.views.localID=new Uint32Array(e,20)},packObjectAttributes:function(t,e,n){return Object(z.b)([t.styleId,t.layer.innerId,e,n],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],atlasIndex:t[3],tileData:t.slice(5)}}},text:{stride:20,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.cornerOffset=new Int16Array(e,8),t.views.texCoords=new Uint16Array(e,12),t.views.localID=new Uint32Array(e,16)},packObjectAttributes:function(t,e,n,i,r,o){return Object(z.b)([t.styleId,t.layer.innerId,e,n,i[0],-i[1],r,o],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],offsetX:t[4],offsetY:t[5],labelIndex:t[6],fontIndex:t[7],tileData:t.slice(8)}}}},processElement:function(t,e,n,i,o,a,s){var c,l,u=n.layer,d=n.label;if("point"===u.type){var f,h=Object(_.f)(a.styleZoom,a.styleState,!0,d.tileData),p=B(h,t,o,d),m=p?y(p,o,u,h,d.iconTextMetrics):[0,0],v=[0,0];switch(p&&(v=d.iconTextMetrics?I(m,f=w(u,h,d.iconTextMetrics),u.style.iconTextAnchor,u.style.iconTextPadding,u.style.iconTextOffset):S(p,m,u.style.iconOffset)),n.type){case L.d.Icon:if(!p)return;if(Object(P.t)(E,d.anchorWorld,s),!Object(P.u)(E))return;var x=t.icons[Object(_.j)(u.style.iconImage,h)];if(R(e,d,E,i,p,m[0]*o,m[1]*o,v[0]*o,v[1]*o,null===(c=null==x?void 0:x.stretchX)||void 0===c?void 0:c.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]})),null===(l=null==x?void 0:x.stretchY)||void 0===l?void 0:l.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]}))),!f)return;return void function(t,e,n,i,o,a,s){var c,l=n.iconTextMetrics;if(l&&s.style.iconTextFont){var u=Object(_.f)(i.styleZoom,i.styleState,!1,n.tileData),d=Object(_.j)(s.style.iconTextFont,u),f=null!==(c=t.fontNameToIndex[d])&&void 0!==c?c:t.fontNameToIndex[r.b];D(e,n,O.Icon,l,E,o,a,s,f)}}(t,e,n.label,a,i,function(t,e,n){var i,r,o,a,s=null!==(i=e[0])&&void 0!==i?i:.5,c=null!==(r=e[1])&&void 0!==r?r:.5,l=null!==(o=n[0])&&void 0!==o?o:0,u=null!==(a=n[1])&&void 0!==a?a:0;return[(.5-s)*t[0]+l,(.5-c)*t[1]+u]}(f,u.style.iconTextAnchor,u.style.iconTextOffset),u);case L.d.PoiText:return void function(t,e,n,i,o,a,s,c,l){var u,d=n.label,f=d.textMetrics;if(Object(P.t)(E,d.anchorWorld,a),Object(P.u)(E)){var h=Object(_.f)(o.styleZoom,o.styleState,!1,d.tileData),p=Object(_.j)(l.style.textFont,h);if(p.length){var m=g(l,h,f),v=null!==(u=t.fontNameToIndex[p])&&void 0!==u?u:t.fontNameToIndex[r.b],y=j(n.parent?l.style.textPlacement:"centerCenter",i,m,c,Object(_.i)(l.style.textOffset,h));D(e,d,O.First,d.textMetrics,E,s,y,l,v)}}}(t,e,n,m,a,s,i,v,u);case L.d.PoiText2:return void function(t,e,n,i,o,a,s,c,l){var u,d,f=n.label,h=f.textMetrics,p=f.textMetrics2;if(p&&l.style.textFont2&&(Object(P.t)(E,f.anchorWorld,a),Object(P.u)(E))){var m=Object(_.f)(o.styleZoom,o.styleState,!1,f.tileData),v=g(l,m,h),y=b(l,m,p),w=Object(_.i)(l.style.textOffset,m),x=Object(_.i)(null!==(u=l.style.textOffset2)&&void 0!==u?u:0,m,0),S=Object(_.j)(l.style.textFont2,m),I=null!==(d=t.fontNameToIndex[S])&&void 0!==d?d:t.fontNameToIndex[r.b],M=j(l.style.textPlacement,i,[y[0],v[1]],c,w);M[1]+=(v[1]+y[1])/2+x,D(e,f,O.Second,p,E,s,M,l,I)}}(t,e,n,m,a,s,i,v,u)}}},getLabelingInfo:function(t,e,n,i,r){var o=t.layer;if("point"===o.type){t.labelingElements.length=0;var a=Object(_.f)(n.styleZoom,n.styleState,!0,t.tileData),s=B(a,e,r,t),c=s?y(s,r,o,a,t.iconTextMetrics):[0,0],l=[0,0];if(s){l=t.iconTextMetrics?I(c,w(o,a,t.iconTextMetrics),o.style.iconTextAnchor,o.style.iconTextPadding,o.style.iconTextOffset):S(s,c,o.style.iconOffset);var u=new m.a(t,L.d.Icon,t.anchorWorld,n.buildingHeight,i,e);u.boxes.push([-c[0]/2+l[0],-c[1]/2+l[1],c[0]/2+l[0],c[1]/2+l[1]]),t.labelingElements.push(u)}var d=Object(_.j)(o.style.textFont,a);t.label.length>0&&d.length&&(function(t,e,n,i,r,o,a){var s=t.textMetrics;if(s){var c=Object(_.f)(i.styleZoom,i.styleState,!1,t.tileData),l=Object(_.i)(a.style.textOffset,c),u=g(a,c,s),d=new m.a(t,L.d.PoiText,t.anchorWorld,i.buildingHeight,r,e);t.labelingElements.length>0&&(d.parent=t.labelingElements[0]);var f=j(d.parent?a.style.textPlacement:"centerCenter",n,u,o,l);d.boxes.push([f[0]-u[0]/2,f[1]-u[1]/2,f[0]+u[0]/2,f[1]+u[1]/2]),t.labelingElements.push(d)}}(t,e,c,n,i,l,o),t.label2&&function(t,e,n,i,r,o,a){var s,c=t.textMetrics,l=t.textMetrics2;if(l){var u=Object(_.f)(i.styleZoom,i.styleState,!1,t.tileData),d=g(a,u,c),f=b(a,u,l),h=Object(_.i)(a.style.textOffset,u),p=Object(_.i)(null!==(s=a.style.textOffset2)&&void 0!==s?s:0,u,0),v=new m.a(t,L.d.PoiText2,t.anchorWorld,i.buildingHeight,r,e);t.labelingElements.length>1?(v.parent=t.labelingElements[0],v.firstLabel=t.labelingElements[1]):t.labelingElements.length>0&&(v.parent=t.labelingElements[0],v.firstLabel=t.labelingElements[0]);var y=j(a.style.textPlacement,n,[f[0],d[1]],o,h);y[1]+=(d[1]+f[1])/2+p,v.boxes.push([y[0]-f[0]/2,y[1]-f[1]/2,y[0]+f[0]/2,y[1]+f[1]/2]),t.labelingElements.push(v)}}(t,e,c,n,i,l,o))}}});function D(t,e,n,i,r,o,a,s,c){for(var l={},u=0,d=e.ranges;u<d.length;u++){var f=d[u];l[f]=t.getBucket("point","text",A.sinks.text.packObjectAttributes(e,o,f,a,n,c),A.sinks.text.binder)}Object(p.c)(l,e,r,i,s,n)}function F(t,e,n,i,r){return R(t,e,n,i,r,r.w,r.h,r.w*(.5-r.anchorX),r.h*(.5-r.anchorY),void 0,void 0)}function R(t,e,n,i,o,a,s,c,l,h,p){if(!(a<=0||s<=0)&&"point"===e.layer.type){u(C,v.atlasSize,o,a,s,c,l,h,p),t.atlasPacker.addRastersToLoad(e.styleId,o);var m=t.getBucket("point","raster",A.sinks.raster.packObjectAttributes(e,i,o.atlasIndex),A.sinks.raster.binder);!function(t,e,n,i,o,a,s,c){for(var l=i.textureX,u=i.textureY,h=i.stretchedX,p=i.stretchedY,m=i.countX,v=i.countY,_=r.d,y=r.c,g=0;g<m-1;g++)for(var b=l[g],w=l[g+1],x=h[g],S=h[g+1],I=0;I<v-1;I++){var j=u[I],O=u[I+1],M=p[I],P=p[I+1];f(o,0,2,1,1,2,3),d(o,t,e,n,x,M,b,j,_,y,c),d(o,t,e,n,S,M,w,j,_,y,c),d(o,t,e,n,x,P,b,O,_,y,c),d(o,t,e,n,S,P,w,O,_,y,c)}}(n[0],n[1],n[2],C,m,0,0,e.identifyIndex)}}function B(t,e,n,i){var r=e.rasterSets,o=i.layer;if("point"===o.type){var a;if(i.pointType===L.b.Commercial||i.pointType===L.b.Landmark)a=r.byKey[Object(T.c)(i.idLo,i.idHi)];else{var s=Object(_.j)(o.style.iconImage,t);s.length&&(a=r.byKey[Object(T.b)(s,o.style.iconAnchor[0],o.style.iconAnchor[1])])}if(a){var c=Object(_.i)(o.style.iconWidth,t),l=Object(k.c)(a.rasters,c*n,!0);if(void 0!==l)return a.rasters[l]}}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a}));var i=n(54);function r(t,e){a("No glyph for character "+t+" (code = "+e+", range = "+Object(i.b)(e)+")")}var o=new Set;function a(t){o.has(t)||(console.log(t),o.add(t))}},function(t,e,n){"use strict";function i(t,e){return 0===t?0:Math.min(2*t-1,2*(e-t))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){var e=256*Math.log(t);return e+(e<0?-.5:.5)<<16>>16}function r(t){return 32768*t+.5<<16>>>16}function o(t){return 256*Math.log(t)+.5<<16>>16}n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"f",(function(){return p}));var i=n(0),r=n(61),o=n(92),a=n(1),s=n(77),c=15,l=256,u=17,d=function(){function t(t,e,n){var i,l;this.type="geojson",this.id=Object(s.a)(),this.modules=t.modules,this.mapglApiSource=n,this.sourceCore=new o.a(this.id,this.modules,e);var d=null!==(i=e.minZoom)&&void 0!==i?i:a.MAP_DEFAULTS.minZoom,f=Math.min(null!==(l=e.maxZoom)&&void 0!==l?l:c,u);this.layer=new r.a(d,f,d,u,this.modules,t.state,this.sourceCore),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy(),this.modules.sourceStorage.removeSource(this.getId()),this.sourceCore.destroy()},t.prototype.setAttributes=function(t){this.sourceCore.setAttributes(t),this.layer.redraw()},t.prototype.getAttributes=function(){return this.sourceCore.getAttributes()},t.prototype.getId=function(){return this.sourceCore.id},t}(),f={type:"FeatureCollection",features:[]},h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="internal",r.data=n.data,r.modules.sourceStorage.addSource(r),r}return Object(i.c)(e,t),e.prototype.getFeatureById=function(t){return"FeatureCollection"===this.data.type?this.data.features[t[0]]:this.data},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.data=f},e.prototype.setData=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){switch(e.label){case 0:return[4,this.sourceCore.setData(t)];case 1:return e.sent()&&(this.data=t,this.layer.onSourceDataChange()),[2]}}))}))},e}(d),p=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="external",r.modules.sourceStorage.addSource(r),r}return Object(i.c)(e,t),e.prototype.getObjectAttributes=function(t,e){return this.sourceCore.getObjectAttributes(t,e)},e.prototype.setDataUrl=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){switch(e.label){case 0:return[4,this.sourceCore.setData(t)];case 1:return e.sent()&&this.layer.onSourceDataChange(),[2]}}))}))},e}(d)},function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return i})),function(t){t[t.Static=0]="Static",t[t.Unique=1]="Unique",t[t.Loaded=2]="Loaded"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n(12),r=n(49);function o(t){var e=t[0][0],n=t[0][1],i=t[1][0],r=t[1][1],o=t[2][0],a=t[2][1],s=t[3][0],c=t[3][1];return{min:[Math.min(e,i,o,s),Math.min(n,r,a,c)],max:[Math.max(e,i,o,s),Math.max(n,r,a,c)]}}function a(t,e){var n=o(t);if(!Object(i.h)(e,n))return!1;for(var a=[Object(r.b)(t[3],t[2]),Object(r.b)(t[1],t[0]),Object(r.b)(t[0],t[3]),Object(r.b)(t[2],t[1])],s=[e.min,e.max,[e.min[0],e.max[1]],[e.max[0],e.min[1]]],c=0,l=a;c<l.length;c++){for(var u=l[c],d=!0,f=0;f<s.length;f++){var h=s[f];if(u.a*h[0]+u.b*h[1]+u.c<0){d=!1;break}}if(d)return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(2),r=n(19),o=n(1),a=n(7),s=n(5),c=n(49),l=[0,0,1],u=function(){function t(t){this.state=t,this.position=[0,0,0],this.projectionMatrix=[],this.viewMatrix=[],this.viewProjectionMatrix=[],this.viewProjectionMatrixInverse=[],this.viewportVertices=[[0,0],[0,0],[0,0],[0,0]],this.update()}return t.prototype.setState=function(t){this.state=t,this.update()},t.prototype.update=function(){this.updatePosition(),this.updateProjectionMatrix(),this.updateViewMatrix(),r.h(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),r.e(this.viewProjectionMatrixInverse,this.viewProjectionMatrix),this.updateViewportVertices()},t.prototype.putProject=function(t,e){var n=this.state,i=n.size,r=n.viewport,o=this.viewProjectionMatrix,a=e[0],s=e[1],c=e[2],l=i[0]/2,u=i[1]/2,d=o[3]*a+o[7]*s+o[11]*c+o[15];t[0]=l+r.left+(o[0]*a+o[4]*s+o[12])*l/d,t[1]=u+r.top-(o[1]*a+o[5]*s+o[9]*c+o[13])*u/d},t.prototype.project=function(t){var e=[0,0,0];return this.putProject(e,t),e},t.prototype.unproject=function(t){var e=this.state,n=e.size,r=e.viewport,o=[(t[0]-r.left)/n[0]*2-1,-(t[1]-r.top)/n[1]*2+1,0];if(i.u(o,o,this.viewProjectionMatrixInverse),o[0]-=this.position[0],o[1]-=this.position[1],o[2]-=this.position[2],i.o(o,o),0!==o[2]){var a=-this.position[2]/o[2];a>=0?(o[0]=this.position[0]+o[0]*a,o[1]=this.position[1]+o[1]*a,o[2]=this.position[2]+o[2]*a):o[0]=o[1]=o[2]=0}else o[0]=o[1]=o[2]=0;return o},t.prototype.updatePosition=function(){var t=this.state,e=t.center,n=t.rotation,i=t.zoom,r=t.pitch,o=t.size,a=Object(s.o)(i,o),c=Math.max(a*Math.sin(r),1);this.position[0]=e[0]+Math.sin(n)*c,this.position[1]=e[1]-Math.cos(n)*c,this.position[2]=a*Math.cos(r)},t.prototype.updateViewMatrix=function(){r.f(this.viewMatrix,this.position,this.state.center,l)},t.prototype.updateProjectionMatrix=function(){var t=o.camera.fov,e=o.camera.near,n=o.camera.far,i=this.correctViewAndSize(),r=i.size,s=i.view,c=r[0]/r[1],l=e*Math.tan(Object(a.e)(t)/2),u=2*l,d=c*u,f=-d/2;s&&(f+=s.x*d/r[0],l-=s.y*u/r[1],d*=s.width/r[0],u*=s.height/r[1]);var h=f+d,p=l-u,m=this.projectionMatrix;m[0]=2*e/(h-f),m[5]=2*e/(l-p),m[8]=(h+f)/(h-f),m[9]=(l+p)/(l-p),m[10]=-(n+e)/(n-e),m[11]=-1,m[14]=-2*n*e/(n-e),m[1]=m[2]=m[3]=m[4]=m[6]=m[7]=m[12]=m[13]=m[15]=0},t.prototype.correctViewAndSize=function(){var t=this.state,e=t.size,n=t.pitch,i=t.padding,r=Math.max(0,i.top-i.bottom)*Math.tan(n),o=Object(s.a)(e[1])+r,a={x:(i.right-i.left)/2,y:(i.bottom-i.top)/2,width:e[0],height:e[1]};return a.y+=(o-e[1])/2,{view:a,size:[e[0],o]}},t.prototype.updateViewportVertices=function(){var t=this.state,e=t.size,n=t.zoom,i=t.viewport,r=this.viewportVertices;r[0]=this.unproject([i.left,e[1]+i.top]),r[1]=this.unproject([e[0]+i.left,e[1]+i.top]),r[2]=this.unproject([e[0]+i.left,i.top]),r[3]=this.unproject([i.left,i.top]);var a=Object(c.b)(r[0],r[1]),l=Object(c.c)(r[2],a),u=Object(s.j)(e[1],n)*o.camera.viewportLimitRatio;if(l>u){var d=u/l;r[2]=[(r[2][0]-r[1][0])*d+r[1][0],(r[2][1]-r[1][1])*d+r[1][1]],r[3]=[(r[3][0]-r[0][0])*d+r[0][0],(r[3][1]-r[0][1])*d+r[0][1]]}},t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"e",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"b",(function(){return u})),n.d(e,"f",(function(){return d}));var i,r=n(22),o=n(1);function a(t,e,n){return{key:e,labelsKey:t.labelsKey+"_"+e,useful:!0,ready:!1,needGenerate:!1,tile:t,status:i.Initial,params:n.clone()}}function s(t,e,n){t.status===i.Generating&&(t.generatedData=e),n&&t.params.setTileIds(n)}function c(t){var e=t.generatedData,n=[];if(!e)return n;for(var i=0;i<e.length;i++){var r=e[i];r.collectorOutput.labels&&n.push({metatileHash:r.metatileHash,labels:r.collectorOutput.labels,styleId:r.styleId})}return n}function l(t,e){t.status=i.Initial,t.generatedData=void 0,void 0!==t.objects&&t.objects.forEach((function(t){return t.clean(e)})),t.objects=void 0,t.ready=!1,t.tile.currentMod===t&&(t.tile.currentMod=void 0)}function u(t){return t.status===i.Initial}function d(t,e,n,a){var s=a.renderer;switch(t.status){case i.Initial:t.useful&&(t.status=i.Loading);break;case i.Loading:t.useful?t.tile.serverMetadata&&(t.status=i.Loaded):t.status=i.Initial;break;case i.Loaded:(function(t,e,n){switch(t.tile.type){case"terrain":return Boolean(t.useful&&t.tile.serverMetadata&&function(t,e,n){for(var i=n.assetManager,r=n.modelManager,a=0;a<t.length;a++){var s=t[a],c=s.regionId,l=s.metatileHash;if(!i.getMetatile(l)||e.styleZoom>o.loadModelsInfoStyleZoom&&!r.isModelsInfoLoaded(c))return!1}return!0}(t.tile.serverMetadata,e,n));case"traffic":return Boolean(t.useful&&t.tile.serverMetadata);case"raster":case"geojson":return Boolean(t.useful);default:return!1}})(t,n,a)&&(t.status=i.Generating,t.needGenerate=!0);break;case i.Generating:t.generatedData&&(t.status=i.Generated,t.ready=!0,t.objects=t.generatedData.map((function(e){var n=e.collectorOutput.data;return new r.a(t.tile.type,n,s,t.tile.coords)})),e.add(t.key,t))}}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Generating=3]="Generating",t[t.Generated=4]="Generated"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"a",(function(){return h}));var i=n(55),r=function(t){return t},o=null,a=!1,s=new Promise((function(t){o=function(){a=!0,t()}})),c=new Set(["ar"]);function l(t,e,n){var r=e.workers.labeling;"always-off"===t||"depends-on-language"===t&&!c.has(n)?r.markRtlPluginLoaded().then((function(){null!==o&&o()})):fetch(i.f,{integrity:i.e}).then((function(t){return t.text()})).then((function(t){return Promise.all([r.loadRtlPlugin(t),Promise.resolve(h(t))])}))}var u,d,f,h=(u=function(t){new Function(t)(),r=globalThis.mapglRtlPlugin.processRtl,o&&o()},f=!1,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f?d:(f=!0,d=u.apply(this,t))})},function(t,e,n){"use strict";n.d(e,"c",(function(){return b})),n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return x})),n.d(e,"d",(function(){return S}));var i=n(70),r=n.n(i),o=n(84),a=n(54),s=function(){this.name="",this.range="",this.glyphs={}},c=function(){this.id=0,this.range=0,this.bitmap=null,this.top=0,this.left=0,this.advance=0,this.x=0,this.y=0,this.width=0,this.height=0,this.texTop=0,this.texLeft=0,this.texRight=0,this.texBottom=0},l=function(t,e){this.stacks=t.readFields(u,[],e)};function u(t,e,n){if(1===t){var i=n.readMessage(d,new s);e.push(i)}}function d(t,e,n){switch(t){case 1:e.name=n.readString();break;case 2:e.range=n.readString();break;case 3:var i=n.readMessage(f,new c);e.glyphs[i.id]=i}}function f(t,e,n){switch(t){case 1:e.id=n.readVarint(),e.range=Object(a.b)(e.id);break;case 2:e.bitmap=n.readBytes();break;case 3:e.width=n.readVarint()+6;break;case 4:e.height=n.readVarint()+6;break;case 5:e.left=n.readSVarint()-3;break;case 6:e.top=n.readSVarint()+17+3;break;case 7:e.advance=n.readVarint()}}var h=n(39),p=n(7),m=n(1),v=n(37),_=n(4),y=n(6),g=function(t,e,n){for(var i=[],r=0,o=0;o<t.length;o++){var a=t.charCodeAt(o),s=e&&e[a];s?(i.push(s),r+=s.advance):a!==m.fonts.bomCharCode&&Object(v.b)(t[o],a)}this.glyphs=i,this.width=r+m.fonts.baseSize*n*(t.length-1)};function b(t,e,n){for(var i={lines:[],maxWidth:0},r=t.split("\n"),o=0;o<r.length;o++){var a=new g(r[o],n,e);i.lines.push(a),a.width>i.maxWidth&&(i.maxWidth=a.width)}return i}function w(t,e,n){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(!n.has(t,o))return!1}return!0}function x(t,e,n){if(void 0!==t){var i=Object(_.j)(t,e);if(""!==i)return void 0===n.fontNameToIndex[i]?y.b:i}}function S(t){var e=new l(new r.a(new Uint8Array(t))).stacks[0].glyphs,n=function(t){for(var e=[],n=new o.a(512,512,{autoResize:!0}),i=Object.keys(t),r=0;r<i.length;r++)(a=t[i[r]]).bitmap&&e.push({glyph:a,width:a.width,height:a.height});for(n.pack(e,{inPlace:!0}),n.shrink(),r=0;r<e.length;r++){var a;(a=e[r].glyph).x=e[r].x,a.y=e[r].y}return{width:Object(p.l)(n.w),height:Object(p.l)(n.h)}}(e),i=n.width,a=n.height;return function(t,e,n){for(var i=Object.keys(t),r=0;r<i.length;r++){var o=t[i[r]];o.bitmap&&(o.texTop=Object(h.c)(o.y/n),o.texLeft=Object(h.c)(o.x/e),o.texBottom=Object(h.c)((o.y+o.height)/n),o.texRight=Object(h.c)((o.x+o.width)/e))}}(e,i,a),{glyphData:e,bitmap:function(t,e,n){for(var i=new Uint8Array(e*n),r=Object.keys(t),o=0;o<r.length;o++){var a=t[r[o]];if(a.bitmap)for(var s=0;s<a.height;s++)for(var c=e*(a.y+s)+a.x,l=a.width*s,u=0;u<a.width;u++)i[c+u]=a.bitmap[l+u]}return i.buffer}(e,i,a),width:i,height:a}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(26),r=n(94),o=n(23),a=Object(i.a)({symbol:"line",sinks:{solid:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int8Array(e,4),t.views.normal=new Int8Array(e,6),t.views.localID=new Uint32Array(e,8)},packObjectAttributes:function(t,e,n,i,r){return Object(o.c)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,o,s){var c=!Number.isNaN(o[i.beginningIsCut])&&0!==o[i.beginningIsCut],l=!Number.isNaN(o[i.endingIsCut])&&0!==o[i.endingIsCut],u=t.idIndexer.getIndex(o[i.id],e,n,o[i.db_sublayer]),d=t.getBucket(n.type,"solid",a.sinks.solid.packObjectAttributes(e,n.innerId,n.dataKeys,i,o),a.sinks.solid.binder);Object(r.a)(d,s[0],s[1],s[0].length,!c,!l,u)}})},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return d}));var i=n(2),r=n(12);function o(t,e){return{a:t[1]-e[1],b:e[0]-t[0],c:t[0]*e[1]-e[0]*t[1]}}function a(t,e){return Math.abs(e.a*t[0]+e.b*t[1]+e.c)/Math.sqrt(e.a*e.a+e.b*e.b)}function s(t,e,n){var r=o(t,e),a=r.a,s=r.b,c=r.c;return i.j(-(s*n+c)/a,n,0)}var c=r.e(),l=r.e();function u(t,e){var n=t[0];r.i(c),r.f(c,n);for(var a,u,d,f,h,p=[n],m=[p],v=1;v<t.length;){var _=t[v],y=!1,g=_;r.d(l,c),r.f(l,g),l.max[0]-l.min[0]>e&&(a=l.max[0]===g[0]?l.min[0]+e:l.max[0]-e,d=(u=o(n,g)).a,f=u.b,h=u.c,g=i.j(a,-(d*a+h)/f,0),y=!0),y&&(r.d(l,c),r.f(l,g)),l.max[1]-l.min[1]>e&&(g=s(n,g,l.max[1]===g[1]?l.min[1]+e:l.max[1]-e),y=!0),y?(p.push(g),r.i(c),r.f(c,g),p=[g],m.push(p),n=g):(p.push(_),r.f(c,_),n=_,v++)}return m}function d(t,e,n){var i=t[0]-e[0],r=t[1]-e[1],o=n[0]-e[0],a=n[1]-e[1],s=o*o+a*a,c=0!==s?(i*o+r*a)/s:0;return c<0?e:c>1?n:[e[0]+c*o,e[1]+c*a]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return l}));var i=n(1),r=new Set(i.commercialSublayers),o=new Set(i.personalSublayers),a=new Set(i.landmarkPoiSublayers);function s(t){return r.has(t)}function c(t){return o.has(t)}function l(t){return a.has(t)}},function(t,e,n){"use strict";function i(t,e,n){var i,r,o,a,s=function(){var c=Date.now()-o;c<e&&c>=0?i=setTimeout(s,e-c):(i=null,n||(a=t.apply(void 0,r),i||(r=null)))};return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];r=c,o=Date.now();var u=n&&!i;return i||(i=setTimeout(s,e)),u&&(a=t.apply(void 0,r),r=null),a}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return c}));var i=Math.pow(2,32)-1,r=i-1,o={},a=["main","parser","labeling"],s=0;a.forEach((function(t){var e=s+Math.floor(r/a.length);o[t]={min:s,max:e-1e6},s=e}));var c=function(){function t(t){this.minIdentifyIndex=o[t].min,this.maxIdentifyIndex=o[t].max,this.index=this.minIdentifyIndex,this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={}}return t.prototype.getIndex=function(t,e,n,r,o,a,s){var c,l,u;if(void 0===a&&(a=0),!Array.isArray(t))return i;var d=this.index+this.ids.length/2;if(this.ids.push(t[0],t[1]),this.phases.push(n.renderIndex),this.sublayers.push(null!==(l=null===(c=null==s?void 0:s.dictionaries.db_sublayer)||void 0===c?void 0:c[r])&&void 0!==l?l:NaN),this.styleIds.push(e),this.layerIds.push(n.innerId),this.instanceIds.push(a),"string"==typeof o){var f=null===(u=null==s?void 0:s.dictionaries.db_object_class)||void 0===u?void 0:u[o];f?this.objectClasses.push(f):(this.objectClasses.push(0),this.strings[d]={objectClass:o})}else this.objectClasses.push(i);return d},t.prototype.getPacked=function(){var t=new Uint32Array(this.ids).buffer,e=new Float32Array(this.phases).buffer,n=new Uint32Array(this.sublayers).buffer,i=new Uint16Array(this.styleIds).buffer,r=new Uint32Array(this.layerIds).buffer,o=new Uint8Array(this.instanceIds).buffer,a=new Uint32Array(this.objectClasses).buffer,s=this.index,c=this.index+this.ids.length-1;this.index=this.index+this.ids.length,this.index>this.maxIdentifyIndex&&(this.index=this.minIdentifyIndex);var l=this.strings;return this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={},{idBuffer:t,startIndex:s,endIndex:c,phaseBuffer:e,sublayerBuffer:n,styleIdBuffer:i,layerIdBuffer:r,instanceIdBuffer:o,objectClassBuffer:a,strings:l}},t}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var i=[255,0,0,255];function r(t){return"string"==typeof t&&/(#(?:[0-9a-f]{2}){2,4}|#[0-9a-f]{3}|(?:rgba?|hsla?)\((?:\d+%?(?:,|\s)+){2,3}[\s\/]*[\d\.]+%?\))/i.test(t)}function o(t){return t instanceof Array&&4===t.length&&"number"==typeof t[0]}function a(t){var e=t.toLowerCase(),n=i;switch(e[0]){case"#":n=function(t){if(!new RegExp("^#[a-f0-9]{"+(t.length-1)+"}$").test(t)||![4,5,7,9].includes(t.length))return i;var e=function(t){return t.length<7?t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(5===t.length?t[4]+t[4]:"ff"):7===t.length?t+"ff":t}(t);return[parseInt(e[1]+e[2],16),parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16),parseInt(e[7]+e[8],16)]}(e);break;case"h":n=function(t){var e=s(t);e[0]/=360,e[1]/=100,e[2]/=100;var n=function(t,e,n){if(0===e)return[255*n,255*n,255*n];var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i;return[255*c(r,i,t+1/3),255*c(r,i,t),255*c(r,i,t-1/3)]}(e[0],e[1],e[2]),i=n[0],r=n[1],o=n[2],a=void 0!==e[3]?255*e[3]:255;return[Math.round(i),Math.round(r),Math.round(o),Math.round(a)]}(e);break;case"r":n=function(t){var e=s(t),n=e[0],i=e[1],r=e[2],o=e[3],a=void 0!==o?255*o:255;return[Math.round(n),Math.round(i),Math.round(r),Math.round(a)]}(e)}return n}function s(t){return t.split("(")[1].split(")")[0].split(",").map((function(t){return parseFloat(t)}))}function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));var i=n(1);function r(t){for(var e="",n=0;n<t.length;){var i=t[n++];if(i>127){if(i>191&&i<224){if(n>=t.length)return console.error("Incomplete 2-byte sequence"),e;i=(31&i)<<6|63&t[n]}else if(i>223&&i<240){if(n+1>=t.length)return console.error("Incomplete 3-byte sequence"),e;i=(15&i)<<12|(63&t[n])<<6|63&t[++n]}else{if(!(i>239&&i<248))return console.error("Unknown multibyte start 0x"+i.toString(16)+" at index "+(n-1)),e;if(n+2>=t.length)return console.error("Incomplete 4-byte sequence"),e;i=(7&i)<<18|(63&t[n])<<12|(63&t[++n])<<6|63&t[++n]}++n}if(i<=65535)e+=String.fromCharCode(i);else{if(!(i<=1114111))return console.error("Code point 0x"+i.toString(16)+" exceeds UTF-16 reach"),e;i-=65536,e+=String.fromCharCode(i>>10|55296),e+=String.fromCharCode(1023&i|56320)}}return e}function o(t,e){if(t.length<=e||-1!==t.indexOf("\n"))return t;var n=[];return t.split(" ").forEach((function(t){var i=n.length-1;0===n.length||n[i].length+t.length>=e?n.push(t):n[i]+=" "+t})),n.join("\n")}function a(t){return Math.floor(t/256)}function s(t){var e=new Set;return t.forEach((function(t){if(void 0!==t)for(var n=0;n<t.length;n++){var r=t.charCodeAt(n);r!==i.fonts.bomCharCode&&e.add(a(r))}})),Array.from(e)}},function(t,e,n){"use strict";n.d(e,"h",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"d",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"e",(function(){return f}));var i=n(58),r=i.a?"%TILESERVER%":"tile{subdomain}.maps.2gis.com",o=i.a?"%TRAFFICSERVER%":"traffic0.edromaps.2gis.com",a=i.a?"%FLOORSSERVER%":"https://floors.api.2gis.ru",s="https://styles.api.2gis.com",c="https://mapgl.2gis.com/api/fonts",l="https://disk.2gis.com/styles/{id}",u=i.a?"%KEYSERVER%":"https://keys.api.2gis.com/public/v1/keys/{keyID}/services/mapgl-js-api",d=i.a?"%RTLPLUGIN%":"https://mapgl.2gis.com/api/js/plugins/rtl-v1.0.0.js",f=i.a?"%RTLPLUGINHASH%":"sha512-YAPPEl+Atvsm/cMkrfWefmlQLAlKTGaqFjIkI6urAnDgam2uTVEVVnZZEhHCa91JjYYxa5yr4Ndb4Vl3NUovfA=="},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var i=n(54),r=n(25),o=n(11),a=n(3),s=n(32),c=n(52);function l(t){return"labelLine"===t.type||"point"===t.type||"oneWayLine"===t.type}function u(t,e,n,i,r){for(var o=[],a=0,c=t;a<c.length;a++)for(var u=c[a],f=0,h=u.labels;f<h.length;f++){var p=h[f],m=n.getStyle(p.styleId);if(m){var v=m.layersById[p.layerId];if(v&&l(v)){var _=new d(p,v,e,u.metatileHash);switch(p.type){case s.a.Point:_.setSpecificPointAttributes(p,i,r);break;case s.a.Line:_.setSpecificLineAttributes(p,i,r);break;case s.a.OneWayLine:_.setSpecificOneWayAttributes(p)}o.push(_)}else console.error("Not found layer: "+p.layerId+" in style "+p.styleId+" in unpackPreLabelingResult")}else console.error("Not found style "+p.styleId+" in unpackPreLabelingResult")}return o}var d=function(){function t(t,e,n,i){this.rtlProcessed=!1,this.labelingElements=[],this.id="",this.idLo=0,this.idHi=0,this.outdated=!1,this.detailLevel=0,this.labelPriority=0,this.label="",this.ranges=[],this.pointType=o.b.Common,this.iconPriority=0,this.identifyIndex=c.b,this.identifyPoiLabelIndex=c.b,this.hovered=0,this.label2Priority=0,this.anchorWorld=[0,0,0],this.componentDistanceStartWorld=0,this.componentDistanceEnd=0,this.componentDistanceStart=0,this.objectLengthWorld=0,this.layer=e,this.styleId=t.styleId,this.source=n,this.sourceId=t.sourceId,this.metatileHash=i,this.tileData=t.tileData,this.labelPriority=t.labelPriority,this.detailLevel=t.tileCoords[2],this.idLo=t.id[0],this.idHi=t.id[1],this.id=Object(r.a)(this.idLo,this.idHi)}return t.prototype.setSpecificPointAttributes=function(t,e,n){if("point"!==this.layer.type)throw new Error("Label: layer type is not a point");var r=this.layer.style;this.pointType=t.pointType,this.label2Priority=t.label2Priority,this.iconPriority=t.iconPriority,this.identifyIndex=t.identifyIndex,this.identifyPoiLabelIndex=t.identifyPoiLabelIndex,this.hovered=t.hovered;var o={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=Object(i.d)(Object(s.c)(r.textField,o),r.textMaxLengthPerLine),r.textField2&&(this.label2=Object(i.d)(Object(s.c)(r.textField2,o),r.textMaxLengthPerLine)),"point"===this.layer.type&&r.iconTextField&&(this.iconLabel=Object(i.d)(Object(s.c)(r.iconTextField,o),r.textMaxLengthPerLine));var c=Object(a.e)(t.tileCoords);Object(a.C)(this.anchorWorld,t.vertex,c),"point"!==this.layer.type||this.layer.style.allowElevation||(this.anchorWorld[2]=0)},t.prototype.setSpecificLineAttributes=function(t,e,n){if("labelLine"!==this.layer.type)throw new Error("Label: layer type is not a labelLine");var i={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=Object(s.c)(this.layer.style.textField,i);var r=Object(a.e)(t.tileCoords);this.anchorWorld=[];for(var o=[0,0,0],c=[0,0,0],l=0;l<t.vertices[0].length;l++)o[0]=t.vertices[0][l],o[1]=t.vertices[1][l],Object(a.C)(c,o,r),this.anchorWorld.push(c[0],c[1],c[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=Object(a.B)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=Object(a.B)(t.objectLength,t.tileCoords[2])},t.prototype.setSpecificOneWayAttributes=function(t){var e=Object(a.e)(t.tileCoords);this.anchorWorld=[];for(var n=[0,0,0],i=[0,0,0],r=0;r<t.vertices[0].length;r++)n[0]=t.vertices[0][r],n[1]=t.vertices[1][r],Object(a.C)(i,n,e),this.anchorWorld.push(i[0],i[1],i[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=Object(a.B)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=Object(a.B)(t.objectLength,t.tileCoords[2])},t.prototype.updateRanges=function(){this.ranges=Object(i.c)([this.label,this.label2,this.iconLabel])},t}()},function(t,e,n){"use strict";function i(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),n.responseType="arraybuffer",t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},new ArrayBuffer(0))},n.onload=function(){n.status>=200&&n.status<300&&n.response?e(void 0,n.response):e({status:n.status,message:n.statusText},new ArrayBuffer(0))},n.send(),n}function r(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},{})},n.onload=function(){if(0===n.response.byteLength&&200===n.status)return e({status:0,message:"No content"},{});if(n.status>=200&&n.status<300&&n.response&&n.response.length){var i=void 0;try{i=JSON.parse(n.response),e(void 0,i)}catch(n){e({status:0,message:"Json parse data error from url "+t.url},{})}}else e({status:n.status,message:n.statusText},{})},n.send(),n}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=!1},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(50),r=n(1),o=n(67),a=n(18),s=n(35),c=n(4),l=n(52),u=n(23),d=n(11),f=n(32),h=function(t,e,n,h,p,m,v,_,y,g,b){var w=v.tileProps;if(function(t,e,n,l,u,d,f){var h=l.tileProps,p=e.rasterSets,m=e.icons,v=Object(s.a)(d),_=Object(c.a)(n.style.iconWidth),y=Object(i.a)(u[h.db_sublayer]),g=Object(i.b)(u[h.db_sublayer]);if(y||g){if(f)return;var b=y?r.commercialPoi.rasterSizes:r.landmarkRasterSizes,w=Object(o.b)(u[h.id],b,u[h.db_region],h.url_src?u[h.url_src]:void 0);t.atlasPacker.addNewRasterSet(e.id,w),t.atlasPacker.pack(w,_,v)}else Object(c.a)(n.style.iconImage).forEach((function(i){if(i.length){var r=n.style.iconAnchor,o=p.byKey[Object(a.b)(i,r[0],r[1])];if(!o)throw new Error("Not found raster set with image "+i+", anchorX: "+r[0]+", anchorY: "+r[1]);if(o.isSvg){var s=m[i],c=s?[{w:s.width,h:s.height}]:_.map((function(t){return{w:t,h:t}}));t.atlasPacker.packSvg(o,c,v),f&&o.rasters.forEach((function(n){return t.atlasPacker.addRastersToLoad(e.id,n)}))}}}))}(t,e,n,v,_,g,b),!b){var x=_[w.id],S=l.b,I=l.b;Number.isNaN(x)||(S=t.idIndexer.getIndex(x,e.id,n,_[w.db_sublayer],_[w.db_object_class],0,v),I=t.idIndexer.getIndex(x,e.id,n,_[w.db_sublayer],_[w.db_object_class],1,v));var j=d.b.Common;Object(i.a)(_[w.db_sublayer])?j=d.b.Commercial:Object(i.b)(_[w.db_sublayer])&&(j=d.b.Landmark);var O={type:f.a.Point,pointType:j,styleId:e.id,layerId:n.innerId,sourceId:p,tileCoords:h,id:_[w.id],identifyIndex:S,identifyPoiLabelIndex:I,labelPriority:Object(f.b)(_[w.labelPriority],0),label2Priority:Object(f.b)(_[w.label2Priority],0),iconPriority:Object(f.b)(_[w.iconPriority],0),hovered:Object(f.b)(_[w.hovered],0),vertex:[y[0][0],y[1][0],3===y.length?y[2][0]:0],tileData:Object(u.c)([],n.dataKeys,w,_,m)};t.addLabel(O)}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var i=n(15),r={point:{point:!0,heatmap:!0},polygon:{polygon:!0,polygonExtrusion:!0},line:{line:!0,lineExtrusion:!0,labelLine:!0,dashedLine:!0,oneWayLine:!0}};function o(t,e){return!!r[t][e]}function a(t){for(var e=t.vertices[0],n=t.vertices[1],i=0,r=0;r<e.length-1;r++)i+=Math.hypot(e[r]-e[r+1],n[r]-n[r+1]);return i}function s(t,e){var n=new Set(e[0].map((function(n,i){return e[0][i]===t[0]&&t[1]===e[1][i]?i:-1})));return Array.from(n)}function c(t,e){var n=s([t[0][0],t[1][0]],e),i=s([t[0][1],t[1][1]],e),r=s([t[0][2],t[1][2]],e);n.forEach((function(e){return i.forEach((function(n){return r.forEach((function(i){!function(t,e,n,i){e>=0&&n>=0&&1===Math.abs(e-n)&&(t[2][0]=1),n>=0&&i>=0&&1===Math.abs(n-i)&&(t[2][1]=1),e>=0&&i>=0&&1===Math.abs(e-i)&&(t[2][2]=1)}(t,e,n,i)}))}))}))}function l(){return Object(i.a)(["id","db_label","db_label2","selected","hovered","componentDistanceStart","objectLength","beginningIsCut","endingIsCut"],["Commercial_poi_default"])}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n(0),r=n(3),o=n(85),a=n(27),s=n(45),c=n(99),l=n(11),u=n(28),d=n(104),f=n(33);function h(t,e,n,i,r){if(!e.disableHoverStyles){for(var o in n.tiles){var s=n.tiles[o];Object(a.m)(t,e,s,i,r)}t.labeler.disableThrottleUpdateOnce()}}var p=function(){function t(t,e,n,i,r,o,a){this.modules=r,this.mapState=o,this.prevStyleState=o.styleState,this.sourceCore=a,this.gridState=Object(u.a)(a.type,a.id,t,e,n,i,r,this.mapState)}return t.prototype.destroy=function(){Object(u.g)(this.gridState)},t.prototype.redraw=function(){Object(u.g)(this.gridState),Object(o.a)(this.gridState,this.mapState,this.modules.camera.viewportVertices)},t.prototype.getDisplayedIdentifyData=function(){var t,e,n=[],i=function(i){var o=r.gridState.displayedMods[i];null===(t=o.generatedData)||void 0===t||t.concat((null===(e=o.tile.hover)||void 0===e?void 0:e.generatedData)||[]).forEach((function(t){return n.push({ids:t.collectorOutput.identifyIds,metatileHash:t.metatileHash,sourceId:o.tile.sourceId,tileKey:o.tile.key})}))},r=this;for(var o in this.gridState.displayedMods)i(o);return n},t.prototype.getDisplayedLabelsKeys=function(){var t=[];for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e];t.push(n.labelsKey)}return t},t.prototype.getViewportTiles=function(){for(var t=[],e=this.gridState.viewportTiles,n=0;n<e.length;n++){var i=this.gridState.tiles[e[n]];i&&t.push(i)}return t},t.prototype.viewportTilesReady=function(){return Object(u.j)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.displayedTilesAnimationFinished=function(){for(var t in this.gridState.displayedMods){var e=this.gridState.displayedMods[t];if(e.objects)for(var n=0,i=e.objects;n<i.length;n++)if(!i[n].tickerFinished(this.mapState))return!1}return!0},t.prototype.setSelectedIds=function(t){void 0===t&&(t=[]),function(t,e,n,i,r){var o;for(var s in n.selectedIds=i,n.tilesAppearance=f.a.WaitingAll,Object(u.i)(n),n.tiles){var c=n.tiles[s];Object(a.m)(t,e,c,r,null===(o=c.hover)||void 0===o?void 0:o.id,!0)}}(this.modules,this.mapState,this.gridState,t,this.sourceCore.id)},t.prototype.setHoverId=function(t){h(this.modules,this.mapState,this.gridState,this.sourceCore.id,t)},t.prototype.resetHoverId=function(){h(this.modules,this.mapState,this.gridState,this.sourceCore.id)},t.prototype.onSourceDataChange=function(){(function(t){t.tilesAppearance=f.a.WaitingAll,Object.keys(t.tiles).forEach((function(e){Object(a.i)(t.tiles[e])})),Object(u.i)(t)})(this.gridState),this.modules.workers.labeling.markSourceLabelsAsOutdated(this.sourceCore.id)},t.prototype.getTileCount=function(){var t=0;for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e].objects;void 0!==n&&(t+=n.length)}return t},t.prototype.isBlank=function(){for(var t=0,e=this.gridState.viewportTiles;t<e.length;t++){var n=e[t],i=this.gridState.tiles[n],r=i.serverMetadata;if(void 0!==r&&0!==r.length){var o=Object(a.h)(i);if(o&&o.ready)return!1}}return!0},t.prototype.updateViewport=function(){Object(o.a)(this.gridState,this.mapState,this.modules.camera.viewportVertices)},t.prototype.update=function(){var t=Object(i.a)({},this.gridState.displayedMods);this.mapState.styleState!==this.prevStyleState&&(Object(u.i)(this.gridState),this.prevStyleState=this.mapState.styleState),Object(d.a)(this.gridState,this.mapState,this.modules),this.fetch(Object(u.d)(this.gridState)),this.abortFetch(Object(u.c)(this.gridState)),this.generate(Object(u.e)(this.gridState)),this.clearTiles(Object(u.f)(this.gridState)),Object(u.h)(this.modules.tileManager,this.mapState,this.gridState,t)},t.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return Object(r.a)(e.mapState.center,t,n)})).forEach((function(t){e.sourceCore.fetchTile(t.coords,e.mapState).then((function(e){t.status===a.a.Loading&&(t.serverMetadata=e)}))}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.sourceCore.abortTileFetch(t.coords)}))},t.prototype.generate=function(t){var e=this,n=[];t.sort((function(t,n){return Object(r.a)(e.mapState.center,t,n)})).forEach((function(t){var i=Object(a.g)(t);if(i){var r={tileCoords:t.coords,selectedIds:i.params.get("selectedIds")||[]};n.push(r),e.sourceCore.generateTile(e.mapState,r.tileCoords,r.selectedIds,devicePixelRatio).then((function(n){var r=n.results;r.forEach((function(t){var n=t.styleId,i=t.metatileHash,r=t.regionId,o=t.collectorOutput,a=o.packedRasters,s=o.rastersToLoad,l=o.floorHidingMap;void 0!==a&&e.modules.assetManager.prepareRasters(n,a),e.modules.assetManager.loadRasters(s),e.modules.floorManager.prepareFloors(r,i,new c.a(l),e.sourceCore.type)})),t.idSet=Object(a.e)(r),Object(s.a)(i,r,t.idSet),e.modules.labeler.addTileLabels(i.labelsKey,l.c.Tile,Object(s.e)(i))}))}})),"terrain"===this.sourceCore.type&&(n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.selectedIds,devicePixelRatio,{generateOnlySelectedPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})),n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.selectedIds,devicePixelRatio,{generateOnlyHoveredPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.sourceCore.deleteTile(i.coords),delete this.gridState.tiles[i.key]}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(26),r=n(25),o=n(38),a=n(66),s=n(52),c=n(23),l=[NaN,NaN];function u(t,e,n,i,r,o){return Object(c.c)([t,e,n[0],n[1]],i,r,o)}var d=function(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:Object(r.a)(t[2],t[3]),tileData:t.slice(4)}},f=Object(i.a)({symbol:"polygon",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.localID=new Uint32Array(e,4)},packObjectAttributes:u,unpackObjectAttributes:d},stroke:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,4)},packObjectAttributes:u,unpackObjectAttributes:d}},generate:function(t,e,n,i,r,c,u){var d=c[0],m=c[1],v=c[2],_=r[i.id],y=!Number.isNaN(_)&&u&&u.has(_)?_:l,g=r[i.hovered]?s.b:t.idIndexer.getIndex(_,e,n,r[i.db_sublayer]);!function(t,e,n,i,r){var o=t.indices.buffer,a=t.indices.offset,s=t.elements.offset,c=s;h(t,s++,n[0],i[0],r),h(t,s++,n[1],i[1],r);for(var l=2;l<e;l++)p(o,a,c,l),h(t,s++,n[l],i[l],r),a+=3;t.elements.offset=s,t.indices.offset=a}(t.getBucket(n.type,"fill",f.sinks.fill.packObjectAttributes(e,n.innerId,y,n.dataKeys,i,r),f.sinks.fill.binder),d.length,d,m,g),function(t,e,n,i,r){for(var s=0;s<e;s++){var c=Object(o.a)(s,e);if(1===r[c]){var l=Object(o.a)((s+1)%e,e);Object(a.a)(t,n[c],i[c],0,n[l],i[l],0)}}}(t.getBucket(n.type,"stroke",f.sinks.stroke.packObjectAttributes(e,n.innerId,y,n.dataKeys,i,r),f.sinks.stroke.binder),d.length,d,m,v)}});function h(t,e,n,i,r){e*=4,t.views.position[e]=n,t.views.position[e+1]=i,e>>=1,t.views.localID[e]=r}function p(t,e,n,i){i%2==0?(t[e]=n+i-2,t[e+1]=n+i-1,t[e+2]=n+i):(t[e]=n+i-1,t[e+1]=n+i-2,t[e+2]=n+i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26),r=n(4),o=Object(i.a)({symbol:"heatmap",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Float32Array(e)},packObjectAttributes:function(t,e,n,i){return[t,e,n,i]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],rampTextureIndex:t[3],tileData:t.slice(4)}}},framebuffer:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.weight=new Float32Array(e,4),t.views.widen=new Int8Array(e,8)},packObjectAttributes:function(t,e){return[t,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,a){var l=i[0],u=i[1],d=Number(Object(r.h)(n.style.weight,a));if(Number.isNaN(d))console.error("Can't resolve style.weight to number");else for(var f=t.getBucket(n.type,"framebuffer",o.sinks.framebuffer.packObjectAttributes(e,n.innerId),o.sinks.framebuffer.binder),h=0;h<l.length;h++)c(f,0,1,2,2,1,3),s(f,l[h],u[h],-1,-1,d),s(f,l[h],u[h],1,-1,d),s(f,l[h],u[h],-1,1,d),s(f,l[h],u[h],1,1,d)},generateTexture:function(t,e,n,i,r){var s=[-1,1,1,-1],c=[-1,-1,1,1],l=t.getBucket(n.type,"fill",o.sinks.fill.packObjectAttributes(e,n.innerId,i,r),o.sinks.fill.binder),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+0,c[l+4]=e+2,c[l+5]=e+3,t.offset=l+6}(l.indices,u),a(l,u++,s[0],c[0]),a(l,u++,s[1],c[1]),a(l,u++,s[2],c[2]),a(l,u++,s[3],c[3]),l.elements.offset=u}});function a(t,e,n,i){var r=2*e;t.views.position[r]=n,t.views.position[r+1]=i}function s(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride,s=a>>1,c=s>>1;t.views.position[s]=e,t.views.position[s+1]=n,t.views.weight[c]=o,t.views.widen[a]=i,t.views.widen[a+1]=r,t.elements.offset++}function c(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+e,l[u+1]=d+n,l[u+2]=d+i,l[u+3]=d+r,l[u+4]=d+o,l[u+5]=d+a,c.offset=u+6}},function(t,e,n){"use strict";function i(t,e,n){n=n||2;var i,s,c,l,u,h,p,v=e&&e.length,_=v?e[0]*n:t.length,y=r(t,0,_,n,!0),g=[];if(!y||y.next===y.prev)return g;if(v&&(y=function(t,e,n,i){var a,s,c,l=[];for(a=0,s=e.length;a<s;a++)(c=r(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i,!1))===c.next&&(c.steiner=!0),l.push(m(c));for(l.sort(d),a=0;a<l.length;a++)n=o(n=f(l[a],n),n.next);return n}(t,e,y,n)),t.length>80*n){i=c=t[0],s=l=t[1];for(var b=n;b<_;b+=n)(u=t[b])<i&&(i=u),(h=t[b+1])<s&&(s=h),u>c&&(c=u),h>l&&(l=h);p=0!==(p=Math.max(c-i,l-s))?1/p:0}return a(y,g,n,i,s,p),g}function r(t,e,n,i,r){var o,a;if(r===P(t,e,n,i)>0)for(o=e;o<n;o+=i)a=j(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=j(o,t[o],t[o+1],a);return a&&g(a,a.next)&&(O(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!g(i,i.next)&&0!==y(i.prev,i,i.next))i=i.next;else{if(O(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function a(t,e,n,i,r,d,f){if(t){!f&&d&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=p(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,c,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<l&&(s++,i=i.nextZ);e++);for(c=l;s>0||c>0&&i;)0!==s&&(0===c||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,c--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(a>1)}(r)}(t,i,r,d);for(var h,m,v=t;t.prev!==t.next;)if(h=t.prev,m=t.next,d?c(t,i,r,d):s(t))e.push(h.i/n),e.push(t.i/n),e.push(m.i/n),O(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?a(t=l(o(t),e,n),e,n,i,r,d,2):2===f&&u(t,e,n,i,r,d):a(o(t),e,n,i,r,d,1);break}}}function s(t){var e=t.prev,n=t,i=t.next;if(y(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(v(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&y(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function c(t,e,n,i){var r=t.prev,o=t,a=t.next;if(y(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,c=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,l=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,u=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=p(s,c,e,n,i),f=p(l,u,e,n,i),h=t.prevZ,m=t.nextZ;h&&h.z>=d&&m&&m.z<=f;){if(h!==t.prev&&h!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==t.prev&&m!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=d;){if(h!==t.prev&&h!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var i=t;do{var r=i.prev,a=i.next.next;!g(r,a)&&b(r,i,i.next,a)&&S(r,a)&&S(a,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(a.i/n),O(i),O(i.next),i=t=a),i=i.next}while(i!==t);return o(i)}function u(t,e,n,i,r,s){var c=t;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&_(c,l)){var u=I(c,l);return c=o(c,c.next),u=o(u,u.next),a(c,e,n,i,r,s),void a(u,e,n,i,r,s)}l=l.next}c=c.next}while(c!==t)}function d(t,e){return t.x-e.x}function f(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n;var c,l=n,u=n.x,d=n.y,f=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&v(o<d?r:a,o,u,d,o<d?a:r,o,i.x,i.y)&&(c=Math.abs(o-i.y)/(r-i.x),S(i,t)&&(c<f||c===f&&(i.x>n.x||i.x===n.x&&h(n,i)))&&(n=i,f=c)),i=i.next}while(i!==l);return n}(t,e);if(!n)return e;var i=I(n,t),r=o(n,n.next);return o(i,i.next),e===n?r:e}function h(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function p(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function v(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function _(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||g(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,i){var r=x(y(t,e,n)),o=x(y(t,e,i)),a=x(y(n,i,t)),s=x(y(n,i,e));return r!==o&&a!==s||!(0!==r||!w(t,n,e))||!(0!==o||!w(t,i,e))||!(0!==a||!w(n,t,i))||!(0!==s||!w(n,e,i))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function x(t){return t>0?1:t<0?-1:0}function S(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function I(t,e){var n=new M(t.i,t.x,t.y),i=new M(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function j(t,e,n,i){var r=new M(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function O(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}t.exports=i,t.exports.default=i,i.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(P(t,0,o,n));if(r)for(var s=0,c=e.length;s<c;s++){var l=e[s]*n,u=s<c-1?e[s+1]*n:t.length;a-=Math.abs(P(t,l,u,n))}var d=0;for(s=0;s<i.length;s+=3){var f=i[s]*n,h=i[s+1]*n,p=i[s+2]*n;d+=Math.abs((t[f]-t[p])*(t[h+1]-t[f+1])-(t[f]-t[h])*(t[p+1]-t[f+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},i.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},function(t,e,n){"use strict";function i(t){return!!t&&"line"===t.type}function r(t){return t.reduce((function(t,e,n){return t[e]=n,t}),{})}function o(t){if(void 0===t||"boolean"==typeof t)return Boolean(t);var e=JSON.stringify(t);return Boolean(e.match(/\["get","(db_)?sublayer"]/))}n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=i.d(),o=i.d(),a=i.d();function s(t,e,n,s,l,u,d){i.r(r,e,n,s),i.r(o,l,u,d),i.s(a,o,r),i.h(o,r)||(i.o(a,a),i.p(a,a,127)),function(t,e,n,i,r,o,a){var s=t.indices.buffer,c=t.indices.offset,l=t.elements.offset;s[c]=l+0,s[c+1]=l+1,s[c+2]=l+3,s[c+3]=l+3,s[c+4]=l+1,s[c+5]=l+2,t.indices.offset=c+6}(t),c(t,r,a,1),c(t,r,a,-1),c(t,o,a,-1),c(t,o,a,1)}function c(t,e,n,i){var r=t.elements.offset*t.elements.stride,o=r>>1;t.views.position[o]=e[0],t.views.position[o+1]=e[1],t.views.position[o+2]=e[2],t.views.directionDistance[r]=n[0],t.views.directionDistance[r+1]=n[1],t.views.directionDistance[r+2]=n[2],t.views.directionDistance[r+3]=i,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return d}));var i=n(0),r=n(41),o=n(18),a=10001,s={w:0,h:0,anchorX:.5,anchorY:.5,x:0,y:0,atlasIndex:0,isPacked:!1},c={};function l(t,e,n,l){var u=Object(o.c)(t[0],t[1]);if(!c[u]){var d=a++;c[u]={type:r.b.Unique,isSvg:!1,index:d,key:u,name:"",fileName:"",id:t,regionId:n,url:l,rasters:e.map((function(t,e){return Object(i.a)(Object(i.a)({},s),{rasterSetIndex:d,rasterIndex:e,w:t,h:t})}))}}return c[u]}function u(t){var e=a++;return{type:r.b.Loaded,isSvg:!1,index:e,key:"loaded-"+e,name:"",fileName:"",rasters:t.map((function(t,n){return Object(i.a)(Object(i.a)({},t),{rasterIndex:n,rasterSetIndex:e})}))}}function d(t,e,n){for(var i,r=1/0,o=0;o<t.length;o++){var a=t[o];if(!n||a.isPacked){var s=Math.abs(a.w-e);s<r&&(i=o,r=s)}}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c}));var i=n(38),r=n(17),o=[.5,.5],a=[.5,.5];function s(t,e,n,o,s){for(var c=t.elements.offset,l=Object(i.a)(e-1,e),h=n[l],p=o[l],m=s?s[l]:0,_=c,y=0;y<e;y++){var g=Object(i.a)(y,e),b=y===e-1,w=n[g],x=o[g],S=s?s[g]:b?0:1;0!==m&&(Object(r.c)(a,h,p,w,x),v(t,c,S,b?_:c+4),u(t.views.position,t.views.distance,c,h,p,w,x),d(t.views.normals,c,Object(r.h)(a[1],-a[0])),f(t.views.direction,c,Object(r.i)(a)),c+=4),h=w,p=x,m=S}t.elements.offset=c}function c(t,e,n,s,c,u){var d=t.elements.offset,f=Object(i.a)(e-2,e),_=Object(i.a)(e-1,e),y=n[_],g=s[_],b=c?c[f]:1,w=c?c[_]:0;Object(r.f)(o,n[f],s[f],y,g);for(var x=o[0],S=o[1],I=0;I<e;I++){var j=Object(i.a)(I,e),O=I===e-1,M=n[j],P=s[j],L=c?c[j]:O?0:1;Object(r.c)(a,y,g,M,P);var T=a[1],k=-a[0];0!==b&&(0===w?(o[0]=x,o[1]=S):l(o,x,S,T,k),Object(r.a)(a,x,S,o[0],o[1]),v(t,d,0,0),h(t.views.position,t.views.distance,d,y,g,u),p(t.views.normals,d,Object(r.i)(o),Object(r.i)(a)),m(t.views.direction,d),d+=4),y=M,g=P,b=w,w=L,x=T,S=k}t.elements.offset=d}function l(t,e,n,i,r){var o,a,s;e*i+n*r>0?(o=e+i,a=n+r,s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(a=e-i,0!=(o=r-n)&&0!==a?(s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(t[0]=0,t[1]=0))}function u(t,e,n,i,r,o,a){t[n*=8]=i,t[n+1]=r,t[n+2]=0,e[n]=0,t[n+8]=i,t[n+9]=r,t[n+10]=0,e[n+8]=-32767,t[n+16]=o,t[n+17]=a,t[n+18]=0,e[n+16]=-32767,t[n+24]=o,t[n+25]=a,t[n+26]=0,e[n+24]=0}function d(t,e,n){t[e*=8]=n,t[e+1]=127,t[e+8]=n,t[e+9]=127,t[e+16]=n,t[e+17]=127,t[e+24]=n,t[e+25]=127}function f(t,e,n){t[e*=8]=n,t[e+1]=0,t[e+8]=n,t[e+9]=0,t[e+16]=n,t[e+17]=0,t[e+24]=n,t[e+25]=0}function h(t,e,n,i,r,o){t[n*=8]=i,t[n+1]=r,t[n+2]=0,e[n]=32767,t[n+8]=i,t[n+9]=r,t[n+10]=0,e[n+8]=-32767,t[n+16]=i,t[n+17]=r,t[n+18]=o,e[n+16]=-32767,t[n+24]=i,t[n+25]=r,t[n+26]=o,e[n+24]=32767}function p(t,e,n,i){t[e*=8]=n,t[e+1]=i,t[e+8]=n,t[e+9]=i,t[e+16]=n,t[e+17]=i,t[e+24]=n,t[e+25]=i}function m(t,e){t[e*=8]=0,t[e+1]=127,t[e+8]=0,t[e+9]=127,t[e+16]=0,t[e+17]=127,t[e+24]=0,t[e+25]=127}function v(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset;r[o++]=e,r[o++]=e+1,r[o++]=e+3,r[o++]=e+3,r[o++]=e+1,r[o++]=e+2,0!==n&&(r[o++]=e+2,r[o++]=i+1,r[o++]=i+0),t.indices.offset=o}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t=0),this.index=t,this.keysMap={}}return t.prototype.getIndex=function(){var t=this.index;return this.index+=1,t},t.prototype.getUniqueIndex=function(t){return void 0===this.keysMap[t]&&(this.keysMap[t]=this.index,this.index+=1),this.keysMap[t]},t.prototype.getIndexedKeys=function(){return this.keysMap},t}()},function(t,e,n){"use strict";t.exports=r;var i=n(110);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;r>=t;r--)n.buf[r+i]=n.buf[r]}function l(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function u(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function _(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function y(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function g(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=y(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=y(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return s(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return s(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,n){return o.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",r=e;r<n;){var o,a,s,c=t[r],l=null,u=c>239?4:c>223?3:c>191?2:1;if(r+u>n)break;1===u?c<128&&(l=c):2===u?128==(192&(o=t[r+1]))&&(l=(31&c)<<6|63&o)<=127&&(l=null):3===u?(o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&((l=(15&c)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),r+=u}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,i;if(t>=0?(n=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,r,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){i>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):r=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(t[n++]=239,t[n++]=191,t[n++]=189,r=null);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&c(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var i=this.pos-n;i>=128&&c(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,r.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return d}));var i=n(0),r=n(3),o={db_id:"id",db_hidden_by_plan_building_id:"hiddenByPlanBuildingId",tech_db_beginning_is_cut:"beginningIsCut",tech_db_ending_is_cut:"endingIsCut",tech_db_previous_point_x:"previousPointX",tech_db_previous_point_y:"previousPointY",tech_db_next_point_x:"nextPointX",tech_db_next_point_y:"nextPointY",tech_db_object_length:"objectLength",tech_db_component_distance_start:"componentDistanceStart",db_label_priority:"labelPriority",db_label2_priority:"label2Priority",db_icon_priority:"iconPriority",tech_db_component_distance_end:"componentDistanceEnd"},a=function(t){var e;return null!==(e=o[t])&&void 0!==e?e:t},s={objectClass:"db_object_class",sublayer:"db_sublayer"};function c(t){var e;return null!==(e=s[t])&&void 0!==e?e:t}var l={Class:"db_class",DisputePosition:"db_dispute_position",ObjectClass:"db_object_class",ParkingType:"db_parking_type",Sublayer:"db_sublayer",Subsublayer:"db_subsublayer"},u=function(t){var e,n,i;t.enumerationValues?t.enumerationValues=Object.keys(t.enumerationValues).reduce((function(e,n){return e[function(t){var e;return null!==(e=l[t])&&void 0!==e?e:t}(n)]=t.enumerationValues[n],e}),{}):t.enumerationValues={db_class:null!==(e=t.classes)&&void 0!==e?e:{},db_object_class:null!==(n=t.objectClasses)&&void 0!==n?n:{},db_sublayer:null!==(i=t.sublayers)&&void 0!==i?i:{}}},d=function(){function t(t,e,n){this.id=t,this.modules=e,this.options=n,this.type="terrain",this.sourceAttrs={}}return t.prototype.fetchTile=function(t,e){var n=this.modules,i=n.assetManager,o=n.map;return n.workers.parser.fetchTile({coords:t,tileServer:this.options.tileServer,tileSet:this.options.tileSet,tileProtocol:this.options.tileProtocol,subdomains:this.options.subdomains,tileKey:this.options.tileKey,appId:this.options.appId,lang:e.lang,defaultLang:this.options.defaultLang,sessionId:this.options.sessionId}).then((function(n){if(n){var a=n.metadata,s=n.invalidTileKey;return a.forEach((function(n){i.loadMetatile(n.metatileHash,n.regionId),o.emit("tileload",{tileCoords:t,regionId:n.regionId}),Object(r.o)(n.regionId)&&e.shownRegionIds.add(n.regionId)})),s&&o.emit("invalidtilekey"),a}}))},t.prototype.generateTile=function(t,e,n,o,a){return void 0===a&&(a={}),this.modules.workers.parser.generateTile(Object(i.a)({styleId:t.handyStyleId,tileInfo:Object(r.e)(e),pixelRatio:o,selectedIds:n,styleState:t.styleState,floorsEnabled:t.floorsEnabled,sourceId:this.id},a))},t.prototype.abortTileFetch=function(t){this.modules.workers.parser.abortTileRequest(Object(r.c)(t))},t.prototype.deleteTile=function(t){this.modules.workers.parser.deleteTile(Object(r.c)(t))},t.prototype.setAttributes=function(t){this.sourceAttrs=t},t.prototype.getAttributes=function(){return this.sourceAttrs},t.prototype.destroy=function(){},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(26),r=n(39),o=n(6);function a(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:s(t)}}function s(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function c(t){var e=t.coords;if(e.length<2)throw new Error("The source coords array must have at least two coordinates");var n=e[e.length-1]+2*o.a;return e.map((function(t,i){return(t+o.a*(0===i?0:i===e.length-1?2:1))/n}))}function l(t,e){for(var n=function(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,c=[o[0]],l=1;l<o.length;l++){var u=o[l-1],d=o[l],f=l%2==(a?1:0),h=c[c.length-1];f?c.push(Math.round((s-r)*(d-u)/i)+h):c.push(h+d-u)}return c}function u(t,e){void 0===e&&(e=0);var n=t[t.length-1]-t[0];return t.map((function(t){return Math.round(t-n/2+e)}))}function d(t){return t.map((function(t){return t*window.devicePixelRatio}))}var f=Object(i.a)({symbol:"stretchableImage",sinks:{fill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.vrtxOffset=new Int16Array(e,4),t.views.txtrCoords=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12)},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r,o,s){var m=n.style,v=m.offset,_=m.stretchX,y=m.stretchY,g=m.sourceSize,b=m.targetSize,w=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),x=t.getBucket("stretchableImage","fill",f.sinks.fill.packObjectAttributes(e,n.innerId,o),f.sinks.fill.binder),S=function(t,e,n){var i=t[0],r=t[1];return void 0===e&&(e=[]),void 0===n&&(n=[]),{x:a(e,i),y:a(n,r)}}(g,_,y);!function(t,e,n,i,r){for(var o=e[0],a=e[1],s=n[0],c=n[1],l=i[0],u=i[1],d=t.elements.offset,f=o.length,m=a.length,v=0;v<f-1;v++)for(var _=o[v],y=o[v+1],g=s[v],b=s[v+1],w=0;w<m-1;w++){var x=a[w],S=a[w+1],I=c[w],j=c[w+1];p(t.indices,d,0,1,2,2,1,3),h(t,d++,l,u,g,I,_,x,r),h(t,d++,l,u,b,I,y,x,r),h(t,d++,l,u,g,j,_,S,r),h(t,d++,l,u,b,j,y,S,r)}t.elements.offset=d}(x,function(t){var e=t.x,n=t.y;return[c(e),c(n)]}(S),function(t,e){var n=t.x,i=t.y,r=e.targetSize,o=r[0],a=r[1],s=e.offset;return[d(u(l(n,o),s&&s[0])),d(u(l(i,a),s&&s[1]))]}(S,{targetSize:b,offset:v}),s,w)}});function h(t,e,n,i,o,a,s,c,l){e*=8,t.views.position[e]=n,t.views.position[e+1]=i,t.views.vrtxOffset[e]=o,t.views.vrtxOffset[e+1]=-a,t.views.txtrCoords[e]=Object(r.c)(s),t.views.txtrCoords[e+1]=Object(r.c)(c),e>>=1,t.views.localID[e]=l}function p(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";var i;n.d(e,"a",(function(){return i})),function(t){t[t.Tile=0]="Tile",t[t.Custom=1]="Custom"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26),r=n(39),o=Object(i.a)({symbol:"raster",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.txtrCoords=new Uint16Array(e,4)},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r){var s=e[0],c=e[1],l=t.getBucket(i.type,"fill",o.sinks.fill.packObjectAttributes(n,i.innerId,r),o.sinks.fill.binder),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+2,c[l+4]=e+1,c[l+5]=e+3,t.offset=l+6}(l.indices,u),a(l,u++,s[0],c[0],0,1),a(l,u++,s[1],c[1],1,1),a(l,u++,s[2],c[2],0,0),a(l,u++,s[3],c[3],1,0),l.elements.offset=u}});function a(t,e,n,i,o,a){e*=4,t.views.position[e]=n,t.views.position[e+1]=i,t.views.txtrCoords[e]=Object(r.c)(o),t.views.txtrCoords[e+1]=Object(r.c)(a)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c}));var i=n(1),r=n(36),o=[0,0];function a(t,e,n,a,s,c){var u=s.style,d=u.textLineHeight,f=u.textLetterSpacing;c===r.a.Icon&&(d=s.style.iconTextLineHeight,f=s.style.iconTextLetterSpacing);for(var h=e.identifyPoiLabelIndex,p=a.lines,m=(a.maxWidth,d*i.fonts.baseSize),v=function(t,e,n){return 1&n?e*(n>>1):e/2+e*(n-1>>1)}(0,m,p.length),_=0;_<p.length;_++){var y;y=-p[_].width/2,o[0]=y,o[1]=v;for(var g=p[_].glyphs,b=0;b<g.length;b++){var w=g[b];void 0!==w.bitmap&&l(t[w.range],n,o,w,h),o[0]+=w.advance+i.fonts.baseSize*f}v-=m}}function s(t,e,n,i,r,o,a){var s=n[1]+i.top,c=n[0]+i.left,l=s-i.height,u=c+i.width,f=Math.sin(r),p=Math.cos(r),m=c*p-s*f,v=c*f+s*p,_=u*p-s*f,y=u*f+s*p,g=c*p-l*f,b=c*f+l*p,w=u*p-l*f,x=u*f+l*p,S=t.elements.offset;d(t,e,m,v,i.texLeft,i.texTop,o,a),d(t,e,_,y,i.texRight,i.texTop,o,a),d(t,e,g,b,i.texLeft,i.texBottom,o,a),d(t,e,w,x,i.texRight,i.texBottom,o,a),h(t.indices,S,1,0,3,2,3,0)}function c(t,e,n){var i=t.elements.offset,r=127*Math.cos(n),o=127*Math.sin(n);f(t,e,r,o,-1,-1),f(t,e,r,o,1,-1),f(t,e,r,o,1,1),f(t,e,r,o,-1,1),h(t.indices,i,0,1,2,2,3,0)}function l(t,e,n,i,r){var o=n[1]+i.top,a=n[0]+i.left,s=o-i.height,c=a+i.width,l=t.elements.offset;u(t,e,a,o,i.texLeft,i.texTop,r),u(t,e,c,o,i.texRight,i.texTop,r),u(t,e,a,s,i.texLeft,i.texBottom,r),u(t,e,c,s,i.texRight,i.texBottom,r),h(t.indices,l,1,0,3,2,3,0)}function u(t,e,n,i,r,o,a){var s=t.elements,c=s.stride*s.offset>>1,l=c>>1;t.views.position[c]=e[0],t.views.position[c+1]=e[1],t.views.position[c+2]=e[2],t.views.cornerOffset[c]=n,t.views.cornerOffset[c+1]=i,t.views.texCoords[c]=r,t.views.texCoords[c+1]=o,t.views.localID[l]=a,s.offset++}function d(t,e,n,i,r,o,a,s){var c=t.elements,l=c.stride*c.offset>>1;t.views.position[l]=e[0],t.views.position[l+1]=e[1],t.views.position[l+2]=e[2],t.views.texCoords[l]=r,t.views.texCoords[l+1]=o,l>>=1,t.views.cornerOffset[l]=n,t.views.cornerOffset[l+1]=i,t.views.styleZoomLimits[l]=a,t.views.styleZoomLimits[l+1]=s,c.offset++}function f(t,e,n,i,r,o){var a=t.elements,s=a.stride*a.offset/2;t.views.position[s]=e[0],t.views.position[s+1]=e[1],t.views.direction[s]=n,t.views.direction[s+1]=i,t.views.widenDirection[s]=r,t.views.widenDirection[s+1]=o,a.offset++}function h(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=function(){},r=function(){function t(t,e){void 0===e&&(e=i),this.queue=[],this.data={},this.size=t,this.onRemove=e}return t.prototype.add=function(t,e){this.data[t]||(this.queue.push(t),this.data[t]=e,this.shrink(this.size))},t.prototype.remove=function(t){this.data[t]&&(this.queue.splice(this.queue.indexOf(t),1),delete this.data[t])},t.prototype.get=function(t){var e=this.data[t];return e&&(this.queue.splice(this.queue.indexOf(t),1),this.queue.push(t)),e},t.prototype.reset=function(){this.shrink(0)},t.prototype.setSize=function(t){this.size=t,this.shrink(t)},t.prototype.getSize=function(){return this.size},t.prototype.keys=function(){return this.queue},t.prototype.getData=function(){var t=this;return Object.keys(this.data).map((function(e){return t.data[e]}))},t.prototype.shrink=function(t){for(;this.queue.length>t;){var e=this.queue.shift(),n=this.data[e];delete this.data[e],this.onRemove(e,n)}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=1;function r(){return i++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var i=n(0),r=n(16),o=n(42),a=function(t){function e(){var e=t.call(this)||this;return e.workers=new Map,e}return Object(i.c)(e,t),e.prototype.addWorker=function(t,e){var n=this;this.workers.set(t,e),e.addEventListener("message",(function(e){var i=e.data,r=i.to,o=i.msg,a=i.transferable,s={from:t,to:r,msg:o,transferable:a};n.routeMessage(s)}))},e.prototype.send=function(t,e,n){var i=this.workers.get(t);if(i){var o={to:t,from:r.b.Main,msg:e,transferable:n};void 0!==n?i.postMessage(o,n):i.postMessage(o)}},e.prototype.broadcast=function(t){this.workers.forEach((function(e,n){var i={to:n,from:r.b.Main,msg:t};e.postMessage(i)}))},e.prototype.routeMessage=function(t){var e=t.from,n=t.to,i=t.transferable,o=t.msg.type;if(n===r.b.Main)this.emit("message",t);else if(n===r.b.All)e!==r.b.Main&&this.emit(o,t),this.workers.forEach((function(n,r){r!==e&&(void 0!==i?n.postMessage(t,i):n.postMessage(t))}));else{var a=this.workers.get(n);a&&(void 0!==i?a.postMessage(t,i):a.postMessage(t))}},e}(o.a),s=function(t){function e(e){var n=t.call(this)||this;return n.worker=e,e.addEventListener("message",(function(t){var e=t.data;n.emit("message",e)})),n}return Object(i.c)(e,t),e.prototype.send=function(t,e,n){var i={to:t,msg:e,transferable:n};this.worker.postMessage(i,n)},e.prototype.broadcast=function(t){var e={to:r.b.All,msg:t};this.worker.postMessage(e)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(16),r=function(){function t(t){var e=this;this.onMessage=function(t){var n=t.from,r=t.msg;switch(r.type){case i.a.FunctionUse:e.onFunctionUse(r,n);break;case i.a.FunctionResult:e.onFunctionResult(r)}},this.connector=t,this.functions=new Map,this.functionIdCounter=0,this.pendingFunctions=new Map,t.on("message",this.onMessage)}return t.prototype.set=function(t,e){this.functions.set(t,e)},t.prototype.get=function(t,e){var n=this;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=n.functionIdCounter++,s=new Promise((function(t){n.pendingFunctions.set(a,t)})),c={type:i.a.FunctionUse,data:{id:a,name:e,args:r}};return n.connector.send(t,c),s}},t.prototype.onFunctionUse=function(t,e){var n=this,i=t.data,r=i.name,o=i.args,a=i.id,s=this.functions.get(r);if(s){var c=s.apply(void 0,o);c&&c.then?Promise.resolve(c).then((function(t){return n.sendFunctionResult(e,a,t)})):this.sendFunctionResult(e,a,c)}else console.error("FnRegistry#onFunctionUse: function "+r+" not found")},t.prototype.sendFunctionResult=function(t,e,n){var r={type:i.a.FunctionResult,data:{id:e,result:n}};n&&n.transferable?this.connector.send(t,r,n.transferable):this.connector.send(t,r)},t.prototype.onFunctionResult=function(t){var e=t.data,n=e.id,i=e.result,r=this.pendingFunctions.get(n);r?(r(i),this.pendingFunctions.delete(n)):console.error("FnRegistry#onFunctionResult: pending function "+n+" not found")},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(3),r=n(57),o=function(){function t(t){this.dataType=t,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e){var n=this;return new Promise((function(o){var a=e(t),s=Object(i.c)(t),c=("json"===n.dataType?r.b:r.a)({url:a},(function(t,e){if(n.pendingRequests.delete(s),void 0!==t)return 204!==t.status&&console.error(t),void o(void 0);o(e)}));n.pendingRequests.set(s,{xhr:c,resolve:o})}))},t.prototype.destroy=function(){var t=this;this.pendingRequests.forEach((function(e,n){t.abortRequest(n)}))},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(void 0),this.pendingRequests.delete(t))},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n(14),r=function(){function t(t,e){this.offset=0,this.stride=e,this.buffer=new ArrayBuffer(t),this.view=new Int32Array(this.buffer),this.comittedOffsets=0,this.watermark=t/e*.8}return t.prototype.extend=function(){var t=2*this.buffer.byteLength;this.watermark=t/this.stride*.8;var e=new ArrayBuffer(t),n=new Int32Array(e);return n.set(this.view),this.buffer=e,this.view=n,e},t}(),o=function(){function t(t){this.offset=0,this.buffer=new Int32Array(t),this.comittedOffsets=0,this.watermark=.8*t}return t.prototype.extend=function(){var t=2*this.buffer.length;this.watermark=.8*t;var e=new Int32Array(t);e.set(this.buffer),this.buffer=e},t}(),a=function(){function t(t,e,n,a){var s="buildingModel"!==t?67200:336e3,c=Object(i.f)(t,e);this.elements=new r(s,c),this.indices=new o(2*s/c),this.views={},this.binder=a,a(this,this.elements.buffer),this.attributes=n}return t.prototype.resetOffsets=function(){this.elements.offset=0,this.elements.comittedOffsets=0,this.indices.offset=0,this.indices.comittedOffsets=0},t.prototype.commit=function(){this.elements.comittedOffsets=this.elements.offset,this.indices.comittedOffsets=this.indices.offset},t.prototype.rollback=function(){this.elements.offset=this.elements.comittedOffsets,this.indices.offset=this.indices.comittedOffsets},t.prototype.checkWatermarks=function(){var t=0,e=this.elements;e.offset>e.watermark&&(e.offset>=e.buffer.byteLength/e.stride&&(t=1),this.binder(this,e.extend()));var n=this.indices;return n.offset>n.watermark&&(n.offset>=n.buffer.length&&(t=1),n.extend()),t},t}(),s=n(52),c=n(84),l=n(1),u=n(67),d=function(){function t(){this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex=0,this.packedRasters=[],this.rastersToLoad=[],this.newRasterSets=new Map}return t.prototype.addNewRasterSet=function(t,e){var n=this.newRasterSets.get(t);n||(n=[],this.newRasterSets.set(t,n)),n.push(e)},t.prototype.pack=function(t,e,n){t.isSvg?this.packSvg(t,e.map((function(t){return{w:t,h:t}})),n):this.packPng(t,e,n)},t.prototype.packSvg=function(t,e,n){for(var i=t.rasters,r=new Set,o=0,a=i;o<a.length;o++){var s=a[o],u=s.w,d=s.h;r.add(u+"_"+d)}for(var f=0,h=e;f<h.length;f++){var p=h[f];if(u=p.w*n,d=p.h*n,!r.has(u+"_"+d)){var m=this.packer.packOne(u+2,d+2);null===m&&(this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex++,m=this.packer.packOne(u+2,d+2));var v=i.length,_={rasterSetIndex:t.index,rasterIndex:v,w:u,h:d,x:m.x+1,y:m.y+1,anchorX:t.anchorX,anchorY:t.anchorY,atlasIndex:this.currentAtlasIndex,isPacked:!0};i.push(_),this.packedRasters.push(t.index,v,_.x,_.y,_.w,_.h,this.currentAtlasIndex)}}},t.prototype.addRastersToLoad=function(t,e){this.rastersToLoad.push(t,e.rasterSetIndex,e.rasterIndex)},t.prototype.getNewRasterSets=function(){var t=this.newRasterSets;return this.newRasterSets=new Map,t},t.prototype.getPackedRasters=function(){if(0!==this.packedRasters.length){var t=new Uint16Array(this.packedRasters);return this.packedRasters=[],t}},t.prototype.getRastersToLoad=function(){var t=new Float64Array(this.rastersToLoad);return this.rastersToLoad=[],t},t.prototype.packPng=function(t,e,n){for(var i=t.rasters,r=0,o=e;r<o.length;r++){var a=o[r]*n,s=Object(u.c)(i,a,!1);if(void 0!==s){var d=t.rasters[s];if(!d.isPacked){var f=this.packer.packOne(d.w+2,d.h+2);null===f&&(this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex++,f=this.packer.packOne(d.w+2,d.h+2)),d.x=f.x+1,d.y=f.y+1,d.atlasIndex=this.currentAtlasIndex,d.isPacked=!0,this.packedRasters.push(t.index,s,d.x,d.y,d.w,d.h,this.currentAtlasIndex)}}}},t}(),f=n(23),h=n(99),p=function(){function t(t){this.atlasPacker=new d,this.geoIds=new Uint32Array(0),this.floorHidingMap=new h.a,this.addedBuckets=[],this.labels=[],this.idIndexer=new s.a(t),this.buckets={},this.reset()}return t.prototype.reset=function(){this.buckets={},this.addedBuckets=[],this.geoIds=new Uint32Array(0),this.floorHidingMap.clear(),this.labels=[]},t.prototype.addLabel=function(t){this.labels.push(t)},t.prototype.getBucket=function(t,e,n,i){var r=this.buckets[t];void 0===r&&(r={},this.buckets[t]=r);var o=r[e];void 0===o&&(o=r[e]=[]);for(var s=o.length-1;s>=0;s--){var c=o[s];if(Object(f.a)(n,c.attributes))return this.addedBuckets.push(c),c}var l=new a(t,e,n,i);return o.push(l),this.addedBuckets.push(l),l},t.prototype.isOverloaded=function(){for(var t=this.addedBuckets,e=0,n=0;n<t.length;)e+=t[n++].checkWatermarks();var i=e>0;if(i)for(;n--;)t[n].rollback();else for(;n--;)t[n].commit();return t.length=0,i},t.prototype.setGeoIds=function(t){this.geoIds=t},t.prototype.addFloorHidingMap=function(t,e){var n=this.floorHidingMap.get(e);void 0===n&&(n=[]),n.push(t[0],t[1]),this.floorHidingMap.set(e,n)},t.prototype.getAccumulatedData=function(){var t=this.buckets,e=[],n=[];for(var r in t){var o=r,a=t[o];if(a)for(var s in a){var c=s,l=a[c];if(l){for(var u=Object(i.f)(o,c)/4,d=0,f=0;f<l.length;f++)d+=l[f].indices.offset;if(0!==d){var h=[],p=new Int32Array(d*u),m=0;for(f=0;f<l.length;f++){var v=l[f],_=v.elements,y=v.indices,g=v.attributes,b=_.view,w=y.buffer;if(0!==_.offset){for(var x=m,S=0;S<y.offset;S++)for(var I=w[S]*u,j=0;j<u;j++)p[m++]=b[I+j];h.push({attributes:g,rangeStart:4*x,rangeEnd:4*m}),v.resetOffsets()}}e.push({symbol:o,sink:c,buffer:p.buffer,generatedObjects:h}),n.push(p.buffer)}}}}var O=this.idIndexer.getPacked();n.push(O.idBuffer,O.phaseBuffer);var M=this.atlasPacker.getPackedRasters();void 0!==M&&n.push(M.buffer);var P=this.atlasPacker.getRastersToLoad();n.push(P.buffer);var L=new Uint32Array(this.geoIds);n.push(L.buffer);var T=this.floorHidingMap.serialize();this.floorHidingMap.clear();var k=this.labels;return this.labels=[],{data:e,labels:k,geoIds:L,floorHidingMap:T,packedRasters:M,rastersToLoad:P,identifyIds:O,transferable:n}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n(38),r=n(3),o=n(25),a=n(26),s=n(95),c=n(68),l=n(66),u=n(52),d=n(23),f=[NaN,NaN],h=function(t,e,n,i,r,o,a){return Object(d.c)([t,e,n[0],n[1]],i,r,o,a)},p=function(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:Object(o.a)(t[2],t[3]),tileData:t.slice(4)}},m=Object(a.a)({symbol:"polygonExtrusion",sinks:{sideFill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12)},packObjectAttributes:h,unpackObjectAttributes:p},topFill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.normal=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12)},packObjectAttributes:h,unpackObjectAttributes:p},sideStroke:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.distance=new Int16Array(e,6),t.views.normals=new Uint16Array(e,8),t.views.direction=new Uint16Array(e,12)},packObjectAttributes:h,unpackObjectAttributes:p},topStroke:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8)},packObjectAttributes:h,unpackObjectAttributes:p}},generate:function(t,e,n,o,a,d,p,y,g,b,w){var x=g[0],S=g[1],I=g[2],j=x.length,O=y[p.hovered],M=Math.round(Object(r.r)(y[p.db_height])),P=y[p.id],L=O?u.b:t.idIndexer.getIndex(P,e,n,y[p.db_sublayer]),T=!Number.isNaN(P)&&w&&w.has(P)?P:f,k=h(e,n.innerId,T,n.dataKeys,p,y,d);if(M>0){var z=t.getBucket("polygonExtrusion","sideFill",k,m.sinks.sideFill.binder);Object(s.a)(z,j,x,S,I,M,L);var C=t.getBucket("polygonExtrusion","sideStroke",k,m.sinks.sideStroke.binder);b&&(Object(c.a)(C,j,x,S,I),Object(c.b)(C,j,x,S,I,M))}!function(t,e,n,i,r,o){var a=t.elements.offset,s=a;v(t,a++,n[0],i[0],r,o),v(t,a++,n[1],i[1],r,o);for(var c=2;c<e;c++)_(t,s,c),v(t,a++,n[c],i[c],r,o);t.elements.offset=a}(t.getBucket("polygonExtrusion","topFill",k,m.sinks.topFill.binder),j,x,S,M,L),function(t,e,n,r,o,a){for(var s=0;s<e;s++){var c=Object(i.a)(s,e);if(o&&1===o[c]){var u=Object(i.a)((s+1)%e,e);Object(l.a)(t,n[c],r[c],a,n[u],r[u],a)}}}(t.getBucket("polygonExtrusion","topStroke",k,m.sinks.topStroke.binder),j,x,S,I,M)}});function v(t,e,n,i,r,o){e*=8,t.views.position[e]=n,t.views.position[e+1]=i,t.views.position[e+2]=r,t.views.normal[e]=0,t.views.normal[e+1]=127,e>>=1,t.views.localID[e]=o}function _(t,e,n){var i=t.indices.buffer,r=t.indices.offset;n%2==0?(i[r++]=e+n-2,i[r++]=e+n-1,i[r++]=e+n):(i[r++]=e+n-1,i[r++]=e+n-2,i[r++]=e+n),t.indices.offset=r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(30),r=n(11),o=n(24),a=new Map,s=function(t,e,n,s,c,l){switch(this.groupPriority=0,this.labelingGroup=o.p,this.marginTopBottom=0,this.marginLeftRight=0,this.type=e,this.label=t,this.layer=t.layer,this.id=t.id+"_"+e+"_"+Math.floor(n[0]/1e3)+"_"+Math.floor(n[1]/1e3),this.anchorWorld=i.b(n),this.anchorWorld[2]*=s,this.anchorScreen=c.project(this.anchorWorld),this.anchorPosition=0,this.anchorSegmentIndex=0,this.halfLabelWidth=0,this.itemPriority=e===r.d.Icon?t.iconPriority:t.labelPriority,t.pointType===r.b.Commercial&&(a.has(this.id)?this.commercialPriority=a.get(this.id):(this.commercialPriority=Math.random(),a.set(this.id,this.commercialPriority))),this.layer.type){case"labelLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.textPriority;break;case"oneWayLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.priority;break;case"point":e===r.d.PoiText?(this.labelingGroup=this.layer.style.allowOverlap?o.r:this.layer.style.textLabelingGroup,this.groupPriority=this.layer.style.iconImage?Math.min(this.layer.style.textPriority,this.layer.style.iconPriority):this.layer.style.textPriority,this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):e===r.d.PoiText2?(this.labelingGroup=this.layer.style.allowOverlap?o.r:this.layer.style.textLabelingGroup2,this.groupPriority=Math.min(this.layer.style.textPriority,this.layer.style.iconPriority),this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):(this.labelingGroup=this.layer.style.allowOverlap?o.r:this.layer.style.iconLabelingGroup,this.groupPriority=this.layer.style.iconPriority,this.marginTopBottom=this.layer.style.iconLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.iconLabelingMargin.leftRight)}this.labelingGroupTable=l.labelingGroups.table,this.overflowStyleZoom=-1/0,this.boxes=[],this.placementIndex=0}},function(t,e,n){"use strict";function i(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function r(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function o(t,e,n,i,r,o,a){this.id=t,this.x=e,this.y=n,this.w=i,this.h=r,this.maxw=o||i,this.maxh=a||r,this.refcount=0}e.a=i,i.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,i,r,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,i=t[s].h||t[s].height,r=t[s].id,n&&i){if(!(o=this.packOne(n,i,r)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},i.prototype.packOne=function(t,e,n){var i,o,a,s,c,l,u,d,f={freebin:-1,shelf:-1,waste:1/0},h=0;if("string"==typeof n||"number"==typeof n){if(i=this.getBin(n))return this.ref(i),i;"number"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(e===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,e,n);e>i.maxh||t>i.maxw||e<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*e)<f.waste&&(f.waste=a,f.freebin=s)}for(s=0;s<this.shelves.length;s++)if(h+=(o=this.shelves[s]).h,!(t>o.free)){if(e===o.h)return this.allocShelf(s,t,e,n);e>o.h||e<o.h&&(a=(o.h-e)*t)<f.waste&&(f.freebin=-1,f.waste=a,f.shelf=s)}return-1!==f.freebin?this.allocFreebin(f.freebin,t,e,n):-1!==f.shelf?this.allocShelf(f.shelf,t,e,n):e<=this.h-h&&t<=this.w?(o=new r(h,this.w,e),this.allocShelf(this.shelves.push(o)-1,t,e,n)):this.autoResize?(c=l=this.h,((u=d=this.w)<=c||t>u)&&(d=2*Math.max(t,u)),(c<u||e>c)&&(l=2*Math.max(e,c)),this.resize(d,l),this.packOne(t,e,n)):null},i.prototype.allocFreebin=function(t,e,n,i){var r=this.freebins.splice(t,1)[0];return r.id=i,r.w=e,r.h=n,r.refcount=0,this.bins[i]=r,this.ref(r),r},i.prototype.allocShelf=function(t,e,n,i){var r=this.shelves[t].alloc(e,n,i);return this.bins[i]=r,this.ref(r),r},i.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var i=this.shelves[n];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},i.prototype.getBin=function(t){return this.bins[t]},i.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},i.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},i.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},i.prototype.resize=function(t,e){this.w=t,this.h=e;for(var n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},r.prototype.alloc=function(t,e,n){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new o(n,i,this.y,t,e,t,this.h)},r.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(33),r=n(7),o=n(3),a=n(1),s=n(28);function c(t,e,n){(function(t,e,n){var r=Object(s.b)(t.type,n,e),o=r-t.zoomLevel;t.zoomDirection===i.b.Stationary&&(o>0?(t.zoomDirection=i.b.ZoomingIn,t.zoomStartZoom=t.zoomLevel):o<0&&(t.zoomDirection=i.b.ZoomingOut,t.zoomStartZoom=t.zoomLevel)),t.zoomLevel=r})(t,e.styleZoom,e.zoom),function(t,e){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var n=Object(r.c)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),i=Object(r.c)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=Object(o.h)(e,n,i)}}(t,n),function(t){var e=Math.round((Object.keys(t.displayedMods).length+t.viewportTiles.length)*a.tiles.cacheRatio);t.tileModsCacheMaxCount<e&&(t.tileModsCacheMaxCount=e),e>t.tileModsCacheMaxCount/2&&t.tileModsCache.setSize(e)}(t),Object(s.i)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.map={}}return t.prototype.set=function(t,e,n){void 0===this.map[t]&&(this.map[t]={}),this.map[t][e]=n},t.prototype.get=function(t,e){var n=this.map[t];if(void 0!==n)return n[e]},t.prototype.has=function(t,e){var n=this.map[t];return void 0!==n&&void 0!==n[e]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n(8),n(1);var i=n(20),r=(n(11),n(15)),o=n(14),a=n(48);function s(t,e){var n=[new Uint16Array([0,65535,65535,0,0]),new Uint16Array([0,0,65535,65535,0])],s=Object(i.c)({});Object(o.b)({collector:t,generator:a.a.generate,args:[i.a,e,r.d,s,n]})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(96),r=n(34),o=n(26),a=n(23),s={type:r.b.Striped,cDist:0,oLen:0,localID:0,offsetMultiplier:14};function c(t,e,n){return s.cDist=t,s.oLen=e,s.localID=n,s}var l=Object(o.a)({symbol:"dashedLine",sinks:{stroke:{stride:28,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int16Array(e,4),t.views.texExtender=new Uint16Array(e,8),t.views.vertexDistance=new Float32Array(e,12),t.views.componentDistance=new Float32Array(e,16),t.views.objectLength=new Float32Array(e,20),t.views.localID=new Uint32Array(e,24)},packObjectAttributes:function(t,e,n,i,r){return Object(a.c)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,o,a,s){var u=t.getBucket(n.type,"stroke",l.sinks.stroke.packObjectAttributes(e,n.innerId,n.dataKeys,o,a),l.sinks.stroke.binder),d=t.idIndexer.getIndex(a[o.id],e,n,a[o.db_sublayer]),f=c(a[o.componentDistanceStart]/65536,a[o.objectLength]/65536,d),h=!Number.isNaN(a[o.beginningIsCut])&&0!==a[o.beginningIsCut],p=!Number.isNaN(a[o.endingIsCut])&&0!==a[o.endingIsCut];Object(i.a)(s[0],s[1],s[0].length,r.c.Flat,h?r.a.TileCut:r.a.ObjectEnding,p?r.a.TileCut:r.a.ObjectEnding,a[o.previousPointX],a[o.previousPointY],a[o.nextPointX],a[o.nextPointY],f,u)}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(26),r=n(66),o=n(25),a=n(23),s=Object(i.a)({symbol:"buildingModel",sinks:{fill:{stride:16,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.texCoords=new Uint16Array(e,8),t.views.localID=new Uint32Array(e,12)},packObjectAttributes:function(t,e,n,i,r,o,s,c,l,u){return Object(a.c)([t,e,n,i,r,s[0],s[1],o],c,l,u)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],texture:t[2],primitiveType:t[3],modelIndex:t[4],id:Number.isNaN(t[5])?void 0:Object(o.a)(t[5],t[6]),matrix:t[7],tileData:t.slice(8)}}},stroke:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.directionDistance=new Int8Array(e,8)},packObjectAttributes:function(t,e,n,i,r,o,s){return Object(a.c)([t,e,i[0],i[1],n],r,o,s)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],id:Number.isNaN(t[2])?void 0:Object(o.a)(t[2],t[3]),matrix:t[4],tileData:t.slice(5)}}}},processSubmesh:function(t,e,n,i,r,o,a,l,u,d,f){var h=n.tileProps,p=r[h.id],m=i.idIndexer.getIndex(p,t,e,r[h.db_sublayer]),v=i.getBucket(e.type,"fill",s.sinks.fill.packObjectAttributes(t,e.innerId,u,l,f,d,p,e.dataKeys,h,r),s.sinks.fill.binder);!function(t,e){for(var n=t.elements.offset,i=t.indices.offset,r=0;r<e.length;r++)t.indices.buffer[i++]=n+e[r];t.indices.offset=i}(v,a);for(var _=0;_<o.length;_++)c(v,o,_,m)},processOuterEdge:function(t,e,n,i,o,a,c,l){for(var u=n.tileProps,d=o[u.id],f=i.getBucket(e.type,"stroke",s.sinks.stroke.packObjectAttributes(t,e.innerId,l,d,e.dataKeys,u,o),s.sinks.stroke.binder),h=0;h<c.length;h+=2){var p=5*c[h],m=5*c[h+1];Object(r.a)(f,a[p],a[p+1],a[p+2],a[m],a[m+1],a[m+2])}}});function c(t,e,n,i){var r=t.elements.offset,o=5*n,a=r<<3,s=r<<2;t.views.position[a]=e[o],t.views.position[a+1]=e[o+1],t.views.position[a+2]=e[o+2],t.views.texCoords[a]=e[o+3],t.views.texCoords[a+1]=e[o+4],t.views.localID[s]=i,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n(6),r=n(9),o=n(17),a=n(96),s=n(26),c=n(34),l=n(23),u=r.d(),d=r.d(),f={type:c.b.Entrance,offsetMultiplier:18,cDist:0,oLen:0,px:[],py:[],count:0,localID:0};function h(t,e,n,i){return f.px=t[0],f.py=t[1],f.oLen=n/65536,f.count=e,f.localID=i,f}var p=Object(s.a)({symbol:"arrow",sinks:{stroke:{stride:36,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.segmentEnd=new Uint16Array(e,4),t.views.texExtender=new Uint16Array(e,8),t.views.arrowExtender=new Uint16Array(e,10),t.views.extender=new Int16Array(e,12),t.views.direction=new Int16Array(e,16),t.views.vertexDistance=new Float32Array(e,20),t.views.objectLength=new Float32Array(e,24),t.views.type=new Float32Array(e,28),t.views.localID=new Uint32Array(e,32)},packObjectAttributes:function(t,e,n,i,r,o){return Object(l.c)([t,e,n>2?1:0],i,r,o)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],isLongArrow:t[2],tileData:t.slice(3)}}}},generate:function(t,e,n,i,r,o){var s=o[0],l=o[1],u=o[0].length,d=function(t,e,n){for(var i=0,r=1;r<n;r++){var o=t[r]-t[r-1],a=e[r]-e[r-1];i+=Math.sqrt(o*o+a*a)}return i}(s,l,u),f=t.getBucket(n.type,"stroke",p.sinks.stroke.packObjectAttributes(e,n.innerId,u,n.dataKeys,i,r),p.sinks.stroke.binder),v=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),_=h(o,u,d,v);Object(a.a)(o[0],o[1],u,c.c.Flat,c.a.ObjectEnding,c.a.ObjectEnding,0,0,0,0,_,f);var y=0;m(f,c.d.StartBorder,s[0],l[0],s[1],l[1],0,0,y,d,v);for(var g=0;g<u-1;g++){if(0!==g){var b=s[g]-s[g-1],w=l[g]-l[g-1];y+=Math.sqrt(b*b+w*w)}m(f,c.d.Arrow,s[g],l[g],s[g+1],l[g+1],-1,0,y,d,v)}}});function m(t,e,n,i,r,o,a,s,c,l,u){!function(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+1,l[u+1]=d+2,l[u+2]=d+0,l[u+3]=d+0,l[u+4]=d+2,l[u+5]=d+3,c.offset=u+6}(t),v(t,e,n,i,r,o,a,s,-1,-1,c,l,!0,u),v(t,e,n,i,r,o,a,s,1,-1,c,l,!1,u),v(t,e,n,i,r,o,a,s,1,1,c,l,!1,u),v(t,e,n,i,r,o,a,s,-1,1,c,l,!0,u)}function v(t,e,n,r,a,s,c,l,f,h,p,m,v,_){var y=t.elements,g=y.stride*y.offset>>1,b=g>>1;Object(o.c)(u,n,r,a,s),Object(o.l)(d,u),t.views.position[g]=n,t.views.position[g+1]=r,t.views.segmentEnd[g]=a,t.views.segmentEnd[g+1]=s,t.views.texExtender[g]=Object(o.h)(d[0]*h*(v?-1:1)*i.i,d[1]*h*(v?-1:1)*i.i),t.views.arrowExtender[g]=Object(o.h)(f*i.i,h*i.i);var w=f+c,x=h+l,S=u[0]*w+d[0]*x,I=u[1]*w+d[1]*x;t.views.extender[g]=Math.round(S*i.i*127),t.views.extender[g+1]=Math.round(I*i.i*127),t.views.direction[g]=Math.round(127*u[0]),t.views.direction[g+1]=Math.round(127*u[1]),t.views.vertexDistance[b]=p/65536,t.views.objectLength[b]=m/65536,t.views.type[b]=e,t.views.localID[b]=_,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(7),o=n(3),a=function(){function t(t,e,n){for(var r in this.params={},this.params.selectedIds=Object(i.e)([],t),this.params.rev=n,e)this.params["__style_state_"+r]=e[r]}return t.equal=function(t,e){return Object(r.d)(t.params,e.params)},t.prototype.clone=function(){var e=new t([],{},0);for(var n in this.params)e.params[n]=this.get(n);return e},t.prototype.stringify=function(){var t=[];for(var e in this.params)t.push(e+"="+this.get(e));return t.join(";")},t.prototype.get=function(t){var e=this.params[t];return Array.isArray(e)?this.tileIds&&"selectedIds"===t?Object(o.g)(e,this.tileIds):e.slice():"object"==typeof e?Object(i.a)({},e):e},t.prototype.setTileIds=function(t){this.tileIds=t},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(){function t(t,e,n){this.id=t,this.modules=e,this.options=n,this.type="geojson",this.worker=new this.modules.workers.parser.GeoJsonSource(this.options,this.id),this.attributes=n.attributes||{}}return t.prototype.fetchTile=function(t){return this.worker.fetchTile(t).then((function(){return[{regionId:0,metatileHash:-2}]}))},t.prototype.generateTile=function(t,e,n,i){return this.worker.generateTile(t,e,n,i)},t.prototype.getObjectAttributes=function(t,e){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.worker.getObjectAttributes(t,e)]}))}))},t.prototype.abortTileFetch=function(t){this.worker.abortTileFetch(t)},t.prototype.deleteTile=function(t){this.worker.deleteTile(t)},t.prototype.setAttributes=function(t){this.worker.setSourceAttrs(t),this.attributes=t},t.prototype.getAttributes=function(){return this.attributes},t.prototype.destroy=function(){this.worker.destroy()},t.prototype.setData=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){switch(e.label){case 0:return this.options=this.options="string"==typeof t?Object(i.a)(Object(i.a)({},this.options),{url:t}):Object(i.a)(Object(i.a)({},this.options),{data:t}),[4,this.worker.setData(t)];case 1:return[2,e.sent()]}}))}))},t}()},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),i=0;i<t.length;i++)n[t.charCodeAt(i)]=i;e.encode=function(e){var n,i=new Uint8Array(e),r=i.length,o="";for(n=0;n<r;n+=3)o+=t[i[n]>>2],o+=t[(3&i[n])<<4|i[n+1]>>4],o+=t[(15&i[n+1])<<2|i[n+2]>>6],o+=t[63&i[n+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=function(t){var e,i,r,o,a,s=.75*t.length,c=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(e=0;e<c;e+=4)i=n[t.charCodeAt(e)],r=n[t.charCodeAt(e+1)],o=n[t.charCodeAt(e+2)],a=n[t.charCodeAt(e+3)],d[l++]=i<<2|r>>4,d[l++]=(15&r)<<4|o>>2,d[l++]=(3&o)<<6|63&a;return u}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var i=n(6),r=n(9),o=n(7),a=n(17),s=r.d(),c=r.d(),l=r.d(),u=r.d(),d=r.d(),f=r.d(),h=r.d(),p=r.d(),m=0,v=0;function _(t,e,n,i,r,o,c,l,u){if(!(i<2)){if(Object(a.c)(s,e[0],n[0],e[1],n[1]),m=0,r){var d=void 0!==l?l[0]:0,f=void 0!==u?u[0]:0;g(t,e[0],n[0],-s[0],-s[1],d,f,c)}for(var h=1;h<i;h++)y(t,e,n,h,i,c,l,u);o&&(d=void 0!==l?l[i-1]:0,f=void 0!==u?u[i-1]:0,g(t,e[i-1],n[i-1],s[0],s[1],d,f,c))}}function y(t,e,n,_,y,w,x,S){var I=_===y-1;if(r.o(d,e[_-1],n[_-1]),r.o(f,e[_],n[_]),void 0!==x&&void 0!==S?(r.o(l,x[_-1],S[_-1]),r.o(u,x[_],S[_])):(r.o(l,0,0),r.o(u,0,0)),Object(a.l)(p,s),I)v=0;else{r.o(h,e[_+1],n[_+1]),Object(a.c)(c,f[0],f[1],h[0],h[1]);var j=Object(o.c)(r.g(s,c),-1,1);if(j<=0)v=0,g(t,f[0],f[1],s[0],s[1],u[0],u[1],w);else{var O=Math.sqrt((1-j)/(1+j)),M=Object(o.o)(r.g(p,c));v=O*M}}!function(t,e,n,i,r,o,a){var s=t.indices.buffer,c=t.indices.offset,l=t.elements.offset;s[c]=l+0,s[c+1]=l+1,s[c+2]=l+3,s[c+3]=l+3,s[c+4]=l+1,s[c+5]=l+2,t.indices.offset=c+6}(t);var P=p[0]*i.i,L=p[1]*i.i;b(t,d[0],d[1],(p[0]+s[0]*m)*i.i,(p[1]+s[1]*m)*i.i,P,L,l[0],l[1],w),b(t,d[0],d[1],(-p[0]-s[0]*m)*i.i,(-p[1]-s[1]*m)*i.i,-P,-L,l[0],l[1],w),b(t,f[0],f[1],(-p[0]+s[0]*v)*i.i,(-p[1]+s[1]*v)*i.i,-P,-L,u[0],u[1],w),b(t,f[0],f[1],(p[0]-s[0]*v)*i.i,(p[1]-s[1]*v)*i.i,P,L,u[0],u[1],w),I||(r.c(s,c),m=v)}function g(t,e,n,i,r,o,a,s){!function(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset,a=t.elements.offset;r[o]=a+0,r[o+1]=a+1,r[o+2]=a+2,t.indices.offset=o+3}(t);var c=.01*-i,l=.01*-r;b(t,e,n,i+c,r+l,i,r,o,a,s),b(t,e,n,-r+c,i+l,-r,i,o,a,s),b(t,e,n,r+c,-i+l,r,-i,o,a,s)}function b(t,e,n,i,r,o,a,s,c,l){var u=t.elements.offset*t.elements.stride,d=u>>1,f=u>>2;t.views.position[d]=e,t.views.position[d+1]=n,t.views.extender[u]=127*i,t.views.extender[u+1]=127*r,t.views.normal[u]=127*o,t.views.normal[u+1]=127*a,"shift"in t.views&&(t.views.shift[f]=s,t.views.shift[f+1]=c),"localID"in t.views&&(t.views.localID[f]=l),t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(17),r=n(38);function o(t,e,n,o,u,d,f){for(var h=t.elements.offset,p=0;p<e;p++){var m=Object(r.a)(p,e),v=p===e-1;if(u&&1===u[m]||!u&&!v){var _=n[m],y=o[m],g=(p+1)%e,b=Object(r.a)(g,e),w=n[b],x=o[b];l(t,h),a(t.views.position,h,_,y,w,x,d),s(t.views.normal,h,Object(i.g)(_,y,w,x)),void 0!==f&&void 0!==t.views.localID&&c(t.views.localID,h,f),h+=4}}t.elements.offset=h}function a(t,e,n,i,r,o,a){t[e*=8]=n,t[e+1]=i,t[e+2]=0,t[e+8]=n,t[e+9]=i,t[e+10]=a,t[e+16]=r,t[e+17]=o,t[e+18]=0,t[e+24]=r,t[e+25]=o,t[e+26]=a}function s(t,e,n){t[e*=8]=n,t[e+1]=0,t[e+8]=n,t[e+9]=0,t[e+16]=n,t[e+17]=0,t[e+24]=n,t[e+25]=0}function c(t,e,n){t[e*=4]=n,t[e+4]=n,t[e+8]=n,t[e+12]=n}function l(t,e){var n=t.indices.buffer,i=t.indices.offset;n[i++]=e,n[i++]=e+3,n[i++]=e+1,n[i++]=e,n[i++]=e+2,n[i++]=e+3,t.indices.offset=i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i,r,o,a=n(17),s=n(34),c=n(6),l=[.5,.5],u=[.5,.5],d=[.5,.5],f=[.5,.5],h=[0,0],p=0,m=0,v=0,_=0,y={x:0,y:0,xn2:0,yn2:0,xn1:0,yn1:0,noTurn:!0,leftTurn:!1,sharpTurn:!1,reverseTurn:!1,extender:[.5,.5],faExtender:[.5,.5],saExtender:[.5,.5]};function g(t,e,n,c,u,f,h,y,g,w,M,L){var T,k,z,C,E,A,D,F,R,B;if(0!==n)if(o=M,i=(r=L).indices,m=r.elements.offset,p=0,v=0,_=0,1===n)T=t[0],k=e[0],B=0,P(i,m,0,2,1,1,2,3),O(r,o,0,T,k,1,-1,1,-1,B,!1),O(r,o,0,T,k,-1,-1,-1,-1,B,!1),O(r,o,0,T,k,1,1,1,1,B,!1),O(r,o,0,T,k,-1,1,-1,1,B,!1),p+=4;else{switch(z=t[0],C=e[0],E=t[1],A=e[1],B=0,u){case s.a.TileCut:Object(a.f)(l,z,C,h,y),Object(a.f)(d,E,A,z,C),(R=b(E,A,l[0],l[1],d[0],d[1])).noTurn?S(z,C,d[0],d[1],B):x(0,z,C,l[0],l[1],d[0],d[1],B);break;case s.a.ObjectEnding:Object(a.f)(d,E,A,z,C),c===s.c.Flat?S(z,C,d[0],d[1],B):(S(z,C,-d[0],-d[1],B),x(0,z,C,-d[0],-d[1],d[0],d[1],B));break;default:throw new Error("LoftedLine: unknown Ending Type")}for(var N=n-1,U=1;U<N;U++){z=t[U-1],C=e[U-1],E=t[U],A=e[U],D=t[U+1],F=e[U+1];var Z=E-z,H=A-C;B+=Math.sqrt(Z*Z+H*H)/65536,Object(a.f)(l,E,A,z,C),Object(a.f)(d,D,F,E,A),x(U,E,A,l[0],l[1],d[0],d[1],B)}z=t[n-2],C=e[n-2];var G=(E=t[N])-z,W=(A=e[N])-C;switch(B+=Math.sqrt(G*G+W*W)/65536,f){case s.a.TileCut:Object(a.f)(l,E,A,z,C),Object(a.f)(d,g,w,E,A),(R=b(E,A,l[0],l[1],d[0],d[1])).noTurn?I(N,E,A,d[0],d[1],B):j(N,B,R);break;case s.a.ObjectEnding:Object(a.f)(d,E,A,z,C),I(N,E,A,d[0],d[1],B),c===s.c.Circle&&x(N,E,A,d[0],d[1],-d[0],-d[1],B);break;default:throw new Error("LoftedLine: unknown Ending Type")}}}function b(t,e,n,i,r,o){var s=function(t,e,n,i,r,o){var a=y;a.x=t,a.y=e,a.xn2=n,a.yn2=i,a.xn1=r,a.yn1=o;var s=n*r+i*o;return a.noTurn=s>.9999,a.leftTurn=n*-o+i*r<0,a.sharpTurn=s<0,a.reverseTurn=s<-.9999,a}(t,e,n,i,r,o);if(s.noTurn||s.reverseTurn)s.extender[0]=0,s.extender[1]=0,s.faExtender[0]=0,s.faExtender[1]=0,s.saExtender[0]=0,s.saExtender[1]=0;else{Object(a.d)(u,n,i,r,o);var c=u[0],l=u[1];s.extender[0]=c,s.extender[1]=l,s.faExtender[0]=c-2*n,s.faExtender[1]=l-2*i,s.saExtender[0]=c-2*r,s.saExtender[1]=l-2*o}return s}function w(t,e,n,i,s,c,l,d){Object(a.d)(u,i,s,c,l),i*-l+s*c<0?O(r,o,t,e,n,-u[0],-u[1],-u[0],-u[1],d,!1):O(r,o,t,e,n,u[0],u[1],u[0],u[1],d,!1),p++}function x(t,e,n,s,c,l,u,d){var h=b(e,n,s,c,l,u);j(t,d,h),function(t,e,n){if(!n.noTurn){var s,c,l=n.sharpTurn?2:1;n.reverseTurn?(s=_,c=v):n.leftTurn?(s=v,c=p+l):(s=p+l,c=_);var u=p;if(n.leftTurn,M(i,m,v,_,u),n.sharpTurn){var d=p+1;n.leftTurn?P(i,m,u,d,s,s,d,c):P(i,m,u,c,d,d,c,s)}else n.leftTurn,M(i,m,u,c,s);n.sharpTurn?(n.leftTurn?Object(a.f)(f,n.xn2,n.yn2,n.xn1,n.yn1):Object(a.f)(f,n.xn1,n.yn1,n.xn2,n.yn2),w(t,n.x,n.y,n.xn2,n.yn2,f[0],f[1],e),w(t,n.x,n.y,f[0],f[1],n.xn1,n.yn1,e)):w(t,n.x,n.y,n.xn2,n.yn2,n.xn1,n.yn1,e),n.reverseTurn||(n.leftTurn?O(r,o,t,n.x,n.y,-n.xn1,-n.yn1,-n.xn1,-n.yn1,e,!1):O(r,o,t,n.x,n.y,n.xn1,n.yn1,n.xn1,n.yn1,e,!1),p++),_=c,v=s}}(t,d,h),function(t,e,n){if(!n.noTurn&&!n.reverseTurn){var a=p+1,s=p;n.leftTurn?(O(r,o,t,n.x,n.y,-n.xn1,-n.yn1,n.saExtender[0],n.saExtender[1],e,!1),O(r,o,t,n.x,n.y,n.xn1,n.yn1,n.extender[0],n.extender[1],e,!1)):(O(r,o,t,n.x,n.y,-n.xn1,-n.yn1,-n.extender[0],-n.extender[1],e,!1),O(r,o,t,n.x,n.y,n.xn1,n.yn1,-n.saExtender[0],-n.saExtender[1],e,!1)),p+=2,n.leftTurn?P(i,m,_,s,v,v,s,a):P(i,m,v,_,a,a,_,s),_=s,v=a}}(t,d,h)}function S(t,e,n,i,a){O(r,o,0,t,e,-n,-i,-n,-i,a,!1),O(r,o,0,t,e,n,i,n,i,a,!1),p+=2,v=1,_=0}function I(t,e,n,a,s,c){var l=p+1,u=p;O(r,o,t,e,n,-a,-s,-a,-s,c,!1),O(r,o,t,e,n,a,s,a,s,c,!1),p+=2,P(i,m,_,u,v,v,u,l),v=l,_=u}function j(t,e,n){if(!n.noTurn){var a=p+1,s=p;if(n.reverseTurn?(O(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),O(r,o,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1)):n.leftTurn?(O(r,o,t,n.x,n.y,-n.xn2,-n.yn2,n.faExtender[0],n.faExtender[1],e,!0),O(r,o,t,n.x,n.y,n.xn2,n.yn2,n.extender[0],n.extender[1],e,!0)):(O(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.extender[0],-n.extender[1],e,!0),O(r,o,t,n.x,n.y,n.xn2,n.yn2,-n.faExtender[0],-n.faExtender[1],e,!0)),p+=2,P(i,m,_,s,v,v,s,a),_=s,v=a,!n.reverseTurn){var c=p+1,l=p;n.leftTurn?(O(r,o,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),O(r,o,t,n.x,n.y,0,0,0,0,e,!1),P(i,m,a,s,c,c,s,l)):(O(r,o,t,n.x,n.y,0,0,0,0,e,!1),O(r,o,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1),P(i,m,s,l,a,a,l,c)),p+=2,_=l,v=c}}}function O(t,e,n,i,r,o,l,u,d,f,p){var m=t.elements.offset*e.offsetMultiplier,v=m>>1;if(t.views.position[m]=i,t.views.position[m+1]=r,t.views.extender[m]=Math.floor(u*c.i*127+.5),t.views.extender[m+1]=Math.floor(d*c.i*127+.5),e.type===s.b.Striped)t.views.texExtender[m]=Object(a.h)(o*c.i,l*c.i),"componentDistance"in t.views&&(t.views.componentDistance[v]=e.cDist);else if(e.type===s.b.Entrance){var _=e.px,y=e.py,g=0===n,b=n===e.count-1,w=g?n:n-1,x=g?n+1:n;Object(a.c)(h,_[w],y[w],_[x],y[x]),"direction"in t.views&&(t.views.direction[m]=Math.round(127*h[0]),t.views.direction[m+1]=Math.round(127*h[1]),t.views.type[v]=b?s.d.LineEnding:s.d.Line),t.views.texExtender[m]=Object(a.h)(o*(p||b?-1:1)*c.i,l*(p||b?-1:1)*c.i)}t.views.vertexDistance[v]=f,t.views.objectLength[v]=e.oLen,t.views.localID[v]=e.localID,t.elements.offset++}function M(t,e,n,i,r){var o=t.buffer,a=t.offset;o[a]=e+n,o[a+1]=e+i,o[a+2]=e+r,t.offset=a+3}function P(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26),r=n(23),o=Object(i.a)({symbol:"circle",sinks:{fill:{stride:12,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.extender=new Int16Array(e,4),t.views.localID=new Uint32Array(e,8)},packObjectAttributes:function(t,e,n,i,o){return Object(r.c)([t,e],n,i,o)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,s){var c=t.getBucket(n.type,"fill",o.sinks.fill.packObjectAttributes(e,n.innerId,n.dataKeys,i,r),o.sinks.fill.binder),l=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),u=s[0][0],d=s[1][0];!function(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+0,l[u+1]=d+2,l[u+2]=d+1,l[u+3]=d+0,l[u+4]=d+3,l[u+5]=d+2,c.offset=u+6}(c),a(c,u,d,-1,-1,l),a(c,u,d,-1,1,l),a(c,u,d,1,1,l),a(c,u,d,1,-1,l)}});function a(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride>>1,s=a>>1;t.views.position[a]=e,t.views.position[a+1]=n,t.views.extender[a]=i,t.views.extender[a+1]=r,t.views.localID[s]=o,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(24),r=[{id:"__2gis_comm_poi",type:"point",style:{textFont:["Noto_Sans_Semibold",["step",["zoom"],"Noto_Sans",16,"Noto_Sans"]],iconImage:"peak",iconWidth:["interpolate",["linear"],["zoom"],15,22,16.8,30],textColor:"#3A3A3A",visibility:"visible",textFontSize:[["interpolate",["linear"],["zoom"],15.5,11,18,13],["interpolate",["linear"],["zoom"],15.5,10,18,12]],textHaloColor:"rgba(255,255,255,0.5)",textHaloWidth:.9,iconLabelingGroup:i.o,iconLabelingMargin:{leftRight:6,topBottom:6}},filter:["all",["match",["get","db_sublayer"],["Commercial_poi_default"],!0,!1],["any",["==",["in",["get","db_building_id"],["global","_activeFloorBuildingIds"]],!1],["in",["get","db_plan_id"],["global","_activeFloorIds"]]]],minzoom:15.1},{id:"__2gis_comm_poi_UAE",type:"point",style:{textFont:["Noto_Sans_Semibold",["step",["zoom"],"Noto_Sans",16,"Noto_Sans"]],iconImage:"peak",iconWidth:["interpolate",["linear"],["zoom"],15,22,16.8,30],textColor:"#3A3A3A",visibility:"visible",textFontSize:[["interpolate",["linear"],["zoom"],15.5,11,18,13],["interpolate",["linear"],["zoom"],15.5,10,18,12]],textHaloColor:"rgba(255,255,255,0.5)",textHaloWidth:.9,iconLabelingGroup:i.o,iconLabelingMargin:{leftRight:6,topBottom:6}},filter:["all",["match",["get","db_sublayer"],["Commercial_poi_default"],!0,!1],["match",["get","db_region"],[99],!0,!1],["any",["==",["in",["get","db_building_id"],["global","_activeFloorBuildingIds"]],!1],["in",["get","db_plan_id"],["global","_activeFloorIds"]]]],minzoom:14.1}]},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t={}),this.map=t}return t.prototype.set=function(t,e){var n=this.map[t[0]];void 0===n&&(n=this.map[t[0]]={}),n[t[1]]=e},t.prototype.get=function(t){if(void 0!==this.map[t[0]])return this.map[t[0]][t[1]]},t.prototype.serialize=function(){return this.map},t.prototype.forEach=function(t){for(var e in this.map)for(var n in this.map[e])t(this.map[e][n],Number(e),Number(n))},t.prototype.clear=function(){this.map={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(15),r=n(6),o=n(7),a=function(){this.dictionaries={},this.reverseDictionaries={},this.version="",this.defaultProps={},this.tileProps=i.d,this.tilePropsByIndex=Object(o.n)(i.d),this.hash=r.l}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(){function t(t){var e=this;this.fnRegistry=t,this.onClassCreate=function(t){var n,r,o=t.id,a=t.name,s=t.args,c=e.classes.get(a);if(c){var l=c.scope?new((n=c.ClassConstructor).bind.apply(n,Object(i.e)([void 0,c.scope],s))):new((r=c.ClassConstructor).bind.apply(r,Object(i.e)([void 0],s)));c.hosts.set(o,l)}else console.error("ClassRegistry#onClassCreate: class "+a+" not found")},this.onMethodUse=function(t){var n=t.id,i=t.name,r=t.method,o=t.args,a=e.classes.get(i);if(a){var s=a.hosts.get(n);if(s){if(s[r])return"destroy"===r&&a.hosts.delete(n),s[r].apply(s,o);console.error("ClassRegistry#onMethodUse: method "+r+" in instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: class "+i+" not found")},this.classes=new Map,this.idCounter=0,this.fnRegistry.set("createClass",this.onClassCreate),this.fnRegistry.set("classMethodUse",this.onMethodUse)}return t.prototype.set=function(t,e,n){var i=this,r={ClassConstructor:e,hosts:new Map,proxies:new Map,scope:n};return this.classes.set(t,r),{get:function(n){var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.id=i.idCounter++,i.fnRegistry.get(n,"createClass")({id:this.id,args:e,name:t})};return Object.getOwnPropertyNames(e.prototype).forEach((function(e){"constructor"!==e&&(r.prototype[e]=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return i.fnRegistry.get(n,"classMethodUse")({id:this.id,name:t,method:e,args:r})})})),r}}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return ut}));var i=n(0),r=n(25),o=n(14),a=n(3),s=n(15),c=n(35),l=n(31),u=n(60),d=n(40);function f(t,e,n,i,r,o){var a=r-n,s=o-i;if(0!==a||0!==s){var c=((t-n)*a+(e-i)*s)/(a*a+s*s);c>1?(n=r,i=o):c>0&&(n+=a*c,i+=s*c)}return(a=t-n)*a+(s=e-i)*s}function h(t,e,n,i,r){var o={id:null==t?null:t,index:r,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)p(o,n);else if("Polygon"===e)p(o,n[0]);else if("MultiLineString"===e)for(var a=0,s=n;a<s.length;a++)p(o,s[a]);else if("MultiPolygon"===e)for(var c=0,l=n;c<l.length;c++)p(o,l[c][0]);return o}function p(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function m(t,e,n,i){if(e.geometry){var r=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],c=e.id;if(n.promoteId?c=e.properties[n.promoteId]:n.generateId&&(c=i||0),"Point"===o)v(r,s);else if("MultiPoint"===o)for(var l=0,u=r;l<u.length;l++)v(u[l],s);else if("LineString"===o)_(r,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(var d=0,f=r;d<f.length;d++)_(f[d],s=[],a,!1),t.push(h(c,"LineString",s,e.properties,i));return}y(r,s,a,!1)}else if("Polygon"===o)y(r,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(var p=0,g=e.geometry.geometries;p<g.length;p++)m(t,{id:c,geometry:g[p],properties:e.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(var b=0,w=r;b<w.length;b++){var x=[];y(w[b],x,a,!0),s.push(x)}}t.push(h(c,o,s,e.properties,i))}}function v(t,e){e.push(g(t[0]),b(t[1]),0)}function _(t,e,n,i){for(var r,o,a=0,s=0;s<t.length;s++){var c=g(t[s][0]),l=b(t[s][1]);e.push(c,l,0),s>0&&(a+=i?(r*l-c*o)/2:Math.sqrt(Math.pow(c-r,2)+Math.pow(l-o,2))),r=c,o=l}var u=e.length-3;e[2]=1,function t(e,n,i,r){for(var o,a=r,s=i-n>>1,c=i-n,l=e[n],u=e[n+1],d=e[i],h=e[i+1],p=n+3;p<i;p+=3){var m=f(e[p],e[p+1],l,u,d,h);if(m>a)o=p,a=m;else if(m===a){var v=Math.abs(p-s);v<c&&(o=p,c=v)}}a>r&&(o-n>3&&t(e,n,o,r),e[o+2]=a,i-o>3&&t(e,o,i,r))}(e,0,u,n),e[u+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function y(t,e,n,i){for(var r=0;r<t.length;r++){var o=[];_(t[r],o,n,i),e.push(o)}}function g(t){return t/360+.5}function b(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function w(t,e,n,i,r,o,a,s){if(i/=e,o>=(n/=e)&&a<i)return t;if(a<n||o>=i)return null;for(var c=[],l=0,u=t;l<u.length;l++){var d=u[l],f=d.geometry,p=d.type,m=0===r?d.minX:d.minY,v=0===r?d.maxX:d.maxY;if(m>=n&&v<i)c.push(d);else if(!(v<n||m>=i)){var _=[];if("Point"===p||"MultiPoint"===p)x(f,_,n,i,r);else if("LineString"===p)S(f,_,n,i,r,!1,s.lineMetrics);else if("MultiLineString"===p)j(f,_,n,i,r,!1);else if("Polygon"===p)j(f,_,n,i,r,!0);else if("MultiPolygon"===p)for(var y=0,g=f;y<g.length;y++){var b=[];j(g[y],b,n,i,r,!0),b.length&&_.push(b)}if(_.length){if(s.lineMetrics&&"LineString"===p){for(var w=0,I=_;w<I.length;w++){var O=I[w];c.push(h(d.id,p,O,d.tags,d.index))}continue}"LineString"!==p&&"MultiLineString"!==p||(1===_.length?(p="LineString",_=_[0]):p="MultiLineString"),"Point"!==p&&"MultiPoint"!==p||(p=3===_.length?"Point":"MultiPoint"),c.push(h(d.id,p,_,d.tags,d.index))}}}return c.length?c:null}function x(t,e,n,i,r){for(var o=0;o<t.length;o+=3){var a=t[o+r];a>=n&&a<=i&&O(e,t[o],t[o+1],t[o+2])}}function S(t,e,n,i,r,o,a){for(var s,c,l=I(t),u=0===r?M:P,d=t.start,f=0;f<t.length-3;f+=3){var h=t[f],p=t[f+1],m=t[f+2],v=t[f+3],_=t[f+4],y=0===r?h:p,g=0===r?v:_,b=!1;a&&(s=Math.sqrt(Math.pow(h-v,2)+Math.pow(p-_,2))),y<n?g>n&&(c=u(l,h,p,v,_,n),a&&(l.start=d+s*c)):y>i?g<i&&(c=u(l,h,p,v,_,i),a&&(l.start=d+s*c)):O(l,h,p,m),g<n&&y>=n&&(c=u(l,h,p,v,_,n),b=!0),g>i&&y<=i&&(c=u(l,h,p,v,_,i),b=!0),!o&&b&&(a&&(l.end=d+s*c),e.push(l),l=I(t)),a&&(d+=s)}var w=t.length-3,x=t[w],S=t[w+1],j=t[w+2],L=0===r?x:S;L>=n&&L<=i&&O(l,x,S,j),w=l.length-3,o&&w>=3&&(l[w]!==l[0]||l[w+1]!==l[1])&&O(l,l[0],l[1],l[2]),l.length&&e.push(l)}function I(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function j(t,e,n,i,r,o){for(var a=0,s=t;a<s.length;a++)S(s[a],e,n,i,r,o,!1)}function O(t,e,n,i){t.push(e,n,i)}function M(t,e,n,i,r,o){var a=(o-e)/(i-e);return O(t,o,n+(r-n)*a,1),a}function P(t,e,n,i,r,o){var a=(o-n)/(r-n);return O(t,e+(i-e)*a,o,1),a}function L(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i],o=r.type,a=void 0;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=T(r.geometry,e);else if("MultiLineString"===o||"Polygon"===o){a=[];for(var s=0,c=r.geometry;s<c.length;s++){var l=c[s];a.push(T(l,e))}}else if("MultiPolygon"===o){a=[];for(var u=0,d=r.geometry;u<d.length;u++){for(var f=[],p=0,m=d[u];p<m.length;p++){var v=m[p];f.push(T(v,e))}a.push(f)}}n.push(h(r.id,o,a,r.tags,r.index))}return n}function T(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var i=0;i<t.length;i+=3)n.push(t[i]+e,t[i+1],t[i+2]);return n}function k(t,e){if(t.transformed)return t;for(var n=1<<t.z,i=t.x,r=t.y,o=0,a=t.features;o<a.length;o++){var s=a[o],c=s.geometry,l=s.type;if(s.geometry=[],1===l)for(var u=0;u<c.length;u+=2)s.geometry.push(C(c[u],c[u+1],e,n,i,r));else if(2===l)s.geometry=z(c,e,n,i,r);else for(var d=0;d<c.length;d++)s.geometry.push(z(c[d],e,n,i,r))}return t.transformed=!0,t}function z(t,e,n,i,r){for(var o=[],a=0;a<t.length;a++){for(var s=[],c=0;c<t[a].length;c+=2)s.push(C(t[a][c],t[a][c+1],e,n,i,r));o.push(s)}return o}function C(t,e,n,i,r,o){return[Math.round(n*(t*i-r)),Math.round(n*(e*i-o))]}function E(t,e,n,i,r){for(var o=e===r.maxZoom?0:r.tolerance/((1<<e)*r.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:n,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0,c=t;s<c.length;s++)A(a,c[s],o,r);return a}function A(t,e,n,i){var r=e.geometry,o=e.type,a=[];if(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),"Point"===o||"MultiPoint"===o)for(var s=0;s<r.length;s+=3)a.push(r[s],r[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)D(a,r,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o){for(var c=0;c<r.length;c++)D(a,r[c],t,n,"Polygon"===o,0===c);"Polygon"===o&&a.length&&(a=[a])}else if("MultiPolygon"===o)for(var l=0;l<r.length;l++){for(var u=r[l],d=[],f=0;f<u.length;f++)D(d,u[f],t,n,!0,0===f);d.length&&a.push(d)}if(a.length){var h=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in h={},e.tags)h[p]=e.tags[p];h.mapbox_clip_start=r.start/r.size,h.mapbox_clip_end=r.end/r.size}var m={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:h};null!==e.id&&(m.id=e.id),i.generateIndex&&(m.index=e.index),t.features.push(m)}}function D(t,e,n,i,r,o){var a=i*i;if(i>0&&e.size<(r?a:i))n.numPoints+=e.length/3;else{for(var s=[],c=0;c<e.length;c+=3)(0===i||e[c+2]>a)&&(n.numSimplified++,s.push(e[c],e[c+1])),n.numPoints++;r&&function(t,e){for(var n=0,i=0,r=t.length,o=r-2;i<r;o=i,i+=2)n+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(n>0===e)for(var a=0,s=t.length;a<s/2;a+=2){var c=t[a],l=t[a+1];t[a]=t[s-2-a],t[a+1]=t[s-1-a],t[s-2-a]=c,t[s-1-a]=l}}(s,o),t.push(s)}}var F={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!1,debug:0},R=function(){function t(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(F),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)m(n,t.features[i],e,i);else"Feature"===t.type?m(n,t,e,0):m(n,{geometry:t},e,0);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var n=e.buffer/e.extent,i=t,r=w(t,1,-1-n,n,0,-1,2,e),o=w(t,1,1-n,2+n,0,-1,2,e);return(r||o)&&(i=w(t,1,-n,1+n,0,-1,2,e)||[],r&&(i=L(r,1).concat(i)),o&&(i=i.concat(L(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),n&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}return t.prototype.splitTile=function(t,e,n,i,r,o,a){for(var s=[t,e,n,i],c=this.options,l=c.debug;s.length;){i=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,d=B(e,n,i),f=this.tiles[d];if(!f&&(l>1&&console.time("creation"),f=this.tiles[d]=E(t,e,n,i,c),this.tileCoords.push({z:e,x:n,y:i}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+e;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=t,null==r){if(e===c.indexMaxZoom||f.numPoints<=c.indexMaxPoints)continue}else{if(e===c.maxZoom||e===r)continue;if(null!=r){var p=r-e;if(n!==o>>p||i!==a>>p)continue}}if(f.source=null,0!==t.length){l>1&&console.time("clipping");var m=.5*c.buffer/c.extent,v=.5-m,_=.5+m,y=1+m,g=null,b=null,x=null,S=null,I=w(t,u,n-m,n+_,0,f.minX,f.maxX,c),j=w(t,u,n+v,n+y,0,f.minX,f.maxX,c);t=null,I&&(g=w(I,u,i-m,i+_,1,f.minY,f.maxY,c),b=w(I,u,i+v,i+y,1,f.minY,f.maxY,c),I=null),j&&(x=w(j,u,i-m,i+_,1,f.minY,f.maxY,c),S=w(j,u,i+v,i+y,1,f.minY,f.maxY,c),j=null),l>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*n,2*i),s.push(b||[],e+1,2*n,2*i+1),s.push(x||[],e+1,2*n+1,2*i),s.push(S||[],e+1,2*n+1,2*i+1)}}},t.prototype.getTile=function(t,e,n){t=+t,e=+e,n=+n;var i=this.options,r=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=B(t,e=e+a&a-1,n);if(this.tiles[s])return k(this.tiles[s],r);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var c,l=t,u=e,d=n;!c&&l>0;)l--,u>>=1,d>>=1,c=this.tiles[B(l,u,d)];return c&&c.source?(o>1&&(console.log("found parent tile z%d-%d-%d",l,u,d),console.time("drilling down")),this.splitTile(c.source,l,u,d,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?k(this.tiles[s],r):null):null},t}();function B(t,e,n){return 32*((1<<t)*n+e)+t}var N=n(2),U=n(64),Z=n(6),H=n(7);function G(t,e){var n=[];return t.geometry.forEach((function(i){var r=[],o=[],a=[];i.forEach((function(t){a.push.apply(a,function(t,e){for(var n=[],i=[],r=0;r<t.length;r++){var o=t[r];if(i.push(Y(o,e)),X(o,e)){var a=t[r+1];if(!a)break;K(o,a,e)&&(i.length>1&&n.push(i),i=[])}}return i.length>1&&n.push(i),n}(t,e)),r.length&&o.push(r.length),r.push.apply(r,t)}));for(var s=[],c=0;c<r.length;c++)s.push(r[c][0]),s.push(r[c][1]);var l=U(s,o),d=N.d(),f=function(i){for(var o=[[],[],[]],s=0;s<3;s++)q(d,r[l[i+2-s]],e),o[0][s]=d[0],o[1][s]=d[1],o[2][s]=0;a.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){e[0][n]=t[0],e[1][n]=t[1]})),Object(u.a)(o,e)})),n.push({tags:t.tags,id:t.id,index:t.index,type:"polygon",vertices:o})};for(c=0;c<l.length;c+=3)f(c)})),n}function W(t,e){var n=N.d();return t.geometry.map((function(i){var r=[[],[]];return i.forEach((function(t,i){q(n,t,e),r[0][i]=n[0],r[1][i]=n[1]})),{tags:t.tags,id:t.id,index:t.index,type:"line",vertices:r}}))}function V(t,e){var n=N.d();return t.geometry.map((function(i){return q(n,i,e),{tags:t.tags,id:t.id,index:t.index,type:"point",vertices:[[n[0]],[n[1]]]}}))}function q(t,e,n){var i=Y(e,n);t[0]=i[0],t[1]=i[1],t[2]=e[2]}function Y(t,e){return[Object(H.c)(t[0]/e*Z.j,0,Z.j),Object(H.c)((e-t[1])/e*Z.j,0,Z.j)]}function X(t,e){return t[0]<0||t[0]>e||t[1]<0||t[1]>e}function K(t,e,n){return t[0]>n&&e[0]>n||t[0]<0&&e[0]<0||t[1]>n&&e[1]>n||t[1]<0&&e[1]<0}var J={maxZoom:d.b,tolerance:3,extent:4096,buffer:1,debug:0,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!0,indexMaxZoom:0,indexMaxPoints:1e5},Q=function(){function t(t){this.options=t}return t.prototype.fetchTile=function(t){var e=Object(a.A)(t),n=e[0],i=e[1],r=e[2],o={components:[]},s=this.geoJsonVtInstance.getTile(r,n,i);if(!s)return Promise.resolve(o);for(var c=0,l=s.features;c<l.length;c++){var u=l[c];switch(u.type){case 1:o.components=o.components.concat(V(u,4096));break;case 2:o.components=o.components.concat(W(u,4096));break;case 3:o.components=o.components.concat(G(u,4096));break;default:console.warn("unsupported type ",s)}}return Promise.resolve(o)},t.prototype.destroy=function(){this.geoJsonVT=void 0},Object.defineProperty(t.prototype,"geoJsonVtInstance",{get:function(){var t,e,n;return this.geoJsonVT||(this.geoJsonVT=(e=this.options.data,n=Object(i.a)(Object(i.a)({},J),{maxZoom:null!==(t=this.options.maxZoom)&&void 0!==t?t:J.maxZoom}),new R(e,n))),this.geoJsonVT},enumerable:!1,configurable:!0}),t}(),$=n(5);function tt(t,e){switch(t.type){case"Point":e(t.coordinates);break;case"LineString":case"MultiPoint":t.coordinates.forEach(e);break;case"Polygon":case"MultiLineString":t.coordinates.forEach((function(t){return t.forEach(e)}));break;case"MultiPolygon":t.coordinates.forEach((function(t){return t.forEach((function(t){return t.forEach(e)}))}))}}function et(t,e){var n={components:[]};return t.features.forEach((function(t,r){var o;(o=n.components).push.apply(o,function t(e,n){switch(e.type){case"GeometryCollection":var i=[];return e.geometries.forEach((function(e){i=i.concat(t(e,n))})),i;case"Point":case"MultiPoint":return function(t,e){return"Point"===t.type?[nt(t.coordinates,e)]:t.coordinates.map((function(t){return nt(t,e)}))}(e,n);case"LineString":case"MultiLineString":return function(t,e){return"LineString"===t.type?[it(t.coordinates,e)]:t.coordinates.map((function(t){return it(t,e)}))}(e,n);case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?rt(t.coordinates,e):t.coordinates.reduce((function(t,n){return t.concat(rt(n,e))}),[])}(e,n)}}(t.geometry,e).map((function(e){return Object(i.a)(Object(i.a)({},e),{index:r,id:t.id,tags:t.properties||{}})})))})),n}function nt(t,e){var n=[0,0,0];return Object(a.t)(n,Object($.l)(t),e),{type:"point",vertices:[[n[0]],[n[1]]]}}function it(t,e){var n=[[],[]],i=[0,0,0];return t.forEach((function(t,r){Object(a.t)(i,Object($.l)(t),e),n[0][r]=i[0],n[1][r]=i[1]})),{type:"line",vertices:n}}function rt(t,e){var n=[],i=[],r=[],o=[],s=[];t.forEach((function(t){var n=t.map((function(t){return Object(a.t)(s,Object($.l)(t),e),[Math.max(Math.min(s[0],65535),0),Math.max(Math.min(s[1],65535),0)]}));o.push(n),i.length&&r.push(i.length),i.push.apply(i,n)}));for(var c=[],l=0;l<i.length;l++)c.push(i[l][0]),c.push(i[l][1]);var d=U(c,r),f=function(t){for(var e=[[],[],[]],r=0;r<3;r++)e[0][r]=i[d[t+r]][0],e[1][r]=i[d[t+r]][1],e[2][r]=0;o.forEach((function(t){var n=[[],[],[]];t.forEach((function(t,e){n[0][e]=t[0],n[1][e]=t[1]})),Object(u.a)(e,n)})),n.push({type:"polygon",vertices:e})};for(l=0;l<d.length;l+=3)f(l);return n}var ot=n(80),at=n(29),st=n(1),ct=function(){function t(t){var e=this;this.tileLoader=new ot.a("json"),this.options=t,this.url=function(t){var n=e.options.flipY?t:Object(a.A)(t),i=n[0],r=n[1],o=n[2];return Object(at.c)(e.options.url,{x:i.toString(),y:r.toString(),z:o.toString(),subdomain:st.tiles.subdomains[Math.abs(i+r)%st.tiles.subdomains.length]})}}return t.prototype.fetchTile=function(t){var e=this;return this.tileLoader.fetch(t,this.url).then((function(n){if(!n)return{components:[]};if(e.options.hillshadeEncoded){var i=Object(a.A)(t),r=i[0],o=i[1],s=i[2],c=0,l=0;u=function(t){var e,n;c-=t[0],l-=t[1],t[0]=(e=r+c/d.c,n=s,e/Math.pow(2,n)*360-180),t[1]=function(t,e){var n=Math.PI-2*Math.PI*t/Math.pow(2,e);return 180/Math.PI*Math.atan(.5*(Math.exp(n)-Math.exp(-n)))}(o+l/d.c,s)},n.features.forEach((function(t){"GeometryCollection"===t.geometry.type?t.geometry.geometries.forEach((function(t){return tt(t,u)})):tt(t.geometry,u)}))}var u;return et(n,Object(a.e)(t))}))},t.prototype.abortTile=function(t){this.tileLoader.abortRequest(Object(a.c)(t))},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),lt=n(4),ut=function(){function t(t,e,n){this.scope=t,this.options=e,this.id=n,t.sources[n]=this,this.tileData={},this.styleManager=t.styleManager,this.collector=t.collector,this.sourceAttrs=this.options.attributes||{},this.metatile=Object(u.b)(),this.tileServer="url"in e?new ct(e):new Q(e)}return t.prototype.fetchTile=function(t){var e=this,n=Object(a.c)(t);return this.tileData[n]?Promise.resolve(this.tileData[n]):this.tileServer.fetchTile(t).then((function(t){return e.tileData[n]=t,t}))},t.prototype.abortTileFetch=function(t){this.tileServer instanceof ct&&this.tileServer.abortTile(t)},t.prototype.generateTile=function(t,e,n,i){var d=this,f=Object(a.c)(e),h=this.tileData[f],p=Object(a.e)(e),m=[],v=[],_=this.styleManager.getStyle(t.handyStyleId),y=new l.a,g=new l.a(n);if(!_)return Promise.resolve({results:m,transferable:v});h&&h.components.forEach((function(e){var n=d.metatile.tileProps,a=[],f=Object.keys(e.tags);Object(s.b)(d.metatile,f);for(var h=0,m=f;h<m.length;h++)a[n[x=m[h]]]=e.tags[x];var v=Object.keys(d.sourceAttrs);Object(s.b)(d.metatile,v);for(var b=0,w=v;b<w.length;b++){var x;a[n[x=w[b]]]=d.sourceAttrs[x]}var S="url"in d.options&&d.options.preventInteractions?NaN:[e.index,d.id];if(Array.isArray(S)){var I=g.has(S);a[n.selected]=I?1:0,y.add(S)}var j=p.coords,O=j[3],M=Object(c.c)(i),P=Object(lt.e)(d.metatile,t.styleState,d.sourceAttrs,n,a),L=d.styleManager.getLayers(_.id,n,a).filter((function(t){return Object(u.c)(e.type,t.type)})).filter((function(t){return Object(lt.h)(t.filter,P)}));a[n.id]=S,d.options.identifyAsDefaultSource&&(a[n.id]=Object(r.b)(a[n.db_id])),"point"!==e.type&&"line"!==e.type||(void 0===a[n.db_label]&&(a[n.db_label]=NaN),void 0===a[n.db_label2]&&(a[n.db_label2]=NaN)),"line"===e.type&&(a[n.componentDistanceStart]=0,a[n.objectLength]=Object(u.d)(e),a[n.beginningIsCut]=0,a[n.endingIsCut]=0),Object(o.a)(d.collector,_,L,O,d.metatile,n,a,d.id,d.sourceAttrs,t.styleState,j,M,e.vertices,new l.a)})),this.collector.setGeoIds(new Uint32Array(y.toFlatArray()));var b=this.collector.getAccumulatedData();return m.push({regionId:0,metatileHash:Z.h,collectorOutput:b,styleId:_.id}),v.push.apply(v,b.transferable),this.scope.debouncedResetCollector(),this.scope.syncNewRasterSets(),Promise.resolve({results:m,transferable:v})},t.prototype.getObjectAttributes=function(t,e){var n=this.tileData[e];if(n){var i=n.components.find((function(e){return e.index===t}));if(i)return i.tags}},t.prototype.deleteTile=function(t){delete this.tileData[Object(a.c)(t)]},t.prototype.setSourceAttrs=function(t){this.sourceAttrs=t},t.prototype.destroy=function(){delete this.scope.sources[this.id],this.tileData={},this.sourceAttrs={},this.tileServer.destroy()},t.prototype.setData=function(t){if("string"==typeof t){if(this.tileServer instanceof ct)return this.tileServer.destroy(),this.options=Object(i.a)(Object(i.a)({},this.options),{url:t}),this.tileServer=new ct(this.options),this.tileData={},Promise.resolve(!0)}else if(this.tileServer instanceof Q)return this.tileServer.destroy(),this.options=Object(i.a)(Object(i.a)({},this.options),{data:t}),this.tileServer=new Q(this.options),this.tileData={},Promise.resolve(!0);return Promise.resolve(!1)},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(18);function o(t){return"boolean"!=typeof t&&"attrs"===t.type}function a(t){return"boolean"!=typeof t&&"unextractable"===t.type}function s(t){if(!Object(r.d)(t))return[Boolean(t)];var e=[],n=[];switch(t.type){case"all":for(var i=0,l=t.array.map(s);i<l.length;i++){for(var u=[],d=0,f=l[i];d<f.length;d++){var h=f[d];if(!1===h)return[!1];o(h)?u.push(h):a(h)&&n.push(h)}u.length>0&&(e=0===e.length?u:c(e,u))}break;case"match":if(!Object(r.d)(t.input)||"get"!==t.input.type&&"sourceAttr"!==t.input.type)return[{type:"unextractable",exp:t}];for(var p=t.input.property,m=function(t){var i=s(t.output),r=[];t.values.forEach((function(t){var e;r.push({type:"attrs",attrs:(e={},e[p]=t,e)})}));for(var l=0,u=i;l<u.length;l++){var d=u[l];if(o(d))for(var f=0,h=c([d],r);f<h.length;f++){var m=h[f];e.push(m)}else if(a(d)){n.push(d);for(var v=0,_=r;v<_.length;v++){var y=_[v];e.push(y)}}else if(!0===d)for(var g=0,b=r;g<b.length;g++)y=b[g],e.push(y)}},v=0,_=t.cases;v<_.length;v++)m(_[v]);break;default:return[{type:"unextractable",exp:t}]}return e.concat(n)}function c(t,e){for(var n=[],r=0,o=t;r<o.length;r++)for(var a=o[r],s=0,c=e;s<c.length;s++){var l=c[s];n.push({type:"attrs",attrs:Object(i.a)(Object(i.a)({},a.attrs),l.attrs)})}return n}var l=function(){function t(){this.layers=[],this.keyStat={},this.orderedKeys=[],this.tree=null,this.treeNodesCount=0,this.traverseCount=0,this.traverseIterations=0}return t.prototype.addLayers=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];"custom"!==i.type&&i.filter&&(this.layers.push(i),this.statLayerKeys(i))}this.buildTree()},t.prototype.getLayers=function(t,e){var n=this,i=[],r=function(o,a){if(n.traverseIterations+=1,o){for(var s=0,c=o.leafs;s<c.length;s++){var l=c[s];i.push(l)}var u=n.orderedKeys[a];if(u){var d=e[t[u]];void 0!==d?(r(o.children[d],a+1),r(o.novalue,a+1)):r(o.novalue,a+1)}}};return this.traverseCount+=1,r(this.tree,0),i},t.prototype.stat=function(){var t=this.traverseIterations/this.traverseCount||0;return{tree:this.tree,treeNodes:this.treeNodesCount,layers:this.layers.length,keyStat:this.keyStat,itersPerTraverse:t}},t.prototype.statLayerKeys=function(t){var e=s(t.filter).filter((function(t){return o(t)}))[0];if(e&&o(e))for(var n in e.attrs)void 0===this.keyStat[n]&&(this.keyStat[n]=0),this.keyStat[n]+=1},t.prototype.getOrderedKeys=function(){return Object.entries(this.keyStat).sort((function(t,e){t[0];var n=t[1];return e[0],e[1]-n})).map((function(t){var e=t[0];return t[1],e}))},t.prototype.buildTree=function(){this.orderedKeys=this.getOrderedKeys();for(var t=[],e=0,n=this.layers;e<n.length;e++){var i=n[e],r=s(i.filter).filter(o);0===r.length&&t.push(i);for(var a=0,c=r;a<c.length;a++)for(var l=c[a],u=new Set(Object.keys(l.attrs)),d=0,f=l.attrs,h=this.tree,p=0;p<=this.orderedKeys.length;p++){if(d===u.size){null==h||h.leafs.push(i);break}var m=this.orderedKeys[p],v=this.orderedKeys[p+1]||"";if(h||(h=this.makeTreeNode(m),null===this.tree&&(this.tree=h)),u.has(m)){var _=f[m];h.children[_]||(h.children[_]=this.makeTreeNode(v)),h=h.children[_],d+=1}else h.novalue||(h.novalue=this.makeTreeNode(v)),h=h.novalue}}t.length>0&&(this.tree||(this.tree=this.makeTreeNode("")),this.tree.leafs=t)},t.prototype.makeTreeNode=function(t){return this.treeNodesCount+=1,{key:t,children:{},novalue:null,leafs:[]}},t}(),u=function(){function t(){this.metaStyles=new Map,this.layerTrees=new Map}return t.prototype.proxySyncStyle=function(t){var e=new l;e.addLayers(t.layers),this.layerTrees.set(t.id,e),this.metaStyles.set(t.id,t)},t.prototype.getStyle=function(t){return this.metaStyles.get(t)},t.prototype.getLayers=function(t,e,n){var i=this.layerTrees.get(t);return i?i.getLayers(e,n):[]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(33),r=n(28),o=n(3);function a(t){var e=t.currentMod;return void 0!==e&&e.ready}function s(t,e){var n=t.currentMod;return void 0!==n&&void 0!==e[n.key]}function c(t,e){var n=e.currentMod;void 0!==n&&(t[n.key]=n)}function l(t,e,n){for(var i=0,r=e;i<r.length;i++)for(var a=r[i],s=0,c=Object(o.v)(n,a);s<c.length;s++)l=t,void 0!==(u=c[s].currentMod)&&delete l[u.key];var l,u}var u=n(27);function d(t,e,n){for(var i in function(t,e,n){for(var i in t.tiles)Object(u.n)(t.tiles[i],t.tileModsCache,e,n)}(t,e,n),f(t),p(t),t.displayedMods)t.tileModsCache.get(i);(function(t){var e=t.tiles,n=t.displayedMods,i=t.viewportTiles;for(var r in e)if(!i.includes(r)){var o=e[r],a=o.currentMod;a&&!n[a.key]&&Object(u.j)(o)}})(t),m(t)}function f(t){var e=t.tilesAppearance,n=t.tiles,o=t.viewportTiles;switch(e){case i.a.ByOne:h(n,o);break;case i.a.WaitingAll:Object(r.j)(n,o)&&(t.tilesAppearance=i.a.ByOne,h(n,o))}}function h(t,e){for(var n=0;n<e.length;n++){var i=e[n];Object(u.c)(t[i])}}function p(t){var e=t.tiles,n=t.viewportTiles,r=t.zoomDirection,u=t.zoomStartZoom,d=t.maxZoomLevel,f=t.zoomLevel,h=t.displayedMods;switch(r){case i.b.Stationary:t.displayedMods=function(t,e){for(var n={},i=0,r=e;i<r.length;i++){var o=t[r[i]];a(o)&&c(n,o)}return n}(e,n);break;case i.b.ZoomingIn:t.displayedMods=function(t,e,n,i,r){for(var u={},d=[],f=0,h=e;f<h.length;f++){var p=t[h[f]];if(a(p))c(u,p);else for(var m=p.detailLevel-1;m>=i;m--){var v=Object(o.w)(t,p,m,r);if(void 0!==v&&!d.includes(v)&&a(v)&&s(v,n)){c(u,v),d.push(v);break}}}return l(u,d,t),u}(e,n,h,u,d);break;case i.b.ZoomingOut:t.displayedMods=function(t,e,n,i,r,u){var d={},f=[],h=new Set(e);for(var p in t){var m=t[p];h.has(m.key)?a(m)&&(c(d,m),f.push(m)):m.detailLevel>r||m.detailLevel<i||h.has(Object(o.k)(m,i,u))&&a(m)&&s(m,n)&&(c(d,m),m.detailLevel<r&&f.push(m))}return l(d,f,t),d}(e,n,h,f,u,d)}}function m(t){switch(t.zoomDirection){case i.b.ZoomingIn:(t.zoomLevel<=t.zoomStartZoom||v(t))&&(t.zoomDirection=i.b.Stationary,t.zoomStartZoom=t.zoomLevel);break;case i.b.ZoomingOut:(t.zoomLevel>=t.zoomStartZoom||v(t))&&(t.zoomDirection=i.b.Stationary,t.zoomStartZoom=t.zoomLevel)}}function v(t){for(var e=t.tiles,n=t.viewportTiles,i=t.displayedMods,r=0;r<n.length;r++){var o=e[n[r]],a=Object(u.h)(o);if(!a)return!1;if(void 0===i[a.key])return!1}return!0}},function(t,e,n){"use strict";var i=e.TileRequestUrl={};i.read=function(t,e){return t.readFields(i._readField,{tiles:[]},e)},i._readField=function(t,e,n){1===t&&e.tiles.push(i.Tile.read(n,n.readVarint()+n.pos))},i.write=function(t,e){if(t.tiles)for(var n=0;n<t.tiles.length;n++)e.writeMessage(1,i.Tile.write,t.tiles[n])},i.Tile={},i.Tile.read=function(t,e){return t.readFields(i.Tile._readField,{x:0,y:0,zoom:0},e)},i.Tile._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t&&(e.zoom=n.readVarint())},i.Tile.write=function(t,e){t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom)};var r=e.TileResponseData={};r.read=function(t,e){return t.readFields(r._readField,{tileGroups:[]},e)},r._readField=function(t,e,n){1===t&&e.tileGroups.push(r.TileGroup.read(n,n.readVarint()+n.pos))},r.write=function(t,e){if(t.tileGroups)for(var n=0;n<t.tileGroups.length;n++)e.writeMessage(1,r.TileGroup.write,t.tileGroups[n])},r.TileGroup={},r.TileGroup.read=function(t,e){return t.readFields(r.TileGroup._readField,{x:0,y:0,zoom:0,tiles:[]},e)},r.TileGroup._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t?e.zoom=n.readVarint():4===t&&e.tiles.push(r.TileGroup.Tile.read(n,n.readVarint()+n.pos))},r.TileGroup.write=function(t,e){if(t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom),t.tiles)for(var n=0;n<t.tiles.length;n++)e.writeMessage(4,r.TileGroup.Tile.write,t.tiles[n])},r.TileGroup.Tile={},r.TileGroup.Tile.read=function(t,e){return t.readFields(r.TileGroup.Tile._readField,{regionId:0,hash:null,data:null},e)},r.TileGroup.Tile._readField=function(t,e,n){1===t?e.regionId=n.readVarint():2===t?e.hash=n.readBytes():3===t&&(e.data=n.readBytes())},r.TileGroup.Tile.write=function(t,e){t.regionId&&e.writeVarintField(1,t.regionId),t.hash&&e.writeBytesField(2,t.hash),t.data&&e.writeBytesField(3,t.data)}},function(t,e,n){function i(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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.oe=function(t){throw console.error(t),t};var i=n(n.s=ENTRY_MODULE);return i.default||i}function r(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(t,e,i){var o={};o[i]=[];var a=e.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var c,l=s[1],u=new RegExp("(\\\\n|\\W)"+r(l)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");c=u.exec(a);)"dll-reference"!==c[3]&&o[i].push(c[3]);for(u=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");c=u.exec(a);)t[c[2]]||(o[i].push(c[1]),t[c[2]]=n(c[1]).m),o[c[2]]=o[c[2]]||[],o[c[2]].push(c[4]);for(var d,f=Object.keys(o),h=0;h<f.length;h++)for(var p=0;p<o[f[h]].length;p++)d=o[f[h]][p],isNaN(1*d)||(o[f[h]][p]=1*o[f[h]][p]);return o}function a(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}t.exports=function(t,e){e=e||{};var r={main:n.m},s=e.all?{main:Object.keys(r.main)}:function(t,e){for(var n={main:[e]},i={main:[]},r={main:{}};a(n);)for(var s=Object.keys(n),c=0;c<s.length;c++){var l=s[c],u=n[l].pop();if(r[l]=r[l]||{},!r[l][u]&&t[l][u]){r[l][u]=!0,i[l]=i[l]||[],i[l].push(u);for(var d=o(t,t[l][u],l),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return i}(r,t),c="";Object.keys(s).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;s[t][e];)e++;s[t].push(e),r[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",c=c+"var "+t+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s[t].map((function(e){return JSON.stringify(e)+": "+r[t][e].toString()})).join(",")+"});\n"})),c=c+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s.main.map((function(t){return JSON.stringify(t)+": "+r.main[t].toString()})).join(",")+"}))(self);";var l=new window.Blob([c],{type:"text/javascript"});if(e.bare)return l;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),d=new window.Worker(u);return d.objectURL=u,d}},function(t,e){var n="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function o(t){return 3*t}function a(t,e,n){return((i(e,n)*t+r(e,n))*t+o(e))*t}function s(t,e,n){return 3*i(e,n)*t*t+2*r(e,n)*t+o(e)}function c(t){return t}t.exports=function(t,e,i,r){if(!(0<=t&&t<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&i===r)return c;for(var o=n?new Float32Array(11):new Array(11),l=0;l<11;++l)o[l]=a(.1*l,t,i);function u(e){for(var n=0,r=1;10!==r&&o[r]<=e;++r)n+=.1;--r;var c=n+(e-o[r])/(o[r+1]-o[r])*.1,l=s(c,t,i);return l>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var o=s(e,n,i);if(0===o)return e;e-=(a(e,n,i)-t)/o}return e}(e,c,t,i):0===l?c:function(t,e,n,i,r){var o,s,c=0;do{(o=a(s=e+(n-e)/2,i,r)-t)>0?n=s:e=s}while(Math.abs(o)>1e-7&&++c<10);return s}(e,n,n+.1,t,i)}return function(t){return 0===t?0:1===t?1:a(u(t),e,r)}}},function(t,e,n){"use strict";var i=e.Complex={};i.read=function(t,e){return t.readFields(i._readField,{id:"",name:"",address:"",type:0,regionId:0,branchId:"",branchCount:0,buildings:[],hull:[],tileCoords:[],center:[],centroid:[],scaleFactor:0,viewAngle:0,bound:null,floorCount:0,defaultFloor:0,floorNames:[],entities:[],floorGeometries:[],outdoors:[],metaRubrics:[],version:0,hybrids:[]},e)},i._readField=function(t,e,n){1===t?e.id=n.readString():2===t?e.name=n.readString():3===t?e.address=n.readString():4===t?e.type=n.readVarint():5===t?e.regionId=n.readVarint():6===t?e.branchId=n.readString():7===t?e.branchCount=n.readVarint():8===t?e.buildings.push(n.readString()):9===t?n.readPackedSVarint(e.hull):10===t?n.readPackedDouble(e.tileCoords):11===t?n.readPackedSVarint(e.center):12===t?n.readPackedDouble(e.centroid):13===t?e.scaleFactor=n.readDouble():14===t?e.viewAngle=n.readDouble():15===t?e.bound=i.Bound.read(n,n.readVarint()+n.pos):16===t?e.floorCount=n.readVarint():17===t?e.defaultFloor=n.readVarint():18===t?e.floorNames.push(n.readString()):19===t?e.entities.push(i.Entity.read(n,n.readVarint()+n.pos)):20===t?e.floorGeometries.push(i.Floor.read(n,n.readVarint()+n.pos)):21===t?e.outdoors.push(i.OutdoorObject.read(n,n.readVarint()+n.pos)):22===t?e.metaRubrics.push(i.Metarubric.read(n,n.readVarint()+n.pos)):23===t?e.version=n.readVarint():24===t&&e.hybrids.push(n.readString())},i.write=function(t,e){if(t.id&&e.writeStringField(1,t.id),t.name&&e.writeStringField(2,t.name),t.address&&e.writeStringField(3,t.address),t.type&&e.writeVarintField(4,t.type),t.regionId&&e.writeVarintField(5,t.regionId),t.branchId&&e.writeStringField(6,t.branchId),t.branchCount&&e.writeVarintField(7,t.branchCount),t.buildings)for(var n=0;n<t.buildings.length;n++)e.writeStringField(8,t.buildings[n]);if(t.hull&&e.writePackedSVarint(9,t.hull),t.tileCoords&&e.writePackedDouble(10,t.tileCoords),t.center&&e.writePackedSVarint(11,t.center),t.centroid&&e.writePackedDouble(12,t.centroid),t.scaleFactor&&e.writeDoubleField(13,t.scaleFactor),t.viewAngle&&e.writeDoubleField(14,t.viewAngle),t.bound&&e.writeMessage(15,i.Bound.write,t.bound),t.floorCount&&e.writeVarintField(16,t.floorCount),t.defaultFloor&&e.writeVarintField(17,t.defaultFloor),t.floorNames)for(n=0;n<t.floorNames.length;n++)e.writeStringField(18,t.floorNames[n]);if(t.entities)for(n=0;n<t.entities.length;n++)e.writeMessage(19,i.Entity.write,t.entities[n]);if(t.floorGeometries)for(n=0;n<t.floorGeometries.length;n++)e.writeMessage(20,i.Floor.write,t.floorGeometries[n]);if(t.outdoors)for(n=0;n<t.outdoors.length;n++)e.writeMessage(21,i.OutdoorObject.write,t.outdoors[n]);if(t.metaRubrics)for(n=0;n<t.metaRubrics.length;n++)e.writeMessage(22,i.Metarubric.write,t.metaRubrics[n]);if(t.version&&e.writeVarintField(23,t.version),t.hybrids)for(n=0;n<t.hybrids.length;n++)e.writeStringField(24,t.hybrids[n])},i.ComplexType={mall:{value:0,options:{}},other:{value:1,options:{}},office:{value:2,options:{}}},i.Metarubric={},i.Metarubric.read=function(t,e){return t.readFields(i.Metarubric._readField,{id:"",orgCount:0},e)},i.Metarubric._readField=function(t,e,n){1===t?e.id=n.readString():2===t&&(e.orgCount=n.readVarint())},i.Metarubric.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.orgCount&&e.writeVarintField(2,t.orgCount)},i.Bound={},i.Bound.read=function(t,e){return t.readFields(i.Bound._readField,{min:[],max:[]},e)},i.Bound._readField=function(t,e,n){1===t?n.readPackedSVarint(e.min):2===t&&n.readPackedSVarint(e.max)},i.Bound.write=function(t,e){t.min&&e.writePackedSVarint(1,t.min),t.max&&e.writePackedSVarint(2,t.max)},i.Entity={},i.Entity.read=function(t,e){return t.readFields(i.Entity._readField,{id:"",sublayer:"",coordinates:[],iconId:0,areaId:0,firmId:"",floorIndex:0,floorName:"",text:"",layer:"",priority:0,textPriority:0,type:0,text2:"",humanReadableIconId:""},e)},i.Entity._readField=function(t,e,n){1===t?e.id=n.readString():2===t?e.sublayer=n.readString():3===t?n.readPackedVarint(e.coordinates):4===t?e.iconId=n.readVarint():5===t?e.areaId=n.readVarint():6===t?e.firmId=n.readString():7===t?e.floorIndex=n.readVarint():8===t?e.floorName=n.readString():9===t?e.text=n.readString():10===t?e.layer=n.readString():11===t?e.priority=n.readVarint(!0):12===t?e.textPriority=n.readVarint(!0):13===t?e.type=n.readVarint():14===t?e.text2=n.readString():15===t&&(e.humanReadableIconId=n.readString())},i.Entity.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.sublayer&&e.writeStringField(2,t.sublayer),t.coordinates&&e.writePackedVarint(3,t.coordinates),t.iconId&&e.writeVarintField(4,t.iconId),t.areaId&&e.writeVarintField(5,t.areaId),t.firmId&&e.writeStringField(6,t.firmId),t.floorIndex&&e.writeVarintField(7,t.floorIndex),t.floorName&&e.writeStringField(8,t.floorName),t.text&&e.writeStringField(9,t.text),t.layer&&e.writeStringField(10,t.layer),t.priority&&e.writeVarintField(11,t.priority),t.textPriority&&e.writeVarintField(12,t.textPriority),t.type&&e.writeVarintField(13,t.type),t.text2&&e.writeStringField(14,t.text2),t.humanReadableIconId&&e.writeStringField(15,t.humanReadableIconId)},i.Floor={},i.Floor.read=function(t,e){return t.readFields(i.Floor._readField,{name:"",rooms:[],ids:[]},e)},i.Floor._readField=function(t,e,n){1===t?e.name=n.readString():2===t?e.rooms.push(i.Room.read(n,n.readVarint()+n.pos)):3===t&&e.ids.push(n.readString())},i.Floor.write=function(t,e){if(t.name&&e.writeStringField(1,t.name),t.rooms)for(var n=0;n<t.rooms.length;n++)e.writeMessage(2,i.Room.write,t.rooms[n]);if(t.ids)for(n=0;n<t.ids.length;n++)e.writeStringField(3,t.ids[n])},i.Room={},i.Room.read=function(t,e){return t.readFields(i.Room._readField,{id:0,type:0,sublayer:"",isIsland:!1,firmIds:[],area:[],wallSide:[],wallTop:[],areaSublayer:"",wallSublayer:""},e)},i.Room._readField=function(t,e,n){1===t?e.id=n.readVarint():2===t?e.type=n.readVarint():3===t?e.sublayer=n.readString():4===t?e.isIsland=n.readBoolean():5===t?e.firmIds.push(n.readString()):6===t?e.area.push(n.readBytes()):7===t?e.wallSide.push(n.readBytes()):8===t?e.wallTop.push(n.readBytes()):9===t?e.areaSublayer=n.readString():10===t&&(e.wallSublayer=n.readString())},i.Room.write=function(t,e){if(t.id&&e.writeVarintField(1,t.id),t.type&&e.writeVarintField(2,t.type),t.sublayer&&e.writeStringField(3,t.sublayer),t.isIsland&&e.writeBooleanField(4,t.isIsland),t.firmIds)for(var n=0;n<t.firmIds.length;n++)e.writeStringField(5,t.firmIds[n]);if(t.area)for(n=0;n<t.area.length;n++)e.writeBytesField(6,t.area[n]);if(t.wallSide)for(n=0;n<t.wallSide.length;n++)e.writeBytesField(7,t.wallSide[n]);if(t.wallTop)for(n=0;n<t.wallTop.length;n++)e.writeBytesField(8,t.wallTop[n]);t.areaSublayer&&e.writeStringField(9,t.areaSublayer),t.wallSublayer&&e.writeStringField(10,t.wallSublayer)},i.OutdoorObject={},i.OutdoorObject.read=function(t,e){return t.readFields(i.OutdoorObject._readField,{type:"",vertices:[],width:0},e)},i.OutdoorObject._readField=function(t,e,n){1===t?e.type=n.readString():2===t?e.vertices.push(n.readBytes()):3===t&&(e.width=n.readDouble())},i.OutdoorObject.write=function(t,e){if(t.type&&e.writeStringField(1,t.type),t.vertices)for(var n=0;n<t.vertices.length;n++)e.writeBytesField(2,t.vertices[n]);t.width&&e.writeDoubleField(3,t.width)}},function(t,e,n){"use strict";t.exports=r,t.exports.default=r;var i=n(111);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],c(r,t.leaf?i(o):o);return r}function c(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function h(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,n,r,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=r||(a=e+Math.ceil((n-e)/r/2)*r,i(t,a,e,n,o),s.push(e,a,a,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!p(t,e))return n;for(var r,o,a,s,c=[];e;){for(r=0,o=e.children.length;r<o;r++)a=e.children[r],p(t,s=e.leaf?i(a):a)&&(e.leaf?n.push(a):h(t,s)?this._all(a,n):c.push(a));e=c.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!p(t,e))return!1;for(var i,r,o,a,s=[];e;){for(i=0,r=e.children.length;i<r;i++)if(o=e.children[i],p(t,a=e.leaf?n(o):o)){if(e.leaf||h(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var n,i,r,a,s=this.data,c=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=u.pop(),a=!0),s.leaf&&-1!==(r=o(t,s.children,e)))return s.children.splice(r,1),l.push(s),this._condense(l),this;a||s.leaf||!h(s,c)?i?(n++,s=i.children[n],a=!1):s=null:(l.push(s),u.push(n),n=0,i=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,i){var r,o=n-e+1,s=this._maxEntries;if(o<=s)return a(r=m(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),(r=m([])).leaf=!1,r.height=i;var c,l,u,d,f=Math.ceil(o/s),h=f*Math.ceil(Math.sqrt(s));for(v(t,e,n,h,this.compareMinX),c=e;c<=n;c+=h)for(v(t,c,u=Math.min(c+h-1,n),f,this.compareMinY),l=c;l<=u;l+=f)d=Math.min(l+f-1,u),r.children.push(this._build(t,l,d,i-1));return a(r,this.toBBox),r},_chooseSubtree:function(t,e,n,i){for(var r,o,a,s,c,l,u,f,h,p;i.push(e),!e.leaf&&i.length-1!==n;){for(u=f=1/0,r=0,o=e.children.length;r<o;r++)c=d(a=e.children[r]),h=t,p=a,(l=(Math.max(p.maxX,h.maxX)-Math.min(p.minX,h.minX))*(Math.max(p.maxY,h.maxY)-Math.min(p.minY,h.minY))-c)<f?(f=l,u=c<u?c:u,s=a):l===f&&c<u&&(u=c,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var i=this.toBBox,r=n?t:i(t),o=[],a=this._chooseSubtree(r,this.data,e,o);for(a.children.push(t),c(a,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,a,c,l,u,f,h,p,m,v,_,y;for(l=u=1/0,i=e;i<=n-e;i++)h=r=s(t,0,i,this.toBBox),p=o=s(t,i,n,this.toBBox),m=Math.max(h.minX,p.minX),v=Math.max(h.minY,p.minY),_=Math.min(h.maxX,p.maxX),y=Math.min(h.maxY,p.maxY),a=Math.max(0,_-m)*Math.max(0,y-v),c=d(r)+d(o),a<l?(l=a,f=i,u=c<u?c:u):a===l&&c<u&&(u=c,f=i);return f},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,a=this.toBBox,l=s(t,0,e,a),u=s(t,n-e,n,a),d=f(l)+f(u);for(r=e;r<n-e;r++)o=t.children[r],c(l,t.leaf?a(o):o),d+=f(l);for(r=n-e-1;r>=e;r--)o=t.children[r],c(u,t.leaf?a(o):o),d+=f(u);return d},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)c(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e){e.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?r-1:0,f=n?-1:1,h=t[e+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+t[e+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+t[e+d],d+=f,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),o-=l}return(h?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var a,s,c,l=8*o-r-1,u=(1<<l)-1,d=u>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*c-1)*Math.pow(2,r),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;t[n+h]=255&s,h+=p,s/=256,r-=8);for(a=a<<r|s,l+=r;l>0;t[n+h]=255&a,h+=p,a/=256,l-=8);t[n+h-p]|=128*m}},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function e(t,e){return t<e?-1:t>e?1:0}return function(n,i,r,o,a){!function e(n,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,c=i-r+1,l=Math.log(s),u=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*u*(s-u)/s)*(c-s/2<0?-1:1);e(n,i,Math.max(r,Math.floor(i-c*u/s+d)),Math.min(o,Math.floor(i+(s-c)*u/s+d)),a)}var f=n[i],h=r,p=o;for(t(n,r,i),a(n[o],f)>0&&t(n,r,o);h<p;){for(t(n,h,p),h++,p--;a(n[h],f)<0;)h++;for(;a(n[p],f)>0;)p--}0===a(n[r],f)?t(n,r,p):t(n,++p,o),p<=i&&(r=p+1),i<=p&&(o=p-1)}}(n,i,r||0,o||n.length-1,a||e)}}()},function(t,e,n){var i=n(113),r=n(114);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]),i(r,{insert:"head",singleton:!1}),t.exports=r.locals||{}},function(t,e,n){"use strict";var i,r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function s(t,e){for(var n={},i=[],r=0;r<t.length;r++){var s=t[r],c=e.base?s[0]+e.base:s[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=a(u),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(o[d].references++,o[d].updater(f)):o.push({identifier:u,updater:m(f,e),references:1}),i.push(u)}return i}function c(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,u=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function d(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var h=null,p=0;function m(t,e){var n,i,r;if(e.singleton){var o=p++;n=h||(h=c(e)),i=d.bind(null,n,o,!1),r=d.bind(null,n,o,!0)}else n=c(e),i=f.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=a(n[i]);o[r].references--}for(var c=s(t,e),l=0;l<n.length;l++){var u=a(n[l]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}n=c}}}},function(t,e,n){(e=n(115)(!1)).push([t.i,".mapgl-hover {\n    cursor: pointer;\n}\n\n.mapgl-dragging {\n    cursor: grabbing;\n}\n\n.mapgl-rotating {\n    cursor: move;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,r,o=t[1]||"",a=t[3];if(!a)return o;if(e&&"function"==typeof btoa){var s=(n=a,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){"use strict";n.r(e),n.d(e,"config",(function(){return o})),n.d(e,"utils",(function(){return i})),n.d(e,"mapglUtils",(function(){return r})),n.d(e,"DynamicObject",(function(){return k})),n.d(e,"CircleMarker",(function(){return V})),n.d(e,"Map",(function(){return sa})),n.d(e,"MapClass",(function(){return sa})),n.d(e,"Entrance",(function(){return Qr})),n.d(e,"Polyline",(function(){return ha})),n.d(e,"DashedPolyline",(function(){return ma})),n.d(e,"Polygon",(function(){return ya})),n.d(e,"Circle",(function(){return ga})),n.d(e,"StretchableImage",(function(){return Ta})),n.d(e,"StretchableImageOptions",(function(){})),n.d(e,"StretchableImageSource",(function(){})),n.d(e,"Rect",(function(){return Ha})),n.d(e,"RectOptions",(function(){})),n.d(e,"PointLabel",(function(){return Ea})),n.d(e,"PointLabelOptions",(function(){})),n.d(e,"HtmlMarker",(function(){return Dr})),n.d(e,"Marker",(function(){return Ra})),n.d(e,"MarkerOptions",(function(){})),n.d(e,"MarkerLabelOptions",(function(){})),n.d(e,"MarkerIconOptions",(function(){})),n.d(e,"Heatmap",(function(){return Pa})),n.d(e,"GeoJsonSource",(function(){return _e.d})),n.d(e,"GeoJsonSourceOptions",(function(){return _e.GeoJsonSourceOptions})),n.d(e,"GeoJsonTileSource",(function(){return _e.f})),n.d(e,"GeoJsonTileSourceOptions",(function(){return _e.GeoJsonTileSourceOptions})),n.d(e,"RasterTileSource",(function(){return Va})),n.d(e,"RasterTileSourceOptions",(function(){})),n.d(e,"OnlineMarker",(function(){return qa})),n.d(e,"OnlineMarkerIcon",(function(){})),n.d(e,"OnlineMarkerOptions",(function(){})),n.d(e,"MapEvent",(function(){})),n.d(e,"MapPointerEvent",(function(){})),n.d(e,"DynamicObjectPointerEvent",(function(){})),n.d(e,"DraggablePointerEvent",(function(){})),n.d(e,"TileLoadEvent",(function(){})),n.d(e,"FloorComplexHideEvent",(function(){})),n.d(e,"FloorComplexShowEvent",(function(){})),n.d(e,"InteractionEvent",(function(){})),n.d(e,"InteractionTarget",(function(){})),n.d(e,"RulerChangeEvent",(function(){})),n.d(e,"TrafficScoreEvent",(function(){})),n.d(e,"HTMLMarkerShownEvent",(function(){})),n.d(e,"CommPoiEvent",(function(){})),n.d(e,"IconTransformerParams",(function(){})),n.d(e,"PolylineOptions",(function(){})),n.d(e,"DashedPolylineOptions",(function(){})),n.d(e,"CircleMarkerOptions",(function(){})),n.d(e,"PolygonOptions",(function(){})),n.d(e,"CircleOptions",(function(){})),n.d(e,"EntranceOptions",(function(){})),n.d(e,"HtmlMarkerOptions",(function(){})),n.d(e,"HeatmapPoint",(function(){})),n.d(e,"HeatmapOptions",(function(){})),n.d(e,"HeatmapPalette",(function(){})),n.d(e,"FontName",(function(){return rr.FontName})),n.d(e,"SourceMetatile",(function(){return rr.SourceMetatile})),n.d(e,"TileCoords",(function(){})),n.d(e,"Viewport",(function(){})),n.d(e,"MapOptions",(function(){})),n.d(e,"Stats",(function(){})),n.d(e,"PersonalPoi",(function(){})),n.d(e,"Padding",(function(){})),n.d(e,"FirmsToFloorIndexMap",(function(){})),n.d(e,"DataTileLayer",(function(){return Xa})),n.d(e,"DataTileLayerOptions",(function(){}));var i={};n.r(i),n.d(i,"getCenterZoomByPoints",(function(){return p})),n.d(i,"getMousePositionInContainer",(function(){return m})),n.d(i,"projectGeoToMap",(function(){return s.l})),n.d(i,"projectMapToGeo",(function(){return s.m})),n.d(i,"geoToMapDistance",(function(){return s.c})),n.d(i,"projectGeoToScreen",(function(){return w})),n.d(i,"projectScreenToGeo",(function(){return x})),n.d(i,"getMetersFromPixels",(function(){return S})),n.d(i,"projectMapToScreen",(function(){return I}));var r={};n.r(r),n.d(r,"getUrl",(function(){return j.b})),n.d(r,"hashToString",(function(){return O.f}));var o=n(1),a=n(7),s=n(5),c=n(44),l=n(2),u=n(12),d=n(17);function f(t,e,n){if(0!==t.length){for(var i=Object(a.e)(e),r=u.e(),o=0,c=t;o<c.length;o++){var f=c[o],p=Object(s.l)(f);Object(d.k)(p,-i),u.f(r,p)}var m=l.d();return u.a(m,r),Object(d.k)(m,i),{center:m,zoom:h(r,n)}}}function h(t,e){return Math.min(Object(s.k)(e[0],Math.abs(t.max[0]-t.min[0])),Object(s.k)(e[1],Math.abs(t.max[1]-t.min[1])))}function p(t,e,n){var i=f(t,e,n);if(i)return{zoom:i.zoom,center:Object(s.m)(i.center)}}function m(t,e,n){var i=t.getBoundingClientRect();return[e-i.left-t.clientLeft,n-i.top-t.clientTop]}function v(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=m(e,t[i].clientX,t[i].clientY);return n}function _(t){return t.touches.length>1}function y(t,e,n){var i=document.createElement("img");return i.width=e,i.height=n,new Promise((function(e){i.onload=function(){return e(i)},i.src="data:image/svg+xml;base64,"+btoa(t)}))}function g(t){var e=new Blob([t],{type:"image/png"}),n=URL.createObjectURL(e),i=document.createElement("img");return new Promise((function(e){i.onload=function(){URL.revokeObjectURL(n),e(i)},0===t.byteLength?i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=":i.src=n}))}function b(t,e){if(e[0]===t.width&&e[1]===t.height)return t;var n=document.createElement("canvas"),i=n.getContext("2d");return n.width=e[0],n.height=e[1],i.shadowColor="transparent",i.shadowBlur=0,i.drawImage(t,0,0,e[0],e[1]),n}function w(t,e,n,i,r,o,l,u){return void 0===l&&(l={top:0,right:0,bottom:0,left:0}),void 0===u&&(u={top:0,right:0,bottom:0,left:0}),new c.a({center:Object(s.l)(t),zoom:e,rotation:Object(a.e)(n),size:i,pitch:Object(a.e)(r),viewport:l,padding:u}).project(Object(s.l)(o))}function x(t,e,n,i,r,o,l,u){void 0===l&&(l={top:0,right:0,bottom:0,left:0}),void 0===u&&(u={top:0,right:0,bottom:0,left:0});var d=new c.a({center:Object(s.l)(t),zoom:e,rotation:Object(a.e)(n),size:i,pitch:Object(a.e)(r),viewport:l,padding:u});return Object(s.m)(d.unproject(o))}function S(t,e,n,i,r,o,l,u,d){void 0===l&&(l={top:0,right:0,bottom:0,left:0}),void 0===u&&(u={top:0,right:0,bottom:0,left:0});var f=new c.a({center:Object(s.l)(t),zoom:e,rotation:Object(a.e)(n),size:i,pitch:Object(a.e)(r),viewport:l,padding:u}),h=Object(s.m)(f.unproject(o)),p=Object(s.m)(f.unproject([o[0]+d,o[1]+d]));return Math.max(1,Object(s.b)(h,p))}function I(t,e){return new c.a(t).project(e)}var j=n(29),O=n(15),M=n(0),P=n(42),L=1;function T(){return L++}var k=function(t){function e(e){var n=t.call(this)||this;return n.uniqId=T(),n.modules=e.modules,n.mapState=e.state,n.tileObjects=[],n.identifyIds=[],n}return Object(M.c)(e,t),e.prototype.update=function(){},e.prototype.destroy=function(){var t=this,e=this.modules;this.tileObjects.forEach((function(n){n.clean(t.mapState),e.tileManager.removeObject(n)})),this.tileObjects=[],e.layers.removeLayer(this),this.mapState.needRerender=!0},e.prototype.getIdentifyData=function(){var t=this;return this.identifyIds.map((function(e){return{dynamicObjectId:t.uniqId,metatileHash:-1,ids:e}}))},e}(P.a),z=n(9),C=n(22),E=n(25),A=n(50);function D(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if("default"!==(null==n?void 0:n.type))return}var i={id:Object(E.a)(e.id[0],e.id[1]),symbol:e.symbol};return"point"===e.symbol&&(i.isText=1===e.instanceId),e.sublayer&&(i.isCommercial=Object(A.a)(e.sublayer),i.isPersonal=Object(A.c)(e.sublayer),"point"!==e.symbol||i.isCommercial||(i.sysCode=e.objectClass)),i}}function F(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if(n&&"geojson"===n.type)return"internal"===n.subtype?{type:"geojson",id:Object(E.a)(e.id[0],e.id[1]),feature:n.getFeatureById(e.id),source:n}:{type:"geojsonTile",getFeatureProperties:function(){var t;return n.getObjectAttributes(e.id[0],null!==(t=e.tileKey)&&void 0!==t?t:"")},source:n}}return{type:"default",id:Object(E.a)(e.id[0],e.id[1])}}}function R(t,e,n,i,r){var o=Object(s.m)(r.camera.unproject(i));if(e&&void 0!==e.dynamicObjectId){var a=t,c=r.layers.getDynamicObjectLayers().find((function(t){return t.uniqId===e.dynamicObjectId}));if(!c)return;var l={lngLat:o,originalEvent:n,point:i,targetData:c};c.emit(a,l)}else{var u={lngLat:o,originalEvent:n,point:i,target:D(r.sourceStorage,e),targetData:F(r.sourceStorage,e)},d=t;r.map.emit(d,u)}}var B=function(t){function e(e,n){var i=t.call(this,e)||this;return i.start=function(t){var e=i,n=e.modules,r=e.container;if(0===t.button){var o=m(r,t.clientX,t.clientY);i.contains(o)&&n.handler.block()&&(n.mouseMoveHandler.block(),i.dragStartCursorPoint=o,i.dragStartAnchorPoint=n.camera.project(i.getPosition()),document.addEventListener("mouseup",i.stop),document.addEventListener("mousemove",i.move),i.emitEvent("dragstart",t))}},i.move=function(t){var e=i,n=e.dragStartAnchorPoint,r=e.dragStartCursorPoint,o=e.container;if(void 0!==n&&void 0!==r){var a=m(o,t.clientX,t.clientY),s=z.b(n);z.a(s,s,a),z.p(s,s,r),i.setPosition(i.modules.camera.unproject(s)),i.emitEvent("drag",t)}},i.stop=function(t){if(0===t.button){i.dragStartCursorPoint=void 0,i.dragStartAnchorPoint=void 0,document.removeEventListener("mouseup",i.stop),document.removeEventListener("mousemove",i.move);var e=i.modules;e.handler.unblock(),e.mouseMoveHandler.unblock(),i.emitEvent("dragend",t),i.isInteractive()&&e.identifier.resetCache()}},i.container=e.modules.layout.mapContainer,n&&i.container.addEventListener("mousedown",i.start,!0),i}return Object(M.c)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.removeEventListener("mousedown",this.start,!0),document.removeEventListener("mouseup",this.stop),document.removeEventListener("mousemove",this.move)},e.prototype.emitEvent=function(t,e){var n=this.getPosition(),i=Object(s.m)(n),r=this.modules.camera.project(n),o=this.modules.identifier.searchSync(r),a=void 0!==o&&void 0===o.dynamicObjectId?D(this.modules.sourceStorage,o):void 0;this.emit(t,{originalEvent:e,target:a,targetData:this,lngLat:i,point:r})},e}(k),N=n(14),U=n(3),Z=n(20),H=n(21),G=n(97),W=n(4),V=function(t){function e(e,n){var i,r,o=t.call(this,e,null!==(i=n.draggable)&&void 0!==i&&i)||this;o.options=n,o.interactive=null===(r=o.options.interactive)||void 0===r||r,o.center=Object(s.l)(o.options.coordinates);var a=o.modules,c=a.dynamicStyle,l=a.collector,u=a.renderer,d=a.tileManager,f=a.identifier,h=a.layers;if(o.layer=Object(H.d)({type:"circle",id:"dynamic-circleMarker-"+o.uniqId,minzoom:o.options.minZoom,maxzoom:o.options.maxZoom,style:{color:o.options.color,strokeColor:o.options.borderColor,strokeColor2:o.options.border2Color,width:o.options.width,strokeWidth:o.options.borderWidth,strokeWidth2:o.options.border2Width}}),!o.layer)return o;c.addLayer(o.layer,o.options.zIndex);var p=Object(U.s)(o.center),m=Object(Z.c)({id:o.interactive?[0,0]:NaN});Object(N.b)({collector:l,generator:G.a.generate,args:[c.getStyle().id,o.layer,O.d,m,[[0],[0]]]});var v=l.getAccumulatedData(),_=new C.a("dynamicObject",v.data,u,p);return d.addObject(_),o.tileObjects.push(_),o.interactive&&o.identifyIds.push(v.identifyIds),h.addLayer(o),l.reset(),o.mapState.needRerender=!0,o.interactive&&f.resetCache(),o}return Object(M.c)(e,t),e.prototype.remove=function(){this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.interactive&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e.prototype.setPosition=function(t){var e=this.mapState,n=this.tileObjects[0];void 0!==n&&(this.center=t,n.setTileCoords(Object(U.s)(t)),e.needRerender=!0)},e.prototype.getPosition=function(){return this.center},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.layer)return!1;var e=this.layer,n=this.modules.camera.project(this.center),i=Object(W.i)(e.style.width,Object(W.c)(this.mapState.styleZoom,this.mapState.styleState,[]))/2+Object(W.i)(e.style.strokeWidth,Object(W.c)(this.mapState.styleZoom,this.mapState.styleState,[]));return z.e(n,t)<=i},e}(B),q=n(13);function Y(t,e,n){var i=t.viewport,r=i.top,o=i.right,a=i.bottom,s=i.left,c=e.clientWidth,l=e.clientHeight;t.size=[Math.max(1,c-s-o),Math.max(1,l-r-a)],n.updateIdentifySize()}function X(t,e){var n=t.padding,i=n.top,r=n.right,o=n.bottom,a=n.left;t.padding={top:i,right:r,bottom:o,left:a},t.needRerender=!0,e.updateIdentifySize()}var K=q.d.bind(null,"inertia"),J=function(t,e){q.e("inertia",{step:function(t,n,i){var r=i.startPoint,a=i.startSpeed,c=i.startTime,d=i.direction,f=l.b(d);l.p(f,f,n),l.a(f,f,r),u.c(t.maxBounds,f)||Q(e,t),t.center=f,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.d)(t.zoom,f):t.zoom=Object(s.e)(t.styleZoom,f);var h=function(t,e,n){return t*Math.pow(1-(n-e)/o.inertia.duration,o.inertia.nonLinearity)}(a,c,t.time);Object(s.i)(h,t.zoom)<o.inertia.minSpeed&&Q(e,t)}},t)},Q=function(t,e){q.d("inertia",e),t.classList.remove("mapgl-inertia")},$=function(t,e,n){void 0===n&&(n={}),q.d("center",t),K(t);var i=l.d();if(u.b(i,t.maxBounds,e),!1===n.animate)t.center=i,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.d)(t.zoom,e):t.zoom=Object(s.e)(t.styleZoom,e);else{var r=void 0!==n.easing?n.easing:"linear",o=void 0!==n.duration?n.duration:250;q.c("center",{easing:r},t,t.center,i,o)}},tt=q.d.bind(null,"center"),et=q.e.bind(null,"center",{step:function(t,e){t.center=e,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.d)(t.zoom,e):t.zoom=Object(s.e)(t.styleZoom,e)}});function nt(t,e){return(t-=e)>=Math.PI?t=(t+Math.PI)%(2*Math.PI)-Math.PI:t<-Math.PI&&(t=Math.PI-(Math.PI-t)%(2*Math.PI)),t+e}function it(t,e,n){if(void 0===n&&(n={}),q.d("rotation",t),!1===n.animate)t.rotation=nt(e,0);else{var i=void 0===n.normalize||n.normalize;q.c("rotation",{easing:n.easing||"linear"},t,t.rotation,i?nt(e,t.rotation):e,n.duration||250)}}var rt=q.d.bind(null,"rotation"),ot=q.e.bind(null,"rotation",{step:function(t,e){return t.rotation=nt(e,0)}});function at(t,e,n){void 0===n&&(n={}),q.d("pitch",t);var i=Object(a.c)(e,t.minPitch,t.maxPitch);!1===n.animate?t.pitch=i:q.c("pitch",{easing:n.easing||"linear"},t,t.pitch,i,n.duration||300)}var st=q.d.bind(null,"pitch"),ct=q.e.bind(null,"pitch",{step:function(t,e){return t.pitch=e}}),lt=function(t,e,n){void 0===n&&(n={}),q.d("zoom",t);var i=Object(a.c)(e,t.minZoom,t.maxZoom);if(i!==t.zoom)if(!1===n.animate)n.zoomPoint&&(l.a(t.center,t.center,Object(a.h)(t,n.zoomPoint,{zoom:i})),u.b(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=Object(s.d)(i,t.center);else{var r=n.animateHeight?Object(s.o)(t.zoom,t.size):t.zoom,o=n.animateHeight?Object(s.o)(i,t.size):i,c=void 0!==n.easing?n.easing:"easeOutCubic",d=void 0!==n.duration?n.duration:250;q.c("zoom",{easing:c},t,r,o,d,{zoomPoint:n.zoomPoint,animateHeight:!!n.animateHeight,blockBuildingAnimation:!!n.blockBuildingAnimation})}},ut=q.d.bind(null,"zoom"),dt=q.e.bind(null,"zoom",{step:function(t,e,n){void 0===n&&(n={});var i=n&&n.animateHeight?Object(s.f)(e,t.size):e;n&&n.zoomPoint&&(l.a(t.center,t.center,Object(a.h)(t,n.zoomPoint,{zoom:i})),u.b(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=Object(s.d)(i,t.center)}}),ft=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,ht=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||ft||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,pt=gt("webkit"),mt=gt("chrome")||gt("crios"),vt=(window,!mt&&gt("safari")),_t=(gt("gecko")&&!pt&&window.opera,navigator.platform.toUpperCase().indexOf("MAC")>=0),yt=gt("firefox");function gt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function bt(t,e){var n=Object(M.a)({hitType:"event",eventCategory:"Metrics"},t);window.ga&&window.ga(o.analytics.gaName+".send",n)}function wt(t,e){var n,i;function r(){n=!1,i&&(o.apply(void 0,i),i=!1)}function o(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n?i=o:(t.apply(void 0,o),setTimeout(r,e),n=!0)}return o}function xt(t){ut(t),tt(t),rt(t),st(t),K(t)}var St=function(){function t(t,e){var n=this;this.onWheelScroll=function(t){t.preventDefault(),void 0===t.deltaMode&&void 0===t.deltaY||(n.state.userHasInteracted=!0,n.screenPoint=m(n.container,t.clientX,t.clientY),t.ctrlKey?n.deltaAccumulator-=10*t.deltaY:1===t.deltaMode?n.deltaAccumulator-=20*t.deltaY:n.deltaAccumulator-=t.deltaY,n.eventCount+=1)},this.startZooming=function(){var t,e=n.state;t=_t?n.getDelta()*o.zoom.macTouchDelta:Object(a.o)(n.getDelta())*o.zoom.mouseDelta;var i=e.zoom+t,r=Object(a.c)(i,e.minZoom,e.maxZoom);r!==e.zoom&&(xt(e),lt(e,r,{duration:o.zoom.animDuration,animate:!_t,zoomPoint:e.keepCenterWhileUserZoomRotate?void 0:n.screenPoint,blockBuildingAnimation:!0}))},this.stop=function(){n.state.userHasInteracted=!0,ut(n.state)},this.state=t,this.container=e,_t||(this.startZooming=wt(this.startZooming,o.zoom.throttleDelay)),this.deltaAccumulator=0,this.eventCount=0,this.screenPoint=[0,0],this.container.addEventListener("wheel",this.onWheelScroll),this.container.addEventListener("mousedown",this.stop)}return t.prototype.destroy=function(){this.container.removeEventListener("wheel",this.onWheelScroll),this.container.removeEventListener("mousedown",this.stop)},t.prototype.update=function(){0!==this.eventCount&&(this.startZooming(),this.state.needRerender=!0)},t.prototype.getDelta=function(){var t=this.deltaAccumulator/this.eventCount;return this.deltaAccumulator=0,this.eventCount=0,t},t}(),It=function(){function t(t){this.defs=t.map((function(t){return new jt(t)}))}return t.prototype.check=function(t){for(var e=this.defs,n=!1,i=0;i<e.length;i++)n?e[i].update(t):n=!e[i].equal(t);return n},t}(),jt=function(){function t(t){this.path=Array.isArray(t.path)?t.path:[t.path],this.type=t.type,"number"===this.type?(this.last=NaN,this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"vec2"===this.type?(this.last=[NaN,NaN],this.compare=this.vec2,this.updateFn=this.vec2Update):"string"===this.type?(this.last="",this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"padding"===this.type&&(this.last={left:0,right:0,bottom:0,top:0},this.compare=this.padding,this.updateFn=this.paddingUpdate)}return t.prototype.equal=function(t){var e=this.take(t),n=this.compare(this.last,e);return this.updateFn(e),n},t.prototype.update=function(t){this.updateFn(this.take(t))},t.prototype.take=function(t){var e=this.path,n=0;do{t=t[e[n++]]}while(n<e.length);return t},t.prototype.primitive=function(t,e){return t===e},t.prototype.padding=function(t,e){return t.top===e.top&&t.bottom===e.bottom&&t.left===e.left&&t.right===e.right},t.prototype.paddingUpdate=function(t){this.last.top=t.top,this.last.bottom=t.bottom,this.last.right=t.right,this.last.left=t.left},t.prototype.vec2=function(t,e){return t[0]===e[0]&&t[1]===e[1]},t.prototype.primitiveUpdate=function(t){this.last=t},t.prototype.vec2Update=function(t){this.last[0]=t[0],this.last[1]=t[1]},t}(),Ot=function(){function t(t,e){var n=this;this.onMouseUp=function(t){1===t.which&&n.start()},this.onTouchEnd=function(t){0===t.touches.length&&n.start()},this.start=function(){var t=n.state;t.userHasInteracted=!0;var e=n.getCurrentSpeed(t.time),i=l.l(e);if(!(Object(s.i)(i,t.zoom)<=o.inertia.minSpeed)){var r=Object(s.j)(o.inertia.maxSpeed,t.zoom),a=Math.min(i,r),c=n.calcDistanceByStartSpeed(a),u=l.b(t.center),d=l.d();l.o(d,e),function(t,e,n,i,r){q.c("inertia",{easing:"inertia"},t,0,r,o.inertia.duration,{startPoint:e,startSpeed:n,direction:i,startTime:t.time})}(t,u,a,d,c),n.container.classList.add("mapgl-inertia")}},this.stop=function(){K(n.state),n.container.classList.remove("mapgl-inertia"),n.times=[],n.positions=[]},this.state=t,this.container=e,this.container.addEventListener("mouseup",this.onMouseUp),this.container.addEventListener("mousedown",this.stop),ht&&(this.container.addEventListener("touchend",this.onTouchEnd),this.container.addEventListener("touchstart",this.stop)),this.zoomDiffer=new It([{path:"zoom",type:"number"}]),this.styleZoomDiffer=new It([{path:"styleZoom",type:"number"}]),this.centerDiffer=new It([{path:"center",type:"vec2"}]),this.times=[],this.positions=[]}return t.prototype.destroy=function(){this.container.removeEventListener("mouseup",this.onMouseUp),this.container.removeEventListener("mousedown",this.stop),this.container.removeEventListener("touchend",this.onTouchEnd),this.container.removeEventListener("touchstart",this.stop)},t.prototype.update=function(){var t=this.state;this.centerDiffer.check(t)&&this.rememberTimeAndPosition(t),("zoom"===t.zoomTypePreserving?this.zoomDiffer.check(t):this.styleZoomDiffer.check(t))&&this.stop()},t.prototype.removeOldRecords=function(t){for(;t-this.times[0]>100&&this.times.length;)this.times.shift(),this.positions.shift()},t.prototype.rememberTimeAndPosition=function(t){var e=t.time;this.removeOldRecords(e),this.times.push(e),this.positions.push(l.b(t.center))},t.prototype.getCurrentSpeed=function(t){if(this.removeOldRecords(t),this.times.length<2)return l.d();var e=l.b(this.positions[this.positions.length-1]);return l.s(e,e,this.positions[0]),l.p(e,e,1/(this.times[this.times.length-1]-this.times[0])),e},t.prototype.calcDistanceByStartSpeed=function(t){return t*o.inertia.duration/(o.inertia.nonLinearity+1)},t}(),Mt=function(){function t(t){var e=this;this.emitMouseEvent=function(t){var n=m(e.container,t.clientX,t.clientY);e.emitEvent(t,n)},this.emitTouchEvent=function(t){var n=m(e.container,t.changedTouches[0].clientX,t.changedTouches[0].clientY);e.emitEvent(t,n)},this.container=t.layout.mapContainer,this.modules=t,this.container.addEventListener("mousedown",this.emitMouseEvent),this.container.addEventListener("mouseup",this.emitMouseEvent),this.container.addEventListener("touchstart",this.emitTouchEvent),this.container.addEventListener("touchend",this.emitTouchEvent)}return t.prototype.destroy=function(){this.container.removeEventListener("mousedown",this.emitMouseEvent),this.container.removeEventListener("mouseup",this.emitMouseEvent),this.container.removeEventListener("touchstart",this.emitTouchEvent),this.container.removeEventListener("touchend",this.emitTouchEvent)},t.prototype.update=function(){},t.prototype.emitEvent=function(t,e){var n=this;if(this.modules.layout.isActionWithCanvas(t)){var i=t.type;this.modules.identifier.search(i,e).then((function(r){R(i,r,t,e,n.modules)}))}},t}(),Pt=function(){function t(t,e,n){var i=this;this.rotationDetected=!1,this.onGestureStart=function(t){t.preventDefault(),i.startRotation=i.state.rotation,i.rotationDetected=!1,i.gestureRotation=0,i.isGestureStart=!0,i.startZoom=i.state.zoom,i.screenPoint=m(i.container,t.clientX,t.clientY),i.state.userHasInteracted=!0,i.state.disableRotationByUserInteraction||i.container.classList.add("mapgl-rotating"),i.map.emit("interactionstart",{target:"zoom/rotation"})},this.onGestureEnd=function(t){t.preventDefault(),i.isGestureStart&&(i.isGestureStart=!1,i.state.userHasInteracted=!0,i.container.classList.remove("mapgl-rotating"),i.map.emit("interactionend",{target:"zoom/rotation"}))},this.onGestureChange=function(t){t.preventDefault(),i.state.userHasInteracted=!0;var e=t.rotation/40;!i.rotationDetected&&Math.abs(e)>i.state.touchRotationThreshold&&(i.rotationDetected=!0,i.startRotation=i.state.rotation-e),i.rotationDetected&&(i.gestureRotation=e),t.scale>1?i.gestureZoom=t.scale-1:i.gestureZoom=-1/t.scale+1},this.state=t,this.container=e,this.map=n,this.isGestureStart=!1,this.gestureRotation=0,this.gestureZoom=0,this.screenPoint=[0,0],this.startRotation=0,this.startZoom=0,this.container.addEventListener("gesturestart",this.onGestureStart),this.container.addEventListener("gestureend",this.onGestureEnd),this.container.addEventListener("gesturechange",this.onGestureChange)}return t.prototype.destroy=function(){this.container.removeEventListener("gesturestart",this.onGestureStart),this.container.removeEventListener("gestureend",this.onGestureEnd),this.container.removeEventListener("gesturechange",this.onGestureChange)},t.prototype.update=function(){if(0!==this.gestureRotation||0!==this.gestureZoom){var t=this.state,e=this.startZoom+this.gestureZoom,n=this.startRotation+this.gestureRotation,i=l.d(),r=t.keepCenterWhileUserZoomRotate?l.d():Object(a.h)(t,this.screenPoint,{zoom:e,rotation:n});l.a(i,t.center,r),xt(t),$(t,i,{animate:!1}),lt(t,e,{animate:!1}),t.disableRotationByUserInteraction||it(t,n,{animate:!1}),this.gestureRotation=0,this.gestureZoom=0}},t}(),Lt=function(t){function e(e){var n=t.call(this)||this;return n.durations=[],n.earlyTimes=[],n.countToCheck=75,n.mayCountMetrics=!1,n.startRenderTime=0,n.catchNextUpdate=!1,n.mapState=e,setTimeout((function(){n.mayCountMetrics=!0}),1e4),n}return Object(M.c)(e,t),e.prototype.update=function(){var t=this.mapState,e=t.time,n=t.needRerender;this.mayCountMetrics?(this.catchNextUpdate&&(this.durations.push(e-this.startRenderTime),this.catchNextUpdate=!1),n&&(this.startRenderTime=e,this.catchNextUpdate=!0),this.durations.length>this.countToCheck&&this.check()):this.earlyTimes.push(e)},e.prototype.getEarlyFps=function(){if(!this.mayCountMetrics){for(var t=[],e=1;e<this.earlyTimes.length;e++)t.push(this.earlyTimes[e]-this.earlyTimes[e-1]);return Tt(t)}},e.prototype.check=function(){var t=Tt(this.durations);this.emit("fps",t),t<o.performanceCheck.fpsCaveat&&(this.mapState.performanceCaveatEmitted=!0,this.emit("performancecaveat")),this.durations=[],this.countToCheck=Math.min(1e3,2*this.countToCheck)},e}(P.a);function Tt(t){t.sort((function(t,e){return t-e}));var e=t[Math.floor(3*t.length/4)];return Math.round(1e3/e)}var kt=n(51),zt=function(){function t(){this.differ=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}]),this.debouncedSet=Object(kt.a)((function(t){q.c("stillness",{},t,t.stillness,1,400)}),100,!1),this.stillnessTickerUpdate=q.e.bind(null,"stillness",{step:function(t,e){t.stillness=e}})}return t.prototype.update=function(t){this.differ.check(t)&&(t.stillness=0,q.d("stillness",t),this.debouncedSet(t)),this.stillnessTickerUpdate(t)},t}(),Ct=function(){function t(t){var e=this;this.onTouchStart=function(){e.isTouchStartEmitted=!0},this.onMouseOut=function(t){if(e.prevGeo){var n=m(e.container,t.clientX,t.clientY);R("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.skipIdentifyEvents=!0,e.modules.defaultSource.resetHoverId(),e.container.classList.remove("mapgl-hover")}},this.onMouseMove=function(t){if(e.isTouchStartEmitted)e.isTouchStartEmitted=!1;else if(e.skipIdentifyEvents=!1,!e.isBlocked){var n=m(e.container,t.clientX,t.clientY);Promise.resolve().then((function(){return e.modules.layout.isActionWithCanvas(t)?e.modules.identifier.search("mouseMove",n):void 0})).then((function(i){if(!e.skipIdentifyEvents){var r=i&&e.prevGeo&&(!z.i(i.id,e.prevGeo.id)||i.instanceId!==e.prevGeo.instanceId||i.dynamicObjectId!==e.prevGeo.dynamicObjectId||i.symbol!==e.prevGeo.symbol);!e.prevGeo||i&&!r||(R("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.container.classList.remove("mapgl-hover"),e.modules.defaultSource.resetHoverId()),!i||e.prevGeo&&!r||(e.prevGeo=i,e.container.classList.add("mapgl-hover"),R("mouseover",i,t,n,e.modules),e.modules.defaultSource.setHoverId(i.id)),R("mousemove",i,t,n,e.modules)}}))}},this.modules=t,this.isTouchStartEmitted=!1,this.skipIdentifyEvents=!1,this.isBlocked=!1,this.prevGeo=void 0,this.container=this.modules.layout.mapContainer,this.container.addEventListener("touchstart",this.onTouchStart),this.container.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("mouseout",this.onMouseOut)}return t.prototype.destroy=function(){this.container.removeEventListener("touchstart",this.onTouchStart),this.container.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("mouseout",this.onMouseOut)},t.prototype.update=function(){},t.prototype.block=function(){this.isBlocked=!0},t.prototype.unblock=function(){this.isBlocked=!1},t}(),Et=function(t,e,n,i){q.d("buildingHeight"+i,t),!1===n.animate?(e.set(i,n.to),t.needLabeling=!0):q.c("buildingHeight"+i,{easing:n.easing},t,n.from,n.to,n.duration)},At=function(){function t(t,e){this.state=t,this.modules=e,this.differ=new It([{path:"styleZoom",type:"number"}]),this.buildingHeights=new Map,this.minZoomBuildingHeight=1/0}return t.prototype.getBuildingHeight=function(t){return void 0!==t?(this.buildingHeights.has(t)||this.addBuildingHeightZoom(t),this.buildingHeights.get(t)||0):this.getDefaultBuildingHeight()},t.prototype.update=function(){var t=this;this.buildingHeights.forEach((function(e,n){var i,r,o;t.updateByZoom(n,e),t.isAnimating()&&(i=t.state,r=t.buildingHeights,o=n,q.e.call(null,"buildingHeight"+o,{step:function(t,e){return r.set(o,e)},complete:function(t){return t.needLabeling=!0}},i))}))},t.prototype.isAnimating=function(){var t=this;return Array.from(this.buildingHeights.keys()).some((function(e){return void 0!==q.b("buildingHeight"+e,t.state)}))},t.prototype.clearBuildingHeights=function(){this.buildingHeights.clear(),this.minZoomBuildingHeight=1/0},t.prototype.getDefaultBuildingHeight=function(){var t=this.minZoomBuildingHeight!==1/0?this.minZoomBuildingHeight:16;return this.state.styleZoom<t?0:1},t.prototype.updateByZoom=function(t,e){var n=this.state,i=q.b("zoom",n),r=q.b("buildingHeight"+t,n),a=void 0!==r?r.to:e,s=void 0!==i?i.attributes.blockBuildingAnimation:this.differ.check(n);n.styleZoom>=t&&this.modules.tileManager.viewportTilesReady()&&1!==a&&!s?Et(n,this.buildingHeights,{animate:!0,easing:o.buildingAnimation.easing,from:e,to:1,duration:o.buildingAnimation.duration*(1-e)},t):n.styleZoom<t&&0!==a&&Et(n,this.buildingHeights,{animate:!1,to:0},t)},t.prototype.addBuildingHeightZoom=function(t){var e=t<this.state.styleZoom?0:1;this.buildingHeights.set(t,e),this.minZoomBuildingHeight>t&&(this.minZoomBuildingHeight=t)},t}(),Dt=n(81),Ft=function(){function t(){this._objects=[],this.type=0}return t.prototype.render=function(){return this._objects=[],this},t.prototype.addObject=function(t){return this._objects.push(t),this},t.prototype.hasObjects=function(){return this._objects.length>0},t}(),Rt=function(t){function e(){var e=t.call(this)||this;return e.type=17,e}return Object(M.c)(e,t),e.prototype.render=function(t){return this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e}(Ft),Bt=function(){function t(t){if((t=t||{}).canvas){this._canvasElement="string"==typeof t.canvas?document.getElementById(t.canvas):t.canvas;var e={antialias:void 0===t.antialias||t.antialias,stencil:void 0!==t.stencil&&t.stencil,failIfMajorPerformanceCaveat:void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat,preserveDrawingBuffer:void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer};this._gl=2===t.version?this._canvasElement.getContext("webgl2",e):this._canvasElement.getContext("webgl",e)||this._canvasElement.getContext("experimental-webgl",e)}else this._gl=t.gl;this._pixelRatio=t.pixelRatio||1,this.autoClear=void 0===t.autoClear||t.autoClear,this.clearColor=t.clearColor||[1,1,1,1],this.sortObjects=!0,this._plugins=[],this._pluginsByType={},this._maxPluginOrder=0,this.addPlugin(new Rt,0),this.webGlExtensions={}}return t.prototype.addPlugin=function(t,e){return void 0===e&&(e=this._maxPluginOrder+1),this._plugins.push({plugin:t,order:e}),this._plugins.sort((function(t,e){return t.order-e.order})),this._pluginsByType[t.type]=t,this._maxPluginOrder=Math.max.apply(Math,this._plugins.map((function(t){return t.order}))),this},t.prototype.removePlugin=function(t){var e=this;return this._plugins.some((function(n,i){return n.plugin instanceof t&&(delete e._pluginsByType[e._plugins[i].plugin.type],e._plugins.splice(i,1),!0)})),this},t.prototype.setPixelRatio=function(t){return this._pixelRatio=t,this},t.prototype.getPixelRatio=function(){return this._pixelRatio},t.prototype.setSize=function(t,e){return this._size=[t*this._pixelRatio,e*this._pixelRatio],this._canvasElement&&(this._canvasElement.width=this._size[0],this._canvasElement.height=this._size[1],this._canvasElement.style.width=t+"px",this._canvasElement.style.height=e+"px"),this.setViewport(),this},t.prototype.setViewport=function(t,e){return void 0!==t&&void 0!==e?this._gl.viewport(0,0,t,e):this._gl.viewport(0,0,this._size[0],this._size[1]),this},t.prototype.getSize=function(){return this._size},t.prototype.setRenderTarget=function(t){return this._renderTarget=t,this},t.prototype.readPixels=function(t,e,n,i,r){var o=this._gl;return this._renderTarget?(this._renderTarget.bind(o),o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this._renderTarget.unbind(o)):o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this},t.prototype.clear=function(){var t=this._gl;return t.clearColor.apply(t,this.clearColor),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this},t.prototype.render=function(t,e,n){var i=this._gl;t.typifyForRender(this._pluginsByType),this._renderTarget&&this._renderTarget.bind(i),i.clearDepth(1),i.clearStencil(0),this.autoClear&&this.clear(),e.updateLocalMatrix(),e.updateWorldMatrix();for(var r={renderer:this,extensions:this.webGlExtensions,scene:t,camera:e,gl:i,userData:n},o=this._plugins.map((function(t){return t.plugin})).filter((function(t){return t.hasObjects()})),a=0;a<o.length;a++)o[a].render(r,o[a-1],o[a+1]);return this._renderTarget&&this._renderTarget.unbind(i),this},t.prototype.addExtension=function(t){return this.webGlExtensions[t]=this._gl.getExtension(t),this},t}(),Nt=function(){function t(e,n){void 0===n&&(n={}),this._src=e||null,this.options=Object.assign({},t.defaultOptions,n),this._glContext=null}return t.prototype.enable=function(t,e){var n=void 0!==e?e:this.options.unit;return void 0!==n&&t.activeTexture(t.TEXTURE0+n),this._texture||this.prepare(t),t.bindTexture(t.TEXTURE_2D,this._texture),this},t.prototype.remove=function(){return this._texture&&(this._glContext.deleteTexture(this._texture),this._glContext=null,this._texture=null),this},t.prototype.getTexture=function(){return this._texture},t.prototype.subImage=function(t,e,n,i){return t.bindTexture(t.TEXTURE_2D,this._texture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.options.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),t.texSubImage2D(t.TEXTURE_2D,0,n,i,this._toGlParam(t,this.options.format),t.UNSIGNED_BYTE,e),this},t.prototype.prepare=function(e){return this._glContext=e,this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,this.options.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),this.options.size?e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this.options.size[0],this.options.size[1],0,this._toGlParam(e,this.options.format),e.UNSIGNED_BYTE,this._src):e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this._toGlParam(e,this.options.format),e.UNSIGNED_BYTE,this._src),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,this._toGlParam(e,this.options.wrapS)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,this._toGlParam(e,this.options.wrapT)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,this._toGlParam(e,this.options.magFilter)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,this._toGlParam(e,this.options.minFilter)),this.options.generateMipmaps&&this.options.minFilter!==t.NearestFilter&&this.options.minFilter!==t.LinearFilter&&e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null),this},t.prototype._toGlParam=function(e,n){return n===t.ClampToEdgeWrapping?e.CLAMP_TO_EDGE:n===t.Repeat?e.REPEAT:n===t.MirroredRepeat?e.MIRRORED_REPEAT:n===t.NearestFilter?e.NEAREST:n===t.NearestMipMapNearestFilter?e.NEAREST_MIPMAP_NEAREST:n===t.NearestMipMapLinearFilter?e.NEAREST_MIPMAP_LINEAR:n===t.LinearFilter?e.LINEAR:n===t.LinearMipMapNearestFilter?e.LINEAR_MIPMAP_NEAREST:n===t.LinearMipMapLinearFilter?e.LINEAR_MIPMAP_LINEAR:n===t.RgbaFormat?e.RGBA:n===t.AlphaFormat?e.ALPHA:n===t.RgbFormat?e.RGB:null},t}();Nt.ClampToEdgeWrapping=8,Nt.Repeat=9,Nt.MirroredRepeat=10,Nt.NearestFilter=1,Nt.NearestMipMapNearestFilter=2,Nt.NearestMipMapLinearFilter=3,Nt.LinearFilter=4,Nt.LinearMipMapNearestFilter=5,Nt.LinearMipMapLinearFilter=6,Nt.RgbaFormat=11,Nt.AlphaFormat=12,Nt.RgbFormat=13,Nt.defaultOptions={magFilter:Nt.LinearFilter,minFilter:Nt.LinearMipMapLinearFilter,wrapS:Nt.ClampToEdgeWrapping,wrapT:Nt.ClampToEdgeWrapping,format:Nt.RgbaFormat,generateMipmaps:!0,flipY:!0,premultiplyAlpha:!0};var Ut=Nt,Zt=function(){function t(e){void 0===e&&(e={}),this.options=Object.assign({},t.defaultOptions,e),this._texture=new Ut(null,this.options),this._glContext=null}return t.prototype.bind=function(t){return this._frameBuffer||this._prepare(t),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this},t.prototype.unbind=function(t){return t.bindFramebuffer(t.FRAMEBUFFER,null),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.setSize=function(t){return this.options.size=t,this._unprepare(),this},t.prototype.getTexture=function(){return this._texture},t.prototype._prepare=function(t){this._glContext=t,this._texture||(this._texture=new Ut(null,this.options)),this._texture.prepare(t),this._frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this._renderBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.options.size[0],this.options.size[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this._texture.getTexture(),0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,this._renderBuffer),this._checkComplete(t),t.bindRenderbuffer(t.RENDERBUFFER,null),t.bindFramebuffer(t.FRAMEBUFFER,null)},t.prototype._unprepare=function(){this._texture&&(this._texture.remove(this._glContext),this._texture=null),this._frameBuffer&&(this._glContext.deleteFramebuffer(this._frameBuffer),this._glContext.deleteRenderbuffer(this._renderBuffer),this._frameBuffer=null,this._renderBuffer=null)},t.prototype._checkComplete=function(t){var e=t.checkFramebufferStatus(t.FRAMEBUFFER);e!==t.FRAMEBUFFER_COMPLETE&&(e===t.FRAMEBUFFER_UNSUPPORTED?console.log("Framebuffer is unsupported"):e===t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT?console.log("Framebuffer incomplete attachment"):e===t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS?console.log("Framebuffer incomplete dimensions"):e===t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT?console.log("Framebuffer incomplete missing attachment"):console.log("Unexpected framebuffer status: "+e))},t}();Zt.defaultOptions=Object.assign({},Ut.defaultOptions,{size:[0,0],generateMipmaps:!1});var Ht=Zt,Gt=n(6),Wt=(o.floors.wallMinBrightness,o.floors.wallMaxBrightness,o.fences.lightIntensity),Vt=[Wt,Wt,Wt],qt=[.05,.05,.05],Yt=[1,0,0],Xt=[1,1,1],Kt=function(){},Jt=function(t,e,n){var i=n.size,r=window.devicePixelRatio;e.bind(t,{u_vec2_vpt_size:[i[0]*r,i[1]*r]})},Qt=function(t,e,n){var i=Object(s.p)(n.zoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,Gt.q*window.devicePixelRatio]})},$t=function(t,e,n){var i=Object(s.p)(n.styleZoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,Gt.q*window.devicePixelRatio]})},te=function(t,e,n,i){e.bind(t,{u_float_height_factor:i.buildingHeightAnimator.getDefaultBuildingHeight()})},ee=function(t,e,n){e.bind(t,{u_float_height_limitation:Object(s.o)(n.zoom,n.size)*Math.cos(n.pitch)*.75,u_float_tile_height:Gt.m})},ne=function(t,e){e.bind(t,{u_float_height_limitation:Gt.m,u_float_tile_height:Gt.m})},ie=function(t,e){e.bind(t,{u_vec3_light_color:qt,u_vec3_light_direction:Yt,u_vec3_ambient_color:Xt})},re=function(t,e){e.bind(t,{u_vec3_light_color:Vt,u_vec3_light_direction:Yt,u_vec3_ambient_color:Xt})},oe=function(t,e,n){e.bind(t,{u_float_rounding_factor:n.stillness})},ae=function(t,e){e.bind(t,{u_float_border_width_offset:1/window.devicePixelRatio})},se=function(t,e){e.bind(t,{u_float_z_offset:0})},ce=function(t,e){e.bind(t,{u_float_z_offset:-1e-5})},le=function(t,e){e.bind(t,{u_sr2d_texture:0})},ue=function(t,e){e.bind(t,{u_vec2_scale_limits:[0,Gt.p]})},de=function(t,e){e.bind(t,{u_vec4_border_color:[0,0,0,0]})},fe=function(t,e){e.bind(t,{u_vec4_space_color:[0,0,0,0]})},he=function(t,e,n,i){i.assetManager.textures.forEach((function(e){return e.enable(t)}))};function pe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n,i,r){t.forEach((function(t){return t(e,n,i,r)}))}}var me=n(30),ve=n(36),_e=n(40);function ye(t,e){return 0===e?1:1===e?t.labelingOpacity:1-t.labelingOpacity}var ge=function(t,e,n,i,r,o,a){var s=Object(W.g)(o.style.color,on(n,r));return me.c(a,s),!0},be=function(t,e,n,i,r,o,a){var s=Object(W.g)(o.style.topColor,on(n,r));return me.c(a,s),!0},we=function(t,e,n,i,r,o,a){var s=Object(W.g)(o.style.sideColor,on(n,r));return me.c(a,s),!0},xe=function(t,e,n,i,r,o,a){var s=Object(W.g)(o.style.strokeColor,on(n,r));return me.c(a,s),!0},Se=function(t,e,n,i,r,o,a){var s=Object(W.g)(o.style.strokeColor2,on(n,r));return me.c(a,s),!0},Ie=function(t,e,n,i,r,o,a){return void 0===r.attributes.id||(a[3]*=i.modelManager.getOpacity(r.attributes.id,o.minzoom)),!0},je=function(t,e,n,i,r,o,a){var s=i.modelManager;if(void 0===r.attributes.hiddenObjectId)return!0;if(r.attributes.hiddenObjectId&&!s.hasModel(r.attributes.hiddenObjectId))return!0;var c=s.getVisibleModelData(r.attributes.hiddenObjectId);if(!c)return!0;var l=1-c.opacity;return!(l<.5||(a[3]*=l,0))},Oe=function(t,e){return e.bind(t,{u_float_opacity:1}),!0},Me=function(t,e,n,i,r,o,a){var s=on(n,r),c=Object(W.g)(o.style.strokeColor,s),l=Object(W.i)(o.style.strokeWidth,s);return me.e(a,c)&&1===a[3]&&l<=1&&(a[3]*=n.stillness),!0},Pe=function(t,e,n,i,r,o,a){var s=on(n,r),c=Object(W.g)(o.style.topColor,s),l=Object(W.i)(o.style.strokeWidth,s);return me.e(a,c)&&1===a[3]&&l<=1&&(a[3]*=n.stillness),!0},Le=function(t,e,n,i,r,o,a){return a[3]*=n.stillness,!0},Te=function(t,e,n,i,r,o,a){var s=Object(W.b)(a);return me.k(s,s,r.tile.readiness),0!==a[3]&&(e.bind(t,{u_vec4_color:s}),!0)},ke=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.width,on(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},ze=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.strokeWidth,on(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},Ce=function(t,e,n,i,r,o){var a=on(n,r),s=Object(W.i)(o.style.strokeWidth,a);if(0===s)return!1;var c=Object(W.i)(o.style.width,a)+2*s;return e.bind(t,{u_float_width:c*window.devicePixelRatio}),!0},Ee=function(t,e,n,i,r,o){var a=on(n,r),s=Object(W.i)(o.style.strokeWidth2,a);if(0===s)return!1;var c=Object(W.i)(o.style.width,a)+2*Object(W.i)(o.style.strokeWidth,a)+2*s;return e.bind(t,{u_float_width:c*window.devicePixelRatio}),!0},Ae=function(t,e,n,i,r,o){var a=on(n,r),s=Object(W.i)(o.style.width,a)+2*Object(W.i)(o.style.strokeWidth,a)+2*Object(W.i)(o.style.strokeWidth2,a);return 0!==s&&(e.bind(t,{u_float_width:s*window.devicePixelRatio}),!0)},De=function(t,e,n,i,r,o){var a=on(n,r);return!(Object(W.i)(o.style.iconWidth,a)<=0)},Fe=function(t,e,n,i,r,o){return e.bind(t,{u_float_shift:Object(W.i)(o.style.shift,on(n,r))*window.devicePixelRatio}),!0},Re=function(t,e,n,i,r,o){return 0!==ye(n,r.attributes.animDirection)},Be=function(t,e,n,i,r,o){var a=ye(n,r.attributes.animDirection);return 0!==a&&(e.bind(t,{u_float_opacity:a}),!0)},Ne=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.iconRotation,on(n,r));return e.bind(t,{u_vec2_rotation:[Math.cos(a),Math.sin(a)]}),!0},Ue=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.opacity,on(n,r));return e.bind(t,{u_float_opacity:r.tile.readiness*a}),!0},Ze=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.opacity,on(n,r));return e.bind(t,{u_float_opacity:a}),!0},He=function(t,e,n,i,r){var o=i.floorManager;return void 0===r.attributes.hiddenObjectId||!o.hasDisplayedFloorBuilding(r.attributes.hiddenObjectId)},Ge=function(t,e,n,i,r){var o=i.modelManager;if(void 0===r.attributes.hiddenObjectId)return!0;if(!o.hasModel(r.attributes.hiddenObjectId))return!0;var a=o.getVisibleModelData(r.attributes.hiddenObjectId);return!a||1!==a.opacity},We=function(t,e,n,i,r){return e.bind(t,{u_sr2d_texture:r.attributes.atlasIndex}),!0},Ve=function(t,e,n,i,r){var o=r.attributes,a=o.range,s=o.fontIndex,c=o.styleId,l=i.styleManager.getStyle(c);if(!l)return!1;var u=l.fonts[s],d=i.assetManager.getFontTextureByName(u,a);return void 0!==d&&(d.enable(t),!0)},qe=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.textureIndex);return void 0!==o&&(o.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},Ye=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.rampTextureIndex);return void 0!==o&&(o.enable(t,1),e.bind(t,{u_sr2d_ramp_texture:1}),!0)},Xe=function(t,e,n,i,r,o){var a=r.tile,s=Object(W.g)(o.style.gapColor,on(n,r));if(!s)return!0;var c=Object(W.b)(Object(W.g)(s,on(n,r)));return me.k(c,c,a.readiness),e.bind(t,{u_vec4_space_color:c}),!0},Ke=function(t,e,n,i,r,o){var c=n.styleZoom,l=on(n,r),u=r.tile,d=Object(W.b)(Object(W.g)(o.style.color,l));me.k(d,d,u.readiness),l.styleZoom=Math.floor(c);var f=Math.pow(2,Object(a.i)(c)),h=Object(W.i)(o.style.dashLength,l)*f,p=Object(W.i)(o.style.gapLength,l)*f;return e.bind(t,{u_vec4_dash_color:d,u_vec2_scaler_params:[0,Gt.p],u_float_dash_length:Object(s.q)(h,u.size),u_float_dash2_length:Object(s.q)(h,u.size),u_float_space_length:Object(s.q)(p,u.size)}),!0},Je=function(t,e,n,i,r,o){var a=on(n,r),c=Object(W.i)(o.style.tipWidth,a),l=Object(W.i)(o.style.tipHeight,a),u=c,d=z.j(-u,-0);z.n(d,d);var f=z.j(c,l);return z.n(f,f),e.bind(t,{u_vec2_wing_normal:d,u_vec2_tip_normal:f,u_float_tip_height_multiplier:l,u_float_wing_height_multiplier:0,u_float_wing_width_multiplier:u,u_float_size_factor:Object(s.q)(1,r.tile.size)/2}),!0},Qe=function(t,e,n,i,r,o){var a=on(n,r),s=Object(W.i)(o.style.lineLength,a),c=Object(W.i)(o.style.lineWidth,a);return e.bind(t,{u_float_length:s,u_float_width:c,u_float_border_width:0}),!0},$e=function(t,e,n,i,r,o){var a=on(n,r),c=r.tile,l=r.attributes.isLongArrow,u=r.tile.dynamicObject,d=0,f=1;u&&(l?f=u.growPosition:d=u.bouncePosition);var h=0;return"appearance"===o.style.animation.type&&(h=Object(W.i)(o.style.animation.tipMovementAmplitude,a)),e.bind(t,{u_float_width_zpt:Object(W.i)(o.style.lineWidth,a),u_float_border_width_zpt:Object(W.i)(o.style.strokeWidth,a),u_float_tip_movement_amplitude:Object(s.q)(h,c.size),u_float_vertex_shift:d,u_float_relative_end_position:f}),!0},tn=function(t,e,n,i,r){var o=i.modelManager,a=r.attributes,s=a.texture,c=a.modelIndex,l=o.getTexture(c,s);return void 0!==l&&(l.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},en=function(t,e,n,i,r,o){if(void 0===r.attributes.id)return!0;var a=i.modelManager.getOpacity(r.attributes.id,o.minzoom),s=1===i.modelManager.getBuildingHeight(r.attributes.id)?1:a;return e.bind(t,{u_float_height_factor:s}),!0},nn=function(t,e,n,i,r,o){var a=on(n,r),s=Object(W.i)(o.style.height,a);return e.bind(t,{u_float_height_factor:Object(U.r)(s)}),!0},rn=function(t,e,n,i,r,o){var a=i.buildingHeightAnimator.getBuildingHeight(o.minzoom);return r.attributes.hiddenObjectId&&i.modelManager.setBuildingHeight(r.attributes.hiddenObjectId,a),e.bind(t,{u_float_height_factor:a}),!0};function on(t,e){return Object(W.c)(t.styleZoom,t.styleState,e.attributes.tileData)}var an=function(t,e,n,i,r,s){var c=r.tile,l=c.purpose,u=c.detailLevel,d=n.styleZoom;switch(l){case"terrain":case"traffic":case"geojson":var f=u<function(t){switch(t){case"terrain":return o.tiles.maxDetailLevel;case"traffic":return o.traffic.maxDetailLevel;case"geojson":return _e.a}}(l)?Object(a.c)(d,u,u+.99999):d;return s.minzoom<=f&&f<s.maxzoom;case"dynamicObject":return s.minzoom<=d&&d<=s.maxzoom;default:return s.minzoom<=d&&d<s.maxzoom}},sn=function(t,e,n,i,r){var a=n.styleZoom;return!("terrain"===r.tile.purpose&&a<=o.tiles.maxUniverseZoom)},cn=function(t,e,n,i,r,o){var a=n.styleZoom;return a>=o.minzoom&&a<o.maxzoom},ln=function(t,e,n,i,r,o){var a=r.tile,c=Object(W.i)(o.style.width,on(n,r));return 0!==c&&(e.bind(t,{u_float_width:Object(s.q)(c,a.size)/2,u_float_width_offset:Object(s.q)(1/window.devicePixelRatio,a.size)/2}),!0)},un=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.radius,on(n,r));return!(a<=0||(e.bind(t,{u_float_radius:a*window.devicePixelRatio}),0))},dn=function(t,e,n,i,r,o){var a=Object(W.i)(o.style.intensity,on(n,r));return e.bind(t,{u_float_intensity:a}),!0},fn=function(t,e,n,i,r,a){var s=on(n,r),c=Object(W.i)(a.style.textFontSize,s);if("point"===r.symbol){var l=r.attributes.labelIndex;l===ve.a.Second&&a.style.textFontSize2?c=Object(W.i)(a.style.textFontSize2,s):l===ve.a.Icon&&a.style.iconTextFontSize&&(c=Object(W.i)(a.style.iconTextFontSize,s))}return e.bind(t,{u_float_scale:c*window.devicePixelRatio/o.fonts.baseSize}),!0},hn=function(t,e,n,i,r,o){var a,s,c=o.style;if("point"===r.symbol)switch(r.attributes.labelIndex){case ve.a.Second:return(null!==(a=c.textHaloWidth2)&&void 0!==a?a:0)>0&&!!c.textHaloColor2;case ve.a.Icon:return(null!==(s=c.iconTextHaloWidth)&&void 0!==s?s:0)>0&&!!c.iconTextHaloColor;case ve.a.First:}return c.textHaloWidth>0&&!!c.textHaloColor},pn=function(t,e,n,i,r,o){return vn(t,e,n,r,o.style.textFontSize,o.style.textColor,o.style.textHaloWidth,o.style.textHaloColor,r.layerSettings.uniformSet)},mn=function(t,e,n,i,r,o){var a=r.layerSettings.uniformSet,s=r.attributes.labelIndex,c=o.style,l=c.textFontSize,u=c.textHaloWidth,d=c.textColor,f=c.textHaloColor;switch(s){case ve.a.Icon:l=c.iconTextFontSize,u=c.iconTextHaloWidth,d=c.iconTextColor,f=c.iconTextHaloColor;break;case ve.a.Second:l=c.textFontSize2,u=c.textHaloWidth2,d=c.textColor2,f=c.textHaloColor2}return vn(t,e,n,r,l,d,u,f,a)},vn=function(t,e,n,i,r,a,s,c,l){var u,d=on(n,i),f=Object(W.i)(r,d)/o.fonts.baseSize,h=f*window.devicePixelRatio,p=o.fonts.gamma/h;if("fontHalo"===l){if(!c)return!1;u=Object(W.b)(Object(W.g)(c,d))}else u=Object(W.b)(Object(W.g)(a,d));var m="fontHalo"===l?(6-Object(W.i)(s,d)/f)/8:.75;return e.bind(t,{u_float_buffer:m,u_float_gamma:p,u_vec4_color:u}),!0},_n=function(t,e,n,i,r){var o=r.attributes,a=o.offsetX,s=o.offsetY,c=window.devicePixelRatio;return e.bind(t,{u_vec2_offset:[a*c,s*c]}),!0},yn=function(t,e,n){return e.bind(t,{u_float_style_zoom:n.styleZoom}),!0},gn=function(t,e,n,i,r){var o=r.tile,a=n.zoom,s=Gt.n*Math.pow(2,a-o.zoomLevel)*window.devicePixelRatio;return e.bind(t,{u_float_tile_to_pixel_ratio:1/s}),!0};function bn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=[0,0,0,0];return function(e,i,r,o,a,s){for(var c=0;c<t.length;c++)if(!t[c](e,i,r,o,a,s,n))return!1;return!0}}var wn=function(t){t.depthMask(!0),t.enable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.enable(t.CULL_FACE),t.cullFace(t.BACK),t.disable(t.BLEND),t.blendFunc(t.ONE,t.ZERO),t.colorMask(!0,!0,!0,!0),t.disable(t.POLYGON_OFFSET_FILL)},xn=function(t){wn(t),t.depthMask(!1),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Sn=function(t){wn(t),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.disable(t.CULL_FACE)},In=function(t){wn(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},jn=function(t){wn(t),t.disable(t.DEPTH_TEST)},On=function(t){wn(t),t.depthMask(!1)},Mn=function(t){wn(t),t.colorMask(!1,!1,!1,!1)},Pn=function(t){wn(t),t.depthFunc(t.EQUAL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Ln=function(t){wn(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Tn=function(t){wn(t),t.polygonOffset(1,2),t.enable(t.POLYGON_OFFSET_FILL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},kn=function(t){wn(t),t.disable(t.DEPTH_TEST),t.cullFace(t.FRONT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},zn=function(t){t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE)},Cn=n(8),En=function(){function t(t,e){void 0===e&&(e={}),this._buffer=t,this.options=Object.assign({},Cn.a.defaultOptions,e)}return t.prototype.bind=function(t,e){this._buffer.bind(t,e,this.options)},t}(),An=function(){function t(t,e){void 0===e&&(e={}),this._vao=null,this._attributes=e,this._shaderProgram=t,this._ext=null}return t.prototype.bind=function(t){var e=t.extensions.OES_vertex_array_object;return e?this._bind(t.gl,e):this._shaderProgram.bind(t.gl,null,this._attributes),this},t.prototype.unbind=function(){return this._ext&&this._ext.bindVertexArrayOES(null),this},t.prototype.remove=function(){return this._vao&&this._ext.deleteVertexArrayOES(this._vao),this},t.prototype._bind=function(t,e){this._vao?e.bindVertexArrayOES(this._vao):this._prepare(t,e)},t.prototype._prepare=function(t,e){this._ext=e,this._vao=e.createVertexArrayOES(),e.bindVertexArrayOES(this._vao);var n=this._shaderProgram.attributes,i=this._attributes;for(var r in i){var o=n[r];!0!==o.index&&t.enableVertexAttribArray(o.location),i[r].bind(t,o.location)}},t}(),Dn=n(72),Fn=n(74),Rn=n(63),Bn=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:8,offset:0,normalized:!0});return new An(e,{a_vec2_vertex:n})},Nn=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:8,offset:4,normalized:!0});return new An(e,{a_vec2_vertex:n,a_vec4_identifier:i})},Un=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:12,offset:4,normalized:!1});return new An(e,{a_vec2_vertex:n,a_vec4_normals:i})},Zn=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:16,offset:4,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Float,stride:16,offset:8,normalized:!1});return new An(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec2_shift:r})},Hn=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:12,offset:4,normalized:!1}),r=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:12,offset:8,normalized:!0});return new An(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec4_identifier:r})},Gn=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:28,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:28,offset:4,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Byte,stride:28,offset:8,normalized:!1}),o=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:28,offset:12,normalized:!1}),a=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:28,offset:16,normalized:!1}),s=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:28,offset:20,normalized:!1}),c=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:28,offset:24,normalized:!0});return new An(e,{a_vec2_vertex:n,a_vec2_texture_widen:r,a_vec2_widen:i,a_float_vertex_distance:o,a_float_component_distance:a,a_float_object_length:s,a_vec4_identifier:c})},Wn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:20,offset:8,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:20,offset:12,normalized:!1});return new An(e,{a_vec4_position:n,a_vec2_offset:i,a_vec2_texcoord:r})},Vn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:20,offset:8,normalized:!1}),r=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:20,offset:16,normalized:!0});return new An(e,{a_vec4_position:n,a_vec2_offset:i,a_vec4_identifier:r})},qn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:28,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:28,offset:8,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Float,stride:28,offset:12,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Float,stride:28,offset:20,normalized:!1});return new An(e,{a_vec4_position:n,a_vec2_offset:r,a_vec2_texcoord:i,a_vec2_style_zoom_limits:o})},Yn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:3,dataType:Cn.a.Byte,stride:16,offset:8,normalized:!1});return new An(e,{a_vec3_vertex:n,a_vec3_normal:i})},Xn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:16,offset:12,normalized:!0});return new An(e,{a_vec3_vertex:n,a_vec4_identifier:i})},Kn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:1,dataType:Cn.a.Short,stride:16,offset:6,normalized:!0}),r=new En(t,{itemSize:2,dataType:Cn.a.Byte,stride:16,offset:8,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Byte,stride:16,offset:10,normalized:!1}),a=new En(t,{itemSize:3,dataType:Cn.a.Byte,stride:16,offset:12,normalized:!1});return new An(e,{a_vec4_vertex:n,a_vec2_normal:r,a_vec2_normal_delta:o,a_vec3_direction:a,a_float_distance:i})},Jn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:24,offset:8,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:24,offset:16,normalized:!1});return new An(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o})},Qn=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:24,offset:8,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:24,offset:16,normalized:!1}),a=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:24,offset:20,normalized:!0});return new An(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o,a_vec4_identifier:a})},$n=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:16,offset:8,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:16,offset:12,normalized:!1});return new An(e,{a_vec2_position:n,a_vec2_direction:i,a_vec2_widen_direction:r})},ti=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:16,offset:8,normalized:!1});return new An(e,{a_vec3_vertex:n,a_vec2_texcoord:i})},ei=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:8,offset:4,normalized:!1});return new An(e,{a_vec3_vertex:n,a_vec4_direction_distance:i})},ni=function(t,e){var n=new En(t,{itemSize:3,dataType:Cn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:12,offset:8,normalized:!1});return new An(e,{a_vec3_vertex:n,a_vec4_direction_distance:i})},ii=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:36,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:36,offset:4,normalized:!0}),r=new En(t,{itemSize:4,dataType:Cn.a.Byte,stride:36,offset:8,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:36,offset:12,normalized:!1}),a=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:36,offset:16,normalized:!1}),s=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:36,offset:20,normalized:!1}),c=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:36,offset:24,normalized:!1}),l=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:36,offset:28,normalized:!1}),u=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:36,offset:32,normalized:!0});return new An(e,{a_vec2_vertex:n,a_vec2_segment_end:i,a_vec4_texture_widen_arrow_widen:r,a_vec2_widen:o,a_vec2_direction:a,a_float_distance_from_start:s,a_float_object_length:c,a_float_type:l,a_vec4_identifier:u})},ri=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:12,offset:4,normalized:!1});return new An(e,{a_vec4_vertex:n,a_vec2_widen:i})},oi=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:12,offset:4,normalized:!1}),r=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:12,offset:8,normalized:!0});return new An(e,{a_vec4_vertex:n,a_vec2_widen:i,a_vec4_identifier:r})},ai=function(t,e){var n=Dn.a.sinks.fill.stride,i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:n,offset:4,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:8,normalized:!1});return new An(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o})},si=function(t,e){var n=Dn.a.sinks.fill.stride,i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new En(t,{itemSize:2,dataType:Cn.a.Short,stride:n,offset:4,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:8,normalized:!1}),a=new En(t,{itemSize:4,dataType:Cn.a.UnsignedByte,stride:n,offset:12,normalized:!0});return new An(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o,a_vec4_identifier:a})},ci=function(t,e){var n=Fn.a.sinks.fill.stride,i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:4,normalized:!1});return new An(e,{a_vec2_vertex:i,a_vec2_texcoord:r})},li=function(t,e){var n=Rn.a.sinks.framebuffer.stride,i=new En(t,{itemSize:2,dataType:Cn.a.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new En(t,{itemSize:1,dataType:Cn.a.Float,stride:n,offset:4,normalized:!1}),o=new En(t,{itemSize:2,dataType:Cn.a.Byte,stride:n,offset:8,normalized:!1});return new An(e,{a_vec2_position:i,a_vec2_widen:o,a_float_weight:r})},ui=function(t,e){var n=new En(t,{itemSize:2,dataType:Cn.a.Float,stride:0,offset:0,normalized:!1});return new An(e,{a_vec2_position:n})},di=function(){function t(t){this.gl=t,this.ext=t.getExtension("EXT_disjoint_timer_query"),this.queries=[]}return t.prototype.addTimer=function(){if(this.ext){var t=this.ext.createQueryEXT();this.queries.push(t),this.ext.beginQueryEXT(this.ext.TIME_ELAPSED_EXT,t)}},t.prototype.stopTimer=function(){this.ext&&this.queries.length&&this.ext.endQueryEXT(this.ext.TIME_ELAPSED_EXT)},t.prototype.tryToGetFirstTimerValue=function(){if(this.ext){var t=this.queries[0];if(t){var e=this.ext,n=e.getQueryObjectEXT(t,e.QUERY_RESULT_AVAILABLE_EXT),i=this.gl.getParameter(e.GPU_DISJOINT_EXT);if(n&&!i){var r=e.getQueryObjectEXT(t,e.QUERY_RESULT_EXT);return e.deleteQueryEXT(t),this.queries.shift(),Number(r)}}}},t}(),fi=function(){function t(t){this.name=t.name,this.index=t.index,this.location=void 0!==t.location?t.location:-1,this._enable=!1}return t.prototype.bindLocation=function(t,e){return-1!==this.location&&!0!==this.index&&t.bindAttribLocation(e,this.location,this.name),this},t.prototype.getLocation=function(t,e){return-1===this.location&&!0!==this.index&&(this.location=t.getAttribLocation(e,this.name)),this},t.prototype.bind=function(t,e){return this._enable||!0===this.index||(t.enableVertexAttribArray(this.location),this._enable=!0),e.bind(t,this.location),this},t.prototype.disable=function(t){return this._enable&&!0!==this.index&&(t.disableVertexAttribArray(this.location),this._enable=!1),this},t}(),hi=function(){function t(t){this.name=t.name,this.type=t.type,this.location=-1}return t.prototype.getLocation=function(t,e){return this.location=t.getUniformLocation(e,this.name),this},t.prototype.bind=function(t,e){var n=this.type;return"mat2"===n?t.uniformMatrix2fv(this.location,!1,e):"mat3"===n?t.uniformMatrix3fv(this.location,!1,e):"mat4"===n?t.uniformMatrix4fv(this.location,!1,e):"2f"===n?t.uniform2f(this.location,e[0],e[1]):"3f"===n?t.uniform3f(this.location,e[0],e[1],e[2]):"4f"===n?t.uniform4f(this.location,e[0],e[1],e[2],e[3]):"2i"===n?t.uniform2i(this.location,e[0],e[1]):"3i"===n?t.uniform3i(this.location,e[0],e[1],e[2]):"4i"===n?t.uniform4i(this.location,e[0],e[1],e[2],e[3]):t["uniform"+n](this.location,e),this},t}(),pi=function(){function t(t){var e=this;t=t||{},this._vertexShader=t.vertex,this._fragmentShader=t.fragment,this.uniforms={},t.uniforms=t.uniforms||[],t.uniforms.forEach((function(t){e.uniforms[t.name]=new hi(t)})),this.attributes={},t.attributes=t.attributes||[],t.attributes.forEach((function(t){e.attributes[t.name]=new fi(t)})),this._linked=!1,this._located=!1,this._error=!1}return t.prototype.enable=function(t){return this._error||(this.link(t),this.locate(t),this._error||t.useProgram(this._webglProgram)),this},t.prototype.bind=function(t,e,n){if(this._error)return this;if(e)for(var i in e)this.uniforms[i].bind(t,e[i]);if(n)for(var i in n)this.attributes[i].bind(t,n[i]);return this},t.prototype.disable=function(t){if(this._error)return this;for(var e in this.attributes)this.attributes[e].disable(t);return this},t.prototype.link=function(t){if(this._linked||this._error)return this;try{for(var e in this._webglProgram=t.createProgram(),this._vertexShader&&t.attachShader(this._webglProgram,this._vertexShader.get(t)),this._fragmentShader&&t.attachShader(this._webglProgram,this._fragmentShader.get(t)),this.attributes)this.attributes[e].bindLocation(t,this._webglProgram);if(t.linkProgram(this._webglProgram),!t.getProgramParameter(this._webglProgram,t.LINK_STATUS))throw new Error(t.getProgramInfoLog(this._webglProgram));this._linked=!0}catch(t){throw this._error=!0,t}return this},t.prototype.locate=function(t){if(this._located||this._error)return this;for(var e in this.attributes)this.attributes[e].getLocation(t,this._webglProgram);for(var e in this.uniforms)this.uniforms[e].getLocation(t,this._webglProgram);return this._located=!0,this},t}(),mi="vec4 apply_opacity(const vec4 color, const float opacity)\n{\nreturn color * opacity;\n}\n",vi={affine_step:"\nfloat affine_step(const float edge0, const float edge1, const float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0., 1.);\n}\n",apply_opacity:mi,color:"varying vec4 v_vec4_color;\nvoid main()\n{\ngl_FragColor = v_vec4_color;\n}\n",line:"varying vec4 v_vec4_color;\nvarying float v_float_distance;\nvoid main()\n{\ngl_FragColor = v_vec4_color * (1. - abs(v_float_distance * gl_FragCoord.w));\n}\n",lowp_float:"precision lowp float;\n",mediump_float:"precision mediump float;\n",highp_float:"precision highp float;\n",pointsprite:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",striped_line:"varying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nvec4 distance_func_smooth(in vec4 main_color, in vec4 border_color, in vec2 circle)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - v_float_width;\nmat2 derivatives = mat2(dFdx(v_vec2_circle), dFdy(v_vec2_circle));\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(v_vec2_circle, circle_dx);\nfloat distance_dy = dot(v_vec2_circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nvec4 from_main_to_border = mix(\nmain_color,\nborder_color,\naffine_step(-width, 0., distance * derivative_denominator));\nvec4 from_color_to_fade = mix(\nfrom_main_to_border,\nvec4(0.),\naffine_step(0., +width, distance * derivative_denominator));\nreturn from_color_to_fade;\n}\nfloat calculate_segment_color_factor(in float distance_in_parts, in float threshold)\n{\nfloat color_factor = abs(fract(distance_in_parts + 0.5 - 0.5 * threshold) - 0.5);\nfloat parts_affine_step_width = fwidth(distance_in_parts);\nfloat smoothed_color_factor = affine_step(\n0.5 * threshold - 0.5 * parts_affine_step_width,\n0.5 * threshold + 0.5 * parts_affine_step_width,\ncolor_factor);\nreturn smoothed_color_factor;\n}\nvoid main()\n{\nvec4 current_segment_color = mix(\nv_vec4_dash_color,\nv_vec4_space_color,\ncalculate_segment_color_factor(\nv_float_distance_in_parts,\nv_float_part_color_swap_threshold));\nvec4 final_border_color = (1.0 - v_vec4_border_color.a) * current_segment_color + v_vec4_border_color;\ngl_FragColor = distance_func_smooth(current_segment_color, final_border_color, v_vec2_circle);\n}\n",label:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_buffer;\nuniform float u_float_gamma;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    float dist = texture2D(u_sr2d_texture, v_vec2_texcoord).a;\n    float alpha = smoothstep(\n        u_float_buffer - u_float_gamma,\n        u_float_buffer + u_float_gamma,\n        dist\n    );\n    gl_FragColor = apply_opacity(u_vec4_color * alpha, u_float_opacity);\n}\n",one_way_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_width;\nuniform float u_float_length;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nfloat one_way_line_distance(const ArrowDistances ad)\n{\nreturn max(max(max(ad.top_tip_cut, ad.bottom_tip_cut), max(ad.top_left_wing, ad.top_right_wing)), min(ad.line, min(ad.bottom_left_wing, ad.bottom_right_wing)));\n}\nvoid main()\n{\nmat2 derivatives = mat2(dFdx(v_vec2_texcoord), dFdy(v_vec2_texcoord));\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nu_float_width * v_float_zpt_to_texcoord_factor,\nu_float_length * v_float_zpt_to_texcoord_factor,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat border_clipping = (abs(v_vec2_texcoord.y) - v_float_outer_width) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat fill_factor = affine_step(-1., 0., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, 0., derivatives)));\nfloat border_factor = max(border_clipping, affine_step(0., 1., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, v_float_border_width, derivatives))));\ngl_FragColor = apply_opacity(mix(mix(v_vec4_color, v_vec4_border_color, fill_factor), vec4(0.), border_factor), v_float_opacity);\n}\n",color_identify:"varying vec4 v_vec4_identifier;\nvoid main()\n{\ngl_FragColor = v_vec4_identifier;\n}\n",pointsprite_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nvec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\nif (color.a < 0.3) {\ndiscard;\n} else {\ngl_FragColor = v_vec4_identifier;\n}\n}\n",model:"uniform sampler2D u_sr2d_texture;\nuniform vec4 u_vec4_color;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord) * u_vec4_color;\n}\n",simple_line:"uniform vec4 u_vec4_color;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nvoid main()\n{\nvec4 color = u_vec4_color;\ngl_FragColor = color * clamp(\n1. + v_float_distance_offset - abs(v_float_distance * gl_FragCoord.w),\n0.,\n1.);\n}\n",enable_standard_derivatives:"#extension GL_OES_standard_derivatives: enable\n",arrow_functions:"struct ArrowDistanceParameters\n{\nvec2 wing_normal;\nvec2 tip_normal;\nvec2 mirrored_wing_normal;\nvec2 mirrored_tip_normal;\nfloat width;\nfloat full_length;\nfloat arrow_height;\n};\nArrowDistanceParameters calculate_arrow_distance_parameters(\nconst vec2 wing_normal,\nconst vec2 tip_normal,\nconst float width_zpt,\nconst float length_zpt,\nconst float tip_height_multiplier,\nconst float wing_height_multiplier)\n{\nvec2 mirrored_wing_normal = vec2(wing_normal.x, -wing_normal.y);\nvec2 mirrored_tip_normal = vec2(tip_normal.x, -tip_normal.y);\nfloat width = 0.5 * width_zpt;\nfloat length = 0.5 * length_zpt;\nfloat arrow_height = width_zpt * (tip_height_multiplier - wing_height_multiplier);\nreturn ArrowDistanceParameters(\nwing_normal,\ntip_normal,\nmirrored_wing_normal,\nmirrored_tip_normal,\nwidth,\nlength,\narrow_height);\n}\nstruct ArrowDistances\n{\nfloat top_tip_cut;\nfloat bottom_tip_cut;\nfloat line;\nfloat bottom_left_wing;\nfloat bottom_right_wing;\nfloat top_left_wing;\nfloat top_right_wing;\n};\nArrowDistances calculate_arrow_distances(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives)\n{\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dt = ( texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d0 = (-texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d1 = (abs(texcoord.y) - arrow_parameters.width - offset) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat d2 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.wing_normal)), abs(dot(derivatives[1], arrow_parameters.wing_normal)));\nfloat d3 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.mirrored_wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_wing_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_wing_normal)));\nfloat d4 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.tip_normal)), abs(dot(derivatives[1], arrow_parameters.tip_normal)));\nfloat d5 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.mirrored_tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_tip_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_tip_normal)));\nreturn ArrowDistances(dt, d0, d1, d2, d3, d4, d5);\n}\n",circle_functions:"\nconst float g_distance_precision_limit = 1e-4;\nstruct CircleDistance\n{\nfloat distance;\nfloat width;\n};\nCircleDistance circle_color_distance(\nconst mat2 derivatives,\nconst vec2 circle,\nconst float circle_width)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - circle_width;\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(circle, circle_dx);\nfloat distance_dy = dot(circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nreturn CircleDistance(\ndistance * derivative_denominator,\nwidth);\n}\nvec4 distance_to_color(\nconst float fill_distance,\nconst float border_distance,\nconst vec4 fill_color,\nconst vec4 border_color)\n{\nfloat fill_factor = affine_step(-1., 0., fill_distance);\nfloat border_factor = affine_step(0., 1., border_distance);\nreturn\nmix(mix(fill_color, border_color, fill_factor), vec4(.0), border_factor);\n}\nvec4 distance_to_color(\nconst CircleDistance circle_distance,\nconst vec4 fill_color)\n{\nfloat fill_factor = circle_distance.distance < g_distance_precision_limit\n? 0.\n: affine_step(0., circle_distance.width, circle_distance.distance);\nreturn mix(fill_color, vec4(0.), fill_factor);\n}\n",arrow_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-4;\n}\nfloat filter_border(const float start, const float value)\n{\nreturn step(start, value) * 2. - 1.;\n}\nfloat arrow_distance(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance,\nconst float line_distance_no_offset)\n{\nArrowDistances ad = calculate_arrow_distances(arrow_parameters, texcoord, offset, derivatives);\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat intersection_point = arrow_parameters.full_length - arrow_parameters.arrow_height - arrow_parameters.width * u_vec2_wing_normal.y / u_vec2_wing_normal.x;\nfloat tail_arrow_intersection = filter_border(-1., (texcoord.x - intersection_point) * derivatives_x_multiplier);\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat tail_hide_mask = (-texcoord.x - tail_hide_part) * derivatives_x_multiplier;\nfloat clipped_tail = max(tail_hide_mask, max(line_distance, max(ad.top_left_wing, ad.top_right_wing)));\nfloat line_without_offset = filter_border(0., line_distance_no_offset);\nfloat wings_with_tail = max(min(min(ad.bottom_left_wing, ad.bottom_right_wing), line_without_offset), max(ad.top_left_wing, ad.top_right_wing));\nreturn (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y)\n? max(ad.top_tip_cut, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail))\n: max(ad.top_tip_cut, min(clipped_tail, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail)));\n}\nvec4 distance_to_arrow_line_color(\nconst float fill_distance,\nconst float border_distance)\n{\nreturn distance_to_color(fill_distance, border_distance, v_vec4_color, v_vec4_border_color);\n}\nvec4 arrow_color(\nconst vec2 texcoord,\nconst ArrowDistanceParameters arrow_parameters,\nconst float line_fill_distance,\nconst float line_border_distance)\n{\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfloat border_clipping = (abs(texcoord.y) - v_vec4_arrow_width_length_border_outer.w) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat arrow_border_distance = arrow_distance(\narrow_parameters,\ntexcoord,\nv_vec4_arrow_width_length_border_outer.z,\nderivatives,\nline_border_distance,\nline_fill_distance);\nfloat border_factor = max(border_clipping, affine_step(0., 1., arrow_border_distance));\nreturn distance_to_arrow_line_color(\narrow_distance(arrow_parameters, texcoord, 0., derivatives, line_fill_distance, line_fill_distance),\nborder_factor);\n}\nfloat line_start_distance(\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance)\n{\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat d0 = (-texcoord.x - offset) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dh = (texcoord.x - tail_hide_part) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nreturn max(d0, max(line_distance, dh));\n}\nvec4 line_color(const float line_fill_distance, const float line_border_distance)\n{\nfloat type = v_vec2_line_type_arrow_tail.x;\nfloat fill_distance = line_fill_distance;\nfloat border_distance = line_border_distance;\nif (lookalike(type, g_type_start_border))\n{\nvec2 texcoord = v_vec4_texcoord_arrow_line.xy;\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfill_distance = line_start_distance(texcoord, 0., derivatives, line_fill_distance);\nborder_distance = line_start_distance(texcoord, v_vec4_arrow_width_length_border_outer.z, derivatives, line_border_distance);\n}\nreturn distance_to_arrow_line_color(fill_distance, border_distance);\n}\nvec4 arrow_line_color()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nv_vec4_arrow_width_length_border_outer.x,\nv_vec4_arrow_width_length_border_outer.y,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat line_width = arrow_parameters.width;\nfloat line_border = v_vec4_arrow_width_length_border_outer.z;\nvec2 line_texcoord = v_vec4_texcoord_arrow_line.zw;\nmat2 line_derivatives = mat2(dFdx(line_texcoord), dFdy(line_texcoord));\nCircleDistance circle_fill_distance = circle_color_distance(line_derivatives, line_texcoord, line_width);\nCircleDistance circle_border_distance = circle_color_distance(line_derivatives, line_texcoord, line_width + line_border);\nfloat line_fill_distance = affine_step(-1., 0., circle_fill_distance.distance / circle_fill_distance.width) - 1.;\nfloat line_border_distance = affine_step(0., circle_border_distance.width, circle_border_distance.distance);\nreturn lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow)\n? arrow_color(v_vec4_texcoord_arrow_line.xy, arrow_parameters, line_fill_distance, line_border_distance)\n: line_color(line_fill_distance, line_border_distance);\n}\nvoid main()\n{\ngl_FragColor = arrow_line_color();\n}\n",arrow_line_identify:"\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nconst float g_type_arrow = 1.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-5;\n}\nvoid main()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\n    gl_FragColor = v_vec4_identifier;\n}\n",circle_marker:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    float center_distance = dot(v_vec2_circle, v_vec2_circle);\n    gl_FragColor = u_vec4_color * affine_step(1.0, 1.0 - 4.0 / v_float_width, center_distance);\n}\n",road:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    \n    float opacity = 1.0 - affine_step(\n        v_float_half_width - length(fwidth(v_vec2_normal)),\n        v_float_half_width,\n        length(v_vec2_normal)\n    );\n    gl_FragColor = u_vec4_color * opacity;\n}\n",road_identify:"varying vec4 v_vec4_identifier;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    if (dot(v_vec2_normal, v_vec2_normal) > v_float_half_width * v_float_half_width) {\n        discard;\n    }\n    gl_FragColor = v_vec4_identifier;\n}\n",stretchable_image:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  vec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\n  if (color.a < 0.1) {\n    discard;\n  } else {\n    gl_FragColor = v_vec4_identifier;\n  }\n}\n",rect:"uniform vec4 u_vec4_color;\nvoid main()\n{\ngl_FragColor = u_vec4_color;\n}\n",rect_with_texture:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",heatmap:"uniform highp float u_float_intensity;\nvarying float v_float_weight;\nvarying vec2 v_vec2_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n    float d = -0.5 * 3.0 * 3.0 * dot(v_vec2_extrude, v_vec2_extrude);\n    float val = v_float_weight * u_float_intensity * GAUSS_COEF * exp(d);\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n}",heatmap_texture:"uniform sampler2D u_sr2d_texture;\nuniform sampler2D u_sr2d_ramp_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_position;\nvoid main() {\n    float t = texture2D(u_sr2d_texture, v_vec2_position).r;\n    vec4 color = texture2D(u_sr2d_ramp_texture, vec2(t, 0.5));\n    gl_FragColor = color * u_float_opacity;\n}"},_i={apply_height_factor:"vec4 apply_z_limitation(vec4 vertex, float tile_height, float height_limitation)\n{\nvertex.z = min(vertex.z, height_limitation / tile_height);\nreturn vertex;\n}\nvec4 apply_height_factor(const vec3 vertex, const float height_factor)\n{\nvec3 result_vertex = vertex;\nresult_vertex.z *= height_factor;\nreturn vec4(result_vertex, 1.0);\n}\n",apply_opacity:mi,color:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nvarying vec4 v_vec4_color;\nvoid main()\n{\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",diffuse:"uniform mat4 u_mat4_mvp;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec3 a_vec3_vertex;\nattribute vec3 a_vec3_normal;\nvarying vec4 v_vec4_color;\nconst float g_wall_offset_isometric = .001;\nconst float g_wall_offset_perspective = 8.;\nvoid main()\n{\nv_vec4_color = apply_opacity(\nvec4(\nu_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * abs(dot(u_vec3_light_direction, normalize_s08(a_vec3_normal)))),\nu_vec4_color.a),\nu_float_opacity);\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\ngl_Position = u_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nif (normalize_s08(a_vec3_normal).z < .5)\n{\nif ((u_mat4_mvp[0][3] == 0.) && (u_mat4_mvp[1][3] == 0.) && (u_mat4_mvp[2][3] == 0.))\n{\ngl_Position.z += g_wall_offset_isometric;\n}\nelse\n{\ngl_Position.z += g_wall_offset_perspective;\n}\n}\n}\n",line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_normal;\nattribute vec2 a_vec2_normal_delta;\nattribute vec3 a_vec3_direction;\nattribute float a_float_distance;\nvarying vec4 v_vec4_color;\nvarying float v_float_distance;\nconst float g_shift_pixels = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvec2 multiply_complex(vec2 lhs, vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nvoid main()\n{\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = u_mat4_mvp * vec4(normalize_s08(a_vec3_direction), 0.);\nvec4 vertex_hf = apply_height_factor(a_vec4_vertex.xyz, u_float_height_factor);\nvec4 clip_space_vertex = u_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nvec2 screen_space_direction = (clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\nvec2 bevel_normal = normalize_s08(a_vec2_normal);\nvec2 normal_delta = normalize_s08(a_vec2_normal_delta);\nvec4 clip_space_bevel_normal = u_mat4_mvp * vec4(bevel_normal, 0., 0.);\nvec2 screen_space_bevel_normal = (clip_space_bevel_normal.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_bevel_normal.w) * half_viewport;\nfloat bevel_denominator = max(g_min_denominator, length(screen_space_bevel_normal));\nfloat normal_factor = -dot(screen_space_bevel_normal, screen_space_perp) / denominator / bevel_denominator;\nvec2 wall_normal = multiply_complex(bevel_normal, vec2(normal_delta.x, sign(normal_factor) * normal_delta.y));\nfloat bevel_diffuse = abs(dot(u_vec3_light_direction.xy, bevel_normal));\nfloat wall_diffuse = abs(dot(u_vec3_light_direction.xy, wall_normal));\nfloat diffuse = mix(bevel_diffuse, wall_diffuse, abs(normal_factor));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.) * g_shift_pixels * a_float_distance / denominator * clip_space_vertex.w);\nv_vec4_color = vec4(u_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * diffuse), u_vec4_color.a);\nv_float_distance = a_float_distance * gl_Position.w;\n}\n",packed_attributes:"\nvec2 normalize_s08(vec2 value)\n{\nreturn value * (1. / 127.);\n}\nvec3 normalize_s08(vec3 value)\n{\nreturn value * (1. / 127.);\n}\nfloat normalize_s16(float value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 normalize_s16(vec2 value)\n{\nreturn value * (1. / 32767.);\n}\nvec3 normalize_s16(vec3 value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 unpack_widen(vec2 widen_packed)\n{\nreturn normalize_s08(widen_packed) * sqrt(2.);\n}\nvec2 unpack_texcoord(vec2 texcoord)\n{\nreturn texcoord * (1. / 32768.);\n}\nvec2 unpack_model_texcoord(vec2 texcoord)\n{\nconst float min_value = -3.0;\nconst float max_value = 5.0;\nreturn texcoord * (max_value - min_value) / 65536.0 + min_value;\n}\n",pixel_offset:"\nconst float g_min_denominator = 1e-7;\nconst float g_max_factor = 10000.;\nfloat calculate_multiplication_factor(\nvec2 half_viewport,\nvec4 clip_space_widen,\nvec4 clip_space_widen_perp,\nvec4 clip_space_vertex,\nfloat shift_pixels)\n{\nfloat limited_factor = 0.;\n{\nvec2 screen_space_widen = (clip_space_widen.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen.w) * half_viewport;\nvec2 screen_space_widen_perp = (clip_space_widen_perp.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen_perp.w) * half_viewport;\nvec2 perp = vec2(screen_space_widen_perp.y, -screen_space_widen_perp.x);\nfloat perp_length = length(perp);\nvec4 v = clip_space_vertex;\nvec4 n = clip_space_widen;\nfloat denominator = dot(perp, screen_space_widen) / shift_pixels - n.w * v.w * perp_length;\nif (abs(denominator) > g_min_denominator)\n{\nfloat factor = v.w * v.w * perp_length / denominator;\nlimited_factor = sign(factor) * min(g_max_factor, abs(factor));\n}\n}\nreturn limited_factor;\n}\n",pointsprite:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform float u_float_rounding_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = u_mat4_mvp * apply_height_factor(a_vec3_position, u_float_height_factor);\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",precision_constants:"\nconst float g_circle_scale_precision_factor = 1e8;\n",striped_line:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\n",striped_line_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",striped_line_functions:"struct PolylineDistance\n{\nfloat vertex_distance_from_start;\nfloat segment_distance_from_start;\nfloat total_length;\n};\nstruct StripedLineInParams\n{\nfloat dash_length;\nfloat space_length;\nfloat dash2_length;\nfloat line_width;\n};\nstruct StripedLineOutParams\n{\nfloat part_color_swap_threshold;\nfloat distance_in_parts;\n};\nvoid calculate_line_params(in PolylineDistance polyline_distance, in StripedLineInParams striped_line_params, out StripedLineOutParams line_params)\n{\nfloat requested_part_length =\nstriped_line_params.dash_length\n+ striped_line_params.space_length;\nfloat space2_length = requested_part_length - striped_line_params.dash2_length;\nfloat min_part_length =\nrequested_part_length\n- 0.5 * min(striped_line_params.space_length, space2_length);\nfloat part_count = max(\nfloor(polyline_distance.total_length / requested_part_length + 0.5),\n1.0);\nfloat part_length = polyline_distance.total_length / part_count;\nfloat dash_length = (part_length / requested_part_length) * striped_line_params.dash2_length;\nfloat part_color_swap_threshold;\nif (polyline_distance.total_length < min_part_length)\n{\ndash_length = part_length;\npart_color_swap_threshold = 1.0;\n}\nelse\n{\npart_color_swap_threshold = dash_length / part_length;\n}\nfloat segment_start = fract((polyline_distance.segment_distance_from_start + 0.5 * dash_length) / part_length);\nfloat vertex_normalized_distance = segment_start + polyline_distance.vertex_distance_from_start / part_length;\nline_params = StripedLineOutParams(\npart_color_swap_threshold,\nvertex_normalized_distance);\n}\n",label_fixed_anchor:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nuniform float u_float_height_factor;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    vec4 ndcPosition = u_mat4_mvp * apply_height_factor(a_vec4_position.xyz, u_float_height_factor);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n    gl_Position = ndcPosition;\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",label_fixed_anchor_identify:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec4 a_vec4_identifier;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 ndcPosition = u_mat4_mvp * a_vec4_position;\n        ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n        ndcPosition.w = 1.0;\n        ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n        gl_Position = ndcPosition;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",label_directional:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_style_zoom_limits;\nuniform float u_float_style_zoom;\nuniform float u_float_scale;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_texcoord;\nfloat clipw(const float w, const vec2 range, const float zoom) {\n    return w * (step(range.x, zoom) - step(range.y, zoom));\n}\nvoid main() {\n    vec4 newPosition = a_vec4_position;\n    newPosition.xy += a_vec2_offset * u_float_scale * u_float_tile_to_pixel_ratio;\n    newPosition = u_mat4_mvp * newPosition;\n    gl_Position = vec4(newPosition.xyz, clipw(newPosition.w, a_vec2_style_zoom_limits, u_float_style_zoom));\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",one_way_line:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_border_width;\nuniform float u_float_border_width_offset;\nuniform float u_float_size_factor;\nuniform mediump float u_float_width;\nuniform mediump float u_float_length;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_direction;\nattribute vec2 a_vec2_widen_direction;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nvoid main()\n{\nfloat style_scale_clamped = clamp(u_vec3_projection_scale_style_scale_dpi.y, u_vec2_scale_limits.x, u_vec2_scale_limits.y);\nfloat scale_ratio = u_vec3_projection_scale_style_scale_dpi.x / u_vec3_projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nArrowParameters arrow_parameters = calculate_arrow_parameters(\ncalculation_scale,\nu_float_width,\nu_float_border_width,\nu_float_length,\nu_float_wing_width_multiplier,\nu_float_size_factor);\nv_float_zpt_to_texcoord_factor = arrow_parameters.zpt_to_texcoord_factor;\nv_float_outer_width = arrow_parameters.outer_width;\nvec2 direction = normalize_s08(a_vec2_direction);\nvec2 untransformed_widen = a_vec2_widen_direction * arrow_parameters.widen_size;\nvec2 widen = multiply_complex(untransformed_widen * arrow_parameters.final_size, direction);\nfloat shift_pixels = g_shift_pixels * sqrt(2.) / min(abs(untransformed_widen.x), abs(untransformed_widen.y));\nVertexShiftParameters shift_parameters = calculate_vertex_shift_parameters(\nu_mat4_mvp,\nu_vec2_vpt_size,\na_vec2_position,\nwiden,\nshift_pixels);\ngl_Position = shift_parameters.clip_space_vertex / arrow_parameters.final_size * g_w_factor;\nv_vec2_texcoord = untransformed_widen * (1. + shift_parameters.limited_factor);\nfloat border_width = u_float_border_width * v_float_zpt_to_texcoord_factor;\nfloat border_width_offset = u_float_border_width_offset * v_float_zpt_to_texcoord_factor;\nv_float_border_width = max(0., border_width - u_vec3_projection_scale_style_scale_dpi.y / style_scale_clamped * border_width_offset);\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_float_opacity = u_float_opacity;\n}\n",round_position:"\nvec4 round_position(const vec4 position, const vec2 half_viewport)\n{\nif (\nposition.w < 0.\n|| position.x < -position.w\n|| position.x > position.w\n|| position.y < -position.w\n|| position.y > position.w\n|| position.z < -position.w\n|| position.z > position.w)\n{\nreturn position;\n}\nelse\n{\nreturn vec4(\nsign(position.xy) * floor(abs(position.xy) * half_viewport / position.w + .5)\n* position.w / half_viewport,\nposition.zw);\n}\n}\n",color_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",model_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec3_vertex, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",pointsprite_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = u_mat4_mvp * apply_height_factor(a_vec3_position, u_float_height_factor);\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, 1.0);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\nv_vec4_identifier = a_vec4_identifier;\n}\n",model:"uniform mat4 u_mat4_mvp;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nv_vec2_texcoord = unpack_model_texcoord(a_vec2_texcoord);\ngl_Position = u_mat4_mvp * apply_height_factor(a_vec3_vertex, u_float_height_factor);\n}\n",simple_line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nuniform float u_float_height_factor;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_z_offset;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_direction_distance;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nconst float g_smooth_width = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvoid main()\n{\nfloat shift_pixels = 0.5 * max(u_float_width - 1., 0.);\nfloat shift_pixels_added = shift_pixels + g_smooth_width;\nvec3 direction = a_vec4_direction_distance.xyz;\nfloat distance = a_vec4_direction_distance.w;\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = normalize(u_mat4_mvp * vec4(normalize_s08(direction), 0.));\nvec4 clip_space_vertex = u_mat4_mvp * apply_z_limitation(\napply_height_factor(a_vec3_vertex, u_float_height_factor),\nu_float_tile_height, u_float_height_limitation\n);\nvec2 screen_space_direction =\n(clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.)\n* distance * shift_pixels_added / denominator * clip_space_vertex.w);\ngl_Position.z += u_float_z_offset;\nv_float_distance = shift_pixels_added * distance * gl_Position.w;\nv_float_distance_offset = shift_pixels;\n}\n",arrow_line_entrance:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_width_zpt;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_border_width_zpt;\nuniform float u_float_size_factor;\nuniform float u_float_border_width_offset;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_relative_end_position;\nuniform float u_float_tip_movement_amplitude;\nuniform float u_float_vertex_shift; \nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_segment_end;\nattribute vec4 a_vec4_texture_widen_arrow_widen;\nattribute vec2 a_vec2_widen;\nattribute vec2 a_vec2_direction; \nattribute float a_float_distance_from_start;\nattribute float a_float_object_length;\nattribute float a_float_type;\nattribute vec4 a_vec4_identifier; \nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_w_factor = 1e-7;\nconst float g_type_line = 0.;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nconst float g_type_line_ending = 3.;\nconst float g_type_line_cut = 4.;\nconst float g_shift_pixels = 2.;\nconst float g_line_overlapping_part = .2;\nstruct ArrowLineViewParameters\n{\nfloat vertex_type;\nfloat width_zpt;\nfloat border_width_zpt;\nfloat border_width_offset;\nfloat arrow_segment_length_zpt;\nfloat wing_width_multiplier;\nfloat size_factor;\nvec2 vertex_position;\nvec2 vertex_widen;\nvec2 line_texture_widen;\nvec2 arrow_texture_widen;\nvec2 segment_direction;\nfloat segment_length;\nfloat distance_to_end;\n};\nstruct DistanceShiftParameters\n{\nfloat shift;\nbool invisible;\n};\nvec2 perp(const vec2 vector)\n{\nreturn vec2(-vector.y, vector.x);\n}\nvec2 vertex_shift(const Scale scale)\n{\nreturn u_float_vertex_shift * u_float_tip_movement_amplitude * normalize_s08(a_vec2_direction) * scale.calculation;\n}\nvec2 arrow_shift(const ArrowLineViewParameters view)\n{\nreturn view.segment_direction * view.distance_to_end;\n}\nfloat erase_length_end()\n{\nreturn clamp(u_float_relative_end_position, 0., 1.) * a_float_object_length;\n}\nvoid set_texcoord_varyings(const vec2 arrow_texcoord, const vec2 line_texcoord)\n{\nv_vec4_texcoord_arrow_line = vec4(arrow_texcoord, line_texcoord);\n}\nvoid set_arrow_varyings(\nconst float arrow_width,\nconst float arrow_length,\nconst float arrow_border,\nconst float arrow_outer_width,\nconst float arrow_tail_hide_part)\n{\nv_vec4_arrow_width_length_border_outer = vec4(\narrow_width,\narrow_length,\narrow_border,\narrow_outer_width);\nv_vec2_line_type_arrow_tail = vec2(\na_float_type,\narrow_tail_hide_part);\n}\nDistanceShiftParameters calculate_entrance_arrow_distances(\nconst ArrowLineViewParameters view,\nconst float signed_distance_shift,\nconst float arrow_final_size,\nconst float entrance_arrow_distance_shift)\n{\nDistanceShiftParameters line_distance_parameters = DistanceShiftParameters(\nsigned_distance_shift + entrance_arrow_distance_shift,\nfalse);\nif (a_float_type == g_type_arrow)\n{\nbool outside_of_current_segment = view.distance_to_end > view.segment_length + entrance_arrow_distance_shift;\nbool inside_end_hide = a_float_distance_from_start + entrance_arrow_distance_shift > erase_length_end();\nreturn DistanceShiftParameters(\nline_distance_parameters.shift + view.distance_to_end,\noutside_of_current_segment || inside_end_hide\n);\n}\nelse\n{\nreturn line_distance_parameters;\n}\n}\nvoid set_distance_varyings(\nconst ArrowLineViewParameters view,\nconst float arrow_final_size,\nconst float signed_shift_distance)\n{\nfloat entrance_arrow_distance_shift = arrow_final_size * (2. - g_line_overlapping_part);\nDistanceShiftParameters distance_shift_parameters = calculate_entrance_arrow_distances(\nview,\nsigned_shift_distance,\narrow_final_size,\nentrance_arrow_distance_shift);\nv_vec4_distance_vertex_hiding =\nvec4(\na_float_distance_from_start + distance_shift_parameters.shift,\n0.,\nerase_length_end(),\ndistance_shift_parameters.invisible\n? a_float_object_length\n: 0.\n) / a_float_object_length;\n}\nArrowLineViewParameters decode_arrow_line_view_parameters()\n{\nfloat width_zpt = u_float_width_zpt;\nfloat border_width_zpt = u_float_border_width_zpt;\nfloat arrow_segment_length_zpt = width_zpt * u_float_tip_height_multiplier + border_width_zpt;\nfloat vertex_type = a_float_type;\nvec2 segment_direction = (vertex_type == g_type_line_ending || vertex_type == g_type_line_cut)\n? normalize(a_vec2_vertex - a_vec2_segment_end)\n: normalize(a_vec2_segment_end - a_vec2_vertex);\nfloat segment_length = length(a_vec2_segment_end - a_vec2_vertex);\nfloat distance_to_end = erase_length_end() - a_float_distance_from_start;\nreturn ArrowLineViewParameters(\nvertex_type,\nwidth_zpt,\nborder_width_zpt,\nu_float_border_width_offset,\narrow_segment_length_zpt,\nu_float_wing_width_multiplier,\nu_float_size_factor,\na_vec2_vertex,\nunpack_widen(a_vec2_widen),\nunpack_widen(a_vec4_texture_widen_arrow_widen.xy),\nunpack_widen(a_vec4_texture_widen_arrow_widen.zw),\nsegment_direction,\nsegment_length,\ndistance_to_end);\n}\nvec4 process_arrow_line_vertex(const Scale scale, const mat4 mvp, const vec2 vpt_size)\n{\nArrowLineViewParameters view = decode_arrow_line_view_parameters();\nArrowParameters arrow_parameters = calculate_arrow_parameters(\nscale.calculation,\nview.width_zpt,\nview.border_width_zpt,\nview.arrow_segment_length_zpt,\nview.wing_width_multiplier,\nview.size_factor);\nvec2 vertex_widen = view.vertex_widen;\nvec2 texture_widen_with_sign = view.line_texture_widen;\nfloat shift_sign = sign(dot(vertex_widen, texture_widen_with_sign));\nvec2 line_texture_widen = shift_sign * texture_widen_with_sign;\nfloat line_final_size = (view.width_zpt + 2. * view.border_width_zpt) * view.size_factor * scale.calculation;\nfloat final_size = (view.vertex_type == g_type_arrow)\n? arrow_parameters.final_size\n: line_final_size;\nvec2 line_texture_widen_perp = perp(line_texture_widen);\nfloat shift_distance = abs(dot(vertex_widen, line_texture_widen_perp)) * final_size;\nvec2 shift_direction = line_texture_widen_perp * sign(dot(vertex_widen, line_texture_widen_perp));\nvec2 line_vertex_shift = vertex_widen * final_size - shift_direction * max(0., shift_distance - .5 * view.segment_length);\nvec2 arrow_vertex_widen = vertex_widen * arrow_parameters.final_size;\nvec2 scene_vertex_shift = (view.vertex_type == g_type_arrow)\n? arrow_vertex_widen\n: line_vertex_shift;\nvec2 arrow_position_shift = (view.vertex_type == g_type_arrow)\n? arrow_shift(view)\n: vec2(0.);\nfloat shift_pixels = g_shift_pixels * sqrt(2.);\nVertexShiftParameters line_shift_parameters = calculate_vertex_shift_parameters(\nmvp,\nvpt_size,\nview.vertex_position + (vertex_shift(scale) + arrow_position_shift),\nscene_vertex_shift,\nshift_pixels);\nfloat arrow_line_texcoord_scale = line_final_size / arrow_parameters.final_size;\nfloat line_texcoord_scale = (view.vertex_type != g_type_arrow)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 line_texcoord = line_texture_widen * (1. + line_shift_parameters.limited_factor) * line_texcoord_scale;\nfloat arrow_texcoord_scale = (view.vertex_type == g_type_start_border)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 arrow_texcoord = view.arrow_texture_widen * (1. + line_shift_parameters.limited_factor) * arrow_texcoord_scale;\nset_texcoord_varyings(arrow_texcoord, line_texcoord);\nfloat arrow_width = view.width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_length = view.arrow_segment_length_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat texcoord_border_width = view.border_width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat border_width_texcoord_offset = view.border_width_offset * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_border = max(0., texcoord_border_width - scale.style / scale.style_clamped * border_width_texcoord_offset);\nfloat tail_shift_direction = (view.vertex_type == g_type_line_ending || view.vertex_type == g_type_start_border) ? 1. : -1.;\nfloat tail_hide_shift = dot(arrow_vertex_widen, tail_shift_direction * view.segment_direction);\nfloat arrow_tail_hide_part = (view.distance_to_end - tail_hide_shift) * arrow_parameters.zpt_to_texcoord_factor / view.size_factor;\nset_arrow_varyings(\narrow_width,\narrow_length,\narrow_border,\narrow_parameters.outer_width,\narrow_tail_hide_part);\nset_distance_varyings(\nview,\narrow_parameters.final_size,\nshift_sign * shift_distance);\nreturn line_shift_parameters.clip_space_vertex / final_size;\n}\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier; \nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scale_limits);\nvec4 processed_vertex = process_arrow_line_vertex(scale, u_mat4_mvp, u_vec2_vpt_size);\ngl_Position = processed_vertex * g_w_factor;\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\n}\n",diffuse_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\ngl_Position = round_position(\nu_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation),\n.5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",calculate_scale:"struct Scale\n{\nfloat projection;\nfloat style;\nfloat style_clamped;\nfloat calculation;\n};\nScale calculate_scale(const vec3 projection_scale_style_scale_dpi, const vec2 scale_limits)\n{\nfloat style_scale_clamped = clamp(projection_scale_style_scale_dpi.y, scale_limits.x, scale_limits.y);\nfloat scale_ratio = projection_scale_style_scale_dpi.x / projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nreturn Scale(\nprojection_scale_style_scale_dpi.x,\nprojection_scale_style_scale_dpi.y,\nstyle_scale_clamped,\ncalculation_scale);\n}\nconst float g_min_scale_factor = 1e-2;\nconst float g_max_scale_factor = 1e2;\nconst float g_base_scale_numerator = 1e2;\nfloat normalize_scale_to_tile(const float scale, const float tile_size)\n{\nreturn clamp(\n    (scale - g_min_scale_factor) / (tile_size - g_min_scale_factor),\n    g_min_scale_factor,\n    g_max_scale_factor);\n}",line_width:"float calculate_final_width(\nconst Scale scale,\nconst float width,\nconst float width_offset)\n{\nfloat final_width = max(0., scale.calculation * width - scale.projection * width_offset);\nreturn final_width;\n}\n",arrow_functions:"\nvec2 multiply_complex(const vec2 lhs, const vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nstruct ArrowParameters\n{\nfloat zpt_to_texcoord_factor;\nfloat final_size;\nfloat outer_width;\nvec2 widen_size;\n};\nArrowParameters calculate_arrow_parameters(\nconst float calculation_scale,\nconst float width_zpt,\nconst float border_width_zpt,\nconst float segment_length_zpt,\nconst float wing_width_multiplier,\nconst float size_factor)\n{\nfloat quad_width = 2.0 * border_width_zpt + 2.0 * wing_width_multiplier * width_zpt;\nfloat quad_height = 2.0 * border_width_zpt + segment_length_zpt;\nfloat max_quad_dimension = max(quad_width, quad_height);\nfloat zpt_to_texcoord_factor = 2.0 / max_quad_dimension;\nfloat final_size = calculation_scale * size_factor * max_quad_dimension;\nvec2 widen_size = 0.5 * vec2(quad_height, quad_width) * zpt_to_texcoord_factor;\nfloat outer_width = (width_zpt * wing_width_multiplier + border_width_zpt) * zpt_to_texcoord_factor;\nreturn ArrowParameters(\nzpt_to_texcoord_factor,\nfinal_size,\nouter_width,\nwiden_size);\n}\nstruct VertexShiftParameters\n{\nvec4 clip_space_vertex;\nfloat limited_factor;\n};\nVertexShiftParameters calculate_vertex_shift_parameters(\nconst mat4 mvp,\nconst vec2 vpt_size,\nconst vec2 vertex,\nconst vec2 widen,\nconst float shift_pixels)\n{\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = mvp * vec4(widen_perp, 0., 0.);\nvec2 half_viewport = vpt_size / 2.;\nvec4 clip_space_vertex = mvp * vec4(vertex, 0.0, 1.0) + clip_space_widen;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\nshift_pixels);\nreturn VertexShiftParameters(\nclip_space_vertex + clip_space_widen * limited_factor,\nlimited_factor);\n}\n",circle_marker:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n    vec4 ndc_position = clip_space_position / clip_space_position.w;\n    ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n    gl_Position = ndc_position;\n    v_vec2_circle = a_vec2_widen;\n    v_float_width = u_float_width;\n}\n",circle_marker_identify:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    v_vec2_circle = a_vec2_widen;\n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n        vec4 ndc_position = clip_space_position / clip_space_position.w;\n        ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n        gl_Position = ndc_position;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",raster_functions:"\nfloat unpack_scale(float value)\n{\nreturn exp(abs(value) / 256.) * sign(value);\n}\nfloat unpack_positive_value(float value)\n{\nreturn exp(value / 256.);\n}\nvec2 make_position(const vec2 position, const float w, const vec2 inv_half_size, const float rounding_factor)\n{\nvec2 non_rounded_position = (position + w) / (w * inv_half_size);\nvec2 rounded_position = floor(non_rounded_position + 0.5);\nvec2 rounding_delta = rounded_position - non_rounded_position;\nvec2 pixel_coord = non_rounded_position + rounding_factor * rounding_delta - 0.5;\nreturn (pixel_coord * inv_half_size) * w - w;\n}\nvec2 overlay_transform(const vec2 position, const vec2 inv_half_size)\n{\nreturn position * inv_half_size;\n}\nfloat clipw(const float w, const vec2 range, const float scale)\n{\nreturn w * (step(unpack_scale(range.x), scale) - step(unpack_positive_value(range.y), scale));\n}\nvec2 rescale(const vec2 corner, const vec2 rescale, const vec2 scale_range, const float style_scale)\n{\nif (scale_range.x < 0.)\n{\nfloat default_scale_denominator = unpack_positive_value(rescale.x);\nfloat rescale_coeff = unpack_positive_value(rescale.y);\nfloat min_scale = unpack_positive_value(-scale_range.x);\nfloat stretch_exponent = floor(0.5 + log2(\nmax(1., 1. + rescale_coeff * (1. / max(min_scale, style_scale) - default_scale_denominator))));\nreturn corner.xy * exp2(stretch_exponent);\n}\nreturn corner;\n}\n",road:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec2 a_vec2_shift;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nuniform float u_float_shift;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    vec2 shift = a_vec2_shift * u_float_shift;\n    \n    vec4 shifted_vertex = vec4(a_vec2_vertex + (shift + extender) * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n    gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    v_vec2_normal = normal;\n    v_float_half_width = half_width;\n}\n",road_identify:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_normal;\nvarying vec4 v_vec4_identifier;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier) {\n        \n        vec4 shifted_vertex = vec4(a_vec2_vertex + extender * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n        gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    } else {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n    v_vec2_normal = normal;\n    v_vec4_identifier = a_vec4_identifier;\n    v_float_half_width = half_width;\n}\n",stretchable_image:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n  vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n  vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\nvec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n  gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n  {\n    vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n    vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n    vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\n  vec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n    gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  }\n  else\n  {\n    gl_Position = vec4(1., 1., 1., 1.);\n  }\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n  v_vec4_identifier = a_vec4_identifier;\n}\n",rect:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",rect_with_texture:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",heatmap:"attribute vec2 a_vec2_position;\nattribute vec2 a_vec2_widen;\nattribute float a_float_weight;\nvarying vec2 v_vec2_extrude;\nvarying float v_float_weight;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_radius;\nuniform float u_float_intensity;\nuniform float u_float_tile_to_pixel_ratio;\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n    float S = sqrt(-2.0 * log(ZERO / a_float_weight / u_float_intensity / GAUSS_COEF)) / 3.0;\n    v_vec2_extrude = S * a_vec2_widen;\n    v_float_weight = a_float_weight;\n    vec2 pos = a_vec2_position + a_vec2_widen * u_float_radius * u_float_tile_to_pixel_ratio;\n    gl_Position = u_mat4_mvp * vec4(pos, 0.0, 1.0);\n}",heatmap_texture:"attribute vec2 a_vec2_position;\nvarying vec2 v_vec2_position;\nvoid main() {\n    gl_Position = vec4(a_vec2_position, 0.0, 1.0);\n    v_vec2_position = clamp(a_vec2_position, vec2(0,0), vec2(1,1));\n}"},yi={color:["apply_opacity","color"],diffuse:["packed_attributes","apply_height_factor","apply_opacity","diffuse"],line:["packed_attributes","apply_height_factor","apply_opacity","line"],pointSprite:["packed_attributes","apply_height_factor","raster_functions","pointsprite"],labelPoint:["packed_attributes","apply_height_factor","label_fixed_anchor"],labelPointIdentify:["label_fixed_anchor_identify"],labelLine:["packed_attributes","label_directional"],stripedLine:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line"],stripedLineIdentify:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line_identify"],oneWayLine:["packed_attributes","pixel_offset","arrow_functions","apply_opacity","one_way_line"],colorIdentify:["round_position","color_identify"],modelIdentify:["round_position","model_identify"],buildingIdentify:["round_position","apply_height_factor","diffuse_identify"],pointSpriteIdentify:["packed_attributes","apply_height_factor","raster_functions","pointsprite_identify"],model:["packed_attributes","apply_height_factor","model"],simpleLine:["packed_attributes","apply_height_factor","simple_line"],entranceArrow:["packed_attributes","pixel_offset","arrow_functions","calculate_scale","apply_opacity","arrow_line_entrance"],circleMarker:["circle_marker"],circleMarkerIdentify:["circle_marker_identify"],rect:["rect"],road:["road"],roadIdentify:["road_identify"],rectWithTexture:["packed_attributes","apply_opacity","raster_functions","rect_with_texture"],stretchableImage:["packed_attributes","raster_functions","stretchable_image"],stretchableImageIdentify:["packed_attributes","raster_functions","stretchable_image_identify"],heatmap:["heatmap"],heatmapTexture:["heatmap_texture"]},gi={color:["lowp_float","color"],line:["mediump_float","line"],pointSprite:["mediump_float","apply_opacity","pointsprite"],label:["mediump_float","apply_opacity","label"],stripedLine:["enable_standard_derivatives","mediump_float","affine_step","striped_line"],oneWayLine:["enable_standard_derivatives","mediump_float","affine_step","apply_opacity","arrow_functions","one_way_line"],colorIdentify:["lowp_float","color_identify"],pointSpriteIdentify:["mediump_float","pointsprite_identify"],model:["lowp_float","model"],simpleLine:["lowp_float","simple_line"],entranceArrow:["enable_standard_derivatives","highp_float","affine_step","arrow_functions","circle_functions","arrow_line"],entranceArrowIdentify:["lowp_float","arrow_line_identify"],circleMarker:["mediump_float","affine_step","circle_marker"],rect:["lowp_float","rect"],road:["enable_standard_derivatives","mediump_float","affine_step","road"],roadIdentify:["enable_standard_derivatives","lowp_float","road_identify"],stretchableImage:["mediump_float","stretchable_image"],rectWithTexture:["mediump_float","apply_opacity","rect_with_texture"],stretchableImageIdentify:["mediump_float","stretchable_image_identify"],heatmap:["mediump_float","heatmap"],heatmapTexture:["mediump_float","heatmap_texture"]},bi=function(){function t(e,n,i){void 0===i&&(i=[]),this.type="vertex"===e?t.Vertex:t.Fragment,this._code=Array.isArray(n)?n.join("\n"):n||"",this._code=i.map((function(t){return void 0!==t.value?"#define "+t.type+" "+t.value:"#define "+t.type})).join("\n")+"\n"+this._code}return t.prototype.get=function(t){return this._shader||this._compile(t),this._shader},t.prototype.remove=function(t){this._shader&&t.deleteShader(this._shader)},t.prototype._compile=function(e){var n=this.type===t.Vertex?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=this._shader=e.createShader(n);if(!i||e.isContextLost())throw new Error("[2gl] Failed to create shader. Shader is null: "+!i+". Context is lost: "+e.isContextLost());if(e.shaderSource(i,this._code),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(i))},t}();bi.Vertex=1,bi.Fragment=2;var wi=bi,xi={},Si={};for(var Ii in yi){var ji=yi[Ii].map((function(t){return _i[t]}));Si[Ii]=ji}for(var Ii in gi)ji=gi[Ii].map((function(t){return vi[t]})),xi[Ii]=ji;function Oi(t){return new wi("vertex",Si[t])}function Mi(t){return new wi("fragment",xi[t])}var Pi=n(53),Li=n(19),Ti=function(t,e,n,i){return{drawSymbol:zi(t,e,n,i),useProgram:function(e){var r=e[0].layerSettings,o=r.globalBinder,a=r.programName,s=i.renderer.getShaderProgram(a);s.enable(t),o(t,s,n,i)},useState:function(e){e[0].layerSettings.stateBinder(t)}}},ki=new Float32Array(Li.b()),zi=function(t,e,n,i){return function(r,o){var a=r[0],s=a.layerSettings,c=s.objectBinder,l=s.programName,u=i.renderer.getShaderProgram(l);c(t,u,n,i,a,o)&&r.forEach((function(r){"buildingModel"===r.symbol?(Li.g(ki,i.camera.viewProjectionMatrix,r.attributes.matrix),u.bind(t,{u_mat4_mvp:ki})):"heatmap"===r.symbol&&"fill"===r.sink||u.bind(t,{u_mat4_mvp:r.tile.mvpMatrix}),r.vao.bind({gl:t,extensions:e});var o=r.rangeStart/r.stride,a=(r.rangeEnd-r.rangeStart)/r.stride,s="buildingModel"===r.symbol&&"fill"===r.sink&&1===r.attributes.primitiveType?t.TRIANGLE_STRIP:t.TRIANGLES;t.drawArrays(s,o,a),n.collectStats&&!r.layerSettings.identify&&(n.stats.drawCount++,n.stats.vertexCount+=a)}))}},Ci=n(73),Ei=n(37),Ai=function(t,e,n,i){qi(n,t).forEach((function(n){return Di(t,e,n,i)}))},Di=function(t,e,n,i){Xi(e.styleManager,n,t).forEach((function(n){Hi(e.styleManager,n[0])?Fi(t,e,n,i):Ri(t,e,n,i)}))},Fi=function(t,e,n,i){var r=Hi(e.styleManager,n[0]);if(r){var o=function(n,a){a>=r.orderBy.length?Ri(t,e,n,i):Ji(r.orderBy[a],n,t).forEach((function(t,e){return o(t,e+1)}))};o(n,0)}},Ri=function(t,e,n,i){var r=n[0];if((null==r?void 0:r.type)===Ci.a.Custom)e.styleManager.callCustomLayerRender(r.attributes.layerId);else{var o=n;Yi(e.styleManager,o,t).forEach((function(n){return Bi(t,e,n,i)}))}},Bi=function(t,e,n,i){Ki(n,t).forEach((function(n){return Ni(t,e,n,i)}))},Ni=function(t,e,n,i){Qi(n,t).forEach((function(n){return Ui(t,e,n,i)}))},Ui=function(t,e,n,i){i.useProgram(n),$i(n,t).forEach((function(n){Zi(t,e,n,i)}))},Zi=function(t,e,n,i){i.useState(n);var r=n[0],o=function(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];return i&&i.type!==e.symbol&&Object(Ei.a)("Expecting layer with type '"+e.symbol+"' but got '"+i.type+"'"),i}}(e.styleManager,r);o&&tr(n,t).forEach((function(t){i.drawSymbol(t,o)}))};function Hi(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];if(i&&void 0!==i.groupId){var r=n.groupsById[i.groupId];if(!r||"group"===r.type)return r;Object(Ei.a)("Expecting layer with type 'group' but got '"+r.type+"'")}}}var Gi=function(t,e){return Number(t)-Number(e)},Wi=function(t){return function(e,n){for(var i={},r=0;r<e.length;r++){var o=e[r],a=t(o,n),s=i[a];void 0===s?i[a]=[o]:s.push(o)}var c=Object.keys(i);c.sort(Gi);var l=[];for(r=0;r<c.length;r++)l.push(i[c[r]]);return l}},Vi=function(t){return function(e,n){for(var i=new Map,r=0;r<e.length;r++){var o=e[r],a=t(o,n);i.has(a)?i.get(a).push(o):i.set(a,[o])}return i}},qi=Wi((function(t){return t.attributes.styleId===Z.a?1:0})),Yi=function(t,e,n){return Wi((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return Object(Ei.a)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.groupIndex||0:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},Xi=function(t,e,n){return Wi((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return Object(Ei.a)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.renderIndex:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},Ki=Wi((function(t){return t.layerSettings.subRenderIndex||0})),Ji=function(t,e,n){return Wi((function(e,n){var i=Object(W.c)(n.styleZoom,n.styleState,e.attributes.tileData);return Object(W.i)(t,i,0)}))(e,n)},Qi=Vi((function(t){return t.layerSettings.programName})),$i=Vi((function(t){return t.layerSettings.stateBinder})),tr=Vi((function(t){return t.sink+"_"+t.attributesHash+"_"+t.tile.readiness})),er=function(t){function e(e,n){var i=t.call(this,{canvas:n.layout.canvas,antialias:!1,stencil:!0,clearColor:Object(W.b)(Object(Pi.a)(e.defaultBackgroundColor)),preserveDrawingBuffer:e.preserveDrawingBuffer})||this;return i.trackContextLost=function(t){t.preventDefault(),i.modules.map.destroy(),bt({eventAction:"WebGlContext",eventLabel:"webglcontextlost"}),bt({eventCategory:"WebGlContext",eventAction:"webglcontextlost",eventLabel:t.statusMessage||""})},i.state=e,i.modules=n,i.identifyBuffer=new Ht,i.framebuffers=[],i.shaderPrograms={diffuse:new pi({vertex:Oi("diffuse"),fragment:Mi("color"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec3_normal",location:1}]}),labelLine:new pi({vertex:Oi("labelLine"),fragment:Mi("label"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_style_zoom",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_style_zoom_limits",location:3}]}),labelPoint:new pi({vertex:Oi("labelPoint"),fragment:Mi("label"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_vec2_offset",type:"2f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),labelPointIdentify:new pi({vertex:Oi("labelPointIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_float_scale",type:"1f"},{name:"u_vec2_offset",type:"2f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec4_identifier",location:2}]}),line:new pi({vertex:Oi("line"),fragment:Mi("line"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_normal",location:1},{name:"a_vec2_normal_delta",location:2},{name:"a_vec3_direction",location:3},{name:"a_float_distance",location:4}]}),pointSprite:new pi({vertex:Oi("pointSprite"),fragment:Mi("pointSprite"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4}]}),pointSpriteIdentify:new pi({vertex:Oi("pointSpriteIdentify"),fragment:Mi("pointSpriteIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4},{name:"a_vec4_identifier",location:5}]}),stripedLine:new pi({vertex:Oi("stripedLine"),fragment:Mi("stripedLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),stripedLineIdentify:new pi({vertex:Oi("stripedLineIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),vtxColor:new pi({vertex:Oi("color"),fragment:Mi("color"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0}]}),vtxColorIdentify:new pi({vertex:Oi("colorIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),modelIdentify:new pi({vertex:Oi("modelIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),buildingIdentify:new pi({vertex:Oi("buildingIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),oneWayLine:new pi({vertex:Oi("oneWayLine"),fragment:Mi("oneWayLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width",type:"1f"},{name:"u_float_length",type:"1f"},{name:"u_float_border_width",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_direction",location:1},{name:"a_vec2_widen_direction",location:2}]}),model:new pi({vertex:Oi("model"),fragment:Mi("model"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec2_texcoord",location:1}]}),simpleLine:new pi({vertex:Oi("simpleLine"),fragment:Mi("simpleLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_z_offset",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_direction_distance",location:1}]}),road:new pi({vertex:Oi("road"),fragment:Mi("road"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_float_shift",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec2_shift",location:2}]}),roadIdentify:new pi({vertex:Oi("roadIdentify"),fragment:Mi("roadIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec4_identifier",location:2}]}),entrance:new pi({vertex:Oi("entranceArrow"),fragment:Mi("entranceArrow"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),entranceIdentify:new pi({vertex:Oi("entranceArrow"),fragment:Mi("entranceArrowIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),circleMarker:new pi({vertex:Oi("circleMarker"),fragment:Mi("circleMarker"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1}]}),rect:new pi({vertex:Oi("rect"),fragment:Mi("rect"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"}],attributes:[{name:"a_vec2_vertex",location:0}]}),rectWithTexture:new pi({vertex:Oi("rectWithTexture"),fragment:Mi("rectWithTexture"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texcoord",location:1}]}),circleMarkerIdentify:new pi({vertex:Oi("circleMarkerIdentify"),fragment:Mi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1},{name:"a_vec4_identifier",location:2}]}),stretchableImage:new pi({vertex:Oi("stretchableImage"),fragment:Mi("stretchableImage"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),stretchableImageIdentify:new pi({vertex:Oi("stretchableImageIdentify"),fragment:Mi("stretchableImageIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec4_identifier",location:3}]}),heatmap:new pi({vertex:Oi("heatmap"),fragment:Mi("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),heatmapTexture:new pi({vertex:Oi("heatmapTexture"),fragment:Mi("heatmapTexture"),uniforms:[{name:"u_sr2d_texture",type:"1i"},{name:"u_sr2d_ramp_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0}]})},n.map.once("idle",(function(){return function(t,e){if(window.requestIdleCallback){var n=function(n){var i=t[n];window.requestIdleCallback((function(){e.isContextLost()||(i.link(e),setTimeout((function(){window.requestIdleCallback((function(){e.isContextLost()||i.locate(e)}))}),2e3))}))};for(var i in t)n(i)}}(i.shaderPrograms,i._gl)})),i.symbolSettingsList={line:{solid:[{programName:"road",vaoCreator:Un,stateBinder:In,globalBinder:Kt,objectBinder:bn(an,ge,Te,gn,ke)},{identify:!0,programName:"roadIdentify",vaoCreator:Hn,stateBinder:On,globalBinder:Kt,objectBinder:bn(an,gn,ke)}]},polygon:{fill:[{programName:"vtxColor",vaoCreator:Bn,stateBinder:In,globalBinder:Kt,objectBinder:bn(an,He,ge,Te,Oe)},{identify:!0,programName:"vtxColorIdentify",vaoCreator:Nn,stateBinder:jn,globalBinder:Jt,objectBinder:bn(an,He)}],stroke:[{programName:"simpleLine",vaoCreator:ei,stateBinder:In,globalBinder:pe(Jt,ne,se),objectBinder:bn(sn,an,He,xe,Me,Te,ze),subRenderIndex:1}]},polygonExtrusion:{sideFill:[{programName:"diffuse",vaoCreator:Yn,stateBinder:Mn,globalBinder:pe(ie,ee),objectBinder:bn(an,He,we,je,Te,rn,Oe)},{programName:"diffuse",vaoCreator:Yn,stateBinder:Pn,globalBinder:pe(ie,ee),objectBinder:bn(an,He,we,je,Te,rn,Oe),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:Xn,stateBinder:wn,globalBinder:pe(ee,Jt),objectBinder:bn(an,He,Ge,rn)}],topFill:[{programName:"diffuse",vaoCreator:Yn,stateBinder:Mn,globalBinder:pe(ie,ee),objectBinder:bn(an,He,be,je,Te,rn,Oe)},{programName:"diffuse",vaoCreator:Yn,stateBinder:Pn,globalBinder:pe(ie,ee),objectBinder:bn(an,He,be,je,Te,rn,Oe),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:Xn,stateBinder:wn,globalBinder:pe(ee,Jt),objectBinder:bn(an,He,Ge,rn)}],sideStroke:[{programName:"line",vaoCreator:Kn,stateBinder:xn,globalBinder:pe(ie,ee,Jt),objectBinder:bn(an,He,we,Le,je,Te,rn,Oe),subRenderIndex:3}],topStroke:[{programName:"simpleLine",vaoCreator:ni,stateBinder:xn,globalBinder:pe(Jt,ee,ce),objectBinder:bn(an,He,xe,Pe,je,Te,ze,rn),subRenderIndex:4}]},labelLine:{raster:[{programName:"labelLine",vaoCreator:qn,stateBinder:Ln,globalBinder:pe(le,te),objectBinder:bn(cn,hn,Be,Ve,fn,pn,gn,yn),uniformSet:"fontHalo"},{programName:"labelLine",vaoCreator:qn,stateBinder:Ln,globalBinder:pe(le,te),objectBinder:bn(cn,Be,Ve,fn,pn,gn,yn),uniformSet:"fontFill",subRenderIndex:1}]},dashedLine:{stroke:[{programName:"stripedLine",vaoCreator:Gn,stateBinder:In,globalBinder:pe(Jt,Qt,de,fe),objectBinder:bn(an,Ke,ln,Xe,Oe)},{identify:!0,programName:"stripedLineIdentify",vaoCreator:Gn,stateBinder:On,globalBinder:pe(Jt,Qt,de,fe),objectBinder:bn(an,Ke,ln,Oe,Xe)}]},oneWayLine:{raster:[{programName:"oneWayLine",vaoCreator:$n,stateBinder:In,globalBinder:pe(Jt,Qt,ue,ae),objectBinder:bn(cn,Be,ge,Te,Je,Qe)}]},point:{raster:[{programName:"pointSprite",vaoCreator:Jn,stateBinder:Ln,globalBinder:pe(he,Jt,$t,oe,te),objectBinder:bn(cn,De,Be,We,Ne)},{identify:!0,programName:"pointSpriteIdentify",vaoCreator:Qn,stateBinder:jn,globalBinder:pe(he,Jt,$t,te),objectBinder:bn(cn,De,We,Ne)}],text:[{programName:"labelPoint",vaoCreator:Wn,stateBinder:Ln,globalBinder:pe(le,te,Jt),objectBinder:bn(cn,hn,Be,Ve,fn,mn,_n),uniformSet:"fontHalo",subRenderIndex:1},{programName:"labelPoint",vaoCreator:Wn,stateBinder:Ln,globalBinder:pe(le,te,Jt),objectBinder:bn(cn,Be,Ve,fn,mn,_n),uniformSet:"fontFill",subRenderIndex:2},{identify:!0,programName:"labelPointIdentify",vaoCreator:Vn,stateBinder:jn,globalBinder:Jt,objectBinder:bn(cn,Re,fn,_n),subRenderIndex:1}]},buildingModel:{fill:[{programName:"model",vaoCreator:ti,stateBinder:Tn,globalBinder:Kt,objectBinder:bn(an,ge,Ie,Te,en,tn),subRenderIndex:2},{programName:"modelIdentify",vaoCreator:Xn,stateBinder:wn,globalBinder:Jt,objectBinder:bn(an),subRenderIndex:2,identify:!0}],stroke:[{programName:"simpleLine",vaoCreator:ni,stateBinder:xn,globalBinder:pe(Jt,ne,se),objectBinder:bn(an,xe,Ie,Te,ze,en),subRenderIndex:5}]},shiftedLine:{solid:[{programName:"road",vaoCreator:Zn,stateBinder:In,globalBinder:Kt,objectBinder:bn(an,ge,Te,ke,gn,Fe)}]},circle:{fill:[{programName:"circleMarker",vaoCreator:ri,stateBinder:In,globalBinder:pe(Jt),objectBinder:bn(an,ge,Te,ke),subRenderIndex:2},{programName:"circleMarker",vaoCreator:ri,stateBinder:In,globalBinder:pe(Jt),objectBinder:bn(an,xe,Te,Ce),subRenderIndex:1},{programName:"circleMarker",vaoCreator:ri,stateBinder:In,globalBinder:pe(Jt),objectBinder:bn(an,Se,Te,Ee)},{identify:!0,programName:"circleMarkerIdentify",vaoCreator:oi,stateBinder:jn,globalBinder:pe(Jt),objectBinder:bn(an,Ae)}]},arrow:{stroke:[{programName:"entrance",vaoCreator:ii,stateBinder:In,globalBinder:pe(Jt,Qt,ue,ae),objectBinder:bn(an,ge,Te,Je,$e,Oe)},{identify:!0,programName:"entranceIdentify",vaoCreator:ii,stateBinder:jn,globalBinder:pe(Jt,Qt,ue,ae),objectBinder:bn(an,Je,$e,Oe)}]},lineExtrusion:{fill:[{programName:"diffuse",vaoCreator:Yn,stateBinder:Sn,globalBinder:pe(re,ee),objectBinder:bn(an,nn,we,Te,Oe),subRenderIndex:9}],sideStroke:[{programName:"line",vaoCreator:Kn,stateBinder:xn,globalBinder:pe(re,Jt,ee),objectBinder:bn(an,nn,we,Le,Te,Oe),subRenderIndex:10}],topStroke:[{programName:"simpleLine",vaoCreator:ni,stateBinder:xn,globalBinder:pe(Jt,ee,se),objectBinder:bn(an,nn,xe,Te,ze),subRenderIndex:11}]},stretchableImage:{fill:[{programName:"stretchableImage",vaoCreator:ai,stateBinder:kn,globalBinder:pe(Jt,oe),objectBinder:bn(an,qe)},{identify:!0,programName:"stretchableImageIdentify",vaoCreator:si,stateBinder:On,globalBinder:pe(Jt,oe),objectBinder:bn(an,qe)}]},raster:{fill:[{programName:"rectWithTexture",vaoCreator:ci,stateBinder:In,globalBinder:Kt,objectBinder:bn(an,qe,Ue)}]},heatmap:{framebuffer:[{programName:"heatmap",vaoCreator:li,stateBinder:zn,globalBinder:Kt,objectBinder:bn(an,un,dn,gn)}],fill:[{programName:"heatmapTexture",vaoCreator:ui,stateBinder:In,globalBinder:Kt,objectBinder:bn(an,qe,Ye,Ze),subRenderIndex:1}]}},i.addExtension("OES_vertex_array_object").addExtension("OES_element_index_uint").addExtension("OES_standard_derivatives"),i.setPixelRatio(window.devicePixelRatio).setSize(n.layout.mapContainer.clientWidth,n.layout.mapContainer.clientHeight),e.collectStats&&(i.timers=new di(i._gl)),n.layout.canvas.addEventListener("webglcontextlost",i.trackContextLost),i}return Object(M.c)(e,t),e.prototype.setClearColor=function(t){return this.clearColor=Object(W.b)(t),this.state.needRerender=!0,this},e.prototype.setSize=function(t,e){this.modules.layout.setCanvasSize(t,e);var n=this.state.size;return this.framebuffers.forEach((function(t){t&&t.onResize(n[0],n[1])})),this.updateIdentifySize(),this},e.prototype.updateIdentifySize=function(){var t=window.devicePixelRatio,e=this.state.size;return this.identifyBuffer.setSize([Math.ceil(e[0]*o.identify.pixelDensity*t),Math.ceil(e[1]*o.identify.pixelDensity*t)]),this},e.prototype.clear=function(){return this.clearWithColor(this.clearColor),this},e.prototype.clearWithColor=function(t){var e=this._gl;e.depthMask(!0),e.clearDepth(1),e.clearColor.apply(e,t),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)},e.prototype.renderTileObjects=function(t){var e=this;this.state.collectStats&&this.timers&&this.timers.addTimer();var n=this._gl,i=Ti(n,this.webGlExtensions,this.state,this.modules);if(this.groupObjectsByFramebuffer(t,!1).forEach((function(t){var r,o,a=t.objects,s=t.tileObjects,c=t.framebuffer,l=null!==(o=null===(r=null==c?void 0:c.getViewProjectionMatrix)||void 0===r?void 0:r.call(c,e.state))&&void 0!==o?o:e.modules.camera.viewProjectionMatrix;if(s.forEach((function(t){return t.updateMvpMatrix(l)})),c)c.renderTarget.bind(n),n.viewport(0,0,c.renderTarget.options.size[0],c.renderTarget.options.size[1]),e.clearWithColor(c.clearColor);else{var u=e.state,d=u.size,f=u.viewport,h=window.devicePixelRatio;n.viewport(f.left*h,f.bottom*h,d[0]*h,d[1]*h),e.clear()}Ai(e.state,e.modules,a,i),null==c||c.renderTarget.unbind(n)})),this.state.collectStats&&this.timers){this.timers.stopTimer();var r=this.timers.tryToGetFirstTimerValue();r&&this.modules.map.emit("gpuRenderTime",r)}return this},e.prototype.renderIdentify=function(t){var e=this,n=this._gl,i=Ti(n,this.webGlExtensions,this.state,this.modules);this.groupObjectsByFramebuffer(t,!0).forEach((function(t){var r,o,a=t.objects,s=t.tileObjects,c=t.framebuffer,l=null!==(o=null===(r=null==c?void 0:c.getViewProjectionMatrix)||void 0===r?void 0:r.call(c,e.state))&&void 0!==o?o:e.modules.camera.viewProjectionMatrix;s.forEach((function(t){return t.updateMvpMatrix(l)}));var u=c?c.renderTarget:e.identifyBuffer;u.bind(n),n.viewport(0,0,u.options.size[0],u.options.size[1]),e.clearIdentify(),Ai(e.state,e.modules,a,i),u.unbind(n)})),this.state.needRerender=!0},e.prototype.getPixels=function(){var t=this._gl,e=this.identifyBuffer.options.size,n=new Uint8Array(e[0]*e[1]*4);return this.identifyBuffer.bind(t),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,n),this.identifyBuffer.unbind(t),n},e.prototype.getRenderingContext=function(){return this._gl},e.prototype.getShaderProgram=function(t){return this.shaderPrograms[t]},e.prototype.destroy=function(){this.modules.layout.canvas.removeEventListener("webglcontextlost",this.trackContextLost);var t=this._gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this.modules.layout.destroy()},e.prototype.addFramebuffer=function(t){return this.framebuffers.push(t),this.framebuffers.length-1},e.prototype.getFramebuffer=function(t){return this.framebuffers[t]},e.prototype.removeFramebuffer=function(t){var e;null===(e=this.framebuffers[t])||void 0===e||e.renderTarget.remove(this.getRenderingContext()),this.framebuffers[t]=void 0},e.prototype.clearIdentify=function(){var t=this._gl;t.depthMask(!0),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),t.clearDepth(1),t.clearStencil(0)},e.prototype.groupObjectsByFramebuffer=function(t,e){var n,i=this,r={},o={framebuffer:void 0,objects:[],tileObjects:new Set};e||(n=o.objects).push.apply(n,this.modules.styleManager.getCustomSceneObjects()),t.forEach((function(t){(e?t.identifyChildren:t.children).forEach((function(e){var n=i.modules.styleManager.getStyleLayer(e.attributes.styleId,e.attributes.layerId);if(n){var a=n.framebufferId;if(-1!==a){if(void 0===a||"heatmap"===e.symbol&&"fill"===e.sink)return o.objects.push(e),void o.tileObjects.add(t);r[a]||(r[a]={framebuffer:i.getFramebuffer(a),objects:[],tileObjects:new Set}),r[a].objects.push(e),r[a].tileObjects.add(t)}}}))}));var a=Object.values(r).filter((function(t){return!!t.framebuffer}));return a.sort((function(t,e){var n,r;return((null===(n=i.modules.styleManager.getStyleLayer(t.objects[0].attributes.styleId,t.objects[0].attributes.layerId))||void 0===n?void 0:n.renderIndex)||0)-((null===(r=i.modules.styleManager.getStyleLayer(e.objects[0].attributes.styleId,e.objects[0].attributes.layerId))||void 0===r?void 0:r.renderIndex)||0)})),a.push(o),a},e}(Bt),nr=n(87),ir=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.identifyData=[],this.needsUpdate=!1,this.forceUpdate=!1,this.searchQueue=new Map,this.stateDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),this.debouncedFillCache=Object(kt.a)((function(){n.needsUpdate=!0}),o.identify.cacheDebounceTime)}return t.prototype.resetCache=function(){this.colorBuffer=void 0,this.debouncedFillCache()},t.prototype.search=function(t,e,n){var i=this;return void 0===n&&(n=!1),void 0===this.colorBuffer&&n&&(this.needsUpdate=!0),this.forceUpdate=n,new Promise((function(n){i.searchQueue.set(t,{point:e,resolve:n})}))},t.prototype.searchSync=function(t){return this.searchHigherPriority(t)},t.prototype.update=function(){var t=this;this.stateDiffer.check(this.state)&&(this.resetCache(),this.searchQueue.size>0&&this.searchQueue.clear()),this.needsUpdate&&(this.modules.tileManager.isIdle()&&this.modules.labeler.isIdle()&&this.modules.assetManager.isIdle()||this.forceUpdate)&&(this.fillCache(),this.needsUpdate=!1,this.forceUpdate=!1),void 0!==this.colorBuffer&&this.searchQueue.size>0&&(this.searchQueue.forEach((function(e){e.resolve(t.searchHigherPriority(e.point))})),this.searchQueue.clear())},t.prototype.searchHigherPriority=function(t){var e,n=this.state.viewport,i=z.j(t[0]-n.left,t[1]-n.top),r=this.state.identifyPickDistance*window.devicePixelRatio,o=1/0,a=!1,s=z.d();for(s[0]=i[0]-r;s[0]<i[0]+r;s[0]++)for(s[1]=i[1]-r;s[1]<i[1]+r;s[1]++){var c=this.searchPointInCache(s);if(c){var l=void 0!==c.dynamicObjectId;if(!a||l){var u=z.f(i,s);(!e||!a&&l||c.phase>e.phase||c.phase===e.phase&&u<o)&&(e=c,o=u,l&&(a=!0))}}}return e},t.prototype.searchPointInCache=function(t){if(void 0!==this.colorBuffer){var e=o.identify.pixelDensity*window.devicePixelRatio,n=this.modules.renderer.identifyBuffer.options.size,i=this.state.size;if(!(t[0]<0||t[0]>i[0]-1||t[1]<0||t[1]>i[1]-1)){var r=Math.floor(t[0]*e),a=4*((n[1]-1-Math.floor(t[1]*e))*n[0]+r),s=(this.colorBuffer[a+3]<<24|this.colorBuffer[a+2]<<16|this.colorBuffer[a+1]<<8|this.colorBuffer[a])>>>0;return this.indexToIdentifierResponse(s)}}},t.prototype.fillCache=function(){var t=this,e=this.modules.tileManager.getTileObjects();this.modules.renderer.renderIdentify(e),this.colorBuffer=this.modules.renderer.getPixels(),this.identifyData=this.modules.tileManager.getDisplayedIdentifyData(),this.modules.modelManager.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)})),this.modules.floorManager.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)}));var n=this.modules.personalPoiManager.getIdentifyDataChunk();void 0!==n&&this.identifyData.push(n),this.modules.layers.getDynamicObjectLayers().forEach((function(e){e.getIdentifyData().forEach((function(e){return t.identifyData.push(e)}))}))},t.prototype.indexToIdentifierResponse=function(t){for(var e,n,i,r=0;r<this.identifyData.length;r++){var o=this.identifyData[r],a=o.dynamicObjectId,s=o.ids,c=o.metatileHash,l=o.sourceId,u=o.tileKey,d=s.startIndex,f=s.endIndex,h=s.idBuffer,p=s.phaseBuffer,m=s.sublayerBuffer,v=s.styleIdBuffer,_=s.layerIdBuffer,y=s.instanceIdBuffer,g=s.objectClassBuffer,b=s.strings;if(!(t<d||t>f)){var w=t-d,x=new Uint32Array(h,4*w*2,2),S=new Uint32Array(m)[w],I=new Uint8Array(y)[w],j=new Uint32Array(g)[w],O=void 0,M="",P=this.modules.assetManager.getMetatile(c);if(P){(null===(e=P.reverseDictionaries.db_sublayer)||void 0===e?void 0:e[S])&&(O=P.reverseDictionaries.db_sublayer[S]);var L=b[t];M=void 0!==L?L.objectClass:null!==(i=null===(n=null==P?void 0:P.reverseDictionaries.db_object_class)||void 0===n?void 0:n[j])&&void 0!==i?i:""}var T=new Uint16Array(v)[w],k=new Uint32Array(_)[w],z=this.modules.styleManager.getStyleLayer(T,k);if(!z||"custom"===z.type)return;return{id:new Uint32Array(x),phase:new Float32Array(p)[w],dynamicObjectId:a,sourceId:l,tileKey:u,sublayer:O,symbol:z.type,instanceId:I,objectClass:M}}}},t}(),rr=n(41),or=n(86),ar=n(47),sr=function(t){function e(e){var n=t.call(this)||this;return n.sync=function(t){var e=t.dictionaries,i=t.reverseDictionaries;n.dictionaries=e,n.reverseDictionaries=i},e.set("syncMetatile",n.sync),n}return Object(M.c)(e,t),e}(n(100).a),cr=n(71);function lr(t,e,n){return Object(j.c)(n.fontUrlTemplate,{name:t,range:String(e)})}function ur(t,e,n){return Object(j.c)(pr(e.iconBaseUrl,e.iconNameTemplate),{name:t,subdomain:n})}function dr(t){return hr(t.stylePath)?t.stylePath:pr(t.rootUrl,t.stylePath)}var fr=new RegExp("^(?:[a-z]+:)?//","i");function hr(t){return fr.test(t)}function pr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],i=1;i<t.length;i++){"/"!==n[n.length-1]&&(n+="/");var r=t[i];"/"===r[0]?n+=r.slice(1):n+=r}return n}var mr=n(69);function vr(t){for(var e,n=new mr.a,i=0,r=t.layers;i<r.length;i++){var o=r[i];void 0!==o.groupId&&e&&o.groupId===e.groupId?o.renderIndex=e.renderIndex:o.renderIndex=n.getIndex(),e=o}for(var a in t.groupsById){var s=t.groupsById[a];s&&s.layers[0]&&(s.renderIndex=s.layers[0].renderIndex)}}var _r=n(98),yr=function(){function t(t){this.modules=t,this.customLayers=new Map,this.styleIndex=1,this.handyStylesMap=new Map,this.waitingStyleRequests=new Map,this.onRemoveLayerHooks=new Map}return t.prototype.createStyle=function(t,e,n){var i=this,r=this.modules.map.state;if(!Number.isNaN(r.handyStyleId)){var o=this.getStyle(r.handyStyleId);o&&(o.layers.forEach((function(t){var e=i.onRemoveLayerHooks.get(t.innerId);e&&e(r)})),this.onRemoveLayerHooks.clear())}var a=this.styleIndex++,s=Object(H.c)(t,a,n);!function(t,e){var n=hr(e.fontsPath)?e.fontsPath:pr(e.rootUrl,e.fontsPath);t.fontUrlTemplate=pr(n,"{name}_{range}.pbf"),t.iconBaseUrl=hr(e.iconsPath)?e.iconsPath:pr(e.rootUrl,e.iconsPath),t.iconNameTemplate=e.iconNameTemplate}(s,e),this.handyStylesMap.set(s.id,s);var c=this.waitingStyleRequests.get(a);return c&&c.resolve(s),this.modules.workers.parser.syncStyle(s),this.modules.workers.labeling.syncStyle(s),s.layers.forEach((function(t){return i.initHandyLayer(a,t)})),s},t.prototype.addLayer=function(t,e){var n=this.getStyle(this.modules.map.state.handyStyleId);if(n){var i=Object(H.a)(t);i&&(function(t,e,n){var i,r;if(e.layerIdToInnerId[t.id])throw new Error("The layer with id «"+t.id+"» already exists in the map style.");var o=-1;if(n){var a=Object.values(e.groupsById).find((function(t){return t&&t.id===n}));if(a)o=e.layers.findIndex((function(t){return t.groupId===a.innerId}));else{o=e.layers.findIndex((function(t){return t.id===n}));var s=null===(r=e.layers[o])||void 0===r?void 0:r.groupId;if(void 0!==s&&"group"===t.type)throw new Error("Group layer with id «"+t.id+"» can't be added before layer with id «"+n+"» in group with innerId «"+s+"». Layer groups doesn't support nesting.")}}else o=e.layers.length;if(-1===o)throw new Error("The layer with beforeId «"+n+"» doesn't exist in the map style.");var c=[];if("group"!==t.type){c=[t];var l=o!==e.layers.length?e.layers[o]:void 0;if(l&&void 0!==l.groupId){var u=e.groupsById[l.groupId];if(!u)return void Object(Ei.a)("Для слоя с id «"+l.id+"» находящегося в группе с groupId «"+l.groupId+"» отсутствует группа id в стиле c id «"+e.id+"»");var d=u.layers.findIndex((function(t){return t.id===l.id}));if(-1===d)return void Object(Ei.a)("Слой с id «"+l.id+"» и groupId «"+l.groupId+"» отсутствует группе в стиле c id «"+e.id+"»");t.groupId=u.innerId,u.layers.splice(d,0,t),u.layers.forEach((function(t,e){return t.groupIndex=e}))}}else e.groupsById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,c=t.layers;(i=e.layers).splice.apply(i,Object(M.e)([o,0],c)),c.forEach((function(t){if(e.layersById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,"point"===t.type){var n=Math.max.apply(Math,Object(M.e)([0],Object.keys(e.rasterSets.byIndex).map((function(t){return Number(t)})))),i=new mr.a(n+1);Object(H.b)(t,i).forEach((function(t){e.rasterSets.byKey[t.key]||(e.rasterSets.byIndex[t.index]=t,e.rasterSets.byKey[t.key]=t)}))}})),vr(e)}(i,n,e),"custom"===t.type&&"custom"===i.type?this.initCustomLayer(n.id,i,t.render):this.initHandyLayer(n.id,i),this.modules.workers.parser.syncStyle(n),this.modules.workers.labeling.syncStyle(n))}},t.prototype.removeLayer=function(t){var e=this.getStyle(this.modules.map.state.handyStyleId);e&&(_r.a.some((function(e){return e.id===t}))||(function(t,e,n){var i=e.layerIdToInnerId[t];if(void 0===i)throw new Error("The layer with id «"+t+"» doesn't exist in the map style and can't be removed.");var r=[],o=e.groupsById[i];if(o){if(r=o.layers,delete e.groupsById[i],delete e.layerIdToInnerId[o.id],0===r.length)return}else{var a=e.layersById[i];if(!a)return void Object(Ei.a)("Слоя с id «"+t+"» есть в мапе идентификаторов слоев стиля, но при этом отсутствует в стиле c id «"+e.id+"»");if(void 0!==a.groupId&&void 0!==a.groupIndex){var s=e.groupsById[a.groupId];s&&s.layers.splice(a.groupIndex,1)}r=[a]}var c=e.layers.findIndex((function(t){return t.id===r[0].id}));-1!==c&&(r.forEach((function(t){var i=n.styleManager,r=n.map.state,o=i.getRemoveLayerHook(t.innerId);o&&(o(r),i.clearRemoveLayerHook(t.innerId)),delete e.layersById[t.innerId],delete e.layerIdToInnerId[t.id]})),e.layers.splice(c,r.length),vr(e))}(t,e,this.modules),this.modules.workers.parser.syncStyle(e),this.modules.workers.labeling.syncStyle(e)))},t.prototype.setDynamicStyle=function(t){this.handyStylesMap.set(Z.a,t),this.modules.workers.parser.syncStyle(t),this.modules.workers.labeling.syncStyle(t)},t.prototype.getStyle=function(t){return this.handyStylesMap.get(t)},t.prototype.getStyleLayer=function(t,e){var n;return null===(n=this.handyStylesMap.get(t))||void 0===n?void 0:n.layersById[e]},t.prototype.waitForStyle=function(t){var e=this.handyStylesMap.get(t);if(e)return Promise.resolve(e);var n=this.waitingStyleRequests.get(t);if(n)return n.promise;var i={resolve:void 0,promise:void 0};return i.promise=new Promise((function(t){i.resolve=t})),this.waitingStyleRequests.set(t,i),i.promise},t.prototype.addRemoveLayerHook=function(t,e){this.onRemoveLayerHooks.set(t,e)},t.prototype.getRemoveLayerHook=function(t){return this.onRemoveLayerHooks.get(t)},t.prototype.clearRemoveLayerHook=function(t){this.onRemoveLayerHooks.delete(t)},t.prototype.callCustomLayerRender=function(t){var e=this.customLayers.get(t);e&&e.renderFunction(this.modules.renderer.getRenderingContext())},t.prototype.getCustomSceneObjects=function(){var t=[];return this.customLayers.forEach((function(e){return t.push(e.sceneObject)})),t},t.prototype.initHandyLayer=function(t,e){var n,i=this;switch(e.type){case"group":return void e.layers.forEach((function(e){return i.initHandyLayer(t,e)}));case"heatmap":n=function(t,e,n){var i,r=n.map.state,o=n.collector,a=n.imageManager,s=n.renderer,c=n.tileManager;try{i=function(t,e,n){var i,r=Object(W.c)(t.styleZoom,t.styleState,[]),o=e.style.color,a=[];if("object"!=typeof(i=o.argument)||"heatmap-density"!==i.type)throw new Error("Heatmap color must be interpolate expression with 'heatmap-density' argument in layer "+e.id);for(var s=0;s<256;s++){var c=s/255,l=Object(W.k)(o,c,r);a.push.apply(a,l)}return new Ut(new Uint8Array(a),{size:[256,1]})}(r,t)}catch(e){return t.framebufferId=-1,void console.error(e)}var l=a.addPreparedTexture(i),u=s.getRenderingContext(),d=t.style.downscale,f=r.size,h=new Ht({size:[Math.ceil(f[0]*window.devicePixelRatio/d),Math.ceil(f[1]*window.devicePixelRatio/d)],magFilter:Ut.LinearFilter,minFilter:Ut.LinearFilter,wrapS:Ut.ClampToEdgeWrapping,wrapT:Ut.ClampToEdgeWrapping}),p=a.addPreparedTexture(h.getTexture()),m=s.addFramebuffer({renderTarget:h,clearColor:[0,0,0,0],onResize:function(t,e){h.setSize([Math.ceil(t*window.devicePixelRatio/d),Math.ceil(e*window.devicePixelRatio/d)]),h.bind(u),h.unbind(u),a.updatePreparedTexture(p,h.getTexture())}});Object(N.b)({collector:o,generator:Rn.a.generateTexture,args:[e,t,p,l]});var v=o.getAccumulatedData(),_=new C.a("dynamicObject",v.data,s);return c.addObject(_),o.reset(),t.framebufferId=m,function(t){c.removeObject(_),_.clean(t),a.deleteTexture(p),a.deleteTexture(l),s.removeFramebuffer(m)}}(e,t,this.modules)}n&&this.modules.styleManager.addRemoveLayerHook(e.innerId,n)},t.prototype.initCustomLayer=function(t,e,n){var i=this,r={sceneObject:{type:Ci.a.Custom,attributes:{styleId:t,layerId:e.innerId,tileData:[]}},layer:e,renderFunction:n};this.customLayers.set(e.innerId,r),this.modules.styleManager.addRemoveLayerHook(e.innerId,(function(){i.customLayers.delete(e.innerId)}))},t}(),gr=n(60),br=function(){function t(t,e){var n=this;this.loadFont=function(t,e){var i=n.requestFontRanges.get(t,e);return i||(i=n.createLoadFontRequest(t,e),n.requestFontRanges.set(t,e,i)),i},this.state=t,this.modules=e,this.requestedMetatiles=new Set,this.metatiles={},this.loadedRasters={},this.failedRasters={},this.requestedRasters={},this.requestedSvgs={},this.disableIconCache=t.disableIconCache,this.textures=[],this.fontGlyphs={},this.fontTextures=new or.a,this.requestFontRanges=new or.a,this.pendingFontRanges=0,this.loadedFontRanges=0,this.metatileLoader=function(e,i){var r=Object(O.f)(e),o=Object(j.b)("metatile",{host:t.tileServer,tileSet:t.tileSet,protocol:t.tileProtocol,subdomain:t.subdomains[0],hash:r});fetch(o).then((function(t){if(!t.ok)throw new Error('Failed to load metatile "'+r+'"');return t.json()})).then((function(t){return n.setMetatile(e,i,t)})).catch((function(t){return console.error(t)}))};var i=this.modules.workers.fnRegistry;i.set("addNewRasterSets",(function(t,e){var i=n.modules.styleManager.getStyle(t);if(i){var r=i.rasterSets;e.forEach((function(t){r.byIndex[t.index]=t,r.byKey[t.key]=t}))}else console.error("Not found style "+t+" in AssetManager#addNewRasterSets")})),i.set("loadFont",this.loadFont),this.setPreparedMetatile(-1,O.c),this.setPreparedMetatile(Gt.h,Object(gr.b)()),this.metatiles[Gt.l]=new sr(i)}return t.prototype.loadMetatile=function(t,e){this.requestedMetatiles.has(t)||(this.requestedMetatiles.add(t),this.metatileLoader(t,e))},t.prototype.setMetatile=function(t,e,n){Object(cr.c)(n),n.tileProps=n.tileProps.map(cr.d);var i=Object(O.g)(n);this.setPreparedMetatile(t,i),void 0===this.projectMetatileMetadata&&Object(U.o)(e)&&(this.projectMetatileMetadata={regionId:e,metatileHash:t})},t.prototype.setPreparedMetatile=function(t,e){this.metatiles[t]=e,this.modules.workers.parser.setMetatile(t,e)},t.prototype.prepareRasters=function(t,e,n){var i,r,a=this,s=this.modules.styleManager.getStyle(t);if(s){for(var c=s.rasterSets,l=this.modules.renderer.getRenderingContext(),u=e.length/7,d=function(t){var u=e[7*t],d=e[7*t+1],h=e[7*t+6],p=e[7*t+2],m=e[7*t+3],v=e[7*t+4],_=e[7*t+5],g=c.byIndex[u];if(g.isSvg){var b={rasterIndex:d,rasterSetIndex:u,x:p,y:m,w:v,h:_,anchorX:g.anchorX,anchorY:g.anchorY,atlasIndex:h,isPacked:!0};g.rasters[d]=b,null===(r=null===(i=f.requestedSvgs[s.id])||void 0===i?void 0:i[u])||void 0===r||r.then((function(t){var e=a.textures[b.atlasIndex];y(t,b.w,b.h).then((function(t){e.subImage(l,t,b.x,b.y),a.state.needRerender=!0}))}))}else{var w=g.rasters[d];w.x=p,w.y=m,w.atlasIndex=h,w.isPacked=!0}void 0===f.textures[h]&&(f.textures[h]=new Ut(void 0,{size:o.atlasSize,flipY:!1,premultiplyAlpha:!yt||!g.isSvg,unit:h,magFilter:Ut.LinearFilter,minFilter:Ut.LinearFilter}).prepare(f.modules.renderer.getRenderingContext()));var x=f.textures[h],S=n&&n[t];if(void 0!==S)return x.subImage(l,S,p,m),f.state.needRerender=!0,"continue"},f=this,h=0;h<u;h++)d(h);this.modules.workers.labeling.updatePackingInfo(t,e)}else console.error("Not found style "+t+" in AssetManager#prepareRasters")},t.prototype.loadRasters=function(t){for(var e=t.length/3,n=0;n<e;n++){var i=t[3*n],r=t[3*n+1],o=t[3*n+2],a=r<<16|o,s=this.modules.styleManager.getStyle(i);if(s){if(this.loadedRasters[i]||(this.loadedRasters[i]=new Set,this.failedRasters[i]=new Set,this.requestedRasters[i]=new Set),!this.requestedRasters[i].has(a)){var c=s.rasterSets.byIndex[r];!1!==c.rasters[o].isPacked?(this.requestedRasters[i].add(a),c.isSvg?this.loadSvg(a,s,r):this.loadPng(a,s,r,o)):console.error("Try to load not packed raster "+c.key)}}else console.error("Not found style "+i+" in AssetManager#loadRasters")}},t.prototype.getMetatile=function(t){return this.metatiles[t]},t.prototype.getProjectMetadata=function(){return this.projectMetatileMetadata},t.prototype.getFontGlyphs=function(t){return this.fontGlyphs[t]||{}},t.prototype.getFontTextureByName=function(t,e){return this.fontTextures.get(t,e)},t.prototype.isIdle=function(){var t=0,e=0;for(var n in this.requestedRasters)t+=this.requestedRasters[n].size,e+=this.loadedRasters[n].size+this.failedRasters[n].size;return t===e&&this.pendingFontRanges===this.loadedFontRanges},t.prototype.dangerouslySetMetatiles=function(t){this.metatiles=t},t.prototype.dangerouslySetRasters=function(t,e){this.loadedRasters=t,this.failedRasters=e},t.prototype.createLoadFontRequest=function(t,e){return Object(M.b)(this,void 0,void 0,(function(){var n,i,r,o,a;return Object(M.d)(this,(function(s){switch(s.label){case 0:this.pendingFontRanges+=1,n=Number.isNaN(this.state.handyStyleId)?1:this.state.handyStyleId,s.label=1;case 1:return s.trys.push([1,4,,5]),[4,this.modules.styleManager.waitForStyle(n)];case 2:return i=s.sent(),[4,fetch(lr(t,e,i)).then((function(t){if(!t.ok)throw new Error;return t})).catch((function(){return console.error("Could not load font "+t+" for range "+e+" fallback to the default font "+Gt.b),fetch(lr(Gt.b,e,i)).then((function(t){if(!t.ok)throw new Error("Could not load default font "+Gt.b+" for range "+e);return t}))})).then((function(t){return t.arrayBuffer()}))];case 3:return r=s.sent(),o=Object(ar.d)(r),this.prepareFontAtlas(t,e,o),this.modules.workers.labeling.appendFont(t,o.glyphData),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 4:return a=s.sent(),console.error(a),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 5:return[2]}}))}))},t.prototype.prepareFontAtlas=function(t,e,n){var i=n.bitmap,r=n.width,o=n.height,a=n.glyphData;for(var s in this.fontGlyphs[t]||(this.fontGlyphs[t]={}),a)this.fontGlyphs[t][s]=a[s];var c=new Ut(new Uint8Array(i),{size:[r,o],magFilter:Ut.LinearFilter,minFilter:Ut.LinearFilter,format:Ut.AlphaFormat,premultiplyAlpha:!1,flipY:!1,unit:0});this.fontTextures.set(t,e,c),this.state.needLabeling=!0},t.prototype.loadPng=function(t,e,n,i){var r=this,o=this.modules.renderer.getRenderingContext(),a=e.rasterSets.byIndex[n],s=a.rasters[i],c=this.textures[s.atlasIndex],l="";if(a.type===rr.b.Unique){var u=Object(E.a)(a.id[0],a.id[1]);l=a.url?a.url.replace("image","image_"+s.w.toString()+"x"+s.h.toString()):Object(j.b)("dynamicPoi",{host:this.state.tileServer,tileSet:this.state.tileSet,protocol:this.state.tileProtocol,subdomain:Object(j.a)(this.state.subdomains,u),id:u,width:s.w.toString(),height:s.h.toString(),regionId:String(a.regionId)})}else a.type===rr.b.Static&&(l=ur(a.name,e,Object(j.a)(this.state.subdomains,a.name)));this.modules.workers.parser.prepareAtlas(l).then((function(n){n?(n.isBitmap?(c.subImage(o,n.data[0],s.x,s.y),r.state.needRerender=!0):g(n.data[0]).then((function(t){c.subImage(o,t,s.x,s.y),r.state.needRerender=!0})),r.loadedRasters[e.id].add(t)):r.failedRasters[e.id].add(t)}))},t.prototype.loadSvg=function(t,e,n){var i=this,r=this.modules.renderer.getRenderingContext(),o=e.rasterSets.byIndex[n];if(!e.iconBaseUrl)return console.error("Attempt to load svg without existing style"),void this.failedRasters[e.id].add(t);var a,s=e.icons[o.name];a=(null==s?void 0:s.url)?function(t,e,n){var i=hr(t)?"":e.iconBaseUrl;return Object(j.c)(pr(i,t),{subdomain:n,appHost:window.location.host})}(s.url,e,Object(j.a)(this.state.subdomains,o.name)):ur(o.name,e,Object(j.a)(this.state.subdomains,o.name)),this.requestedSvgs[e.id]||(this.requestedSvgs[e.id]={});var c=this.requestedSvgs[e.id][n];c&&!this.disableIconCache||(c=this.requestedSvgs[e.id][n]=fetch(a,{cache:this.disableIconCache?"no-cache":"default"}).then((function(t){if(!t.ok)throw new Error("Not 2xx response");return t.text()}))),c.then((function(n){for(var a=function(t){if(t.w<=0&&t.h<=0)return"continue";var e=i.textures[t.atlasIndex];y(n,t.w,t.h).then((function(n){e.subImage(r,n,t.x,t.y),i.state.needRerender=!0}))},s=0,c=o.rasters;s<c.length;s++)a(c[s]);i.loadedRasters[e.id].add(t)})).catch((function(n){console.error(n),i.failedRasters[e.id].add(t)}))},t}(),wr=n(43),xr=n(31),Sr=n(76),Ir=function(t){return"model-readiness-"+t},jr=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.cache=new Sr.a(o.modelCacheSize,(function(t,e){return n.clearMod(e)})),this.selectedIds=new xr.a(this.modules.tileManager.getSelectedIds()),this.modelIds=new Set,this.viewportModelIds=new Set,this.requestedModelsInfo=new Set,this.loadedModelsInfo=new Set,this.readiness={},this.modelCount=0,this.textures={},this.models=new Map,this.buildingsHeight=new Map,this.mods=[],this.animatingModelCount=0}return t.prototype.appendModelsInfo=function(t,e,n){var i=this;n.forEach((function(n){var r=Object(M.a)(Object(M.a)({},n),{regionId:t,metatileHash:e,index:i.modelCount++,idLoHi:Object(E.b)(n.id)}),o={key:r.index+"_false",status:"initial",model:r,selected:!1,object:void 0,identifyIds:void 0,minStyleZoom:-1/0,maxStyleZoom:1/0},a={key:r.index+"_true",status:"initial",model:r,selected:!0,object:void 0,identifyIds:void 0,minStyleZoom:-1/0,maxStyleZoom:1/0};r.nonSelectedMod=o,r.selectedMod=a,i.mods.push(o,a),i.models.set(r.id,r),i.modelIds.add(r.id)})),this.findViewportModels()},t.prototype.loadModelsInfo=function(t,e){var n=this;if(!this.requestedModelsInfo.has(t)){this.requestedModelsInfo.add(t);var i=Object(j.b)("modelInfo",{host:this.state.tileServer,tileSet:this.state.tileSet,protocol:this.state.tileProtocol,subdomain:this.state.subdomains[0],regionId:t.toString()});fetch(i).then((function(e){if(!e.ok)throw new Error("Failed to load models info for region "+t);return e.json()})).then((function(i){n.modules.workers.parser.appendHiddenObjectIds(i.map((function(t){return Object(E.b)(t.id)}))),n.appendModelsInfo(t,e,i),n.loadedModelsInfo.add(t)})).catch((function(e){n.loadedModelsInfo.add(t),console.error(e)}))}},t.prototype.resetCache=function(){var t=this;this.models.forEach((function(e){t.clearMod(e.selectedMod),t.clearMod(e.nonSelectedMod),t.cache.remove(e.selectedMod.key),t.cache.remove(e.nonSelectedMod.key),q.d(Ir(e.id),t.state)})),this.animatingModelCount=0,this.modules.tileManager.getTileObjects().forEach((function(e){"model"===e.purpose&&t.modules.tileManager.removeObject(e)}))},t.prototype.isModelsInfoLoaded=function(t){return this.loadedModelsInfo.has(t)},t.prototype.getTexture=function(t,e){return this.textures[t+"_"+e]},t.prototype.findViewportModels=function(){var t=this,e=this.state.styleZoom;this.viewportModelIds.clear(),this.models.forEach((function(n){var i=n.bound,r=n.minZoom,o=n.maxZoom;e<r||e>=o||Object(wr.b)(t.modules.camera.viewportVertices,i)&&t.viewportModelIds.add(n.id)}))},t.prototype.getDisplayedIdentifyData=function(){return this.mods.filter((function(t){return"displayed"===t.status})).map((function(t){return{ids:t.identifyIds,metatileHash:t.model.metatileHash}}))},t.prototype.update=function(){var t=this,e=this.mods,n=this.models,i=this.state.styleZoom;this.selectedIds=new xr.a(this.modules.tileManager.getSelectedIds()),i>o.loadModelsInfoStyleZoom&&this.modules.tileManager.getViewportTiles().forEach((function(e){"terrain"===e.type&&e.serverMetadata&&e.serverMetadata.forEach((function(e){t.loadModelsInfo(e.regionId,e.metatileHash)}))}));for(var r=0;r<e.length;r++){var a=e[r],s=this.checkModUsefulness(a,this.selectedIds),c=this.modules.floorManager.hasDisplayedFloorBuilding(a.model.id),l=!!this.modules.assetManager.getMetatile(a.model.metatileHash),u=this.modules.buildingHeightAnimator.isAnimating(),d=s&&!c,f=a.status;"initial"===a.status&&d&&l?(this.loadModel(a),f="loading"):"ready"===a.status&&d?(this.modules.tileManager.addObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),f="displayed"):"ready"!==a.status||d?"cached"===a.status&&d?(this.modules.tileManager.addObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),this.cache.get(a.key),f="displayed"):"displayed"!==a.status||(s||u)&&!c||(this.modules.tileManager.removeObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),this.cache.add(a.key,a),f="cached"):(this.cache.add(a.key,a),f="cached"),a.status=f}n.forEach((function(e){var n=e.id;q.e(Ir(e.id),{step:function(e,i){return t.readiness[n]=i},complete:function(){return t.animatingModelCount--}},t.state)}))},t.prototype.getOpacity=function(t,e){return(void 0!==this.readiness[t]?this.readiness[t]:0)*this.modules.buildingHeightAnimator.getBuildingHeight(e)},t.prototype.hasModel=function(t){return this.modelIds.has(t)},t.prototype.setBuildingHeight=function(t,e){this.buildingsHeight.set(t,e)},t.prototype.getBuildingHeight=function(t){return this.buildingsHeight.get(t)||0},t.prototype.getVisibleModelData=function(t){var e=this.models.get(t);if(e){var n=this.getModelCurrentMod(t);if(n){var i=Math.max(e.minZoom,n.minStyleZoom),r=Math.min(e.maxZoom,n.maxStyleZoom),o=this.state.styleZoom;if(!(o<i||o>=r))return{minStyleZoom:i,maxStyleZoom:r,opacity:this.getOpacity(t,i)}}}},t.prototype.isAnimating=function(){return this.animatingModelCount>0},t.prototype.getModelCurrentMod=function(t){var e=this.models.get(t);if(e)return this.checkModUsefulness(e.selectedMod,this.selectedIds)?e.selectedMod:this.checkModUsefulness(e.nonSelectedMod,this.selectedIds)?e.nonSelectedMod:void 0},t.prototype.loadModel=function(t){var e=this,n=t.model,i=n.regionId,r=n.metatileHash,o=n.fileName,a=n.index,s=n.matrix,c=n.offset,l=n.idLoHi,u={fileName:o,offset:c,matrix:s,regionId:i,metatileHash:r,selected:t.selected,id:l,modelIndex:a,pixelRatio:window.devicePixelRatio,tileServer:this.state.tileServer,tileSet:this.state.tileSet,tileProtocol:this.state.tileProtocol,subdomain:Object(j.a)(this.state.subdomains,o),styleState:this.state.styleState,styleId:this.state.handyStyleId};this.modules.workers.parser.generateModel(u).then((function(n){var i=n.objects,r=i.data,o=i.identifyIds,a=n.textures;t.object&&e.modules.tileManager.removeObject(t.object),t.object=new C.a("model",r,e.modules.renderer),t.minStyleZoom=Math.min.apply(Math,t.object.children.map((function(t){var n=t.attributes,i=n.styleId,r=n.layerId,o=e.modules.styleManager.getStyleLayer(i,r);return o?o.minzoom:-1/0}))),t.maxStyleZoom=Math.max.apply(Math,t.object.children.map((function(t){var n=t.attributes,i=n.styleId,r=n.layerId,o=e.modules.styleManager.getStyleLayer(i,r);return o?o.maxzoom:1/0}))),t.identifyIds=o;var s=t.model;s.texturesLoaded?t.status="ready":(s.texturesLoaded=!0,s.textureCount=a.data.length,a.isBitmap?e.prepareImageBitmapTextures(t,a.data):e.prepareRawTextures(t,a.data),e.startReadinessTicker(s))}))},t.prototype.prepareImageBitmapTextures=function(t,e){var n=this;e.forEach((function(e,i){n.textures[t.model.index+"_"+i]=new Ut(e,{flipY:!1})})),t.status="ready"},t.prototype.prepareRawTextures=function(t,e){var n=this,i=e.length;e.forEach((function(e,r){g(e).then((function(e){n.textures[t.model.index+"_"+r]=new Ut(e,{flipY:!1}),0==--i&&(t.status="ready")}))}))},t.prototype.clearMod=function(t){var e=t.model;if(t.status="initial",void 0!==t.object&&(t.object.clean(this.state),t.object=void 0),"initial"===this.getSiblingMod(t).status){for(var n=0;n<e.textureCount;n++)delete this.textures[e.index+"_"+n];e.texturesLoaded=!1}},t.prototype.getSiblingMod=function(t){return t.selected?t.model.nonSelectedMod:t.model.selectedMod},t.prototype.checkModUsefulness=function(t,e){var n=t.model;if(!this.viewportModelIds.has(n.id))return!1;var i=e.has(n.idLoHi);return i===t.selected||!(!i||t.selected||void 0!==this.getSiblingMod(t).object||void 0===t.object)},t.prototype.startReadinessTicker=function(t){this.readiness[t.id]=0,q.c(Ir(t.id),{easing:o.buildingAnimation.easing},this.state,0,1,o.buildingAnimation.duration),this.animatingModelCount++},t}(),Or=n(11),Mr=function(){function t(t){this.modules=t,this.modCache=new Map,this.isGenerating=!1,this.currentPois=[],this.currentIdSet=new xr.a,this.currentTrafficState=!1,this.currentSelectedIds=[],this.currentModKey="ppoi_false_"}return t.prototype.setPersonalPoi=function(t){this.currentPois=t;for(var e=new xr.a,n=0,i=t;n<i.length;n++){var r=i[n];e.add(Object(E.b)(r.id))}this.currentIdSet=e,this.modCache.clear(),this.displayedModKey=void 0},t.prototype.redraw=function(){this.modCache.clear(),this.displayedModKey=void 0},t.prototype.getIdentifyDataChunk=function(){return this.identifyDataChunk},t.prototype.update=function(){if(void 0===this.regionMetadata&&(this.regionMetadata=this.modules.assetManager.getProjectMetadata()),void 0!==this.regionMetadata){this.updateModKey();var t=this.currentModKey,e=this.modCache.get(t);void 0!==e||this.isGenerating||this.generate(t,this.currentPois,this.regionMetadata),void 0!==e&&t!==this.displayedModKey&&this.show(t,e,this.regionMetadata)}},t.prototype.generate=function(t,e,n){var i=this,r=n.regionId,o=n.metatileHash,a=this.modules.map.state;this.isGenerating=!0,this.modules.workers.parser.generatePersonalPoi(e,r,o,window.devicePixelRatio,this.modules.tileManager.getSelectedIds(),a.handyStyleId,a.styleState,this.modules.defaultSource.getId()).then((function(e){if(void 0!==e){var n=e.collectorOutput,r=e.styleId,o=n.packedRasters,a=n.rastersToLoad;void 0!==o&&i.modules.assetManager.prepareRasters(r,o),i.modules.assetManager.loadRasters(a),i.modCache.set(t,e),i.isGenerating=!1}else i.isGenerating=!1}))},t.prototype.show=function(t,e,n){var i=n.metatileHash,r=e.collectorOutput,o=r.labels,a=r.identifyIds,s=e.styleId;this.modules.labeler.removeLabels("ppoi"),o.length&&this.modules.labeler.addLabels("ppoi",Or.c.PersonalPoi,[{metatileHash:i,labels:o,styleId:s}]),this.identifyDataChunk={metatileHash:i,ids:a},this.modules.identifier.resetCache(),this.displayedModKey=t},t.prototype.updateModKey=function(){var t=Object(U.g)(this.modules.tileManager.getSelectedIds(),this.currentIdSet),e=this.modules.trafficTileLayer.isEnabled();Object(U.f)(this.currentSelectedIds,t)&&this.currentTrafficState===e||(this.currentTrafficState=e,this.currentSelectedIds=t,this.currentModKey="ppoi_"+e+"_"+t)},t}(),Pr=n(106),Lr=n.n(Pr),Tr=n(78),kr=n(79),zr=n(16),Cr=n(101),Er=n(102),Ar=function(){function t(){var t,e;this.connector=new Tr.a,this.fnRegistry=new kr.a(this.connector),this.classRegistry=new Cr.a(this.fnRegistry),this.parserWorker=Lr()(117),this.connector.addWorker(zr.b.Parser,this.parserWorker),this.labelingWorker=Lr()(118),this.connector.addWorker(zr.b.Labeling,this.labelingWorker),this.parser=(t=this.fnRegistry,e=this.classRegistry,{setMetatile:t.get(zr.b.Parser,"setMetatile"),fetchTile:t.get(zr.b.Parser,"fetchTile"),deleteTile:t.get(zr.b.Parser,"deleteTile"),abortTileRequest:t.get(zr.b.Parser,"abortTileRequest"),generateTile:t.get(zr.b.Parser,"generateTile"),generateFloor:t.get(zr.b.Parser,"generateFloor"),loadFloor:t.get(zr.b.Parser,"loadFloor"),generateModel:t.get(zr.b.Parser,"generateModel"),appendHiddenObjectIds:t.get(zr.b.Parser,"appendHiddenObjectIds"),prepareAtlas:t.get(zr.b.Parser,"prepareAtlas"),packRasters:t.get(zr.b.Parser,"packRasters"),fetchTrafficTile:t.get(zr.b.Parser,"fetchTrafficTile"),deleteTrafficTile:t.get(zr.b.Parser,"deleteTrafficTile"),abortTrafficTileRequest:t.get(zr.b.Parser,"abortTrafficTileRequest"),generateTrafficTile:t.get(zr.b.Parser,"generateTrafficTile"),generatePersonalPoi:t.get(zr.b.Parser,"generatePersonalPoi"),syncStyle:t.get(zr.b.Parser,"syncStyle"),GeoJsonSource:e.set("GeoJsonSource",Er.a).get(zr.b.Parser)}),this.labeling=function(t){return{appendFont:t.get(zr.b.Labeling,"appendFont"),markFontAsLoaded:t.get(zr.b.Labeling,"markFontAsLoaded"),addNewRasterSets:t.get(zr.b.Labeling,"addNewRasterSets"),updatePackingInfo:t.get(zr.b.Labeling,"updatePackingInfo"),syncStyle:t.get(zr.b.Labeling,"syncStyle"),loadRtlPlugin:t.get(zr.b.Labeling,"loadRtlPlugin"),markRtlPluginLoaded:t.get(zr.b.Labeling,"markRtlPluginLoaded"),markSourceLabelsAsOutdated:t.get(zr.b.Labeling,"markSourceLabelsAsOutdated")}}(this.fnRegistry)}return t.prototype.destroy=function(){this.parserWorker.terminate(),this.labelingWorker.terminate()},t}(),Dr=function(t){function e(n,i){var r=t.call(this)||this;r.options=Object(a.b)(i,e.options),r.uniqId=T(),r.labelKey="html-"+r.uniqId,r.mapPoint=Object(s.l)(r.options.coordinates),r.screenPoint=[0,0],r.html=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.zIndex=String(t.zIndex),t.interactive||(e.style.pointerEvents="none"),t.animate&&(e.style.opacity="0",e.style.transition="opacity "+t.duration+"ms",e.style["will-change"]="opacity");var n=document.createElement("div");return"string"==typeof t.html?n.innerHTML=t.html:n.append(t.html),e.append(n),e}(r.options),r.isHidden=!0,r.targetOpacity=0,r.modules=n.modules,r.modules.layers.addLayer(r),r.mapState=n.state,r.rounder=r.options.disableRounding?Rr:Fr;var o=r.options,c=o.offset,l=o.labeling;return"none"!==l.type&&r.modules.labeler.addLabelBox(r.labelKey,{id:r.uniqId,width:l.width,height:l.height,position:r.mapPoint,offset:c,labelingGroup:r.getLabelingGroup(),parentPoiId:"pinnedToPoi"===l.type?l.poiId:void 0}),r}return Object(M.c)(e,t),e.prototype.destroy=function(){this.removeHtml(),this.modules.labeler.removeLabels(this.labelKey),this.modules.layers.removeLayer(this)},e.prototype.update=function(){var t=this.checkZoom(),e=!this.isInvolvedInLabeling()||this.modules.labeler.isLabelBoxSurvived(this.uniqId);t&&e?this.show():this.hide(),this.updatePosition()},e.prototype.setContent=function(t){this.options.html=t,this.html.innerHTML="";var e=document.createElement("div");"string"==typeof t?e.innerHTML=t:e.append(t),this.html.append(e)},e.prototype.setLabelingSize=function(t,e){"none"!==this.options.labeling.type&&(this.options.labeling.width=t,this.options.labeling.height=e,this.updateLabelBox())},e.prototype.setPosition=function(t){this.mapPoint=Object(s.l)(t),this.updateLabelBox()},e.prototype.setOffset=function(t){this.options.offset=[t[0],t[1]],this.updateLabelBox()},e.prototype.setMinZoom=function(t){this.options.minZoom=t},e.prototype.setMaxZoom=function(t){this.options.maxZoom=t},e.prototype.getZIndex=function(){return this.options.zIndex},e.prototype.getOffset=function(){return this.options.offset},e.prototype.getPosition=function(){return Object(s.m)(this.mapPoint)},e.prototype.getHtmlElement=function(){return this.html.firstChild},e.prototype.dangerouslyGetRootElement=function(){return this.html},e.prototype.isShown=function(){return!this.isHidden},e.prototype.show=function(){var t=this;if(this.isHidden&&(this.isHidden=!1,this.appendHtml(),this.emit("shown",{id:this.uniqId.toString(),point:[this.screenPoint[0],this.screenPoint[1]],object:this}),this.options.animate)){if(this.showAnimationTimer)return;this.hideAnimationTimer&&(clearTimeout(this.hideAnimationTimer),this.hideAnimationTimer=void 0),1!==this.targetOpacity&&(this.showAnimationTimer=window.setTimeout((function(){t.setHtmlOpacity(1),t.showAnimationTimer=void 0}),0))}},e.prototype.hide=function(){var t=this;if(!this.isHidden)if(this.isHidden=!0,this.options.animate){if(this.hideAnimationTimer)return;this.showAnimationTimer&&(clearTimeout(this.showAnimationTimer),this.showAnimationTimer=void 0),this.setHtmlOpacity(0),this.hideAnimationTimer=window.setTimeout((function(){t.removeHtml(),t.hideAnimationTimer=void 0}),this.options.duration)}else this.removeHtml()},e.prototype.setHtmlOpacity=function(t){this.html.style.opacity=String(t),this.targetOpacity=t},e.prototype.removeHtml=function(){this.html.remove(),this.screenPoint=[0,0]},e.prototype.appendHtml=function(){this.getMarkerContainer().appendChild(this.html)},e.prototype.getMarkerContainer=function(){return this.options.preventMapInteractions?this.modules.layout.htmlContainerOutMap:this.modules.layout.htmlContainerInMap},e.prototype.updatePosition=function(){var t=this.modules.camera.project(this.mapPoint);this.rounder(t,t[0]+this.options.offset[0],t[1]+this.options.offset[1],this.mapState.stillness),z.h(this.screenPoint,t)||(this.html.style.transform="translate3d("+t[0]+"px, "+t[1]+"px, 0px)",this.screenPoint=t)},e.prototype.updateLabelBox=function(){if("none"!==this.options.labeling.type){var t=this.options,e=t.labeling,n=e.width,i=e.height,r=t.offset;this.modules.labeler.removeLabels(this.labelKey),this.modules.labeler.addLabelBox(this.labelKey,{id:this.uniqId,width:n,height:i,position:this.mapPoint,offset:r,labelingGroup:this.getLabelingGroup(),parentPoiId:"pinnedToPoi"===this.options.labeling.type?this.options.labeling.poiId:void 0})}},e.prototype.getLabelingGroup=function(){return this.isInvolvedInLabeling()?"markerText":"htmlLabel"},e.prototype.checkZoom=function(){var t=this.mapState.zoom,e=this.options,n=e.minZoom,i=e.maxZoom;return t>=n&&t<i},e.prototype.isInvolvedInLabeling=function(){return"full"===this.options.labeling.type||"pinnedToPoi"===this.options.labeling.type},e.options={coordinates:[0,0],html:"",offset:[0,0],animate:!0,duration:500,labeling:{type:"none"},interactive:!0,preventMapInteractions:!1,zIndex:0,minZoom:-1/0,maxZoom:1/0,disableRounding:!1},e}(P.a),Fr=function(t,e,n,i){var r=Math.round(e)-e,o=Math.round(n)-n;t[0]=e+i*r,t[1]=n+i*o},Rr=function(t,e,n){t[0]=e,t[1]=n},Br=function(){function t(t){this.state=t,this.layers=[]}return t.prototype.addLayer=function(t){this.layers.push(t),this.state.needRerender=!0},t.prototype.removeLayer=function(t){var e=this.layers.indexOf(t);-1!==e&&(this.layers.splice(e,1),this.state.needRerender=!0)},t.prototype.getLayers=function(){return this.layers},t.prototype.getDynamicObjectLayers=function(){return this.layers.filter((function(t){return t instanceof k}))},t.prototype.getHtmlMarkers=function(){return this.layers.filter((function(t){return t instanceof Dr}))},t}(),Nr=n(67),Ur=function(){return""},Zr=[.5,.5],Hr=function(){function t(t){this.modules=t,this.cache={}}return t.prototype.getRasterSet=function(t,e,n,i){var r=this.getKey(t,n,i),o=this.getFromCache(r,e);if(o)return o;var a=this.loadIcon(t,e,n,i);return this.storeInCache(a,r,e),a},t.prototype.loadIcon=function(t,e,n,i){return Object(M.b)(this,void 0,Promise,(function(){var r,o,a,s,c,l;return Object(M.d)(this,(function(u){switch(u.label){case 0:return r=this.modules,o=r.dynamicStyle,a=r.workers,s=r.assetManager,c=t,e?[4,this.loadImageForTransformer(t).then((function(t){return e(t)})).catch((function(){return t}))]:[3,2];case 1:c=u.sent(),u.label=2;case 2:return[4,this.loadImage(c)];case 3:return l=u.sent(),[2,Promise.resolve().then((function(){n=void 0!==n?n:[l.width,l.height];var t=void 0!==i?[i[0]/n[0],i[1]/n[1]]:Zr,e=[n[0]*window.devicePixelRatio,n[1]*window.devicePixelRatio],r=Object(Nr.a)([{w:e[0],h:e[1],x:0,y:0,atlasIndex:0,isPacked:!1,anchorX:t[0],anchorY:t[1]}]);o.appendRasterSet(r),a.labeling.addNewRasterSets(o.getStyle().id,[r]);var s=new Uint16Array(3);return s[0]=e[0],s[1]=e[1],s[2]=r.index,a.parser.packRasters(s).then((function(t){return{packedRasters:t.packedRasters,rasterSet:r,scaledSize:e}}))})).then((function(t){var e=t.packedRasters,n=t.rasterSet,i=t.scaledSize;return void 0!==e&&s.prepareRasters(o.getStyle().id,e,[b(l,i)]),n}))]}}))}))},t.prototype.getFromCache=function(t,e){var n=this.cache[t];if(n)return n.get(e||Ur)},t.prototype.storeInCache=function(t,e,n){this.cache[e]||(this.cache[e]=new Map),this.cache[e].set(n||Ur,t)},t.prototype.getKey=function(t,e,n){return t+"_"+(void 0!==e?e[0]+","+e[1]:"")+"_"+(void 0!==n?n[0]+","+n[1]:"")},t.prototype.loadImage=function(t){return new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e(n)}}))},t.prototype.loadImageForTransformer=function(t){return-1===t.indexOf(".svg")?new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e({type:"raster",source:n})},n.onerror=function(){e({type:"unknown"})}})):new Promise((function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&0!==n.response.byteLength?e({type:"vector",source:n.response}):e({type:"unknown"})},n.onerror=function(){e({type:"unknown"})},n.send()}))},t}(),Gr=function(){function t(t,e,n,i,r,o,a,s,c,l,u){this.key=n,this.id=i,this.object=void 0,this.ready=!1,this.modules=t,this.mapState=e,this.status="initial",this.regionId=r,this.metatileHash=Gt.l,this.styleId=o,this.floorIndex=a,this.cache=s,this.onGenerated=u,this.useful=!0,this.selectedIds=c.slice(0),this.needFilterIds=l}return t.prototype.update=function(){var t=this;switch(this.status){case"initial":this.useful&&(this.modules.workers.parser.generateFloor(this.id,this.regionId,window.devicePixelRatio,this.floorIndex,this.selectedIds,this.styleId,this.mapState.styleState,this.modules.defaultSource.getId()).then((function(e){var n=e.collectorOutput.packedRasters,i=e.styleId;n&&t.modules.assetManager.prepareRasters(i,n),t.processResponse=e})),this.status="generating");break;case"generating":if(this.useful&&this.processResponse){var e=this.processResponse,n=e.collectorOutput.data,i=e.tileCoords;this.object=new C.a("floor",n,this.modules.renderer,i),this.status="generated",this.ready=!0,this.cache.add(this.key,this),this.onGenerated(this)}}},t.prototype.getLabels=function(){return this.processResponse&&this.processResponse.collectorOutput.labels.length?[{metatileHash:this.metatileHash,labels:this.processResponse.collectorOutput.labels,styleId:this.processResponse.styleId}]:[]},t.prototype.getGeoIds=function(){if(this.processResponse)return this.processResponse.collectorOutput.geoIds},t.prototype.canBeRemoved=function(){return"initial"===this.status},t.prototype.remove=function(){"generated"===this.status&&this.cache.remove(this.key),this.status="initial",this.object&&this.object.clean(this.mapState),this.ready=!1},t.prototype.getIdentifyIds=function(){if(this.processResponse){var t={};return t[this.metatileHash]=this.processResponse.collectorOutput.identifyIds,t}},t.prototype.isDataEmpty=function(){return!this.processResponse||0===this.processResponse.collectorOutput.data.length},t}(),Wr=function(){function t(t,e,n,i,r,o,a){var s=this;this.onModGenerated=function(t){var e=s.idSetByFloorIndex.get(t.floorIndex);if(!e){e=new xr.a;var n=t.getGeoIds();n&&e.addFromFlatArray(n),s.idSetByFloorIndex.set(t.floorIndex,e)}t.needFilterIds&&(t.needFilterIds=!1,t.selectedIds=Object(U.g)(t.selectedIds,e))},this.modules=t,this.mapState=e,this.id=n,this.regionId=i,this.styleId=e.handyStyleId,this.idSetByFloorIndex=new Map,this.cache=r,this.floorIndex=o,this.createNewMod(o,a)}return t.prototype.update=function(){this.currentMod&&this.currentMod.useful&&this.currentMod.update(),this.newMod&&this.newMod.useful&&this.newMod.update()},t.prototype.getCurrentMod=function(){return this.currentMod},t.prototype.commitMod=function(){this.newMod&&this.newMod.ready&&(this.currentMod=this.newMod,this.newMod=void 0)},t.prototype.setUsefulMod=function(t,e){this.floorIndex=t;var n=this.idSetByFloorIndex.get(t);if(n&&(e=Object(U.g)(e,n)),this.currentMod||this.newMod){if(this.currentMod&&Object(U.f)(this.currentMod.selectedIds,e)&&this.currentMod.floorIndex===t)return this.currentMod.useful=!0,void(this.newMod=void 0);this.newMod&&Object(U.f)(this.newMod.selectedIds,e)&&this.newMod.floorIndex===t?this.newMod.useful=!0:this.createNewMod(t,e)}else this.createNewMod(t,e)},t.prototype.getUsefulMod=function(){return this.currentMod&&this.currentMod.useful?this.currentMod:this.newMod&&this.newMod.useful?this.newMod:void 0},t.prototype.setAllModsNeedless=function(){this.currentMod&&(this.currentMod.useful=!1),this.newMod&&(this.newMod.useful=!1)},t.prototype.canBeRemoved=function(){return(!this.currentMod||this.currentMod.canBeRemoved())&&(!this.newMod||this.newMod.canBeRemoved())},t.prototype.remove=function(){this.currentMod&&this.currentMod.remove(),this.newMod&&this.newMod.remove()},t.prototype.createNewMod=function(t,e){var n=function(t,e,n){return"floor_plan_"+t+"_"+e+"_"+n}(this.id,t,e),i=this.cache.get(n);if(i)this.newMod=i,this.newMod.useful=!0;else{if(void 0===this.styleId)return;var r=!this.idSetByFloorIndex.has(t);this.newMod=new Gr(this.modules,this.mapState,n,this.id,this.regionId,this.styleId,t,this.cache,e,r,this.onModGenerated)}},t}(),Vr={trafficOn:!1,parkingOn:!1,navigatorOn:!1};function qr(t){return Object(M.a)(Object(M.a)({},Vr),t)}function Yr(t,e,n){return Object(M.a)(Object(M.a)({},t),{_activeFloorIds:e,_activeFloorBuildingIds:n})}var Xr=function(){function t(t,e){this.state=t,this.modules=e,this.floors=new Map,this.complexDescriptors=new Map,this.hiddenObjectIds=new Map,this.displayedMods=new Map,this.requestedFloors=new Set,this.needUpdate=!1,this.cache=new Sr.a(10,(function(t,e){return e.remove()})),this.stateDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}])}return t.prototype.update=function(){var t=this;if(this.stateDiffer.check(this.state)||this.needUpdate){this.needUpdate=!1;var e=this.findActiveFloor();if(this.activeFloor!==e){if(this.activeFloor&&this.modules.map.emit("floorcomplexhide",{id:this.activeFloor}),e){var n=this.complexDescriptors.get(e);if(n){var i=n.id,r=n.regionId,o=n.defaultFloor,a=n.floors,s=this.floors.get(e);s?s.setUsefulMod(s.floorIndex,this.modules.tileManager.getSelectedIds()):(s=new Wr(this.modules,this.state,i,r,this.cache,o,this.modules.tileManager.getSelectedIds()),this.floors.set(e,s));var c=s.getUsefulMod();this.modules.map.emit("floorcomplexshow",{id:i,currentFloor:c?c.floorIndex:o,floorNames:a.map((function(t){return t.name})),firmsToFloorIndexMap:n.firmsToFloorIndexMap})}}this.activeFloor=e}}if(this.floors.forEach((function(t){return t.setAllModsNeedless()})),this.activeFloor){var l=this.floors.get(this.activeFloor);l&&l.setUsefulMod(l.floorIndex,this.modules.tileManager.getSelectedIds())}this.floors.forEach((function(e,n){e.update(),e.canBeRemoved()&&t.floors.delete(n)})),this.updateStyleState(),this.updateScene(),this.commitMods()},t.prototype.getActiveFloorHiddenIds=function(){var t=[];if(!this.activeFloor)return t;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return t;var i=n.getCurrentMod();if(!i)return t;if(i.isDataEmpty())return t;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);o&&o.forEach((function(e){return t.push(e)}))}return t},t.prototype.prepareFloors=function(t,e,n,i){var r=this;"terrain"===i&&n.forEach((function(n,i,o){var a=Object(E.a)(i,o),s=r.hiddenObjectIds.get(a);void 0===s&&(s=new Set,r.hiddenObjectIds.set(a,s));for(var c=0;c<n.length;c+=2)s.add(Object(E.a)(n[c],n[c+1]));r.loadFloor(a,t,e)}))},t.prototype.changeFloorNumber=function(t,e){var n=this.floors.get(t),i=this.complexDescriptors.get(t);n&&i&&(n.setUsefulMod(e,this.modules.tileManager.getSelectedIds()),this.modules.map.emit("floorcomplexlevelchange",{id:t,floorIndex:e,floorName:i.floors[e].name}))},t.prototype.resetCache=function(){var t=this;this.floors.forEach((function(e,n){e.remove(),t.floors.delete(n)})),this.cache.reset(),this.activeFloor=void 0,this.needUpdate=!0},t.prototype.getDisplayedIdentifyData=function(){var t=[];return this.displayedMods.forEach((function(e){var n=e.getIdentifyIds();n&&Object.keys(n).forEach((function(e){t.push({ids:n[e],metatileHash:Number(e)})}))})),t},t.prototype.hasDisplayedFloorBuilding=function(t){if(!this.activeFloor)return!1;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return!1;var i=n.getCurrentMod();if(!i||!i.ready)return!1;if(i.isDataEmpty())return!1;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);if(o&&o.has(t))return!0}return!1},t.prototype.loadFloor=function(t,e,n){var i=this;this.requestedFloors.has(t)||(this.requestedFloors.add(t),this.modules.workers.parser.loadFloor(t,this.state.floorsUrl).then((function(r){"error"!==r.type?(i.complexDescriptors.set(t,{id:t,regionId:e,metatileHash:n,center:r.center,defaultFloor:r.defaultFloor,floors:r.floors,buildings:r.buildings,bound:r.bound,firmsToFloorIndexMap:r.firmsToFloorIndexMap}),i.needUpdate=!0):404!==r.errorStatus&&console.error("Loading floor "+t+" failed")})))},t.prototype.updateStyleState=function(){var t=this.state.styleState;if(this.activeFloor){var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(e&&n){var i=n.getUsefulMod();if(i){var r=e.floors[i.floorIndex].ids,o=e.buildings;r===t._activeFloorIds&&o===t._activeFloorBuildingIds||(this.state.styleState=Yr(t,r,o))}}}else(t._activeFloorIds||t._activeFloorBuildingIds)&&(this.state.styleState=Yr(t,void 0,void 0))},t.prototype.updateScene=function(){var t=this,e=!1,n=new Map;if(this.activeFloor){var i=this.floors.get(this.activeFloor);if(!i)return;var r=i.getCurrentMod();r&&r.ready&&n.set(r.key,r)}this.displayedMods.forEach((function(i,r){n.has(r)||(t.removeFloorMod(i),e=!0)})),n.forEach((function(n,i){t.displayedMods.has(i)||(t.addFloorMod(n),e=!0),t.cache.get(i)})),e&&(this.displayedMods=n,this.state.needLabeling=!0,this.state.needRerender=!0,this.modules.identifier.resetCache())},t.prototype.addFloorMod=function(t){t.object&&(this.modules.tileManager.addObject(t.object),this.modules.labeler.addLabels(t.key,Or.c.Floor,t.getLabels()))},t.prototype.removeFloorMod=function(t){t.object&&(this.modules.tileManager.removeObject(t.object),this.modules.labeler.removeLabels(t.key))},t.prototype.commitMods=function(){if(this.activeFloor){var t=this.floors.get(this.activeFloor);t&&t.commitMod()}},t.prototype.findActiveFloor=function(){var t=this.complexDescriptors,e=this.state,n=e.center,i=e.zoom,r=e.styleZoom,a=e.rotation,s=e.size,l=e.pitch,u=e.viewport,d=e.padding;if(!(r<o.floors.displayStyleZoom)){var f,h=new c.a({center:n,zoom:i,rotation:a,size:[Math.floor(s[0]*(1-o.floors.viewportPadding)),Math.floor(s[1]*(1-o.floors.viewportPadding))],pitch:l,viewport:u,padding:d}),p=1/0;return t.forEach((function(t){var e=z.f(n,t.center);p>e&&Object(wr.b)(h.viewportVertices,t.bound)&&(p=e,f=t)})),f?f.id:void 0}},t}(),Kr=n(90),Jr=l.d(),Qr=function(t){function e(e,n){var i,r,a,c,l,u,d,f=t.call(this,e)||this;f.options=n,f.vectors=f.options.coordinates.map((function(t){return t.map(s.l)})),f.bouncePosition=0,f.growPosition=1;var h=f.modules,p=h.renderer,m=h.tileManager,v=h.dynamicStyle,_=h.collector,y=h.layers,g=Object(H.d)({type:"arrow",id:"dynamic-entrance-"+f.uniqId,minzoom:f.options.minZoom,maxzoom:f.options.maxZoom,style:{color:null!==(i=f.options.color)&&void 0!==i?i:"#0085a0",strokeColor:null!==(r=f.options.borderColor)&&void 0!==r?r:"#ffffff",lineWidth:null!==(a=f.options.width)&&void 0!==a?a:3,strokeWidth:null!==(c=f.options.borderWidth)&&void 0!==c?c:1,tipWidth:null!==(l=f.options.wingWidthMultiplier)&&void 0!==l?l:2,tipHeight:null!==(u=f.options.tipHeightMultiplier)&&void 0!==u?u:4,animation:null===(d=f.options.animate)||void 0===d||d?{type:"appearance",tipMovementAmplitude:f.options.tipMovementAmplitude||20}:void 0}});if(!g)return f;v.addLayer(g,f.options.zIndex),f.layerId=g.innerId;for(var b=f.getTileInfo(),w=0;w<f.vectors.length;w++){var x=f.vectors[w],S=f.getVertices(x,b),I=Object(Z.c)({id:[w,0]});Object(N.b)({collector:_,generator:Kr.a.generate,args:[v.getStyle().id,g,O.d,I,S]})}var j=_.getAccumulatedData(),M=new C.a("dynamicObject",j.data,p,b.coords,f);if(f.tileObjects.push(M),m.addObject(M),f.identifyIds.push(j.identifyIds),f.options.animate){var P="entrance-bounce-"+f.uniqId,L="entrance-grow-"+f.uniqId;f.bounceTickerUpdate=q.e.bind(null,P,{step:function(t,e){return f.bouncePosition=e},complete:function(){f.bounceTickerUpdate=void 0}},f.mapState),f.growTickerUpdate=q.e.bind(null,L,{step:function(t,e){return f.growPosition=e},complete:function(){f.growTickerUpdate=void 0}},f.mapState),q.c(P,{easing:o.entranceAnimation.bounceType},f.mapState,-1,0,o.entranceAnimation.bounceTime),q.c(L,{easing:o.entranceAnimation.growType},f.mapState,0,1,o.entranceAnimation.growTime)}else f.bouncePosition=0,f.growPosition=1;return y.addLayer(f),_.reset(),f.mapState.needRerender=!0,f}return Object(M.c)(e,t),e.prototype.update=function(){this.bounceTickerUpdate&&this.bounceTickerUpdate(),this.growTickerUpdate&&this.growTickerUpdate()},e.prototype.entranceAnimationInProgress=function(){return void 0!==this.bounceTickerUpdate||void 0!==this.growTickerUpdate},e.prototype.remove=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e.prototype.getTileInfo=function(){for(var t=u.e(),e=0;e<this.vectors.length;e++)for(var n=this.vectors[e],i=0;i<n.length;i++)u.f(t,n[i]);return Object(U.e)(Object(U.i)(t))},e.prototype.getVertices=function(t,e){for(var n=[[],[],[]],i=0;i<t.length;i++)Object(U.t)(Jr,t[i],e),n[0][i]=Jr[0],n[1][i]=Jr[1];return n},e}(k),$r=function(){function t(t,e){this.objects=[],this.state=t,this.modules=e,this.tileLayers=[],this.stateDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),this.selectedIds=[]}return t.prototype.addTileLayer=function(t){-1===this.tileLayers.indexOf(t)&&(this.tileLayers.push(t),t.redraw(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.removeTileLayer=function(t){Object(a.g)(this.tileLayers,t)&&(t.resetHoverId(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.redraw=function(){this.modules.labeler.clearPreviousLabels();for(var t=0,e=this.tileLayers;t<e.length;t++){var n=e[t];n.resetHoverId(),n.redraw()}this.state.needRerender=!0},t.prototype.setSelectedIds=function(t){void 0===t&&(t=[]),t.sort(U.b),this.selectedIds=t;for(var e=0,n=this.tileLayers;e<n.length;e++)n[e].setSelectedIds(t)},t.prototype.getSelectedIds=function(){return this.selectedIds},t.prototype.getViewportTiles=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getViewportTiles())}return t},t.prototype.viewportTilesReady=function(){return this.tileLayers.every((function(t){return t.viewportTilesReady()}))},t.prototype.displayedTilesAnimationFinished=function(){return this.tileLayers.every((function(t){return t.displayedTilesAnimationFinished()}))},t.prototype.getDisplayedIdentifyData=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getDisplayedIdentifyData())}return t},t.prototype.isIdle=function(){return!this.state.needRerender&&this.viewportTilesReady()&&this.displayedTilesAnimationFinished()&&!this.modules.buildingHeightAnimator.isAnimating()&&!this.modules.modelManager.isAnimating()&&!this.checkEntranceAnimation()},t.prototype.update=function(){var t=this.state;if(this.stateDiffer.check(t)){for(var e=0,n=this.tileLayers;e<n.length;e++)(s=n[e]).updateViewport();this.modules.modelManager.findViewportModels(),t.needLabeling=!0}for(var i=0,r=this.tileLayers;i<r.length;i++)(s=r[i]).update();if(this.updateTickers(),this.modules.modelManager.update(),t.collectStats){this.state.stats.tileCount=0;for(var o=0,a=this.tileLayers;o<a.length;o++){var s=a[o];this.state.stats.tileCount+=s.getTileCount()}this.state.stats.dynamicTileCount=this.objects.filter((function(t){return"dynamicObject"===t.purpose||"floor"===t.purpose})).length}},t.prototype.getTileObjects=function(){return this.objects},t.prototype.addObject=function(t){-1===this.objects.indexOf(t)&&(this.objects.push(t),this.state.needRerender=!0)},t.prototype.removeObject=function(t){Object(a.g)(this.objects,t)&&(this.state.needRerender=!0)},t.prototype.destroy=function(){for(var t=this,e=0,n=this.tileLayers;e<n.length;e++)n[e].destroy();this.objects.forEach((function(e){return e.clean(t.state)}))},t.prototype.updateTickers=function(){var t=this;this.objects.forEach((function(e){return e.updateTicker(t.state)}))},t.prototype.checkEntranceAnimation=function(){return this.modules.layers.getLayers().some((function(t){return t instanceof Qr&&t.entranceAnimationInProgress()}))},t}(),to=q.e.bind(null,"labelingOpacity",{step:function(t,e){return t.labelingOpacity=e}}),eo=function(){function t(t,e){var n;this.state=t,this.modules=e,this.useThrottleUpdate=!0,this.isLabelingInProgress=!1,this.skipHysteresisInNextLabeling=!1,this.activeLabelKeys=[],this.survivedLabelBoxes=new Set,this.prevSurvivedCommPoiIds=new Set,this.worker={appendLabels:(n=this.modules.workers.fnRegistry).get(zr.b.Labeling,"appendLabels"),appendLabelBox:n.get(zr.b.Labeling,"appendLabelBox"),removeLabels:n.get(zr.b.Labeling,"removeLabels"),processLabels:n.get(zr.b.Labeling,"processLabels"),clearPreviousLabels:n.get(zr.b.Labeling,"clearPreviousLabels")},this.setLabelingInterval(o.labeling.interval)}return t.prototype.disableThrottleUpdateOnce=function(){this.useThrottleUpdate=!1},t.prototype.update=function(){to(this.state),this.state.needLabeling&&!this.isLabelingInProgress&&(this.state.needLabeling=!1,this.isLabelingInProgress=!0,this.useThrottleUpdate?this.throttledUpdateLabeling():(this.useThrottleUpdate=!0,this.generateLabelingTile()))},t.prototype.isIdle=function(){return void 0===this.state.tickers.labelingOpacity&&!this.isLabelingInProgress&&!this.state.needLabeling},t.prototype.setLabelingInterval=function(t){var e=this;this.throttledUpdateLabeling=wt((function(){e.generateLabelingTile()}),t)},t.prototype.addLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.activeLabelKeys.push(t),this.state.needLabeling=!0},t.prototype.addTileLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.state.needLabeling=!0},t.prototype.addLabelBox=function(t,e){this.worker.appendLabelBox(t,e),this.state.needLabeling=!0},t.prototype.removeLabels=function(t){this.worker.removeLabels(t);var e=this.activeLabelKeys.indexOf(t);-1!==e&&this.activeLabelKeys.splice(e,1),this.state.needLabeling=!0},t.prototype.isLabelBoxSurvived=function(t){return this.survivedLabelBoxes.has(t)},t.prototype.clearPreviousLabels=function(){this.worker.clearPreviousLabels()},t.prototype.resetHysteresis=function(){this.skipHysteresisInNextLabeling=!0,this.state.needLabeling=!0},t.prototype.generateLabelingTile=function(){var t=this,e=Object(U.i)(Object(wr.a)(this.modules.camera.viewportVertices),o.labeling.tileMultiplier),n=this.modules.floorManager.getActiveFloorHiddenIds(),i=[];this.modules.tileManager.tileLayers.forEach((function(t){i.push.apply(i,t.getDisplayedLabelsKeys())})),i.push.apply(i,this.activeLabelKeys);var r={center:this.state.center,zoom:this.state.zoom,styleZoom:this.state.styleZoom,rotation:this.state.rotation,size:this.state.size,pitch:this.state.pitch,promoMode:this.state.promoMode,viewport:this.state.viewport,padding:this.state.padding,styleState:this.state.styleState,buildingHeight:this.modules.buildingHeightAnimator.getDefaultBuildingHeight()};this.worker.processLabels(i,r,Object(U.e)(e),window.devicePixelRatio,n,o.labeling.commercialMargins,this.skipHysteresisInNextLabeling).then((function(n){t.survivedLabelBoxes.clear(),n.survivedLabelBoxIds.forEach((function(e){return t.survivedLabelBoxes.add(e)})),t.processSurvivedCommPoiIds(n.survivedCommPoiIds),t.labelTile&&(t.modules.tileManager.removeObject(t.labelTile),t.labelTile.clean(t.state)),t.modules.assetManager.loadRasters(n.collectorOutput.rastersToLoad),t.labelTile=new C.a("labeling",n.collectorOutput.data,t.modules.renderer,e),t.modules.tileManager.addObject(t.labelTile);var i,r,a,s=o.labeling,c=s.animationTime,l=s.animationType,u=s.interval;i=t.state,r=l,a=Math.min(c,u),q.c("labelingOpacity",{easing:r},i,0,1,a),t.state.needRerender=!0,t.isLabelingInProgress=!1})),this.skipHysteresisInNextLabeling=!1},t.prototype.processSurvivedCommPoiIds=function(t){var e=this;if(0!==t.length){var n=t.filter((function(t){return!e.prevSurvivedCommPoiIds.has(t)}));0!==n.length&&this.modules.map.emit("commpoishow",{commPoiIds:n}),this.prevSurvivedCommPoiIds=new Set(t)}else this.prevSurvivedCommPoiIds.clear()},t}(),no={start:{en:"Start",ru:"Старт"},addPoint:{en:"Add point",ru:"Добавить точку"},meter:{en:"m",ru:"м"},kilometer:{en:"km",ru:"км"}};function io(t,e,n){return e?no.start[n]||no.start.en:t<1e3?t+" "+(no.meter[n]||no.meter.en):(t/1e3).toFixed(1)+" "+(no.kilometer[n]||no.kilometer.en)}function ro(t,e){return'\n        <div style="font-size: '+e+'px;\n            color: #667799;\n            user-select: none;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n        </div>\n    "}function oo(t,e,n,i){return new V(i,{coordinates:t,interactive:n,draggable:n,width:e?7:0,borderWidth:e?3:4,border2Width:2,color:"#ffffff",borderColor:"#667799",border2Color:"#ffffff",zIndex:10})}function ao(t,e,n){return new ha(n,{coordinates:t,zIndex:5,zIndex2:4,zIndex3:3,width:4,width2:e?0:8,width3:e?0:10,color:e?"#66779966":"#667799",color2:"#ffffff",color3:"#00000026",interactive:!e})}var so=function(t){function e(e,n,i,r){var o=t.call(this)||this;o.markerOrLabelMouseover=function(){o.markerOrLabelHovered||(o.markerOrLabelHovered=!0,void 0===o.hoverTimer&&o.emit("mouseover"))},o.markerOrLabelMouseout=function(){o.markerOrLabelHovered&&(o.markerOrLabelHovered=!1,o.hoverTimer=window.setTimeout((function(){o.markerOrLabelHovered||(o.emit("mouseout"),o.hoverTimer=void 0)}),100))},o.onClick=function(){return o.emit("click")},o.labelText=io(r,i,e.state.lang),o.point=n,o.distance=r,o.label=function(t,e,n){var i=ro(e,13),r=function(t,e){return 7.15*t.length}(e);return new Dr(n,{coordinates:t,html:i,offset:[8,-8.5],labeling:{type:"full",width:r,height:13},animate:!1,zIndex:6})}(n,o.labelText,e),o.marker=oo(n,i,!0,e),o.markerOrLabelHovered=!1;var a=o.label.dangerouslyGetRootElement();return a.addEventListener("mouseover",o.markerOrLabelMouseover),a.addEventListener("mouseout",o.markerOrLabelMouseout),a.addEventListener("click",o.onClick),o.marker.on("mouseover",(function(){return o.markerOrLabelMouseover()})),o.marker.on("mouseout",(function(){return o.markerOrLabelMouseout()})),o.marker.on("dragstart",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragstart",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o.marker.on("dragend",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragend",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o}return Object(M.c)(e,t),e.prototype.getDistance=function(){return this.distance},e.prototype.getPoint=function(){return this.point},e.prototype.getMarkerUniqId=function(){return this.marker.uniqId},e.prototype.getLabelUniqId=function(){return this.label.uniqId},e.prototype.setPoint=function(t){this.point=t},e.prototype.remove=function(){this.marker.remove();var t=this.label.dangerouslyGetRootElement();t.removeEventListener("mouseover",this.markerOrLabelMouseover),t.removeEventListener("mouseout",this.markerOrLabelMouseout),t.removeEventListener("click",this.onClick),this.label.destroy()},e.prototype.activateHover=function(){this.label.setContent('\n        <img style="\n            user-select: none;\n            width: 24px;\n            height: 24px;\n            margin-top: -4px;\n            cursor: pointer;\n        " src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjIiIGhlaWdodD0iMjIiPjxkZWZzPjxwYXRoIGlkPSJBIiBkPSJNMTIgMTAuNTg2bDMuNzkzLTMuNzkzIDEuNDE0IDEuNDE0TDEzLjQxNCAxMmwzLjc5MyAzLjc5My0xLjQxNCAxLjQxNEwxMiAxMy40MTRsLTMuNzkzIDMuNzkzLTEuNDE0LTEuNDE0TDEwLjU4NiAxMiA2Ljc5MyA4LjIwN2wxLjQxNC0xLjQxNEwxMiAxMC41ODZ6Ii8+PC9kZWZzPjxnIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEgLTEpIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMC41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIuMTUiLz48bWFzayBpZD0iQiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjQSIvPjwvbWFzaz48dXNlIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI0EiLz48ZyBmaWxsPSIjMjYyNjI2IiBtYXNrPSJ1cmwoI0IpIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PC9nPjwvZz48L3N2Zz4=" alt="close">\n    ')},e.prototype.deactivateHover=function(){this.label.setContent(ro(this.labelText,13))},e}(P.a),co=function(){function t(t,e){var n=this;this.onDocumentMouseMove=function(t){n.mousePos=m(n.modules.layout.rootContainer,t.clientX,t.clientY),n.needsUpdate=!0},this.modules=e,this.state=t,this.joints=[],this.enabled=!1,this.needsUpdate=!1,this.hidePreviewLine=!1,this.hideMouseElem=!1,this.mousePos=[0,0],document.addEventListener("mousemove",this.onDocumentMouseMove),this.langDiffer=new It([{path:"lang",type:"string"}])}return t.prototype.destroy=function(){document.removeEventListener("mousemove",this.onDocumentMouseMove)},t.prototype.enable=function(){this.enabled||(this.enabled=!0,this.state.identifyPickDistance=2*o.identify.pickDistance,this.popup=new Dr(this.modules.map,{coordinates:[0,0],html:"",interactive:!1,animate:!1,zIndex:1}))},t.prototype.disable=function(){this.enabled=!1,this.reset(),void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.state.identifyPickDistance=o.identify.pickDistance,this.popup&&(this.popup.destroy(),this.popup=void 0)},t.prototype.update=function(){this.enabled&&(this.langDiffer.check(this.state)&&this.recalculate(),this.needsUpdate&&(this.needsUpdate=!1,this.drawMousePoint(),this.drawPreviewLine()))},t.prototype.setPoints=function(t){var e=this;this.reset(),t.forEach((function(t){return e.addPointToEnd(t)})),this.drawPolyline(),this.sendRulerChangeEvent(!1)},t.prototype.handleClick=function(t,e){var n=this.getJointByUniqId(e&&e.dynamicObjectId);if(n){var i=this.getJointIndexByReferer(n);void 0!==i&&(n.remove(),this.joints.splice(i,1),this.recalculate(),this.hidePreviewLine=!1,this.hideMouseElem=!1),this.popup&&this.popup.setContent("")}else if(e&&this.polyline&&this.polyline.uniqId===e.dynamicObjectId){var r=this.polyline.snapPoint(t),o=this.getJointIndexByDistance(r.distance),a=this.createJoint(r.point,!1,r.distance);this.joints.splice(o,0,a),this.hidePreviewLine=!0,this.hideMouseElem=!0,this.drawPolyline(),this.sendRulerChangeEvent(!0),this.popup&&this.popup.setContent("")}else{var c=Object(s.m)(this.modules.camera.unproject(t));this.addPointToEnd(c),this.drawPolyline(),this.sendRulerChangeEvent(!0)}},t.prototype.recalculate=function(){var t=this,e=[];this.joints.forEach((function(n,i){n.remove();var r=0===i,o=0;if(!r){var a=e[i-1];o=a.getDistance()+Object(s.b)(a.getPoint(),n.getPoint())}var c=t.createJoint(n.getPoint(),r,o);e.push(c)})),this.joints=e,this.drawPolyline(),this.sendRulerChangeEvent(!0)},t.prototype.sendRulerChangeEvent=function(t){this.modules.map.emit("rulerchange",{points:this.getPoints(),isUser:t})},t.prototype.getJointByUniqId=function(t){if(void 0!==t)for(var e=0,n=this.joints;e<n.length;e++){var i=n[e];if(t===i.getMarkerUniqId()||t===i.getLabelUniqId())return i}},t.prototype.getJointIndexByDistance=function(t){for(var e=0,n=0,i=this.joints;n<i.length&&!(t<i[n].getDistance());n++)e++;return e},t.prototype.getJointIndexByReferer=function(t){for(var e=0,n=0,i=this.joints;n<i.length;n++){if(i[n]===t)return e;e++}},t.prototype.getPoints=function(){return this.joints.map((function(t){return t.getPoint()}))},t.prototype.reset=function(){this.joints.forEach((function(t){return t.remove()})),this.joints=[],void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0),void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0),this.hidePreviewLine=!1,this.hideMouseElem=!1,this.popup&&this.popup.setContent("")},t.prototype.createJoint=function(t,e,n){var i=this,r=new so(this.modules.map,t,e,n);return r.on("mouseover",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!0,!0),r.activateHover())})),r.on("mouseout",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!1,!0),r.deactivateHover())})),r.on("dragstart",(function(){i.requestUpdate(!1,!0),i.draggableJointIndex=i.getJointIndexByReferer(r)})),r.on("dragend",(function(t){i.requestUpdate(!1,!0),i.draggableJointIndex=void 0,r.setPoint(t.lngLat),i.recalculate()})),r.on("click",(function(){var t=i.getJointIndexByReferer(r);void 0!==t&&(r.remove(),i.joints.splice(t,1),i.recalculate(),i.hidePreviewLine=!1,i.hideMouseElem=!1),i.popup&&i.popup.setContent("")})),r},t.prototype.addPointToEnd=function(t){var e=!0,n=0;if(this.joints.length>0){e=!1;var i=this.joints[this.joints.length-1];n=i.getDistance()+Object(s.b)(i.getPoint(),t)}var r=this.createJoint(t,e,n);this.joints.push(r)},t.prototype.drawPolyline=function(){var t=this;void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0);var e=this.getPoints();if(!(e.length<2)){var n=ao(e,!1,this.modules.map);n.on("mousemove",(function(e){if(void 0===t.draggableJointIndex){if(t.popup){var i=n.snapPoint(e.point),r=io(i.distance,!1,t.state.lang);t.popup.setPosition(i.point),t.popup.setContent(function(t,e){return'\n        <div style="text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            user-select: none;\n            color: #667799;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            font-size: 13px;\n            margin: -12px 0 0 12px; /** отступы от точки наведения */\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n            <br>\n            "+function(t){return no.addPoint[t]||no.addPoint.en}(e)+"\n        </div>\n    "}(r,t.state.lang)),t.snapPoint=i.point}t.requestUpdate(!0,!1)}})),n.on("mouseout",(function(){void 0===t.draggableJointIndex&&(t.popup&&t.popup.setContent(""),t.requestUpdate(!1,!0))})),this.polyline=n}},t.prototype.requestUpdate=function(t,e){this.hidePreviewLine=t,this.hideMouseElem=e,this.needsUpdate=!0},t.prototype.getPreviewPoints=function(){var t=this.getPoints();if(this.hidePreviewLine||t.length<1)return[];var e=this.draggableJointIndex,n=Object(s.m)(this.modules.camera.unproject(this.mousePos));if(void 0===e||1===t.length)return[];if(e===this.joints.length-1)return[t[t.length-2],n];if(0===e)return[t[1],n];var i=this.joints[e-1],r=this.joints[e+1];return[i.getPoint(),n,r.getPoint()]},t.prototype.drawPreviewLine=function(){void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0);var t=this.getPreviewPoints();t.length<1||(this.previewLine=ao(t,!0,this.modules.map))},t.prototype.drawMousePoint=function(){void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.hideMouseElem||void 0===this.snapPoint||(this.mouseElem=oo(this.snapPoint,!0,!1,this.modules.map))},t}(),lo=function(){function t(t,e,n){this.type=t,this.handler=n,this.mouseDownPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"pitch/rotation"})}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.processMouseMoveAction=function(t){var e=m(this.handler.container,t.clientX,t.clientY);return new uo(this.type,this.mouseDownPoint,e,this.handler)},t.prototype.processMouseUpAction=function(t){var e=this;switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button){var n=m(this.handler.container,t.clientX,t.clientY);return this.handler.modules.identifier.search("contextmenu",n,!0).then((function(i){R("contextmenu",i,t,n,e.handler.modules)})),this.returnToInitialState()}break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new fo(this.mouseDownPoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new bo(this.handler)},t}(),uo=function(){function t(t,e,n,i){this.type=t,this.mouseDownPoint=e,this.mouseMovePoint=n,this.handler=i,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction&&this.handler.mapState.disableRotationByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseleave":return this.returnToInitialState();case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.update=function(t){0===this.mouseDownPoint[0]&&0===this.mouseDownPoint[1]&&(this.mouseDownPoint=this.mouseMovePoint);var e=Object(a.k)(t.size,this.mouseDownPoint),n=Object(a.k)(t.size,this.mouseMovePoint),i=(e[0]-n[0])*o.zoom.mouseRotateDelta,r=(n[1]-e[1])*o.zoom.mousePitchDelta;xt(t),t.disableRotationByUserInteraction||it(t,t.rotation+i,{animate:!1}),t.disablePitchByUserInteraction||at(t,Object(a.c)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.mouseDownPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=m(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button)return this.returnToInitialState();break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new fo(this.mouseMovePoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new bo(this.handler)},t}(),fo=function(){function t(t,e){this.handler=e,this.toInitialOnMouseUp=!1,this.mouseDownPoint=t,this.dragStartPoint=t,this.isTimerStarted=void 0!==this.handler.dblClickTimer,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"center"}),this.isTimerStarted&&(window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0)}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.toInitialOnMouseUp=!0,this;case"mouseup":return this.processMouseUpAction(t);case"mousemove":return this.processMouseMoveAction(t);case"click":return this.processMouseClickAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.processMouseUpAction=function(t){return 0!==t.button||!this.toInitialOnMouseUp&&this.handler.modules.layout.isActionWithCanvas(t)?this:(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new bo(this.handler))},t.prototype.processMouseMoveAction=function(t){var e=m(this.handler.container,t.clientX,t.clientY);return z.f(this.mouseDownPoint,e)<o.events.dragThreshold?(this.dragStartPoint=e,this):new ho(e,this.dragStartPoint,this.handler)},t.prototype.processMouseClickAction=function(t){var e=this;if(!this.handler.modules.layout.isActionWithCanvas(t))return this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var n=this.handler.mapState,i=Math.min(n.zoom+1,n.maxZoom),r=m(this.handler.container,t.clientX,t.clientY);xt(n),lt(n,i,{duration:o.zoom.animDuration,zoomPoint:n.keepCenterWhileUserZoomRotate?void 0:r,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else{var a=m(this.handler.container,t.clientX,t.clientY);this.handler.modules.identifier.search("mouseClick",a,!0).then((function(n){var i=e.handler.modules.ruler;i.enabled?i.handleClick(a,n):e.handler.dblClickTimer||(e.handler.dblClickTimer=window.setTimeout((function(){R("click",n,t,a,e.handler.modules),e.handler.dblClickTimer=void 0}),o.events.doubleClickTime))}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new bo(this.handler)},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.modules.map.emit("interactionend",{target:"center"}),new lo("keyPrimary",this.mouseDownPoint,this.handler)):this},t}(),ho=function(){function t(t,e,n){this.mouseMovePoint=t,this.dragStartPoint=e,this.handler=n,this.handler.container.classList.add("mapgl-dragging"),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.update=function(t){var e=this.handler.modules.camera.unproject(this.dragStartPoint),n=this.handler.modules.camera.unproject(this.mouseMovePoint),i=l.b(t.center);l.a(i,i,e),l.s(i,i,n),xt(t),$(t,i,{animate:!1}),this.dragStartPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=m(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){return 0===t.button?this.returnToInitialState():this},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new lo("keyPrimary",this.mouseMovePoint,this.handler)):this},t.prototype.returnToInitialState=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new bo(this.handler)},t}(),po=function(){function t(t,e,n){this.handler=n,this.touchStartPoints=e,this.touchMovePoints=t,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),new _o(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){return t.preventDefault(),this.touchMovePoints=v(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),0===t.touches.length?(this.handler.mapState.userHasInteracted=!0,new bo(this.handler)):new _o(t,this.handler,!1)},t}(),mo=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.startPxAngle=0,r.rotationDetected=!1,n.length>1&&(r.startPxAngle=Object(d.b)(n[0],n[1])),r}return Object(M.c)(e,t),e.prototype.update=function(t){if(!(this.touchStartPoints.length<2||this.touchMovePoints.length<2)){var e=Object(d.e)(this.touchMovePoints[0],this.touchMovePoints[1]),n=z.e(this.touchMovePoints[0],this.touchMovePoints[1])/z.e(this.touchStartPoints[0],this.touchStartPoints[1]),i=t.zoom+Math.log(n)/Math.log(2)*o.zoom.mobilePinchDelta,r=0,s=0;if(!this.rotationDetected){var c=Object(d.b)(this.touchMovePoints[0],this.touchMovePoints[1]);(s=Math.abs(this.startPxAngle-c))>Math.PI&&(s=2*Math.PI-s),s>=this.handler.mapState.touchRotationThreshold&&(this.rotationDetected=!0)}if(this.rotationDetected){var u=this.handler.modules.camera.unproject(this.touchStartPoints[0]),f=this.handler.modules.camera.unproject(this.touchStartPoints[1]),h=this.handler.modules.camera.unproject(this.touchMovePoints[0]),p=this.handler.modules.camera.unproject(this.touchMovePoints[1]);u&&f&&h&&p&&(r=Object(d.b)(u,f)-Object(d.b)(h,p))}var m=t.rotation+r,v=t.center;t.keepCenterWhileUserZoomRotate||l.a(v,t.center,Object(a.h)(t,e,{zoom:i,rotation:m})),xt(t),$(t,v,{animate:!1}),lt(t,i,{animate:!1}),this.handler.mapState.disableRotationByUserInteraction||it(t,m,{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0}},e}(po),vo=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return Object(M.c)(e,t),e.prototype.update=function(t){var e=this.touchStartPoints.map((function(e){return Object(a.k)(t.size,e)})),n=this.touchMovePoints.map((function(e){return Object(a.k)(t.size,e)})),i=Object(d.e)(e[0],e[1]),r=(Object(d.e)(n[0],n[1])[1]-i[1])*o.zoom.mousePitchDelta;xt(t),at(t,Object(a.c)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0},e}(po),_o=function(){function t(t,e,n){this.handler=e,this.needClickOnTouchEnd=n,this.toZoomRotate=!1,this.touchStartPoints=v(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.isTimerStarted=void 0!==this.handler.dblClickTimer,_(t)?this.handler.modules.map.emit("interactionstart",{target:"pitch/zoom/rotation"}):this.isTimerStarted?(this.handler.modules.map.emit("interactionstart",{target:"zoom/rotation"}),window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0):this.handler.modules.map.emit("interactionstart",{target:"center"})}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.processTouchStartAction=function(t){return t.preventDefault(),1===this.touchStartPoints.length&&(this.needClickOnTouchEnd=!1,this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.modules.map.emit("interactionstart",{target:"pitch/zoom/rotation"}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=v(t.touches,this.handler.container),this},t.prototype.processTouchMoveAction=function(t){var e=this;t.preventDefault();var n=v(t.touches,this.handler.container);if(!_(t))return z.f(this.touchStartPoints[0],n[0])<o.events.dragThreshold?(this.touchStartPoints=n,this):this.isTimerStarted?new go(n[0],this.touchStartPoints[0],this.handler):new yo(n[0],this.touchStartPoints[0],this.handler);if(this.touchStartPoints.length<2)return this.processTouchStartAction(t);var i=z.d(),r=z.d();z.p(i,n[0],this.touchStartPoints[0]),z.p(r,n[1],this.touchStartPoints[1]);var a=z.g(i,r);if(a>0){var s=z.f(this.touchStartPoints[0],n[0]),c=z.f(this.touchStartPoints[1],n[1]);return s<o.events.pitchThreshold||c<o.events.pitchThreshold?(this.touchStartPoints=n,this):this.handler.mapState.disablePitchByUserInteraction?this:new vo(n,this.touchStartPoints,this.handler)}return a<0?new mo(n,this.touchStartPoints,this.handler):Object(d.j)(i)||Object(d.j)(r)?this.pitchWaitingTimer?this:this.toZoomRotate?(this.toZoomRotate=!1,new mo(n,this.touchStartPoints,this.handler)):(this.pitchWaitingTimer=window.setTimeout((function(){e.toZoomRotate=!0,e.pitchWaitingTimer=void 0}),o.events.pitchWaitingTime),this):new mo(n,this.touchStartPoints,this.handler)},t.prototype.processTouchEndAction=function(t){return t.cancelable&&t.preventDefault(),0===t.touches.length?1===t.changedTouches.length&&this.needClickOnTouchEnd?this.processTouchClickAction(this.touchStartPoints[0],t):(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:t.changedTouches.length>1?"pitch/zoom/rotation":"center"}),new bo(this.handler)):(_(t)||(this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),this.handler.modules.map.emit("interactionstart",{target:"center"}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=v(t.touches,this.handler.container),this)},t.prototype.processTouchClickAction=function(t,e){var n=this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var i=this.handler.mapState,r=Math.min(i.zoom+1,i.maxZoom),a=i.keepCenterWhileUserZoomRotate?void 0:t;xt(i),lt(i,r,{duration:o.zoom.animDuration,zoomPoint:a,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else if(this.handler.modules.layout.isActionWithCanvas(e))this.handler.modules.identifier.search("mouseClick",t,!0).then((function(i){var r=n.handler.modules.ruler;r.enabled?r.handleClick(t,i):n.handler.dblClickTimer||(n.handler.dblClickTimer=window.setTimeout((function(){R("click",i,e,t,n.handler.modules),n.handler.dblClickTimer=void 0}),o.events.doubleClickTime))}));else{var s=e.changedTouches[0];e.target&&s&&e.target.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,clientX:s.clientX,clientY:s.clientY}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new bo(this.handler)},t}(),yo=function(){function t(t,e,n){this.handler=n,this.touchMovePoint=t,this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.add("mapgl-dragging"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=this.handler.modules.camera.unproject(this.touchStartPoint),n=this.handler.modules.camera.unproject(this.touchMovePoint),i=l.b(t.center);l.a(i,i,e),l.s(i,i,n),xt(t),$(t,i,{animate:!1}),this.touchStartPoint=this.touchMovePoint,t.needRerender=!0},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new _o(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=v(t.touches,this.handler.container);return this.touchMovePoint=e[0],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new bo(this.handler)},t}(),go=function(){function t(t,e,n){this.handler=n,this.mapHeight=n.mapState.size[1],this.startZoom=n.mapState.zoom,this.touchMovePointY=t[1],this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=this.touchMovePointY-this.touchStartPoint[1];if(0!==e){var n=e/this.mapHeight,i=Object(a.c)(this.startZoom+n*o.zoom.mobileTapDelta,t.minZoom,t.maxZoom),r=t.center;t.keepCenterWhileUserZoomRotate||l.a(r,t.center,Object(a.h)(t,this.touchStartPoint,{zoom:i})),xt(t),$(t,r,{animate:!1}),lt(t,i,{animate:!1}),t.needRerender=!0}},t.prototype.processTouchStartAction=function(t){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),new _o(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=v(t.touches,this.handler.container);return this.touchMovePointY=e[0][1],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),this.handler.mapState.userHasInteracted=!0,new bo(this.handler)},t}(),bo=function(){function t(t){this.handler=t}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.processMouseDownAction(t);case"touchstart":return this.processTouchStartAction(t);default:return this}},t.prototype.processMouseDownAction=function(t){var e=m(this.handler.container,t.clientX,t.clientY);switch(t.button){case 0:return t.ctrlKey||t.metaKey?new lo("keyPrimary",e,this.handler):new fo(e,this.handler);case 1:return new lo("auxiliary",e,this.handler);case 2:return new lo("secondary",e,this.handler);default:return this}},t.prototype.processTouchStartAction=function(t){return t.preventDefault(),t.touches?new _o(t,this.handler,1===t.touches.length):this},t}(),wo=function(){function t(){}return t.prototype.processAction=function(){return this},t}(),xo=function(){function t(t,e){var n=this;this.preventDefault=function(t){t.preventDefault()},this.onMouseMove=function(t){n.dblClickTimer&&(n.dblClickTimer=void 0),n.switchState(t)},this.onTouchStart=function(t){n.modules.layout.isActionWithMap(t)&&n.switchState(t)},this.switchState=function(t){n.state,n.state=n.state.processAction(t)},this.state=new bo(this),this.mapState=t,this.modules=e,this.container=e.layout.mapContainer,document.addEventListener("mouseup",this.switchState),document.addEventListener("keydown",this.switchState),document.addEventListener("keyup",this.switchState),document.addEventListener("mouseleave",this.switchState),document.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("click",this.switchState),this.container.addEventListener("mousedown",this.switchState),this.container.addEventListener("mouseout",this.switchState),document.addEventListener("touchstart",this.onTouchStart),document.addEventListener("touchend",this.switchState),document.addEventListener("touchmove",this.switchState),this.container.addEventListener("dragstart",this.preventDefault),this.container.addEventListener("drag",this.preventDefault),this.container.addEventListener("dragend",this.preventDefault),this.container.addEventListener("contextmenu",this.preventDefault)}return t.prototype.destroy=function(){document.removeEventListener("mouseup",this.switchState),document.removeEventListener("keydown",this.switchState),document.removeEventListener("keyup",this.switchState),document.removeEventListener("mouseleave",this.switchState),document.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("click",this.switchState),this.container.removeEventListener("mousedown",this.switchState),this.container.removeEventListener("mouseout",this.switchState),document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchend",this.switchState),document.removeEventListener("touchmove",this.switchState),this.container.removeEventListener("dragstart",this.preventDefault),this.container.removeEventListener("drag",this.preventDefault),this.container.removeEventListener("dragend",this.preventDefault),this.container.removeEventListener("contextmenu",this.preventDefault)},t.prototype.block=function(){return this.state instanceof wo||this.state instanceof bo&&(this.state=new wo,!0)},t.prototype.unblock=function(){return this.state instanceof bo||this.state instanceof wo&&(this.state=new bo(this),!0)},t}(),So=n(85),Io=n(104),jo=n(28),Oo=n(27),Mo=n(45),Po=function(){function t(t,e){this.mapState=t,this.modules=e,this.enabled=!1,this.justEnabled=!1,this.isMetaLoading=!1,this.lastUpdateTime=-1/0,this.regionIds=new Set,this.gridState=Object(jo.a)("traffic",0,o.traffic.minZoom,o.traffic.maxZoom,o.traffic.minZoom,o.traffic.maxDetailLevel,e,t),this.viewportDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}])}return t.prototype.show=function(){this.enabled||(this.enabled=!0,this.justEnabled=!0,this.modules.map.emit("trafficshow"))},t.prototype.hide=function(){this.enabled&&(Object(jo.g)(this.gridState),this.enabled=!1,this.modules.map.emit("traffichide"))},t.prototype.isEnabled=function(){return this.enabled},t.prototype.destroy=function(){Object(jo.g)(this.gridState)},t.prototype.redraw=function(){this.enabled&&(Object(jo.g)(this.gridState),Object(So.a)(this.gridState,this.mapState,this.modules.camera.viewportVertices))},t.prototype.update=function(){if(this.enabled&&(Object(a.f)(this.regionIds,this.mapState.shownRegionIds)||(this.regionIds=new Set(this.mapState.shownRegionIds),this.fetchMeta()),Date.now()-this.lastUpdateTime>o.traffic.updateInterval&&this.fetchMeta(),void 0!==this.timestamp)){(this.viewportDiffer.check(this.mapState)||this.justEnabled)&&(this.justEnabled=!1,Object(So.a)(this.gridState,this.mapState,this.modules.camera.viewportVertices),this.mapState.needRerender=!0);var t=Object(M.a)({},this.gridState.displayedMods);Object(Io.a)(this.gridState,this.mapState,this.modules),this.fetch(Object(jo.d)(this.gridState),this.timestamp),this.abortFetch(Object(jo.c)(this.gridState)),this.generate(Object(jo.e)(this.gridState)),this.clearTiles(Object(jo.f)(this.gridState)),Object(jo.h)(this.modules.tileManager,this.mapState,this.gridState,t)}},t.prototype.isIdle=function(){return Object(jo.j)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.fetch=function(t,e){var n=this;t.sort((function(t,e){return Object(U.a)(n.mapState.center,t,e)})).forEach((function(t){return function(t,e,n,i,r){i.size&&e.workers.parser.fetchTrafficTile({coords:t.coords,tileServer:n.trafficServer,tileProtocol:n.trafficProtocol||n.tileProtocol,regionIds:Array.from(i),timestamp:r}).then((function(){t.status===Oo.a.Loading&&(t.serverMetadata=[{regionId:0,metatileHash:-2}])}))}(t,n.modules,n.mapState,n.regionIds,e)}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.modules.workers.parser.abortTrafficTileRequest(t.key)}))},t.prototype.generate=function(t){var e=this;t.sort((function(t,n){return Object(U.a)(e.mapState.center,t,n)})).forEach((function(t){var n=Object(Oo.g)(t);n&&e.modules.workers.parser.generateTrafficTile({styleId:e.mapState.handyStyleId,coords:t.coords,pixelRatio:window.devicePixelRatio,styleState:e.mapState.styleState,sourceId:e.modules.defaultSource.getId()}).then((function(t){var e=t.results;return Object(Mo.a)(n,e)}))}))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.modules.workers.parser.deleteTrafficTile(i.key),delete this.gridState.tiles[i.key]}},t.prototype.fetchMeta=function(){var t=this;if(!this.isMetaLoading&&this.regionIds.size){this.isMetaLoading=!0;var e=this.mapState,n=Object(j.d)(o.traffic.timestampUrl,{host:e.trafficServer,protocol:e.trafficProtocol||e.tileProtocol,regions:Array.from(this.regionIds).join(",")});fetch(n).then((function(t){if(t.ok)return t.json();throw new Error("Request traffic timestamp error with status "+t.status)})).then((function(e){var n,i;if(!e.length||void 0===(null===(n=e[0])||void 0===n?void 0:n.time)||void 0===(null===(i=e[0])||void 0===i?void 0:i.score))throw new Error("Bad traffic timestamp and score response "+e);var r=0;e.forEach((function(t){return r+=t.score})),r=Math.round(r/e.length),t.modules.map.emit("trafficscore",{score:r}),t.timestamp=e[0].time,t.isMetaLoading=!1,t.lastUpdateTime=Date.now(),t.redraw()})).catch((function(t){return console.error(t)}))}},t}(),Lo=function(){function t(t){this.externalContainer=t,this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.style.height="100%",this.rootContainer.style.width="100%",this.rootContainer.style.overflow="hidden",this.externalContainer.appendChild(this.rootContainer),this.mapContainer=document.createElement("div"),this.mapContainer.style.position="relative",this.mapContainer.style.height="100%",this.mapContainer.style.width="100%",this.mapContainer.style.touchAction="none",this.mapContainer.style.webkitUserSelect="none",this.mapContainer.style.userSelect="none",this.rootContainer.appendChild(this.mapContainer),this.canvas=document.createElement("canvas"),this.mapContainer.appendChild(this.canvas),this.htmlContainerInMap=document.createElement("div"),this.htmlContainerInMap.style.position="absolute",this.htmlContainerInMap.style.left="0",this.htmlContainerInMap.style.top="0",this.htmlContainerInMap.style.width="100%",this.htmlContainerInMap.style.height="0",this.htmlContainerInMap.style.webkitUserSelect="auto",this.htmlContainerInMap.style.userSelect="auto",this.mapContainer.appendChild(this.htmlContainerInMap),this.htmlContainerOutMap=document.createElement("div"),this.htmlContainerOutMap.style.position="absolute",this.htmlContainerOutMap.style.left="0",this.htmlContainerOutMap.style.top="0",this.htmlContainerOutMap.style.width="100%",this.htmlContainerOutMap.style.height="0",this.mapContainer.after(this.htmlContainerOutMap)}return t.prototype.setCanvasSize=function(t,e){var n=window.devicePixelRatio;return this.canvas.width=t*n,this.canvas.height=e*n,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this},t.prototype.destroy=function(){for(;this.externalContainer.lastChild;)this.externalContainer.removeChild(this.externalContainer.lastChild)},t.prototype.isActionWithCanvas=function(t){return t.target===this.canvas},t.prototype.isActionWithMap=function(t){var e=this;return t instanceof MouseEvent||t instanceof KeyboardEvent?this.isTargetInMap(t.target):Array.from(t.touches).map((function(t){return t.target})).some((function(t){return e.isTargetInMap(t)}))},t.prototype.isTargetInMap=function(t){return!!(t&&t instanceof Node)&&this.mapContainer.contains(t)},t}(),To=n(10);function ko(){var t=new To.a(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function zo(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function Co(){var t=new To.a(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}me.b,me.g,me.c,me.l,me.a,me.k,me.d,me.i,me.h,me.m,me.j;var Eo=(me.f,me.e,l.d(),l.j(1,0,0),l.j(0,1,0),Co(),Co(),ko(),function(){function t(){this.children=[],this.parent=null,this.visible=!0,this.scale=l.j(1,1,1),this.position=l.d(),this.quaternion=Co(),this.localMatrix=Li.b(),this.worldMatrix=Li.b(),this.worldMatrixNeedsUpdate=!1,this.type=12}return t.prototype.add=function(t){return t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),this},t.prototype.remove=function(t){var e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1)),this},t.prototype.render=function(){return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),this):this},t.prototype.updateLocalMatrix=function(){return Li.c(this.localMatrix,this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0,this},t.prototype.updateWorldMatrix=function(){return this.parent?Li.g(this.worldMatrix,this.parent.worldMatrix,this.localMatrix):Li.a(this.worldMatrix,this.localMatrix),this.children.forEach((function(t){return t.updateWorldMatrix()})),this.worldMatrixNeedsUpdate=!1,this},t.prototype.getWorldPosition=function(){return l.j(this.worldMatrix[12],this.worldMatrix[13],this.worldMatrix[14])},t.prototype.traverse=function(t){return t(this),this.children.forEach((function(e){return e.traverse(t)})),this},t.prototype.traverseVisible=function(t){return this.visible?(t(this),this.children.forEach((function(e){return e.traverseVisible(t)})),this):this},t.prototype.typifyForRender=function(t){return this.visible?(t[17].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},t}()),Ao=function(t){function e(e){var n=t.call(this)||this;return n.color=e,n}return Object(M.c)(e,t),e}(Eo),Do=(function(t){Object(M.c)((function(e){var n=t.call(this,e)||this;return n.type=3,n}),t)}(Ao),{texture:"USE_TEXTURE",directionLights:"DIR_LIGHT_NUM"}),Fo={},Ro=function(){function t(){this._attributes=[],this._uniforms=[{name:"uColorAlpha",type:"1f"}],this._definitions=[],this._shader=null,this.opacity=1}return t.prototype.enable=function(t){return this._shaderProgram||this._prepare(t),this._shaderProgram.enable(t.gl),this._shaderProgramBind(t),this},t.prototype.disable=function(t){return this._shaderProgram&&this._shaderProgram.disable(t),this},t.prototype.define=function(t,e){return Do[t]&&this._definitions.push({type:Do[t],value:e}),this},t.prototype.typifyForRender=function(t,e){1===this.opacity?t[13].addObject(e):t[14].addObject(e)},t.prototype._getCachedProgramKey=function(){var t=this.constructor.name;return this._definitions.forEach((function(e){t+=":"+e.type+":"+(e.value||"")})),t},t.prototype._getCachedProgram=function(){return Fo[this._getCachedProgramKey()]},t.prototype._prepare=function(t){var e=this._getCachedProgram();e&&t===e.glContext?this._shaderProgram=e.program:(this._shaderProgram=new pi({vertex:new wi("vertex",this._shader.vertex,this._definitions),fragment:new wi("fragment",this._shader.fragment,this._definitions),uniforms:this._uniforms,attributes:this._attributes}),Fo[this._getCachedProgramKey()]={glContext:t,program:this._shaderProgram})},t.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i={};this._attributes.forEach((function(t){i[t.name]=n.geometry.getBuffer(t.name)}));var r={uColorAlpha:this.opacity};this._shaderProgram.bind(e,r,i)},t}(),Bo={fragment:"\nprecision mediump float;\n\nuniform float uColorAlpha;\nvarying vec3 vColor;\n\nvoid main(void) {\n    gl_FragColor = vec4(vColor.rgb, uColorAlpha);\n}\n",vertex:"\nattribute vec3 position;\n\nuniform mat4 uPosition;\nuniform mat4 uCamera;\nuniform vec3 uColor;\nuniform vec3 uEmissive;\n\nvarying vec3 vColor;\n\nvoid main(void) {\n    vColor = uColor;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"},No=(function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uColor",type:"3fv"}],e._shader=Bo,e.color=[0,0,0],e.type=5,e}Object(M.c)(e,t),e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i=t.camera,r={};this._attributes.forEach((function(t){r[t.name]=n.geometry.getBuffer(t.name)}));var o={uColorAlpha:this.opacity,uPosition:new Float32Array(n.worldMatrix),uCamera:new Float32Array(i.modelViewMatrix),uColor:this.color};this._shaderProgram.bind(e,o,r)}}(Ro),function(t){function e(e,n){var i=t.call(this,e,n)||this;return i._array=e,i.length=e.length/i.options.itemSize,i}return Object(M.c)(e,t),e.prototype.getArray=function(){return this._array},e.prototype.getElement=function(t){return this._array.subarray(t*this.options.itemSize,(t+1)*this.options.itemSize)},e.prototype.getTriangle=function(t){return t*=3,[this.getElement(t),this.getElement(t+1),this.getElement(t+2)]},e.prototype.concat=function(t){var e=t.getArray(),n=new this._array.constructor(this._array.length+e.length);return n.set(this._array,0),n.set(e,this._array.length),this._array=n,this.length=n.length/this.options.itemSize,this},e}(Cn.a)),Uo=function(){function t(t,e){this.min=t||l.d(),this.max=e||l.d()}return t.prototype.containsPoint=function(t){return t[0]>this.min[0]&&t[0]<this.max[0]&&t[1]>this.min[1]&&t[1]<this.max[1]&&t[2]>this.min[2]&&t[2]<this.max[2]},t.prototype.expandByPoint=function(t){return l.n(this.min,this.min,t),l.m(this.max,this.max,t),this},t}(),Zo=(function(t){function e(){var e=t.call(this)||this;return e.type=13,e}Object(M.c)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.frontFace(e.CCW),e.cullFace(e.BACK),e.enable(e.CULL_FACE),e.disable(e.BLEND),t.renderer.sortObjects&&this._objects.sort(this._renderOrderSort),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._renderOrderSort=function(t,e){return t.renderOrder-e.renderOrder}}(Ft),{fragment:"\nprecision mediump float;\n\n#ifdef USE_TEXTURE\n    uniform sampler2D uTexture;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\nuniform float uColorAlpha;\nvarying vec3 vLightWeighting;\nvarying vec3 vColor;\nvarying vec3 vEmissive;\n\nvoid main(void) {\n    vec4 color = vec4(vColor.rgb, uColorAlpha);\n\n    #ifdef USE_TEXTURE\n        if (vTextureEnable > 0.5) {\n            vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n            color = vec4(textureColor.rgb * color.rgb, color.a);\n        }\n    #endif\n\n    gl_FragColor = vec4(color.rgb * vLightWeighting + vEmissive, color.a);\n}\n",vertex:"\nattribute vec3 position;\nattribute vec3 color;\nattribute vec3 emissive;\n\n#ifdef USE_TEXTURE\n    attribute vec2 texture;\n    attribute float textureEnable;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\n#if DIR_LIGHT_NUM > 0\n    attribute vec3 normal;\n    uniform vec3 uDirectionLightColors[DIR_LIGHT_NUM];\n    uniform vec3 uDirectionLightPositions[DIR_LIGHT_NUM];\n    uniform mat3 uNormalMatrix;\n#endif\n\nuniform mat4 uPosition;\nuniform vec3 uAmbientLightColor;\nuniform mat4 uCamera;\n\nvarying vec3 vColor;\nvarying vec3 vEmissive;\nvarying vec3 vLightWeighting;\n\nvoid main(void) {\n    vColor = color;\n    vEmissive = emissive;\n\n    #ifdef USE_TEXTURE\n        vTextureCoord = texture;\n        vTextureEnable = textureEnable;\n    #endif\n\n    vec3 vLightTemp = vec3(0.0);\n\n    #if DIR_LIGHT_NUM > 0\n        vec3 transformedNormal = uNormalMatrix * normal;\n\n        for(int i = 0; i < DIR_LIGHT_NUM; i++) {\n            float dotProduct = dot(transformedNormal, uDirectionLightPositions[i]);\n            vec3 directionalLightWeighting = vec3(max(dotProduct, 0.0));\n            vLightTemp += uDirectionLightColors[i] * directionalLightWeighting;\n        }\n    #endif\n\n    vLightWeighting = uAmbientLightColor + vLightTemp;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"}),Ho=(function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"},{name:"color"},{name:"emissive"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uAmbientLightColor",type:"3fv"}],e._shader=Zo,e._texture=null,e.type=6,e}Object(M.c)(e,t),e.prototype.setTexture=function(t){return this._texture=t,this},e.prototype.getTexture=function(){return this._texture},e.prototype._prepare=function(e){this._enableLight(e),this._texture&&this._enableTexture(),t.prototype._prepare.call(this,e)},e.prototype._enableLight=function(t){var e=t.scene,n=0;e.getLights().forEach((function(t){4===t.type&&n++})),this.define("directionLights",n),n>0&&(this._attributes.push({name:"normal"}),this._uniforms.push({name:"uDirectionLightColors",type:"3fv"},{name:"uDirectionLightPositions",type:"3fv"},{name:"uNormalMatrix",type:"mat3"}))},e.prototype._enableTexture=function(){this.define("texture"),this._attributes.push({name:"texture"},{name:"textureEnable"}),this._uniforms.push({name:"uTexture",type:"1i"})},e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.scene,i=t.camera,r=t.object,o={},a={};this._texture&&(this._texture.enable(e,0),o.uTexture=0);var s,c,u,d,f,h,p,m,v,_,y,g,b,w,x,S=n.getLights();if(S.length){var I=[],j=[];if(S.forEach((function(t){if(3===t.type)o.uAmbientLightColor=t.color;else if(4===t.type){I=I.concat(t.color);var e=l.d();l.p(e,t.position,-1),j=j.concat(Array.prototype.slice.call(e))}})),I.length&&j.length){var O=ko();zo(O,r.worldMatrix),s=O,u=(c=O)[0],d=c[1],f=c[2],h=c[3],p=c[4],m=c[5],v=c[6],_=c[7],(x=u*(g=(y=c[8])*p-m*_)+d*(b=-y*h+m*v)+f*(w=_*h-p*v))&&(x=1/x,s[0]=g*x,s[1]=(-y*d+f*_)*x,s[2]=(m*d-f*p)*x,s[3]=b*x,s[4]=(y*u-f*v)*x,s[5]=(-m*u+f*h)*x,s[6]=w*x,s[7]=(-_*u+d*v)*x,s[8]=(p*u-d*h)*x),function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(O,O),o.uNormalMatrix=new Float32Array(O),a.normal=r.geometry.getBuffer("normal")}o.uDirectionLightColors=new Float32Array(I),o.uDirectionLightPositions=new Float32Array(j)}this._attributes.forEach((function(t){"normal"!==t.name&&(a[t.name]=r.geometry.getBuffer(t.name))})),o.uPosition=new Float32Array(r.worldMatrix),o.uCamera=new Float32Array(i.modelViewMatrix),o.uColorAlpha=this.opacity,this._shaderProgram.bind(e,o,a)}}(Ro),function(t){Object(M.c)((function(e){var n=t.call(this,e)||this;return n.type=4,n}),t)}(Ao),function(){function t(t,e){this.normal=t||l.d(),this.constant=e||0}return t.prototype.distanceToPoint=function(t){return l.g(this.normal,t)+this.constant},t.prototype.setComponents=function(t,e,n,i){return l.r(this.normal,t,e,n),this.constant=i,this},t.prototype.normalize=function(){var t=1/l.k(this.normal);return l.p(this.normal,this.normal,t),this.constant*=t,this},t}()),Go=(function(){function t(t){this.planes=t,this.planes&&6===this.planes.length||(this.planes=[new Ho,new Ho,new Ho,new Ho,new Ho,new Ho]),this._v1=l.d(),this._v2=l.d()}t.prototype.setFromMatrix=function(t){var e=this.planes;return e[0].setComponents(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]).normalize(),e[1].setComponents(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]).normalize(),e[2].setComponents(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]).normalize(),e[3].setComponents(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]).normalize(),e[4].setComponents(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14]).normalize(),e[5].setComponents(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]).normalize(),this},t.prototype.intersectsBox=function(t){for(var e=this._v1,n=this._v2,i=this.planes,r=t.min,o=t.max,a=0;a<6;a++){var s=i[a],c=s.normal;e[0]=c[0]>0?r[0]:o[0],n[0]=c[0]>0?o[0]:r[0],e[1]=c[1]>0?r[1]:o[1],n[1]=c[1]>0?o[1]:r[1],e[2]=c[2]>0?r[2]:o[2],n[2]=c[2]>0?o[2]:r[2];var l=s.distanceToPoint(e),u=s.distanceToPoint(n);if(l<0&&u<0)return!1}return!0}}(),function(){function t(){this.buffers={},this._boundingBox=null}return t.prototype.setBuffer=function(t,e){return this.buffers[t]=e,this},t.prototype.getBuffer=function(t){return this.buffers[t]},t.prototype.computeNormals=function(){var t=this.buffers.position;if(!t)return this;for(var e=new Float32Array(t.length*t.options.itemSize),n=l.d(),i=l.d(),r=l.d(),o=0;o<t.length;o+=3){var a=t.getTriangle(o/3);l.s(n,a[0],a[1]),l.s(i,a[2],a[1]),l.e(r,n,i),l.o(r,r),e.set(r,3*o),e.set(r,3*(o+1)),e.set(r,3*(o+2))}return this.setBuffer("normal",new No(e,{itemSize:3})),this},t.prototype.getBoundingBox=function(){return this._boundingBox||this.computeBoundingBox(),this._boundingBox},t.prototype.computeBoundingBox=function(){var t=this._boundingBox=new Uo,e=this.buffers.position;if(e)for(var n=0;n<e.length;n++)t.expandByPoint(e.getElement(n))},t.prototype.concat=function(t){for(var e in this.buffers)this.buffers[e].concat(t.buffers[e])},t}());!function(t){function e(e,n){var i=t.call(this)||this;return i.geometry=e,i.material=n,i.renderOrder=0,i.type=9,i}Object(M.c)(e,t),e.prototype.render=function(t){var e=t.gl;return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),t.object=this,this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this.geometry.getBuffer("position").length),this.material.disable(e),this):this},e.prototype.typifyForRender=function(t){return this.visible?(this.material.typifyForRender(t,this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(Eo),function(){function t(t,e){this.start=t||l.d(),this.end=e||l.d()}t.prototype.closestPointToPointParameter=function(t,e){var n=l.d(),i=l.d();l.s(n,t,this.start),l.s(i,this.end,this.start);var r,o=l.g(i,i),a=l.g(i,n)/o;return e&&(a=(r=a)<0?0:r>1?1:r),a},t.prototype.closestPointToPoint=function(t,e,n){var i=this.closestPointToPointParameter(t,e),r=n||l.d();return r=this.delta(r),l.p(r,r,i),l.a(r,r,this.start),r},t.prototype.delta=function(t){var e=t||l.d();return l.s(e,this.end,this.start),e}}(),function(t){function e(e,n){var i=t.call(this)||this;return i.material=n,i.type=11,i._initArrays(e),i._initGeometry(),i}Object(M.c)(e,t),e.prototype.setOpacity=function(t,e){var n=this._data.colorAlpha.array,i=6*t;return n[i]=e,n[i+1]=e,n[i+2]=e,n[i+3]=e,n[i+4]=e,n[i+5]=e,this._data.colorAlpha.dirty=!0,this},e.prototype.setPosition=function(t,e){var n=this._data.position.array,i=18*t;return n[i]=e[0],n[i+1]=e[1],n[i+3]=e[0],n[i+4]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+9]=e[0],n[i+10]=e[1],n[i+12]=e[0],n[i+13]=e[1],n[i+15]=e[0],n[i+16]=e[1],this._data.position.dirty=!0,this},e.prototype.setElevation=function(t,e){var n=this._data.position.array,i=18*t;return n[i+2]=e,n[i+5]=e,n[i+8]=e,n[i+11]=e,n[i+14]=e,n[i+17]=e,this._data.position.dirty=!0,this},e.prototype.setSize=function(t,e){var n=this._data.scale.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.scale.dirty=!0,this},e.prototype.setOffset=function(t,e){var n=this._data.offset.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.offset.dirty=!0,this},e.prototype.setUV=function(t,e){var n=this._data.texture.array,i=12*t;return n[i]=e[2],n[i+1]=1-e[3],n[i+2]=e[2],n[i+3]=1-e[1],n[i+4]=e[0],n[i+5]=1-e[3],n[i+6]=e[0],n[i+7]=1-e[1],n[i+8]=e[0],n[i+9]=1-e[3],n[i+10]=e[2],n[i+11]=1-e[1],this._data.texture.dirty=!0,this},e.prototype.render=function(t){var e=t.gl,n=t.shaderProgram,i=this._geometry;for(var r in n.bind(e,null,{texture:i.getBuffer("texture"),position:i.getBuffer("position"),colorAlpha:i.getBuffer("colorAlpha"),scale:i.getBuffer("scale"),offset:i.getBuffer("offset"),disposition:i.getBuffer("disposition")}),this._data)this._data[r].dirty&&(this._geometry.getBuffer(r).subData(e,0,this._data[r].array),this._data[r].dirty=!1);return this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this._geometry.getBuffer("disposition").length),this.material.disable(),this},e.prototype.typifyForRender=function(t){return this.visible&&this.material.getTexture()?(t[16].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},e.prototype._initArrays=function(t){var e=t.length,n=[.5,-.5,0,.5,.5,0,-.5,-.5,0,-.5,.5,0,-.5,-.5,0,.5,.5,0],i=new Float32Array(18*e),r=new Float32Array(12*e),o=new Float32Array(18*e),a=new Float32Array(12*e),s=new Float32Array(12*e),c=new Float32Array(6*e);this._data={disposition:{array:i,dirty:!1},texture:{array:r,dirty:!1},position:{array:o,dirty:!1},scale:{array:a,dirty:!1},offset:{array:s,dirty:!1},colorAlpha:{array:c,dirty:!1}};for(var l=0;l<e;l++){var u=t[l];i.set(n,18*l),this.setUV(l,u.uv||[0,0,1,1]),this.setSize(l,u.size||[0,0]),this.setOffset(l,u.offset||[0,0]),this.setOpacity(l,void 0!==u.opacity?u.opacity:1),this.setPosition(l,u.position),this.setElevation(l,u.elevation||0)}},e.prototype._initGeometry=function(){this._geometry=new Go;var t=new No(this._data.texture.array,{itemSize:2});t.drawType=No.DynamicDraw;var e=new No(this._data.position.array,{itemSize:3});e.drawType=No.DynamicDraw;var n=new No(this._data.scale.array,{itemSize:2});n.drawType=No.DynamicDraw;var i=new No(this._data.offset.array,{itemSize:2});i.drawType=No.DynamicDraw;var r=new No(this._data.colorAlpha.array,{itemSize:1});r.drawType=No.DynamicDraw;var o=new No(this._data.disposition.array,{itemSize:3});this._geometry.setBuffer("disposition",o).setBuffer("texture",t).setBuffer("position",e).setBuffer("scale",n).setBuffer("offset",i).setBuffer("colorAlpha",r)}}(Eo),function(){function t(){this.smoothing=1,this._texture=null,this.type=8}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl;t.shaderProgram.bind(e,{uSmoothing:this.smoothing}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._shaderProgram=new pi({vertex:new wi("vertex","\nattribute vec2 disposition;\nattribute vec2 texture;\n\nattribute vec3 position;\nattribute vec2 scale;\nattribute vec2 offset;\nattribute float colorAlpha;\n\nuniform float uSmoothing;\nuniform mat4 uPCamera;\nuniform vec2 uHalfSize;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main(void) {\n    vTextureCoord = texture;\n    vColorAlpha = colorAlpha;\n\n    vec2 alignedPosition = disposition * scale;\n    alignedPosition += offset;\n    alignedPosition /= uHalfSize;\n\n    vec4 ndcPosition = uPCamera * vec4(position, 1.0);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += alignedPosition.xy;\n\n    vec2 roundedPosition = floor((ndcPosition.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 roundingDelta = roundedPosition - ndcPosition.xy;\n\n    if (vColorAlpha == 0.0) {\n        ndcPosition.xy = vec2(-2.0, -2.0);\n    } else {\n        ndcPosition.xy = ndcPosition.xy + roundingDelta * uSmoothing;\n    }\n\n    gl_Position = ndcPosition;\n}\n"),fragment:new wi("fragment","\nprecision mediump float;\n\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * vColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uHalfSize",type:"2f"},{name:"uTexture",type:"1i"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"disposition"},{name:"texture"},{name:"position"},{name:"colorAlpha"},{name:"scale"},{name:"offset"}]}),e.type=16,e}Object(M.c)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera,i=t.renderer.getSize();return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uHalfSize:[i[0]/2,i[1]/2],uTexture:0}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(Ft);var Wo=function(t){function e(){var e=t.call(this)||this;return e.up=l.j(0,1,0),e.projectionMatrix=Li.b(),e.modelViewMatrix=Li.b(),e.worldInverseMatrix=Li.b(),e._mat3=ko(),e._mat4a=Li.b(),e._mat4b=Li.b(),e}return Object(M.c)(e,t),e.prototype.updateProjectionMatrix=function(){},e.prototype.updateWorldMatrix=function(){t.prototype.updateWorldMatrix.call(this),Li.e(this.worldInverseMatrix,this.worldMatrix),Li.h(this.modelViewMatrix,this.projectionMatrix,this.worldInverseMatrix)},e.prototype.project=function(t){var e=l.d();return l.u(e,t,this.modelViewMatrix),e},e.prototype.unproject=function(t){var e=this._mat4a,n=this._mat4b,i=l.d();return Li.e(n,this.projectionMatrix),Li.g(e,this.worldMatrix,n),l.u(i,t,e),i},e.prototype.lookAt=function(t){var e=this._mat4a,n=this._mat3;return Li.f(e,this.position,t,this.up),Li.m(e,e),zo(n,e),function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}}(this.quaternion,n),this},e}(Eo),Vo=(function(t){function e(e,n,i,r,o,a){var s=t.call(this)||this;return s.left=e,s.right=n,s.top=i,s.bottom=r,s.near=o,s.far=a,s.type=1,s}Object(M.c)(e,t),e.prototype.updateProjectionMatrix=function(){Li.i(this.projectionMatrix,this.left,this.right,this.bottom,this.top,this.near,this.far)}}(Wo),function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.fov=e,o.aspect=n,o.near=i,o.far=r,o.type=2,o}Object(M.c)(e,t),e.prototype.updateProjectionMatrix=function(){Li.j(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far)}}(Wo),function(t){function e(){var e=t.call(this)||this;return e._lights=[],e}Object(M.c)(e,t),e.prototype.addLight=function(t){return this._lights.push(t),this},e.prototype.getLights=function(){return this._lights}}(Eo),function(t){function e(e){var n=t.call(this)||this;return n.material=e,n.offset=z.d(),n.type=10,n}Object(M.c)(e,t),e.prototype.render=function(t){if(!this.visible||!this.material.getTexture())return this;this.worldMatrixNeedsUpdate&&this.updateWorldMatrix();var e=t.gl;return t.object=this,this.material.enable(t),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),this.material.disable(t.gl),this},e.prototype.typifyForRender=function(t){return this.visible?(t[15].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(Eo),function(){function t(){this.opacity=1,this.smoothing=0,this._texture=null,this.type=7}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl,n=t.object,i=t.shaderProgram,r=t.renderer.getSize();i.bind(e,{uColorAlpha:this.opacity,uSmoothing:this.smoothing,uHalfSize:[r[0]/2,r[1]/2],uOffset:n.offset,uScale:n.scale,uPosition:[n.worldMatrix[12],n.worldMatrix[13],n.worldMatrix[14]]}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._geometry=new Go,e._geometry.setBuffer("position",new No(new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]))).setBuffer("texture",new No(new Float32Array([0,0,1,0,1,1,0,1]),{itemSize:2})).setBuffer("index",new No(new Uint16Array([1,2,0,3,0,2]),{itemSize:1})),e._geometry.getBuffer("index").type=No.ElementArrayBuffer,e._shaderProgram=new pi({vertex:new wi("vertex","\nattribute vec2 position;\nattribute vec2 texture;\n\nuniform vec3 uPosition;\nuniform mat4 uPCamera;\nuniform vec2 uScale;\nuniform vec2 uHalfSize;\nuniform vec2 uOffset;\nuniform float uSmoothing;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vTextureCoord = texture;\n\n    vec2 alignedPosition = position * uScale;\n    alignedPosition += uOffset;\n    alignedPosition /= uHalfSize;\n\n    vec4 ndcPosition = uPCamera * vec4(uPosition, 1.0);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += alignedPosition.xy;\n\n    vec2 roundedPosition = floor((ndcPosition.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 roundingDelta = roundedPosition - ndcPosition.xy;\n\n    ndcPosition.xy = ndcPosition.xy + roundingDelta * uSmoothing;\n\n    gl_Position = ndcPosition;\n}\n"),fragment:new wi("fragment","\nprecision mediump float;\n\nuniform float uColorAlpha;\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * uColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uPosition",type:"3f"},{name:"uColorAlpha",type:"1f"},{name:"uScale",type:"2f"},{name:"uTexture",type:"1i"},{name:"uHalfSize",type:"2f"},{name:"uOffset",type:"2f"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"position"},{name:"texture"},{name:"index",index:!0}]}),e.type=15,e}Object(M.c)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera;return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uTexture:0},{position:this._geometry.getBuffer("position"),texture:this._geometry.getBuffer("texture"),index:this._geometry.getBuffer("index")}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(Ft),function(){function t(t,e){this.origin=t||l.d(),this.direction=e||l.d()}return t.prototype.clone=function(){return new t(l.b(this.origin),l.b(this.direction))},t.prototype.at=function(t){var e=l.d();return l.q(e,this.origin,this.direction,t),e},t.prototype.intersectBox=function(t){var e,n,i,r,o,a,s=1/this.direction[0],c=1/this.direction[1],l=1/this.direction[2],u=this.origin;return s>=0?(e=(t.min[0]-u[0])*s,n=(t.max[0]-u[0])*s):(e=(t.max[0]-u[0])*s,n=(t.min[0]-u[0])*s),c>=0?(i=(t.min[1]-u[1])*c,r=(t.max[1]-u[1])*c):(i=(t.max[1]-u[1])*c,r=(t.min[1]-u[1])*c),e>r||i>n?null:((i>e||e!=e)&&(e=i),(r<n||n!=n)&&(n=r),l>=0?(o=(t.min[2]-u[2])*l,a=(t.max[2]-u[2])*l):(o=(t.max[2]-u[2])*l,a=(t.min[2]-u[2])*l),e>a||o>n?null:((o>e||e!=e)&&(e=o),(a<n||n!=n)&&(n=a),n<0?null:this.at(e>=0?e:n)))},t.prototype.applyMatrix4=function(t){return l.a(this.direction,this.direction,this.origin),l.u(this.direction,this.direction,t),l.u(this.origin,this.origin,t),l.s(this.direction,this.direction,this.origin),l.o(this.direction,this.direction),this},t.prototype.intersectTriangle=function(t,e){var n=l.d(),i=l.d(),r=l.d();l.s(n,t[1],t[0]),l.s(i,t[2],t[0]),l.e(r,n,i);var o,a=l.g(this.direction,r);if(a>0){if(e)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}var s=l.d();l.s(s,this.origin,t[0]);var c=l.d();l.e(c,s,i);var u=o*l.g(this.direction,c);if(u<0)return null;var d=l.d();l.e(d,n,s);var f=o*l.g(this.direction,d);if(f<0)return null;if(u+f>a)return null;var h=-o*l.g(s,r);return h<0?null:this.at(h/a)},t.prototype.distanceToPlane=function(t){var e=l.g(t.normal,this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(l.g(this.origin,t.normal)+t.constant)/e;return n>=0?n:null},t.prototype.intersectPlane=function(t){var e=this.distanceToPlane(t);return null===e?null:this.at(e)},t}()),qo=(function(){function t(t,e,n,i){var r;this.precision=1e-4,this.ray=new Vo(t,e),this.near=n||0,this.far=i||1/0,this.intersectMethodsByType=((r={})[9]="intersectMesh",r),this._vec3=l.d(),this._mat3=ko()}t.prototype.setFromCamera=function(t,e){if(2===e.type){l.c(this.ray.origin,e.position);var n=l.r(this._vec3,t[0],t[1],.5);n=e.unproject(n),l.s(n,n,e.position),l.o(n,n),this.ray.direction=n}else if(1===e.type){var i=l.r(this._vec3,t[0],t[1],-1);this.ray.origin=e.unproject(i),l.r(this.ray.direction,0,0,-1),zo(this._mat3,e.worldMatrix),l.t(this.ray.direction,this.ray.direction,this._mat3),l.o(this.ray.direction,this.ray.direction)}},t.prototype.intersectObject=function(t,e,n){n=n||[];var i=this.intersectMethodsByType[t.type];return i&&this[i]?this[i](t,e,n):e&&this.intersectObjects(t.children,e,n),n.sort(this._descSort),n},t.prototype.intersectObjects=function(t,e,n){var i=this;return n=n||[],t.forEach((function(t){return i.intersectObject(t,e,n)})),n},t.prototype.intersectMesh=function(t,e,n){n=n||[];var i=Li.b();Li.e(i,t.worldMatrix);var r=this.ray.clone();r.applyMatrix4(i);var o=t.geometry.getBoundingBox();if(!r.intersectBox(o))return t;for(var a=t.geometry.buffers.position,s=0;s<a.length;s+=3){var c=a.getTriangle(s/3),u=r.intersectTriangle(c,!1);if(u){l.u(u,u,t.worldMatrix);var d=l.f(this.ray.origin,u);d<this.precision||d<this.near||d>this.far||n.push({distance:d,point:u,object:t})}}return e&&this.intersectObjects(t.children,e,n),n},t.prototype._descSort=function(t,e){return t.distance-e.distance}}(),function(t){function e(){var e=t.call(this)||this;return e.type=14,e}Object(M.c)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),t.renderer.sortObjects&&this._sortObjects(t),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._sortObjects=function(t){var e=t.camera,n=this._reversePainterSortStable.bind(this,e);this._objects.sort(n)},e.prototype._reversePainterSortStable=function(t,e,n){if(e.renderOrder!==n.renderOrder)return e.renderOrder-n.renderOrder;var i=t.project(e.getWorldPosition())[2];return t.project(n.getWorldPosition())[2]-i}}(Ft),function(){function t(t,e){this.state=t,this.modules=e,this.textureKeys=[],this.texturesMap=new Map}return t.prototype.addTexture=function(t,e){return Object(M.b)(this,void 0,Promise,(function(){var n;return Object(M.d)(this,(function(i){switch(i.label){case 0:return[4,g(t)];case 1:return n=i.sent(),[4,this.storeTexture(n,e)];case 2:return[2,i.sent()]}}))}))},t.prototype.addPreparedTexture=function(t){var e="prepared-"+T();return this.textureKeys.push(e),this.texturesMap.set(e,t),this.textureKeys.length-1},t.prototype.updatePreparedTexture=function(t,e){this.deleteTexture(t),this.texturesMap.set(this.textureKeys[t],e)},t.prototype.loadTexture=function(t,e){return Object(M.b)(this,void 0,Promise,(function(){var n;return Object(M.d)(this,(function(i){switch(i.label){case 0:return[4,this.loadImage(t)];case 1:return(n=i.sent())?[4,this.storeTexture(n,e)]:[2];case 2:return[2,i.sent()]}}))}))},t.prototype.getTexture=function(t){return this.texturesMap.get(this.textureKeys[t])},t.prototype.destroy=function(){this.textureKeys=[],this.texturesMap.clear()},t.prototype.deleteTexture=function(t){var e,n=this.textureKeys[t];return null===(e=this.texturesMap.get(n))||void 0===e||e.remove(),this.texturesMap.delete(n)},t.prototype.storeTexture=function(t,e){var n,i;return Object(M.b)(this,void 0,void 0,(function(){var r,a,s,c,l,u,d,f,h,p,m;return Object(M.d)(this,(function(v){if(r=null==e?void 0:e.size,a=null!==(n=null==e?void 0:e.pixelRatio)&&void 0!==n?n:window.devicePixelRatio,s=null!==(i=null==e?void 0:e.imagePadding)&&void 0!==i?i:1,c=t.getAttribute("src")||t.currentSrc,l=function(t,e){return t+(void 0!==e?"_"+e[0]+","+e[1]:"")}(c,r),(u=this.textureKeys.indexOf(l))>-1&&this.texturesMap.has(l))return[2,u];if(d=this.modules.renderer.getRenderingContext(),f=(r||[t.width,t.height]).map((function(t){return t*a})),h=b(t,f),(p=f.map((function(t){return t+2*s})))[0]>o.atlasSize[0]||p[1]>o.atlasSize[1])throw new Error("Image texture dimensions "+p+" are larger than the maximum possible "+o.atlasSize);return(m=new Ut(void 0,{size:p,flipY:!1,magFilter:Ut.LinearFilter,minFilter:Ut.LinearFilter}).prepare(d)).subImage(d,h,s,s),this.texturesMap.set(l,m),this.textureKeys.push(l),this.state.needRerender=!0,[2,this.textureKeys.length-1]}))}))},t.prototype.loadImage=function(t){return Object(M.b)(this,void 0,Promise,(function(){return Object(M.d)(this,(function(e){return[2,new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){return e(n)},n.onerror=function(){return e(void 0)}}))]}))}))},t}()),Yo=n(55),Xo=n(58),Ko=function(t){var e=this;this.getKeyInfo=function(){return Object(M.b)(e,void 0,Promise,(function(){return Object(M.d)(this,(function(t){switch(t.label){case 0:return[4,this.request];case 1:return[2,t.sent()]}}))}))};var n=t.tileKey;if(n===o.tiles.tileKey||Xo.a)this.request=Promise.resolve({showCommPoi:!1,showSberLogo:!1});else{var i=Object(j.c)(Yo.d,{keyID:n});this.request=fetch(i).then((function(t){if(t.ok)return t.json()}),(function(){console.error("Could not load tile key info. A style layers with commercial POI will be added to applied styles.")})).then((function(t){if(!t||!t.result||200!==t.meta.code)return{showCommPoi:!0,showSberLogo:!1};var e=t.result.service.properties.payload,n=e.showCommPoi,i=e.showSberLogo;return{showCommPoi:null==n||n,showSberLogo:null!=i&&i}}))}},Jo=function(){function t(){this.sources=[]}return t.prototype.addSource=function(t){this.sources.push(t)},t.prototype.removeSource=function(t){this.sources=this.sources.filter((function(e){return e.getId()!==t}))},t.prototype.getSourceById=function(t){return this.sources.find((function(e){return e.getId()===t}))},t}(),Qo=n(61),$o=n(92),ta=n(77),ea=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.type="default",this.id=Object(ta.a)(),this.zenithSource=new cr.a(this.id,this.modules,{tileServer:t.tileServer,tileSet:t.tileSet,tileProtocol:t.tileProtocol,tileKey:t.tileKey,subdomains:t.subdomains,appId:t.appId,defaultLang:t.tileServerDefaultLang,sessionId:t.sessionId}),this.universeTileLayer=new Qo.a(0,o.tiles.maxUniverseZoom,0,o.tiles.maxUniverseZoom,this.modules,t,this.zenithSource),this.universeTileLayer.getDisplayedLabelsKeys=function(){return n.regionalTileLayer.isBlank()?Qo.a.prototype.getDisplayedLabelsKeys.call(n.universeTileLayer):[]},this.modules.tileManager.addTileLayer(this.universeTileLayer),this.regionalTileLayer=new Qo.a(o.tiles.maxUniverseZoom+1,o.tiles.maxRegionalZoom,o.tiles.maxUniverseZoom+1,o.tiles.maxDetailLevel,this.modules,t,this.zenithSource),this.modules.tileManager.addTileLayer(this.regionalTileLayer),this.commercialPoiSource=new $o.a(this.id,this.modules,{url:t.tileProtocol+"://"+t.tileServer+"/v2/ald?ts=com_poi_web&x={x}&y={y}&z={z}&lang="+t.lang,flipY:!0,identifyAsDefaultSource:!0}),this.commercialPoiTileLayer=new Qo.a(o.commercialPoi.minZoom,o.commercialPoi.maxZoom,o.commercialPoi.minZoom,_e.a,this.modules,t,this.commercialPoiSource),this.modules.tileManager.addTileLayer(this.commercialPoiTileLayer),this.modules.sourceStorage.addSource(this)}return t.prototype.destroy=function(){var t,e;this.modules.tileManager.removeTileLayer(this.universeTileLayer),this.universeTileLayer.destroy(),this.modules.tileManager.removeTileLayer(this.regionalTileLayer),this.regionalTileLayer.destroy(),this.zenithSource.destroy(),this.commercialPoiTileLayer&&(this.modules.tileManager.removeTileLayer(this.commercialPoiTileLayer),this.commercialPoiTileLayer.destroy()),null===(t=this.commercialPoiSource)||void 0===t||t.destroy(),this.hillshadeTileLayer&&(this.modules.tileManager.removeTileLayer(this.hillshadeTileLayer),this.hillshadeTileLayer.destroy()),null===(e=this.hillshadeTileLayer)||void 0===e||e.destroy(),this.modules.sourceStorage.removeSource(this.id)},t.prototype.setAttributes=function(t){var e,n,i,r;this.zenithSource.setAttributes(t),this.universeTileLayer.redraw(),this.regionalTileLayer.redraw(),null===(e=this.hillshadeSource)||void 0===e||e.setAttributes(t),null===(n=this.hillshadeTileLayer)||void 0===n||n.redraw(),null===(i=this.commercialPoiSource)||void 0===i||i.setAttributes(t),null===(r=this.commercialPoiTileLayer)||void 0===r||r.redraw()},t.prototype.getAttributes=function(){return this.zenithSource.getAttributes()},t.prototype.getId=function(){return this.id},t.prototype.setHoverId=function(t){this.regionalTileLayer.setHoverId(t)},t.prototype.resetHoverId=function(){this.regionalTileLayer.resetHoverId()},t.prototype.enableHillshade=function(t){var e,n,i,r={url:null!==(e=t.url)&&void 0!==e?e:this.state.tileProtocol+"://"+this.state.tileServer+"/v2/ald?ts=hillshade&x={x}&y={y}&z={z}",minZoom:null!==(n=t.minZoom)&&void 0!==n?n:o.hillshade.minZoom,maxZoom:null!==(i=t.maxZoom)&&void 0!==i?i:o.hillshade.maxZoom};this.hillshadeSource=new $o.a(this.id,this.modules,{url:r.url,hillshadeEncoded:!0}),this.hillshadeTileLayer=new Qo.a(r.minZoom,r.maxZoom,r.minZoom,_e.a,this.modules,this.state,this.hillshadeSource),this.modules.tileManager.addTileLayer(this.hillshadeTileLayer)},t}(),na=function(){function t(t,e,n){this.map=n,this.camera=new c.a(t),this.layout=new Lo(e),this.collector=new Dt.a("main"),this.workers=new Ar,this.styleManager=new yr(this),this.assetManager=new br(t,this),this.imageManager=new qo(t,this),this.floorManager=new Xr(t,this),this.personalPoiManager=new Mr(this),this.buildingHeightAnimator=new At(t,this),this.renderer=new er(t,this),this.layers=new Br(t),this.sourceStorage=new Jo,this.tileManager=new $r(t,this),this.modelManager=new jr(t,this),this.dynamicStyle=new Z.b,this.imageCache=new Hr(this),this.identifier=new ir(t,this),this.labeler=new eo(t,this),this.ruler=new co(t,this),this.trafficTileLayer=new Po(t,this),this.handler=new xo(t,this),this.mouseMoveHandler=new Ct(this),this.tileKeyInfo=new Ko(t),this.defaultSource=new ea(t,this)}return t.prototype.destroy=function(){this.imageManager.destroy(),this.trafficTileLayer.destroy(),this.tileManager.destroy(),this.workers.destroy(),this.renderer.destroy(),this.handler.destroy(),this.mouseMoveHandler.destroy(),this.ruler.destroy(),this.layout.destroy()},t}(),ia=function(){function t(e,n,i){var r,c=this;void 0===n&&(n={}),this.renderLoop=function(){c.requestedFrame=requestAnimationFrame(c.renderLoop),c.modules.map.emit("framestart");var t=c.state;if(t.time=Date.now(),t.collectStats&&(t.stats.drawCount=0,t.stats.vertexCount=0,t.stats.tileCount=0),c.modules.mouseMoveHandler.update(),c.handlers.forEach((function(t){return t.update()})),dt(t),et(t),ot(t),ct(t),c.stillnessUpdater.update(t),J(t,c.modules.layout.rootContainer),function(t,e,n){q.e("viewport",{step:function(t,i){t.viewport={top:i[0],right:i[1],bottom:i[2],left:i[3]},Y(t,e,n)}},t)}(t,c.modules.layout.rootContainer,c.modules.renderer),function(t,e){q.e("padding",{step:function(t,n){t.padding={top:n[0],right:n[1],bottom:n[2],left:n[3]},X(t,e)}},t)}(t,c.modules.renderer),c.modules.buildingHeightAnimator.update(),c.modules.camera.update(),c.modules.trafficTileLayer.update(),c.modules.layers.getLayers().forEach((function(t){void 0!==t.update&&t.update()})),c.modules.tileManager.update(),c.modules.floorManager.update(),c.modules.personalPoiManager.update(),c.modules.ruler.update(),c.modules.dynamicStyle.update(),c.modules.map.emit("update"),c.modules.labeler.update(),c.performanceChecker.update(),c.modules.identifier.update(),o.render.alwaysRerender||t.needRerender){var e=c.modules.tileManager.getTileObjects();c.modules.renderer.renderTileObjects(e),t.needRerender=!1,t.collectStats&&c.modules.map.emit("stats",t.stats)}c.modules.map.update(),c.modules.map.emit("frameend")},this.onWindowUnload=function(){var t=c.performanceChecker.getEarlyFps();void 0!==t&&bt({eventAction:"FPS",eventLabel:"Early",eventValue:t})};var l=Object(M.a)(Object(M.a)({},t.options),n),d=Object(M.a)(Object(M.a)({},t.options.padding),l.padding),f=Object(M.a)(Object(M.a)({},t.options.viewport),l.viewport),h=l.maxBounds?u.g(l.maxBounds):s.n,p=Object(s.l)(l.center);u.b(p,h,p);var m,v,_,y,g,b=this.state={time:Date.now(),center:p,zoom:void 0!==l.styleZoom?Object(s.e)(l.styleZoom,p):l.zoom,styleZoom:void 0!==l.styleZoom?l.styleZoom:Object(s.d)(l.zoom,p),zoomTypePreserving:void 0!==l.styleZoom?"styleZoom":"zoom",minZoom:l.minZoom,maxZoom:l.maxZoom,maxBounds:h,rotation:Object(a.e)(l.rotation),touchRotationThreshold:Object(a.e)(l.touchRotationThreshold),pitch:Object(a.e)(l.pitch),minPitch:Object(a.e)(l.minPitch),maxPitch:Object(a.e)(l.maxPitch),size:[Math.max(1,e.clientWidth-f.left-f.right),Math.max(1,e.clientHeight-f.top-f.bottom)],tickers:{},stillness:1,needRerender:!0,needLabeling:!1,userHasInteracted:!1,viewport:f,padding:d,labelingOpacity:0,tileServer:l.tileServer,tileSet:l.tileSet,tileProtocol:l.tileProtocol,subdomains:l.subdomains.split(""),floorsEnabled:l.floorsEnabled,floorsUrl:l.floorsUrl,collectStats:l.collectStats,stats:{tileCount:0,dynamicTileCount:0,drawCount:0,vertexCount:0},promoMode:l.promoMode,trafficServer:l.trafficServer,trafficProtocol:l.trafficProtocol,identifyPickDistance:o.identify.pickDistance,lang:l.lang,tileServerDefaultLang:l.tileServerDefaultLang,tileKey:l.key,appId:l.appId,disableHoverStyles:l.disableHoverStyles,keepCenterWhileUserZoomRotate:!!l.keepCenterWhileUserZoomRotate,disableRotationByUserInteraction:!!l.disableRotationByUserInteraction,disablePitchByUserInteraction:!!l.disablePitchByUserInteraction,performanceCaveatEmitted:!1,sessionId:l.sessionId,shownRegionIds:new Set,preserveDrawingBuffer:!!l.preserveDrawingBuffer,defaultBackgroundColor:l.defaultBackgroundColor,handyStyleId:NaN,styleState:qr(l.styleState),disableIconCache:l.disableIconCache,rtlPluginScenario:null!==(r=l.useRtlTextPlugin)&&void 0!==r?r:"depends-on-language"};this.modules=new na(b,e,i),this.modules.styleManager.setDynamicStyle(this.modules.dynamicStyle.getStyle()),this.handlers=[new Ot(b,this.modules.layout.mapContainer),new Mt(this.modules)],l.disableZoomOnScroll||this.handlers.push(new St(b,this.modules.layout.mapContainer)),vt&&_t&&this.handlers.push(new Pt(b,e,i)),this.performanceChecker=new Lt(b),this.stillnessUpdater=new zt,this.requestedFrame=requestAnimationFrame(this.renderLoop),l.sendAnalytics&&(m=window,v=document,_="script",m.GoogleAnalyticsObject="ga",m.ga=m.ga||function(){(m.ga.q=m.ga.q||[]).push(arguments)},m.ga.l=Date.now(),y=v.createElement(_),g=v.getElementsByTagName(_)[0],y.async=1,y.src="https://www.google-analytics.com/analytics.js",g.parentNode.insertBefore(y,g),window.ga&&(window.ga("create",o.analytics.gaCode,{storage:"none",name:o.analytics.gaName,sampleRate:80}),window.ga(o.analytics.gaName+".set","anonymizeIp",!0),window.ga(o.analytics.gaName+".send","pageview")),window.addEventListener("unload",this.onWindowUnload))}return t.prototype.destroy=function(){cancelAnimationFrame(this.requestedFrame),this.modules.destroy(),this.handlers.forEach((function(t){return t.destroy()})),window.removeEventListener("unload",this.onWindowUnload)},t.prototype.isIdle=function(){return this.modules.tileManager.isIdle()&&this.modules.assetManager.isIdle()&&this.modules.trafficTileLayer.isIdle()&&this.modules.labeler.isIdle()},t.prototype.redrawMap=function(){this.modules.tileManager.redraw(),this.modules.trafficTileLayer.redraw(),this.modules.modelManager.resetCache(),this.modules.floorManager.resetCache(),this.modules.personalPoiManager.redraw()},t.options={center:[0,0],zoom:0,minZoom:o.MAP_DEFAULTS.minZoom,maxZoom:o.MAP_DEFAULTS.maxZoom,rotation:0,touchRotationThreshold:10,pitch:0,minPitch:0,maxPitch:45,viewport:{top:0,right:0,bottom:0,left:0},padding:{top:0,right:0,bottom:0,left:0},tileServer:o.tiles.server,tileSet:o.tiles.tileSet,tileProtocol:o.tiles.protocol,key:o.tiles.tileKey,subdomains:o.tiles.subdomains,floorsEnabled:o.floors.enabled,floorsUrl:o.floors.url,trafficProtocol:o.traffic.protocol,trafficServer:o.traffic.host,collectStats:!1,style:"",styleState:Object(M.a)({},Vr),styleOptions:{rootUrl:"",iconsPath:"",fontsPath:"",stylePath:""},promoMode:!1,sendAnalytics:!0,lang:o.defaultLang,appId:o.tiles.appId,disableHoverStyles:!1,disableZoomOnScroll:!1,disableRotationByUserInteraction:!1,disablePitchByUserInteraction:!1,defaultBackgroundColor:"#f6f2de",disableIconCache:!1},t}(),ra=(n(112),n(35)),oa=n(46),aa=["zoom","rotation","pitch","center"],sa=function(t){function e(e,n){var i,r=t.call(this)||this,o=r.core=new ia(e,n,r);return r.state=o.state,r.modules=o.modules,r.performanceChecker=o.performanceChecker,r.values={isMoveChanging:!1,isIdle:!1},aa.forEach((function(t){r.cloneFromStateToValues(t,t+"1"),r.cloneFromStateToValues(t,t+"2"),r.cloneFromStateToValues(t,t+"End1"),r.cloneFromStateToValues(t,t+"End2"),r.values[t+"EndTime"]=0,r.values["is"+t+"Changing"]=!1})),r.cloneFromStateToValues("size","size"),r.performanceChecker.on("performancecaveat",(function(){r.emit("performancecaveat"),bt({eventAction:"FPS",eventLabel:"performancecaveat"})})),r.performanceChecker.on("fps",(function(t){return bt({eventAction:"FPS",eventLabel:"Average",eventValue:t})})),(null==n?void 0:n.defaultBackgroundColor)&&r.setBackgroundColor(n.defaultBackgroundColor),r.setStyle(null!==(i=null==n?void 0:n.style)&&void 0!==i?i:"eb10e2c3-3c28-4b81-b74b-859c9c4cf47e",null==n?void 0:n.styleOptions).catch((function(t){if(t instanceof Error)throw t})),Object(oa.f)(r.state.rtlPluginScenario,r.modules,r.state.lang),(null==n?void 0:n.hillshade)&&r.modules.defaultSource.enableHillshade(n.hillshade),r}return Object(M.c)(e,t),e.prototype.setCenter=function(t,e){if(!Object(s.g)(t))return this;this.state.userHasInteracted=!1;var n=Object(s.l)(t);return $(this.state,n,e),this},e.prototype.setZoom=function(t,e){return Object(a.j)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.zoomTypePreserving="zoom",this.state.userHasInteracted=!1,lt(this.state,t,e),this):this},e.prototype.setStyleZoom=function(t,e){if(!Object(a.j)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER))return this;var n=Object(s.e)(t,this.state.center);return this.state.zoomTypePreserving="styleZoom",this.state.userHasInteracted=!1,lt(this.state,n,e),this},e.prototype.setMinZoom=function(t,e){return this.state.minZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setMaxZoom=function(t,e){return this.state.maxZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setRotation=function(t,e){return Object(a.j)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,it(this.state,Object(a.e)(t),e),this):this},e.prototype.setPitch=function(t,e){return Object(a.j)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,at(this.state,Object(a.e)(t),e),this):this},e.prototype.setMinPitch=function(t,e){return this.state.minPitch=Object(a.e)(t),this.setPitch(Object(a.m)(this.state.pitch),e),this},e.prototype.setMaxPitch=function(t,e){return this.state.maxPitch=Object(a.e)(t),this.setPitch(Object(a.m)(this.state.pitch),e),this},e.prototype.setViewport=function(t,e){return this.state.userHasInteracted=!1,function(t,e,n,i,r){void 0===r&&(r={});var o=Object(M.a)({top:0,right:0,bottom:0,left:0},i);if(!1===r.animate)t.viewport=o,Y(t,e,n);else{var a=t.viewport,s=void 0!==r.easing?r.easing:"easeOutCubic",c=void 0!==r.duration?r.duration:300;q.c("viewport",{easing:s},t,[a.top,a.right,a.bottom,a.left],[o.top,o.right,o.bottom,o.left],c)}}(this.state,this.modules.layout.rootContainer,this.modules.renderer,t,e),this},e.prototype.setMaxBounds=function(t){return this.state.maxBounds=Object(u.g)(t),this},e.prototype.setPadding=function(t,e){var n=Object(M.a)({top:0,left:0,right:0,bottom:0},t);return this.state.userHasInteracted=!1,function(t,e,n,i){void 0===i&&(i={});var r=function(t,e){return function(t,e){return{top:Math.min(t.top,e[1]),bottom:Math.min(t.bottom,e[1]),left:Math.min(t.left,e[0]),right:Math.min(t.right,e[0])}}(function(t){return{top:Math.max(t.top,0),bottom:Math.max(t.bottom,0),left:Math.max(t.left,0),right:Math.max(t.right,0)}}(t),e)}(n,t.size);if(!1===i.animate)t.padding=r,X(t,e);else{var o=t.padding,a=void 0!==i.easing?i.easing:"easeOutCubic",s=void 0!==i.duration?i.duration:300;q.c("padding",{easing:a},t,[o.top,o.right,o.bottom,o.left],[r.top,r.right,r.bottom,r.left],s)}}(this.state,this.modules.renderer,n,e),this},e.prototype.getPadding=function(){return this.state.padding},e.prototype.getCenter=function(){return Object(s.m)(this.state.center)},e.prototype.getZoom=function(){return this.state.zoom},e.prototype.getStyleZoom=function(){return this.state.styleZoom},e.prototype.getMinZoom=function(){return this.state.minZoom},e.prototype.getMaxZoom=function(){return this.state.maxZoom},e.prototype.getRotation=function(){return Object(a.m)(this.state.rotation)},e.prototype.getPitch=function(){return Object(a.m)(this.state.pitch)},e.prototype.getViewport=function(){return this.state.viewport},e.prototype.getSize=function(){return[this.state.size[0],this.state.size[1]]},e.prototype.getBounds=function(){this.modules.camera.update();var t=Object(wr.a)(this.modules.camera.viewportVertices);return{southWest:Object(s.m)(t.min),northEast:Object(s.m)(t.max)}},e.prototype.getWebGLContext=function(){return this.modules.renderer.getRenderingContext()},e.prototype.getCanvas=function(){return this.modules.layout.canvas},e.prototype.enableRuler=function(){this.modules.ruler.enable()},e.prototype.setRulerPoints=function(t){this.modules.ruler.enabled||this.modules.ruler.enable(),this.modules.ruler.setPoints(t)},e.prototype.disableRuler=function(){this.modules.ruler.disable()},e.prototype.showTraffic=function(){this.modules.trafficTileLayer.show()},e.prototype.hideTraffic=function(){this.modules.trafficTileLayer.hide()},e.prototype.setPersonalPoi=function(t){this.modules.personalPoiManager.setPersonalPoi(t)},e.prototype.setSelectedIds=function(t){return void 0===t&&(t=[]),this.modules.tileManager.setSelectedIds(t.map(E.b).filter((function(t){return!Number.isNaN(t[0])&&!Number.isNaN(t[1])}))),this.modules.identifier.debouncedFillCache(),this},e.prototype.project=function(t){return this.modules.camera.project(Object(s.l)(t))},e.prototype.unproject=function(t){return Object(s.m)(this.modules.camera.unproject(t))},e.prototype.getCameraProjectionMatrix=function(){return this.modules.camera.projectionMatrix},e.prototype.getCameraViewMatrix=function(){return this.modules.camera.viewMatrix},e.prototype.getCameraViewProjectionMatrix=function(){return this.modules.camera.viewProjectionMatrix},e.prototype.invalidateSize=function(){this.state.userHasInteracted=!1;var t=window.devicePixelRatio,e=this.state.viewport,n=this.modules.layout.rootContainer,i=n.clientWidth,r=n.clientHeight;return this.state.size=[Math.max(1,i-e.left-e.right),Math.max(1,r-e.top-e.bottom)],this.modules.renderer.setPixelRatio(t),this.modules.renderer.setSize(i,r),this.state.needRerender=!0,this},e.prototype.destroy=function(){this.core.destroy()},e.prototype.refresh=function(){return this.state.needRerender=!0,this.state.needLabeling=!0,this.modules.identifier.resetCache(),this},e.prototype.changeFloorNumber=function(t,e){return this.modules.floorManager.changeFloorNumber(t,e),this},e.prototype.setPromoMode=function(t){return this.state.promoMode=t,this.modules.labeler.resetHysteresis(),this},e.prototype.setBackgroundColor=function(t){return"string"==typeof t&&(t=Object(Pi.a)(t)),this.modules.renderer.setClearColor(t),this},e.prototype.addLayer=function(t,e){return this.modules.styleManager.addLayer(t,e),this.core.redrawMap(),this},e.prototype.removeLayer=function(t){return this.modules.styleManager.removeLayer(t),this.core.redrawMap(),this},e.prototype.setStyle=function(t,e){return Object(M.b)(this,void 0,Promise,(function(){var n;return Object(M.d)(this,(function(i){switch(i.label){case 0:return"string"!=typeof t?[3,5]:Object(ra.b)(t)?[4,this.setCustomStyleById(t,e)]:[3,2];case 1:return n=i.sent(),[3,4];case 2:return[4,this.setCustomStyleFromUrl(t,e)];case 3:n=i.sent(),i.label=4;case 4:return[3,7];case 5:return[4,this.setCustomStyleDirectly(t,e)];case 6:i.sent(),n=t,i.label=7;case 7:return this.emit("styleload",{style:n}),[2,n]}}))}))},e.prototype.useOldStyles=function(t){return this.setCustomStyleById("eb10e2c3-3c28-4b81-b74b-859c9c4cf47e",t),this},e.prototype.waitForGpuToFinishDrawing=function(){return this.modules.renderer.getPixels(),this},e.prototype.setLang=function(t){this.state.lang=t,Object(oa.f)(this.state.rtlPluginScenario,this.modules,t),this.modules.tileManager.redraw()},e.prototype.getContainer=function(){return this.modules.layout.mapContainer},e.prototype.getExternalContainer=function(){return this.modules.layout.externalContainer},e.prototype.fitBounds=function(t,e){var n,i,r=t.northEast,o=t.southWest,s=Object(M.a)({top:0,left:0,right:0,bottom:0},(null==e?void 0:e.padding)?e.padding:{}),l=this.getViewport(),u=this.getPadding(),d=(null==e?void 0:e.skipMapPadding)?s:(i=s,{top:(n=u).top+i.top,bottom:n.bottom+i.bottom,left:n.left+i.left,right:n.right+i.right}),h=this.getSize(),p=(null==e?void 0:e.considerRotation)?this.getRotation():0;if(h[0]-d.left-d.right<=0||h[1]-d.top-d.bottom<=0)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;(null==e?void 0:e.considerRotation)||it(this.state,p,{animate:!1});var m=f([[o[0],r[1]],r,[r[0],o[1]],o],p,[h[0]-d.left-d.right,h[1]-d.top-d.bottom]);if(!m)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;var v=[(h[0]-d.left-d.right)/2+d.left+l.left,(h[1]-d.top-d.bottom)/2+d.top+l.top],_=new c.a({rotation:this.state.rotation,size:this.state.size,padding:this.state.padding,viewport:this.state.viewport,zoom:Object(a.c)(m.zoom,this.state.minZoom,this.state.maxZoom),pitch:0,center:m.center}).unproject(v),y=[0,0];z.p(y,m.center,_);var g=[0,0,0];return z.a(g,m.center,y),$(this.state,g,null==e?void 0:e.animation),lt(this.state,m.zoom,null==e?void 0:e.animation),at(this.state,0,null==e?void 0:e.animation),this},e.prototype.update=function(){var t=this,e=this.state,n=e.time,i=e.userHasInteracted,r=this.values,o={};aa.forEach((function(i){var a=e[i];"zoom"===i&&"styleZoom"===e.zoomTypePreserving&&(a=e.styleZoom),o[i+"start"]=!r["is"+i+"Changing"]&&!t.areEqual(a,r[i+"1"])&&t.areEqual(r[i+"1"],r[i+"2"]),o[i+"start"]&&(r["is"+i+"Changing"]=!0),r["is"+i+"Changing"]&&(o[i]=!t.areEqual(a,r[i+"1"]),n-r[i+"EndTime"]>150&&(o[i+"end"]=t.areEqual(a,r[i+"End1"])&&!t.areEqual(r[i+"End1"],r[i+"End2"]),o[i+"end"]&&(r["is"+i+"Changing"]=!1),t.copyFromValuesToValues(i+"End2",i+"End1"),t.copyFromStateToValues(a,i+"End1"),r[i+"EndTime"]=n)),t.copyFromValuesToValues(i+"2",i+"1"),t.copyFromStateToValues(a,i+"1")})),o.resize=!this.areEqual(e.size,r.size),this.copyFromStateToValues(e.size,"size"),o.movestart=(o.zoomstart||o.rotationstart||o.centerstart||o.pitchstart)&&!r.isMoveChanging,o.movestart&&(r.isMoveChanging=!0),o.move=r.iszoomChanging||r.isrotationChanging||r.iscenterChanging||r.ispitchChanging,o.moveend=(o.zoomend||o.rotationend||o.centerend||o.pitchend)&&!o.move,o.moveend&&(r.isMoveChanging=!1);var a=r.isIdle;for(var s in r.isIdle=this.isIdle(),o.idle=!a&&r.isIdle,o){var c=s;o[c]&&this.emit(c,{isUser:i})}},e.prototype.isIdle=function(){return!this.values.isMoveChanging&&!this.currentPendingStyle&&this.core.isIdle()},e.prototype.setAutoHoverMode=function(t){this.modules.defaultSource.resetHoverId(),this.state.disableHoverStyles=!t},e.prototype.setStyleState=function(t){this.state.styleState=qr(t),this.state.needRerender=!0},e.prototype.patchStyleState=function(t){var e,n;this.state.styleState=(e=this.state.styleState,n=t,Object(M.a)(Object(M.a)(Object(M.a)({},e),n),{_activeFloorIds:e._activeFloorIds,_activeFloorBuildingIds:e._activeFloorBuildingIds})),this.state.needRerender=!0},e.prototype.setCustomStyleById=function(t,e){return Object(M.b)(this,void 0,Promise,(function(){var n,i,r,s;return Object(M.d)(this,(function(c){switch(c.label){case 0:return this.currentPendingStyle=t,n=Object(a.b)(e||{},{rootUrl:o.styles.url,stylePath:o.styles.path,iconsPath:"",fontsPath:o.fonts.defaultUrl,iconNameTemplate:"{name}"}),[4,this.fetchStyleById(dr(n),t,"eb10e2c3-3c28-4b81-b74b-859c9c4cf47e")];case 1:if(i=c.sent(),this.currentPendingStyle!==t)return[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")];if(!i)throw this.currentPendingStyle=void 0,new Error("There is no correct style with id «"+t+"»");return r=i.style,s=i.loadedId,n.iconsPath=function(t,e){return t.replace("{id}",e)}(o.icons.defaultUrl,s),[4,this.setCustomStyle(r,n)];case 2:return c.sent(),[2,t]}}))}))},e.prototype.setCustomStyleFromUrl=function(t,e){return Object(M.b)(this,void 0,Promise,(function(){var n,i;return Object(M.d)(this,(function(r){switch(r.label){case 0:return this.currentPendingStyle=t,[4,ca(dr(n=Object(a.b)(e||{},{rootUrl:t,iconsPath:"",fontsPath:"",stylePath:"style.json",iconNameTemplate:"{name}.svg"})))];case 1:if(i=r.sent(),t!==this.currentPendingStyle)return[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")];if(!i)throw this.currentPendingStyle=void 0,new Error("There are no correct styles by url «"+t+"»");return[4,this.setCustomStyle(i,n)];case 2:return r.sent(),[2,t]}}))}))},e.prototype.setCustomStyleDirectly=function(t,e){var n=window.location.host,i=Object(a.b)(e||{},{rootUrl:"//"+n,stylePath:"",iconsPath:"",fontsPath:"",iconNameTemplate:"{name}.svg"});return this.setCustomStyle(t,i)},e.prototype.setCustomStyle=function(t,e){return Object(M.b)(this,void 0,void 0,(function(){var n,i;return Object(M.d)(this,(function(r){switch(r.label){case 0:return this.currentPendingStyle=void 0,this.setBackgroundColor(t.background.color),[4,this.modules.tileKeyInfo.getKeyInfo()];case 1:return n=r.sent().showCommPoi,i=this.modules.styleManager.createStyle(t,e,n),this.state.handyStyleId=i.id,this.core.redrawMap(),[2]}}))}))},e.prototype.copyFromStateToValues=function(t,e){la(t)?z.c(this.values[e],t):this.values[e]=t},e.prototype.cloneFromStateToValues=function(t,e){var n=this.state[t];la(n)?this.values[e]=z.b(n):this.values[e]=n},e.prototype.copyFromValuesToValues=function(t,e){var n=this.values[e];la(n)?z.c(this.values[t],n):this.values[t]=n},e.prototype.areEqual=function(t,e){return la(t)&&la(e)?z.i(t,e):t===e},e.prototype.fetchStyleById=function(t,e,n){return Object(M.b)(this,void 0,Promise,(function(){var i,r,o;return Object(M.d)(this,(function(a){switch(a.label){case 0:return(i=new URL(Object(j.d)(t,{id:e}))).searchParams.append("key",this.state.tileKey),[4,fetch(i.toString())];case 1:return 404===(r=a.sent()).status&&n&&Number.isNaN(this.state.handyStyleId)?(console.warn("No access to style with id «"+e+"». Fallback to default style «"+n+"»."),[2,this.fetchStyleById(t,n)]):r.ok?[4,r.json()]:[2,void 0];case 2:return(o=a.sent())&&o.result?[2,{loadedId:e,style:o.result}]:[2]}}))}))},e}(P.a);function ca(t){return fetch(t).then((function(t){if(t.ok)return t.json()}))}function la(t){return void 0!==t.length}var ua=n(49),da=n(65),fa=n(48),ha=function(t){function e(e,n){var i,r,o,a,c,u,d,f,h,p,m=t.call(this,e)||this;m.removed=!1,m.options=n,m.isInteractive=null===(i=n.interactive)||void 0===i||i,m.geoPoints=m.options.coordinates.filter((function(t,e,n){return 0===e||!l.i(n[e],n[e-1])})),m.points=m.geoPoints.map(s.l);var v=0;m.distances=[],m.distances.push(v);for(var _=1;_<m.geoPoints.length;_++)v+=Object(s.b)(m.geoPoints[_-1],m.geoPoints[_]),m.distances.push(v);m.stateDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),m.debouncedGenerate=Object(kt.a)((function(){m.generate()}),200),m.tileAttrs=Object(Z.c)({id:m.isInteractive?[0,0]:NaN,beginningIsCut:0,endingIsCut:0});var y=m.modules,g=y.dynamicStyle,b=y.layers;if(0!==m.options.width){m.rawStyleLayer={type:"line",id:"dynamic-polyline-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(r=m.options.color)&&void 0!==r?r:"#3388ff",width:null!==(o=m.options.width)&&void 0!==o?o:3}};var w=Object(H.d)(m.rawStyleLayer);w&&(m.styleLayerId=w.innerId,g.addLayer(w,null!==(a=m.options.zIndex)&&void 0!==a?a:0))}if(m.options.width2){m.rawStyleLayer2={type:"line",id:"dynamic-polyline2-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(c=m.options.color2)&&void 0!==c?c:"#00000000",width:null!==(u=m.options.width2)&&void 0!==u?u:0}};var x=Object(H.d)(m.rawStyleLayer2);x&&(m.styleLayer2Id=x.innerId,g.addLayer(x,null!==(d=m.options.zIndex2)&&void 0!==d?d:-1))}if(m.options.width3){m.rawStyleLayer3={type:"line",id:"dynamic-polyline3-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(f=m.options.color3)&&void 0!==f?f:"#00000000",width:null!==(h=m.options.width3)&&void 0!==h?h:0}};var S=Object(H.d)(m.rawStyleLayer3);S&&(m.styleLayer3Id=S.innerId,g.addLayer(S,null!==(p=m.options.zIndex3)&&void 0!==p?p:-2))}return void 0===m.styleLayerId&&void 0===m.styleLayer2Id&&void 0===m.styleLayer3Id||(b.addLayer(m),m.generate()),m}return Object(M.c)(e,t),e.prototype.update=function(){this.stateDiffer.check(this.mapState)&&this.debouncedGenerate()},e.prototype.remove=function(){this.removed=!0,this.isInteractive&&this.modules.identifier.resetCache(),void 0!==this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),void 0!==this.styleLayer2Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer2Id),void 0!==this.styleLayer3Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer3Id),t.prototype.destroy.call(this)},e.prototype.snapPoint=function(t){for(var e=this,n=this.points.map((function(t){return e.modules.camera.project(t)})),i=1/0,r=n[0],o=0,a=0;a<n.length-1;a++){var c=n[a],l=n[a+1],u=Object(ua.a)(t,c,l),d=u[0]-t[0],f=u[1]-t[1],h=d*d+f*f;h<i&&(i=h,r=u,o=a)}var p=Object(s.m)(this.modules.camera.unproject(r));return{point:p,distance:this.distances[o]+Object(s.b)(p,this.geoPoints[o])}},e.prototype.setStyle=function(t){this.setSubLayerStyle(this.styleLayerId,this.rawStyleLayer,t.color),this.setSubLayerStyle(this.styleLayer2Id,this.rawStyleLayer2,t.color2),this.setSubLayerStyle(this.styleLayer3Id,this.rawStyleLayer3,t.color3)},e.prototype.setSubLayerStyle=function(t,e,n){if(void 0!==t&&n&&e&&n!==e.style.color){var i=this.modules.dynamicStyle;e.style.color=n;var r=Object(H.d)(e);r&&(i.updateLayerStyle(t,r),this.mapState.needRerender=!0)}},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.identifier,s=e.map,c=e.camera,d=O.c.tileProps,f=Math.min(Math.floor(s.getZoom()),12),h=Object(U.D)(f),p=Object(ua.d)(this.points,h),m=l.d(),v=u.e();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var _=0;_<p.length;_++){var y=p[_];u.i(v);for(var g=0;g<y.length;g++)u.f(v,y[g]);u.a(m,v);var b=Object(U.l)(m,f);if(Object(U.p)(b,c.viewportVertices)){if(this.options.displayTileBounds){var w=n.getStyle().layers.find((function(t){return"debug-tile-bounds"===t.id}));Object(nr.a)(i,w);var x=i.getAccumulatedData(),S=new C.a("dynamicObject",x.data,r,b);this.tileObjects.push(S),o.addObject(S)}var I=Object(U.e)(b),j=[[],[]];for(g=0;g<y.length;g++)Object(U.t)(m,y[g],I),j[0][g]=m[0],j[1][g]=m[1];if(this.tileAttrs[d.beginningIsCut]=0,this.tileAttrs[d.endingIsCut]=0,0!==_&&(this.tileAttrs[d.beginningIsCut]=1),_+1!==p.length&&(this.tileAttrs[d.endingIsCut]=1),void 0!==this.styleLayerId){var M=n.getStyle().layersById[this.styleLayerId];Object(da.b)(M)&&Object(N.b)({collector:i,generator:fa.a.generate,args:[n.getStyle().id,M,O.d,this.tileAttrs,j]})}void 0!==this.styleLayer2Id&&(M=n.getStyle().layersById[this.styleLayer2Id],Object(da.b)(M)&&Object(N.b)({collector:i,generator:fa.a.generate,args:[n.getStyle().id,M,O.d,this.tileAttrs,j]})),void 0!==this.styleLayer3Id&&(M=n.getStyle().layersById[this.styleLayer3Id],Object(da.b)(M)&&Object(N.b)({collector:i,generator:fa.a.generate,args:[n.getStyle().id,M,O.d,this.tileAttrs,j]}));var P=i.getAccumulatedData(),L=new C.a("dynamicObject",P.data,r,I.coords);o.addObject(L),this.tileObjects.push(L),this.isInteractive&&this.identifyIds.push(P.identifyIds)}}this.isInteractive&&a.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(k),pa=n(88),ma=function(t){function e(e,n){var i,r,o,a,c,l,u=t.call(this,e)||this;return u.removed=!1,u.options=n,u.interactive=null===(i=n.interactive)||void 0===i||i,u.points=u.options.coordinates.map(s.l),u.stateDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),u.debouncedGenerate=Object(kt.a)((function(){u.generate()}),200),u.tileAttrs=Object(Z.c)({previousPointX:0,previousPointY:0,nextPointX:0,nextPointY:0,beginningIsCut:0,endingIsCut:0,componentDistanceStart:0,objectLength:0,id:u.interactive?[0,0]:NaN}),u.modules.layers.addLayer(u),u.dashLayerRaw={type:"dashedLine",id:"dynamic-dashed-polyline-dash-"+u.uniqId,minzoom:u.options.minZoom,maxzoom:u.options.maxZoom,style:{color:u.options.dashColor||"#2480ff",dashLength:null!==(r=u.options.dashLength)&&void 0!==r?r:6,gapColor:u.options.gapColor||"#ffffff00",gapLength:null!==(o=u.options.gapLength)&&void 0!==o?o:20,width:null!==(a=u.options.width)&&void 0!==a?a:8}},u.baseLayerRaw={type:"line",id:"dynamic-dashed-polyline-base-"+u.uniqId,minzoom:u.options.minZoom,maxzoom:u.options.maxZoom,style:{color:u.options.dash2Color||"#ffffff",width:null!==(l=null===(c=u.options)||void 0===c?void 0:c.width2)&&void 0!==l?l:12}},u.dashLayer=Object(H.d)(u.dashLayerRaw),u.baseLayer=Object(H.d)(u.baseLayerRaw),u.generate(),u}return Object(M.c)(e,t),e.prototype.update=function(){this.stateDiffer.check(this.mapState)&&this.debouncedGenerate()},e.prototype.remove=function(){this.removed=!0,this.interactive&&this.modules.identifier.resetCache(),this.baseLayer&&this.modules.dynamicStyle.removeLayer(this.baseLayer.innerId),this.dashLayer&&this.modules.dynamicStyle.removeLayer(this.dashLayer.innerId),t.prototype.destroy.call(this)},e.prototype.setStyle=function(t){var e,n=t.dashColor,i=t.dash2Color,r=t.gapColor,o=this.modules.dynamicStyle;this.dashLayer&&(void 0!==n&&(this.dashLayerRaw.style.color=n),void 0!==r&&(this.dashLayerRaw.style.gapColor=r),(e=Object(H.d)(this.dashLayerRaw))&&o.updateLayerStyle(this.dashLayer.innerId,e)),this.baseLayer&&(void 0!==i&&(this.baseLayerRaw.style.color=i),(e=Object(H.d)(this.baseLayerRaw))&&o.updateLayerStyle(this.baseLayer.innerId,e)),this.mapState.needRerender=!0},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.map,s=e.identifier,c=e.camera,d=O.c.tileProps,f=Math.min(Math.floor(a.getZoom()),12),h=Object(U.D)(f),p=Object(ua.d)(this.points,h),m=l.d(),v=u.e();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var _=[],y=0,g=0,b=p;g<b.length;g++){var w=b[g];u.i(v);for(var x=0;x<w.length;x++)u.f(v,w[x]);u.a(m,v);var S=Object(U.l)(m,f),I=Object(U.e)(S),j=[[],[]],M=0;for(x=0;x<w.length;x++)if(Object(U.t)(m,w[x],I),j[0][x]=m[0],j[1][x]=m[1],0!==x){var P=j[0][x]-j[0][x-1],L=j[1][x]-j[1][x-1];M+=Math.sqrt(P*P+L*L)}y+=M,_.push({vertices:j,tileInfo:I,distance:M})}var T=0;_.forEach((function(e,a){var s,l,u,f=e.tileInfo,h=e.distance,v=e.vertices;if(t.tileAttrs[d.beginningIsCut]=0,t.tileAttrs[d.endingIsCut]=0,t.tileAttrs[d.previousPointX]=0,t.tileAttrs[d.previousPointY]=0,t.tileAttrs[d.nextPointX]=0,t.tileAttrs[d.nextPointY]=0,t.tileAttrs[d.componentDistanceStart]=T,T+=h,t.tileAttrs[d.objectLength]=y,0!==a){var g=(u=p[a-1])[u.length-2];Object(U.t)(m,g,f),t.tileAttrs[d.beginningIsCut]=1,t.tileAttrs[d.previousPointX]=m[0],t.tileAttrs[d.previousPointY]=m[1]}if(a!==_.length-1&&(g=(u=p[a+1])[1],Object(U.t)(m,g,f),t.tileAttrs[d.endingIsCut]=1,t.tileAttrs[d.nextPointX]=m[0],t.tileAttrs[d.nextPointY]=m[1]),Object(U.p)(f.coords,c.viewportVertices)){t.dashLayer&&(n.addLayer(t.dashLayer,null!==(s=t.options.zIndex)&&void 0!==s?s:0),Object(N.b)({collector:i,generator:pa.a.generate,args:[n.getStyle().id,t.dashLayer,O.d,t.tileAttrs,v]})),t.baseLayer&&(n.addLayer(t.baseLayer,null!==(l=t.options.zIndex2)&&void 0!==l?l:-1),Object(N.b)({collector:i,generator:fa.a.generate,args:[n.getStyle().id,t.baseLayer,O.d,t.tileAttrs,v]}));var b=i.getAccumulatedData(),w=new C.a("dynamicObject",b.data,r,f.coords);o.addObject(w),t.tileObjects.push(w),t.interactive&&t.identifyIds.push(b.identifyIds)}})),this.interactive&&s.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(k),va=n(64),_a=n(62),ya=function(t){function e(e,n){var i,r=t.call(this,e)||this;r.options=n,r.isInteractive=null===(i=n.interactive)||void 0===i||i;var o=r.options.coordinates.map((function(t){var e=t.map(s.l);if(e.length>1){var n=e[0],i=e[e.length-1];n[0]===i[0]&&n[1]===i[1]||e.push(n)}return e})),a=[],c=[],d=r.modules,f=d.dynamicStyle,h=d.collector,p=d.renderer,m=d.tileManager,v=d.identifier,_=d.layers;o.forEach((function(t){a.length&&c.push(a.length),a=a.concat(t)}));var y=Object(H.d)({type:"polygon",id:"dynamic-polygon-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.color||"#3388ff33"}});if(!y)return r;f.addLayer(y,r.options.zIndex),r.fillLayerId=y.innerId;for(var g=Object(Z.c)({id:r.isInteractive?[0,0]:NaN}),b=u.e(),w=0;w<a.length;w++)u.f(b,a[w]);for(var x=Object(U.i)(b),S=Object(U.e)(x),I=[],j=0;j<a.length;j++)I.push(a[j][0]),I.push(a[j][1]);var M=va(I,c),P=l.d(),L=[[],[],[]];for(j=0;j<M.length;j+=3){for(w=0;w<3;w++)Object(U.t)(P,a[M[j+w]],S),L[0][w]=P[0],L[1][w]=P[1],L[2][w]=0;Object(N.b)({collector:h,generator:_a.a.generate,args:[f.getStyle().id,y,O.d,g,L]})}if(0!==r.options.strokeWidth){var T=Object(H.d)({type:"line",id:"dynamic-polygon-stroke-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.strokeColor||"#3388ff",width:r.options.strokeWidth||3}});if(T){f.addLayer(T,r.options.zIndex),r.borderLayerId=T.innerId;var k=Object(Z.c)({id:r.isInteractive?[0,0]:NaN,beginningIsCut:0,endingIsCut:0});o.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){Object(U.t)(P,t,S),e[0][n]=P[0],e[1][n]=P[1]})),Object(N.b)({collector:h,generator:fa.a.generate,args:[f.getStyle().id,T,O.d,k,e]})}))}}var z=h.getAccumulatedData(),E=new C.a("dynamicObject",z.data,p,S.coords);return m.addObject(E),r.tileObjects.push(E),r.isInteractive&&r.identifyIds.push(z.identifyIds),_.addLayer(r),h.reset(),r.mapState.needRerender=!0,r.isInteractive&&v.resetCache(),r}return Object(M.c)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.fillLayerId&&this.modules.dynamicStyle.removeLayer(this.fillLayerId),this.borderLayerId&&this.modules.dynamicStyle.removeLayer(this.borderLayerId),t.prototype.destroy.call(this)},e}(k),ga=function(t){function e(e,n){var i,r,o,a,c,d=t.call(this,e)||this;if(d.options=n,d.isInteractive=null===(i=n.interactive)||void 0===i||i,n.segments&&n.segments<=0)return d;var f=d.modules,h=f.dynamicStyle,p=f.collector,m=f.renderer,v=f.tileManager,_=f.identifier,y=f.layers,g=function(t,e,n){var i=[];if(n>0){i.push(l.j(t[0]+e,t[1],t[2]));for(var r=Math.PI/Math.ceil(n/2),o=r;o<Math.PI;o+=r){var a=e*Math.cos(o),s=e*Math.sin(o);i.push(l.j(t[0]+a,t[1]+s,t[2]),l.j(t[0]+a,t[1]-s,t[2]))}i.push(l.j(t[0]-e,t[1],t[2]))}return i}(Object(s.l)(d.options.coordinates),Object(s.c)(d.options.coordinates,d.options.radius),null!==(r=d.options.segments)&&void 0!==r?r:150),b=Object(H.d)({type:"polygon",id:"dynamic-circle-"+d.uniqId,minzoom:d.options.minZoom,maxzoom:d.options.maxZoom,style:{color:null!==(o=d.options.color)&&void 0!==o?o:"#3388ff33",strokeWidth:null!==(a=d.options.borderWidth)&&void 0!==a?a:1,strokeColor:null!==(c=d.options.borderColor)&&void 0!==c?c:"#3388ff"}});if(!b)return d;h.addLayer(b,d.options.zIndex),d.layerId=b.innerId;for(var w=Object(Z.c)({id:d.isInteractive?[0,0]:NaN}),x=u.e(),S=0;S<g.length;S++)u.f(x,g[S]);var I=Object(U.i)(x),j=Object(U.e)(I),M=[[],[],[]],P=l.d(),L=0!==d.options.borderWidth?1:0;for(S=0;S<g.length;S++)Object(U.t)(P,g[S],j),M[0][S]=P[0],M[1][S]=P[1],M[2][S]=L;Object(N.b)({collector:p,generator:_a.a.generate,args:[h.getStyle().id,b,O.d,w,M]});var T=p.getAccumulatedData(),k=new C.a("dynamicObject",T.data,m,j.coords);return v.addObject(k),d.tileObjects.push(k),d.isInteractive&&d.identifyIds.push(T.identifyIds),y.addLayer(d),p.reset(),d.mapState.needRerender=!0,d.isInteractive&&_.resetCache(),d}return Object(M.c)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e}(k);function ba(t,e,n,i){wa(t,n,i),wa(e,2*n,2*i),wa(e,2*n+1,2*i+1)}function wa(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function xa(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}var Sa=function(t){return t[0]},Ia=function(t){return t[1]},ja=function(){function t(t,e,n,i,r){void 0===e&&(e=Sa),void 0===n&&(n=Ia),void 0===i&&(i=64),void 0===r&&(r=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new r(2*t.length),c=0;c<t.length;c++)a[c]=c,s[2*c]=e(t[c]),s[2*c+1]=n(t[c]);!function t(e,n,i,r,o,a){if(!(o-r<=i)){var s=r+o>>1;!function t(e,n,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,c=i-r+1,l=Math.log(s),u=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*u*(s-u)/s)*(c-s/2<0?-1:1);t(e,n,i,Math.max(r,Math.floor(i-c*u/s+d)),Math.min(o,Math.floor(i+(s-c)*u/s+d)),a)}var f=n[2*i+a],h=r,p=o;for(ba(e,n,r,i),n[2*o+a]>f&&ba(e,n,r,o);h<p;){for(ba(e,n,h,p),h++,p--;n[2*h+a]<f;)h++;for(;n[2*p+a]>f;)p--}n[2*r+a]===f?ba(e,n,r,p):ba(e,n,++p,o),p<=i&&(r=p+1),i<=p&&(o=p-1)}}(e,n,s,r,o,a%2),t(e,n,i,r,s-1,a+1),t(e,n,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)}return t.prototype.range=function(t,e,n,i){return function(t,e,n,i,r,o,a){for(var s,c,l=[0,t.length-1,0],u=[];l.length;){var d=l.pop(),f=l.pop(),h=l.pop();if(f-h<=a)for(var p=h;p<=f;p++)s=e[2*p],c=e[2*p+1],s>=n&&s<=r&&c>=i&&c<=o&&u.push(t[p]);else{var m=Math.floor((h+f)/2);s=e[2*m],c=e[2*m+1],s>=n&&s<=r&&c>=i&&c<=o&&u.push(t[m]);var v=(d+1)%2;(0===d?n<=s:i<=c)&&(l.push(h),l.push(m-1),l.push(v)),(0===d?r>=s:o>=c)&&(l.push(m+1),l.push(f),l.push(v))}}return u}(this.ids,this.coords,t,e,n,i,this.nodeSize)},t.prototype.within=function(t,e,n){return function(t,e,n,i,r,o){for(var a=[0,t.length-1,0],s=[],c=r*r;a.length;){var l=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o)for(var f=d;f<=u;f++)xa(e[2*f],e[2*f+1],n,i)<=c&&s.push(t[f]);else{var h=Math.floor((d+u)/2),p=e[2*h],m=e[2*h+1];xa(p,m,n,i)<=c&&s.push(t[h]);var v=(l+1)%2;(0===l?n-r<=p:i-r<=m)&&(a.push(d),a.push(h-1),a.push(v)),(0===l?n+r>=p:i+r>=m)&&(a.push(h+1),a.push(u),a.push(v))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)},t}();function Oa(t,e,n){return t*(1-n)+e*n}var Ma={0:"rgba(89, 0, 89, 0)",.25:"rgba(0, 0, 89, 0.78)",.5:"rgba(0, 198, 68, 1)",.7:"rgba(198, 186, 0, 1)",.8:"rgba(249, 152, 0, 1)",1:"rgba(200, 0, 0, 1)"},Pa=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,e)||this;i.fillBuffers=function(){if(i.tree){var t=Object(wr.a)(i.modules.camera.viewportVertices),e=Object(U.i)(t);if(!i.tileCoords||(n=e,r=i.tileCoords,!n.every((function(t,e){return t===r[e]})))){var n,r;i.resetBuffers(),i.tileCoords=e;var o=Object(U.D)(e[2]),a=Object(U.z)(e);Li.d(i.matrix,a,l.j(o,o,Gt.m));var s=i.tree.range(a[0],a[1],a[0]+o,a[1]+o).map((function(t){return i.points[t]})),c=Object(U.e)(e);i.buffers=function(t,e){var n=[],i=[],r=[],o=l.d();return t.forEach((function(t){var a=t.mapCoords,s=t.weight;Object(U.t)(o,a,e);for(var c=o[0],l=o[1],u=0;u<6;u++)n.push(c,l),r.push(s);i.push(-1,-1,1,-1,-1,1,-1,1,1,-1,1,1)})),{vertices:new Cn.a(new Uint16Array(n),{itemSize:2,dataType:Cn.a.UnsignedShort,stride:0,offset:0,normalized:!0}),widens:new Cn.a(new Int8Array(i),{itemSize:2,dataType:Cn.a.Byte,stride:0,offset:0,normalized:!1}),weights:new Cn.a(new Float32Array(r),{itemSize:1,dataType:Cn.a.Float,stride:0,offset:0,normalized:!1})}}(s,c),i.vertexCount=6*s.length,i.vao=new An(i.offscreenProgram,{a_vec2_position:i.buffers.vertices,a_vec2_widen:i.buffers.widens,a_float_weight:i.buffers.weights})}}},i.resizeFrameBuffer=function(){i.frameBuffer.setSize([Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)]),i.frameBuffer.bind(i.gl),i.frameBuffer.unbind(i.gl),i.modules.imageManager.updatePreparedTexture(i.offscreenTextureIndex,i.frameBuffer.getTexture()),i.needRerender=!0,i.mapState.needRerender=!0};var r=n.downscale,o=n.palette,a=n.points,s=n.minZoom,c=n.maxZoom,u=n.zIndex,d=n.pointRadius,f=n.intensity,h=n.opacity;i.rampTextureIndex=i.modules.imageManager.addPreparedTexture(function(t,e){var n=function(t,e){for(var n=Object.keys(t).map((function(t){return Number(t)})).sort((function(t,e){return t-e})),i=0,r=[],o=e-1,a=0;a<e;a++){var s=a/o;s>n[i+1]&&i++;for(var c=n[i],l=n[i+1],u=(s-c)/(l-c),d=0;d<4;d++)r[4*a+d]=Oa(t[c][d],t[l][d],u)}return r.map((function(t){return Math.round(t)}))}(function(t){var e=new Error("The palette is not valid. The heatmap won't be rendered."),n=Object.getOwnPropertyNames(t);if(0===n.length)throw e;var i=n.map((function(t){return Number(t)}));if(i.some((function(t){return Number.isNaN(t)||t<0||t>1})))throw e;var r={};i.forEach((function(n){if("string"!=typeof t[n])throw e;r[n]=Object(Pi.a)(t[n])}));var o=Math.min.apply(Math,i),a=Math.max.apply(Math,i);return o>0&&(r[0]=r[o]),a<1&&(r[1]=r[a]),r}(t),256);return new Ut(new Uint8Array(n),{size:[256,1]})}(null!=o?o:Ma)),i.gl=i.modules.renderer.getRenderingContext(),i.downscale=null!=r?r:1,i.frameBuffer=new Ht({size:[Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)],magFilter:Ut.LinearFilter,minFilter:Ut.LinearFilter,wrapS:Ut.ClampToEdgeWrapping,wrapT:Ut.ClampToEdgeWrapping}),i.offscreenTextureIndex=i.modules.imageManager.addPreparedTexture(i.frameBuffer.getTexture()),i.offscreenProgram=new pi({vertex:Oi("heatmap"),fragment:Mi("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),i.points=[],i.vertexCount=0,i.isDestroyed=!1,i.needRerender=!1,i.matrix=Li.b(),i.mvpMatrix=Li.b(),i.viewDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),i.sizeDiffer=new It([{path:"size",type:"vec2"}]),i.throttledFillBuffer=wt(i.fillBuffers,50);var p=Object(H.d)({type:"heatmap",id:"dynamic-heatmap-"+i.uniqId,minzoom:s,maxzoom:c,style:{opacity:null!=h?h:.5,intensity:null!=f?f:3,radius:null!=d?d:10}});if(!p)throw new Error("There is no correct style layer for heatmap");return i.layer=p,i.modules.dynamicStyle.addLayer(p,u),a&&i.setPoints(a),i}return Object(M.c)(e,t),e.prototype.setPoints=function(t){if(!this.isDestroyed){if(this.points=t.map((function(t){var e=t.coordinates,n=t.weight;return{mapCoords:Object(s.l)(e),weight:null!=n?n:1}})),this.tree=new ja(this.points,(function(t){return t.mapCoords[0]}),(function(t){return t.mapCoords[1]})),this.tileCoords=void 0,!this.tileObjects.length){var e=this.modules,n=e.layers,i=e.collector,r=e.dynamicStyle,o=e.renderer,a=e.tileManager;Object(N.b)({collector:i,generator:Rn.a.generateTexture,args:[r.getStyle().id,this.layer,this.offscreenTextureIndex,this.rampTextureIndex]});var c=i.getAccumulatedData(),l=new C.a("dynamicObject",c.data,o);a.addObject(l),this.tileObjects.push(l),n.addLayer(this),i.reset()}this.mapState.needRerender=!0,this.needRerender=!0}},e.prototype.update=function(){if(this.sizeDiffer.check(this.mapState)&&this.resizeFrameBuffer(),(this.needRerender||this.viewDiffer.check(this.mapState))&&this.tree){var t=this.mapState,e=t.zoom,n=t.styleZoom,i=t.styleState,r=this.gl;if(this.throttledFillBuffer(),this.vao&&this.buffers&&this.tree&&this.tileCoords){var o=Object(W.c)(n,i,[]),a=Object(W.i)(this.layer.style.radius,o),s=Object(W.i)(this.layer.style.intensity,o),c=Gt.n*Math.pow(2,e-this.tileCoords[2])*window.devicePixelRatio;this.offscreenProgram.enable(r),this.offscreenProgram.bind(r,{u_mat4_mvp:Li.g(this.mvpMatrix,this.modules.camera.viewProjectionMatrix,this.matrix),u_float_radius:a*window.devicePixelRatio,u_float_intensity:s,u_float_tile_to_pixel_ratio:1/c}),this.vao.bind({gl:r,extensions:this.modules.renderer.webGlExtensions}),this.gl.viewport(0,0,Math.ceil(this.mapState.size[0]*window.devicePixelRatio/this.downscale),Math.ceil(this.mapState.size[1]*window.devicePixelRatio/this.downscale)),this.frameBuffer.bind(r),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.blendFunc(r.ONE,r.ONE),r.enable(r.BLEND),r.drawArrays(r.TRIANGLES,0,this.vertexCount),this.frameBuffer.unbind(r),this.needRerender=!1}}},e.prototype.destroy=function(){if(!this.isDestroyed){t.prototype.destroy.call(this),this.points=[],this.tree=void 0,this.isDestroyed=!0,this.resetBuffers(),this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.frameBuffer.remove(this.gl);var e=this.modules.imageManager;e.deleteTexture(this.offscreenTextureIndex),e.deleteTexture(this.rampTextureIndex)}},e.prototype.resetBuffers=function(){if(this.buffers){for(var t in this.buffers)this.buffers[t].remove();this.buffers=void 0}this.vao&&(this.vao.remove(),this.vao=void 0)},e}(k),La=n(56),Ta=function(t){function e(e,n){var i=t.call(this,e)||this;i.options=n,i.isHidden=!1,i.isInteractive=!!i.options.interactive,i.position=Object(s.l)(i.options.coordinates),i.isDestroyed=!1;var r=i.modules,o=r.dynamicStyle,a=r.collector,c=r.renderer,l=r.tileManager,u=r.identifier,d=r.layers,f=r.imageManager;return Promise.resolve().then((function(){var t=i.options.image,e=t.url,n=t.size,r=t.pixelRatio;return f.loadTexture(e,{size:n,pixelRatio:r,imagePadding:Gt.a})})).then((function(t){if(void 0!==t&&!i.isDestroyed){var e=i.options,n=e.image,r=e.targetSize,s=e.offset,f=Object(H.d)({type:"stretchableImage",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{sourceSize:n.size,targetSize:r,offset:s,stretchX:n.stretchX,stretchY:n.stretchY,pixelRatio:n.pixelRatio}});if(f){o.addLayer(f,i.options.zIndex),i.styleLayerId=f.innerId,Object(N.b)({collector:a,generator:Dn.a.generate,args:[o.getStyle().id,f,O.d,Object(Z.c)({id:i.isInteractive?[0,0]:void 0}),t,[0,0]]});var h=a.getAccumulatedData(),p=new C.a("dynamicObject",h.data,c,Object(U.s)(i.position));i.isInteractive&&i.identifyIds.push(h.identifyIds),i.isHidden||l.addObject(p),i.tileObjects.push(p),d.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.isInteractive&&u.resetCache()}}})),i}return Object(M.c)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.isInteractive&&this.modules&&this.modules.identifier.resetCache(),this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),t.prototype.destroy.call(this)},e.prototype.hide=function(){var t=this;this.isHidden||(this.isHidden=!0,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.removeObject(e)})))},e.prototype.show=function(){var t=this;this.isHidden&&(this.isHidden=!1,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.addObject(e)})))},e.prototype.setCoordinates=function(t){var e=this;this.position=Object(s.l)(t),this.tileObjects.forEach((function(t){t.setTileCoords(Object(U.s)(e.position))})),0===this.tileObjects.length||this.isHidden||(this.mapState.needRerender=!0)},e}(k),ka=n(59),za=[0,0],Ca=[0,0,0,0],Ea=function(t){function e(e,n){var i,r,c,l,u,d,f,h,p,m=t.call(this,e)||this;m.status="visible",m.coordinates=n.coordinates,m.options=n;var v=null!==(i=n.font)&&void 0!==i?i:"Open_Sans",_=null!==(r=n.fontSize)&&void 0!==r?r:o.fonts.baseSize,y=null!==(c=n.letterSpacing)&&void 0!==c?c:0,g=null!==(l=n.lineHeight)&&void 0!==l?l:o.fonts.baseLineHeight,b=null!==(u=m.options.offset)&&void 0!==u?u:za,w=Object(H.d)({type:"point",id:"dynamic-pointLabel-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{textFont:v,textFontSize:_,textColor:null!==(d=n.color)&&void 0!==d?d:"#000000",textHaloWidth:null!==(f=n.haloRadius)&&void 0!==f?f:0,textHaloColor:null!==(h=n.haloColor)&&void 0!==h?h:"#ffffff",textLetterSpacing:y,textLineHeight:g,textOffset:b}});if(m.position=Object(s.l)(m.options.coordinates),!w)return m;var x=m.modules,S=x.dynamicStyle,I=x.collector,j=x.assetManager,M=x.styleManager,P=x.renderer,L=x.tileManager,T=x.layers,k=x.defaultSource,z=null!==(p=m.options.zIndex)&&void 0!==p?p:0;S.addLayer(w,z+(m.options.image?1e-5:0));var E=Object(Z.c)({db_label:m.options.text}),A=Object(U.s)(m.position);Object(N.b)({collector:I,generator:ka.a,args:[S.getStyle(),w,A,k.getId(),{},O.c,E,[[0],[0]],Object(ra.c)(window.devicePixelRatio)]});var D=I.getAccumulatedData();if(!D.labels.length)return m;var F=[{metatileHash:-1,labels:D.labels,styleId:S.getStyle().id}],R=Object(La.b)(F,Or.c.DynamicObject,M,m.mapState.styleState,m.mapState.styleZoom);if(1!==R.length)return m;var B=R[0];return oa.d.then((function(){var t;B.label=null!==(t=Object(oa.c)(B.label))&&void 0!==t?t:"",B.updateRanges()})).then((function(){return Promise.all(B.ranges.map((function(t){return j.loadFont(v,t)})))})).then((function(){if("destroyed"!==m.status){B.textMetrics=Object(ar.c)(B.label,y,j.getFontGlyphs(v));var t=m.options.image,i=function(t){return[t&&void 0!==t[0]?Object(a.c)(t[0],0,1):.5,t&&void 0!==t[1]?Object(a.c)(t[1],0,1):.5]}(n.anchor),r=_/o.fonts.baseSize,s=_*g*B.textMetrics.lines.length,c=r*B.textMetrics.maxWidth,l=[-c*(i[0]-.5),-s*(i[1]-.5)],u=b[0],d=b[1];Object(N.b)({collector:I,generator:ve.d,args:[B,1,B.textMetrics,[0,0,0],0,[u+l[0],d+l[1]],w,S.getStyle().fontNameToIndex[v]]});var f=I.getAccumulatedData();if(m.tileObject=new C.a("dynamicObject",f.data,P,Object(U.s)(m.position)),"visible"===m.status&&L.addObject(m.tileObject),T.addLayer(m),m.tileObjects.push(m.tileObject),I.reset(),m.mapState.needRerender=!0,t){var h=t.padding||Ca,p=h[0],x=h[1],O=h[2],M=h[3];m.backgroundImage=new Ta(e,{image:t,coordinates:m.coordinates,targetSize:[c+M+x,s+p+O],offset:[(x-M)/2+u+l[0],(O-p)/2+d+l[1]],zIndex:z,minZoom:m.options.minZoom,maxZoom:m.options.maxZoom}),"hidden"===m.status&&m.backgroundImage.hide()}}})),m}return Object(M.c)(e,t),e.prototype.hide=function(){"visible"===this.status&&(this.status="hidden",this.tileObject&&this.modules.tileManager.removeObject(this.tileObject),this.backgroundImage&&this.backgroundImage.hide())},e.prototype.show=function(){"hidden"===this.status&&(this.status="visible",this.tileObject&&this.modules.tileManager.addObject(this.tileObject),this.backgroundImage&&this.backgroundImage.show())},e.prototype.remove=function(){"destroyed"!==this.status&&(t.prototype.destroy.call(this),this.backgroundImage&&this.backgroundImage.destroy(),this.status="destroyed")},e.prototype.setCoordinates=function(t){var e=this;"destroyed"!==this.status&&(this.coordinates=t,this.position=Object(s.l)(t),this.tileObjects.forEach((function(t){t.setTileCoords(Object(U.s)(e.position))})),this.backgroundImage&&this.backgroundImage.setCoordinates(t),0!==this.tileObjects.length&&"visible"===this.status&&(this.mapState.needRerender=!0))},e.prototype.getCoordinates=function(){return Object(s.m)(this.position)},e}(k),Aa=n(18),Da=[.5,.5],Fa=[0,18],Ra=function(t){function e(e,n){var i=t.call(this,e,n.draggable)||this;i.map=e;var r=n.coordinates,c=n.size,l=n.zIndex,u=n.minZoom,d=n.maxZoom,f=n.interactive,h=n.hoverIcon,p=n.hoverSize,m=n.hoverAnchor,v=n.label,_=n.rotation;i.status="normal",i.position=Object(s.l)(r),i.rotation=Object(a.e)(null!=_?_:0),i.zIndex=void 0!==l?l:0,i.minZoom=null!=u?u:-1/0,i.maxZoom=null!=d?d:1/0,i.interactive=void 0===f||f;var y=void 0!==n.icon?n.icon:o.defaultMarkerIcon,g=void 0!==n.icon?n.anchor:o.defaultMarkerAnchor;return i.on("mouseover",i.switchToHoveredStyle),i.on("mouseout",i.switchToNormalStyle),i.modules.layers.addLayer(i),i.setIcon({icon:y,anchor:g,size:c}),void 0!==h&&i.setHoverIcon({icon:h,anchor:m,size:p}),i.setLabel(v),i}return Object(M.c)(e,t),e.prototype.destroy=function(){var e;"destroyed"!==this.status&&(this.status="destroyed",null===(e=this.label)||void 0===e||e.remove(),this.interactive&&this.modules.identifier.resetCache(),this.off("mouseover",this.switchToHoveredStyle),this.off("mouseout",this.switchToNormalStyle),t.prototype.destroy.call(this))},e.prototype.setRotation=function(t){"destroyed"!==this.status&&(this.rotation=Object(a.e)(t),this.normalStateData&&(this.normalStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0),this.hoverStateData&&(this.hoverStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0))},e.prototype.getRotation=function(){return Object(a.m)(this.rotation)},e.prototype.setIcon=function(t){var e=this;"destroyed"!==this.status&&this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.normalStateData,r=e.getMarkerStateData(n,t);"normal"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&(Object(a.g)(e.tileObjects,i.tileObject),Object(a.g)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.normalStateData=r}}))},e.prototype.setHoverIcon=function(t){var e=this;if("destroyed"!==this.status)return t?void this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.hoverStateData,r=e.getMarkerStateData(n,t);"hover"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&(Object(a.g)(e.tileObjects,i.tileObject),Object(a.g)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.hoverStateData=r}})):("hover"===this.status&&this.switchToNormalStyle(),void(this.hoverStateData&&(Object(a.g)(this.tileObjects,this.hoverStateData.tileObject),Object(a.g)(this.identifyIds,this.hoverStateData.identifyIds),this.hoverStateData.tileObject.clean(this.mapState),this.hoverStateData=void 0)))},e.prototype.setLabel=function(t){var e,n,i,r,o;"destroyed"!==this.status&&(null===(e=this.label)||void 0===e||e.remove(),t&&(this.label=new Ea(this.map,Object(M.a)(Object(M.a)({coordinates:this.getCoordinates()},t),{minZoom:Math.max(null!==(n=t.minZoom)&&void 0!==n?n:this.minZoom,this.minZoom),maxZoom:Math.min(null!==(i=t.maxZoom)&&void 0!==i?i:this.maxZoom,this.maxZoom),fontSize:null!==(r=t.fontSize)&&void 0!==r?r:18,anchor:t.anchor||Da,offset:t.offset||Fa,zIndex:null!==(o=t.zIndex)&&void 0!==o?o:this.zIndex+1e-5}))))},e.prototype.setCoordinates=function(t){var e;this.setPosition(Object(s.l)(t)),null===(e=this.label)||void 0===e||e.setCoordinates(t)},e.prototype.getCoordinates=function(){return Object(s.m)(this.getPosition())},e.prototype.show=function(){var t;"hidden"===this.status&&(null===(t=this.label)||void 0===t||t.show(),this.normalStateData&&(this.modules.tileManager.addObject(this.normalStateData.tileObject),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="normal")},e.prototype.hide=function(){var t,e,n;if("destroyed"!==this.status&&"hidden"!==this.status){null===(t=this.label)||void 0===t||t.hide();var i="normal"===this.status?null===(e=this.normalStateData)||void 0===e?void 0:e.tileObject:null===(n=this.hoverStateData)||void 0===n?void 0:n.tileObject;i&&(this.modules.tileManager.removeObject(i),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="hidden"}},e.prototype.setPosition=function(t){this.position=t,this.tileObjects.length&&(this.tileObjects.forEach((function(e){e.setTileCoords(Object(U.s)(t))})),"hidden"!==this.status&&(this.mapState.needRerender=!0))},e.prototype.getPosition=function(){return this.position},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.normalStateData)return!1;var e=this.hoverStateData,n=this.normalStateData,i=void 0!==e?e.size:n.size,r=void 0!==e?e.anchor:n.anchor,o=this.modules.camera.project(this.position),a=o[0]-i[0]*r[0],s=o[0]+i[0]*(1-r[0]),c=o[1]-i[1]*r[1],l=o[1]+i[1]*(1-r[1]);return t[0]>a&&t[0]<s&&t[1]>c&&t[1]<l},e.prototype.switchToHoveredStyle=function(){if("normal"===this.status&&this.hoverStateData&&this.normalStateData){var t=this.modules.tileManager;t.removeObject(this.normalStateData.tileObject),t.addObject(this.hoverStateData.tileObject),this.status="hover",this.mapState.needRerender=!0}},e.prototype.switchToNormalStyle=function(){if("hover"===this.status&&this.normalStateData&&this.hoverStateData){var t=this.modules.tileManager;t.removeObject(this.hoverStateData.tileObject),t.addObject(this.normalStateData.tileObject),this.status="normal",this.mapState.needRerender=!0}},e.prototype.getMarkerStateData=function(t,e){var n=e.icon,i=e.anchor,r=e.size,o=this.zIndex,a=this.interactive,s=this.position,c=this.modules,l=c.collector,u=c.renderer,d=c.dynamicStyle,f=c.styleManager,h=c.defaultSource,p=Object(Z.c)({id:a?[0,0]:NaN,dpi:96*window.devicePixelRatio}),m=Object(U.s)(s),v=Object(H.d)({type:"point",id:"dynamic-marker-"+this.uniqId,minzoom:this.minZoom,maxzoom:this.maxZoom,style:{iconImage:n,iconAnchor:i,iconRotation:this.rotation}});if(!v)throw new Error("Marker with icon "+n+" was created with null style layer");d.addLayer(v,o),d.appendRasterSet(t,Object(Aa.b)(n,v.style.iconAnchor[0],v.style.iconAnchor[1])),Object(N.b)({collector:l,generator:ka.a,args:[d.getStyle(),v,m,h.getId(),{},O.c,p,[[0],[0]],Object(ra.c)(window.devicePixelRatio)]});var _=l.getAccumulatedData(),y=_.identifyIds,g=_.labels;if(!g.length)throw new Error("Marker with icon "+n+" was created with empty labels");var b=[{metatileHash:-1,labels:g,styleId:d.getStyle().id}],w=Object(La.b)(b,Or.c.DynamicObject,f,this.mapState.styleState,this.mapState.styleZoom);if(1!==w.length)throw new Error("Marker with icon "+n+" has empty unpacked labels");var x=w[0];Object(ve.c)(l,x,[0,0,0],0,t.rasters[0]);var S=l.getAccumulatedData().data;return l.reset(),{styleLayer:v,tileObject:new C.a("dynamicObject",S,u,m,this),identifyIds:y,icon:n,anchor:[t.rasters[0].anchorX,t.rasters[0].anchorY],size:r||[t.rasters[0].w/window.devicePixelRatio,t.rasters[0].h/window.devicePixelRatio]}},e}(B),Ba=n(26),Na=n(23),Ua=Object(Ba.a)({symbol:"",sinks:{fill:{stride:8,binder:function(t,e){t.views.position=new Uint16Array(e),t.views.localID=new Uint32Array(e,4)},packObjectAttributes:function(t,e,n,i,r){return Object(Na.c)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},generate:function(t,e,n,i,r,o){var a=o[0],s=o[1],c=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),l=t.getBucket(n.type,"fill",Ua.sinks.fill.packObjectAttributes(e,n.innerId,n.dataKeys,i,r),Ua.sinks.fill.binder),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+2,c[l+4]=e+1,c[l+5]=e+3,t.offset=l+6}(l.indices,u),Za(l,u++,a[0],s[0],c),Za(l,u++,a[1],s[1],c),Za(l,u++,a[2],s[2],c),Za(l,u++,a[3],s[3],c),l.elements.offset=u}});function Za(t,e,n,i,r){var o=4*e;t.views.position[o]=n,t.views.position[o+1]=i;var a=2*e;t.views.localID[a]=r}var Ha=function(t){function e(e,n){var i=t.call(this,e)||this,r=i.modules,o=r.dynamicStyle,a=r.collector,c=r.renderer,d=r.tileManager,f=r.identifier,h=r.layers;i.options=n,i.points=[];var p=Object(H.d)({type:"polygon",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{color:i.options.color||"#0085a0"}});if(!p)return i;o.addLayer(p,i.options.zIndex),i.layerId=p.innerId;var m,v,_,y,g,b,w=Object(Z.c)({id:i.options.interactive?[0,i.uniqId]:NaN});i.points=(m=Object(s.l)(i.options.center),v=Object(s.c)(i.options.center,i.options.width)/2,_=Object(s.c)(i.options.center,i.options.height)/2,[[(y=m[0])-v,(g=m[1])-_,b=m[2]],[y+v,g-_,b],[y-v,g+_,b],[y+v,g+_,b]]);for(var x=u.e(),S=0;S<i.points.length;S++)u.f(x,i.points[S]);var I=Object(U.i)(x),j=Object(U.e)(I),M=[[],[]],P=l.d();for(S=0;S<i.points.length;S++)Object(U.t)(P,i.points[S],j),M[0][S]=P[0],M[1][S]=P[1];Object(N.b)({collector:a,generator:Ua.generate,args:[o.getStyle().id,p,O.d,w,M]});var L=a.getAccumulatedData(),T=new C.a("dynamicObject",L.data,c,I);return d.addObject(T),i.tileObjects.push(T),i.options.interactive&&i.identifyIds.push(L.identifyIds),h.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.options.interactive&&f.resetCache(),i}return Object(M.c)(e,t),e.prototype.destroy=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),this.options.interactive&&this.modules&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e}(k),Ga=n(80),Wa=function(){function t(t,e,n){var i=this;this.id=t,this.modules=e,this.options=n,this.type="raster",this.textureIndices={},this.tileLoader=new Ga.a("arrayBuffer"),this.attributes={},this.tiles=new Map,this.sourceAttrs=n.attributes||{},this.url=function(t){var e=Object(U.A)(t),n=e[0],r=e[1],o=e[2];return i.options.url(n,r,o)}}return t.prototype.deleteTextures=function(){for(var t in this.textureIndices)this.modules.imageManager.deleteTexture(this.textureIndices[t]);this.textureIndices={}},t.prototype.abortTileFetch=function(t){this.tileLoader.abortRequest(Object(U.c)(t))},t.prototype.deleteTile=function(t){var e=Object(U.c)(t);this.tiles.delete(e)},t.prototype.fetchTile=function(t){var e=this,n=Object(U.c)(t),i=this.url(t);return this.tileLoader.fetch(t,(function(){return i})).then((function(t){return e.tiles.set(n,t),[{regionId:0,metatileHash:-1}]}))},t.prototype.generateTile=function(t,e,n,i){return Object(M.b)(this,void 0,void 0,(function(){var n,i,r,o,a,s,c,u,d,f,h,p,m,v=this;return Object(M.d)(this,(function(_){switch(_.label){case 0:return n=[],i=[],r=this.modules.styleManager.getStyle(t.handyStyleId),o=Object(U.c)(e),(a=this.tiles.get(o))&&r?[4,this.modules.imageManager.addTexture(a,{imagePadding:0})]:[2,Promise.resolve({results:n,transferable:i})];case 1:if(void 0===(s=_.sent()))return[2,Promise.resolve({results:n,transferable:i})];for(this.textureIndices[o]=s,c=[[],[]],u=l.d(),d=function(t,e){var n=t[0],i=t[1],r=t[2];return[[n,i,r],[n+e,i,r],[n,i+e,r],[n+e,i+e,r]]}(Object(U.z)(e),Object(U.D)(e[2])),f=Object(U.e)(e),h=0;h<d.length;h++)Object(U.t)(u,d[h],f),c[0][h]=u[0],c[1][h]=u[1];return p=Object(W.d)(Object(O.a)([]),t.styleState,this.sourceAttrs,{},[]),r.layers.filter((function(t){return"raster"===t.type&&Object(W.h)(t.filter,p)})).forEach((function(t){"raster"===t.type&&Object(N.b)({collector:v.modules.collector,generator:Fn.a.generate,args:[c,r.id,t,s]})})),m=this.modules.collector.getAccumulatedData(),n.push({regionId:0,metatileHash:0,styleId:r.id,collectorOutput:m}),i.push.apply(i,m.transferable),[2,Promise.resolve({results:n,transferable:i})]}}))}))},t.prototype.getAttributes=function(){return this.attributes},t.prototype.setAttributes=function(t){this.attributes=t},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),Va=function(){function t(t,e){var n,i;this.type="raster",this.id=Object(ta.a)(),this.modules=t.modules,this.source=new Wa(this.id,this.modules,e);var r=null!==(n=e.minZoom)&&void 0!==n?n:o.MAP_DEFAULTS.minZoom,a=null!==(i=e.maxZoom)&&void 0!==i?i:o.MAP_DEFAULTS.maxZoom;this.layer=new Qo.a(r,a,r,a,this.modules,t.state,this.source),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.source.deleteTextures(),this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy()},t.prototype.getAttributes=function(){return this.source.getAttributes()},t.prototype.getId=function(){return this.source.id},t.prototype.setAttributes=function(t){this.source.setAttributes(t),this.layer.redraw()},t}(),qa=function(t){function e(e,n){var i,r=t.call(this,e)||this;return r.position=Object(s.l)(n.coordinates),r.zIndex=null!==(i=n.zIndex)&&void 0!==i?i:0,r.isDestroyed=!1,r.labelKey="onlineMarker-"+r.uniqId,r.setIcon(n.icon),r}return Object(M.c)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.modules.identifier.resetCache(),this.modules.labeler.removeLabels(this.labelKey),t.prototype.destroy.call(this)},e.prototype.setIcon=function(t){var e=this,n=t.url,i=t.transformer,r=t.size,o=t.anchor;this.modules.imageCache.getRasterSet(n,i,r,o).then((function(t){if(!e.isDestroyed){e.removeIcon();var i=Object(H.d)({type:"point",id:"dynamic-onlineMarker-"+e.uniqId,minzoom:-1/0,maxzoom:1/0,style:{iconImage:n,iconAnchor:o}}),a=Object(Z.c)({id:[0,0]}),s=e.modules,c=s.collector,l=s.dynamicStyle,u=s.styleManager,d=s.defaultSource,f=e.zIndex;if(i){l.addLayer(i,f),l.appendRasterSet(t,Object(Aa.b)(n,i.style.iconAnchor[0],i.style.iconAnchor[1]));var h=Object(U.s)(e.position);Object(N.b)({collector:c,generator:ka.a,args:[l.getStyle(),i,h,d.getId(),{},O.c,a,[[0],[0]],Object(ra.c)(window.devicePixelRatio)]});var p=c.getAccumulatedData(),m=p.identifyIds,v=p.labels;if(v.length){var _=[{metatileHash:-1,labels:v,styleId:l.getStyle().id}],y=Object(La.b)(_,Or.c.DynamicObject,u,e.mapState.styleState,e.mapState.styleZoom);if(1===y.length){var g=y[0];Object(ve.c)(c,g,[0,0,0],0,t.rasters[0]);var b=c.getAccumulatedData();c.reset();var w=new C.a("dynamicObject",b.data,e.modules.renderer,Object(U.s)(e.position),e);e.tileObjects.push(w),e.identifyIds=[m],e.modules.tileManager.addObject(w),e.modules.layers.addLayer(e),e.modules.identifier.debouncedFillCache(),e.modules.labeler.removeLabels(e.labelKey),e.modules.labeler.addLabelBox(e.labelKey,{id:e.uniqId,width:r[0],height:r[1],position:e.position,offset:[-o[0],-o[1]],labelingGroup:"marker"}),e.mapState.needRerender=!0}}}}}))},e.prototype.removeIcon=function(){var t=this.tileObjects[0];t&&(t.clean(this.mapState),this.modules.tileManager.removeObject(t),this.tileObjects=[])},e}(k);function Ya(t){return{type:"data",key:Object(U.c)(t),coords:t,zoomLevel:t[2],detailLevel:t[3],needFetch:!1,needAbortFetch:!1,status:Oo.a.Initial}}var Xa=function(t){function e(e,n,i){var r=t.call(this)||this;return r.prevZoomLevel=0,r.mapState=e,r.modules=n,r.config=i,r.gridState=function(t,e,n,i,r){return function(t,e,n,i,r,o){return{type:"data",maxDetailLevel:o,minDetailLevel:r,maxZoomLevel:i,minZoomLevel:n,zoomLevel:Math.floor(e),tiles:{},viewportTiles:[]}}(0,t,e,n,i,r)}(e.styleZoom,i.minZoom,i.maxZoom,i.minZoom,i.maxZoom),r.viewportDiffer=new It([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}]),r.dataTileLoader=new Ga.a("json"),r.modules.layers.addLayer(r),r}return Object(M.c)(e,t),e.prototype.destroy=function(){var t;(t=this.gridState).tiles={},t.viewportTiles=[],this.modules.layers.removeLayer(this)},e.prototype.update=function(){var t=!0;if(this.viewportDiffer.check(this.mapState)){var e=Math.floor(this.mapState.styleZoom);e!==this.prevZoomLevel&&(t=!1),this.prevZoomLevel=e,this.gridState.zoomLevel=e,function(t,e,n){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var i=Object(a.c)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),r=Object(a.c)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=Object(U.h)(e,i,r);for(var o=0;o<t.viewportTiles.length;o++){var s=t.viewportTiles[o],c=t.tiles[s];c||(c=t.tiles[s]=n(Object(U.q)(s)))}}}(this.gridState,this.modules.camera.viewportVertices,Ya),this.emit("tilesSetChanged",{tileIds:this.gridState.viewportTiles})}for(var n in this.gridState.tiles)this.gridState.viewportTiles.includes(n)?this.gridState.tiles[n].status===Oo.a.Initial&&(this.gridState.tiles[n].needFetch=!0,this.gridState.tiles[n].status=Oo.a.Loading):this.gridState.tiles[n].status===Oo.a.Loading&&(this.gridState.tiles[n].needAbortFetch=!0);t&&(this.fetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}(this.gridState)),this.abortFetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}(this.gridState)),this.clearTiles(function(t,e){var n=new Set(t.viewportTiles),i=[];for(var r in t.tiles){var o=t.tiles[r];!n.has(r)&&i.push(o)}return i}(this.gridState)))},e.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return Object(U.a)(e.mapState.center,t,n)})).forEach((function(t){return e.fetchTile(t)}))},e.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){e.dataTileLoader.abortRequest(t.key)}))},e.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];delete this.gridState.tiles[i.key],this.emit("dataTileCleared",{tileId:i.key})}},e.prototype.fetchTile=function(t){var e=this,n=this.config.tsURLTemplate;this.dataTileLoader.fetch(t.coords,n).then((function(n){e.emit("dataTileLoaded",{tileId:t.key,data:n})}))},e}(P.a)},function(t,e,n){"use strict";n.r(e);var i=n(0),r=n(70),o=n.n(r),a=n(51),s=n(1),c=n(6),l=n(29),u=n(64),d=n(82),f=n(50),h=n(25),p=n(31),m=n(38),v=n(4),_=n(62),y=n(59),g=n(35),b=[[0],[0],[0]],w=[[0],[0],[0]],x={};function S(t,e,n,i,r,o,a,c){var l=n.tileProps;e[l.db_height]=s.floors.islandHeight,e[l.db_sublayer]=t.areaSublayer,e[l.selected]=c?1:0,e[l.db_region]=a,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,x,l,e)))for(var s=0;s<t.area.length;s++){var c=M(t.area[s]),f=O(c),h=f.x,p=f.y,m=u(c);b[0].length=0,b[1].length=0,b[2].length=0;for(var _=0;_<m.length;_+=3){for(var y=0;y<3;y++)b[0][y]=h[m[_+y]],b[1][y]=p[m[_+y]],b[2][y]=1;do{d.a.generate(o,i.id,a,n,r,x,l,e,b,!1)}while(o.isOverloaded())}}}))}function I(t,e,n,i,r,o,a,s){var c=n.tileProps;e[c.db_sublayer]=t.areaSublayer,e[c.selected]=s?1:0,e[c.db_region]=a,i.layers.forEach((function(a){if("polygon"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,x,c,e)))for(var s=0;s<t.area.length;s++){var l=M(t.area[s]),d=O(l),f=d.x,h=d.y,p=u(l);b[0].length=0,b[1].length=0,b[2].length=0;for(var m=0;m<p.length;m+=3){for(var y=0;y<3;y++)b[0][y]=f[p[m+y]],b[1][y]=h[p[m+y]],b[2][y]=0;do{_.a.generate(o,i.id,a,c,e,b)}while(o.isOverloaded())}}}))}function j(t,e,n,i,r,o,a,c){if(t.wallSublayer){var l=n.tileProps;e[l.db_height]=s.floors.wallHeight,e[l.db_sublayer]=t.wallSublayer,e[l.selected]=c?1:0,e[l.db_region]=a,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,x,l,e)))for(var s=0;s<t.wallTop.length;s++){var c=O(M(t.wallTop[s])),u=c.x,f=c.y,h=c.count;b[0].length=0,b[1].length=0,b[2].length=0;for(var p=0;p<h;p++){var _=Object(m.a)(p,h);b[0][_]=u[p],b[1][_]=f[p],b[2][_]=1}do{d.a.generate(o,i.id,a,n,r,x,l,e,b,!1)}while(o.isOverloaded())}}))}}function O(t){for(var e=[],n=[],i=0;i<t.length/2;i++)e[i]=t[2*i],n[i]=t[2*i+1];return{x:e,y:n,count:e.length}}function M(t){for(var e=new Uint16Array(t.length/2),n=0;n<t.length/2;n++)e[n]=t[2*n]|t[2*n+1]<<8;return e}var P=n(2),L=n(19),T=n(89),k={1:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&255,t[n]=e},2:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&65535,t[n]=e},4:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]>>>0,t[n]=e},8:function(t){for(var e=0,n=0,i=0,r=0;r<t.length;r+=2)n=(i=n+t[r])>>>0,t[r]=n,e=e+t[r+1]+(i>4294967295?1:0)>>>0,t[r+1]=e}},z=function(){function t(t){this.offset=0,this.buffer=t,this.u8=new Uint8Array(t),this.u16=new Uint16Array(t),this.u32=new Uint32Array(t),this.s8=new Int8Array(t),this.s16=new Int16Array(t),this.s32=new Int32Array(t),this.f32=new Float32Array(t)}return t.prototype.readS8=function(){return this.s8[this.offset++]},t.prototype.readU16=function(){var t=this.u16[this.offset>>1];return this.offset+=2,t},t.prototype.readU32=function(){var t=this.u32[this.offset>>2];return this.offset+=4,t},t.prototype.readF32=function(){var t=this.f32[this.offset>>2];return this.offset+=4,t},t.prototype.readU8Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t,n=3&-e,i=this.u8.subarray(this.offset,this.offset+e);return this.offset+=e+n,i},t.prototype.readU16Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t*2,n=3&-e,i=this.u16.subarray(this.offset>>1,this.offset+e>>1);return this.offset+=e+n,i},t}();function C(t,e,n,i){var r=e.BYTES_PER_ELEMENT;t.offset+=-t.offset&r-1;var o=new e(t.buffer,t.offset,n);return t.offset+=r*n,i&&k[r](o),o}function E(t,e,n){t.offset+=7&-t.offset;var i=new Uint32Array(t.buffer,t.offset,2*e);return t.offset+=8*e,n&&k[8](i),i}function A(t,e,n){t.offset+=3&-t.offset;var i,r=new Uint32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=a/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function D(t,e,n){t.offset+=3&-t.offset;var i,r=new Int32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=(0|a)/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function F(t,e,n){switch(n){case 2:return C(t,Uint8Array,e);case 3:return C(t,Uint8Array,e,!0);case 4:return C(t,Uint16Array,e);case 5:return C(t,Uint16Array,e,!0);case 6:return C(t,Uint32Array,e);case 7:return C(t,Uint32Array,e,!0);case 8:return E(t,e);case 9:return E(t,e,!0);case 10:return C(t,Uint8Array,e);case 11:return function(t,e){for(var n=t.offset,i=t.u8,r=t.buffer,o=[];e--;)o.push(0|i[n++]);for(var a=[];++e<o.length;){var s=o[e];255===s&&(s=i[n++]|i[n++]<<8|i[n++]<<16|0),a.push(new Uint8Array(r,n,s)),n+=s}return t.offset=n,a}(t,e);case 12:return function(t,e){t.offset+=3&-t.offset;for(var n=t.offset,i=t.u32,r=t.buffer,o=[],a=0;a<e;a++)o.push(i[n>>2]),n+=4;var s=[];for(a=0;a<e;a++){var c=o[a];n+=7&-n,s.push(new Uint8Array(r,n,c)),n+=c}return t.offset=n,s}(t,e);case 13:return C(t,Int8Array,e);case 14:return C(t,Int8Array,e,!0);case 15:return C(t,Int16Array,e);case 16:return C(t,Int16Array,e,!0);case 17:return C(t,Int32Array,e);case 18:return C(t,Int32Array,e,!0);case 19:return E(t,e);case 20:return E(t,e,!0);case 21:return A(t,e);case 22:return A(t,e,!0);case 23:return D(t,e);case 24:return D(t,e,!0);case 25:return C(t,Uint32Array,e);default:throw new Error("Unknown stream type "+n)}}function R(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e}function B(t,e,n){return new t.constructor(t.buffer,t.byteOffset+e*t.BYTES_PER_ELEMENT,n)}function N(t,e,n,i,r,o,a){var s=r.modelIndex,c=r.matrix,l=r.offset,u=r.id,d=r.selected,f=new z(i),h=[],p={};if(!t)return{objects:n.getAccumulatedData(),textures:h};if(1296191066!==f.readU32()||1!==f.readU16())return{objects:n.getAccumulatedData(),textures:[]};f.readU16();for(var m=f.readU32(),_=0;_<m;_++)h.push(f.readU8Vector());var y=o.tileProps,g=[],b=Object.keys(y).length;for(_=0;_<b;_++)g[_]=NaN;g[y.db_sublayer]="Building_model",g[y.id]=u,g[y.selected]=d?1:0,g[y.db_region]=a,n.setGeoIds(new Uint32Array(u));var w=f.offset;return t.layers.forEach((function(i){"buildingModel"===i.type&&Object(v.h)(i.filter,Object(v.d)(o,e,p,y,g))&&(f.offset=w,function(t,e,n,i,r,o,a,s,c){for(var l=i.readU32(),u=0;u<l;u++){var d=i.readU32(),f=P.j(i.readF32(),i.readF32(),i.readF32()),h=P.j(i.readF32(),i.readF32(),i.readF32()),p=P.s(P.d(),h,f),m=L.b();L.l(m,r,f),L.k(m,m,p),m[12]+=o[0],m[13]+=o[1];for(var v=i.readU16Vector(5),_=i.readU32(),y=0;y<_;y++){var g=i.readU32(),b=i.readU16Vector();do{T.a.processSubmesh(t.id,e,a,n,s,v,b,g,d,m,c)}while(n.isOverloaded())}var w=i.readU16Vector();do{T.a.processOuterEdge(t.id,e,a,n,s,v,w,m)}while(n.isOverloaded())}}(t,i,n,f,c,l,o,g,s))})),{objects:n.getAccumulatedData(),textures:h}}var U,Z=n(14),H=n(3),G=n(54),W=[],V=new Int32Array(256),q=[],Y=[],X=[0,0,0,0,0],K=0,J=0,Q=0,$=[];function tt(t,e,n,i,r,o,a,s,c,l){var u=r.tileInfo,d=r.pixelRatio,f=r.selectedIds,h=r.floorsEnabled,m=r.hoverId,v=r.generateOnlySelectedPoi,_=r.generateOnlyHoveredPoi,y=o.data,b=new p.a(f),w=Object(H.d)(y);if(w.byteLength<8)return i.getAccumulatedData();W.length=0;var x=new z(w);if(1279676242!==x.readU32())return i.getAccumulatedData();if(2!==x.readU16())return console.error("Unsupported tile format version"),i.getAccumulatedData();x.readU16();var S=u.coords,I=Object(g.c)(d);return function(t){var e=t.u8,n=t.offset,i=t.u32[n>>2];for(K=i,J=n+=4;i--;)n=2*e[n++]+n,n=e[n++]+n;t.offset=n+(3&-n)}(x),function(t){var e=t.u32[t.offset>>2];t.offset+=4,U=C(t,Uint8Array,e);for(var n=C(t,Uint32Array,e),i=0;i<e;i++){var r=U[i];W[i]=F(t,n[i],r),V[i]=0}}(x),function(t,e,n,i,r,o,a,s,c,l,u,d,f,h,p,m){for(var v=K,_=C(r,Int32Array,v),y=R(_),g=C(r,Uint8Array,y,!0),b=C(r,Uint8Array,R(g),!0),w=C(r,Uint8Array,y,!0),x=C(r,Uint8Array,R(w),!0),S=C(r,Uint16Array,y,!0),I=0,j=0,O=0,M=0;M<v;M++){var P=_[M];if(rt(r,c,l),0===M){var L=W[Y[1]];i.setGeoIds(L)}for(var T=0;T<P;T++){var k=g[I];k>0&&(et(l,k,b,j,c),j+=k);var z=w[I];z>0&&(nt(l,z,x,O),O+=z);var E=S[I];E>0&&it(t,e,n,i,E,o,a,s,c,l,u,d,f,h,p,m),I++}}ot()}(t,e,n,i,x,S,I,b,a,s,c,h,l,m,v,_),i.getAccumulatedData()}function et(t,e,n,i,r){for(var o;e--;){var a=n[i++],s=Y[a],c=q[a],l=U[s];if(8===l||9===l||19===l||20===l)t[c]=[W[s][V[s]],W[s][V[s]+1]],V[s]+=2;else{var u=W[s][V[s]];switch(c){case r.tileProps.db_label:case r.tileProps.db_label2:t[c]=Object(G.a)(u);break;default:var d=r.tilePropsByIndex[c];d&&r.reverseDictionaries[d]?t[c]=null!==(o=r.reverseDictionaries[d][u])&&void 0!==o?o:u:t[c]=u}V[s]++}}}function nt(t,e,n,i){for(;e--;){var r=n[i++];t[q[r]]=NaN}}function it(t,e,n,i,r,o,a,c,l,u,d,h,p,m,_,y){for(var g=l.tileProps,b=l.defaultProps,w=o[3],x={},S=0;S<Q;S++){var I=X[S];$[S]=B(W[I],V[I],r),V[I]=V[I]+r}if(void 0===g.db_sublayer||Number.isNaN(u[g.db_sublayer])||!Object(f.a)(u[g.db_sublayer])){var j=u[g.id],O=!Number.isNaN(j)&&c.has(j);_&&(O=!0);var M=!!y;if(!M&&void 0!==m){if(m[0]!==j[0]||m[1]!==j[1])return;M=!0}for(var P in u[g.selected]=O?1:0,u[g.hovered]=M?1:0,b){var L=b[P];Number.isNaN(u[L.index])&&(u[L.index]=L.value)}h&&u[g.hiddenByPlanBuildingId]&&w>=Math.floor(s.floors.displayStyleZoom)&&(d.add(j),i.addFloorHidingMap(j,u[g.hiddenByPlanBuildingId]));var T=Object(v.d)(l,n,x,g,u),k=e.getLayers(t.id,g,u).filter((function(t){return Object(v.h)(t.filter,T)}));Object(Z.a)(i,t,k,w,l,g,u,p,x,n,o,a,$,d,_||y)}}function rt(t,e,n){var i,r,o=Object.keys(e.tileProps).length,a=t.u8,s=J;for(r=1;r<o;r++)n[r]=NaN;for(i=a[s++],r=0;r<i;r++)q[r]=a[s++],Y[r]=a[s++];for(i=a[s++],r=0;r<i;r++)X[r]=a[s++];Q=i,J=s,ot()}function ot(){$.length=0}var at=n(81),st=n(57),ct=n(108),lt=n(41),ut=n(78),dt=n(79),ft=n(16),ht=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t){var e=this,n=t.coords,i=t.tileServer,r=t.tileSet,o=t.tileProtocol,a=t.subdomains,s=t.tileKey,c=t.appId,l=t.lang,u=t.defaultLang,d=t.sessionId;return new Promise((function(t){var f=Object(H.m)(i,r,o,a,n,s,c,l,u,d),h=Object(H.c)(n),p=Object(st.a)({url:f},(function(n,i){var r=!1;if(e.pendingRequests.delete(h),void 0!==n||0===i.byteLength)return void 0!==n&&(console.error(n),403===n.status&&(r=!0)),e.cache.set(h,[]),void t({metadata:[],invalidTileKey:r});var o=Object(H.x)(i),a=Object(H.y)(o);e.cache.set(h,o),t({metadata:a,invalidTileKey:r})}));e.pendingRequests.set(h,{xhr:p,resolve:t})}))},t.prototype.get=function(t){return this.cache.get(t)||[]},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}(),pt=n(12),mt=n(5),vt=[],_t=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e,n,i,r){var o=this;return new Promise((function(a){var c=function(t,e,n,i,r){var o=Math.pow(2,t[2])-1,a=t[0],c=(o-t[1]&16777215)*(1<<24)+(16777215&a);return Object(l.d)(s.traffic.url,{protocol:r,host:i,z:String(t[2]),tiles:String(c),regions:e.join(","),time:String(n)})}(t,i,r,e,n),u=Object(H.c)(t),d=Object(st.b)({url:c},(function(t,e){if(o.pendingRequests.delete(u),void 0!==t)return 204!==t.status&&console.error(t),o.cache.set(u,void 0),void a();var n=e[0];n?o.cache.set(u,n):o.cache.set(u,void 0),a()}));o.pendingRequests.set(u,{xhr:d,resolve:a})}))},t.prototype.get=function(t){return this.cache.get(t)},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}(),yt=n(103),gt=function(t){function e(e){var n=t.call(this)||this;return n.obClassEnumIndex=0,n.sublayerEnumIndex=0,n.workerParserSyncMetatile=e.get(ft.b.Main,"syncMetatile"),n}return Object(i.c)(e,t),e.prototype.addData=function(t){var e=this;this.dictionaries.db_sublayer||(this.dictionaries.db_sublayer={},this.reverseDictionaries.db_sublayer={}),t.sublayers.forEach((function(t){if(void 0===e.dictionaries.db_sublayer[t]){var n=e.sublayerEnumIndex++;e.dictionaries.db_sublayer[t]=n,e.reverseDictionaries.db_sublayer[n]=t}})),this.dictionaries.db_object_class||(this.dictionaries.db_object_class={},this.reverseDictionaries.db_object_class={}),t.objectClasses.forEach((function(t){if(void 0===e.dictionaries.db_object_class[t]){var n=e.obClassEnumIndex++;e.dictionaries.db_object_class[t]=n,e.reverseDictionaries.db_object_class[n]=t}})),this.workerParserSyncMetatile({dictionaries:this.dictionaries,reverseDictionaries:this.reverseDictionaries})},e}(n(100).a),bt=(n(87),n(20),n(15)),wt=n(101),xt=n(102);e.default=function(t){var e=new ut.b(t),n=new dt.a(e),r=new wt.a(n),u=new ht,d=new _t,m=new yt.a,_={main:{addNewRasterSets:n.get(ft.b.Main,"addNewRasterSets")},labeling:{addNewRasterSets:n.get(ft.b.Labeling,"addNewRasterSets")}},b={},O=new p.a,M={},L=new at.a("parser"),T=[],k=function(){var t=L.atlasPacker.getNewRasterSets();t.size&&t.forEach((function(t,e){_.main.addNewRasterSets(e,t),_.labeling.addNewRasterSets(e,t)}))},z=Object(a.a)((function(){return L.reset()}),s.workerResetDebounceTime),C={sources:{},collector:L,styleManager:m,syncNewRasterSets:k,debouncedResetCollector:z};r.set("GeoJsonSource",xt.a,C);var E=function(t,e){b[t]=e};n.set("setMetatile",E);var A=new gt(n);E(c.l,A),n.set("appendHiddenObjectIds",(function(t){t.forEach((function(t){return O.add(t)}))})),n.set("prepareAtlas",(function(e){return new Promise((function(n){Object(st.a)({url:e},(function(e,i){if(e||0===i.byteLength)n(void 0);else if(t.createImageBitmap){var r=new Blob([i],{type:"image/png"});createImageBitmap(r).then((function(t){n({isBitmap:!0,data:[t],transferable:[t]})}))}else n({isBitmap:!1,data:[i],transferable:[i]})}))}))})),n.set("fetchTile",(function(t){return u.fetch(t)})),n.set("deleteTile",(function(t){u.delete(t)})),n.set("abortTileRequest",(function(t){u.abortRequest(t)})),n.set("generateTile",(function(t){var e=t.tileInfo.coords,n=Object(H.c)(e),i=u.get(n),r=[],o=[];return i.forEach((function(e){var n=e.regionId,i=e.metatileHash,a=m.getStyle(t.styleId);if(a){var s=tt(a,m,t.styleState,L,t,e,b[i],T,O,t.sourceId);r.push({regionId:n,metatileHash:i,collectorOutput:s,styleId:a.id}),o.push.apply(o,s.transferable)}})),z(),k(),{results:r,transferable:o}})),n.set("fetchTrafficTile",(function(t){return d.fetch(t.coords,t.tileServer,t.tileProtocol,t.regionIds,t.timestamp)})),n.set("deleteTrafficTile",(function(t){d.delete(t)})),n.set("abortTrafficTileRequest",(function(t){d.abortRequest(t)}));var D=Object(bt.a)(["db_sublayer","traffic_road_class","traffic_color","traffic_road_z_level"],["Traffic_jams"]);n.set("generateTrafficTile",(function(t){var e=t.coords,n=t.pixelRatio,i=t.styleState,r=t.styleId,o=t.sourceId,a=Object(H.c)(e),s=[],c=[],l=m.getStyle(r);if(!l)return{results:s,transferable:c};var u=d.get(a);if(u){var f=function(t,e,n,i,r,o,a,s){if(!n)return t.getAccumulatedData();for(var c=a[3],l=e.tileProps,u=Object.keys(l).length,d=[],f=Object(g.c)(r),h={},m=0,_=o.tile;m<_.length;m++){for(var y=_[m],b=y.color,w=void 0===b?0:b,x=y.geo,S=y.road,I=y.normals,j=y.zLevel,O=void 0===j?0:j,M=0;M<u;M++)d[M]=NaN;d[l.db_sublayer]="Traffic_jams",d[l.traffic_color]=w,d[l.traffic_road_class]=S,d[l.traffic_road_z_level]=O,d[l.beginningIsCut]=0,d[l.endingIsCut]=0;var P=function(r){for(var o=x[r],u=I[r],m=[[],[],[],[]],_=0;_<o.length;_++)m[0][_]=o[_][0],m[1][_]=o[_][1],m[2][_]=u[_][0],m[3][_]=u[_][1];var y=Object(v.d)(e,i,h,l,d),g=n.layers.filter((function(t){return Object(v.h)(t.filter,y)}));Object(Z.a)(t,n,g,c,e,l,d,s,h,i,a,f,m,new p.a)};for(M=0;M<x.length;M++)P(M)}return t.getAccumulatedData()}(L,D,l,i,n,u,e,o);s.push({regionId:1,metatileHash:0,styleId:l.id,collectorOutput:f})}return{results:s,transferable:c}})),n.set("packRasters",(function(t){for(var e=0;e<t.length;e+=3){var n=t[e+2],i={type:lt.b.Loaded,isSvg:!1,index:n,key:"loaded-"+n,name:"",fileName:"",rasters:[{rasterSetIndex:n,rasterIndex:0,w:t[e],h:t[e+1],atlasIndex:0,x:0,y:0,isPacked:!1,anchorX:0,anchorY:0}]};L.atlasPacker.pack(i,[t[e]],1)}var r=L.atlasPacker.getPackedRasters(),o=[];return void 0!==r&&o.push(r.buffer),{packedRasters:r,transferable:o}})),n.set("generateModel",(function(e){var n=e.regionId,r=e.metatileHash,o=e.fileName,a=e.tileServer,s=e.tileProtocol,c=e.tileSet,u=e.subdomain,d=e.styleId,f=Object(l.b)("model",{host:a,tileSet:c,protocol:s,subdomain:u,regionId:n.toString(),name:o});return new Promise((function(o){Object(st.a)({url:f},(function(a,s){if(a||0===s.byteLength)o({objects:L.getAccumulatedData(),textures:{isBitmap:!1,data:[]}});else{var c=m.getStyle(d);if(c){var l=N(c,e.styleState,L,s,e,b[r],n),u=l.objects,f=l.textures;if(t.createImageBitmap){var h=f.map((function(t){var e=new Blob([t],{type:"image/png"});return createImageBitmap(e)}));Promise.all(h).then((function(t){o({objects:u,textures:{isBitmap:!0,data:t},transferable:Object(i.e)(Object(i.e)([],u.transferable),t)}),z()}))}else o({objects:u,textures:{isBitmap:!1,data:f},transferable:Object(i.e)(Object(i.e)([],u.transferable),[s])}),z()}else o({objects:L.getAccumulatedData(),textures:{isBitmap:!1,data:[]}})}}))}))})),n.set("loadFloor",(function(t,e){return new Promise((function(n){Object(st.a)({url:e+"/complexes/"+t+"?fields=floorGeometries&format=pbf"},(function(e,r){if(e||0===r.byteLength)n({type:"error",errorStatus:e?e.status:0});else{var a=new o.a(r),s=ct.Complex.read(a),c=s.tileCoords;M[t]=Object(i.a)(Object(i.a)({},s),{tileCoords:[c[0],c[1],c[2],c[2]]}),A.addData(function(t){for(var e=new Set,n=new Set,i=t.floorGeometries,r=t.entities,o=0;o<i.length;o++)for(var a=i[o].rooms,s=0;s<a.length;s++){var c=a[s],l=c.sublayer,u=c.areaSublayer,d=c.wallSublayer;e.add(l),d&&e.add(d),e.add(u)}for(o=0;o<r.length;o++){var f=r[o],h=f.humanReadableIconId;l=f.sublayer,e.add(l),h&&n.add(h)}return{sublayers:e,objectClasses:n}}(M[t]));var l={};s.entities.forEach((function(t){t.firmId&&(l[t.firmId]=t.floorIndex)})),n({type:"success",center:s.center,bound:s.bound,defaultFloor:s.defaultFloor,floors:s.floorGeometries.map((function(t){return{ids:t.ids,name:t.name}})),buildings:s.buildings.concat(s.hybrids),firmsToFloorIndexMap:l})}}))}))})),n.set("generateFloor",(function(t,e,n,i,r,o,a,s){var c={tileCoords:M[t].tileCoords,collectorOutput:L.getAccumulatedData(),styleId:0},l=m.getStyle(o);if(!l)return c;var u=function(t,e,n,i,r,o,a,s,c,l){var u,d=i.floorGeometries,m=i.defaultFloor,_=i.tileCoords,b=i.entities,O=r.tileProps,M=Object(g.c)(a),P=new p.a,L=new p.a(c),T=[],k=Object.keys(O).length;Number.isNaN(s)&&(s=m);for(var z=d[s],C=0;C<z.rooms.length;C++){for(var E=z.rooms[C],A=0;A<k;A++)T[A]=NaN;var D=!1;if(E.firmIds.length){var F=Object(h.b)(E.firmIds[0]);P.add(F),D=L.has(F),T[O.id]=F}E.isIsland?S(E,T,r,t,e,n,o,D):(I(E,T,r,t,e,n,o,D),j(E,T,r,t,e,n,o,D))}for(C=0;C<b.length;C++){var R=b[C],B=R.sublayer;if(R.floorIndex===s&&!Object(f.a)(B)){for(var N=0;N<k;N++)T[N]=NaN;w[0]=[R.coordinates[0]],w[1]=[R.coordinates[1]];for(var U=0;U<k;U++)T[U]=NaN;T[O.db_sublayer]=B,D=!1;var Z=R.firmId||R.id;Z&&(F=Object(h.b)(Z),D=L.has(F),P.add(F),T[O.id]=F),T[O.selected]=D?1:0,T[O.db_region]=o,Object(f.a)(B)||(T[O.db_object_class]=null!==(u=R.humanReadableIconId)&&void 0!==u?u:r.reverseDictionaries.db_object_class[R.iconId]),T[O.db_label]=R.text,T[O.db_label2]=R.text2,T[O.iconPriority]=R.priority,T[O.labelPriority]=R.textPriority,t.layers.forEach((function(i){"point"===i.type&&Object(v.h)(i.filter,Object(v.d)(r,e,x,O,T))&&Object(y.a)(n,t,i,_,l,x,r,T,w,M)}))}}return n.setGeoIds(new Uint32Array(P.toFlatArray())),n.getAccumulatedData()}(l,a,L,M[t],A,e,n,i,r,s);return z(),k(),{tileCoords:M[t].tileCoords,collectorOutput:u,transferable:u.transferable,styleId:l.id}})),n.set("generatePersonalPoi",(function(t,e,n,i,r,o,a,s){var c=m.getStyle(o);if(c){var l=function(t,e,n,i,r,o,a,s,c){var l,u,d,f=i.tileProps,m=i.dictionaries,_=Object.keys(f).length,y=new p.a(a),b=[],w={};if(void 0===(null===(l=m.db_sublayer)||void 0===l?void 0:l.s_personal_poi))return t.getAccumulatedData();for(var x=0;x<_;x++)b[x]=NaN;for(var S=Object(g.c)(o),I=pt.e(),j=[],O=0,M=s;O<M.length;O++){var L=M[O],T=Object(mt.l)(L.point);pt.f(I,T),j.push(T)}var k=Object(H.i)(I),z=Object(H.e)(k),C=function(o){var a=s[o],l=P.d();Object(H.t)(l,j[o],z);for(var m=Object(h.b)(a.id),g=[[l[0]],[l[1]]],x=0;x<_;x++)b[x]=NaN;b[f.id]=Object(h.b)(a.id),b[f.db_sublayer]="s_personal_poi",b[f.db_object_class]=null!==(u=a.humanReadableClassId)&&void 0!==u?u:null===(d=i.reverseDictionaries.db_object_class)||void 0===d?void 0:d[a.classId],b[f.db_label]=a.name,b[f.iconPriority]=1,b[f.labelPriority]=0,b[f.selected]=y.has(m)?1:0,b[f.db_region]=r;var I=Object(v.d)(i,n,w,f,b);vt=e.layers.filter((function(t){return Object(v.h)(t.filter,I)}));var O=new p.a;Object(Z.a)(t,e,vt,void 0,i,f,b,c,w,n,k,S,g,O)};for(x=0;x<s.length;x++)C(x);return t.getAccumulatedData()}(L,c,a,b[n],e,i,r,t,s);return z(),k(),{collectorOutput:l,transferable:l.transferable,styleId:c.id}}})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return m.proxySyncStyle.apply(m,t)}))}},function(t,e,n){"use strict";n.r(e);var i=n(0),r=n(1),o=n(14),a=n(51),s=n(56),c=n(11);function l(t,e,n){var i=t[e];if(void 0!==i)return i[n]}var u=n(109);function d(t,e,n,i){var r=t.anchorScreen,o=t.boxes[e];return{element:t,minX:r[0]+o[0]-n|0,maxX:r[0]+o[2]+n|0,minY:r[1]+o[1]-i|0,maxY:r[1]+o[3]+i|0}}function f(t,e){if(t.parent===e||t.firstLabel===e||e.parent===t||e.firstLabel===t)return!1;var n=t.labelingGroup,i=e.labelingGroup;return function(t,e,n,i){var r=l(t,n,i),o=l(e,n,i);return void 0===r&&void 0===o||(void 0===r?void 0===o||o:void 0===o?void 0===r||r:r||o)}(t.labelingGroupTable,e.labelingGroupTable,n,i)}function h(t,e,n,i,r,o){var a=d(e,n,i,r);if(a.minX>o.maxX||a.maxX<o.minX||a.minY>o.maxY||a.maxY<o.minY)return!0;for(var s=t.search(a),c=0;c<s.length;c++)if(f(e,s[c].element))return!0;return!1}function p(t,e,n,i,r){for(var o=!0,a=0;a<t.boxes.length;a++)if(h(e,t,a,t.marginLeftRight,t.marginTopBottom,n)){o=!1;break}if(o)for(a=0;a<t.boxes.length;a++){var s=d(t,a,t.marginLeftRight,t.marginTopBottom);e.insert(s)}t.placementIndex=o?0:-1}function m(t,e,n,i,r){t.placementIndex=-1;for(var o=0;o<t.boxes.length;o++)if(!(t.firstLabel&&t.firstLabel.placementIndex!==o||h(e,t,o,t.marginLeftRight,t.marginTopBottom,n))){var a=d(t,o,t.marginLeftRight,t.marginTopBottom);e.insert(a),t.placementIndex=o;break}}function v(t){return t.type!==c.d.Box&&void 0!==t.commercialPriority}function _(t,e,n,i){var o=e.size,a=e.viewport,l=o[0],f=o[1],_=(r.labeling.tileMultiplier-1)/2,y=Math.round(l*_),g=Math.round(f*_),b={minX:a.left-y,maxX:a.left+l+y,minY:a.top-g,maxY:a.top+f+g},w=u();t.filter(v).sort((function(t,e){return(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||t.commercialPriority-e.commercialPriority})).forEach((function(t){!function(t,e,n,i,r,o){var a,s;if(i.has(t.id)?(a=r.visibleLeftRight,s=r.visibleTopBottom):(a=r.appearLeftRight,s=r.appearTopBottom),h(e,t,0,a,s,n))t.placementIndex=-1;else{t.placementIndex=0;var c=d(t,0,r.visibleLeftRight,r.visibleTopBottom);e.insert(c)}}(t,w,b,n,i)})),w.clear();for(var x=t.sort((function(t,e){var i=t.label instanceof s.a?t.label.hovered:0,r=e.label instanceof s.a?e.label.hovered:0;return e.groupPriority-t.groupPriority||(v(e)?1:0)-(v(t)?1:0)||(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||r-i||e.itemPriority-t.itemPriority||e.label.idHi-t.label.idHi||e.label.idLo-t.label.idLo||e.label.layer.innerId-t.label.layer.innerId||e.anchorWorld[0]-t.anchorWorld[0]||e.anchorWorld[1]-t.anchorWorld[1]})),S=0;S<x.length;S++){var I=x[S];if(-1!==I.placementIndex)switch(I.type){case c.d.LineText:case c.d.Icon:p(I,w,b);break;case c.d.Box:if(!I.parent||I.parent&&-1!==I.parent.placementIndex){p(I,w,b);break}I.placementIndex=-1;break;case c.d.PoiText:case c.d.PoiText2:I.parent&&-1===I.parent.placementIndex||I.firstLabel&&-1===I.firstLabel.placementIndex?I.placementIndex=-1:m(I,w,b)}}return[]}var y=n(81),g=function(){function t(t,e,n){this.line=t,this.lengths=[],this.angles=[];for(var i=e,r=t[0],o=t[1],a=t.length/3,s=0;s<a;s++){var c=t[3*s]-r,l=t[3*s+1]-o;i+=Math.sqrt(c*c+l*l),this.lengths.push(i),r+=c,o+=l}for(this.finishLength=this.lengths[this.lengths.length-1],this.startLength=this.lengths[0],this.midLength=n/2,this.vertexCount=a,this.angles.push(0),s=1;s<a;s++){var u=this.line[3*(s-1)],d=this.line[3*s],f=this.line[3*(s-1)+1],h=this.line[3*s+1];this.angles.push(Math.atan2(h-f,d-u))}}return t.prototype.interpolate=function(t,e){var n=e,i=n-1,r=this.lengths[i],o=(t-r)/(this.lengths[n]-r);return[(1-o)*this.line[3*i]+o*this.line[3*n],(1-o)*this.line[3*i+1]+o*this.line[3*n+1],0,this.angles[e]]},t.prototype.getSegmentIndex=function(t){for(var e=0;e<this.lengths.length;e++)if(t<this.lengths[e])return e;return this.lengths.length},t}(),b=function(){function t(){this.labels={}}return t.prototype.add=function(t){var e=t.id,n=t.componentDistanceStart;void 0===this.labels[e]&&(this.labels[e]={});var i=this.labels[e];void 0===i[n]&&(i[n]=[]),i[n].push(t)},t.prototype.merge=function(){var t=[];for(var e in this.labels)for(var n=this.labels[e],i=Object.keys(n).sort((function(t,e){return Number(t)-Number(e)})),r=0;r<i.length;){var o=i[r];if(0!==n[o].length){for(var a=[],s=n[o].pop();void 0!==s;)a.push(s),s=0===s.componentDistanceStart&&0===s.componentDistanceEnd||void 0===n[s.componentDistanceEnd]?void 0:n[s.componentDistanceEnd].pop();if(1===a.length){var c=a[0];c.axis=new g(c.anchorWorld,c.componentDistanceStartWorld,c.objectLengthWorld),t.push(c)}else a.length>1&&t.push(this.stitch(a))}else r++}return t},t.prototype.stitch=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].anchorWorld.length;e-=3*(t.length-1);var i=new Int32Array(e),r=0;for(n=0;n<t.length;n++)for(var o=t[n].anchorWorld,a=n>0?3:0;a<o.length;a++)i[r++]=o[a];var s=t[0];return s.axis=new g(i,s.componentDistanceStartWorld,s.objectLengthWorld),t[0]},t}(),w=n(83),x=n(9),S=n(2),I=n(6),j=function(t,e,n,i,r,o,a,s,l,u,d,f){this.type=c.d.Box,this.marginTopBottom=0,this.marginLeftRight=0,this.id=String(t),this.label={layer:{innerId:0},styleId:-100,idLo:t,idHi:0,symbol:"nevermind",phase:NaN},this.groupPriority=null!=f?f:I.k,this.itemPriority=null!=d?d:1,this.parent=u,this.placementIndex=0,this.labelingGroup=l,this.labelingGroupTable=s.labelingGroups.table,this.anchorWorld=S.d(),S.c(this.anchorWorld,i),this.anchorWorld[2]*=o,this.anchorScreen=a.project(this.anchorWorld),x.a(this.anchorScreen,this.anchorScreen,r),this.boxes=[[0,0,e,n]]},O=n(5),M=n(7),P=n(47),L=n(4),T=n(20),k=n(24),z=n(46),C=Object(M.e)(r.labeling.axisAngleToleranceDeg),E=r.labeling.axisCheckDistancePx,A=Object(M.e)(r.labeling.lineLabelsHidePitchDeg);function D(t,e,n,i,r,o,a,s,l,u,d){for(var f=[],h=[],p=[],m=[],v={},_=function(t,e){for(var n={personalPoi:new Set,commercialPoi:new Set},i=0,r=t;i<r.length;i++){var o=r[i],a=e.get(o);if(void 0!==a)for(var s=0,l=a;s<l.length;s++){var u=l[s];u.source===c.c.PersonalPoi?n.personalPoi.add(u.id):u.pointType===c.b.Commercial&&n.commercialPoi.add(u.id)}}return n}(t,r),y=new b,g=0;g<t.length;g++){var w=t[g],x=r.get(w);if(void 0!==x)for(var S=0;S<x.length;S++){var I=x[S];if(M=i.getStyle(I.styleId)){if(!(I.source===c.c.Tile&&u.has(I.id)||I.source!==c.c.PersonalPoi&&_.personalPoi.has(I.id)&&I.pointType!==c.b.Commercial||I.source===c.c.PersonalPoi&&_.commercialPoi.has(I.id)))switch(I.layer.type){case"point":F(I,a,s,e.styleState,e.styleZoom,M,d)&&G(I,e.styleZoom)&&R(m,p,v,I,n,e,M,l);break;case"labelLine":F(I,a,s,e.styleState,e.styleZoom,M,d)&&G(I,e.styleZoom)&&y.add(I);break;case"oneWayLine":G(I,e.styleZoom)&&y.add(I)}}else console.error("Not found style "+I.styleId+" in labeling#collectLabelingElements")}}var O=y.merge();for(g=0;g<O.length;g++){var M;I=O[g],(M=i.getStyle(I.styleId))?B(h,m,I,M,n,e):console.error("Not found style "+I.styleId+" in labeling#collectLabelingElements")}return o.forEach((function(t){var r,o=t.id,a=t.width,s=t.height,c=t.position,l=t.offset,u=t.labelingGroup,d=t.parentPoiId;if(!d||(r=v[d])){var h=i.getStyle(T.a);if(h){var p=new j(o,a,s,c,l,e.buildingHeight,n,h,u,r,null==r?void 0:r.itemPriority,null==r?void 0:r.groupPriority);f.push(p)}else console.error("Not found style "+T.a+" in labeling#collectLabelingElements")}})),{boxElements:f,oneWayTileElements:h,noLabelingElements:p,otherTileElements:m}}function F(t,e,n,i,r,o,a){var s,c=t.layer;if("point"!==c.type&&"labelLine"!==c.type)return!1;var l=Object(L.f)(r,i,!1,t.tileData);if(z.e&&!t.rtlProcessed&&(t.label=null!==(s=Object(z.c)(t.label))&&void 0!==s?s:"",t.label2=Object(z.c)(t.label2),t.iconLabel=Object(z.c)(t.iconLabel),t.updateRanges(),a(I.b,t.ranges),Object(L.a)(c.style.textFont).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===c.type&&c.style.textFont2&&Object(L.a)(c.style.textFont2).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===c.type&&c.style.iconTextFont&&Object(L.a)(c.style.iconTextFont).forEach((function(e){e.length&&a(e,t.ranges)})),t.rtlProcessed=!0),!t.rtlProcessed)return!1;var u,d=t.ranges,f=Object(P.b)(c.style.textFont,l,o);if(f&&t.label&&Object(P.a)(f,d,n)&&(u=Object(P.c)(t.label,c.style.textLetterSpacing,e[f]),t.textMetrics=u),"labelLine"===c.type)return!f||!!u;var h=Object(P.b)(c.style.iconTextFont,l,o);h&&t.iconLabel&&Object(P.a)(h,d,n)&&(t.iconTextMetrics=Object(P.c)(t.iconLabel,c.style.iconTextLetterSpacing,e[h]));var p=Object(P.b)(c.style.textFont2,l,o);return f&&t.label&&p&&t.label2&&Object(P.a)(p,d,n)&&(t.textMetrics2=Object(P.c)(t.label2,c.style.textLetterSpacing,e[p])),f&&t.label?!(!u||h&&t.iconLabel&&!t.iconTextMetrics||p&&t.label2&&!t.textMetrics2):!h||!t.iconLabel||!!t.iconTextMetrics}function R(t,e,n,i,r,a,s,l){var u;Object(o.d)(i,s,i.layer,a,r,l);for(var d=0;d<i.labelingElements.length;d++){var f=i.labelingElements[d];f.labelingGroup!==k.r&&(null===(u=f.parent)||void 0===u?void 0:u.labelingGroup)!==k.r?(t.push(f),f.type===c.d.Icon&&(n[f.label.id]=f)):e.push(f)}}function B(t,e,n,i,o,a){var s=n.layer;if("labelLine"===s.type||"oneWayLine"===s.type){var c,l,u,d,f=a.zoom,h=a.styleZoom,p=Math.floor(h),m=f+(p-h),v=n.axis,_=v.startLength,y=v.midLength,g=v.finishLength,b=Object(L.f)(h,a.styleState,!1,n.tileData),w=Object(L.f)(p,a.styleState,!1,n.tileData);if("labelLine"===s.type){var x=Object(L.i)(s.style.textFontSize,b)/r.fonts.baseSize,S=Object(L.i)(s.style.textFontSize,w)/r.fonts.baseSize;c=n.textMetrics.maxWidth*x,l=n.textMetrics.maxWidth*S,u=Object(O.j)(Object(L.i)(s.style.textDuplicationSpacing,w),m),d=Object(O.j)(s.style.lineEndingOffsets,f)}else c=Object(L.i)(s.style.lineLength,b),l=Object(L.i)(s.style.lineLength,w),u=Object(O.j)(Object(L.i)(s.style.duplicationSpacing,w),m),d=Object(O.j)(s.style.endingOffsets,f);for(var I=Object(O.j)(l,m),j=Object(O.j)(c,f)/2,M=u+I,P=_+(y-_)%M,T=_+j+d,k=g-j-d,z="labelLine"!==s.type?t:e,C=P;C<k;C+=M)C>T&&N(z,n,C,j,c,o,a,i)}}function N(t,e,n,i,o,a,s,l){var u=e.axis,d=s.zoom,f=s.styleZoom,h=u.startLength,p=u.finishLength,m=u.getSegmentIndex(n),v=u.interpolate(n,m);if(!(Object(O.h)(a.position,v,s.center)>A)&&function(t,e,n,i,o,a){if("oneWayLine"===t.layer.type)return!0;for(var s=t.axis,c=Object(L.f)(o,a,!1,t.tileData),l=Object(L.i)(t.layer.style.textFontSize,c)/r.fonts.baseSize,u=s.getSegmentIndex(e-n),d=s.getSegmentIndex(e+n),f=Object(O.j)(E*l,i),h=u;h<d;h++){if(U(s.angles[h-1],s.angles[h])>C)return!1;if(U(s.angles[s.getSegmentIndex(s.lengths[h]-f)],s.angles[s.getSegmentIndex(s.lengths[h]+f)])>C)return!1}return!0}(e,n,i,d,f,s.styleState)){var _=c.d.LineText,y=new w.a(e,_,v,s.buildingHeight,a,l);y.anchorPosition=n,y.anchorSegmentIndex=m,y.halfLabelWidth=i,y.overflowStyleZoom=Object(O.d)(Object(O.k)(o,p-h),v),function(t,e,n,i,r,o){var a=e.axis,s=e.layer;if("labelLine"===s.type){for(var c=r.zoom,l=r.styleZoom,u=Object(L.f)(l,r.styleState,!1,e.tileData),d=Object(L.i)(s.style.textFontSize,u),f=d/2,h=Object(O.j)(d,c),p=Object(O.j)(s.style.textLabelingSideMargin,c),m=n-i+h/2-p,v=n+i-h/2+p,_=a.getSegmentIndex(m),y=m;y<v;y+=h){for(;a.lengths[_]<y;)_++;H(t,a,y,_,o,f)}for(;a.lengths[_]<v;)_++;H(t,a,v,_,o,f)}}(y,e,n,i,s,a),t.push(y)}}function U(t,e){var n=Math.abs(t-e);return n>Math.PI?2*Math.PI-n:n}var Z=[0,0];function H(t,e,n,i,r,o){r.putProject(Z,e.interpolate(n,i)),Z[0]=Z[0]-t.anchorScreen[0],Z[1]=Z[1]-t.anchorScreen[1],t.boxes.push([Z[0]-o,Z[1]-o,Z[0]+o,Z[1]+o])}function G(t,e){var n=t.source,i=t.detailLevel,o=t.layer,a=o.minzoom,s=o.maxzoom,l=n===c.c.PersonalPoi,u=l||a>i,d=l||s<i+1||i===r.tiles.maxDetailLevel;return(!u||e>=a)&&(!d||e<s)}var W=n(78),V=n(79),q=n(86),Y=n(16),X=n(103),K=n(43),J=n(12),Q=n(44),$=new Map;e.default=function(t){var e=new W.b(t),n=new V.a(e),l=new y.a("labeling"),u=new X.a,d=n.get(Y.b.Main,"loadFont"),f=new Map,h=new Map,p=[],m=new Map,g=new q.a,b=new q.a,w={},x=Object(a.a)((function(){return l.reset()}),r.workerResetDebounceTime);function S(t,e){for(var n=0,i=e;n<i.length;n++){var r=i[n];g.has(t,r)||(d(t,r),g.set(t,r,!0))}}function I(t,e){var n=t.get(e.id);return void 0===n||void 0===n.placementIndex||n.label.outdated&&!e.label.outdated||n.type===c.d.Icon&&n.layer.innerId!==e.layer.innerId?1:n.placementIndex===e.placementIndex?0:1}n.set("appendLabels",(function(t,e,n,i,r){var o=Object(s.b)(n,e,u,i,r);f.set(t,o)})),n.set("appendLabelBox",(function(t,e){h.set(t,e)})),n.set("removeEmptyBoxLabel",(function(t){h.delete(t)})),n.set("removeLabels",(function(t){f.delete(t),h.delete(t)})),n.set("processLabels",(function(t,e,n,r,a,s,d){for(var y=new Set(a),g=new Q.a(e),j=D(t,e,g,u,f,h,w,b,r,y,S),O=j.boxElements,M=j.oneWayTileElements,P=j.otherTileElements,L=j.noLabelingElements,T=(_(Object(i.e)(Object(i.e)([],P),O),e,d?$:m,s),Object(i.e)(Object(i.e)(Object(i.e)([],L),M),P)),k=new Map,z=0;z<T.length;z++)-1!==(nt=T[z]).placementIndex&&k.set(nt.id,nt);for(z=0;z<T.length;z++){var C=(nt=T[z]).label,E=C.styleId,A=C.layer;if(-1!==nt.placementIndex){var F=I(m,nt);(R=u.getStyle(E))?Object(o.e)(R,A,l,nt,F,r,e,n):console.error("Not found style "+E+" in labeling#processLabels")}}for(z=0;z<p.length;z++){var R,B=p[z],N=B.id,U=B.label;if(A=B.layer,E=U.styleId,R=u.getStyle(E)){var Z=B.placementIndex,H=k.get(N);-1!==Z&&(B.placementIndex!==(null==H?void 0:H.placementIndex)||B.type===c.d.Icon&&B.layer.innerId!==(null==H?void 0:H.layer.innerId))&&(e.styleZoom<B.overflowStyleZoom||e.styleZoom<A.minzoom||e.styleZoom>=A.maxzoom||Object(o.e)(R,A,l,B,-1,r,e,n))}else console.error("Not found style "+E+" in labeling#processLabels")}p=T,m=k;for(var G=l.getAccumulatedData(),W=[],V=0,q=O;V<q.length;V++)-1!==(nt=q[V]).placementIndex&&W.push(nt.label.idLo);for(var Y=new Set,X=Object(K.a)(g.viewportVertices),tt=0,et=P;tt<et.length;tt++){var nt;-1!==(nt=et[tt]).placementIndex&&v(nt)&&J.c(X,nt.label.anchorWorld)&&Y.add(nt.label.id)}var it={survivedLabelBoxIds:W,survivedCommPoiIds:Array.from(Y),collectorOutput:G,transferable:G.transferable};return x(),it})),n.set("appendFont",(function(t,e){w[t]||(w[t]={});var n=w[t];for(var i in e)n[i]=e[i]})),n.set("markFontAsLoaded",(function(t,e){b.set(t,e,!0)})),n.set("addNewRasterSets",(function(t,e){var n=u.getStyle(t);if(n){var i=n.rasterSets;e.forEach((function(t){i.byIndex[t.index]=t,i.byKey[t.key]=t}))}else console.error("Not found style "+t+" in labeling#addNewRasterSets")})),n.set("updatePackingInfo",(function(t,e){var n=u.getStyle(t);if(n)for(var i=n.rasterSets,r=e.length/7,o=0;o<r;o++){var a=e[7*o],s=e[7*o+1],c=e[7*o+6],l=e[7*o+2],d=e[7*o+3],f=e[7*o+4],h=e[7*o+5],p=i.byIndex[a];if(void 0!==p)if(p.isSvg)p.rasters[s]={rasterIndex:s,rasterSetIndex:a,x:l,y:d,w:f,h:h,anchorX:p.anchorX,anchorY:p.anchorY,atlasIndex:c,isPacked:!0};else{var m=p.rasters[s];if(void 0===m){console.error("Not found raster with index "+s+" and raster set index "+a);continue}m.x=l,m.y=d,m.atlasIndex=c,m.isPacked=!0}else console.error("Not found raster set with index "+a)}else console.error("Not found style "+t+" in labeling#updatePackingInfo")})),n.set("clearPreviousLabels",(function(){p=[],m.clear()})),n.set("markSourceLabelsAsOutdated",(function(t){f.forEach((function(e){e.forEach((function(e){e.sourceId===t&&(e.outdated=!0)}))}))})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.proxySyncStyle.apply(u,t)})),n.set("loadRtlPlugin",z.a),n.set("markRtlPluginLoaded",(function(){z.b&&Object(z.b)()}))}}])},function(t,e,n){var i=n(4),r=n(14);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(10);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(11);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function c(t,e){for(var n={},i=[],r=0;r<t.length;r++){var o=t[r],c=e.base?o[0]+e.base:o[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=s(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:v(f,e),references:1}),i.push(u)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var r=n.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function f(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=d(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var p=null,m=0;function v(t,e){var n,i,r;if(e.singleton){var o=m++;n=p||(p=l(e)),i=f.bind(null,n,o,!1),r=f.bind(null,n,o,!0)}else n=l(e),i=h.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var n=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=s(n[i]);a[r].references--}for(var o=c(t,e),l=0;l<n.length;l++){var u=s(n[l]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=o}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([r]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){var i=n(4),r=n(12);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(15);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(13);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(16);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_v40Pms0--hwyOQ8UjPcWr {\n    width: 32px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n    background: #fff;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n\n    background: #fff;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    box-sizing: border-box;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:hover {\n    opacity: 0.7;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:active {\n    color: #028eff;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_1VMXd7ruCY-OWQf4wLOXlX {\n    border-bottom: 1px solid #e6e6e6;\n}\n\n.mapgl_3VR3BMH_pT81tH5FCB4UKu {\n    border-bottom: none;\n}\n",""]),e.locals={root:"mapgl_v40Pms0--hwyOQ8UjPcWr",button:"mapgl_100uyFkiYndX6GvJkrNTro",zoomIn:"mapgl_1VMXd7ruCY-OWQf4wLOXlX",zoomOut:"mapgl_3VR3BMH_pT81tH5FCB4UKu"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1dJRjtTADjfrWEBK1VP-yH {\n    background: #fff;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    width: 32px;\n    overflow: hidden;\n}\n\n.mapgl_3zhJcxK1WUkZT4OIb0F0ju {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n    box-sizing: border-box;\n    font-size: 18px;\n    font-weight: 400;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    background: #fff;\n}\n\n.mapgl_xj2Lg9Z4A-XYFDPMCk-2-:hover {\n    opacity: 0.7;\n}\n\n.mapgl_hvKpkuZ-HybGjVfMvZkJB {\n    background: #299400;\n    color: #fff;\n}\n.mapgl_2MVzHnca_pzo15AMUqLG1Y {\n    background: #ffb81c;\n    color: #fff;\n}\n.mapgl_2Lex5zOJIAmz1em4-jc3kD {\n    background: #fe5000;\n    color: #fff;\n}\n\n.mapgl_hvKpkuZ-HybGjVfMvZkJB:hover,\n.mapgl_2MVzHnca_pzo15AMUqLG1Y:hover,\n.mapgl_2Lex5zOJIAmz1em4-jc3kD:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n",""]),e.locals={root:"mapgl_1dJRjtTADjfrWEBK1VP-yH",button:"mapgl_3zhJcxK1WUkZT4OIb0F0ju",none:"mapgl_xj2Lg9Z4A-XYFDPMCk-2-",easy:"mapgl_hvKpkuZ-HybGjVfMvZkJB",medium:"mapgl_2MVzHnca_pzo15AMUqLG1Y",hard:"mapgl_2Lex5zOJIAmz1em4-jc3kD"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1mf4dGW5YwpxRisgDjNvYa {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-end;\n    color: #6d7173 !important;\n}\n\n.mapgl_1evexfkL98VWP7vg3WdM_n {\n    display: flex;\n    flex-direction: column;\n    padding-right: 4px;\n}\n\n.mapgl_1-ZxJHDJR4_0HjgadmGoyz {\n    display: flex;\n    flex-direction: row;\n}\n\n.mapgl_2rKXcK6rBLVDts2nY7Soj8 {\n    animation: mapgl_1V_Npc20wdT6RNVr-h_CuO 5s forwards;\n}\n\na.mapgl_B9UnieOsCT3RFtxHKh-re {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_B9UnieOsCT3RFtxHKh-re:hover {\n    color: #929292 !important;\n}\n@keyframes mapgl_1V_Npc20wdT6RNVr-h_CuO {\n    85% {\n        opacity: 1;\n    }\n    100% {\n        opacity: 0;\n    }\n}\n",""]),e.locals={container:"mapgl_1mf4dGW5YwpxRisgDjNvYa",text:"mapgl_1evexfkL98VWP7vg3WdM_n",copyrights:"mapgl_1-ZxJHDJR4_0HjgadmGoyz",autoHide:"mapgl_2rKXcK6rBLVDts2nY7Soj8",hideAnimation:"mapgl_1V_Npc20wdT6RNVr-h_CuO",link:"mapgl_B9UnieOsCT3RFtxHKh-re"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_F_tU1ilxWO8LMOuimXOaK {\n    pointer-events: none;\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 10px;\n    background-color: rgba(0, 0, 0, 0.2);\n    cursor: default;\n}\n\n.mapgl_38fZM-7XxSI9BVB93wwLZS {\n    text-align: center;\n    font-size: 24px;\n    font-family: Helvetica, Arial, sans-serif;\n    font-weight: bold;\n    color: white;\n}\n",""]),e.locals={wrap:"mapgl_F_tU1ilxWO8LMOuimXOaK",container:"mapgl_38fZM-7XxSI9BVB93wwLZS"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_39boxHsSrpYLUd1Q_TLWNE {\n    position: relative;\n}\n\n.mapgl_XndZ8Gq86AwHiI9OL2rrI {\n    display: flex;\n    max-height: 40vh;\n    background: #ffffff;\n    width: 32px;\n    overflow: hidden;\n    border-radius: 4px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n}\n\n.mapgl_1KjXIyKXx3cKlGOuH7iOqm {\n    width: 100%;\n    overflow-x: hidden;\n    overflow-y: auto;\n    -moz-padding-end: 17px;\n    -webkit-padding-end: 17px;\n    -webkit-margin-end: -17px;\n}\n\n.mapgl_3YmAJvPYAFZnAd-ueoYpoZ {\n    display: flex;\n    flex-direction: column-reverse;\n}\n\n.mapgl_1Q3q5ldrXhqbptc76FSJrD {\n    padding: 0;\n\n    border: none;\n    background: #ffffff;\n    height: 32px;\n    width: 32px;\n    color: #262626;\n    cursor: pointer;\n    border-bottom: 1px solid #e6e6e6;\n    box-sizing: border-box;\n    flex-shrink: 0;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:focus {\n    outline: 0;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:first-child {\n    border-bottom: none;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:active {\n    color: #028eff;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_vtN8BO05QrwsIJqLj2gQP {\n    font-size: 18px;\n    line-height: 32px;\n    font-weight: 400;\n    overflow-wrap: break-word;\n\n    position: relative;\n    text-align: center;\n    height: 100%;\n}\n\n.mapgl_26bMfdsaLACTmUYdHiXRmw:after {\n    content: '';\n    position: absolute;\n    top: 4px;\n    bottom: 4px;\n    width: 4px;\n    height: 4px;\n    border-radius: 50%;\n    background: #028eff;\n}\n",""]),e.locals={root:"mapgl_39boxHsSrpYLUd1Q_TLWNE",container:"mapgl_XndZ8Gq86AwHiI9OL2rrI",scroller:"mapgl_1KjXIyKXx3cKlGOuH7iOqm",content:"mapgl_3YmAJvPYAFZnAd-ueoYpoZ",control:"mapgl_1Q3q5ldrXhqbptc76FSJrD",label:"mapgl_vtN8BO05QrwsIJqLj2gQP",_hasResult:"mapgl_26bMfdsaLACTmUYdHiXRmw"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1PC1ZGStC6bB0pqh8mPrBT {\n    position: absolute;\n    pointer-events: none;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n}\n\n.mapgl_13_0_l_fgoZs8PolTXDK9q {\n    position: absolute;\n    display: flex;\n    z-index: 50;\n    pointer-events: none;\n    width: 100%;\n    height: 100%;\n}\n\n.mapgl_13_0_l_fgoZs8PolTXDK9q > div > * {\n    pointer-events: auto;\n}\n\n.mapgl_186oqA-9eJdlWMmD3_Vnns {\n    flex-direction: column;\n    align-items: flex-start;\n}\n\n.mapgl_13LsKgkregIL3d-3t3GQiq {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_1iEkksZSQRNvmX99mxScKc {\n    flex-direction: column;\n    align-items: flex-end;\n}\n\n.mapgl_sp6tcU3LneOLa7JFJ5wiU {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_16f6kGlZuehI1tEVgwVCXg {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_3c-t8gKvFcwFVSxrVi0pX5 {\n    flex-direction: column-reverse;\n    align-items: flex-start;\n}\n\n.mapgl_3FJuGkEeU60U5245GJ2Q_O {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_WDfwMCZeDIyXvL0vySrTy {\n    flex-direction: column-reverse;\n    align-items: flex-end;\n}\n\n.mapgl_186oqA-9eJdlWMmD3_Vnns > div + div,\n.mapgl_1iEkksZSQRNvmX99mxScKc > div + div,\n.mapgl_sp6tcU3LneOLa7JFJ5wiU > div + div,\n.mapgl_16f6kGlZuehI1tEVgwVCXg > div + div {\n    margin-top: 10px;\n}\n\n.mapgl_3c-t8gKvFcwFVSxrVi0pX5 > div + div,\n.mapgl_WDfwMCZeDIyXvL0vySrTy > div + div {\n    margin-bottom: 10px;\n}\n\n.mapgl_13LsKgkregIL3d-3t3GQiq > div + div,\n.mapgl_3FJuGkEeU60U5245GJ2Q_O > div + div {\n    margin-left: 10px;\n}\n",""]),e.locals={controlPane:"mapgl_1PC1ZGStC6bB0pqh8mPrBT",container:"mapgl_13_0_l_fgoZs8PolTXDK9q",topLeft:"mapgl_186oqA-9eJdlWMmD3_Vnns",topCenter:"mapgl_13LsKgkregIL3d-3t3GQiq",topRight:"mapgl_1iEkksZSQRNvmX99mxScKc",centerLeft:"mapgl_sp6tcU3LneOLa7JFJ5wiU",centerRight:"mapgl_16f6kGlZuehI1tEVgwVCXg",bottomLeft:"mapgl_3c-t8gKvFcwFVSxrVi0pX5",bottomCenter:"mapgl_3FJuGkEeU60U5245GJ2Q_O",bottomRight:"mapgl_WDfwMCZeDIyXvL0vySrTy"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_303VEzN1YZR5wQM-AHJ-V0 {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    align-items: flex-start;\n    color: #6d7173 !important;\n}\n\n.mapgl_1xadlWulQiYFq0wxrj-jwO {\n    display: block;\n}\n\na.mapgl_1UVT7li_KfnZFAKhyNBrXr {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_1UVT7li_KfnZFAKhyNBrXr:hover {\n    color: #929292 !important;\n}\n",""]),e.locals={container:"mapgl_303VEzN1YZR5wQM-AHJ-V0",text:"mapgl_1xadlWulQiYFq0wxrj-jwO",link:"mapgl_1UVT7li_KfnZFAKhyNBrXr"},t.exports=e},function(t,e){setTimeout((function(){if("__mapglPlugins"in window)for(var t in window.__mapglPlugins)window.mapgl[t]=window.__mapglPlugins[t]}),0)},function(t,e,n){"use strict";n.r(e),n.d(e,"Map",(function(){return N})),n.d(e,"Marker",(function(){return G})),n.d(e,"Label",(function(){return q})),n.d(e,"HtmlMarker",(function(){return X})),n.d(e,"Control",(function(){return d})),n.d(e,"ZoomControl",(function(){return m})),n.d(e,"TrafficControl",(function(){return y})),n.d(e,"FloorControl",(function(){return C})),n.d(e,"CircleMarker",(function(){return $})),n.d(e,"Circle",(function(){return J})),n.d(e,"Polygon",(function(){return it})),n.d(e,"Polyline",(function(){return et})),n.d(e,"GeoJsonSource",(function(){return ot})),n.d(e,"RasterTileSource",(function(){return ut})),n.d(e,"LngLatBounds",(function(){})),n.d(e,"LngLatBoundsClass",(function(){return L})),n.d(e,"AnimationOptions",(function(){})),n.d(e,"RotationAnimationOptions",(function(){})),n.d(e,"Easing",(function(){})),n.d(e,"CircleMarkerOptions",(function(){})),n.d(e,"CircleOptions",(function(){})),n.d(e,"ControlOptions",(function(){})),n.d(e,"ControlPosition",(function(){})),n.d(e,"FitBoundsOptions",(function(){})),n.d(e,"GeoJsonSourceOptions",(function(){})),n.d(e,"HtmlMarkerOptions",(function(){})),n.d(e,"LabelImage",(function(){})),n.d(e,"LabelOptions",(function(){})),n.d(e,"MapOptions",(function(){})),n.d(e,"MapSupportOptions",(function(){})),n.d(e,"MarkerIconOptions",(function(){})),n.d(e,"MarkerLabelOptions",(function(){})),n.d(e,"MarkerOptions",(function(){})),n.d(e,"Padding",(function(){})),n.d(e,"PolygonOptions",(function(){})),n.d(e,"PolylineOptions",(function(){})),n.d(e,"RasterTileSourceOptions",(function(){})),n.d(e,"SourceAttributes",(function(){})),n.d(e,"StretchableImageSource",(function(){})),n.d(e,"DefaultEventTargetData",(function(){})),n.d(e,"DynamicObjectEventTable",(function(){})),n.d(e,"DynamicObjectPointerEvent",(function(){})),n.d(e,"EventTarget",(function(){})),n.d(e,"EventTargetData",(function(){})),n.d(e,"FloorLevelChangeEvent",(function(){})),n.d(e,"FloorPlanHideEvent",(function(){})),n.d(e,"FloorPlanShowEvent",(function(){})),n.d(e,"GeoJsonEventTargetData",(function(){})),n.d(e,"MapEvent",(function(){})),n.d(e,"MapEventTable",(function(){})),n.d(e,"MapPointerEvent",(function(){})),n.d(e,"PointerEvent",(function(){})),n.d(e,"StyleLoadEvent",(function(){})),n.d(e,"TrafficScoreEvent",(function(){})),n.d(e,"TrafficVisibilityEvent",(function(){})),n.d(e,"isSupported",(function(){return dt})),n.d(e,"notSupportedReason",(function(){return ft})),n.d(e,"_J",(function(){return l}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function c(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create;var l=n(0),u=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}(),d=function(){function t(t,e,n){var i,r=n.position;this._wrap=document.createElement("div"),this._wrap.style.userSelect="none",this._wrap.innerHTML=e,this._position=r,this._controlPane=t._controlPane,this._container=this._controlPane.getContainerByPosition(r),null===(i=this._container)||void 0===i||i.append(this._wrap)}return t.prototype.destroy=function(){this._wrap.remove()},t.prototype.getPosition=function(){return this._position},t.prototype.setPosition=function(t){this._container.removeChild(this._wrap),this._container=this._controlPane.getContainerByPosition(t),this._container.append(this._wrap),this._position=t},t.prototype.getContainer=function(){return this._wrap},t}(),f=n(2),h=n.n(f),p='\n    <div class="'+h.a.root+'">\n        <button class="'+h.a.button+" "+h.a.zoomIn+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                width="32"\n                height="32"\n                fill="currentColor"\n            >\n                <path d="M24 15h-7V8h-2v7H8v2h7v7h2v-7h7v-2z"></path>\n            </svg>\n        </button>\n        <button class="'+h.a.button+" "+h.a.zoomOut+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                fill="currentColor"\n                width="32"\n                height="32"\n            >\n                <path d="M8 15h16v2H8z"></path>\n            </svg>\n        </button>\n    </div>\n',m=function(t){function e(e,n){var i=t.call(this,e,p,n)||this;return i._zoomIn=function(){i._map.setZoom(i._map.getZoom()+1,{duration:400})},i._zoomOut=function(){i._map.setZoom(i._map.getZoom()-1,{duration:400})},i._checkZoom=function(){var t=i._map.getZoom();t<=i._map.getMinZoom()?i._zoomOutButton.disabled=!0:i._zoomOutButton.disabled=!1,t>=i._map.getMaxZoom()?i._zoomInButton.disabled=!0:i._zoomInButton.disabled=!1},i._map=e,i._zoomInButton=i._wrap.querySelector("."+h.a.zoomIn),i._zoomOutButton=i._wrap.querySelector("."+h.a.zoomOut),i._zoomInButton.addEventListener("click",i._zoomIn),i._zoomOutButton.addEventListener("click",i._zoomOut),i._map.on("zoom",i._checkZoom),i}return r(e,t),e.prototype.destroy=function(){this._map.off("zoom",this._checkZoom),this._zoomInButton.removeEventListener("click",this._zoomIn),this._zoomOutButton.removeEventListener("click",this._zoomOut),t.prototype.destroy.call(this)},e}(d),v=n(3),_=n.n(v),y=function(t){function e(e,n){var i=t.call(this,e,"",n)||this;return i._onClick=function(){i._trafficVisible?(i._map.hideTraffic(),i._map.patchStyleState({trafficOn:!1})):(i._map.showTraffic(),i._map.patchStyleState({trafficOn:!0}))},i._map=e,i._trafficVisible=!1,i._render(),e.on("trafficscore",(function(t){var e=t.score;i._score=e,i._render()})),e.on("trafficshow",(function(){i._trafficVisible=!0,i._render()})),e.on("traffichide",(function(){i._trafficVisible=!1,i._render()})),i}return r(e,t),e.prototype._render=function(){var t=this._trafficVisible?function(t){if(void 0===t)return"";if(t>6)return _.a.hard;if(t>3)return _.a.medium;return _.a.easy}(this._score):_.a.none,e='\n            <div class="'+_.a.root+'">\n                <button class="'+_.a.button+" "+t+'">\n                    '+(this._trafficVisible&&void 0!==this._score?this._score:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="14" viewBox="0 0 20 14" style="margin-top: 4px">\n    <path d="M 18,5 C 18,4 17,1 15,1 H 12 10 C 8,1 7,4 7,5 H 5 v 2 h 1 v 4 c 0,0.6 0,1 1,1 v 2 h 2 v -2 h 7 v 2 h 2 v -2 c 1,0 1,-0.4 1,-1 V 7 h 1 V 5 H 18 z M 10,3 h 2 3 c 2,0 2,1 2,3 H 8 C 8,4 8,3 10,3 z M 9,10 H 8 C 7.4,10 7,9.6 7,9 7,8.4 7.4,8 8,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z m 8,0 H 16 C 15.4,10 15,9.6 15,9 15,8.4 15.4,8 16,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z M 4,4 H 6 V 3 H 4 C 1,3 1,6 1,7 H 0 v 1 h 1 v 4 H 3 V 11 H 5 V 7 H 2 C 2,6 2,4 4,4 z M 3,9 4,10 H 2 V 9 h 1 z" fill="#616161" fill-rule="evenodd"/>\n    <g fill="#fff">\n        <path d="m 16,8 h 1 c 0.4,0 0.7,0.2 0.8,0.5 C 17.9,8.4 18,8.2 18,8 18,7.4 17.6,7 17,7 h -1 c -0.6,0 -1,0.4 -1,1 0,0.2 0.1,0.4 0.2,0.5 C 15.3,8.2 15.6,8 16,8 z"/>\n        <path d="M 8,8 H 9 C 9.4,8 9.7,8.2 9.8,8.5 9.9,8.4 10,8.2 10,8 10,7.4 9.6,7 9,7 H 8 C 7.4,7 7,7.4 7,8 7,8.2 7.1,8.4 7.2,8.5 7.3,8.2 7.6,8 8,8 z"/>\n        <path d="M 6,3 H 4 C 4,3 4,3 4,3 2,3 2,5 2,6 H 2 C 2.1,5 2.5,4 4,4 H 5 6 V 3 z"/>\n        <path d="M0 7H1V8H0z"/>\n        <path d="M 15,2 H 12 10 C 8,2 8,3 8,5 H 8 C 8,3.7 8.3,3 10,3 h 2 3 c 1.7,0 1.9,0.7 2,2 h 0 C 17,3 17,2 15,2 z"/>\n        <path d="M3 9L4 9 3 8 2 8 2 9 2 9 2 9 3 9z"/>\n        <path d="M 7,11 C 6,11 6,10.6 6,10 v 1 c 0,0.6 0,1 1,1 v -1 z"/>\n        <path d="m 18,11 v 1 c 1,0 1,-0.4 1,-1 v -1 c 0,0.6 0,1 -1,1 z"/>\n        <path d="M19 6H20V7H19z"/>\n        <path d="M3 11L1 11 1 12 3 12 3 11 5 11 5 7 5 7 5 10 3 10z"/>\n        <path d="M16 13H18V14H16z"/>\n        <path d="M5 6H6V7H5z"/>\n        <path d="M9 13L7 13 7 14 9 14 9 12 16 12 16 11 9 11z"/>\n    </g>\n    <g fill="#444">\n        <path d="M 2,6 C 2,6.4 2,6.7 2,7 H 5 V 6 H 2 z"/>\n        <path d="M2 9L2 10 4 10 3 9z"/>\n        <path d="M 4,3 H 6 V 2 H 4 C 1,2 1,5 1,6 H 0 V 7 H 1 C 1,6 1,3 4,3 z"/>\n        <path d="M 18,4 C 18,3 17,0 15,0 H 12 10 C 8,0 7,3 7,4 H 6 5 V 5 H 7 C 7,4 8,1 10,1 h 2 3 c 2,0 3,3 3,4 h 2 V 4 h -2 z"/>\n        <path d="M 8,10 H 9 C 9.6,10 10,9.6 10,9 10,8.8 9.9,8.6 9.8,8.5 9.7,8.8 9.4,9 9,9 H 8 C 7.6,9 7.3,8.8 7.2,8.5 7.1,8.6 7,8.8 7,9 c 0,0.6 0.4,1 1,1 z"/>\n        <path d="M 17,6 C 17,5.6 17,5.3 17,5 H 8 c 0,0.3 0,0.6 0,1 h 9 z"/>\n        <path d="M 17.8,8.5 C 17.7,8.8 17.4,9 17,9 H 16 C 15.6,9 15.3,8.8 15.2,8.5 15.1,8.6 15,8.8 15,9 c 0,0.6 0.4,1 1,1 h 1 c 0.6,0 1,-0.4 1,-1 0,-0.2 -0.1,-0.4 -0.2,-0.5 z"/>\n    </g>\n</svg>\n')+"\n                </button>\n            </div>\n        ";this._wrap.innerHTML=e,this._wrap.querySelector("."+_.a.button).addEventListener("click",this._onClick)},e}(d);var g,b=n(6),w=n.n(b);!function(t){t.osm="osm",t.api="api",t.license="license"}(g||(g={}));var x=function(t){function e(e,n){var i,r,o=t.call(this,e,(i=!0===n.autoHide,r=!0===n.showSberLogo,"\n    <div class="+w.a.container+'>\n        <div>\n            <a href="https://dev.2gis.ru" target="_blank">\n                <svg xmlns="http://www.w3.org/2000/svg" width="45" height="14">\n                    <path\n                        fill-rule="evenodd"\n                        clip-rule="evenodd"\n                        fill="#6D7173"\n                        d="M6.964 0c3.865 0 6.99 3.144 6.99 6.994 0 3.862-3.125 7.006-6.99 7.006C3.136 14 0 10.856 0 6.994 0 3.144 3.136 0 6.964 0zm.025 2.45c-2.297 0-3.85 1.805-3.85 3.735 0 .772.172 1.457.575 2.304 2.33.012 2.794 1.446 2.943 2.712l.014.126.061.573h.501l.061-.573.014-.126c.15-1.266.605-2.7 3.017-2.712.416-.847.489-1.532.489-2.291 0-1.955-1.528-3.748-3.825-3.748zm34.142-.21c2.094 0 3.6 1.04 3.869 3.017h-2.12c-.14-.735-.753-1.305-1.775-1.305-.88 0-1.404.418-1.404 1.102 0 .778.884.942 1.757 1.074l.196.029c1.367.203 3.32.596 3.32 2.776 0 2.029-1.698 2.967-3.767 2.967-2.234 0-3.754-1.116-3.881-3.195h2.094c.179.964.894 1.496 1.966 1.496.869 0 1.482-.355 1.482-1.077 0-1.065-1.226-1.09-2.478-1.332-.97-.19-2.796-.659-2.796-2.623 0-1.851 1.417-2.929 3.537-2.929zm-12.365.21c2.174 0 4.013 1.217 4.374 3.338h-2.1c-.323-.941-1.168-1.468-2.299-1.468-1.85 0-2.646 1.443-2.646 2.861 0 1.406.845 2.824 2.659 2.824 1.031 0 1.926-.464 2.323-1.443H28.53V7.006h4.61v.74c0 2.535-1.926 4.154-4.386 4.154-2.498 0-4.684-1.744-4.684-4.694 0-2.911 2.013-4.756 4.696-4.756zm-9.156 0c2.12 0 3.574 1.217 3.574 3.148 0 1.574-.966 2.496-2.658 3.234-1.116.48-1.225.548-2.386.898h5.232v1.82h-7.599V8.845c1.09-.37 2.157-.787 3.65-1.44 1.09-.479 1.68-.921 1.68-1.709 0-.787-.59-1.475-1.593-1.475-1.154 0-1.806.922-1.78 1.93h-2.032C15.685 3.84 17.353 2.45 19.61 2.45zm16.764 0v9.1h-1.978v-9.1h1.978z"\n                    /></svg\n            ></a>\n\n            '+(r?'\n                    <a href="https://dev.2gis.ru" target="_blank">\n                    <svg xmlns="http://www.w3.org/2000/svg" width="54" height="16">\n                        <path\n                            fill="#6D7173"\n                            fill-rule="evenodd"\n                            d="M14.888 6.746a7 7 0 11-2.492-4.193l-1.361 1.004A5.35 5.35 0 008 2.617C5.032 2.617 2.617 5.032 2.617 8S5.032 13.383 8 13.383 13.383 10.968 13.383 8c0-.048 0-.096-.002-.144l1.507-1.11zm-9.553-.613L8 7.803l5.54-4.082c.33.427.613.894.838 1.391L8 9.812l-2.665-1.67v-2.01zm36.44-.942l1.902-1.403h-6.37v8.424h6.37V10.81h-4.552V8.652h3.883V7.25h-3.883V5.19h2.65zM30.287 7.072H32.5c2.01 0 3.115.886 3.115 2.494 0 1.682-1.22 2.646-3.35 2.646h-3.794V3.788h7.251L33.82 5.191h-3.53v1.881zm0 3.737h1.896c1.122 0 1.69-.373 1.691-1.167 0-.777-.537-1.168-1.691-1.168h-1.896v2.335zm18.55-7.02h-3.469v8.423h1.818V9.826h1.65c2.213 0 3.588-1.164 3.588-3.023 0-1.86-1.374-3.015-3.588-3.015zm-.04 4.634h-1.61V5.191h1.61c1.165 0 1.806.574 1.806 1.616 0 1.042-.64 1.616-1.806 1.616zM23.78 10.782c.56 0 1.103-.136 1.57-.393l.402-.22 1.176.866c-.775.832-1.92 1.288-3.23 1.288-1.253 0-2.395-.442-3.217-1.245-.819-.8-1.27-1.91-1.27-3.124 0-1.208.453-2.301 1.275-3.078.817-.773 1.962-1.198 3.224-1.198 1.162 0 2.18.353 2.94 1.022l.087.076-1.304.96a2.77 2.77 0 00-1.653-.517c-1.638 0-2.828 1.17-2.828 2.781 0 1.612 1.19 2.782 2.828 2.782z"\n                        ></path></svg\n                    ></a>\n                ':"")+"\n        </div>\n\n        <div class="+w.a.text+">\n            <div class="+(i?w.a.autoHide:"")+'>\n                ©\n                <a\n                    href="https://www.openstreetmap.org/copyright"\n                    target="_blank"\n                    class='+w.a.link+"\n                    data-type="+g.osm+"\n                    >&nbsp;2GIS, OpenStreetMap contributors\n                </a>\n            </div>\n        </div>\n    </div>\n"),n)||this;return o._onClick=function(t){if(t.target&&((n=t.target)&&"href"in n&&"dataset"in n)){var e=t.target.dataset.type;e&&function(t){return t in g}(e)&&o._map.emit("copyrightclick",{type:e,href:t.target.href,originalEvent:t})}var n},o._map=e,!1===n.interactive&&(o._wrap.style.pointerEvents="none"),o._wrap.querySelector("."+w.a.container).addEventListener("click",o._onClick),o}return r(e,t),e.prototype.destroy=function(){this._wrap.querySelector("."+w.a.container).removeEventListener("click",this._onClick),t.prototype.destroy.call(this)},e}(d);var S=n(8),I=n.n(S),j=function(){function t(t,e){this.rootContainer=t._impl.modules.layout.rootContainer,this.content=e,this.isShown=!1}return t.prototype.display=function(){this.isShown||(this.wrap||(this.wrap=this.initWrap()),this.rootContainer.appendChild(this.wrap),this.isShown=!0)},t.prototype.hide=function(){this.isShown&&(this.wrap&&this.rootContainer.removeChild(this.wrap),this.isShown=!1)},t.prototype.isDisplayed=function(){return this.isShown},t}(),O="\n    <div class="+I.a.container+">\n        Your MapGL key is invalid. Please contact api@2gis.com to get MapGL key.\n    </div>\n",M=function(t){function e(e){var n=t.call(this,e,O)||this;return e._impl.on("invalidtilekey",(function(){n.isDisplayed()||n.display()})),n}return r(e,t),e.prototype.initWrap=function(){var t=document.createElement("div");return t.classList.add(""+I.a.wrap),t.innerHTML=this.content,t},e}(j),P=function(){for(var t,e="",n=0;n<32;n++)t=16*Math.random()|0,n>4&&n<21&&!(n%4)&&(e+="-"),e+=(12===n?4:16===n?3&t|8:t).toString(16);return e},L=function(){function t(t){this.northEast=t.northEast,this.southWest=t.southWest}return t.prototype.extend=function(t){return this.southWest=[Math.min(this.southWest[0],t[0]),Math.min(this.southWest[1],t[1])],this.northEast=[Math.max(this.northEast[0],t[0]),Math.max(this.northEast[1],t[1])],this},t}(),T=n(1),k=n.n(T),z='\n    <div class="'+k.a.root+'">\n        <div class="'+k.a.container+'">\n            <div class="'+k.a.scroller+'">\n                <div class="'+k.a.content+'" />\n            </div>\n        </div>\n    </div>\n',C=function(t){function e(e,n){var i=t.call(this,e,z,n)||this;return i._removeButtonsEventListeners=function(){i._content&&i._content.childNodes.forEach((function(t){if(i._handlers.has(t)){var e=i._handlers.get(t);void 0!==e&&t.removeEventListener("click",e)}}))},i._showControl=function(t){var e,n,r=t.currentFloorLevelIndex,o=t.floorPlanId,a=t.floorLevels;if(i._floor={currentFloorLevelIndex:r,floorPlanId:o},i._root.style.display="block",i._content.innerHTML="",a.forEach((function(t){var e=t.floorLevelIndex,o=t.floorLevelName,a=document.createElement("button");a.className=k.a.control,a.innerHTML='<div class="'+k.a.label+'">'+o+"</div>",a.name=e.toLocaleString(),r===e&&(a.disabled=!0,n=a);var s=i._controlHandler(e);a.addEventListener("click",s),i._handlers.set(a,s),i._content.append(a)})),n&&n.offsetTop){var s=null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;s&&(s.scrollTop=n.offsetTop)}},i._hideControl=function(){i._removeButtonsEventListeners(),i._floor=void 0,i._root.style.display="none"},i._onLevelChange=function(t){i._switchCurrentFloorLevel(t.floorLevelIndex)},i._controlHandler=function(t){return function(){i._switchCurrentFloorLevel(t),i._floor&&i._map.setFloorPlanLevel(i._floor.floorPlanId,t)}},i._switchCurrentFloorLevel=function(t){i._floor&&(i._wrap.querySelector("."+k.a.control+'[name="'+i._floor.currentFloorLevelIndex+'"]').disabled=!1,i._wrap.querySelector("."+k.a.control+'[name="'+t+'"]').disabled=!0,i._floor.currentFloorLevelIndex=t)},i._map=e,i._root=i._wrap.querySelector("."+k.a.root),i._content=i._wrap.querySelector("."+k.a.content),i._handlers=new WeakMap,i._root.style.display="none",e.on("floorplanshow",i._showControl),e.on("floorplanhide",i._hideControl),e.on("floorlevelchange",i._onLevelChange),i}return r(e,t),e.prototype.destroy=function(){this._map.off("floorplanshow",this._showControl),this._map.off("floorplanhide",this._hideControl),this._map.off("floorlevelchange",this._onLevelChange),this._removeButtonsEventListeners(),t.prototype.destroy.call(this)},e}(d),E=n(7),A=n.n(E),D=function(){function t(t,e){this.wrap=document.createElement("div"),this.wrap.className=A.a.controlPane,this.containers={},t._impl.modules.layout.rootContainer.appendChild(this.wrap),this.padding={top:10,right:10,bottom:10,left:10},this.setPadding(e.padding||{})}return t.prototype.setPadding=function(t){var e=this;Object.keys(this.padding).forEach((function(n){e.padding[n]=void 0!==t[n]?t[n]:10,e.wrap.style["margin"+n.replace(/^\w/,(function(t){return t.toUpperCase()}))]=e.padding[n]+"px"}))},t.prototype.getPadding=function(){return o({},this.padding)},t.prototype.destroy=function(){this.wrap.remove()},t.prototype.getContainerByPosition=function(t){var e=this.containers[t];return e||(e=this.containers[t]=this._initControlContainer(t)),e},t.prototype._initControlContainer=function(t){var e=document.createElement("div");return e.classList.add(A.a.container,A.a[t]),this.wrap.appendChild(e),e},t}(),F=function(){function t(t){var e,n,i,r,o=this;this.commPoiQueue=[],this.msgOrderNumber=0,this.utcOffset=(e=(new Date).getTimezoneOffset(),n=e>0?"-":"+",i=""+Math.floor(Math.abs(e)/60),r=""+Math.abs(e)%60,n+(i.length>1?i:"0"+i)+":"+(r.length>1?r:"0"+r)),this.unsentMessages=[],this.onEvent=function(t){var e,n=t.commPoiIds,i=Date.now();(e=o.commPoiQueue).push.apply(e,n.map((function(t){return{id:t,timestamp:i}}))),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.onSendFail=function(t){var e;(e=o.unsentMessages).push.apply(e,t),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.sendMessages=function(){o.timer=void 0;var t=o.map._impl.state,e=t.tileKey,n=t.sessionId,i=c(c([],o.unsentMessages),o.commPoiQueue.map((function(t){return function(t,e,n,i,r,o){var a={type:302,eventType:"view",eventId:P(),eventOrdinal:n,uiElement:{name:"POI",ownerName:"map"},timestamp:e,utcOffset:r,payload:{POI:{adsHighlight:!0,entity:{id:t,type:"branch"}}},common:{formatVersion:3,appVersion:"v1",product:44,apikey:i}};o&&(a.common.sessionId=o);return a}(t.id,t.timestamp,o.msgOrderNumber++,e,o.utcOffset,n)})));o.commPoiQueue=[],o.unsentMessages=[],i.length&&fetch("https://s1.bss.2gis.com/bss/3",{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).then((function(t){t.ok||o.onSendFail(i)}),(function(){return o.onSendFail(i)}))},this.map=t,t._impl.on("commpoishow",this.onEvent)}return t.prototype.destroy=function(){clearTimeout(this.timer),this.commPoiQueue=[],this.timer=void 0,this.map._impl.off("commpoishow",this.onEvent)},t}();var R=2,B=20,N=function(t){function e(e,n){var i,r,a,s=t.call(this)||this;if("string"==typeof e){var c=document.getElementById(e);if(!c)throw new Error("Could not found html element with id: "+e);a=c}else a=e;var u=o(o({},n),{disableHoverStyles:!0,tileServer:n.tileServer||"tile{subdomain}-sdk.maps.2gis.com",sendAnalytics:!n.disableAnalytics,style:n.style||"c080bb6a-8134-4993-93a1-5b4d8c36a59b",styleOptions:n.styleOptions,styleState:n.styleState,minZoom:null!==(i=n.minZoom)&&void 0!==i?i:R,maxZoom:null!==(r=n.maxZoom)&&void 0!==r?r:B,sessionId:P(),hillshade:n.hillshade?{}:void 0});if(n.floorsServerUrl&&(u.floorsUrl=n.floorsServerUrl),n.trafficServerUrl){var d=new URL(n.trafficServerUrl);u.trafficServer=d.host,u.trafficProtocol=d.protocol.slice(0,-1)}if(n.tileServerUrl){d=new URL(n.tileServerUrl);u.tileProtocol=d.protocol.slice(0,-1),u.tileServer=d.host}return s._impl=new l.Map(a,u),s._impl.on("idle",(function(t){return s._emitMapEvent("idle",t)})).on("resize",(function(t){return s._emitMapEvent("resize",t)})).on("move",(function(t){return s._emitMapEvent("move",t)})).on("movestart",(function(t){return s._emitMapEvent("movestart",t)})).on("moveend",(function(t){return s._emitMapEvent("moveend",t)})).on("center",(function(t){return s._emitMapEvent("center",t)})).on("centerstart",(function(t){return s._emitMapEvent("centerstart",t)})).on("centerend",(function(t){return s._emitMapEvent("centerend",t)})).on("zoom",(function(t){return s._emitMapEvent("zoom",t)})).on("zoomstart",(function(t){return s._emitMapEvent("zoomstart",t)})).on("zoomend",(function(t){return s._emitMapEvent("zoomend",t)})).on("rotation",(function(t){return s._emitMapEvent("rotation",t)})).on("rotationstart",(function(t){return s._emitMapEvent("rotationstart",t)})).on("rotationend",(function(t){return s._emitMapEvent("rotationend",t)})).on("pitch",(function(t){return s._emitMapEvent("pitch",t)})).on("pitchstart",(function(t){return s._emitMapEvent("pitchstart",t)})).on("pitchend",(function(t){return s._emitMapEvent("pitchend",t)})).on("trafficshow",(function(){return s.emit("trafficshow")})).on("traffichide",(function(){return s.emit("traffichide")})).on("floorcomplexshow",(function(t){var e=t.id,n=t.currentFloor,i=t.floorNames;return s.emit("floorplanshow",{floorPlanId:e,currentFloorLevelIndex:n,floorLevels:i.map((function(t,e){return{floorLevelIndex:e,floorLevelName:t}}))})})).on("floorcomplexhide",(function(t){return s.emit("floorplanhide",{floorPlanId:t.id})})).on("floorcomplexlevelchange",(function(t){return s.emit("floorlevelchange",{floorLevelName:t.floorName,floorLevelIndex:t.floorIndex,floorPlanId:t.id})})),s._impl.on("click",(function(t){return s._emitMapPointerEvent("click",t)})).on("dblclick",(function(t){return s._emitMapPointerEvent("dblclick",t)})).on("contextmenu",(function(t){return s._emitMapPointerEvent("contextmenu",t)})).on("mousemove",(function(t){return s._emitMapPointerEvent("mousemove",t)})).on("mouseover",(function(t){return s._emitMapPointerEvent("mouseover",t)})).on("mouseout",(function(t){return s._emitMapPointerEvent("mouseout",t)})).on("mousedown",(function(t){return s._emitMapPointerEvent("mousedown",t)})).on("mouseup",(function(t){return s._emitMapPointerEvent("mouseup",t)})).on("touchstart",(function(t){return s._emitMapPointerEvent("touchstart",t)})).on("touchend",(function(t){return s._emitMapPointerEvent("touchend",t)})),s._impl.on("trafficscore",(function(t){var e=t.score;return s.emit("trafficscore",{score:e})})),s._impl.on("styleload",(function(t){var e=t.style;return s.emit("styleload",{style:e})})),s._controlPane=new D(s,{padding:n.controlsLayoutPadding}),s._initControls(n),n.disableBssStatistics||(s._commPoiShowDispatcher=new F(s)),new M(s),s}return r(e,t),e.prototype.setCenter=function(t,e){return this._impl.setCenter(t,e),this},e.prototype.getCenter=function(){return this._impl.getCenter()},e.prototype.setZoom=function(t,e){return this._impl.setZoom(t,e),this},e.prototype.getZoom=function(){return this._impl.getZoom()},e.prototype.getStyleZoom=function(){return this._impl.getStyleZoom()},e.prototype.setStyleZoom=function(t,e){return this._impl.setStyleZoom(t,e),this},e.prototype.setRotation=function(t,e){return this._impl.setRotation(t,e),this},e.prototype.getRotation=function(){return this._impl.getRotation()},e.prototype.setPitch=function(t,e){return this._impl.setPitch(t,e),this},e.prototype.getPitch=function(){return this._impl.getPitch()},e.prototype.setMinZoom=function(t,e){return this._impl.setMinZoom(t,e),this},e.prototype.getMinZoom=function(){return this._impl.getMinZoom()},e.prototype.getMaxZoom=function(){return this._impl.getMaxZoom()},e.prototype.setMaxZoom=function(t,e){return this._impl.setMaxZoom(t,e),this},e.prototype.setMinPitch=function(t,e){return this._impl.setMinPitch(t,e),this},e.prototype.setMaxPitch=function(t,e){return this._impl.setMaxPitch(t,e),this},e.prototype.getSize=function(){return this._impl.getSize()},e.prototype.getBounds=function(){return new L(this._impl.getBounds())},e.prototype.project=function(t){return this._impl.project(t)},e.prototype.unproject=function(t){return this._impl.unproject(t)},e.prototype.getProjectionMatrix=function(){return this._impl.getCameraViewProjectionMatrix().slice()},e.prototype.getWebGLContext=function(){return this._impl.getWebGLContext()},e.prototype.getCanvas=function(){return this._impl.getCanvas()},e.prototype.getContainer=function(){return this._impl.getExternalContainer()},e.prototype.invalidateSize=function(){return this._impl.invalidateSize(),this},e.prototype.showTraffic=function(){return this._impl.showTraffic(),this},e.prototype.hideTraffic=function(){return this._impl.hideTraffic(),this},e.prototype.setSelectedObjects=function(t){return void 0===t&&(t=[]),this._impl.setSelectedIds(t),this},e.prototype.setStyleById=function(t){return a(this,void 0,Promise,(function(){return s(this,(function(e){return[2,this._impl.setStyle(t)]}))}))},e.prototype.setLanguage=function(t){return this._impl.setLang(t),this},e.prototype.getLanguage=function(){return this._impl.state.lang},e.prototype.setFloorPlanLevel=function(t,e){this._impl.changeFloorNumber(t,e)},e.prototype.setMaxBounds=function(t){return this._impl.setMaxBounds(t),this},e.prototype.getPadding=function(){return this._impl.getPadding()},e.prototype.setPadding=function(t,e){return this._impl.setPadding(t,e),this},e.prototype.setStyle=function(t,e){return this._impl.setStyle(t,e)},e.prototype.addLayer=function(t,e){return this._impl.addLayer(t,e),this},e.prototype.removeLayer=function(t){return this._impl.removeLayer(t),this},e.prototype.setAutoHoverMode=function(t){return this._impl.setAutoHoverMode(t),this},e.prototype.fitBounds=function(t,e){return this._impl.fitBounds(t,e),this},e.prototype.setStyleState=function(t){return this._impl.setStyleState(t),this},e.prototype.setStyleOptions=function(t){return this._impl.patchStyleState({trafficOn:t.traffic}),this},e.prototype.patchStyleState=function(t){return this._impl.patchStyleState(t),this},e.prototype.destroy=function(){var t;null===(t=this._commPoiShowDispatcher)||void 0===t||t.destroy(),this._controlPane.destroy(),this._impl.destroy()},e.prototype.setControlsLayoutPadding=function(t){this._controlPane.setPadding(t)},e.prototype.getControlsLayoutPadding=function(){return this._controlPane.getPadding()},e.prototype._emitMapEvent=function(t,e){this.emit(t,{isUser:e.isUser})},e.prototype._emitMapPointerEvent=function(t,e){var n,i=e.originalEvent,r=e.lngLat,o=e.point,a=e.target,s=e.targetData;if(void 0!==s)switch(s.type){case"geojson":n={type:s.type,source:s.source.mapglApiSource,feature:s.feature};break;case"default":n={type:s.type,id:s.id}}this.emit(t,{originalEvent:i,lngLat:r,point:o,target:void 0!==a?{id:a.id}:void 0,targetData:n})},e.prototype._initControls=function(t){var e=this;if(!1!==t.copyright&&this._impl.modules.tileKeyInfo.getKeyInfo().then((function(n){var i=n.showSberLogo;new x(e,{position:"string"==typeof t.copyright?t.copyright:"bottomRight",interactive:t.interactiveCopyright,autoHide:t.autoHideOSMCopyright,showSberLogo:i})})),!1!==t.zoomControl){var n="string"==typeof t.zoomControl?t.zoomControl:"topRight";new m(this,{position:n})}if(t.trafficControl){n="string"==typeof t.trafficControl?t.trafficControl:"topRight";new y(this,{position:n})}if(t.floorControl){n="string"==typeof t.floorControl?t.floorControl:"topRight";new C(this,{position:n})}},e}(u);function U(t,e){var n=o({},t);for(var i in e)void 0===n[i]&&(n[i]=e[i]);return n}var Z={minZoom:-1/0,maxZoom:1/0,anchor:[.5,.5],offset:[0,18],relativeAnchor:[.5,.5],zIndex:0,lineHeight:1.2,letterSpacing:0,haloRadius:0,fontSize:18,color:"#000000",haloColor:"#ffffff"},H={minZoom:-1/0,maxZoom:1/0,zIndex:0,icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",interactive:!0,hoverSize:[15,43],rotation:0,userData:void 0},G=function(t){function e(e,n){var i=t.call(this)||this;n.icon||(n.anchor=[15,43]);var r=U(n,H);return i.userData=r.userData,i.rootOptions={zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom},i._impl=new l.Marker(e._impl,{coordinates:r.coordinates,icon:r.icon,zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom,interactive:r.interactive,label:W(i.rootOptions,n.label),anchor:n.anchor,size:n.size,rotation:n.rotation,hoverIcon:n.hoverIcon,hoverSize:n.hoverSize,hoverAnchor:n.hoverAnchor}),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.setIcon=function(t){return this._impl.setIcon(t),this},e.prototype.setHoverIcon=function(t){return this._impl.setHoverIcon(t),this},e.prototype.setRotation=function(t){return this._impl.setRotation(t),this},e.prototype.setLabel=function(t){return this._impl.setLabel(W(this.rootOptions,t)),this},e.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},e.prototype.getCoordinates=function(){return this._impl.getCoordinates()},e.prototype.show=function(){return this._impl.show(),this},e.prototype.hide=function(){return this._impl.hide(),this},e.prototype.destroy=function(){this._impl.destroy()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u);function W(t,e){var n,i,r;if(e){e.minZoom=Math.max(null!==(n=e.minZoom)&&void 0!==n?n:t.minZoom,t.minZoom),e.maxZoom=Math.min(null!==(i=e.maxZoom)&&void 0!==i?i:t.maxZoom,t.maxZoom),e.zIndex=null!==(r=e.zIndex)&&void 0!==r?r:t.zIndex+1e-5;var o=U(e,Z);return void 0===e.offset&&void 0!==e.anchor&&(o.offset=e.anchor.map((function(t){return-t}))),{text:o.text,image:e.image,minZoom:o.minZoom,maxZoom:o.maxZoom,color:o.color,fontSize:o.fontSize,haloRadius:o.haloRadius,haloColor:o.haloColor,letterSpacing:o.letterSpacing,lineHeight:o.lineHeight,zIndex:o.zIndex,offset:o.offset,anchor:o.relativeAnchor,font:"Open_Sans"}}}var V={anchor:[0,0],offset:[0,0],fontSize:24,color:"#000000",haloColor:"#ffffff",haloRadius:0,minZoom:-1/0,maxZoom:1/0,zIndex:0,letterSpacing:0,lineHeight:1.2,relativeAnchor:[.5,.5],userData:void 0},q=function(){function t(t,e){this.userData=e.userData;var n=U(e,V);void 0===e.offset&&void 0!==e.anchor&&(n.offset=e.anchor.map((function(t){return-t}))),this._impl=new l.PointLabel(t._impl,{coordinates:n.coordinates,text:n.text,minZoom:n.minZoom,maxZoom:n.maxZoom,color:n.color,fontSize:n.fontSize,haloRadius:n.haloRadius,haloColor:n.haloColor,letterSpacing:n.letterSpacing,lineHeight:n.lineHeight,zIndex:n.zIndex,offset:n.offset,anchor:n.relativeAnchor,image:e.image,font:"Open_Sans"})}return t.prototype.destroy=function(){this._impl.remove()},t.prototype.show=function(){return this._impl.show(),this},t.prototype.hide=function(){return this._impl.hide(),this},t.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},t.prototype.getCoordinates=function(){return this._impl.getCoordinates()},t}(),Y={minZoom:-1/0,maxZoom:1/0,zIndex:0,anchor:[-0,-0],preventMapInteractions:!0,userData:void 0},X=function(){function t(t,e){this.userData=e.userData;var n=U(e,Y);this._impl=new l.HtmlMarker(t._impl,{coordinates:n.coordinates,html:n.html,offset:[-n.anchor[0],-n.anchor[1]],minZoom:n.minZoom,maxZoom:n.maxZoom,zIndex:n.zIndex,preventMapInteractions:n.preventMapInteractions,animate:!1,interactive:!0})}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setCoordinates=function(t){return this._impl.setPosition(t),this},t.prototype.setAnchor=function(t){return this._impl.setOffset([-t[0],-t[1]]),this},t.prototype.setContent=function(t){return this._impl.setContent(t),this},t.prototype.getCoordinates=function(){return this._impl.getPosition()},t.prototype.getAnchor=function(){var t=this._impl.getOffset();return[-t[0],-t[1]]},t.prototype.getContent=function(){return this._impl.getHtmlElement()},t}(),K={zIndex:0,minZoom:-1/0,maxZoom:1/0,color:"#3388ff33",strokeColor:"#3388ff",strokeWidth:1,interactive:!0,userData:void 0},J=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=U(n,K);var r={coordinates:i.options.coordinates,radius:i.options.radius,minZoom:i.options.minZoom,maxZoom:i.options.maxZoom,interactive:i.options.interactive,color:i.options.color,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,segments:150};return i._impl=new l.Circle(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),Q={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#ffffff",radius:20,diameter:NaN,zIndex:0,strokeWidth:3,stroke2Width:0,strokeColor:"#3388ff",stroke2Color:"#00000000",userData:void 0},$=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=U(n,Q);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,width:Number.isNaN(i.options.diameter)?i.options.radius:i.options.diameter,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,border2Width:i.options.stroke2Width,border2Color:i.options.stroke2Color,draggable:!1};return i._impl=new l.CircleMarker(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),tt={interactive:!0,maxZoom:1/0,minZoom:-1/0,width:3,width2:0,width3:0,color:"#3388ff",color2:"#00000000",color3:"#00000000",zIndex:0,zIndex2:-1,zIndex3:-2,dashLength:0,gapLength:0,gapColor:"#ffffff00",userData:void 0},et=function(t){function e(e,n){var i=t.call(this)||this;if(i.userData=n.userData,i.options=U(n,tt),n.dashLength){var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,dashColor:i.options.color,dash2Color:i.options.color,gapColor:i.options.gapColor,dashLength:i.options.dashLength,dash2Length:0,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,gapLength:i.options.gapLength>0?i.options.gapLength:i.options.dashLength,displayTileBounds:!1};i._impl=new l.DashedPolyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}else{r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,width3:i.options.width3,color:i.options.color,color2:i.options.color2,color3:i.options.color3,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,zIndex3:i.options.zIndex3,displayTileBounds:!1};i._impl=new l.Polyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}return i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),nt={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#3388ff33",zIndex:0,strokeWidth:3,strokeColor:"#3388ff",userData:void 0},it=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=U(n,nt);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,zIndex:i.options.zIndex,strokeWidth:i.options.strokeWidth,strokeColor:i.options.strokeColor};return i._impl=new l.Polygon(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),rt={attributes:{},maxZoom:17},ot=function(){function t(t,e){this.options=U(e,rt),this._impl=new l.GeoJsonSource(t._impl,this.options,this)}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t.prototype.setData=function(t){return a(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this._impl.setData(t)];case 1:return e.sent(),[2]}}))}))},t}(),at=n(9),st=n.n(at),ct=function(t){function e(e,n){return t.call(this,e,function(t){return"\n    <div class="+st.a.container+">\n        <div class="+st.a.text+">\n            "+t+"\n        </div>\n    </div>\n"}(n),{position:"bottomLeft"})||this}return r(e,t),e}(d),lt={attributes:{},attribution:"",minZoom:R,maxZoom:B},ut=function(){function t(t,e){this.options=U(e,lt),this._impl=new l.RasterTileSource(t._impl,this.options),this._attribution=new ct(t,this.options.attribution)}return t.prototype.destroy=function(){this._impl.destroy(),this._attribution.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t}();function dt(t){return!ft(t)}function ft(t){if("undefined"==typeof window||"undefined"==typeof document)return"not a browser";if(!Boolean(Function.prototype&&Function.prototype.bind))return"insufficient Function support";if(!("JSON"in window&&"parse"in JSON&&"stringify"in JSON))return"insufficient JSON support";if(!function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(e),i=null;try{i=new Worker(n),t=!0}catch(e){t=!1}i&&i.terminate();return URL.revokeObjectURL(n),t}())return"insufficient worker support";if(!ArrayBuffer.isView)return"insufficient ArrayBuffer support";if(!function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}())return"insufficient Canvas/getImageData support";var e,n=function(t){var e=String(t);void 0===ht[e]&&(ht[e]=function(t){var e,n=function(t){var e=document.createElement("canvas"),n={antialias:!1,stencil:!0,failIfMajorPerformanceCaveat:t};if(!("WebGLRenderingContext"in window))return!1;return e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t);if(!n)return{ok:!1,msg:"error on get context"};for(var i=0,r=["OES_element_index_uint","OES_standard_derivatives","OES_vertex_array_object"];i<r.length;i++){var o=r[i];if(!n.getExtension(o))return{ok:!1,msg:o+" extension is not supported"}}try{e=n.createShader(n.VERTEX_SHADER)}catch(t){return{ok:!1,msg:"browser block shader API"}}if(!e||n.isContextLost())return{ok:!1};return n.shaderSource(e,"void main() {}"),n.compileShader(e),{ok:!0===n.getShaderParameter(e,n.COMPILE_STATUS)}}(t));return ht[e]}(t&&t.failIfMajorPerformanceCaveat||!1);return n.ok?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.isArray?Boolean(Object.keys&&Object.assign&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.freeze)?(e=document.createElement("div"))&&"function"==typeof e.after?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient DOM support":"insufficient Object support":"insufficient Array support":"insufficient WebGL support"+(n.msg?": "+n.msg:"")}var ht={};setTimeout((function(){var t=Array.from(document.querySelectorAll("script")).find((function(t){return t.src.match("https://mapgl.2gis.com/api/js")}));if(t){var e=function(t){var e=t.split("?")[1];if(e){var n=e.split("&").map((function(t){return t.split("=")})).find((function(t){return"callback"===t[0]}));if(n)return n[1]}}(t.src);if(e){if("function"!=typeof window[e])throw new Error('Not found callback function with name "'+e+'"');window[e]()}}}),0);n(17)}])}));
//# sourceMappingURL=index.js.map