import{S as t,i as o,a as n,b as e,s as r,e as s,n as a,d as i,c as m,o as c,f as l,t as p,g as u,h as g,j as d,k as f,l as h,m as b,p as j}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{addMarkersGroups as y,translate as v}from"../../../../../../../../../js/groups.js";import{loadLocaleContent as w,getData as k}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function z(t,o,n){const e=t.slice();return e[12]=o[n][0],e[3]=o[n][1],e}function N(t,o,n){const e=t.slice();return e[15]=o[n],e}function O(t){let o,n,r,s,a,m,c,x,y,v,w,k,N,O,D,R,S,T,A,C,H=t[1].groups+"",J=t[1].p1+"",K=t[1].subheading1+"",L=t[1]["map-prompt"]+"",M=Object.entries(t[0]),Q=[];for(let o=0;on(2,r=t)));let a,i,l=x({});m(t,l,(t=>n(1,e=t)));let p=w(l,"groups-component",s);w(l,"countries",s);function u(t,o,n){let e=t([22,0],2);y(a,i,e,o,n)}k("/assets/groups.json",(t=>{n(3,a=JSON.parse(t)),n(0,i={});for(let t of a){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in i?i[o].push(t):n(0,i[o]=[t],i)}s.update((t=>t+1))})),c((()=>{}));return[i,e,r,a,s,l,p,u,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=>u(t,e,p)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},T,S,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",A);export{A as default};