import{S as t,i as o,a as n,b as e,s as r,e as a,n as i,d as c,c as s,o as m,g as l,t as p,h as u,j as g,k as d,l as f,m as h,q as b,u as j}from"./index-8c09578c.js";import{w as x}from"./index-77787e10.js";import{loadLocaleContent as y,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k,translate as v}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,s,m,x,y,w,k,v,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,c,l=x({});s(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,c=[t.country,t.state,t.town].filter((t=>null!=t&&null!=t));a="en"==n?c.map((t=>t)).join(", "):c.map((t=>v(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);k(i,c,e,o,n,u,"green")}w("/assets/groups.json",(t=>{n(3,i=JSON.parse(t)),n(0,c={});for(let t of i){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in c?c[o].push(t):n(0,c[o]=[t],c)}a.update((t=>t+1))})),m((()=>{}));return[c,e,r,i,a,l,p,g,function(t){return"en"==p?t:v(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:v(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};