site-libsoc/Server/public/js/components/trade-unions-component.js

2 lines
6.6 KiB
JavaScript
Raw Normal View History

2023-08-17 16:01:26 +07:00
import{S as t,i as n,a as o,b as e,s as r,e as a,n as c,d as i,c as m,o as s,h as l,t as p,j as u,k as d,w as f,x as g,l as h,y as b,p as j}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as y,getData as v}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addTradeUnionPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,n,o){const e=t.slice();return e[12]=n[o][0],e[3]=n[o][1],e}function O(t,n,o){const e=t.slice();return e[15]=n[o],e}function T(t){let n,o,r,a,c,m,s,x,y,v,w,k,z,O,T,U,C,D,E,S,_=t[1].tradeUnions+"",A=t[1].p1+"",F=t[1].subheading1+"",G=t[1]["map-prompt"]+"",H=Object.entries(t[0]),J=[];for(let n=0;n<H.length;n+=1)J[n]=R(N(t,H,n));return{c(){n=l("div"),o=l("div"),r=l("h1"),a=p(_),c=u(),m=l("img"),x=u(),y=l("p"),v=p(A),w=u(),k=l("h3"),z=p(F),O=u(),T=l("map-component"),C=u(),D=l("p"),E=p(G),S=u();for(let t=0;t<J.length;t+=1)J[t].c();d(m,"id","trade-unions-img"),f(m.src,s="/img/common/trade-unions.svg")||d(m,"src","/img/common/trade-unions.svg"),d(m,"alt","trade unions"),d(y,"class","description"),g(T,"id","map"),g(T,"callback",U=t[10]),d(D,"id","add-prompt"),d(o,"id","text-container"),d(n,"id","container")},m(t,i){e(t,n,i),h(n,o),h(o,r),h(r,a),h(o,c),h(o,m),h(o,x),h(o,y),h(y,v),h(o,w),h(o,k),h(k,z),h(o,O),h(o,T),h(o,C),h(o,D),h(D,E),h(o,S);for(let t=0;t<J.length;t+=1)J[t].m(o,null)},p(t,n){if(2&n&&_!==(_=t[1].tradeUnions+"")&&b(a,_),2&n&&A!==(A=t[1].p1+"")&&b(v,A),2&n&&F!==(F=t[1].subheading1+"")&&b(z,F),2&n&&U!==(U=t[10])&&g(T,"callback",U),2&n&&G!==(G=t[1]["map-prompt"]+"")&&b(E,G),771&n){let e;for(H=Object.entries(t[0]),e=0;e<H.length;e+=1){const r=N(t,H,e);J[e]?J[e].p(r,n):(J[e]=R(r),J[e].c(),J[e].m(o,null))}for(;e<J.length;e+=1)J[e].d(1);J.length=H.length}},d(t){t&&i(n),j(J,t)}}}function U(t){let n,o,r,a,c,m=t[1].contact+"",s=t[15].contact+"";return{c(){n=l("p"),o=l("b"),r=p(m),a=p(": "),c=p(s)},m(t,i){e(t,n,i),h(n,o),h(o,r),h(o,a),h(n,c)},p(t,n){2&n&&m!==(m=t[1].contact+"")&&b(r,m),1&n&&s!==(s=t[15].contact+"")&&b(c,s)},d(t){t&&i(n)}}}function C(t){let n,o,r,a,c,m,s,u=t[1].contact+"",f=t[15].contact+"";return{c(){n=l("p"),o=l("b"),r=p(u),a=p(": "),c=l("a"),m=p(f),d(c,"href",s=t[15].contact),d(c,"target",";_blank;"),d(c,"rel","noreferrer")},m(t,i){e(t,n,i),h(n,o),h(o,r),h(o,a),h(n,c),h(c,m)},p(t,n){2&n&&u!==(u=t[1].contact+"")&&b(r,u),1&n&&f!==(f=t[15].contact+"")&&b(m,f),1&n&&s!==(s=t[15].contact)&&d(c,"href",s)},d(t){t&&i(n)}}}function D(t){let n,o,r,a,c,m,s,u=t[1].contact+"",f=t[15].contact+"";return{c(){n=l("p"),o=l("b"),r=p(u),a=p(": "),c=l("a"),m=p(f),d(c,"href",s="mailto:"+t[15].contact),d(c,"target",";_blank;"),d(c,"rel","noreferrer")},m(t,i){e(t,n,i),h(n,o),h(o,r),h(o,a),h(n,c),h(c,m)},p(t,n){2&n&&u!==(u=t[1].contact+"")&&b(r,u),1&n&&f!==(f=t[15].contact+"")&&b(m,f),1&n&&s!==(s="mailto:"+t[15].contact)&&d(c,"href",s)},d(t){t&&i(n)}}}function E(t){let n,o,r,a,c,m,s,f,g,j,x,y,v,w,k,z,N,O,T,E,R,S=t[1].name+"",_=t[15].name+"",A=t[1].location+"",F=t[9](t[15])+"",G=t[1].members+"",H=t[15].members+"";function J(t,n){return 1&n&&(E=null),1&n&&(R=null),null==E&&(E=!(!t[15].contact.includes("@")||1!=t[15].contact.trim().split(" ").length)),E?D:(null==R&&(R=!!t[15].contact.includes("http")),R?C:U)}let K=J(t,-1),L=K(t);return{c(){n=l("div"),o=l("p"),r=l("b"),a=p(S),c=p(": "),m=p(_),s=u(),f=l("p"),g=l("b"),j=p(A),x=p(": "),y=p(F),v=u(),w=l("p"),k=l("b"),z=p(G),N=p(": "),O=p(H),T=u(),L.c(),d(n,"class","location-info")},m(t,i){e(t,n,i),h(n,o),h(o,r),h(r,a),h(r,c),h(o,m),h(n,s),h(n,f),h(f,g),h(g,j),h(g,x),h(f,y),h(n,v),h(n,w),h(w,k),h(k,z),h(k,N),h(w,O),h(n,T),L.m(n,null)},p(t,o){2&o&&S!==(S=t[1].name+"")&&b(a,S),1&o&&_!==(_=t[15].name+"")&&b(m,_),2&o&&A!==(A=t[1].location+"")&&b(j,A),1&o&&F!==(F=t[9](t[15])+"")&&b(y,F),2&o&&G!==(G=t[1].members+"")&&b(z,G),1&o&&H!==(H=t[15].members+"")&&b(O,H),K===(K=J(t,o))&&L?L.p(t,o):(L.d(1),L=K(t),L&&(L.c(),L.m(n,null)))},d(t){