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

2 lines
7.6 KiB
JavaScript
Raw Normal View History

2023-10-15 23:04:33 +07:00
import{S as t,i as e,a as o,b as n,s as r,e as i,n as s,d as a,c,o as m,h as l,t as p,j as g,k as d,w as u,x as f,l as h,y as b,p as w}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as v,getData as j}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as k,translate as y}from"../../../../../../../../../js/libraries/mapTools.js";import{addCoopPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,o){const n=t.slice();return n[12]=e[o][0],n[3]=e[o][1],n}function O(t,e,o){const n=t.slice();return n[15]=e[o],n}function T(t){let e,o,r,i,s,c,m,x,v,j,k,y,z,O,T,C,E,R,S,_,A=t[1].cooperatives+"",F=t[1].p1+"",G=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]=D(N(t,J,e));return{c(){e=l("div"),o=l("div"),r=l("h1"),i=p(A),s=g(),c=l("img"),x=g(),v=l("p"),j=p(F),k=g(),y=l("h3"),z=p(G),O=g(),T=l("map-component"),E=g(),R=l("p"),S=p(H),_=g();for(let t=0;t<K.length;t+=1)K[t].c();d(c,"id","coops-img"),u(c.src,m="/img/common/coops.svg")||d(c,"src","/img/common/coops.svg"),d(c,"alt","coops"),d(v,"class","description"),f(T,"id","map"),f(T,"callback",C=t[10]),d(R,"id","add-prompt"),d(o,"id","text-container"),d(e,"id","container")},m(t,a){n(t,e,a),h(e,o),h(o,r),h(r,i),h(o,s),h(o,c),h(o,x),h(o,v),h(v,j),h(o,k),h(o,y),h(y,z),h(o,O),h(o,T),h(o,E),h(o,R),h(R,S),h(o,_);for(let t=0;t<K.length;t+=1)K[t].m(o,null)},p(t,e){if(2&e&&A!==(A=t[1].cooperatives+"")&&b(i,A),2&e&&F!==(F=t[1].p1+"")&&b(j,F),2&e&&G!==(G=t[1].subheading1+"")&&b(z,G),2&e&&C!==(C=t[10])&&f(T,"callback",C),2&e&&H!==(H=t[1]["map-prompt"]+"")&&b(S,H),771&e){let n;for(J=Object.entries(t[0]),n=0;n<J.length;n+=1){const r=N(t,J,n);K[n]?K[n].p(r,e):(K[n]=D(r),K[n].c(),K[n].m(o,null))}for(;n<K.length;n+=1)K[n].d(1);K.length=J.length}},d(t){t&&a(e),w(K,t)}}}function C(t){let e,o,r,i,s,c,m,u,f,w,x,v,j,k,y,z,N,O,T,C,D,E,R,S,_,A,F,G,H,J,K,L,M,Q,U,q,B,I,P,V,W,X,Y,Z,$,tt,et,ot,nt,rt,it,st,at,ct,mt,lt,pt,gt,dt,ut,ft,ht,bt,wt=t[1].name+"",xt=t[15].name+"",vt=t[1].location+"",jt=t[9](t[15])+"",kt=t[1].market+"",yt=t[15].market+"",zt=t[1].workers+"",Nt=t[15].workers+"",Ot=t[1].status+"",Tt=t[15].status+"",Ct=t[1].website+"",Dt=t[15].website+"",Et=t[1].contact+"",Rt=t[15].contact+"",St=t[1].description+"",_t=t[15].description+"";return{c(){e=l("div"),o=l("div"),r=l("div"),i=l("p"),s=l("b"),c=p(wt),m=p(": "),u=p(xt),f=g(),w=l("p"),x=l("b"),v=p(vt),j=p(": "),k=p(jt),y=g(),z=l("p"),N=l("b"),O=p(kt),T=p(": "),C=p(yt),D=g(),E=l("p"),R=l("b"),S=p(zt),_=p(": "),A=p(Nt),F=g(),G=l("p"),H=l("b"),J=p(Ot),K=p(": "),L=p(Tt),M=g(),Q=l("p"),U=l("b"),q=p(Ct),B=p(": "),I=l("a"),P=p(Dt),W=g(),X=l("p"),Y=l("b"),Z=p(Et),$=p(": "),tt=l("a"),et=p(Rt),nt=g(),rt=l("picture"),it=l("source"),at=g(),ct=l("source"),lt=g(),pt=l("img"),gt=g(),dt=l("p"),ut=l("b"),ft=p(St),ht=p(": "),bt=p(_t),d(I,"href",V=t[15].website),d(I,"target","_blank"),d(I,"rel","noreferrer"),d(tt,"href",ot=t[15].contact),d(tt,"target",";_blank;"),d(tt,"rel","noreferrer"),d(it,"srcset",st="/img/coops/"+t[15].logo+".webp"),d(ct,"srcset",mt="/img/coops/"+t[15].logo+".png"),d(pt,"class","coop-logo"),d(pt,"alt","logo"),d(o,"class","img-general-info"),d(e,"class","location-info")},m(t,a){n(t,e,a),h(e,o),h(o,r),h(r,i),h(i,s),h(s,c),h(s,m),h(i,u),h(r,f),h(r,w),h(w,x),h(x,v),h(x,j),h(w,k),h(r,y),h(r,z),h(z,N),h(N,O),h(N,T),h(z,C),h(r,D),h(r,E),h(E,R),h(R,S),h(R,_),h(E,A),h(r,F),h(r,G),h(G,H),h(H,J),h(H,K),h(G,L),h(r,M),h(r,Q),h(Q,U),h(U,q),h(U,B),h(Q,I),h(I,P),h(r,W),h(r,X),h(X,Y),h(Y,Z),h(Y,$),h(X,tt),h(tt,et),h(o,nt),h(o,rt),h(rt,it),h(rt,at),h(rt,ct),h(rt,lt),h(rt,pt),h(e,gt),h(e,dt),h(dt,ut),h(ut,ft),h(ut,ht),h(dt,bt)},p(t,e){2&e&&wt!==(wt=t[1].name+"")&&b(c,wt),1&e&&xt!==(xt=t[15].name+"")&&b(u,xt),2&e&&vt!==(vt=t[1].location+"")&&b(v,vt),1&e&&jt!==(jt=t[9](t[15])+"")&&b(k,jt),2&e&&kt!==(kt=t[1].market+"")&&b(O,kt),1&e&&yt!==(yt=t[15].market+"")&&b(C,yt),2&e&&zt!==(zt=t[1].workers+"")&&b(S,zt),1&e&&Nt!==(Nt=t[15].workers+"")&&b(A,Nt),2&e&&Ot!=