site-libsoc/Server/public/js/components/communities-component.js

2 lines
4.0 KiB
JavaScript
Raw Normal View History

import{g as t,S as o,i as n,a as e,b as i,s as a,e as s,n as m,d as r,c,o as l,f as g,t as p,h as u,j as h,k as d,l as f,m as b,p as x,q as j}from"./index-3cab5f92.js";import{w as v}from"./index-eafa799e.js";import{communities as w,addMarkersCommunities as k}from"../../../../../../js/communities.js";import{loadLocaleContent as y}from"../../../../../../js/libraries/serverTools.js";import"../../../../../../js/components/map-component.js";const{customElements:z}=t;function D(t,o,n){const e=t.slice();return e[6]=o[n],e}function E(t){let o,n,e,a,s,m,c,l,v,k,y,z,E,R,T,q,A,C,H,L,M=t[0].heading+"",N=t[0].p1+"",S=t[0].subheading1+"",_=t[0].subheading2+"",B=w,F=[];for(let o=0;o<B.length;o+=1)F[o]=O(D(t,B,o));return{c(){o=g("div"),n=g("div"),e=g("h1"),a=p(M),s=u(),m=g("img"),l=u(),v=g("p"),k=p(N),y=u(),z=g("h3"),E=p(S),R=u(),T=g("map-component"),A=u(),C=g("h4"),H=p(_),L=u();for(let t=0;t<F.length;t+=1)F[t].c();h(m,"id","communities-img"),d(m.src,c="/img/common/communities.svg")||h(m,"src","/img/common/communities.svg"),h(m,"alt","communities"),f(T,"id","map"),f(T,"callback",q=t[5]),h(n,"id","text-container"),h(o,"id","container")},m(t,r){i(t,o,r),b(o,n),b(n,e),b(e,a),b(n,s),b(n,m),b(n,l),b(n,v),b(v,k),b(n,y),b(n,z),b(z,E),b(n,R),b(n,T),b(n,A),b(n,C),b(C,H),b(n,L);for(let t=0;t<F.length;t+=1)F[t].m(n,null)},p(t,o){if(1&o&&M!==(M=t[0].heading+"")&&x(a,M),1&o&&N!==(N=t[0].p1+"")&&x(k,N),1&o&&S!==(S=t[0].subheading1+"")&&x(E,S),1&o&&q!==(q=t[5])&&f(T,"callback",q),1&o&&_!==(_=t[0].subheading2+"")&&x(H,_),1&o){let e;for(B=w,e=0;e<B.length;e+=1){const i=D(t,B,e);F[e]?F[e].p(i,o):(F[e]=O(i),F[e].c(),F[e].m(n,null))}for(;e<F.length;e+=1)F[e].d(1);F.length=B.length}},d(t){t&&r(o),j(F,t)}}}function O(t){let o,n,e,a,s,m,c,l,d,f,j,v,w,k,y,z,D,E,O,R,T,q,A,C,H,L,M=t[0].location+"",N=t[0][t[6].location[0]]+"",S=t[0].status+"",_=t[0][t[6].status]+"",B=t[0].members+"",F=t[6].members+"",G=t[0].contact+"",I=t[0][t[6].contact[1]]+"";return{c(){o=g("div"),n=g("p"),e=g("b"),a=p(M),s=p(": "),m=p(N),c=u(),l=g("p"),d=g("b"),f=p(S),j=p(": "),v=p(_),w=u(),k=g("p"),y=g("b"),z=p(B),D=p(": "),E=p(F),O=u(),R=g("p"),T=g("b"),q=p(G),A=p(": "),C=g("a"),H=p(I),L=u(),h(C,"href",t[6].contact[0]),h(C,"target",";_blank;"),h(C,"rel","noreferrer"),h(o,"class","location-info")},m(t,r){i(t,o,r),b(o,n),b(n,e),b(e,a),b(e,s),b(n,m),b(o,c),b(o,l),b(l,d),b(d,f),b(d,j),b(l,v),b(o,w),b(o,k),b(k,y),b(y,z),b(y,D),b(k,E),b(o,O),b(o,R),b(R,T),b(T,q),b(T,A),b(R,C),b(C,H),b(o,L)},p(t,o){1&o&&M!==(M=t[0].location+"")&&x(a,M),1&o&&N!==(N=t[0][t[6].location[0]]+"")&&x(m,N),1&o&&S!==(S=t[0].status+"")&&x(f,S),1&o&&_!==(_=t[0][t[6].status]+"")&&x(v,_),1&o&&B!==(B=t[0].members+"")&&x(z,B),1&o&&G!==(G=t[0].contact+"")&&x(q,G),1&o&&I!==(I=t[0][t[6].contact[1]]+"")&&x(H,I)},d(t){t&&r(o)}}}function R(t){let o,n=0!=Object.keys(t[0]).length,e=n&&E(t);return{c(){e&&e.c(),o=s(),this.c=m},m(t,n){e&&e.m(t,n),i(t,o,n)},p(t,[i]){1&i&&(n=0!=Object.keys(t[0]).length),n?e?e.p(t,i):(e=E(t),e.c(),e.m(o.parentNode,o)):e&&(e.d(1),e=null)},i:m,o:m,d(t){e&&e.d(t),t&&r(o)}}}function T(t,o,n){let e,i,a=v({});c(t,a,(t=>n(0,e=t)));let s=y(a,"communities-component",i);function m(t,o){let n=t([51.505,-.09],3);k(n,o)}l((()=>{}));return[e,i,a,s,m,t=>m(t,e)]}class q extends o{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#communities-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}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#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>div>p{margin-bottom:1rem}#container p{text-align:justify}</style>",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},T,R,a,{},null),t&&t.target&&i(t.target,this,t.anchor)}}z.define("communities-component"