import{S as t,i as o,a as n,b as e,s as r,q as a,n as i,g as s,t as c,o as m,e as l,w as p,c as u,d as g,u as f,v as d,f as h,x as b,y as j}from"./index-5b685137.js";import{w as x}from"./index-8744cf8a.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t,o,n){const e=t.slice();return e[13]=o[n][0],e[3]=o[n][1],e}function N(t,o,n){const e=t.slice();return e[16]=o[n],e}function O(t){let o,n,r,a,i,c,m,x,y,w,v,k,N,O,T,E,R,S,_,q,A=t[1].groups+"",C=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let o=0;on(2,r=t)));let i,s,l=x({});c(t,l,(t=>n(1,e=t)));let p=y(l,"groups-component",a);y(l,"countries",a);function u(t,o,n){let e,r=""+o.Group+"
";for(let a of["location","members","contact"]){let i=o[a]+": ";if("contact"==a)r+=i+""+t.contact+"";else if("location"==a){let a,s=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?s.map((t=>t)).join(", "):s.map((t=>k(o,t))).join(", "),r+=i+a+"
",e=[t.latitude,t.longitude]}else r+=i+t[a]+"
"}return{text:r,coordinates:e}}function g(t,o,n){let e=t([22,0],2);v(i,s,e,o,n,u,"green")}w("/assets/groups.json",(t=>{n(3,i=JSON.parse(t)),n(0,s={});for(let t of i){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in s?s[o].push(t):n(0,s[o]=[t],s)}a.update((t=>t+1))})),m((()=>{}));return[s,e,r,i,a,l,p,g,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>g(t,e,p)]}class _ extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},S,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("partners-component",_);export{_ as default};