import{S as t,i as e,a as o,b as i,s as r,e as s,n,d as a,c as m,o as c,f as p,g,h as d,t as l,j as u,k as h,w as f,l as v,m as w,q as x}from"./index-8c09578c.js";import{w as b}from"./index-77787e10.js";import{getData as T,loadLocaleContent as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addCommunePinContent as U,addCoopPinContent as z,addPartyPinContent as N}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function C(t){let e,o,r,s,n,m,c,p,b,T,j,k,y,U,z,N,C,F,L,A,E,H,K,M,Q,R,S,W,q,B,D,J,O,_,G,I,P,V,X,Y,Z,$,tt,et,ot,it,rt,st,nt,at,mt,ct,pt,gt,dt,lt,ut,ht,ft,vt,wt,xt,bt,Tt,jt,kt,yt,Ut=t[3].top+"",zt=t[3].groupsTitle+"",Nt=t[3].groupsText+"",Ct=t[3].partiesTitle+"",Ft=t[3].partiesText+"",Lt=t[3].cooperativesTitle+"",At=t[3].cooperativesText+"",Et=t[3].communesTitle+"",Ht=t[3].communesText+"",Kt=t[3].findUs+"",Mt=t[3].whatNow+"",Qt=t[3].joinUs+"",Rt=t[3].talkWithUs+"";return{c(){e=g("div"),o=g("picture"),o.innerHTML=' \n \n crowd',r=d(),s=g("div"),n=g("p"),m=l(Ut),c=d(),p=g("div"),b=g("div"),T=g("a"),j=g("h2"),k=l(zt),y=d(),U=g("img"),N=d(),C=g("p"),F=l(Nt),L=d(),A=g("div"),E=g("a"),H=g("h2"),K=l(Ct),M=d(),Q=g("img"),S=d(),W=g("p"),q=l(Ft),B=d(),D=g("div"),J=g("a"),O=g("h2"),_=l(Lt),G=d(),I=g("img"),V=d(),X=g("p"),Y=l(At),Z=d(),$=g("div"),tt=g("a"),et=g("h2"),ot=l(Et),it=d(),rt=g("img"),nt=d(),at=g("p"),mt=l(Ht),ct=d(),pt=g("h1"),gt=l(Kt),dt=d(),lt=g("map-component"),ht=d(),ft=g("h1"),vt=l(Mt),wt=d(),xt=g("div"),bt=g("a"),Tt=l(Qt),jt=d(),kt=g("a"),yt=l(Rt),u(T,"href","/"+t[6]+"/groups"),u(U,"id","groups-img"),h(U.src,z="/img/common/groups.svg")||u(U,"src","/img/common/groups.svg"),u(U,"alt","groups"),u(E,"href","/"+t[6]+"/parties"),u(Q,"id","parties-img"),h(Q.src,R="/img/common/parties.svg")||u(Q,"src","/img/common/parties.svg"),u(Q,"alt","coops"),u(J,"href","/"+t[6]+"/coops"),u(I,"id","coops-img"),h(I.src,P="/img/common/coops.svg")||u(I,"src","/img/common/coops.svg"),u(I,"alt","coops"),u(tt,"href","/"+t[6]+"/communes"),u(rt,"id","communes-img"),h(rt.src,st="/img/common/communes.svg")||u(rt,"src","/img/common/communes.svg"),u(rt,"alt","communes"),u(p,"id","container-grid"),f(p,"--grid-width",t[1]),u(pt,"id","find-us"),v(lt,"id","map"),v(lt,"callback",ut=t[9]),v(lt,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),u(bt,"class","link-button"),u(bt,"href","/"+t[6]+"/join-us"),u(kt,"class","link-button"),u(kt,"href","https://discord.gg/Qk8KUk787z"),u(kt,"target","_blank"),u(kt,"rel","noreferrer"),u(xt,"id","action-container"),u(s,"id","text-container"),u(e,"id","container")},m(a,g){i(a,e,g),w(e,o),w(e,r),w(e,s),w(s,n),w(n,m),w(s,c),w(s,p),w(p,b),w(b,T),w(T,j),w(j,k),w(b,y),w(b,U),w(b,N),w(b,C),w(C,F),w(p,L),w(p,A),w(A,E),w(E,H),w(H,K),w(A,M),w(A,Q),w(A,S),w(A,W),w(W,q),w(p,B),w(p,D),w(D,J),w(J,O),w(O,_),w(D,G),w(D,I),w(D,V),w(D,X),w(X,Y),w(p,Z),w(p,$),w($,tt),w(tt,et),w(et,ot),w($,it),w($,rt),w($,nt),w($,at),w(at,mt),t[8](p),w(s,ct),w(s,pt),w(pt,gt),w(s,dt),w(s,lt),w(s,ht),w(s,ft),w(ft,vt),w(s,wt),w(s,xt),w(xt,bt),w(bt,Tt),w(xt,jt),w(xt,kt),w(kt,yt)},p(t,e){8&e&&Ut!==(Ut=t[3].top+"")&&x(m,Ut),8&e&&zt!==(zt=t[3].groupsTitle+"")&&x(k,zt),8&e&&Nt!==(Nt=t[3].groupsText+"")&&x(F,Nt),8&e&&Ct!==(Ct=t[3].partiesTitle+"")&&x(K,Ct),8&e&&Ft!==(Ft=t[3].partiesText+"")&&x(q,Ft),8&e&&Lt!==(Lt=t[3].cooperativesTitle+"")&&x(_,Lt),8&e&&At!==(At=t[3].cooperativesText+"")&&x(Y,At),8&e&&Et!==(Et=t[3].communesTitle+"")&&x(ot,Et),8&e&&Ht!==(Ht=t[3].communesText+"")&&x(mt,Ht),2&e&&f(p,"--grid-width",t[1]),8&e&&Kt!==(Kt=t[3].findUs+"")&&x(gt,Kt),8&e&&ut!==(ut=t[9])&&v(lt,"callback",ut),8&e&&Mt!==(Mt=t[3].whatNow+"")&&x(vt,Mt),8&e&&Qt!==(Qt=t[3].joinUs+"")&&x(Tt,Qt),8&e&&Rt!==(Rt=t[3].talkWithUs+"")&&x(yt,Rt)},d(o){o&&a(e),t[8](null)}}}function F(t){let e,o=10==t[2]&&C(t);return{c(){o&&o.c(),e=s()},m(t,r){o&&o.m(t,r),i(t,e,r)},p(t,i){10==t[2]?o?o.p(t,i):(o=C(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&a(e)}}}function A(t){let e,o=t[2],m=F(t);return{c(){m.c(),e=s(),this.c=n},m(t,o){m.m(t,o),i(t,e,o)},p(t,[i]){4&i&&r(o,o=t[2])?(m.d(1),m=F(t),m.c(),m.m(e.parentNode,e)):m.p(t,i)},i:n,o:n,d(t){t&&a(e),m.d(t)}}}function E(t,e,o){let i,r,s,n,a=b(0);m(t,a,(t=>o(2,i=t)));let g=b({});m(t,g,(t=>o(3,r=t)));let d={},l={};function u(t){o(1,n="1fr 1fr")}let h=(t,e)=>{d[e]=JSON.parse(t),l[e]={};for(let t of d[e]){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in l[e]?l[e][o].push(t):l[e][o]=[t]}a.update((t=>t+1))};T("/assets/groups.json",(t=>h(t,"groups"))),T("/assets/communes.json",(t=>h(t,"communes"))),T("/assets/cooperatives.json",(t=>h(t,"cooperatives"))),T("/assets/parties.json",(t=>h(t,"parties"))),j(g,"groups-component",a),j(g,"communes-component",a),j(g,"cooperatives-component",a),j(g,"parties-component",a),j(g,"countries",a);let f=j(g,"landing-component",a,u);function v(t,e,o){let i=t([22,0],2),r=k(d.groups,l.groups,i,e,o,y,"green"),s=k(d.communes,l.communes,i,e,o,U,"red"),n=k(d.cooperatives,l.cooperatives,i,e,o,z,"blue"),a=k(d.parties,l.parties,i,e,o,N,"gold"),m={};m[e.groups]=r,m[e.communes]=s,m[e.cooperatives]=n,m[e.parties]=a,L.control.layers(null,m).addTo(i)}u(),c((()=>{}));return[s,n,i,r,a,g,f,v,function(t){p[t?"unshift":"push"]((()=>{s=t,o(0,s)}))},t=>v(t,r,f)]}class H extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},E,A,r,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("landing-component",H);export{H as default};