diff --git a/static/bundled/js/BWWEJf.js b/static/bundled/js/CmEyuP.js similarity index 75% rename from static/bundled/js/BWWEJf.js rename to static/bundled/js/CmEyuP.js index ff3a15f..5ce02c0 100644 --- a/static/bundled/js/BWWEJf.js +++ b/static/bundled/js/CmEyuP.js @@ -1 +1 @@ -import{c as e,o as t,a as n,i as s,b as i,t as a,u as o,d as r,e as c,f as l,g as d,h as g,s as u,F as h,j as m,l as v,k as p,m as y,n as f,S as w}from"./main.js";var x=a("
");function I(a){let o;const[r,c]=e({x:0,y:0}),l=e=>{const{clientX:t,clientY:n}=e;c({x:t,y:n})};return t((()=>{o=new AbortController;const e=o.signal;window.addEventListener("mousemove",l,{passive:!0,signal:e})})),n((()=>{null==o||o.abort()})),g=(d=x()).firstChild,s(g,(()=>a.cursorText())),i((e=>{var t=!!a.active(),n=`translate3d(${r().x}px, ${r().y}px, 0)`;return t!==e.e&&d.classList.toggle("active",e.e=t),n!==e.t&&(null!=(e.t=n)?d.style.setProperty("transform",n):d.style.removeProperty("transform")),e}),{e:void 0,t:void 0}),d;var d,g}const A=document.getElementsByClassName("threshold")[0],E=Array.from(A.getElementsByClassName("num")),T=A.getElementsByClassName("dec").item(0),H=A.getElementsByClassName("inc").item(0),O=document.getElementsByClassName("index").item(0),L=Array.from(O.getElementsByClassName("num"));function k(){const[e,{incThreshold:t,decThreshold:n}]=o();return r((()=>{var t,n,s;t=c(e().index+1),n=c(e().length),L.forEach(((e,s)=>{e.innerText=s<4?t[s]:n[s-4]})),s=c(e().threshold),E.forEach(((e,t)=>{e.innerText=s[t]}))})),T.onclick=n,H.onclick=t,null}var C=a("
"),b=a("");function N(e){return e.map((e=>e.i))}function $(e,t){return function(e,t){return N(e).slice(-t.trailLength)}(e,t).slice(0,-1)}function U(e){return N(e).slice(-1)[0]}function V(e,t){return p(e.slice(-1)[0].i,t.length)}function j(e,t){return y(e.slice(-1)[0].i,t.length)}function W(e,t){return t.map((t=>e[t]))}function B(e){e.forEach((e=>{e.src!==e.dataset.hiUrl&&(e.src=e.dataset.hiUrl,e.height=parseInt(e.dataset.hiImgH),e.width=parseInt(e.dataset.hiImgW))}))}function M(e){e.forEach((e=>{e.src!==e.dataset.loUrl&&(e.src=e.dataset.loUrl,e.height=parseInt(e.dataset.loImgH),e.width=parseInt(e.dataset.loImgW))}))}function F(e){let n;const a=Array(e.ijs.length);let c,m={x:0,y:0},p=!1;const[y,{incIndex:f}]=o(),w=y().length;let x=!1;const I=t=>{if(e.isOpen()||e.isAnimating()||!p||!x)return;const n={x:t.clientX,y:t.clientY};if(Math.hypot(n.x-m.x,n.y-m.y)>y().threshold){m=n,f();const t={i:y().index,...n};e.setCordHist((e=>[...e,t].slice(-w)))}},A=()=>{!e.isAnimating()&&e.setIsOpen(!0)};function E(t){if(x&&p)if(t.complete)n.set(t,{opacity:1}).then((()=>{e.setIsLoading(!1)})).catch((e=>{console.log(e)}));else{e.setIsLoading(!0);const s=new AbortController,i=s.signal;t.addEventListener("load",(()=>{n.to(t,{opacity:1,ease:"power3.out",duration:.5}).then((()=>{e.setIsLoading(!1)})).catch((e=>{console.log(e)})).finally((()=>{s.abort()}))}),{once:!0,passive:!0,signal:i}),t.addEventListener("error",(()=>{n.set(t,{opacity:1}).then((()=>{e.setIsLoading(!1)})).catch((e=>{console.log(e)})).finally((()=>{s.abort()}))}),{once:!0,passive:!0,signal:i})}}return t((()=>{a.forEach(((t,n)=>{n<5&&(t.src=t.dataset.loUrl),function(e,t,n={attributes:!0}){new MutationObserver(((e,n)=>{for(const s of e)if(t(s)){n.disconnect();break}})).observe(e,n)}(t,(s=>!e.isOpen()&&!e.isAnimating()&&"style"===s.attributeName&&1===parseFloat(t.style.opacity)&&(n+5{v().then((e=>{n=e,p=!0})).catch((e=>{console.log(e)}))}),{passive:!0,once:!0}),c=new AbortController;const t=c.signal;window.addEventListener("mousemove",I,{passive:!0,signal:t}),x=!0})),r(l((()=>e.cordHist()),(()=>{(()=>{if(!x)return;if(0===a.length)return;const t=e.cordHist(),s=N(t);if(0===s.length)return;const i=W(a,s),o=e.isOpen(),r=y();if(n.set(i,{x:e=>t[e].x-window.innerWidth/2,y:e=>t[e].y-window.innerHeight/2,opacity:e=>Math.max((e+1+r.trailLength<=t.length?0:1)-(o?1:0),0),zIndex:e=>e,scale:.6}),o){const s=W(a,[U(t)])[0],i=[],o=[];switch(e.navVector()){case"prev":i.push(V(t,r)),o.push(j(t,r));break;case"next":i.push(j(t,r)),o.push(V(t,r))}B(W(a,i)),n.set(W(a,o),{opacity:0}),n.set(s,{x:0,y:0,scale:1}),E(s)}else M(i)})()}),{defer:!0})),r(l((()=>e.isOpen()),(async()=>{e.isAnimating()||(e.isOpen()?await(async()=>{if(!x||!p)throw new Error("not mounted or gsap not loaded");e.setIsAnimating(!0);const t=e.cordHist(),s=y(),i=U(t),o=a[i];B(W(a,[i,V(t,s),j(t,s)])),E(o);const r=n.timeline(),c=W(a,$(t,s));return r.to(c,{y:"+=20",ease:"power3.in",stagger:.075,duration:.3,delay:.1,opacity:0}),r.to(o,{x:0,y:0,ease:"power3.inOut",duration:.7,delay:.3}),r.to(o,{delay:.1,scale:1,ease:"power3.inOut"}),await r.then((()=>{e.setIsAnimating(!1)}))})().catch((()=>{})).then((()=>{null==c||c.abort()})):await(async()=>{if(!x||!p)throw new Error("not mounted or gsap not loaded");e.setIsAnimating(!0),e.setNavVector("none");const t=e.cordHist(),s=y(),i=U(t),o=$(t,s);M(W(a,[...o,i]));const r=n.timeline(),c=W(a,[i])[0],l=W(a,o);return r.to(c,{scale:.6,duration:.6,ease:"power3.inOut"}),r.to(c,{delay:.3,duration:.7,ease:"power3.inOut",x:t.slice(-1)[0].x-window.innerWidth/2,y:t.slice(-1)[0].y-window.innerHeight/2}),r.to(l,{y:"-=20",ease:"power3.out",stagger:-.1,duration:.3,opacity:1}),await r.then((()=>{e.setIsAnimating(!1)}))})().catch((()=>{})).then((()=>{c=new AbortController;const t=c.signal;window.addEventListener("mousemove",I,{passive:!0,signal:t}),e.setIsLoading(!1)})))}),{defer:!0})),(T=C()).$$keydown=A,T.$$click=A,s(T,d(h,{get each(){return e.ijs},children:(e,t)=>{return n=b(),"function"==typeof(s=a[t()])?g(s,n):a[t()]=n,i((t=>{var s=e.loImgH,i=e.loImgW,a=e.hiUrl,o=e.hiImgH,r=e.hiImgW,c=e.loUrl,l=e.loImgH,d=e.loImgW,g=e.alt;return s!==t.e&&u(n,"height",t.e=s),i!==t.t&&u(n,"width",t.t=i),a!==t.a&&u(n,"data-hi-url",t.a=a),o!==t.o&&u(n,"data-hi-img-h",t.o=o),r!==t.i&&u(n,"data-hi-img-w",t.i=r),c!==t.n&&u(n,"data-lo-url",t.n=c),l!==t.s&&u(n,"data-lo-img-h",t.s=l),d!==t.h&&u(n,"data-lo-img-w",t.h=d),g!==t.r&&u(n,"alt",t.r=g),t}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),n;var n,s}})),T;var T}m(["click","keydown"]);var P=a("