UNPKG

@syncfusion/ej2-maps

Version:

The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options

10 lines 410 kB
/*! * filename: ej2-maps.min.js * version : 29.1.33 * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase","SyncfusionData","SyncfusionPdfExport"],t):"object"==typeof exports?exports.SyncfusionMaps=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):e.SyncfusionMaps=t(e.SyncfusionBase,e.SyncfusionSvgBase,e.SyncfusionData,e.SyncfusionPdfExport)}(self,((e,t,i,o)=>(()=>{"use strict";var n={766:t=>{t.exports=e},74:e=>{e.exports=i},461:e=>{e.exports=o},727:e=>{e.exports=t}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return n[e](i,i.exports,l),i.exports}l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{l.r(r),l.d(r,{Annotation:()=>kt,Annotations:()=>io,Arrow:()=>Nt,BingMap:()=>$i,Border:()=>Ut,Bubble:()=>ro,BubbleSettings:()=>ei,CenterPosition:()=>Zt,CircleOption:()=>z,ColorMapping:()=>eo,ColorMappingSettings:()=>Wt,ColorValue:()=>N,CommonTitleSettings:()=>ti,ConnectorLineSettings:()=>Vt,Coordinate:()=>L,DataLabel:()=>ho,DataLabelSettings:()=>ri,Font:()=>Et,GeoLocation:()=>w,Highlight:()=>uo,HighlightSettings:()=>Jt,ImageExport:()=>vo,InitialMarkerSelectionSettings:()=>qt,InitialShapeSelectionSettings:()=>Xt,Internalize:()=>Ve,LayerPanel:()=>to,LayerSettings:()=>hi,Legend:()=>co,LegendSettings:()=>li,Line:()=>Z,LineOption:()=>U,MapAjax:()=>Mt,MapLocation:()=>j,Maps:()=>lo,MapsAreaSettings:()=>ci,MapsTooltip:()=>yo,Margin:()=>Dt,Marker:()=>so,MarkerBase:()=>di,MarkerClusterData:()=>Ht,MarkerClusterSettings:()=>Gt,MarkerSettings:()=>pi,MinMax:()=>P,NavigationLine:()=>mo,NavigationLineSettings:()=>$t,PathOption:()=>k,PatternOptions:()=>D,PdfExport:()=>xo,Point:()=>_,Polygon:()=>po,PolygonOption:()=>B,PolygonSetting:()=>Qt,PolygonSettings:()=>Kt,PolygonTooltipSettings:()=>Rt,PolylineOption:()=>A,Print:()=>bo,Rect:()=>R,RectOption:()=>E,RelativePoint:()=>M,Selection:()=>go,SelectionSettings:()=>Yt,ShapeSettings:()=>si,Size:()=>n,SubTitleSettings:()=>ii,TextOption:()=>F,Tile:()=>mi,TitleSettings:()=>oi,ToggleLegendSettings:()=>ai,TooltipSettings:()=>jt,Zoom:()=>fo,ZoomSettings:()=>ni,ZoomToolbarButtonSettings:()=>zt,ZoomToolbarSettings:()=>At,ZoomToolbarTooltipSettings:()=>Bt,acos:()=>x,aitoff:()=>b,animate:()=>vt,animationComplete:()=>Di,annotationRendering:()=>Gi,appendShape:()=>he,beforePrint:()=>Yi,bubbleClick:()=>ji,bubbleMouseMove:()=>Ri,bubbleRendering:()=>Zi,calculateBound:()=>C,calculateCenterFromPixel:()=>Ae,calculatePolygonPath:()=>u,calculateScale:()=>ct,calculateShapes:()=>be,calculateSize:()=>s,calculateZoomLevel:()=>wt,changeBorderWidth:()=>pt,changeNavaigationLineWidth:()=>ht,checkPropertyPath:()=>Te,checkShapeDataFields:()=>we,click:()=>yi,clusterSeparate:()=>ae,clusterTemplate:()=>te,compareZoomFactor:()=>Pt,convertElement:()=>G,convertElementFromLabel:()=>q,convertGeoToPoint:()=>c,convertStringToValue:()=>W,convertTileLatLongToPoint:()=>g,createStyle:()=>Qe,createSvg:()=>d,createTooltip:()=>at,customizeStyle:()=>Ke,dataLabelRendering:()=>Ui,degreesToRadians:()=>h,doubleClick:()=>vi,drawBalloon:()=>Me,drawCircle:()=>me,drawCross:()=>xe,drawDiamond:()=>ve,drawHorizontalLine:()=>Ce,drawLine:()=>fe,drawPath:()=>ue,drawPattern:()=>Le,drawPolygon:()=>ge,drawPolyline:()=>ye,drawRectangle:()=>ce,drawStar:()=>_e,drawSymbol:()=>rt,drawSymbols:()=>X,drawTriangle:()=>Se,drawVerticalLine:()=>Oe,elementAnimate:()=>tt,filter:()=>Ie,findMidPointOfPolygon:()=>ke,findPosition:()=>ze,fixInitialScaleForTile:()=>je,formatValue:()=>H,getDistance:()=>ut,getElement:()=>He,getElementByID:()=>Re,getElementOffset:()=>dt,getElementsByClassName:()=>Xe,getFieldData:()=>Pe,getHexColor:()=>lt,getMousePosition:()=>p,getProcessedMarginValue:()=>De,getRatioOfBubble:()=>Fe,getShapeData:()=>We,getTargetElement:()=>Je,getTemplateFunction:()=>Ge,getTouchCenter:()=>yt,getTouches:()=>gt,getTranslate:()=>Ue,getValueFromObject:()=>Y,getZoomTranslate:()=>Ze,isCustomPath:()=>Ne,itemHighlight:()=>Xi,itemSelection:()=>Hi,layerRendering:()=>Pi,legendRendering:()=>Vi,load:()=>ui,loaded:()=>gi,maintainSelection:()=>se,maintainStyleClass:()=>pe,maintainToggleSelection:()=>de,marker:()=>le,markerBoundsComparer:()=>oe,markerClick:()=>Fi,markerClusterClick:()=>Ei,markerClusterListHandler:()=>ie,markerClusterMouseMove:()=>Ai,markerClusterRendering:()=>Ii,markerColorChoose:()=>J,markerDragEnd:()=>Ni,markerDragStart:()=>ki,markerMouseMove:()=>zi,markerRendering:()=>Ti,markerShapeChoose:()=>Q,markerTemplate:()=>re,measureText:()=>T,measureTextElement:()=>I,mergeSeparateCluster:()=>ne,mouseMove:()=>Bi,mousedown:()=>Li,mousemove:()=>_i,mouseup:()=>Mi,onclick:()=>fi,pan:()=>Ki,panComplete:()=>Wi,processResult:()=>Tt,querySelector:()=>Ye,radiansToDegrees:()=>m,removeClass:()=>et,removeElement:()=>Be,renderLegendShape:()=>st,renderTextElement:()=>V,resize:()=>Si,rightClick:()=>bi,roundTo:()=>v,shapeHighlight:()=>Oi,shapeRendering:()=>wi,shapeSelected:()=>Ci,showTooltip:()=>ot,sinci:()=>S,smoothTranslate:()=>Lt,stringToNumber:()=>a,sum:()=>ft,targetTouches:()=>mt,textTrim:()=>Ee,timeout:()=>it,tooltipRender:()=>xi,triggerDownload:()=>O,triggerItemSelectionEvent:()=>$e,triggerShapeEvent:()=>qe,wordWrap:()=>nt,xToCoordinate:()=>y,yToCoordinate:()=>f,zoomAnimate:()=>bt,zoomComplete:()=>qi,zoomIn:()=>Ji,zoomOut:()=>Qi});var e,t=l(766),i=l(727),o=(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)},function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),n=function(e,t){this.width=e,this.height=t};function a(e,i){return"string"!=typeof e?e:(0,t.isNullOrUndefined)(e)?null:-1!==e.indexOf("%")?i/100*parseInt(e,10):parseInt(e,10)}function s(e){e.element.style.height=(0,t.isNullOrUndefined)(e.height)?"auto":e.height,e.element.style.width=(0,t.isNullOrUndefined)(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var i=e.element.clientWidth,o=e.element.clientHeight,l="string"==typeof e.element.style.width?a(e.element.style.width,i):e.element.style.width,r="string"==typeof e.element.style.height?a(e.element.style.height,o):e.element.style.height;new n(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new n(0,0):new n(a(e.width,i)||i||l||600,a(e.height,o)||o||r||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function d(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=s(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function p(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+n-r,d=o.top+a-l;return new j(e-s,t-d)}function h(e){return e*(Math.PI/180)}function m(e){return e*(180/Math.PI)}function c(e,i,o,a,l){var r,s,d,p,c,u,g=new n(l.mapAreaRect.width,l.mapAreaRect.height),S=l.baseMapBounds.longitude,x=l.baseMapBounds.latitude,O=h(e),M=h(i),L=(0,t.isNullOrUndefined)(l.projectionType)?"Mercator":l.projectionType,P=l.isTileMap?256*Math.pow(2,1):(0,t.isNullOrUndefined)(o)?Math.min(g.width,g.height):Math.min(g.width,g.height)*o;if("Normal"===a.geometryType)r=(0,t.isNullOrUndefined)(o)?i:Math.abs((i-S.min)*o),s=(0,t.isNullOrUndefined)(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(L){case"Mercator":var w=new _(P/2,P/2);r=w.x+i*(P/360);var T=C(Math.sin(h(e)),-.9999,.9999);s=w.y+.5*Math.log((1+T)/(1-T))*(-P/(2*Math.PI));break;case"Winkel3":c=((d=b(M,O)).x+M/(Math.PI/2))/2,p=(d.y+O)/2;break;case"Miller":c=M,p=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":c=2/(u=Math.sqrt(Math.PI*(4+Math.PI)))*M*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),p=4/u*O;break;case"AitOff":c=(d=b(M,O)).x,p=d.y;break;case"Eckert5":c=M*(1+Math.cos(O))/Math.sqrt(2+Math.PI),p=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":c=M,p=O;break;case"Eckert6":u=(1+Math.PI/2)*Math.sin(O);for(var I=1/0,F=0;F<10&&Math.abs(I)>1e-6;F++)O-=I=(O+Math.sin(O)-u)/(1+Math.cos(O));u=Math.sqrt(2+Math.PI),c=M*(1+Math.cos(O))/u,p=2*O/u}r="Mercator"===L?r:v(y(l,m(c)),3),s="Mercator"===L?s:-v(f(l,m(p)),3)}return new _(r,s)}function u(e,i,o,n){var a="";return!(0,t.isNullOrUndefined)(n)&&n.length>1&&(Array.prototype.forEach.call(n,(function(t,n){var l=t.latitude,r=t.longitude,s=e.isTileMap?g(new j(r,l),i,e.tileTranslatePoint,!0):c(l,r,i,o,e);a+=0===n?"M "+s.x+" "+s.y:" L "+s.x+" "+s.y})),a+=" z "),a}function g(e,t,i,o){var n=256*Math.pow(2,t),a=(e.x+180)/360,l=Math.sin(e.y*Math.PI/180),r=.5-Math.log((1+l)/(1-l))/(4*Math.PI),s=e.x,d=e.y;return o&&(s=a*n+.5+i.x,d=r*n+.5+i.y),{x:s,y:d}}function y(e,i){var o=e.baseMapBounds.longitude,n=(0,t.isNullOrUndefined)(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(n*(i-o.min)/(o.max-o.min)*100)/100}function f(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function b(e,t){var i=Math.cos(t),o=S(x(i*Math.cos(e/=2)));return new _(2*i*Math.sin(e)*o,Math.sin(t)*o)}function v(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function S(e){return e/Math.sin(e)}function x(e){return Math.acos(e)}function C(e,i,o){return(0,t.isNullOrUndefined)(i)||(e=Math.max(e,i)),(0,t.isNullOrUndefined)(o)||(e=Math.min(e,o)),e}function O(e,i,o,n){(0,t.createElement)("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(n?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}var _=function(e,t){this.x=e,this.y=t},M=function(e,t){this.x=e,this.y=t},L=function(e,t){this.latitude=e,this.longitude=t},P=function(e,t){this.min=e,this.max=t},w=function(e,t){this.latitude=new P(e.min,e.max),this.longitude=new P(t.min,t.max)};function T(e,t){var i=document.getElementById("mapsmeasuretext");return null===i&&((i=document.createElement("text")).id="mapsmeasuretext",document.body.appendChild(i)),i.innerText=e,i.style.cssText="position: absolute; font-size: "+("number"==typeof t.size?t.size+"px":t.size)+"; font-weight: "+t.fontWeight+"; font-style: "+t.fontStyle+"; font-family: "+t.fontFamily+"; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal",new n(i.clientWidth,i.clientHeight)}function I(e,t){var i=document.createElement("canvas"),o=i.getContext("2d");o.font=t.fontStyle+" "+t.fontWeight+" "+("number"==typeof t.size?t.size+"px":t.size)+" "+t.fontFamily;var a=o.measureText(e).width,l=parseFloat(t.size)||16;return i=null,new n(a,l)}var F=function(e,t,i,o,n,a,l){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=a,this.anchor=o,this.x=t,this.y=i,this.baseLine=l},k=function(e,t,i,o,n,a,l,r){this.id=e,this["fill-opacity"]=n,this["stroke-opacity"]=a,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r},N=function(e,t,i){this.r=e,this.g=t,this.b=i},E=function(e){function t(t,i,o,n,a,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,n,o.opacity)||this;return p.y=a.y,p.x=a.x,p.height=a.height,p.width=a.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=n,p["stroke-opacity"]=o.opacity,p}return o(t,e),t}(k),z=function(e){function t(t,i,o,n,a,l,r,s){var d=e.call(this,t,i,o.width,o.color,n,o.opacity,s)||this;return d.cy=l,d.cx=a,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=n,d["stroke-opacity"]=o.opacity,d}return o(t,e),t}(k),B=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.points=i,d}return o(t,e),t}(k),A=function(e){function t(t,i,o,n,a,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,n,a,l,r,s)||this}return o(t,e),t}(B),U=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return o(t,e),t}(k),Z=function(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o},j=function(e,t){this.x=e,this.y=t},R=function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o},D=function(e,t,i,o,n,a,l,r,s){void 0===a&&(a="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=n,this.patternUnits=a,this.patternContentUnits=l,this.patternTransform=r,this.href=s};function V(e,t,o,n,a){void 0===a&&(a=!1);var l,r,s={id:e.id,x:e.x,y:e.y,fill:o,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},d="string"==typeof e.text||"number"==typeof e.text?e.text:a?e.text[e.text.length-1]:e.text[0],p=new i.SvgRenderer(""),h=p.createText(s,d);if(h.style["user-select"]="none",h.style["font-family"]=t.fontFamily,h.style["font-size"]=t.size,h.style["font-weight"]=t.fontWeight,h.style["font-color"]=t.color,h.style["-moz-user-select"]="none",h.style["-webkit-touch-callout"]="none",h.style["-webkit-user-select"]="none",h.style["-khtml-user-select"]="none",h.style["-ms-user-select"]="none",h.style["-o-user-select"]="none","string"!=typeof e.text&&e.text.length>1)for(var m=1,c=e.text.length;m<c;m++)r=T(e.text[m],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(a?-m*r:m*r)},a?e.text[e.text.length-(m+1)]:e.text[m]),h.appendChild(l);return n.appendChild(h),h}function G(e,i,o,n,a,l){var r=(0,t.createElement)("div",{id:i,className:a.element.id+"_marker_template_element"});r.style.cssText="position: absolute;pointer-events: auto;";for(var s=e.length;s>0;)r.appendChild(e[0]),s--;if(!a.isReact||"function"!==l){for(var d=r.innerHTML,p=Object.keys(o),h=RegExp,m=0;m<p.length;m++)"object"==typeof o[p[m]]?d=W(d,"",o,a):"latitude"!==p[m].toLowerCase()&&"longitude"!==p[m].toLowerCase()&&(d=d.replace(new h("{{:"+p[m]+"}}","g"),o[p[m].toString()]));r.innerHTML=d}return r}function H(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function W(e,t,i,o){for(var n=""===e?t:e,a=""===e?n.split("${"):n.split("{{:"),l=RegExp,r=0;r<a.length;r++)if(a[r].indexOf("}}")>-1&&a[r].indexOf(".")>-1||a[r].indexOf("}")>-1&&a[r].search(".")>-1)for(var s=""===e?a[r].split("}"):a[r].split("}}"),d=0;d<s.length;d++)if(s[d].indexOf(".")>-1){var p=Y(i,s[d]).toString();n=""===e?n.split("${"+s[d]+"}").join(H(p,o)):n.replace(new l("{{:"+s[d]+"}}","g"),p)}return n}function q(e,i,o){for(var n=((0,t.isNullOrUndefined)(e.childElementCount)?e[0]:e).outerHTML,a=Object.keys(o),l=RegExp,r=0;r<a.length;r++)n=n.replace(new l("{{:"+a[r]+"}}","g"),o[a[r].toString()]);var s=(0,t.createElement)("div",{id:i,innerHTML:n});return s.style.position="absolute",s}function X(e,i,o,n,a,l,r){var s,d,p,h,m=a.size,c=a.borderColor,u=parseFloat(a.borderWidth),g=parseFloat(a.borderOpacity),y=a.fill,f=a.dashArray,b={color:c,width:u,opacity:g},v=a.opacity,S=new k(n,y,u,c,v,g,f,"");if(m.width="string"==typeof m.width?parseInt(m.width,10):m.width,m.height="string"==typeof m.height?parseInt(m.height,10):m.height,"Circle"===e){var x=(m.width+m.height)/4,C=new z(n,y,b,v,o.x,o.y,x,f);s=r.renderer.drawCircle(C)}else"Rectangle"===e?(d=o.x-m.width/2,p=o.y-m.height/2,h=new E(n,y,b,v,new R(d,p,m.width,m.height),null,null,"",f),s=r.renderer.drawRectangle(h)):"Image"===e?(d=o.x-m.width/2,p=o.y-(n.indexOf("cluster")>-1?m.height/2:m.height),(0,t.merge)(S,{href:i,height:m.height,width:m.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=be(r,e,S,m,o,l);return s}function Y(e,i){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var n=0;n<o.length&&!(0,t.isNullOrUndefined)(e);n++)e=e[o[n]]}return e}function J(e,i){var o=(0,t.isNullOrUndefined)(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=(0,t.isNullOrUndefined)(e.colorValuePath)||(0,t.isNullOrUndefined)(o)?e.fill:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath],e}function Q(e,i){return(0,t.isNullOrUndefined)(e.shapeValuePath)||(0,t.isNullOrUndefined)(i[e.shapeValuePath])?($(e,i),ee(e,i)):($(e,i),"Image"===i[e.shapeValuePath]&&ee(e,i)),e}function K(e,t){return e.indexOf(".")>-1?Y(t,e).toString():t[e]}function $(e,i){if(!(0,t.isNullOrUndefined)(e.shapeValuePath)){var o=K(e.shapeValuePath,i);e.shape=(0,t.isNullOrUndefined)(o)||""===o.toString()?e.shape:o}}function ee(e,i){if(!(0,t.isNullOrUndefined)(e.imageUrlValuePath)){var o=K(e.imageUrlValuePath,i);e.imageUrl=(0,t.isNullOrUndefined)(o)?e.imageUrl:o}}function te(e,i,o,a,l,r,s,d,p,h,m){var u,y,f,b,v,S,x,C,O=[],M=[],L=0,P=0,w=e.markerSettings[l],T=0,I=[],k=!m&&e.markerClusterSettings.allowClustering?e.markerClusterSettings:w.clusterSettings,N=k.labelStyle,E=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),z={cancel:!1,name:Ii,fill:k.fill,height:k.height,width:k.width,imageUrl:k.imageUrl,shape:k.shape,data:undefined,maps:o,cluster:k,border:k.border},B=o.element.getBoundingClientRect();o.isTileMap?new Object:Ue(o,e,!1),o.isTileMap||(C=o.mapLayerPanel.calculateFactor(e));var A=!1,U=o.isTileMap?o.tileZoomLevel:o.mapScaleValue,Z=w.clusterSettings.allowClustering||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1?i.querySelectorAll("[id*='LayerIndex_"+a+"_MarkerIndex_"+l+"']:not([id*='_Group'])"):i.childNodes;return o.trigger("markerClusterRendering",z,(function(j){for(Array.prototype.forEach.call(Z,(function(s,d){if(I=[],"hidden"!==s.style.visibility){if(u=(x=s).getBoundingClientRect(),I.push(d),!(0,t.isNullOrUndefined)(u)){var p=o.markerModule.zoomedMarkerCluster.length>0&&o.markerModule.zoomedMarkerCluster[a]&&o.markerModule.zoomedMarkerCluster[a][d]&&o.markerModule.zoomedMarkerCluster[a][d].length>0||o.markerModule.initialMarkerCluster.length>0&&o.markerModule.initialMarkerCluster[a]&&o.markerModule.initialMarkerCluster[a][d]&&o.markerModule.initialMarkerCluster[a][d].length>0?o.previousScale<U?o.markerModule.zoomedMarkerCluster[a][d]:o.markerModule.initialMarkerCluster[a][d]:null;if((0,t.isNullOrUndefined)(p)||0===p.length||w.clusterSettings.allowClustering?Array.prototype.forEach.call(Z,(function(e,t){t>=d+1&&"hidden"!==e.style.visibility&&oe(e,u,O,I,t)})):Array.prototype.forEach.call(p,(function(e){if(d!==e){var t=document.getElementById(o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l+"_dataIndex_"+e);t&&"hidden"!==t.style.visibility&&oe(t,u,O,I,e)}})),ie(o,U,a,d,I),L=u.left+u.width/2,P=u.top+u.height,O.length>0){I=I.filter((function(e,t,i){return i.indexOf(e)===t})),L-=B.left,P-=o.availableSize.height<=B.height?B.top:B.bottom-B.top;var m,y=parseInt(s.id.split("_dataIndex_")[1].split("_")[0],10),v=parseInt(s.id.split("_MarkerIndex_")[1].split("_")[0],10),M=e.markerSettings[v],j=M.dataSource[y],R=(0,t.isNullOrUndefined)(M.longitudeValuePath)?(0,t.isNullOrUndefined)(j.longitude)?(0,t.isNullOrUndefined)(j.Longitude)?0:parseFloat(j.Longitude):parseFloat(j.longitude):Number(Y(j,M.longitudeValuePath)),D=(0,t.isNullOrUndefined)(M.latitudeValuePath)?(0,t.isNullOrUndefined)(j.latitude)?(0,t.isNullOrUndefined)(j.Latitude)?0:parseFloat(j.Latitude):parseFloat(j.latitude):Number(Y(j,M.latitudeValuePath));o.isTileMap?o.isTileMap&&(m=g(new _(R,D),o.tileZoomLevel,o.tileTranslatePoint,!0)):m=c(D,R,C,e,o),s.style.visibility="hidden",z.cancel?(S={size:new n(k.width,k.height),fill:k.fill,borderColor:k.border.color,borderWidth:k.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:k.imageUrl,shape:k.shape}).borderOpacity=(0,t.isNullOrUndefined)(k.border.opacity)?k.opacity:k.border.opacity:(S={size:new n(z.width,z.height),fill:z.fill,borderColor:z.border.color,borderWidth:z.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:z.imageUrl,shape:z.shape}).borderOpacity=(0,t.isNullOrUndefined)(z.border.opacity)?k.opacity:z.border.opacity,L=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?L:L+3.75-z.width/2,P=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?P:P-z.height/2,o.isTileMap?(L=m.x,P=m.y):(L=(m.x+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.x||o.isResize?h.location.x:o.translatePoint.x))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.x,P=(m.y+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.y||o.isResize?h.location.y:o.translatePoint.y))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.y);var G=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T,H=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T+"_datalabel_"+T;T++;var W=X(S.shape,S.imageUrl,{x:0,y:0},G,S,r,o);W.setAttribute("transform","translate( "+L+" "+P+" )"),"Balloon"===z.shape?W.children[0].textContent=I.toString():W.textContent=I.toString(),f=new F(H,0,3.75,"middle",(O.length+1).toString(),"",""),(b=V(f,N,N.color,r)).setAttribute("transform","translate( "+L+" "+P+" )");var q=parseFloat(W.id.split("_MarkerIndex_")[1]);M.clusterSettings.allowClustering&&q===v||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&q===v?(E.appendChild(W),E.appendChild(b)):(E.appendChild(b),E.appendChild(W))}}O=[]}else ie(o,U,a,d,I);A=!0})),s.appendChild(E),o.svgObject.appendChild(s),o.element.appendChild(o.svgObject),k.allowDeepClustering&&!m&&Array.prototype.forEach.call(E.childNodes,(function(i,o){if("hidden"!==i.style.visibility&&(u=(x=i).getBoundingClientRect(),!((0,t.isNullOrUndefined)(u)||x.id.indexOf("_datalabel_")>-1))){for(var n=o+1;n<E.childElementCount;n++)if("hidden"!==E.childNodes[n].style.visibility&&(v=E.childNodes[n],y=v.getBoundingClientRect(),!((0,t.isNullOrUndefined)(y)||v.id.indexOf("_datalabel_")>-1||u.left>y.right||u.right<y.left||u.top>y.bottom||u.bottom<y.top))){M.push(v),M.push(E.childNodes[n-1]),E.childNodes[n].style.visibility="hidden";var a=(0,t.isNullOrUndefined)(E.childNodes[n+1])?null:parseFloat(E.childNodes[n+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[n+1].style.visibility="hidden":(a=parseFloat(E.childNodes[n-1].id.split("_MarkerIndex_")[1]),E.childNodes[n-1].style.visibility=a===l?"hidden":E.childNodes[n-1].style.visibility),I.push(n)}if(M.length>0){x=i;for(var r=0;r<M.length;r++){"g"===x.tagName?x.childNodes[0].textContent=x.childNodes[0].textContent+","+M[r].textContent:x.textContent=x.textContent+","+M[r].textContent;a=parseFloat(E.childNodes[o+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[o+1].textContent=(+E.childNodes[o+1].textContent+ +M[r+1].textContent).toString():(a=parseFloat(E.childNodes[o-1].id.split("_MarkerIndex_")[1]),E.childNodes[o-1].textContent=a===l?(+E.childNodes[o-1].textContent+ +M[r+1].textContent).toString():E.childNodes[o-1].textContent),r++}}M=[]}}));0<E.childNodes.length;){var R=parseFloat(E.childNodes[0].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&R===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&R===l?r.insertBefore(E.childNodes[0],null):R===l&&r.insertBefore(E.childNodes[0],r.firstChild)}d||Re(o.element.id+"_Secondary_Element").appendChild(r);var D=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygon_Group"),G=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygons_Group");(0,t.isNullOrUndefined)(D)&&!o.isTileMap?s.insertBefore(r,s.firstChild):o.isTileMap?(0,t.isNullOrUndefined)(G)?(0,t.isNullOrUndefined)(D)?s.insertBefore(r,s.firstChild):D.insertAdjacentElement("afterend",r):G.insertAdjacentElement("afterend",r):s.appendChild(r);var H=document.getElementById(o.element.id+"_LayerIndex_"+a+"_markerCluster");if((0,t.isNullOrUndefined)(H)||H.remove(),p){var W=document.getElementById(o.element.id+"_Layer_Collections"),q=document.getElementById(o.element.id+"_LayerIndex_"+(a+1));(0,t.isNullOrUndefined)(W)||(0,t.isNullOrUndefined)(q)?(0,t.isNullOrUndefined)(W)||W.appendChild(s):W.insertBefore(s,q)}})),A}function ie(e,i,o,n,a){if(1===i){var l=(0,t.isNullOrUndefined)(e.markerModule.initialMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.initialMarkerCluster[o][n]=l;var r=(0,t.isNullOrUndefined)(e.markerModule.zoomedMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.zoomedMarkerCluster[o][n]=r}else i>1&&(e.markerModule.zoomedMarkerCluster[o][n]=a.length>1?a:[])}function oe(e,i,o,n,a){var l=e.getBoundingClientRect();(0,t.isNullOrUndefined)(l)||i.left>l.right||i.right<l.left||i.top>l.bottom||i.bottom<l.top||(o.push(l),e.style.visibility="hidden",n.push(a))}function ne(e,t){var i,o=e[0].layerIndex,n=e[0].targetClusterIndex,a=e[0].markerIndex,l=e[0].dataIndex,r=t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a,s=r+"_dataIndex_"+l+"_cluster_"+n,d="Balloon"===t.layers[o].markerClusterSettings.shape?He(s+"_Group"):He(s),p=He(s+"_datalabel_"+n);d.setAttribute("visibility","visible"),p.setAttribute("visibility","visible");for(var h=e[0].data.length,m=0;m<h;m++){if((i=He(r+"_dataIndex_"+e[0].data[m].index+"_Group")?He(r+"_dataIndex_"+e[0].data[m].index+"_Group"):He(r+"_dataIndex_"+e[0].data[m].index)).style.visibility="hidden",i.id.indexOf("Group")>-1)He(r+"_dataIndex_"+e[0].data[m].index).style.visibility="hidden"}Be(t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a+"_markerClusterConnectorLine")}function ae(e,t,i,o){var n=e[0].layerIndex,a=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?He:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a,h=t.layers[n],m=!t.markerModule.allowInnerClusterSetting(h)&&h.markerClusterSettings.allowClustering?h.markerClusterSettings:h.markerSettings[a].clusterSettings,c=h.markerSettings[a],u=p+"_dataIndex_"+r+"_cluster_"+l,g="Balloon"===m.shape?s(d+""+u+"_Group"):s(d+""+u),y=s(d+""+u+"_datalabel_"+l);g.setAttribute("visibility","hidden"),y.setAttribute("visibility","hidden");var f=s(d+""+p+"_dataIndex_"+r+"_Group")?s(d+""+p+"_dataIndex_"+r+"_Group"):s(d+""+p+"_dataIndex_"+r),b=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().height:c.height,v=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().width:c.width,S=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],x=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),C=(v="string"==typeof v?parseFloat(v):v)+5,O=6.28*C,_=0,M=Math.round(O/v);_+=M;for(var L=e[0].data.length,P=Math.round(b/O*100),w=(P=L<M?100/L:P)/100*360,T=L<M?45:0,I=1,F="M "+S+" "+x+" ",k="",N=0;N<L;N++){if(_===N||Math.round(T)>=360){for(T=0,O=6.28*(C=(v+5)*++I),M=Math.round(O/b),P=Math.round(b/O*100);P*M<100;)M++;w=P/100*360,_+=M}var E=S+C*Math.sin(2*Math.PI*T/360),z=x+C*Math.cos(2*Math.PI*T/360);if(k+=F+"L "+E+" "+z+" ",(f=s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group")?s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group"):s(d+""+p+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(f.style.transform="",f.style.left=t.isTileMap?E-v/2+"px":E-v/2-10+"px",f.style.top=t.isTileMap?z-b/2+"px":z-b/2-10+"px",f.setAttribute("transform","translate( "+E+" "+z+")")):f.setAttribute("transform","translate( "+E+" "+z+")"),f.style.visibility="visible",f.id.indexOf("Group")>-1)s(d+""+p+"_dataIndex_"+e[0].data[N].index).style.visibility="visible";T+=w}var B=m.connectorLineSettings,A={d:k,id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:B.color,"fill-opacity":B.opacity,"stroke-opacity":B.opacity,"stroke-width":B.width};i=o?s(t.element.id+"_Markers_Group"):i,i=s(t.element.id+"_LayerIndex_"+n).querySelector("#"+i.id);var U=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_markerClusterConnectorLine"});U.appendChild(t.renderer.drawPath(A)),"Balloon"===c.shape?i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0_Group")):i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0"))}function le(e,i,o,a,l,r,s,d,p,h,m){var c={size:new n(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:(0,t.isNullOrUndefined)(e.border.opacity)?i.opacity:e.border.opacity};Be(s);var u=X(e.shape,e.imageUrl,{x:0,y:0},s,c,m,h),g=(h.isTileMap?l.x:(l.x+r.x)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.x)?0:d.x),y=(h.isTileMap?l.y:(l.y+r.y)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.y)?0:d.y);if(u.setAttribute("transform","translate( "+g+" "+y+" )"),se(h.selectedMarkerElementId,h.markerSelectionClass,u,"MarkerselectionMapStyle"),h.legendSettings.toggleLegendSettings.enable&&"Markers"===h.legendSettings.type){var f=parseInt(u.id.split("_LayerIndex_")[1],10);de(h.toggledElementId,"g"===u.tagName?u.children[0]:u,h.legendSettings.toggleLegendSettings.applyShapeSettings?h.layers[f].shapeSettings:h.legendSettings.toggleLegendSettings)}m.appendChild(u);var b=o.length-1===a?"marker":null,v=new _(g,y);return(i.animationDuration>0||"Enable"===t.animationMode)&&tt(u,i.animationDelay,i.animationDuration,v,h,b),m}function re(e,t,i,o,n,a,l,r,s,d,p){if((t=Ge(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1).length){for(var h=G(t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1),i,o,0,p,typeof e.template),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-(p.isTileMap?0:p.mapAreaRect.x)+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-(p.isTileMap?0:p.mapAreaRect.y)+"px",h.style.transform="translate(-50%, -50%)",a.appendChild(h)}return a}function se(e,i,o,n){if(e)for(var a=0;a<e.length;a++)o.getAttribute("id")===e[a]&&(0!==a&&"g"!==o.tagName||((0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",n)),o.setAttribute("class",n))}function de(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&e.length>0)for(var n=0;n<e.length;n++)e[n]===i.id&&(i.setAttribute("fill",o.fill),i.setAttribute("stroke",o.border.color),i.setAttribute("fill-opacity",o.opacity.toString()),i.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(o.border.opacity)?o.opacity:o.border.opacity).toString()),i.setAttribute("stroke-width",((0,t.isNullOrUndefined)(o.border.width)?0:o.border.width).toString()))}function pe(e,i,o,n,a,l,r){if(!He(e)){var s=(0,t.createElement)("style",{id:e});s.innerText="."+i+"{fill:"+o+";opacity:"+n+";stroke-width:"+l+";stroke:"+a+";}",r.shapeSelectionClass=s,document.body.appendChild(s)}}function he(e,t){return t&&t.appendChild(e),e}function me(e,t,i){return he(e.renderer.drawCircle(t),i)}function ce(e,t,i){return he(e.renderer.drawRectangle(t),i)}function ue(e,t,i){return he(e.renderer.drawPath(t),i)}function ge(e,t,i){return he(e.renderer.drawPolygon(t),i)}function ye(e,t,i){return he(e.renderer.drawPolyline(t),i)}function fe(e,t,i){return he(e.renderer.drawLine(t),i)}function be(e,t,i,o,n,a){var l;switch(t){case"Balloon":l=Me(e,i,o,n,"Marker",a);break;case"Cross":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"Diamond":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+n.y+" L "+n.x+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+n.y+" Z";break;case"Star":i.d="M "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x-o.width/3)+" "+(n.y+o.height/2)+" L "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" Z";break;case"Triangle":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"VerticalLine":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(n.x-o.width/2)+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" Z";break;case"Pentagon":for(var r=void 0,s=void 0,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(n.x+r)+" "+(n.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function ve(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",he(e.renderer.drawPath(t),n)}function Se(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",he(e.renderer.drawPath(t),n)}function xe(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,he(e.renderer.drawPath(t),n)}function Ce(e,t,i,o,n){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,he(e.renderer.drawPath(t),n)}function Oe(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),he(e.renderer.drawPath(t),n)}function _e(e,t,i,o,n){return t.d="M "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y+i.height/2)+" L "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" Z",he(e.renderer.drawPath(t),n)}function Me(e,t,i,o,n,a){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=t.id.indexOf("cluster")>-1?s/2:t.id.indexOf("Legend")>-1?s/1.25:s,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";var d=e.renderer.drawPath(t),p=i.width/30,h=i.height/30;if(d.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+p+", "+h+")"),"Marker"===n){var m=e.renderer.createGroup({id:t.id+"_Group"});he(d,m),l=he(m,a)}else l=d;return l}function Le(e,t,i,o){for(var n=e.renderer.createPattern(t,"pattern"),a=0,l=i;a<l.length;a++){he(l[a],n)}return he(n,o)}function Pe(e,t){for(var i,o=[],n=0,a=e;n<a.length;n++){var l=a[n];i={};for(var r=0,s=t;r<s.length;r++){var d=s[r];l[d]&&(i[d]=l[d])}o.push(i)}return o}function we(e,i,o,n,a){if(!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?Y(e[l],o):e[l][o],s=Te(r,n,i);if((!(0,t.isNullOrUndefined)(r)&&isNaN(i[s])&&"string"==typeof r?r.toLowerCase():r)===(!(0,t.isNullOrUndefined)(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function Te(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o)&&!(0,t.isNullOrUndefined)(i))for(var n="[object Array]"===Object.prototype.toString.call(i)?i:[i],a=0;a<n.length;a++){if(((0,t.isNullOrUndefined)(e)||"string"!=typeof e?e:e.toLowerCase())===(!(0,t.isNullOrUndefined)(o[n[a]])&&isNaN(o[n[a]])?o[n[a]].toLowerCase():o[n[a]]))return n[a]}return null}function Ie(e,t,i){for(var o=[],n=0;n<e.length;n++){var a=e[n];t<=a.y&&i>=a.y&&o.push(a)}return o}function Fe(e,t,i,o,n){var a=(t-e)/100*(100/(n-o)*(i-o))+e;return n===o&&(a=(t-e)/100+e),a}function ke(e,t,i){if(!e.length)return null;for(var o,n,a,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,n="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(a=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(a=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-a*n),d+=Math.abs((o+a)*(o*l-a*n)),p+=Math.abs((n+l)*(o*l-a*n));s*=.5;var m=e.some((function(e){return e.x<5&&e.y<5}))&&"Normal"===i?6:4;d=0!==s?1/(m*s)*d:0,p=0!==s?1/(m*s)*p:0;var c={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},v={x:0,y:0},S={x:0,y:0},x=0;for(h=0;h<=r-1;h++){var C=e[h];C.y="Mercator"===t||"Normal"===i?C.y:-C.y,C.y>p?C.x<d&&d-C.x<d-f.x?f={x:C.x,y:C.y}:C.x>d&&(0===b.x||C.x-d<b.x-d)&&(b={x:C.x,y:C.y}):C.x<d&&d-C.x<d-v.x?v={x:C.x,y:C.y}:C.x>d&&(0===S.x||C.x-d<S.x-d)&&(S={x:C.x,y:C.y}),x=b.y-S.y+(b.y-S.y)/4,C.x>d?C.y<p&&p-C.y<p-c.y?c={x:C.x,y:C.y}:C.y>p&&(0===u.y||C.y-p<u.y-p)&&(u={x:C.x,y:C.y}):C.y<p&&p-C.y<p-g.y?g={x:C.x,y:C.y}:C.y>p&&(0===y.y||C.y-p<y.y-p)&&(y={x:C.x,y:C.y})}return{x:d,y:p,rightMin:c,rightMax:u,leftMin:g,leftMax:y,points:e,topMax:S,topMin:v,bottomMax:b,bottomMin:f,height:x}}function Ne(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,(function(e){(0,t.isNullOrUndefined)(e.geometry)||"Path"!==e.geometry.type||(i=!0)})),i}function Ee(e,i,o,n,a,l){var r=i;if((0,t.isNullOrUndefined)(n)&&(n=a?I(i,o).width:T(i,o).width),n>e)for(var s=i.length-1;s>=0;--s)if(r=i.substring(0,s)+"...",(n=a?I(r,o).width:T(r,o).width)<=e||r.length<4)return r.length<4&&(r=" "),(0,t.isNullOrUndefined)(l)||l.push(n),r;return(0,t.isNullOrUndefined)(l)||l.push(n),r}function ze(e,t,i,o){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var a="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new _(n,a)}function Be(e){var i=document.getElementById(e);return i?(0,t.remove)(i):null}function Ae(e,t){var i=c(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=c(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),n=(i.x+o.x)/2,a=(i.y+o.y)/2;return new _(n,a)}function Ue(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.mapScaleValue)&&(e.mapScaleValue=a),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=n=a=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?1:e.markerZoomedState?e.markerZoomFactor:parseInt(e.scale.toString()),e.markerZoomedState&&e.mapScaleValue!==e.markerZoomFactor&&!e.enablePersistence&&(e.mapScaleValue=a=e.markerZoomFactor),!e.markerZoomedState||(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,h=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,m=o?1:e.mapScaleValue;(0,t.isNullOrUndefined)(e.currentShapeDataLength)&&!(0,t.isNullOrUndefined)(i.shapeData)&&(e.currentShapeDataLength=(0,t.isNullOrUndefined)(i.shapeData.features)?(0,t.isNullOrUndefined)(i.shapeData.geometries)?0:i.shapeData.geometries.length:i.shapeData.features.length);var u,g,y=e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect,f=e.availableSize;if(!(0,t.isNullOrUndefined)(p)&&!(0,t.isNullOrUndefined)(h)){var b=Math.abs(h.x-p.x),v=Math.abs(p.y-h.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:a;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,t.isNullOrUndefined)(r)&&0!==r||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,C=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,O=d?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType||e.isMarkerZoomCompleted?(u=-O.x+x,g=-O.y+C,n=m):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-O.x+x,g=-O.y+C):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-O.x+x,g=-O.y+C,n=m):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),n=e.mapScaleValue)}else if((0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,v*=n;var M=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-M,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new _(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(n=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==((0,t.isNullOrUndefined)(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var L=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=L,b*=L,g=y.y+(-p.y+(y.height/2-v/2)),n=L,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height===e.heightBeforeRefresh&&e.widthBeforeRefresh===e.availableSize.width||(0,t.isNullOrUndefined)(e.translatePoint)||(0,t.isNullOrUndefined)(e.previousTranslate))(0,t.isNullOrUndefined)(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,n=e.scale):(b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,u=y.x+(-p.x+(y.width/2-b/2)),v*=n,g=y.y+(-p.y+(y.height/2-v/2)));else{var P=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),w=b;w*=P;var T=v;T*=P;var I=y.x+(-p.x+(y.width/2-w/2)),F=y.y+(-p.y+(y.height/2-T/2)),k=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,N=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=I+k*e.availableSize.width,g=F+N*e.availableSize.height,e.previousTranslate=new _(I,F),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else v*=n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=n,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));(0,t.isNullOrUndefined)(e.translatePoint)||(u=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:u,g=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return n=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:n,location:new _(u,g)}}function Ze(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.previousCenterLatitude)&&(0,t.isNullOrUndefined)(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,((0,t.isNullOrUndefined)(e.mapScaleValue)||a>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:!(0,t.isNullOrUndefined)(e.mapScaleValue)&&e.mapScaleValue<=e.scale?e.mapScaleValue=e.scale:e.mapScaleValue=a),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue||e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=a=n=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,a=e.mapScaleValue,(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p,h,m=o?1:e.mapScaleValue,u=e.mapAreaRect,g=e.baseMapRectBounds.min,y=e.baseMapRectBounds.max,f=o?1:e.mapScaleValue,b=Math.abs(y.x-g.x),v=Math.abs(g.y-y.y);if(!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,t.isNullOrUndefined)(r)&&0!==r||d){var S=(v+Math.abs(e.mapAreaRect.height-v))/2/f,x=(b+Math.abs(e.mapAreaRect.width-b))/2/f,C=d?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.zoomTranslatePoint)&&(0,t.isNullOrUndefined)(e.previousProjection)||e.zoomNotApplied?(p=-C.x+x+e.mapAreaRect.x/m,h=-C.y+S+e.mapAreaRect.y/m):e.previousProjection!==e.projectionType?(p=-C.x+x,h=-C.y+S):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-C.x+x,e.zoomTranslatePoint.y=-C.y+S),p=e.zoomTranslatePoint.x,h=e.zoomTranslatePoint.y,a=m),(0,t.isNullOrUndefined)(e.translatePoint)||(h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:h,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),n=0!==a?a:1}else{var O=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,M=e.zoomSettings.maxZoom;n=O=O>M?M:O;var L=0===e.mapScaleValue?1:e.mapScaleValue>M?M:e.mapScaleValue;x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!(0,t.isNullOrUndefined)(e.zoomTranslatePoint)||!(0,t.isNullOrUndefined)(e.previousProjection))if(e.previousProjection!==e.projectionType){var P=[],w={x,y:S};P.push(w);for(var T=1;T<M;T++){w={x:P[T-1].x-(u.width/T-u.width/(T+1))/2,y:P[T-1].y-(u.height/T-u.height/(T+1))/2},P.push(w)}x=P[O-1].x,S=P[O-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,O!==L&&(n=L);(0,t.isNullOrUndefined)(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return n=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o?1:n,location:new _(p,h)}}function je(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-t/2,e.tileTranslatePoint.y=e.availableSize.height/2-t/2+20,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function Re(e){return document.getElementById(e)}function De(e){return"string"==typeof e?parseFloat(e):e}function Ve(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function Ge(e,i){var o=null;try{"function"!=typeof e&&document.querySelectorAll(e).length?o=(0,t.compile)(document.querySelector(e).innerHTML.trim()):(i.isVue||i.isVue3||"function"==typeof e)&&(o=(0,t.compile)(e))}catch(i){o=(0,t.compile)(e)}return o}function He(e){return document.getElementById(e)}function We(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),n=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),a=t.layersCollection[o],l=a.layerData[n].property;return a.dataSource&&(i=a.dataSource[we(a.dataSource,l,a.shapeDataPath,a.shapePropertyPath)]),{shapeData:l,data:i}}function qe(e,i,o,n){var a=We(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o};return o.trigger(n,r,(function(){r.border.opacity=(0,t.isNullOrUndefined)(r.border.opacity)?r.opacity:r.border.opacity})),r}function Xe(e){return document.getElementsByClassName(e)}function Ye(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function Je(e,t,i,o){for(var n,a=o.layers[e].shapeData.features,l=0;l<a.length;l++)if(a[l].properties.name===t){n=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return He(n)}function Qe(e,i,o){var n=(0,t.createElement)("style",{id:e});return n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}",n}function Ke(e,i,o){var n=He(e);(0,t.isNullOrUndefined)(n)||(n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke:"+o.border.color+"}")}function $e(e,i,o,n,a){var l={color:e.border.color,width:e.border.width/i.scale,opacity:e.border.opacity},r={opacity:e.opacity,fill:e.fill,border:l,name:Hi,target:o.id,cancel:!1,shapeData:n,dat