class VectorMap{currentResizeHandler=null;init(){this.initWorldMapMarker(),this.initWorldMarkerLine(),this.initIndiaMap(),this.initCanadaMap(),this.initRussiaMap(),this.initUsMap(),this.initIraqMap(),this.initSpainMap()}initVectorMap(i,a={}){let t=null;if(t=i instanceof Element?i:document.querySelector(i)){t.querySelector("svg")&&((i=t.jsVectorMap)&&"function"==typeof i.destroy?i.destroy():t.innerHTML=""),this.currentResizeHandler&&(window.removeEventListener("resize",this.currentResizeHandler),this.currentResizeHandler=null);let e=new jsVectorMap({selector:t,...a});i=debounce(()=>{e.updateSize()},200);this.currentResizeHandler=i,window.addEventListener("resize",this.currentResizeHandler)}}initWorldMapMarker(){this.initVectorMap("#world-map-markers",{map:"world",zoomOnScroll:!1,zoomButtons:!0,markersSelectable:!0,markers:[{name:"Greenland",coords:[72,-42]},{name:"Canada",coords:[56.1304,-106.3468]},{name:"Brazil",coords:[-14.235,-51.9253]},{name:"Egypt",coords:[26.8206,30.8025]},{name:"Russia",coords:[61,105]},{name:"China",coords:[35.8617,104.1954]},{name:"United States",coords:[37.0902,-95.7129]},{name:"Norway",coords:[60.472024,8.468946]},{name:"Ukraine",coords:[48.379433,31.16558]}],markerStyle:{initial:{fill:theme("primary")},selected:{fill:theme("primary")}},regionStyle:{initial:{stroke:"#aab9d14d",strokeWidth:.25,fill:"#aab9d14d",fillOpacity:1}},labels:{markers:{render:e=>e.name}}})}initWorldMarkerLine(){this.initVectorMap("#world-map-markers-line",{map:"world_merc",zoomOnScroll:!1,zoomButtons:!1,markers:[{name:"Greenland",coords:[72,-42]},{name:"Canada",coords:[56.1304,-106.3468]},{name:"Brazil",coords:[-14.235,-51.9253]},{name:"Egypt",coords:[26.8206,30.8025]},{name:"Russia",coords:[61,105]},{name:"China",coords:[35.8617,104.1954]},{name:"United States",coords:[37.0902,-95.7129]},{name:"Norway",coords:[60.472024,8.468946]},{name:"Ukraine",coords:[48.379433,31.16558]}],lines:[{from:"Canada",to:"Egypt"},{from:"Russia",to:"Egypt"},{from:"Greenland",to:"Egypt"},{from:"Brazil",to:"Egypt"},{from:"United States",to:"Egypt"},{from:"China",to:"Egypt"},{from:"Norway",to:"Egypt"},{from:"Ukraine",to:"Egypt"}],regionStyle:{initial:{stroke:"#aab9d14d",strokeWidth:.25,fill:"#aab9d14d",fillOpacity:1}},markerStyle:{initial:{fill:theme("secondary")},selected:{fill:theme("secondary")}},lineStyle:{animation:!0,strokeDasharray:"6 3 6"}})}initUsMap(){this.initVectorMap("#usa-vector-map",{map:"us_aea_en",regionStyle:{initial:{fill:theme("primary")}}})}initIndiaMap(){this.initVectorMap("#india-vector-map",{map:"in_mill",backgroundColor:"transparent",regionStyle:{initial:{fill:"#aab9d14d"},selected:{fill:theme("secondary")}},selectedRegions:["IN-GJ"]})}initCanadaMap(){this.initVectorMap("#canada-vector-map",{map:"canada",zoomOnScroll:!1,regionStyle:{initial:{fill:theme("primary")}}})}initRussiaMap(){this.initVectorMap("#russia-vector-map",{map:"russia",zoomOnScroll:!1,regionStyle:{initial:{fill:"#aab9d14d"}}})}initIraqMap(){this.initVectorMap("#iraq-vector-map",{map:"iraq",zoomOnScroll:!1,regionStyle:{initial:{fill:theme("primary")}}})}initSpainMap(){this.initVectorMap("#spain-vector-map",{map:"spain",zoomOnScroll:!1,regionStyle:{initial:{fill:"#aab9d14d"}}})}}document.addEventListener("DOMContentLoaded",function(e){(new VectorMap).init()});let mapObserver=new MutationObserver(()=>{(new VectorMap).init()});mapObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-skin","data-bs-theme"]});