1import{S as Ee,i as we,a as Le,b as Ue,C as ae,aM as Me,m as Te,e as Y,d as D,c as G,f as $,ax as ye,t as F,h as B,F as x,_ as j,an as fe,n as I,o as b,p as J,a2 as oe,ak as ie,q as N,r as U,u as R,x as W,w as S,G as X,y as T,A as K,z,H as Z,aD as Se,B as ne,j as le,k as se,R as re,O as ze,J as Ne,W as Pe,a8 as Re,ab as Ie,cE as Ae,E as ue}from"./index-BhuTsbqy.js";import{P as Be}from"./Paginator-Bzk9bJV3.js";import"./CMAColors-BcxhgR_3.js";import{a as te}from"./librerias-8n6cAjp9.js";import Ve from"./EventCard-CBFNc8Wb.js";import qe from"./SubscribeForm-DLxsvmUg.js";import"./icons-C5S32XN9.js";import"./GSelect-CVjBVxZu.js";import"./icon-map-DqdxPJl3.js";import"./GLabel-CBcjoLJ4.js";import"./GForm-20ium-Vm.js";import"./EmailInput-CruwHLOx.js";import"./core-BcPUBYCp.js";import"./RGPD-Dg9EFmVn.js";function Oe(t){Ue(t,"svelte-bavz2m",".days.svelte-bavz2m{--icon-size:32px;--xs-columns:repeat(7, 1fr);place-items:center}.event-mark.svelte-bavz2m{background-color:var(--secondary);border-radius:50%;width:7px;height:7px;margin-bottom:-15px}button[disabled].svelte-bavz2m{color:var(--s-6)}.outlined.svelte-bavz2m{outline-color:var(--secondary)}")}function he(t,e,n){const l=t.slice();l[15]=e[n];const o=l[0]&&l[0].indexOf(l[15])!==-1;l[16]=o;const s=l[15]===l[6]&&l[5]===l[1];return l[17]=s,l}function me(t,e,n){const l=t.slice();return l[20]=e[n],l}function _e(t){let e,n=t[20]+"",l;return{c(){e=T("small"),l=Z(n)},l(o){e=U(o,"SMALL",{});var s=R(e);l=X(s,n),s.forEach(D)},m(o,s){I(o,e,s),b(e,l)},p:ne,d(o){o&&D(e)}}}function pe(t){let e;return{c(){e=T("span"),this.h()},l(n){e=U(n,"SPAN",{class:!0}),R(e).forEach(D),this.h()},h(){N(e,"class","event-mark svelte-bavz2m")},m(n,l){I(n,e,l)},d(n){n&&D(e)}}}function ge(t){let e,n=t[15]+"",l,o,s,r,f,u,h=t[16]&&pe();return{c(){e=T("button"),l=Z(n),o=z(),h&&h.c(),s=z(),this.h()},l(a){e=U(a,"BUTTON",{class:!0,"aria-label":!0});var _=R(e);l=X(_,n),o=S(_),h&&h.l(_),s=S(_),_.forEach(D),this.h()},h(){e.disabled=r=!t[16],N(e,"class","btn ghost icon f-size-00 flex-column svelte-bavz2m"),N(e,"aria-label","DÃa de la semana"),j(e,"outlined",t[17]),j(e,"secondary-text",t[17])},m(a,_){I(a,e,_),b(e,l),b(e,o),h&&h.m(e,null),b(e,s),f||(u=oe(e,"click",function(){ie(t[8](t[15]))&&t[8](t[15]).apply(this,arguments)}),f=!0)},p(a,_){t=a,_&16&&n!==(n=t[15]+"")&&x(l,n),t[16]?h||(h=pe(),h.c(),h.m(e,s)):h&&(h.d(1),h=null),_&17&&r!==(r=!t[16])&&(e.disabled=r),_&114&&j(e,"outlined",t[17]),_&114&&j(e,"secondary-text",t[17])},d(a){a&&D(e),h&&h.d(),f=!1,u()}}}function Fe(t){let e,n,l,o,s,r,f,u,h,a,_,c,C,i,m,k,v,w;o=new ae({props:{icon:Me,ariaLabel:"Anterior"}}),a=new ae({props:{icon:Te,ariaLabel:"Posterior"}});let H=Y(t[7]),M=[];for(let g=0;g<H.length;g+=1)M[g]=_e(me(t,H,g));let q=Y(t[4]),y=[];for(let g=0;g<q.length;g+=1)y[g]=ge(he(t,q,g));return{c(){e=T("div"),n=T("div"),l=T("button"),K(o.$$.fragment),s=z(),r=T("strong"),f=Z(t[2]),u=z(),h=T("button"),K(a.$$.fragment),_=z(),c=T("div");for(let g=0;g<M.length;g+=1)M[g].c();C=z(),i=T("span"),m=z();for(let g=0;g<y.length;g+=1)y[g].c();this.h()},l(g){e=U(g,"DIV",{class:!0});var V=R(e);n=U(V,"DIV",{class:!0});var p=R(n);l=U(p,"BUTTON",{class:!0});var E=R(l);
1W(o.$$.fragment,E),E.forEach(D),s=S(p),r=U(p,"STRONG",{});var ee=R(r);f=X(ee,t[2]),ee.forEach(D),u=S(p),h=U(p,"BUTTON",{class:!0});var d=R(h);W(a.$$.fragment,d),d.forEach(D),p.forEach(D),_=S(V),c=U(V,"DIV",{class:!0});var L=R(c);for(let P=0;P<M.length;P+=1)M[P].l(L);C=S(L),i=U(L,"SPAN",{}),R(i).forEach(D),m=S(L);for(let P=0;P<y.length;P+=1)y[P].l(L);L.forEach(D),V.forEach(D),this.h()},h(){N(l,"class","btn icon ghost"),N(h,"class","btn icon ghost"),N(n,"class","d-flex align-center justify-between mb-2"),j(i,"hidden",!t[3]),fe(i,"grid-column",t[3]),N(c,"class","days d-grid svelte-bavz2m"),N(e,"class","calendar d-grid justify-center")},m(g,V){I(g,e,V),b(e,n),b(n,l),J(o,l,null),b(n,s),b(n,r),b(r,f),b(n,u),b(n,h),J(a,h,null),b(e,_),b(e,c);for(let p=0;p<M.length;p+=1)M[p]&&M[p].m(c,null);b(c,C),b(c,i),b(c,m);for(let p=0;p<y.length;p+=1)y[p]&&y[p].m(c,null);k=!0,v||(w=[oe(l,"click",function(){ie(t[9](t[1]-1))&&t[9](t[1]-1).apply(this,arguments)}),oe(h,"click",function(){ie(t[9](t[1]+1))&&t[9](t[1]+1).apply(this,arguments)})],v=!0)},p(g,[V]){if(t=g,(!k||V&4)&&x(f,t[2]),V&128){H=Y(t[7]);let p;for(p=0;p<H.length;p+=1){const E=me(t,H,p);M[p]?M[p].p(E,V):(M[p]=_e(E),M[p].c(),M[p].m(c,C))}for(;p<M.length;p+=1)M[p].d(1);M.length=H.length}if((!k||V&8)&&j(i,"hidden",!t[3]),V&8&&fe(i,"grid-column",t[3]),V&371){q=Y(t[4]);let p;for(p=0;p<q.length;p+=1){const E=he(t,q,p);y[p]?y[p].p(E,V):(y[p]=ge(E),y[p].c(),y[p].m(c,null))}for(;p<y.length;p+=1)y[p].d(1);y.length=q.length}},i(g){k||(B(o.$$.fragment,g),B(a.$$.fragment,g),k=!0)},o(g){F(o.$$.fragment,g),F(a.$$.fragment,g),k=!1},d(g){g&&D(e),G(o),G(a),$(M,g),$(y,g),v=!1,ye(w)}}}function He(t,e){const n=new Date(Date.UTC(e,t,1)),l=[];for(;n.getUTCMonth()===t;){const o=n.getUTCDate();n.setUTCDate(o+1),l.push(o)}return l}function Ye(t,e,n){let l,o,s,r,f,u,h,a,{events:_=[]}=e,{selectedDate:c=new Date}=e,{currentDate:C=new Date}=e;const i=Se(),m=["L","M","M","J","V","S","D"];function k(w){return()=>{C.setUTCDate(w),n(11,C),n(10,c=C),i("updateDate",c)}}function v(w){return()=>{C.setUTCMonth(w),n(11,C),i("updateMonth",C)}}return t.$$set=w=>{"events"in w&&n(0,_=w.events),"selectedDate"in w&&n(10,c=w.selectedDate),"currentDate"in w&&n(11,C=w.currentDate)},t.$$.update=()=>{t.$$.dirty&1024&&n(6,l=c.getUTCDate()),t.$$.dirty&1024&&n(5,o=c.getUTCMonth()),t.$$.dirty&2048&&n(1,s=C.getUTCMonth()),t.$$.dirty&2048&&n(13,r=C.getUTCFullYear()),t.$$.dirty&8194&&n(4,f=He(s,r)),t.$$.dirty&8194&&n(12,u=new Date(Date.UTC(r,s,1)).getUTCDay()),t.$$.dirty&4096&&n(3,h=u===0?6:u-1),t.$$.dirty&2048&&n(2,a=C.toLocaleDateString("es-ES",{month:"long",year:"numeric"}))},[_,s,a,h,f,o,l,m,k,v,c,C,u,r]}class je extends Ee{constructor(e){super(),we(this,e,Ye,Fe,Le,{events:0,selectedDate:10,currentDate:11},Oe)}}function Ge(t){Ue(t,"svelte-1p41qnn",".events.svelte-1p41qnn{--xs-columns:1fr;--md-columns:1fr 250px;gap:7rem}")}function de(t,e,n){const l=t.slice();return l[12]=e[n],l}function be(t,e,n){const l=t.slice();return l[15]=e[n],l}function ve(t,e,n){const l=t.slice();return l[18]=e[n],l}function Je(t){let e,n="No se encontraron eventos",l,o;return{c(){e=T("p"),e.textContent=n,l=z(),o=T("hr"),this.h()},l(s){e=U(s,"P",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-ygqwpk"&&(e.textContent=n),l=S(s),o=U(s,"HR",{class:!0}),this.h()},h(){N(e,"class","f-size-4 f-serif"),N(o,"class","mb-4")},m(s,r){I(s,e,r),I(s,l,r),I(s,o,r)},p:ne,i:ne,o:ne,d(s){s&&(D(e),D(l),D(o))}}}function We(t){let e,n="Eventos destacados del mes",l,o,s,r,f,u,h=Y(t[5]),a=[];for(let i=0;i<h.length;i+=1)a[i]=De(ve(t,h,i));const _=i=>F(a[i],1,1,()=>{a[i]=null}),c=[t[0]?.pager,{loading:t[2]}];let C={};for(let i=0;i<c.length;i+=1)C=Re(C,c[i]);return f=new Be({props:C}),f.$on("change",t[8]),{c(){e=T("p"),e.textContent=n,l=z(),o=T("hr"),s=z();for(let i=0;i<a.length;i+=1)a[i].c();r=z(),K(f.$$.fragment),this.h()},l(i){e=U(i,"P",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-fqarel"&&(e.textContent=n),l=S(i),o=U(i,"HR",{class:!0}),s=S(i);for(let m=0;m<a.length;m+=1)a[m].l(i);r=S(i),W(f.$$.fragment,i),this.h()},h(){N(e,"class","f-size-4 f-serif"),N(o,"class","mb-4")},m(i,m){I(i,e,m),I(i,l,m),I(i,o,m),I(i,s,m);for(let k=0;k<a.length;k+=1)a[k]&&a[k].m(i,m);I(i,r,m),J(f,i,m),u=!0},p(i,m){if(m&32){h=Y(i[5]);let v;for(v=0;v<h.length;v+=1){const w=ve(i,h,v);a[v]?(a[v].p(w,m),B(a[v],1)):(a[v]=De(w),a[v].c(),B(a[v],1),a[v].m(r.parentNode,r))}for(le(),v=h.length;v<a.length;v+=1)_(v);se()}const k=m&5?Ie(c,[m&1&&Ae(i[0]?.pager),m&4&&{loading:i[2]}]):{};f.$set(k)},i(i){if(!u){for(let m=0;m<h.length;m+=1)B(a[m]);B(f.$$.fragment,i),u=!0}}
1,o(i){a=a.filter(Boolean);for(let m=0;m<a.length;m+=1)F(a[m]);F(f.$$.fragment,i),u=!1},d(i){i&&(D(e),D(l),D(o),D(s),D(r)),$(a,i),G(f,i)}}}function De(t){let e,n,l,o;return e=new Ve({props:{title:t[18].title.name,image:t[18].bookstoreImage,eventUrl:t[18].title.src,libUrl:t[18].bookstoreLocation.src,libName:t[18].bookstoreLocation.name,provincia:t[18].provincie,description:t[18].description,suscribible:t[18].esSuscribible,fecha:t[18].fecha,schedule:t[18].schedule,labelUrlEvento:t[18].labelUrlEvento,urlEvento:t[18].urlEvento}}),{c(){K(e.$$.fragment),n=z(),l=T("hr"),this.h()},l(s){W(e.$$.fragment,s),n=S(s),l=U(s,"HR",{class:!0}),this.h()},h(){N(l,"class","my-4")},m(s,r){J(e,s,r),I(s,n,r),I(s,l,r),o=!0},p(s,r){const f={};r&32&&(f.title=s[18].title.name),r&32&&(f.image=s[18].bookstoreImage),r&32&&(f.eventUrl=s[18].title.src),r&32&&(f.libUrl=s[18].bookstoreLocation.src),r&32&&(f.libName=s[18].bookstoreLocation.name),r&32&&(f.provincia=s[18].provincie),r&32&&(f.description=s[18].description),r&32&&(f.suscribible=s[18].esSuscribible),r&32&&(f.fecha=s[18].fecha),r&32&&(f.schedule=s[18].schedule),r&32&&(f.labelUrlEvento=s[18].labelUrlEvento),r&32&&(f.urlEvento=s[18].urlEvento),e.$set(f)},i(s){o||(B(e.$$.fragment,s),o=!0)},o(s){F(e.$$.fragment,s),o=!1},d(s){s&&(D(n),D(l)),G(e,s)}}}function ke(t){let e,n,l,o,s,r,f=t[15].poblacion+"",u,h,a,_,c=t[15].ubicacion+"",C,i,m,k;return l=new ae({props:{icon:Te}}),{c(){e=T("div"),n=T("span"),K(l.$$.fragment),o=z(),s=T("small"),r=T("strong"),u=Z(f),h=T("br"),a=z(),_=T("a"),C=Z(c),m=z(),this.h()},l(v){e=U(v,"DIV",{class:!0});var w=R(e);n=U(w,"SPAN",{class:!0});var H=R(n);W(l.$$.fragment,H),H.forEach(D),o=S(w),s=U(w,"SMALL",{});var M=R(s);r=U(M,"STRONG",{});var q=R(r);u=X(q,f),q.forEach(D),h=U(M,"BR",{}),a=S(M),_=U(M,"A",{href:!0});var y=R(_);C=X(y,c),y.forEach(D),M.forEach(D),m=S(w),w.forEach(D),this.h()},h(){N(n,"class","secondary-text"),N(_,"href",i=t[15].url),N(e,"class","d-flex ml-2")},m(v,w){I(v,e,w),b(e,n),J(l,n,null),b(e,o),b(e,s),b(s,r),b(r,u),b(s,h),b(s,a),b(s,_),b(_,C),b(e,m),k=!0},p(v,w){(!k||w&2)&&f!==(f=v[15].poblacion+"")&&x(u,f),(!k||w&2)&&c!==(c=v[15].ubicacion+"")&&x(C,c),(!k||w&2&&i!==(i=v[15].url))&&N(_,"href",i)},i(v){k||(B(l.$$.fragment,v),k=!0)},o(v){F(l.$$.fragment,v),k=!1},d(v){v&&D(e),G(l)}}}function Ce(t){let e,n=t[12].nombre+"",l,o,s,r,f=Y(t[12].librerias),u=[];for(let a=0;a<f.length;a+=1)u[a]=ke(be(t,f,a));const h=a=>F(u[a],1,1,()=>{u[a]=null});return{c(){e=T("p"),l=Z(n),o=z();for(let a=0;a<u.length;a+=1)u[a].c();s=ue(),this.h()},l(a){e=U(a,"P",{class:!0});var _=R(e);l=X(_,n),_.forEach(D),o=S(a);for(let c=0;c<u.length;c+=1)u[c].l(a);s=ue(),this.h()},h(){N(e,"class","mt-4")},m(a,_){I(a,e,_),b(e,l),I(a,o,_);for(let c=0;c<u.length;c+=1)u[c]&&u[c].m(a,_);I(a,s,_),r=!0},p(a,_){if((!r||_&2)&&n!==(n=a[12].nombre+"")&&x(l,n),_&2){f=Y(a[12].librerias);let c;for(c=0;c<f.length;c+=1){const C=be(a,f,c);u[c]?(u[c].p(C,_),B(u[c],1)):(u[c]=ke(C),u[c].c(),B(u[c],1),u[c].m(s.parentNode,s))}for(le(),c=f.length;c<u.length;c+=1)h(c);se()}},i(a){if(!r){for(let _=0;_<f.length;_+=1)B(u[_]);r=!0}},o(a){u=u.filter(Boolean);for(let _=0;_<u.length;_+=1)F(u[_]);r=!1},d(a){a&&(D(e),D(o),D(s)),$(u,a)}}}function Ke(t){let e,n,l,o,s,r,f,u="Calendario",h,a,_,c,C,i,m,k,v="Todas nuestras librerÃas",w,H,M,q;const y=[We,Je],g=[];function V(d,L){return d[5].length?0:1}l=V(t),o=g[l]=y[l](t),c=new je({props:{events:t[3],currentDate:t[4]}}),c.$on("updateDate",t[6]),c.$on("updateMonth",t[7]),i=new qe({props:{provincias:t[1]}});let p=Y(t[1]),E=[];for(let d=0;d<p.length;d+=1)E[d]=Ce(de(t,p,d));const ee=d=>F(E[d],1,1,()=>{E[d]=null});return{c(){e=T("div"),n=T("div"),o.c(),s=z(),r=T("div"),f=T("p"),f.textContent=u,h=z(),a=T("hr"),_=z(),K(c.$$.fragment),C=z(),K(i.$$.fragment),m=z(),k=T("p"),k.textContent=v,w=z(),H=T("hr"),M=z();for(let d=0;d<E.length;d+=1)E[d].c();this.h()},l(d){e=U(d,"DIV",{class:!0});var L=R(e);n=U(L,"DIV",{});var P=R(n);o.l(P),P.forEach(D),s=S(L),r=U(L,"DIV",{});var A=R(r);f=U(A,"P",{class:!0,"data-svelte-h":!0}),re(f)!=="svelte-1ccfu28"&&(f.textContent=u),h=S(A),a=U(A,"HR",{class:!0}),_=S(A),W(c.$$.fragment,A),C=S(A),W(i.$$.fragment,A),m=S(A),k=U(A,"P",{class:!0,"data-svelte-h":!0}),re(k)!=="svelte-1ec6o8k"&&(k.textContent=v),w=S(A),H=U(A,"HR",{}),M=S(A);for(let Q=0;Q<E.length;
1Q+=1)E[Q].l(A);A.forEach(D),L.forEach(D),this.h()},h(){N(f,"class","f-size-4 f-serif"),N(a,"class","mb-4"),N(k,"class","f-size-3 mt-4 f-serif"),N(e,"class","events d-grid container svelte-1p41qnn"),j(e,"loading-inline",t[2])},m(d,L){I(d,e,L),b(e,n),g[l].m(n,null),b(e,s),b(e,r),b(r,f),b(r,h),b(r,a),b(r,_),J(c,r,null),b(r,C),J(i,r,null),b(r,m),b(r,k),b(r,w),b(r,H),b(r,M);for(let P=0;P<E.length;P+=1)E[P]&&E[P].m(r,null);q=!0},p(d,[L]){let P=l;l=V(d),l===P?g[l].p(d,L):(le(),F(g[P],1,1,()=>{g[P]=null}),se(),o=g[l],o?o.p(d,L):(o=g[l]=y[l](d),o.c()),B(o,1),o.m(n,null));const A={};L&8&&(A.events=d[3]),L&16&&(A.currentDate=d[4]),c.$set(A);const Q={};if(L&2&&(Q.provincias=d[1]),i.$set(Q),L&2){p=Y(d[1]);let O;for(O=0;O<p.length;O+=1){const ce=de(d,p,O);E[O]?(E[O].p(ce,L),B(E[O],1)):(E[O]=Ce(ce),E[O].c(),B(E[O],1),E[O].m(r,null))}for(le(),O=p.length;O<E.length;O+=1)ee(O);se()}(!q||L&4)&&j(e,"loading-inline",d[2])},i(d){if(!q){B(o),B(c.$$.fragment,d),B(i.$$.fragment,d);for(let L=0;L<p.length;L+=1)B(E[L]);q=!0}},o(d){F(o),F(c.$$.fragment,d),F(i.$$.fragment,d),E=E.filter(Boolean);for(let L=0;L<E.length;L+=1)F(E[L]);q=!1},d(d){d&&D(e),g[l].d(),G(c),G(i),$(E,d)}}}function Qe(t){const[e,n,l]=t.split("/").map(Number),o=new Date;return l?(o.setFullYear(l),o.setMonth(n-1),o.setDate(e)):(o.setFullYear(n),o.setMonth(e-1)),o}function Xe(t,e,n){let l,o,s;ze(t,Ne,m=>n(10,s=m));let{eventosLibrerias:r}=e,{provincias:f=[]}=e,u=!1,h=new Date().toLocaleDateString("es"),a=r?r.eventDays:[];Pe(()=>{const k=_(h);return window.addEventListener("afterRouteChange",k),()=>{window.removeEventListener("afterRouteChange",k)}});function _(m){return async()=>{m!==h&&(n(2,u=!0),n(0,r=await te(h,1,s.params.idlibreria,s.params.idprovincia)),n(3,a=r.eventDays),m=h,n(2,u=!1))}}async function c(m){n(2,u=!0),n(9,h=m.detail.toLocaleDateString("es")),n(0,r=await te(h,1,s.params.idlibreria,s.params.idprovincia)),n(3,a=r.eventDays),n(2,u=!1)}async function C(m){n(2,u=!0),n(3,a=[]);const k=m.detail;n(9,h=`${k.getMonth()+1}/${k.getFullYear()}`),n(0,r=await te(h,1,s.params.idlibreria,s.params.idprovincia)),n(3,a=r.eventDays),n(2,u=!1)}async function i(m){n(2,u=!0),n(0,r=await te(h,m.detail,s.params.idlibreria,s.params.idprovincia)),n(2,u=!1)}return t.$$set=m=>{"eventosLibrerias"in m&&n(0,r=m.eventosLibrerias),"provincias"in m&&n(1,f=m.provincias)},t.$$.update=()=>{t.$$.dirty&1&&n(5,l=r&&r.events?r.events:[]),t.$$.dirty&512&&n(4,o=Qe(h))},[r,f,u,a,o,l,c,C,i,h]}class ut extends Ee{constructor(e){super(),we(this,e,Xe,Ke,Le,{eventosLibrerias:0,provincias:1},Ge)}}export{ut as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.