2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{S as t,i as e,a as n,b as o,s as r,e as i,n as a,d as s,c as m,o as c,g as l,t as p,h as g,j as d,k as h,l as f,m as u,q as b,u as w}from"./index-8c09578c.js";import{w as x}from"./index-77787e10.js";import{loadLocaleContent as j,getData as y}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartyPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,j,y,v,k,z,O,T,D,R,S,_,q,A=t[1].parties+"",C=t[1].p1+"",F=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let e=0;e<J.length;e+=1)K[e]=E(N(t,J,e));return{c(){e=l("div"),n=l("div"),r=l("h1"),i=p(A),a=g(),m=l("img"),x=g(),j=l("p"),y=p(C),v=g(),k=l("h3"),z=p(F),O=g(),T=l("map-component"),R=g(),S=l("p"),_=p(H),q=g();for(let t=0;t<K.length;t+=1)K[t].c();d(m,"id","party-img"),h(m.src,c="/img/common/parties.svg")||d(m,"src","/img/common/parties.svg"),d(m,"alt","party"),d(j,"class","description"),f(T,"id","map"),f(T,"callback",D=t[10]),d(S,"id","add-prompt"),d(n,"id","text-container"),d(e,"id","container")},m(t,s){o(t,e,s),u(e,n),u(n,r),u(r,i),u(n,a),u(n,m),u(n,x),u(n,j),u(j,y),u(n,v),u(n,k),u(k,z),u(n,O),u(n,T),u(n,R),u(n,S),u(S,_),u(n,q);for(let t=0;t<K.length;t+=1)K[t].m(n,null)},p(t,e){if(2&e&&A!==(A=t[1].parties+"")&&b(i,A),2&e&&C!==(C=t[1].p1+"")&&b(y,C),2&e&&F!==(F=t[1].subheading1+"")&&b(z,F),2&e&&D!==(D=t[10])&&f(T,"callback",D),2&e&&H!==(H=t[1]["map-prompt"]+"")&&b(_,H),771&e){let o;for(J=Object.entries(t[0]),o=0;o<J.length;o+=1){const r=N(t,J,o);K[o]?K[o].p(r,e):(K[o]=E(r),K[o].c(),K[o].m(n,null))}for(;o<K.length;o+=1)K[o].d(1);K.length=J.length}},d(t){t&&s(e),w(K,t)}}}function D(t){let e,n,r,i,a,m,c,h,f,w,x,j,y,v,k,z,N,O,T,D,E,R,S,_,q,A,C,F,H,J,K,L,M,Q,U,B,G,I,P,V,W,X,Y,Z,$,tt=t[1].name+"",et=t[15].name+"",nt=t[1].location+"",ot=t[9](t[15])+"",rt=t[1].website+"",it=t[15].website+"",at=t[1].contact+"",st=t[15].contact+"",mt=t[1].description+"",ct=t[1][t[15].description]+"";return{c(){e=l("div"),n=l("div"),r=l("picture"),i=l("source"),m=g(),c=l("source"),f=g(),w=l("img"),x=g(),j=l("div"),y=l("p"),v=l("b"),k=p(tt),z=p(": "),N=p(et),O=g(),T=l("p"),D=l("b"),E=p(nt),R=p(": "),S=p(ot),_=g(),q=l("p"),A=l("b"),C=p(rt),F=p(": "),H=l("a"),J=p(it),L=g(),M=l("p"),Q=l("b"),U=p(at),B=p(": "),G=l("a"),I=p(st),V=g(),W=l("p"),X=l("b"),Y=p(mt),Z=p(": "),$=p(ct),d(i,"srcset",a="/img/parties/"+t[15].logo+".webp"),d(c,"srcset",h="/img/parties/"+t[15].logo+".jpg"),d(w,"class","party-logo"),d(w,"alt","logo"),d(H,"href",K=t[15].website),d(H,"target",";_blank;"),d(H,"rel","noreferrer"),d(G,"href",P=t[15].contact),d(G,"target",";_blank;"),d(G,"rel","noreferrer"),d(n,"class","img-general-info"),d(e,"class","location-info")},m(t,a){o(t,e,a),u(e,n),u(n,r),u(r,i),u(r,m),u(r,c),u(r,f),u(r,w),u(n,x),u(n,j),u(j,y),u(y,v),u(v,k),u(v,z),u(y,N),u(j,O),u(j,T),u(T,D),u(D,E),u(D,R),u(T,S),u(j,_),u(j,q),u(q,A),u(A,C),u(A,F),u(q,H),u(H,J),u(j,L),u(j,M),u(M,Q),u(Q,U),u(Q,B),u(M,G),u(G,I),u(e,V),u(e,W),u(W,X),u(X,Y),u(X,Z),u(W,$)},p(t,e){1&e&&a!==(a="/img/parties/"+t[15].logo+".webp")&&d(i,"srcset",a),1&e&&h!==(h="/img/parties/"+t[15].logo+".jpg")&&d(c,"srcset",h),2&e&&tt!==(tt=t[1].name+"")&&b(k,tt),1&e&&et!==(et=t[15].name+"")&&b(N,et),2&e&&nt!==(nt=t[1].location+"")&&b(E,nt),1&e&&ot!==(ot=t[9](t[15])+"")&&b(S,ot),2&e&&rt!==(rt=t[1].website+"")&&b(C,rt),1&e&&it!==(it=t[15].website+"")&&b(J,it),1&e&&K!==(K=t[15].website)&&d(H,"href",K),2&e&&at!==(at=t[1].contact+"")&&b(U,at),1&e&&st!==(st=t[15].contact+"")&&b(I,st),1&e&&P!==(P=t[15].contact)&&d(G,"href",P),2&e&&mt!==(mt=t[1].description+"")&&b(Y,mt),3&e&&ct!==(ct=t[1][t[15].description]+"")&&b($,ct)},d(t){t&&s(e)}}}function E(t){let e,n,r,i,a,m=t[8](t[12])+"",c=t[3],h=[];for(let e=0;e<c.length;e+=1)h[e]=D(O(t,c,e));return{c(){e=l("h4"),n=p(m),r=g(),i=l("div");for(let t=0;t<h.length;t+=1)h[t].c();a=g(),d(e,"class","country-name"),d(i,"class","country-block")},m(t,s){o(t,e,s),u(e,n),o(t,r,s),o(t,i,s);for(let t=0;t<h.length;t+=1)h[t].m(i,null);u(i,a)},p(t,e){if(1&e&&m!==(m=t[8](t[12])+"")&&b(n,m),515&e){let n;for(c=t[3],n=0;n<c.length;n+=1){const o=O(t,c,n);h[n]?h[n].p(o,e):(h[n]=D(o),h[n].c(),h[n].m(i,a))}for(;n<h.length;n+=1)h[n].d(1);h.length=c.length}},d(t){t&&s(e),t&&s(r),t&&s(i),w(h,t)}}}function R(t){let e,n=3==t[2]&&T(t);return{c(){n&&n.c(),e=i()},m(t,r){n&&n.m(t,r),o(t,e,r)},p(t,o){3==t[2]?n?n.p(t,o):(n=T(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&s(e)}}}function S(t){let e,n=t[2],m=R(t);return{c(){m.c(),e=i(),this.c=a},m(t,n){m.m(t,n),o(t,e,n)},p(t,[o]){4&o&&r(n,n=t[2])?(m.d(1),m=R(t),m.c(),m.m(e.parentNode,e)):m.p(t,o)},i:a,o:a,d(t){t&&s(e),m.d(t)}}}function _(t,e,n){let o,r,i=x(0);m(t,i,(t=>n(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=j(l,"parties-component",i);j(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"gold")}y("/assets/parties.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class q extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';.description{margin-bottom:1rem}#add-prompt{margin-bottom:2rem}#party-img{position:absolute;width:11.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}h4{margin-bottom:2rem}.country-name{margin-bottom:1rem}.country-block{margin-bottom:2rem}.location-info{position:relative;margin-bottom:1rem}.location-info p{margin-bottom:0}.img-general-info{display:flex;align-content:center;width:100%;gap:1.5rem;align-items:center;margin-bottom:0.75rem}.img-general-info>:nth-child(2){flex:none}.party-logo{position:relative;right:0;max-height:6.5rem;max-width:100%;border-radius:1rem}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:0.5rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container p{text-align:justify}@media only screen and (max-width: 500px){.img-general-info{display:flex;flex-direction:column;align-content:left;width:100%;gap:1rem;align-items:left;margin-bottom:0rem}.img-general-info>:nth-child(1){width:max-content}.img-general-info>:nth-child(2){width:100%}}</style>",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_,S,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("parties-component",q);export{q as default};
|