1import{S as e,i as t,s as a,e as s,t as l,c as r,a as c,g as n,d as i,b as o,f,F as h,Q as d,G as u,h as v,L as p,j as g,m,o as y,v as q,r as w,w as E,R as k,k as j,l as $,K as _,n as b,u as A,T as L,z as S,U as I,B as P}from"../../chunks/vendor-01c7f58c.js";import{P as M,g as N,a as O}from"../../chunks/project-info-8c1ea70f.js";import{I as x}from"../../chunks/index-ad10b068.js";/* empty css */const{document:D}=I;function V(e,t,a){const s=e.slice();return s[26]=t[a],s}function U(e,t,a){const s=e.slice();return s[29]=t[a],s}function B(e,t,a){const s=e.slice();return s[32]=t[a][0],s[33]=t[a][1],s}function C(e,t,a){const s=e.slice();return s[36]=t[a][0],s[37]=t[a][1],s}function R(e){let t,a,v,p,g,m;return{c(){t=s("span"),a=l(" â "),v=s("span"),p=l("Clear all filters"),this.h()},l(e){t=r(e,"SPAN",{class:!0});var s=c(t);a=n(s," â "),v=r(s,"SPAN",{class:!0});var l=c(v);p=n(l,"Clear all filters"),l.forEach(i),s.forEach(i),this.h()},h(){o(v,"class","svelte-12iqedy"),o(t,"class","clear-filters svelte-12iqedy")},m(s,l){f(s,t,l),h(t,a),h(t,v),h(v,p),g||(m=d(v,"click",e[10]),g=!0)},p:u,d(e){e&&i(t),g=!1,m()}}}function T(e){let t,a;return{c(){t=s("small"),a=l("All"),this.h()},l(e){t=r(e,"SMALL",{class:!0});var s=c(t);a=n(s,"All"),s.forEach(i),this.h()},h(){o(t,"class","svelte-12iqedy")},m(e,s){f(e,t,s),h(t,a)},p:u,d(e){e&&i(t)}}}function G(e){let t,a,u,p,g,m,y,q,w,E,k=e[6][e[32]].join(", ")+"";return{c(){t=s("small"),a=s("span"),u=l(k),p=s("span"),g=l(" â "),m=s("span"),y=l("Clear"),this.h()},l(e){t=r(e,"SMALL",{class:!0});var s=c(t);a=r(s,"SPAN",{class:!0});var l=c(a);u=n(l,k),l.forEach(i),p=r(s,"SPAN",{class:!0});var o=c(p);g=n(o," â "),o.forEach(i),m=r(s,"SPAN",{class:!0,"data-feature":!0});var f=c(m);
1y=n(f,"Clear"),f.forEach(i),s.forEach(i),this.h()},h(){o(a,"class","elements svelte-12iqedy"),o(p,"class","svelte-12iqedy"),o(m,"class","clear svelte-12iqedy"),o(m,"data-feature",q=e[32]),o(t,"class","svelte-12iqedy")},m(s,l){f(s,t,l),h(t,a),h(a,u),h(t,p),h(p,g),h(t,m),h(m,y),w||(E=d(m,"click",e[11]),w=!0)},p(e,t){96&t[0]&&k!==(k=e[6][e[32]].join(", ")+"")&&v(u,k),32&t[0]&&q!==(q=e[32])&&o(m,"data-feature",q)},d(e){e&&i(t),w=!1,E()}}}function z(e){let t,a=Object.entries(e[33]),l=[];for(let s=0;s<a.length;s+=1)l[s]=F(C(e,a,s));return{c(){t=s("ul");for(let e=0;e<l.length;e+=1)l[e].c();this.h()},l(e){t=r(e,"UL",{class:!0});var a=c(t);for(let t=0;t<l.length;t+=1)l[t].l(a);a.forEach(i),this.h()},h(){o(t,"class","value__list svelte-12iqedy")},m(e,a){f(e,t,a);for(let s=0;s<l.length;s+=1)l[s].m(t,null)},p(e,s){if(4256&s[0]){let r;for(a=Object.entries(e[33]),r=0;r<a.length;r+=1){const c=C(e,a,r);l[r]?l[r].p(c,s):(l[r]=F(c),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}},d(e){e&&i(t),p(l,e)}}}function F(e){let t,a,u,p,g,m,y,q,w,E,k,j,$,_,b,A,L=e[36]+"",S=e[7].totals[e[36]]+"";return{c(){t=s("li"),a=s("span"),u=l("â"),p=s("span"),g=l(L),m=s("span"),y=l(" â "),q=s("small"),w=l(S),E=l(" items"),this.h()},l(e){t=r(e,"LI",{class:!0,"data-feature":!0,"data-name":!0});var s=c(t);a=r(s,"SPAN",{class:!0});var l=c(a);u=n(l,"â"),l.forEach(i),p=r(s,"SPAN",{class:!0});var o=c(p);g=n(o,L),m=r(o,"SPAN",{class:!0});var f=c(m);y=n(f," â "),q=r(f,"SMALL",{class:!0});var h=c(q);w=n(h,S),E=n(h," items"),h.forEach(i),f.forEach(i),o.forEach(i),s.forEac
1h(i),this.h()},h(){o(a,"class","value__separator svelte-12iqedy"),o(q,"class","svelte-12iqedy"),o(m,"class","value__count svelte-12iqedy"),o(p,"class",k="value__title "+("Not set"===e[36]?"unset":"")+" svelte-12iqedy"),o(t,"class",j=`value ${e[37].active?"active":""} ${0===e[7].totals[e[36]]?"disabled":""} svelte-12iqedy`),o(t,"data-feature",$=e[32]),o(t,"data-name",_=e[36])},m(s,l){f(s,t,l),h(t,a),h(a,u),h(t,p),h(p,g),h(p,m),h(m,y),h(m,q),h(q,w),h(q,E),b||(A=d(t,"click",e[12]),b=!0)},p(e,a){32&a[0]&&L!==(L=e[36]+"")&&v(g,L),160&a[0]&&S!==(S=e[7].totals[e[36]]+"")&&v(w,S),32&a[0]&&k!==(k="value__title "+("Not set"===e[36]?"unset":"")+" svelte-12iqedy")&&o(p,"class",k),160&a[0]&&j!==(j=`value ${e[37].active?"active":""} ${0===e[7].totals[e[36]]?"disabled":""} svelte-12iqedy`)&&o(t,"class",j),32&a[0]&&$!==($=e[32])&&o(t,"data-feature",$),32&a[0]&&_!==(_=e[36])&&o(t,"data-name",_)},d(e){e&&i(t),b=!1,A()}}}function Z(e){let t,a,u,p,g,m,y,q,w,E,k,j,$=e[32]+"",_=e[7].feature===e[32]?"â²":"â¼";function b(e,t){return e[6][e[32]].length?G:T}let A=b(e),L=A(e),S=e[7].feature===e[32]&&z(e);return{c(){t=s("li"),a=s("div"),u=s("div"),p=s("span"),g=l($),m=s("br"),L.c(),y=s("div"),q=l(_),S&&S.c(),this.h()},l(e){t=r(e,"LI",{class:!0});var s=c(t);a=r(s,"DIV",{class:!0,"data-feature":!0});var l=c(a);u=r(l,"DIV",{class:!0});var o=c(u);p=r(o,"SPAN",{class:!0});var f=c(p);g=n(f,$),f.forEach(i),m=r(o,"BR",{class:!0}),L.l(o),o.forEach(i),y=r(l,"DIV",{class:!0});var h=c(y);q=n(h,_),h.forEach(i),l.forEach(i),S&&S.l(s),s.forEach(i),this.h()},h(){o(p,"class","svelte-12iqedy"),o(m,"class","svelte-12iqedy"),o(u,"class","feature__title__text svelte-12iqedy"),o(y,"class","feature__title__arrow svelte-12iqedy"),o(a,"class",w=`feature__title ${e[6][e[32]].length?"active":""} ${e[7].feature===e[32]?"opened":""} svelte-12iqedy`),o(a,"data-feature",E=e[32]),o(t,"class","feature svelte-12iqedy")},m(s,l){f(s,t,l),h(t,a),h(a,u),h(u,p),h(p,g),h(u,m),L.m(u,null),h(a,y),h(y,q),S&&S.m(t,null),k||(j=d(a,"click",e[9]),k=!0)},p(e,s){32&s[0]&&$!==($=e[32]+"")&&v(g,$),A===(A=b(e))&&L?L.p(e,s):(L.d(1),L=A(e),L&&(L.c(),L.m(u,null))),160&s[0]&&_!==(_=e[7].feature===e[32]?"â²":"â¼")&&v(q,_),224&s[0]&&w!==(w=`feature__title ${e[6][e[32]].length?"active":""} ${e[7].feature===e[32]?"opened":""} svelte-12iqedy`)&&o(a,"class",w),32&s[0]&&E!==(E=e[32])&&o(a,"data-feature",E),e[7].feature===e[32]?S?S.p(e,s):(S=z(e),S.c(),S.m(t,null)):S&&(S.d(1),S=null)},d(e){e&&i(t),L.d(),S&&S.d(),k=!1,j()}}}function H(e){let t,a,d,u,p,k,j,$,_,b,A,L,S=N(e[29],e[0].id)+"";return d=new x({props:{tokenid:e[29],ratio:e[0].ratio}}),{c(){t=s("li"),a=s("a"),g(d.$$.fragment),u=s("small"),p=l("#"),k=l(S),$=s("a"),_=s("small"),b=l("View on OpenSea"),this.h()},l(e){t=r(e,"LI",{class:!0});var s=c(t);a=r(s,"A",{href:!0,class:!0});var l=c(a);m(d.$$.fragment,l),u=r(l,"SMALL",{class:!0});var o=c(u);p=n(o,"#"),k=n(o,S),o.forEach(i),l.forEach(i),$=r(s,"A",{class:!0,href:!0,target:!0});var f=c($);_=r(f,"SMALL",{class:!0});var h=c(_);
1b=n(h,"View on OpenSea"),h.forEach(i),f.forEach(i),s.forEach(i),this.h()},h(){o(u,"class","svelte-12iqedy"),o(a,"href",j="/token/"+e[29]),o(a,"class","svelte-12iqedy"),o(_,"class","svelte-12iqedy"),o($,"class","opensea-link svelte-12iqedy"),o($,"href",A=e[15](e[29])),o($,"target","_blank"),o(t,"class","svelte-12iqedy")},m(e,s){f(e,t,s),h(t,a),y(d,a,null),h(a,u),h(u,p),h(u,k),h(t,$),h($,_),h(_,b),L=!0},p(e,t){const s={};6&t[0]&&(s.tokenid=e[29]),1&t[0]&&(s.ratio=e[0].ratio),d.$set(s),(!L||7&t[0])&&S!==(S=N(e[29],e[0].id)+"")&&v(k,S),(!L||6&t[0]&&j!==(j="/token/"+e[29]))&&o(a,"href",j),(!L||6&t[0]&&A!==(A=e[15](e[29])))&&o($,"href",A)},i(e){L||(q(d.$$.fragment,e),L=!0)},o(e){w(d.$$.fragment,e),L=!1},d(e){e&&i(t),E(d)}}}function K(e){let t,a,v,p,g,m;return{c(){t=s("a"),a=l("1"),v=s("span"),p=l("..."),this.h()},l(e){t=r(e,"A",{"data-page":!0,class:!0});var s=c(t);a=n(s,"1"),s.forEach(i),v=r(e,"SPAN",{class:!0});var l=c(v);p=n(l,"..."),l.forEach(i),this.h()},h(){o(t,"data-page","1"),o(t,"class","svelte-12iqedy"),o(v,"class","svelte-12iqedy")},m(s,l){f(s,t,l),h(t,a),f(s,v,l),h(v,p),g||(m=d(t,"click",e[14]),g=!0)},p:u,d(e){e&&i(t),e&&i(v),g=!1,m()}}}function Q(e){let t,a,u,p,g,m,y=e[26]+"";return{c(){t=s("a"),a=l(y),this.h()},l(e){t=r(e,"A",{class:!0,"data-page":!0});var s=c(t);a=n(s,y),s.forEach(i),this.h()},h(){o(t,"class",u=k(e[26]===e[2]?"active":"")+" svelte-12iqedy"),o(t,"data-page",p=e[26])},m(s,l){f(s,t,l),h(t,a),g||(m=d(t,"click",e[14]),g=!0)},p(e,s){256&s[0]&&y!==(y=e[26]+"")&&v(a,y),260&s[0]&&u!==(u=k(e[26]===e[2]?"active":"")+" svelte-12iqedy")&&o(t,"class",u),256&s[0]&&p!==(p=e[26])&&o(t,"data-page",p)},d(e){e&&i(t),g=!1,m()}}}function J(e){let t,a,u,p,g,m;return{c(){t=s("span"),a=l("..."),u=s("a"),p=l(e[3]),this.h()},l(s){t=r(s,"SPAN",{class:!0});var l=c(t);a=n(l,"..."),l.forEach(i),u=r(s,"A",{"data-page":!0,class:!0});var o=c(u);p=n(o,e[3]),o.forEach(i),this.h()},h(){o(t,"class","svelte-12iqedy"),o(u,"data-page",e[3]),o(u,"class","svelte-12iqedy")},m(s,l){f(s,t,l),h(t,a),f(s,u,l),h(u,p),g||(m=d(u,"click",e[14]),g=!0)},p(e,t){8&t[0]&&v(p,e[3]),8&t[0]&&o(u,"data-page",e[3])},d(e){e&&i(t),e&&i(u),g=!1,m()}}}function W(e){let t,a,u,S,I,N,O,x,C,T,G,z,F,W,X,Y,ee,te,ae,se,le,re,ce,ne,ie,oe,fe,he,de,ue,ve,pe,ge,me,ye,qe,we,Ee,ke=e[0].name+"",je=e[0].artist+"",$e=e[1].length+"",_e=e[0].maxInvocations+"";D.title=t="Filter Blocks | "+e[0].name+" by "+e[0].artist,I=new M({props:{class:"project-info--negative",project:e[0]}});let be=e[6].filters.length&&R(e),Ae=Object.entries(e[5]),Le=[];for(let s=0;s<Ae.length;s+=1)Le[s]=Z(B(e,Ae,s));let Se=e[13](e[1],e[2]),Ie=[];for(let s=0;s<Se.length;s+=1)Ie[s]=H(U(e,Se,s));const Pe=e=>w(Ie[e],1,1,(()=>{Ie[e]=null}));let Me=1!==e[8][0]&&K(e),Ne=e[8],Oe=[];for(let s=0;s<Ne.length;s+=1)Oe[s]=Q(V(e,Ne,s));let xe=e[8][e[8].length-1]!==e[3]&&J(e);return{c(){a=j(),u=s("div"),S=s("div"),g(I.$$.fragment),N=s("div"),O=s("h5"),x=l(ke),C=l(" by "),T=l(je),G=s("small"),z=l("Displaying"),F=s("br"),W=s("span"),X=l($e),Y=l(" of "),ee=l(_e),be&&be.c(),te=s("label"),ae=s("input"),se=s("small"),le=l("multiple traits selection"),re=s("ul");for(let e=0;e<Le.length;e+=1)Le[e].c();ce=s("ul");for(let e=0;e<Ie.length;e+=1)Ie[e].c();ne=s("div"),ie=s("div"),oe=s("a"),fe=l("<"),Me&&Me.c(),ue=$();for(let e=0;e<Oe.length;e+=1)Oe[e].c();ve=$(),xe&&xe.c(),pe=s("a"),ge=l(">"),this.h()},l(e){_('[data-svelte="svelte-i9cuan"]',D.head).forEach(i),a=b(e),u=r(e,"DIV",{class:!0});var t=c(u);S=r(t,"DIV",{class:!0});var s=c(S);m(I.$$.fragment,s),N=r(s,"DIV",{class:!0});var l=c(N);O=r(l,"H5",{class:!0});var o=c(O);x=n(o,ke),C=n(o," by "),T=n(o,je),o.forEach(i),G=r(l,"SMALL",{class:!0});var f=c(G);z=n(f,"Displaying"),f.forEach(i),F=r(l,"BR",{class:!0}),W=r(l,"SPAN",{class:!0});var h=c(W);X=n(h,$e),Y=n(h," of "),ee=n(h,_e),h.forEach(i),be&&be.l(l),te=r(l,"LABEL",{class:!0});var d=c(te);ae=r(d,"INPUT",{type:!0,class:!0}),se=r(d,"SMALL",{class:!0});var v=c(se);le=n(v,"multiple traits selection"),v.forEach(i),d.forEach(i),l.forEach(i),re=r(s,"UL",{class:!0});var p=c(re);for(let a=0;a<Le.length;a+=1)Le[a].l(p);
1p.forEach(i),s.forEach(i),ce=r(t,"UL",{class:!0});var g=c(ce);for(let a=0;a<Ie.length;a+=1)Ie[a].l(g);g.forEach(i),ne=r(t,"DIV",{class:!0});var y=c(ne);ie=r(y,"DIV",{class:!0});var q=c(ie);oe=r(q,"A",{class:!0,"data-page":!0});var w=c(oe);fe=n(w,"<"),w.forEach(i),Me&&Me.l(q),ue=$();for(let a=0;a<Oe.length;a+=1)Oe[a].l(q);ve=$(),xe&&xe.l(q),pe=r(q,"A",{class:!0,"data-page":!0});var E=c(pe);ge=n(E,">"),E.forEach(i),q.forEach(i),y.forEach(i),t.forEach(i),this.h()},h(){o(O,"class","svelte-12iqedy"),o(G,"class","svelte-12iqedy"),o(F,"class","svelte-12iqedy"),o(W,"class","svelte-12iqedy"),o(ae,"type","checkbox"),o(ae,"class","svelte-12iqedy"),o(se,"class","svelte-12iqedy"),o(te,"class","multiselect svelte-12iqedy"),o(N,"class","artworks__count svelte-12iqedy"),o(re,"class","feature__list svelte-12iqedy"),o(S,"class","gallery__sidebar svelte-12iqedy"),o(ce,"class","gallery__artworks svelte-12iqedy"),o(oe,"class",he=k(1===e[2]?"disabled":"")+" svelte-12iqedy"),o(oe,"data-page",de=e[2]-1),o(pe,"class",me=k(e[2]===e[3]?"disabled":"")+" svelte-12iqedy"),o(pe,"data-page",ye=e[2]+1),o(ie,"class","pages svelte-12iqedy"),o(ne,"class","gallery__artworks__pagination svelte-12iqedy"),o(u,"class","gallery svelte-12iqedy")},m(t,s){f(t,a,s),f(t,u,s),h(u,S),y(I,S,null),h(S,N),h(N,O),h(O,x),h(O,C),h(O,T),h(N,G),h(G,z),h(N,F),h(N,W),h(W,X),h(W,Y),h(W,ee),be&&be.m(N,null),h(N,te),h(te,ae),ae.checked=e[4],h(te,se),h(se,le),h(S,re);for(let e=0;e<Le.length;e+=1)Le[e].m(re,null);h(u,ce);for(let e=0;e<Ie.length;e+=1)Ie[e].m(ce,null);h(u,ne),h(ne,ie),h(ie,oe),h(oe,fe),Me&&Me.m(ie,null),h(ie,ue);for(let e=0;e<Oe.length;e+=1)Oe[e].m(ie,null);h(ie,ve),xe&&xe.m(ie,null),h(ie,pe),h(pe,ge),qe=!0,we||(Ee=[d(ae,"change",e[18]),d(oe,"click",e[14]),d(pe,"click",e[14])],we=!0)},p(e,a){(!qe||1&a[0])&&t!==(t="Filter Blocks | "+e[0].name+" by "+e[0].artist)&&(D.title=t);const s={};if(1&a[0]&&(s.project=e[0]),I.$set(s),(!qe||1&a[0])&&ke!==(ke=e[0].name+"")&&v(x,ke),(!qe||1&a[0])&&je!==(je=e[0].artist+"")&&v(T,je),(!qe||2&a[0])&&$e!==($e=e[1].length+"")&&v(X,$e),(!qe||1&a[0])&&_e!==(_e=e[0].maxInvocations+"")&&v(ee,_e),e[6].filters.length?be?be.p(e,a):(be=R(e),be.c(),be.m(N,te)):be&&(be.d(1),be=null),16&a[0]&&(ae.checked=e[4]),6880&a[0]){let t;for(Ae=Object.entries(e[5]),t=0;t<Ae.length;t+=1){const s=B(e,Ae,t);Le[t]?Le[t].p(s,a):(Le[t]=Z(s),Le[t].c(),Le[t].m(re,null))}for(;t<Le.length;t+=1)Le[t].d(1);Le.length=Ae.length}if(40967&a[0]){let t;for(Se=e[13](e[1],e[2]),t=0;t<Se.length;t+=1){const s=U(e,Se,t);Ie[t]?(Ie[t].p(s,a),q(Ie[t],1)):(Ie[t]=H(s),Ie[t].c(),q(Ie[t],1),Ie[t].m(ce,null))}for(P(),t=Se.length;t<Ie.length;t+=1)Pe(t);A()}if((!qe||4&a[0]&&he!==(he=k(1===e[2]?"disabled":"")+" svelte-12iqedy"))&&o(oe,"class",he),(!qe||4&a[0]&&de!==(de=e[2]-1))&&o(oe,"data-page",de),1!==e[8][0]?Me?Me.p(e,a):(Me=K(e),Me.c(),Me.m(ie,ue)):Me&&(Me.d(1),Me=null),16644&a[0]){let t;for(Ne=e[8],t=0;t<Ne.length;t+=1){const s=V(e,Ne,t);Oe[t]?Oe[t].p(s,a):(Oe[t]=Q(s),Oe[t].c(),Oe[t].m(ie,ve))}for(;t<Oe.length;t+=1)Oe[t].d(1);Oe.length=Ne.length}e[8][e[8].length-1]!==e[3]?xe?xe.p(e,a):(xe=J(e),xe.c(),xe.m(ie,pe)):xe&&(xe.d(1),xe=null),(!qe||12&a[0]&&me!==(me=k(e[2]===e[3]?"disabled":"")+" svelte-12iqedy"))&&o(pe,"class",me),(!qe||4&a[0]&&ye!==(ye=e[2]+1))&&o(pe,"data-page",ye)},i(e){if(!qe){q(I.$$.fragment,e);for(let e=0;e<Se.length;e+=1)q(Ie[e]);qe=!0}},o(e){w(I.$$.fragment,e),Ie=Ie.filter(Boolean);for(let t=0;t<Ie.length;t+=1)w(Ie[t]);qe=!1},d(e){e&&i(a),e&&i(u),E(I),be&&be.d(),p(Le,e),p(Ie,e),Me&&Me.d(),p(Oe,e),xe&&xe.d(),we=!1,L(Ee)}}}const X=async({page:e,fetch:t})=>{let{projectid:a}=e.params;try{if(isNaN(parseInt(a))){const e=await t("/data/projects/list.json"),s=await e.json();a=a.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase();const l=s.filter((e=>e.name.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase().concat("s").includes(a)));if(!l.length)throw new Error("Alias not found");a=l[0].id}const e=await t(`/data/projects/${a}/project.json`),l=await t(`/data/projects/${a}/features.json`),r=await e.json(),c=await l.json();let n=[];for(var s=0;s<r.invocations;s+=1)n.push(1e6*r.id+s);return{props:{project:r,features:c,tokens:n}}}catch(l){return{status:404,error:l}}};function Y(e,t,a){let s,l,r,{project:c}=t,{features:n}=t,{tokens:i}=t,o=!0,f={},h={filters:[]},d={},u=1;for(const[w,E]of Object.entries(n)){void 0===f[w]&&(f[w]={},h[w]=[]);for(const[e,t]of Object.entries(E))void 0===f[w][e]&&(f[w][e]={artworks:t,active:!1})}r=i;const v=e=>e.reduce(((e,t)=>e.filter((e=>t.includes(e))))).sort(((e,t)=>e-t)),p=()=>{const e=h.filters.reduce(((e,t)=>(void 0===e[t.feature]&&(e[t.feature]=[]),e[t.feature].push(...t.artworks),e)),{});a(1,r=h.filters.length?v(Object.values(e)):i)},g=e=>{const t={};
1return Object.keys(f[e]).forEach((a=>{t[a]=((e,t)=>{const a=h.filters.reduce(((t,a)=>(a.feature!==e&&(void 0===t[a.feature]&&(t[a.feature]=[]),t[a.feature].push(...a.artworks)),t)),{});return a[e]=Object.values(f[e]).map((e=>e.artworks)).flat(),v([...Object.values(a),f[e][t].artworks]).length})(e,a)})),t},m=()=>{const e=Object.entries(h).filter((([e,t])=>"filters"!==e&&t.length));e.length?window.history.pushState(h,"Gallery",location.pathname+"?"+new URLSearchParams(Object.fromEntries(e)).toString()):window.history.pushState([],"Gallery",location.pathname),a(2,u=1),window.scrollTo(0,0)},y=(e=!0)=>{Object.keys(f).forEach((e=>{for(name in a(6,h[e]=[],h),f[e])a(5,f[e][name].active=!1,f)})),a(6,h.filters=[],h),a(7,d={}),e?m():window.scrollTo(0,0),a(1,r=i)},q=()=>{if(y(!1),location.search){let e=!1;const t=new URLSearchParams(location.search);for(const[s,l]of t)"page"===s?e=l:f[s]&&l.split(",").forEach((e=>{f[s][e]&&(a(5,f[s][e].active=!0,f),h[s].push(e),h.filters.push({feature:s,name:e,artworks:f[s][e].artworks}))}));p(),a(2,u=e?Math.min(Math.max(1,parseInt(e)),Math.ceil(r.length/21)):1)}else a(2,u=1),window.scrollTo(0,0)};q();return S((()=>(window.addEventListener("popstate",q),document.body.classList.add(c.type),()=>{window.removeEventListener("popstate",q),document.body.classList.remove(c.type)}))),e.$$set=e=>{"project"in e&&a(0,c=e.project),"features"in e&&a(16,n=e.features),"tokens"in e&&a(17,i=e.tokens)},e.$$.update=()=>{2&e.$$.dirty[0]&&a(3,s=Math.ceil(r.length/21)),12&e.$$.dirty[0]&&a(8,l=((e,t)=>{let s=e-4,r=e+4;s=Math.max(1,s),r=Math.min(r,t),r-s<8&&(1===s?r=9:r===t&&(s=t-8),s=Math.max(1,s),r=Math.min(r,t)),a(8,l=[]);for(let a=s;a<=r;a+=1)l.push(a);return l})(u,s))},[c,r,u,s,o,f,h,d,l,({target:e})=>{const{feature:t}=e.dataset;d.feature!==t?a(7,d={feature:t,totals:g(t)}):a(7,d={})},y,e=>{e.stopPropagation();const{feature:t}=e.target.dataset;for(name in f[t])a(5,f[t][name].active=!1,f);a(6,h[t]=[],h),a(6,h.filters=h.filters.filter((e=>e.feature!==t)),h),p(),m(),d.feature&&a(7,d.totals=g(d.feature),d)},({target:e})=>{const{feature:t,name:s}=e.dataset;if(f[t][s].active)a(5,f[t][s].active=!1,f),a(6,h[t]=h[t].filter((e=>e!==s)),h),a(6,h.filters=h.filters.filter((e=>!(e.feature===t&&e.name===s))),h);else{if(!o){for(let e in f[t])a(5,f[t][e].active=!1,f);a(6,h[t]=[],h),a(6,h.filters=h.filters.filter((e=>e.feature!==t)),h)}a(5,f[t][s].active=!0,f),h[t].push(s),h.filters.push({feature:t,name:s,artworks:f[t][s].artworks})}p(),m()},(e,t=1)=>e.slice(21*(t-1),21*t),({target:e})=>{const{page:t}=e.dataset;a(2,u=Math.min(Math.max(1,parseInt(t)),s));const l=new URLSearchParams(location.search);l.set("page",u),window.history.pushState(window.history.state,"Gallery",`${location.pathname}?${l}`),window.scrollTo(0,0)},e=>O(c.contract,e),n,i,function(){o=this.checked,a(4,o)}]}export default class extends e{constructor(e){super(),t(this,e,Y,W,a,{project:0,features:16,tokens:17},[-1,-1])}}export{X as load};
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.