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

2 lines
8.7 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,Io,Vo=o[1].heading+"",Xo=o[1].condition1+"",Zo=o[1].condition2+"",$o=o[1].condition3+"",ot=o[1].conditionsOutcome+"",tt=o[1].subheading1+"",it=o[1].valueProposition1+"",et=o[1].valueProposition2+"",rt=o[1].valueProposition3+"",nt=o[1].valueProposition4+"",st=o[1].valueProposition5+"",at=o[1].subheading2+"",mt=o[1].findOur+"",lt=o[1].group+"",pt=o[1].party+"",ct=o[1].tradeUnion+"",ut=o[1].cooperative+"",gt=o[1].or+"",dt=o[1].commune+"",ht=o[1].nearYou+"",ft=o[1].noneNear+"",bt=o[1].DiscordServer+"",vt=o[1].or+"",kt=o[1].WhatsAppGroup+"",wt=o[1].helpStart+"",jt=o[1]["map-prompt"]+"";return{c(){t=p("div"),i=p("div"),r=p("h1"),n=c(Vo),s=u(),m=p("img"),v=u(),k=p("ol"),w=p("li"),j=c(Xo),y=u(),x=p("li"),U=c(Zo),P=u(),T=p("li"),A=c($o),N=u(),S=p("p"),z=u(),C=p("h2"),D=c(tt),O=u(),H=p("ol"),L=p("li"),F=c(it),G=u(),K=p("li"),M=c(et),B=u(),E=p("li"),J=c(rt),Q=u(),R=p("li"),W=c(nt),Y=u(),_=p("p"),q=c(st),I=u(),V=p("h2"),X=c(at),Z=u(),$=p("div"),oo=p("p"),to=c(mt),io=u(),eo=p("ol"),ro=p("li"),no=p("a"),so=c(lt),ao=c(","),mo=u(),lo=p("li"),po=p("a"),co=c(pt),uo=c(","),go=u(),ho=p("li"),fo=p("a"),bo=c(ct),vo=c(","),ko=u(),wo=p("li"),jo=p("a"),yo=c(ut),xo=u(),Uo=c(gt),Po=u(),To=p("li"),Ao=p("a"),No=c(dt),So=u(),zo=p("p"),Co=c(ht),Do=u(),Oo=p("p"),Ho=c(ft),Lo=u(),Fo=p("a"),Go=c(bt),Ko=u(),Mo=c(vt),Bo=u(),Eo=p("a"),Jo=c(kt),Qo=c(wt),Ro=u(),Wo=p("map-component"),_o=u(),qo=p("p"),Io=c(jt),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(fo,"href","/"+o[4]+"/trade-unions"),d(jo,"href","/"+o[4]+"/cooperatives"),d(Ao,"href","/"+o[4]+"/communes"),d(eo,"id","entities-list"),d($,"id","call-to-action-list"),d(Fo,"href","https://discord.gg/Qk8KUk787z"),d(Fo,"target","_blank"),d(Fo,"rel","noreferrer"),d(Eo,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),d(Eo,"target","_blank"),d(Eo,"rel","noreferrer"),h(Wo,"id","map"),h(Wo,"callback",Yo=o[6]),h(Wo,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),d(qo,"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=ot,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(lo,uo),f(eo,go),f(eo,ho),f(ho,fo),f(fo,bo),f(ho,vo),f(eo,ko),f(eo,wo),f(wo,jo),f(jo,yo),f(wo,xo),f(wo,Uo),f(eo,Po),f(eo,To),f(To,Ao),f(Ao,No),f($,So),f($,zo),f(zo,Co),f(i,Do),f(i,Oo),f(Oo,Ho),f(Oo,Lo),f(Oo,Fo),f(Fo,Go),f(Oo,Ko),f(Oo,Mo),f(Oo,Bo),f(Oo,Eo),f(Eo,Jo),f(Oo,Qo),f(i,Ro),f(i,Wo),f(i,_o),f(i,qo),f(qo,Io)},p(o,t){2&t&&Vo!==(Vo=o[1].heading+"")&&b(n,Vo),2&t&&Xo!==(Xo=o[1].condition1+"")&&b(j,Xo),2&t&&Zo!==(Zo=o[1].condition2+"")&&b(U,Zo),2&t&&$o!==($o=o[1].condition3+"")&&b(A,$o),2&t&&ot!==(ot=o[1].conditionsOutcome+"")&&(S.innerHTML=ot),2&t&&tt!==(tt=o[1].subheading1+"")&&b(D,tt),2&t&&it!==(it=o[1].valueProposition1+"")&&b(F,it),2&t&&et!==(et=o[1].valueProposition2+"")&&b(M,et),2&t&&rt!==(rt=o[1].valueProposition3+"")&&b(J,rt),2&t&&nt!==(nt=o[1].valueProposition4+"")&&b(W,nt),2&t&&st!==(st=o[1].valueProposition5+"")&&b(q,st),2&t&&at!==(at=o[1].subheading2+"")&&b(X,at),2&t&&mt!==(mt=o[1].findOur+"")&&b(to,mt),2&t&&lt!==(lt=o[1].group+"")&&b(so,lt),2&t&&pt!==(pt=o[1].party+"")&&b(co,pt),2&t&&ct!==(ct=o[1].tradeUnion+"")&&b(bo,ct),2&t&&ut!==(ut=o[1].cooperative+"")&&b(yo,ut),2&t&&gt!==(gt=o[1].or+"")&&b(Uo,gt),2&t&&dt!==(dt=o[1].commune+"")&&b(No,dt),2&t&&ht!==(ht=o[1].nearYou+"")&&b(Co,ht),2&t&&ft!==(ft=o[1].noneNear+"")&&b(Ho,ft),2&t&&bt!==(bt=o[1].DiscordServer+"")&&b(Go,bt),2&t&&vt!==(vt=o[1].or+"")&&b(Mo,vt),2&t&&kt!==(kt=o[1].WhatsAppGroup+"")&&b(Jo,kt),2&t&&wt!==(wt=o[1].helpStart+"")&&b(Qo,wt),2&t&&Yo!==(Yo=o[6])&&h(Wo,"callback",Yo),2&t&&jt!==(jt=o[1]["map-prompt"]+"")&&b(Io,jt)},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};