site-libsoc/Server/public/js/components/join-us-component.js

2 lines
8.6 KiB
JavaScript

import{S as o,i as t,a as i,b as e,s as r,e as n,n as s,d as a,c as m,o as l,h as p,t as c,j as u,w as g,k as d,x as h,l as f,y as b}from"./index-0d9f0c09.js";import{w as v}from"./index-1c123138.js";import{loadLocaleContent as k,getData as w}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as j}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as y,addPartyPinContent as x,addCoopPinContent as U,addCommunePinContent as P}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function T(o){let t,i,r,n,s,m,l,v,k,w,j,y,x,U,P,T,A,N,S,z,C,D,O,H,L,F,G,K,M,B,E,J,Q,R,W,Y,_,q,I,V,X,Z,$,oo,to,io,eo,ro,no,so,ao,mo,lo,po,co,uo,go,ho,fo,bo,vo,ko,wo,jo,yo,xo,Uo,Po,To,Ao,No,So,zo,Co,Do,Oo,Ho,Lo,Fo,Go,Ko,Mo,Bo,Eo,Jo,Qo,Ro,Wo,Yo,_o,qo=o[1].heading+"",Io=o[1].condition1+"",Vo=o[1].condition2+"",Xo=o[1].condition3+"",Zo=o[1].conditionsOutcome+"",$o=o[1].subheading1+"",ot=o[1].valueProposition1+"",tt=o[1].valueProposition2+"",it=o[1].valueProposition3+"",et=o[1].valueProposition4+"",rt=o[1].valueProposition5+"",nt=o[1].subheading2+"",st=o[1].findOur+"",at=o[1].group+"",mt=o[1].party+"",lt=o[1].tradeUnion+"",pt=o[1].cooperative+"",ct=o[1].or+"",ut=o[1].commune+"",gt=o[1].nearYou+"",dt=o[1].noneNear+"",ht=o[1].DiscordServer+"",ft=o[1].or+"",bt=o[1].WhatsAppGroup+"",vt=o[1].helpStart+"",kt=o[1]["map-prompt"]+"";return{c(){t=p("div"),i=p("div"),r=p("h1"),n=c(qo),s=u(),m=p("img"),v=u(),k=p("ol"),w=p("li"),j=c(Io),y=u(),x=p("li"),U=c(Vo),P=u(),T=p("li"),A=c(Xo),N=u(),S=p("p"),z=u(),C=p("h2"),D=c($o),O=u(),H=p("ol"),L=p("li"),F=c(ot),G=u(),K=p("li"),M=c(tt),B=u(),E=p("li"),J=c(it),Q=u(),R=p("li"),W=c(et),Y=u(),_=p("p"),q=c(rt),I=u(),V=p("h2"),X=c(nt),Z=u(),$=p("div"),oo=p("p"),to=c(st),io=u(),eo=p("ol"),ro=p("li"),no=p("a"),so=c(at),ao=c(","),mo=u(),lo=p("li"),po=p("a"),co=c(mt),uo=u(),go=p("li"),ho=p("a"),fo=c(lt),bo=u(),vo=p("li"),ko=p("a"),wo=c(pt),jo=u(),yo=c(ct),xo=u(),Uo=p("li"),Po=p("a"),To=c(ut),Ao=u(),No=p("p"),So=c(gt),zo=u(),Co=p("p"),Do=c(dt),Oo=u(),Ho=p("a"),Lo=c(ht),Fo=u(),Go=c(ft),Ko=u(),Mo=p("a"),Bo=c(bt),Eo=c(vt),Jo=u(),Qo=p("map-component"),Wo=u(),Yo=p("p"),_o=c(kt),g(m.src,l="/img/common/join-group.svg")||d(m,"src","/img/common/join-group.svg"),d(m,"id","join-group"),d(m,"alt","join group"),d(k,"id","condition-list"),d(H,"id","value-proposition-list"),d(no,"href","/"+o[4]+"/groups"),d(po,"href","/"+o[4]+"/parties"),d(ho,"href","/"+o[4]+"/trade-unions"),d(ko,"href","/"+o[4]+"/cooperatives"),d(Po,"href","/"+o[4]+"/communes"),d(eo,"id","entities-list"),d($,"id","call-to-action-list"),d(Ho,"href","https://discord.gg/Qk8KUk787z"),d(Ho,"target","_blank"),d(Ho,"rel","noreferrer"),d(Mo,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),d(Mo,"target","_blank"),d(Mo,"rel","noreferrer"),h(Qo,"id","map"),h(Qo,"callback",Ro=o[6]),h(Qo,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),d(Yo,"id","add-prompt"),d(i,"id","text-container"),d(t,"id","container")},m(o,a){e(o,t,a),f(t,i),f(i,r),f(r,n),f(i,s),f(i,m),f(i,v),f(i,k),f(k,w),f(w,j),f(k,y),f(k,x),f(x,U),f(k,P),f(k,T),f(T,A),f(k,N),f(k,S),S.innerHTML=Zo,f(i,z),f(i,C),f(C,D),f(i,O),f(i,H),f(H,L),f(L,F),f(H,G),f(H,K),f(K,M),f(H,B),f(H,E),f(E,J),f(H,Q),f(H,R),f(R,W),f(H,Y),f(H,_),f(_,q),f(i,I),f(i,V),f(V,X),f(i,Z),f(i,$),f($,oo),f(oo,to),f($,io),f($,eo),f(eo,ro),f(ro,no),f(no,so),f(ro,ao),f(eo,mo),f(eo,lo),f(lo,po),f(po,co),f(eo,uo),f(eo,go),f(go,ho),f(ho,fo),f(eo,bo),f(eo,vo),f(vo,ko),f(ko,wo),f(vo,jo),f(vo,yo),f(eo,xo),f(eo,Uo),f(Uo,Po),f(Po,To),f($,Ao),f($,No),f(No,So),f(i,zo),f(i,Co),f(Co,Do),f(Co,Oo),f(Co,Ho),f(Ho,Lo),f(Co,Fo),f(Co,Go),f(Co,Ko),f(Co,Mo),f(Mo,Bo),f(Co,Eo),f(i,Jo),f(i,Qo),f(i,Wo),f(i,Yo),f(Yo,_o)},p(o,t){2&t&&qo!==(qo=o[1].heading+"")&&b(n,qo),2&t&&Io!==(Io=o[1].condition1+"")&&b(j,Io),2&t&&Vo!==(Vo=o[1].condition2+"")&&b(U,Vo),2&t&&Xo!==(Xo=o[1].condition3+"")&&b(A,Xo),2&t&&Zo!==(Zo=o[1].conditionsOutcome+"")&&(S.innerHTML=Zo),2&t&&$o!==($o=o[1].subheading1+"")&&b(D,$o),2&t&&ot!==(ot=o[1].valueProposition1+"")&&b(F,ot),2&t&&tt!==(tt=o[1].valueProposition2+"")&&b(M,tt),2&t&&it!==(it=o[1].valueProposition3+"")&&b(J,it),2&t&&et!==(et=o[1].valueProposition4+"")&&b(W,et),2&t&&rt!==(rt=o[1].valueProposition5+"")&&b(q,rt),2&t&&nt!==(nt=o[1].subheading2+"")&&b(X,nt),2&t&&st!==(st=o[1].findOur+"")&&b(to,st),2&t&&at!==(at=o[1].group+"")&&b(so,at),2&t&&mt!==(mt=o[1].party+"")&&b(co,mt),2&t&&lt!==(lt=o[1].tradeUnion+"")&&b(fo,lt),2&t&&pt!==(pt=o[1].cooperative+"")&&b(wo,pt),2&t&&ct!==(ct=o[1].or+"")&&b(yo,ct),2&t&&ut!==(ut=o[1].commune+"")&&b(To,ut),2&t&&gt!==(gt=o[1].nearYou+"")&&b(So,gt),2&t&&dt!==(dt=o[1].noneNear+"")&&b(Do,dt),2&t&&ht!==(ht=o[1].DiscordServer+"")&&b(Lo,ht),2&t&&ft!==(ft=o[1].or+"")&&b(Go,ft),2&t&&bt!==(bt=o[1].WhatsAppGroup+"")&&b(Bo,bt),2&t&&vt!==(vt=o[1].helpStart+"")&&b(Eo,vt),2&t&&Ro!==(Ro=o[6])&&h(Qo,"callback",Ro),2&t&&kt!==(kt=o[1]["map-prompt"]+"")&&b(_o,kt)},d(o){o&&a(t)}}}function A(o){let t,i=12==o[0]&&T(o);return{c(){i&&i.c(),t=n()},m(o,r){i&&i.m(o,r),e(o,t,r)},p(o,e){12==o[0]?i?i.p(o,e):(i=T(o),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(o){i&&i.d(o),o&&a(t)}}}function N(o){let t,i=o[0],m=A(o);return{c(){m.c(),t=n(),this.c=s},m(o,i){m.m(o,i),e(o,t,i)},p(o,[e]){1&e&&r(i,i=o[0])?(m.d(1),m=A(o),m.c(),m.m(t.parentNode,t)):m.p(o,e)},i:s,o:s,d(o){o&&a(t),m.d(o)}}}function S(o,t,i){let e,r,n=v(0);m(o,n,(o=>i(0,e=o)));let s=v({});m(o,s,(o=>i(1,r=o)));let a={},p={};k(s,"groups-component",n),k(s,"communes-component",n),k(s,"cooperatives-component",n),k(s,"parties-component",n),k(s,"trade-unions-component",n),k(s,"countries",n);let c=k(s,"join-us-component",n),u=(o,t)=>{a[t]=JSON.parse(o),p[t]={};for(let o of a[t]){let i=o.country;null==o.contact&&(o.contact="https://discord.gg/Qk8KUk787z"),i in p[t]?p[t][i].push(o):p[t][i]=[o]}n.update((o=>o+1))};function g(o,t,i){let e=o([22,0],2),r={enableCountryGrouping:!0},n=j(a.groups,p.groups,e,t,i,y,"green",r),s=j(a.parties,p.parties,e,t,i,x,"gold",r),m=j(a.tradeUnions,p.tradeUnions,e,t,i,x,"violet",r),l=j(a.cooperatives,p.cooperatives,e,t,i,U,"blue",r),c=j(a.communes,p.communes,e,t,i,P,"red",r),u={};u[t.groups]=n,u[t.parties]=s,u[t.tradeUnions]=m,u[t.cooperatives]=l,u[t.communes]=c,L.control.layers(null,u).addTo(e)}w("/assets/groups.json",(o=>u(o,"groups"))),w("/assets/communes.json",(o=>u(o,"communes"))),w("/assets/cooperatives.json",(o=>u(o,"cooperatives"))),w("/assets/parties.json",(o=>u(o,"parties"))),w("/assets/trade-unions.json",(o=>u(o,"tradeUnions"))),l((()=>{}));return[e,r,n,s,c,g,o=>g(o,r,c)]}class z extends o{constructor(o){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#add-prompt{margin-bottom:2rem}#entities-list li{list-style:none}#entities-list li:before{content:'';display:inline-block;height:1.1rem;width:1rem;background-size:contain;background-repeat:no-repeat;margin-left:-1.5rem;margin-right:0.5rem}#entities-list li:nth-of-type(1):before{background-image:url(https://www.libsoc.org/img/common/markers/marker-green.png)}#entities-list li:nth-of-type(2):before{background-image:url(https://www.libsoc.org/img/common/markers/marker-gold.png)}#entities-list li:nth-of-type(3):before{background-image:url(https://www.libsoc.org/img/common/markers/marker-violet.png)}#entities-list li:nth-of-type(4):before{background-image:url(https://www.libsoc.org/img/common/markers/marker-blue.png)}#entities-list li:nth-of-type(5):before{background-image:url(https://www.libsoc.org/img/common/markers/marker-red.png)}#entities-list li::marker{display:inline-block;height:1rem}h2{margin-bottom:1rem}#value-proposition-list{margin-bottom:2rem}#value-proposition-list>li{margin-bottom:1rem}ol li{position:relative;font-family:var(--serif,serif);margin-left:1.5rem;list-style-position:outside}#join-group{position:absolute;width:10.5rem;height:auto;left:calc(50% + 1.2rem);transform:translate(-50%);z-index:0;opacity:0.2}#map{--height:30rem;--width:100%;--margin-bottom:0.5rem}#call-to-action-list>ol>li{position:relative;font-family:var(--serif,serif);margin-left:3rem}#condition-list{margin-bottom:2rem;margin-top:7rem}#condition-list>li{margin-bottom:1rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#call-to-action-list>p{margin-bottom:1rem}#call-to-action-list>:nth-child(1){margin-bottom:0.5rem}#call-to-action-list>:nth-child(2){margin-bottom:0rem}#call-to-action-list>ol>li{margin-bottom:0.5rem}#text-container a{color:#DD1C1A\n }#container p{text-align:justify}</style>",t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},S,N,r,{},null),o&&o.target&&e(o.target,this,o.anchor)}}customElements.define("join-us-component",z);export{z as default};