(()=>{"use strict";window.__dz=1;const _e=(()=>{const xt=document.querySelector("[data-rvh] video");if(!xt)return null;const R={v:xt,mode:"",parsed:!1,onParsed:null,err:null};if(matchMedia("(prefers-reduced-motion: reduce)").matches||navigator.connection&&navigator.connection.saveData||!xt.dataset.hls||!xt.dataset.hlsjs)return R;const st=xt.closest("[data-rvh]");xt.muted=!0,xt.playsInline=!0,R.mode="hls",xt.addEventListener("playing",()=>{R.started=!0,st.classList.add("is-playing")},{once:!0});const yt=()=>{R.mode="fail",R.err&&R.err()},N=()=>{const wt=xt.play();wt&&wt.catch&&wt.catch(()=>{})},nt=()=>{R.parsed=!0,R.onParsed&&R.onParsed()};if(xt.canPlayType("application/vnd.apple.mpegurl")&&/^((?!chrome|chromium|android|crios|fxios|edg).)*safari/i.test(navigator.userAgent))return xt.addEventListener("error",yt,{once:!0}),xt.src=xt.dataset.hls,nt(),R;if(!("MediaSource"in window)&&!("ManagedMediaSource"in window))return R.mode="fail",R;const Mt=document.createElement("script");return Mt.src=xt.dataset.hlsjs,Mt.async=!0,Mt.onerror=yt,Mt.onload=()=>{const wt=window.Hls;if(!wt||!wt.isSupported()){yt();return}const zt=!!document.prerendering;let se=wt.DefaultConfig.loader;try{se=class extends wt.DefaultConfig.loader{loadprogress(ut){super.loadprogress(ut);const Tt=this.context;Tt&&Tt.frag&&Tt.frag.type==="main"&&ut.lengthComputable&&R.onPr&&!R.started&&R.onPr(Tt.frag.sn==="initSegment"?.08*ut.loaded/ut.total:.08+.92*ut.loaded/ut.total)}}}catch{}const pt=R.h=new wt({loader:se,abrEwmaDefaultEstimate:25e5,abrEwmaFastVoD:2,capLevelToPlayerSize:!0,maxBufferLength:zt?6:30,maxMaxBufferLength:zt?8:60,backBufferLength:20,startFragPrefetch:!0});zt&&document.addEventListener("prerenderingchange",()=>{pt.config.maxBufferLength=30,pt.config.maxMaxBufferLength=60},{once:!0});let kt=!1;pt.on(wt.Events.ERROR,(ut,Tt)=>{if(Tt.fatal){if(Tt.type===wt.ErrorTypes.NETWORK_ERROR&&!kt&&Tt.details!=="manifestLoadError"){kt=!0,pt.startLoad();return}if(Tt.type===wt.ErrorTypes.MEDIA_ERROR&&!kt){kt=!0,pt.recoverMediaError();return}pt.destroy(),R.h=null,yt()}}),pt.on(wt.Events.MANIFEST_PARSED,nt),pt.loadSource(xt.dataset.hls),pt.attachMedia(xt)},document.head.appendChild(Mt),R})(),Ne=async()=>{const xt=()=>location.hash==="#snap"?null:window.scheduler&&scheduler.yield?scheduler.yield():new Promise(e=>setTimeout(e,0)),R=document,st=R.documentElement,yt=st.classList.contains("lite"),N=matchMedia("(prefers-reduced-motion: reduce)").matches,nt=matchMedia("(hover: hover) and (pointer: fine)").matches,Mt=!nt,wt=nt&&/AppleWebKit/.test(navigator.userAgent)&&!/Chrome|Chromium|CriOS|Edg|OPR|Firefox|FxiOS|SamsungBrowser/.test(navigator.userAgent),zt=!!(navigator.connection&&navigator.connection.saveData),se=!!(navigator.connection&&/^(slow-2g|2g)$/.test(navigator.connection.effectiveType||"")),pt=location.hash==="#snap";st.classList.add("js"),window.__dz=1,addEventListener("keydown",e=>{(e.key==="Tab"||e.key==="Enter"||e.key===" "||e.key.startsWith("Arrow"))&&st.classList.add("kbd")},!0),addEventListener("pointerdown",()=>st.classList.remove("kbd"),{capture:!0,passive:!0});let kt;try{sessionStorage.getItem("dz-soft")==="0"&&(kt=!1)}catch{}const ut=()=>{if(/[?&]gl=1/.test(location.search))return!1;if(kt!==void 0)return kt;try{const t=R.createElement("canvas").getContext("webgl");if(!t)return kt=!0;let n=String(t.getParameter(t.RENDERER));if(/^webkit webgl$/i.test(n)){const a=t.getExtension("WEBGL_debug_renderer_info");a&&(n=String(t.getParameter(a.UNMASKED_RENDERER_WEBGL)))}const o=t.getExtension("WEBGL_lose_context");if(o&&o.loseContext(),kt=/swiftshader|llvmpipe|softpipe|software|basic render/i.test(n),!kt)try{sessionStorage.setItem("dz-soft","0")}catch{}}catch{kt=!1}return kt};nt&&!N&&st.classList.add("has-cursor");let Tt=!1;try{Tt=sessionStorage.getItem("dz-warp")==="1",sessionStorage.removeItem("dz-warp")}catch{}(!location.hash||pt)&&scrollTo(0,0),addEventListener("pageshow",e=>{!e.persisted&&!location.hash&&scrollTo(0,0)});const ke=(e,t=5e3)=>{let n=!1;const o=["pointermove","pointerdown","keydown","touchstart","wheel","scroll"],a=()=>{n||(n=!0,o.forEach(h=>removeEventListener(h,a)),e())},s=()=>{o.forEach(h=>addEventListener(h,a,{passive:!0})),setTimeout(a,t)};R.readyState==="complete"?s():addEventListener("load",s,{once:!0})},E=(e,t=R)=>t.querySelector(e),F=(e,t=R)=>Array.from(t.querySelectorAll(e)),Y=(e,t,n)=>Math.min(n,Math.max(t,e)),at=(e,t,n)=>e+(t-e)*n,Pt="AbortController"in window?new AbortController:null,K=(e,t,n)=>{const o=Y((n-e)/(t-e),0,1);return o*o*(3-2*o)},ae=(e,t,n)=>{if(!("IntersectionObserver"in window)){e.forEach(t);return}const o=new IntersectionObserver(a=>a.forEach(s=>{s.isIntersecting&&(o.unobserve(s.target),t(s.target))}),n||{rootMargin:"0px 0px -10% 0px"});e.forEach(a=>o.observe(a))};let Ve=!0;try{const e=new Image;e.onerror=()=>{Ve=!1},e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}catch{}const At=(e,t,n)=>{let o=!1;if(!("IntersectionObserver"in window)){Ot(t);return}new IntersectionObserver(a=>a.forEach(s=>{s.isIntersecting&&!o?(o=!0,Ot(t)):!s.isIntersecting&&o&&(o=!1,de(t))}),{rootMargin:n||"0px"}).observe(e)},B=(e,t,n)=>{const o=e._v||(e._v={});o[t]!==n&&(o[t]=n,e.style.setProperty(t,n))},Te=(e,t)=>{let n=e.querySelector(":scope > .pct");n||(n=R.createElement("b"),n.className="pct tnum",n.setAttribute("aria-hidden","true"),e.appendChild(n));const o=t||700;let a=-1,s=0,h=0,d=0,c=0;const l=[],f=y=>{y!==a&&(a=y,n.textContent=y+"%",e.classList.add("has-pct"))},r=y=>{c=0;const g=d?Math.min(64,y-d):16;d=y,h=Math.min(s,h+100*g/o),f(Math.floor(h)),h=100&&l.splice(0).forEach(u=>u()))},m=y=>{const g=Math.max(s,Math.min(100,y*100));a<0&&f(0),!(g<=s)&&(s=g,c||(c=requestAnimationFrame(r)))};return m.done=y=>{h>=100?y():l.push(y)},m},Xe=(e,t,n)=>{const o=n||+e.headers.get("content-length")||0;if(!e.body||!e.body.getReader)return e.blob();const a=e.body.getReader(),s=[];let h=0;const d=()=>a.read().then(({done:c,value:l})=>c?(t(1),new Blob(s,{type:e.headers.get("content-type")||""})):(s.push(l),h+=l.length,o&&t(Math.min(.99,h/o)),d()));return d()};let Z=innerWidth,k=innerHeight,Dt=scrollY,re=Dt,Et=Z/2,bt=k/2,Ke=Et,Ye=bt,Ao=0,Mo=0,ie=0,Ft=0;const ce=new Set;let te=0,le=performance.now();function Se(e){const t=Math.min(64,e-le);le=e,it.active&&To(t),Ao=Et-Ke,Mo=bt-Ye,Ke=Et,Ye=bt,Ft=at(Ft,ie,.18),ie*=.8,ce.forEach(n=>n(t,e)),te=ce.size||it.active?requestAnimationFrame(Se):0}function Ot(e){ce.add(e),te||(le=performance.now(),te=requestAnimationFrame(Se))}function de(e){ce.delete(e)}const Re=new WeakMap;let Ut=0,fe=0;const Fe=new Set,_o=e=>{let t=Re.get(e);if(!t||t.v!==Ut){const n=e.getBoundingClientRect();t={t:n.top+scrollY,h:n.height,l:n.left,w:n.width,v:Ut},Re.set(e,t),Fe.add(e)}return t},Ge=e=>{const t=scrollY;(e||Fe).forEach(n=>{const o=n.getBoundingClientRect();Re.set(n,{t:o.top+t,h:o.height,l:o.left,w:o.width,v:Ut}),Fe.add(n)})},dt=e=>{const t=_o(e),n=t.t-Dt;return{top:n,bottom:n+t.h,height:t.h,left:t.l,right:t.l+t.w,width:t.w}},Je=()=>{Ut++,fe=st.scrollHeight};fe=st.scrollHeight;const mt=[];let Ce=!1;function Gt(){Ce=!1,Dt=scrollY,ie=Dt-re||ie,mt.forEach(e=>e(Dt)),re=Dt}addEventListener("scroll",()=>{!Ce&&!it.active&&(Ce=!0,requestAnimationFrame(Gt))},{passive:!0});let Qe=innerWidth,Ie=innerHeight;const Ze=[],_t=e=>Ze.push(e);addEventListener("resize",()=>{const e=innerWidth,t=innerHeight;e===Qe&&!nt&&Math.abs(t-Ie)n()))},{passive:!0}),_t(()=>{Z=innerWidth,k=innerHeight,Je(),Gt()});const ze=()=>{Je(),Ge(),Gt()};if(addEventListener("load",ze),R.fonts&&R.fonts.ready&&R.fonts.ready.then(ze),"ResizeObserver"in window){let e=0;new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(ze)}).observe(R.body)}addEventListener("pointermove",e=>{Et=e.clientX,bt=e.clientY},{passive:!0});const it={on:nt&&!N,target:scrollY,cur:scrollY,active:!1},ko=R.scrollingElement||st,to=()=>fe-k,To=e=>{const t=it.target-it.cur,n=t*(1-Math.pow(.9,e/16.667));wt&&Math.abs(n)<1&&Math.abs(t)>=1?it.cur+=Math.sign(t)*Math.min(Math.abs(t),e/16.667):it.cur+=n,Math.abs(it.target-it.cur)<(wt?.5:.4)&&(it.cur=it.target,it.active=!1),wt?ko.scrollTop=Math.round(it.cur):scrollTo(0,it.cur),Gt()},eo=()=>{it.active||(it.active=!0,te||(le=performance.now(),te=requestAnimationFrame(Se)))};it.on&&(addEventListener("wheel",e=>{e.ctrlKey||e.defaultPrevented||st.classList.contains("menu-open")||e.target.closest&&e.target.closest("dialog,[data-native-scroll]")||Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),it.active||(it.cur=it.target=scrollY),it.target=Y(it.target+e.deltaY*(e.deltaMode===1?32:e.deltaMode===2?k:1),0,to()),eo())},{passive:!1}),addEventListener("scroll",()=>{it.active||(it.cur=it.target=scrollY)},{passive:!0}));const So=e=>{it.on?(it.cur=scrollY,it.target=Y(e,0,to()),eo()):scrollTo({top:e,behavior:N?"auto":"smooth"})};R.addEventListener("click",e=>{const t=e.target.closest&&e.target.closest('a[href^="#"]');if(!t||t.classList.contains("skip"))return;const n=t.getAttribute("href").slice(1),o=n&&R.getElementById(n);o&&(e.preventDefault(),So(o.getBoundingClientRect().top+scrollY-(parseInt(getComputedStyle(st).getPropertyValue("--nav-hs"))||72)))});const oo=F("[data-clock]"),Ro=()=>{const e=new Date,t=e.getUTCFullYear(),n=a=>{const s=new Date(Date.UTC(t,a+1,0));return Date.UTC(t,a,s.getUTCDate()-s.getUTCDay(),1)},o=new Date(e.getTime()+(e>=n(2)&&e{const t=Ro();oo.forEach(n=>{n.textContent=t})};e(),setInterval(e,15e3)}const Jt=E(".nav"),no=E(".progress"),Pe=E(".foot");let ee=!1;mt.push(e=>{if(Jt){Jt.classList.toggle("is-scrolled",e>24);const t=e>re+3,n=e220&&!st.classList.contains("menu-open")?ee||(Jt.classList.add("is-hidden"),ee=!0):(n||e<220)&&ee&&(Jt.classList.remove("is-hidden"),ee=!1)}if(no){const t=fe-k;no.style.transform=`scaleX(${t>0?Y(e/t,0,1):0})`}});const he=E(".menu-btn"),pe=E(".menu");if(he&&pe){const e=n=>{st.classList.toggle("menu-open",n),he.setAttribute("aria-expanded",String(n)),pe.setAttribute("aria-hidden",String(!n)),n?(Jt&&Jt.classList.remove("is-hidden"),ee=!1,st.classList.contains("kbd")&&setTimeout(()=>{const o=E("a",pe);o&&o.focus({preventScroll:!0})},120)):st.classList.contains("kbd")&&he.focus({preventScroll:!0})};he.addEventListener("click",()=>e(!st.classList.contains("menu-open"))),R.addEventListener("keydown",n=>{n.key==="Escape"&&st.classList.contains("menu-open")&&e(!1)}),F("a",pe).forEach(n=>n.addEventListener("click",o=>{const a=n.getAttribute("href")||"";!N&&!(o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)&&n.target!=="_blank"&&a&&a[0]!=="#"&&!/^(mailto|tel|https?):/i.test(a)?st.classList.add("menu-leaving"):e(!1)}));const t=E(".menu-scrim");t&&t.addEventListener("click",()=>e(!1))}const so=F("[data-rv],[data-h],[data-roles]");if(!N&&"IntersectionObserver"in window){const e=new IntersectionObserver(t=>t.forEach(n=>{n.isIntersecting&&(n.target.classList.add("in"),e.unobserve(n.target))}),{rootMargin:"0px 0px -8% 0px",threshold:.01});so.forEach(t=>e.observe(t))}else so.forEach(e=>e.classList.add("in"));if(!N){const e="!<>-_\\/[]{}=+*^?#01",t=innerHeight;ae(F("[data-scramble]").filter(n=>n.getBoundingClientRect().top>t*.9),n=>{const o=n.textContent;let a=0;const s=18,h=()=>{a++;const d=Math.floor(o.length*a/s);n.textContent=o.slice(0,d)+o.slice(d).replace(/[^\s·]/g,()=>e[Math.random()*e.length|0]),a{const t=e.dataset.count;if(N||!/^\d+$/.test(t))return;const n=t.split(""),o=e.closest(".kf")||e.parentElement;if(e.setAttribute("aria-hidden","true"),e.insertAdjacentHTML("afterend",`${t}`),e.classList.add("od"),e.style.setProperty("--dl",(+e.dataset.countDelay||0)+"ms"),o.style.setProperty("--ud",(+e.dataset.countDelay||0)+"ms"),e.innerHTML=n.map((a,s)=>{const h=+a,d=[];for(let c=0;c${a}${d.map(c=>`${c}`).join("")}`}).join(""),!("IntersectionObserver"in window)){e.classList.add("is-on"),o.classList.add("is-count");return}new IntersectionObserver(a=>a.forEach(s=>{e.classList.toggle("is-on",s.isIntersecting),o.classList.toggle("is-count",s.isIntersecting)}),{threshold:.6}).observe(e)});const Fo=[[".hero","bloom"],[".kong","burn"],[".closing--planet","flare"],[".closing","bloom"],[".depth","wash"],[".rvh","wash"],[".fv,.platform,.tri,.svcs,.hs","ring"],[".clients,.net,.joe,.spiral,.reel","cool"],["footer","off"],[".phero","bloom"],[".statement,.warp","spot"]];if(st.classList.contains("has-cursor")){const e=R.createElement("div");e.className="cursor",e.setAttribute("aria-hidden","true"),e.innerHTML='',R.body.appendChild(e);const t=R.createElement("div");t.className="glow",t.setAttribute("aria-hidden","true"),R.body.insertBefore(t,E("main"));const n=E(".cursor__ring",e),o=E(".cursor__dot",e),a=E(".cursor__label",e);let s=Et,h=bt,d=Et,c=bt,l=!1;addEventListener("pointermove",r=>{var v;if(r.pointerType!=="mouse")return;l||(l=!0,s=d=r.clientX,h=c=r.clientY),o.style.translate=`${r.clientX}px ${r.clientY}px`;const m=r.target.closest("a,button,summary,[data-cursor],input,label"),y=m&&m.closest("[data-cursor]");e.classList.toggle("is-view",!!y),e.classList.toggle("is-link",!!m&&!y),y&&(a.textContent=y.dataset.cursor);const g=r.target.closest("section,footer"),u=g?g.dataset.glowAs||(g.dataset.glowAs=((v=Fo.find(([p])=>g.matches(p)))==null?void 0:v[1])||"spot"):"spot";u!==t.dataset.g&&(t.dataset.g=u),t.classList.toggle("is-on",!!u&&u!=="off")},{passive:!0}),addEventListener("pointerdown",()=>e.classList.add("is-down")),addEventListener("pointerup",()=>e.classList.remove("is-down")),R.addEventListener("mouseleave",()=>{e.style.opacity=0,t.classList.remove("is-on")}),R.addEventListener("mouseenter",()=>{e.style.opacity=1});let f=!1;addEventListener("mouseout",r=>{(!r.relatedTarget&&r.target&&r.target.tagName==="IFRAME"||r.relatedTarget&&r.relatedTarget.tagName==="IFRAME")&&(f=!0,e.style.opacity=0,t.classList.remove("is-on"))},{passive:!0}),R.addEventListener("mouseover",r=>{r.target.tagName==="IFRAME"&&(f=!0,e.style.opacity=0,t.classList.remove("is-on"))},{passive:!0}),addEventListener("pointermove",r=>{f&&r.pointerType==="mouse"&&r.target.tagName!=="IFRAME"&&(f=!1,e.style.opacity=1)},{passive:!0}),Ot(()=>{s=at(s,Et,.2),h=at(h,bt,.2),d=at(d,Et,.07),c=at(c,bt,.07),n.style.translate=`${s.toFixed(1)}px ${h.toFixed(1)}px`,a.style.translate=`${s.toFixed(1)}px ${h.toFixed(1)}px`,t.style.transform=`translate3d(${d.toFixed(1)}px,${c.toFixed(1)}px,0)`})}nt&&!N&&(F("[data-magnetic]").forEach(e=>{e.addEventListener("pointermove",n=>{const o=e.getBoundingClientRect();e.style.transform=`translate3d(${Y((n.clientX-(o.left+o.width/2))*.25,-6,6)}px,${Y((n.clientY-(o.top+o.height/2))*.35,-6,6)}px,0)`}),e.addEventListener("pointerleave",()=>{e.style.transform=""})}),F(".btn").forEach(e=>{const t=n=>{const o=e.getBoundingClientRect();e.style.setProperty("--fx",n.clientX-o.left+"px"),e.style.setProperty("--fy",n.clientY-o.top+"px"),e.style.setProperty("--fs",2.2*Math.hypot(o.width,o.height)+"px")};e.addEventListener("pointerenter",t),e.addEventListener("pointerleave",t)}),F("[data-tilt]").forEach(e=>{e.addEventListener("pointermove",t=>{const n=e.getBoundingClientRect(),o=(t.clientX-n.left)/n.width,a=(t.clientY-n.top)/n.height;e.style.transform=`perspective(900px) rotateX(${((.5-a)*6).toFixed(2)}deg) rotateY(${((o-.5)*7).toFixed(2)}deg) translateY(-4px)`,e.style.setProperty("--mx",(o*100).toFixed(1)+"%"),e.style.setProperty("--my",(a*100).toFixed(1)+"%");const s=E(".portrait__glow,.pkg__glow",e);s&&(s.style.setProperty("--mx",(o*100).toFixed(1)+"%"),s.style.setProperty("--my",(a*100).toFixed(1)+"%"))}),e.addEventListener("pointerleave",()=>{e.style.transform=""})}),F("[data-spot]").forEach(e=>e.addEventListener("pointermove",t=>{const n=e.getBoundingClientRect();e.style.setProperty("--mx",t.clientX-n.left+"px"),e.style.setProperty("--my",t.clientY-n.top+"px")}))),F("[data-bot]").forEach(e=>{if("IntersectionObserver"in window?new IntersectionObserver(n=>n.forEach(o=>e.classList.toggle("is-vis",o.isIntersecting))).observe(e):e.classList.add("is-vis"),!nt||N)return;const t=E(".bot__look",e);addEventListener("pointermove",n=>{if(!e.classList.contains("is-vis"))return;const o=e.getBoundingClientRect(),a=n.clientX-(o.left+o.width/2),s=n.clientY-(o.top+o.height*.46),h=Math.hypot(a,s)||1,d=Math.min(1,h/520);B(t,"--lx",(a/h*d*9).toFixed(2)+"%"),B(t,"--ly",(s/h*d*6).toFixed(2)+"%")},{passive:!0})}),nt&&!N&&F("[data-tm]").forEach(e=>{e.addEventListener("pointermove",t=>{const n=e.getBoundingClientRect(),o=(t.clientX-n.left)/n.width,a=(t.clientY-n.top)/n.height;B(e,"--mx",(o*100).toFixed(1)+"%"),B(e,"--my",(a*100).toFixed(1)+"%"),B(e,"--try",((o-.5)*8).toFixed(2)+"deg"),B(e,"--trx",((.5-a)*6).toFixed(2)+"deg")}),e.addEventListener("pointerleave",()=>{B(e,"--try","0deg"),B(e,"--trx","0deg")})});let jt=null;const $t=()=>(jt||(jt=R.createElement("div"),jt.className="vtip",jt.setAttribute("aria-hidden","true"),R.body.appendChild(jt)),jt),De=(e,t)=>{const n=$t(),o=n.offsetWidth,a=n.offsetHeight;B(n,"--tx",Y(e+16,8,Z-o-8).toFixed(0)+"px"),B(n,"--ty",Y(t-a-14,8,k-a-8).toFixed(0)+"px")},ao=(e,t,n)=>{$t().textContent="";const o=R.createElement("b");o.textContent=e.dataset.tip;const a=R.createElement("span");a.textContent=e.dataset.tipL||"",$t().append(o,a),$t().classList.add("on"),De(t,n)},Qt=()=>{jt&&jt.classList.remove("on")};F("[data-tip]").forEach(e=>{e.addEventListener("pointerenter",t=>ao(e,t.clientX,t.clientY)),e.addEventListener("pointermove",t=>De(t.clientX,t.clientY)),e.addEventListener("pointerleave",Qt),e.addEventListener("focus",()=>{const t=e.getBoundingClientRect();ao(e,t.left+t.width/2,t.top)}),e.addEventListener("blur",Qt)}),addEventListener("scroll",()=>{jt&&Qt()},{passive:!0}),F("[data-lc]").forEach(e=>{const t=E("svg",e),n=E(".hit",e),o=E(".xh",e);if(!t||!n)return;const a=e.dataset.lc.split(";").map(f=>{const[r,m]=f.split(":");return{k:r,v:m.split(",").map(Number)}}),s=+n.dataset.x0,h=+n.dataset.x1,d=+n.dataset.n,c=t.viewBox.baseVal,l=f=>{const r=t.getBoundingClientRect(),m=(f.clientX-r.left)/r.width*c.width,y=Y(Math.round((m-s)/(h-s)*(d-1)),0,d-1),g=s+y*(h-s)/(d-1);o.setAttribute("x1",g),o.setAttribute("x2",g),e.classList.add("is-h"),$t().textContent="";const u=R.createElement("span");u.textContent=(e.dataset.lcX||"Week")+" "+y,$t().appendChild(u),a.slice().sort((v,p)=>p.v[y]-v.v[y]).forEach((v,p)=>{const i=R.createElement("div");i.className="r";const b=R.createElement("i");v.k==="Your brand"&&(b.className="me");const S=R.createElement("b");S.textContent=v.v[y]+"%";const L=R.createElement("span");L.textContent=v.k,i.append(b,S,L),$t().appendChild(i)}),$t().classList.add("on"),De(f.clientX,f.clientY)};n.addEventListener("pointermove",l),n.addEventListener("pointerenter",l),n.addEventListener("pointerleave",()=>{e.classList.remove("is-h"),Qt()})}),F("[data-sys]").forEach(e=>{const t=F(".n1",e),n=F(".ln2",e),o=F(".n2",e),a=l=>{t.forEach(r=>r.classList.toggle("on",r.dataset.n===l));const f=new Set;n.forEach(r=>{const m=r.dataset.from===l;if(r.classList.toggle("on",m),m){const y=+r.getAttribute("x2"),g=+r.getAttribute("y2");o.forEach(u=>{const v=E("circle",u);Math.abs(+v.getAttribute("cx")-y)<1&&Math.abs(+v.getAttribute("cy")-g)<1&&f.add(u)})}}),o.forEach(r=>r.classList.toggle("on",f.has(r)))};let s=0,h=!1,d=0;const c=()=>{h||a(t[s++%t.length].dataset.n)};At(e,()=>{const l=performance.now();l-d>2200&&(d=l,c())}),t.forEach(l=>{l.addEventListener("pointerenter",()=>{h=!0,a(l.dataset.n)}),l.addEventListener("pointerleave",()=>{h=!1}),l.addEventListener("focus",()=>{h=!0,a(l.dataset.n)}),l.addEventListener("blur",()=>{h=!1})})}),F("[data-net3]").forEach(e=>{const t=e.dataset.net3.split("|").map(u=>{const[v,p]=u.split(":");return{n:v,m:p.split(",")}}),n=(e.dataset.n3Say||"").split("|"),o=(e.dataset.n3Ag||"").split("|").map(u=>{const v=u.indexOf(":");return{n:+u.slice(0,v)||0,job:u.slice(v+1)}}),a=F(".n3b[data-b]",e),s=F("[data-n3-tab]",e),h=F(".n3",e),d=F(".net3__lk path",e),c=E("[data-n3-cap]",e),l=E("[data-n3-who]",e),f={};h.forEach(u=>{f[u.dataset.k]={n:E(".n3__t b",u).textContent,r:E(".n3__t i",u).textContent,img:E("img",u).getAttribute("src")}});let r=0,m=performance.now(),y=0;const g=u=>{r=u;const v=t[u];s.forEach((i,b)=>{i.classList.toggle("is-on",b===u),i.setAttribute("aria-selected",b===u?"true":"false"),i.style.removeProperty("--n3p")}),h.forEach(i=>i.classList.toggle("on",v.m.includes(i.dataset.k))),d.forEach(i=>{const b=v.m.includes(i.dataset.k);i.classList.remove("on"),b&&(i.getBoundingClientRect(),i.classList.add("on"))}),c&&(c.classList.remove("in"),c.textContent=n[u]||v.n,requestAnimationFrame(()=>requestAnimationFrame(()=>c.classList.add("in")))),l&&(l.innerHTML=v.m.map((i,b)=>f[i]?`
  • ${f[i].n}${f[i].r}
  • `:"").join(""));const p=o[u];a.forEach(i=>i.classList.toggle("on",!!p&&+i.dataset.b${p.n} agents${p.job}`)};s.forEach((u,v)=>u.addEventListener("click",()=>{y=performance.now(),m=y,g(v)})),g(0),N||At(e,()=>{const u=performance.now(),v=4200;if(u-y<9e3){m=u;return}const p=(u-m)/v;s[r]&&B(s[r],"--n3p",Math.min(1,p).toFixed(3)),p>=1&&(m=u,g((r+1)%t.length))})}),F("[data-cap]").forEach(e=>{const t=e.dataset.cap.split("|").map(m=>m.split(",").map(Number)),n=(e.dataset.capSay||"").split("|"),o=F("[data-cap-i]",e),a=F(".capd",e),s=E("[data-cap-cap]",e),h=["","When needed","In the box"];let d=0,c=performance.now(),l=0;const f=(m,y)=>{d=m;const g=t[m];o.forEach((u,v)=>{u.classList.toggle("is-on",v===m),u.setAttribute("aria-selected",v===m?"true":"false"),u.tabIndex=v===m?0:-1,u.style.removeProperty("--cpp")}),a.forEach((u,v)=>{const p=String(g[v]);if(u.dataset.v===p&&!y)return;u.dataset.v=p;const i=E("[data-st]",u);i&&(i.textContent=h[g[v]]),!y&&!N&&(u.classList.remove("pop"),u.offsetWidth,u.classList.add("pop"))}),s&&(s.classList.remove("in"),s.textContent=n[m]||"",requestAnimationFrame(()=>requestAnimationFrame(()=>s.classList.add("in"))))},r=m=>{l=performance.now(),c=l,m!==d&&f(m)};o.forEach((m,y)=>{m.addEventListener("click",()=>r(y)),nt&&m.addEventListener("pointerenter",()=>r(y)),m.addEventListener("keydown",g=>{const u={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[g.key];if(!u)return;g.preventDefault();const v=(d+u+o.length)%o.length;r(v),o[v].focus()})}),f(0,!0),N||At(e,()=>{const m=performance.now(),y=4600;if(m-l<9e3){c=m;return}const g=(m-c)/y;o[d]&&B(o[d],"--cpp",Math.min(1,g).toFixed(3)),g>=1&&(c=m,f((d+1)%t.length))})});{const e=F(".trio,.quad,.facts,.ticks,.steps-list,.faq,.disc");if(e.forEach(t=>[...t.children].forEach((n,o)=>n.style.setProperty("--i",o))),N||!("IntersectionObserver"in window))e.forEach(t=>t.classList.add("dt-in")),F(".steps-list li").forEach(t=>t.classList.add("on"));else{const t=new IntersectionObserver(o=>o.forEach(a=>{a.isIntersecting&&(a.target.classList.add("dt-in"),t.unobserve(a.target))}),{threshold:.15,rootMargin:"0px 0px -10% 0px"});e.forEach(o=>t.observe(o));const n=new IntersectionObserver(o=>o.forEach(a=>{a.isIntersecting&&(a.target.classList.add("on"),n.unobserve(a.target))}),{rootMargin:"0px 0px -32% 0px"});F(".steps-list li").forEach(o=>n.observe(o))}F(".disc").forEach(t=>{const n=F(".disc__row",t);let o=-1;mt.push(()=>{const a=dt(t);if(a.bottom<0||a.top>k)return;let s=-1,h=k*.28;n.forEach((d,c)=>{const l=d.getBoundingClientRect(),f=Math.abs(l.top+l.height/2-k*.5);fd.classList.toggle("on",c===s)))})}),nt&&!N&&F(".trio__c").forEach(t=>t.addEventListener("pointermove",n=>{const o=t.getBoundingClientRect();t.style.setProperty("--mx",(n.clientX-o.left).toFixed(0)+"px"),t.style.setProperty("--my",(n.clientY-o.top).toFixed(0)+"px")},{passive:!0}))}F(".sticky-col").forEach(e=>{let t=null;for(const r of e.parentElement.children)if(r!==e&&(t=r.matches(".disc,.steps-list,.faq")?r:r.querySelector(".disc,.steps-list,.faq"),t))break;if(!t)return;const n=t.matches(".faq")?F("details",t):[...t.children];if(n.length<3)return;const o=r=>String(r).padStart(2,"0");e.insertAdjacentHTML("beforeend",``);const a=e.lastElementChild,s=E(".sk__n",a),h=E(".sk__t",a),d=E(".sk__bar i",a),c=r=>{const m=r.querySelector("h3, summary");return m?m.textContent.trim():""};let l=-1,f=-1;mt.push(()=>{if(Z<1024)return;const r=dt(t);if(r.bottom<-k*.2||r.top>k)return;const m=k*.5;let y=0;n.forEach((u,v)=>{u.getBoundingClientRect().top.002&&(f=g,d.style.transform=`scaleX(${g.toFixed(3)})`),y!==l&&(l=y,s.innerHTML=`${o(y+1)}`,h.textContent=c(n[y]))})}),F("[data-pshow]").forEach(e=>{const t=F(".prow",e),n=F(".pbag",e),o=E(".pshow__in",e),a=E(".pshow__bags",e),s=E("[data-ps-n]",e),h=E("[data-ps-name]",e),d=E("[data-ps-d]",e);let c=-1,l=0,f=null;const r=u=>{if(u===c)return;const v=c;c=u,f&&(f.set(u),N&&f.frame(performance.now(),!0)),t.forEach((i,b)=>i.classList.toggle("on",b===u)),n.forEach((i,b)=>{i.classList.toggle("on",b===u),i.classList.toggle("is-prev",b=0&&+t[v].dataset.days||0,b=performance.now(),S=L=>{const M=Y((L-b)/600,0,1);d.textContent=Math.round(i+(p-i)*(1-Math.pow(1-M,3))),M<1&&requestAnimationFrame(S)};requestAnimationFrame(S)}};if(r(0),"IntersectionObserver"in window){const u=new IntersectionObserver(v=>v.forEach(p=>{p.isIntersecting&&(p.target.classList.add("seen"),u.unobserve(p.target))}),{threshold:.3});t.forEach(v=>u.observe(v))}else t.forEach(u=>u.classList.add("seen"));mt.push(()=>{if(performance.now()-l<900)return;const u=dt(e);if(u.bottom<0||u.top>k)return;let v=0,p=1e9;t.forEach((i,b)=>{const S=i.getBoundingClientRect(),L=Math.abs(S.top+S.height/2-k*.5);L{u.addEventListener("pointerenter",()=>{l=performance.now(),r(v)}),u.addEventListener("focusin",()=>r(v))});const m=e.dataset.bag,y=E(".pshow__gl",e),g=()=>{const u=t.map(p=>{const i=E("h3",p).textContent.trim(),b=i.split(" ");return{name:i,lines:b.length>1?[b[0],b.slice(1).join(" ")]:b,days:+p.dataset.days||0,items:F(".prow__list li",p).map(S=>S.textContent.trim())}}),v=R.createElement("script");v.src=m,v.async=!0,v.onload=()=>{const p=['100px "PolySans Bulky"','600 20px "Space Grotesk"','500 20px "Space Grotesk"'].map(i=>R.fonts&&R.fonts.load?R.fonts.load(i):0);Promise.all(p).catch(()=>0).then(()=>{try{f=window.DozBag&&window.DozBag.create(y,{pk:u,fill:.74,still:N,dpr:yt?1.5:2})}catch{f=null}if(f){if(f.set(Math.max(0,c)),f.frame(performance.now(),N),e.classList.add("is-gl"),f.warm){const i=window.requestIdleCallback||(L=>setTimeout(L,90));let b=0;const S=()=>{!f||b>=t.length||(f.warm(b++),i(S,{timeout:500}))};i(S,{timeout:500})}y.addEventListener("webglcontextlost",i=>{i.preventDefault(),e.classList.remove("is-gl"),f=null},{once:!0}),N||At(o,()=>{if(f){if(nt){const i=dt(o);f.pointer(Y((Et-(i.left+i.width/2))/i.width*2,-1,1),Y((bt-(i.top+i.height/2))/i.height*2,-1,1))}f.frame(performance.now())}})}})},R.head.appendChild(v)};if(m&&y&&o&&!pt&&!ut()&&"IntersectionObserver"in window){const u=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&(u.disconnect(),g())},{rootMargin:"400px 0px"});u.observe(o)}if(nt&&o&&a&&!N){let u=0,v=0;At(e,()=>{if(f)return;const p=dt(o),i=Y((bt-(p.top+p.height/2))/p.height,-1,1)*-8,b=Y((Et-(p.left+p.width/2))/p.width,-1,1)*14;u=at(u,i,.06),v=at(v,b,.06),B(a,"--rx",u.toFixed(2)+"deg"),B(a,"--ry",v.toFixed(2)+"deg")})}}),F(".pkgs[data-bag]").forEach(e=>{if(!nt||N||pt||ut())return;const t=F(".pkg",e).map(d=>{const c=E(".pkg__img",d),l=c&&/pack-(\d)/.exec(c.getAttribute("src")||"");return l?{c:d,im:c,k:+l[1]-1}:null}).filter(Boolean);if(!t.length)return;const n=Array.from({length:6},()=>({name:"",lines:[""],items:[]}));t.forEach(d=>{const c=E("h3",d.c).textContent.trim(),l=c.split(" "),f=/(\d+) business days/.exec(d.c.textContent);n[d.k]={name:c,lines:l.length>1?[l[0],l.slice(1).join(" ")]:l,days:f?+f[1]:0,items:F("ul li",d.c).map(r=>r.textContent.trim())}});let o=null,a=null,s=!1;const h=()=>{if(s)return;s=!0;const d=R.createElement("script");d.src=e.dataset.bag,d.async=!0,d.onload=()=>Promise.all(['100px "PolySans Bulky"','600 20px "Space Grotesk"','500 20px "Space Grotesk"'].map(c=>R.fonts&&R.fonts.load?R.fonts.load(c):0)).catch(()=>0).then(()=>{a=R.createElement("canvas");const c=Math.min(devicePixelRatio||1,2),l=t[0].im.getBoundingClientRect();a.width=Math.round(Math.max(120,l.width)*c*1.25),a.height=Math.round(a.width*1.3);try{o=window.DozBag&&window.DozBag.create(a,{pk:n,fill:.8,fixed:!0,ts:512})}catch{o=null}o&&t.forEach(f=>{const r=R.createElement("canvas");r.className="pkg__cv",r.width=a.width,r.height=a.height,r.setAttribute("aria-hidden","true"),f.im.insertAdjacentElement("afterend",r),f.cv=r,f.cx=r.getContext("2d"),f.y=-.3,f.p=.06,f.ty=-.3,f.tp=.06,f.drawn=!1,At(f.c,()=>{const m=dt(f.c),y=m.left+m.width-70,g=m.top+90;f.ty=-.3+Y((Et-y)/(Z*.45),-1,1)*.95,f.tp=.06+Y((bt-g)/(k*.5),-1,1)*.28;const u=f.ty-f.y,v=f.tp-f.p;f.drawn&&Math.abs(u)<.0015&&Math.abs(v)<.0015||(f.y+=u*.09,f.p+=v*.09,o.pose(f.k,f.y,f.p,0),f.cx.clearRect(0,0,f.cv.width,f.cv.height),f.cx.drawImage(a,0,0),f.drawn||(f.drawn=!0,f.c.classList.add("is-3d")))})})}),R.head.appendChild(d)};new IntersectionObserver((d,c)=>{d.some(l=>l.isIntersecting)&&(c.disconnect(),h())},{rootMargin:"300px 0px"}).observe(e)}),F("[data-finding]").forEach(e=>{if(N||!("IntersectionObserver"in window))return;const t=F("tbody tr",e),n=t.map(p=>F("i",p)),o=E(".finding__scan",e),a=E(".finding__tw",e),s=E("[data-fd-st]",e),h=E("[data-fd-n]",e),d=E("[data-fd-src]",e),c=E("[data-fd-bar]",e),l=n.reduce((p,i)=>p+i.length,0),f=d?d.textContent:"",r=s?s.textContent:"";let m=[],y=!1;const g=(p,i)=>m.push(setTimeout(i,p)),u=()=>{m.forEach(clearTimeout),m=[],y=!1,e.classList.remove("is-scan","is-done"),e.classList.add("is-run"),t.forEach(p=>p.classList.remove("scan")),n.flat().forEach(p=>p.classList.remove("in")),h&&(h.textContent=`0/${l}`),d&&(d.textContent=""),s&&(s.textContent="Asking ChatGPT, Gemini, Perplexity"),c&&(c.style.transform="scaleX(0)")},v=()=>{u(),y=!0,e.classList.add("is-scan");let p=0,i=0;t.forEach((S,L)=>{const M=350+L*820;g(M,()=>{t.forEach(P=>P.classList.toggle("scan",P===S)),o&&a&&(o.style.top=S.offsetTop+S.offsetHeight/2+"px"),s&&(s.textContent=`Question ${L+1} of ${t.length}`)}),n[L].forEach((P,V)=>g(M+260+V*150,()=>{P.classList.add("in"),i++,P.classList.contains("y")&&p++,h&&(h.textContent=`${p}/${l}`),c&&(c.style.transform=`scaleX(${(i/l).toFixed(3)})`)}))});const b=350+t.length*820+200;g(b,()=>{e.classList.remove("is-scan"),e.classList.add("is-done"),t.forEach(S=>S.classList.remove("scan")),s&&(s.textContent=r)}),d&&[...f].forEach((S,L)=>g(b+250+L*22,()=>{d.textContent=f.slice(0,L+1)}))};u(),new IntersectionObserver(p=>p.forEach(i=>{i.isIntersecting&&!y?v():!i.isIntersecting&&y&&i.boundingClientRect.top>0&&u()}),{threshold:.45}).observe(e)}),F(".logos").forEach(e=>{const t=F(".logo-cell",e);if(!t.length)return;if(N){t.forEach(d=>d.classList.add("in"));return}e.classList.add("is-js");const n=()=>getComputedStyle(e).gridTemplateColumns.split(" ").length||6;let o=null,a=0;const s=()=>{const d=n();o=t.map((c,l)=>({c,k:l%d+Math.floor(l/d)*1.6+l%2*.3})).sort((c,l)=>c.k-l.k).map(c=>c.c)},h=()=>{if(a>=t.length)return;const d=dt(e);if(d.top>k)return;o||s();const c=Y((k*.95-d.top)/(k*.45+d.height*.55),0,1),l=Math.ceil(c*t.length);for(;a{f.style.transitionDelay=""},1400),a++}};mt.push(h),nt&&t.forEach(d=>{d.addEventListener("pointermove",c=>{const l=d.getBoundingClientRect();B(d,"--ty",(((c.clientX-l.left)/l.width-.5)*16).toFixed(2)+"deg"),B(d,"--tx",(((c.clientY-l.top)/l.height-.5)*-16).toFixed(2)+"deg")}),d.addEventListener("pointerleave",()=>{B(d,"--ty","0deg"),B(d,"--tx","0deg")})})});const ro=F("[data-px]");if(ro.length&&!N&&!Mt){const e=new Set,t=new IntersectionObserver(o=>o.forEach(a=>a.isIntersecting?e.add(a.target):e.delete(a.target)),{rootMargin:"10% 0px"});ro.forEach(o=>t.observe(o));const n=()=>{e.forEach(o=>{const a=dt(o.parentElement),s=Y((a.top+a.height/2-k/2)/k,-1,1),h=o._amp||(o._amp=o.closest(".portrait")?.025:.07);o.style.transform=`translate3d(0,${(-s*a.height*h).toFixed(2)}px,0)`})};mt.push(n)}const io=F("[data-lift],[data-pin],[data-drift]");if(io.length&&!N&&!Mt){const e=new Set,t=new IntersectionObserver(s=>s.forEach(h=>h.isIntersecting?e.add(h.target):e.delete(h.target)),{rootMargin:"25% 0px"});io.forEach(s=>{s._d=+s.dataset.lift||0,s._p=s.hasAttribute("data-pin")?+s.dataset.pin||.05:0,s._x=+s.dataset.drift||0,t.observe(s)});const n=()=>Math.min(k,1e3),o=s=>{let h=s._o;if(!h||h.v!==Ut){let d=0,c=s;for(;c;)d+=c.offsetTop,c=c.offsetParent;h=s._o={t:d,h:s.offsetHeight,v:Ut}}return h},a=()=>e.forEach(s=>{const h=o(s),d={top:h.t-Dt,height:h.h},c=Y((d.top+d.height/2-k/2)/k,-1,1);if(s._d){const l=`0 ${(-Math.max(0,c)*n()*s._d).toFixed(1)}px`;s._tv!==l&&(s._tv=l,s.style.translate=l)}if(s._p){const l=(-c*d.height*s._p).toFixed(1)+"px";s._pv!==l&&(s._pv=l,s.style.setProperty("--pi",l))}if(s._x){const l=`${(-c*s._x*Z).toFixed(1)}px 0`;s._xv!==l&&(s._xv=l,s.style.translate=l)}});mt.push(a),a()}const ue=E(".phero:not(.phero--contact)");if(ue&&!N&&!Mt){const e=E(".phero__title",ue),t=E(".phero__lead",ue),n=E(".label",ue);let o=-1;mt.push(a=>{const s=Math.min(a,k*1.3);if(Math.abs(s-o)<.5)return;o=s;const h=K(k*.05,k*.62,s);e&&(B(e,"--py",(-s*.14).toFixed(1)+"px"),B(e,"--po",(1-h).toFixed(3))),n&&(B(n,"--py",(-s*.2).toFixed(1)+"px"),B(n,"--po",(1-h).toFixed(3))),t&&B(t,"--po",(1-K(k*.25,k*.8,s)*.7).toFixed(3))})}if(!N&&!Mt){const e=[[".hero__title",.5],[".hero__claim",.32],[".hero__cta",.18],[".hero__foot",.08],[".hero__morph",-.42],[".hero__lite",-.3],[".closing .label",.55],[".closing__title",.34],[".closing__body",.14],[".closing__contact",.06],[".closing .mgrad",-.45],[".closing__stage .planet",-.14],[".phero .mgrad",-.4],[".phero:not(.phero--contact) .grid",.06],[".platform .mgrad",-.35],[".tri .mgrad",-.35],[".joe .label",.3],[".wk-gsec .label",.25],[".net .label",.25]],t=[],n=(o,a)=>{o._par!==void 0||o.closest(".menu,footer")||(o._par=a,o._up=o.classList.contains("label"),o.classList.add("par"),t.push(o))};if(e.forEach(([o,a])=>F(o).forEach(s=>n(s,a))),F("[data-par]").forEach(o=>n(o,+o.dataset.par||0)),t.length){const o=new Map;t.forEach(c=>{const l=c.closest("section")||c.parentElement;o.has(l)||o.set(l,[]),o.get(l).push(c)});const a=new Set,s=new IntersectionObserver(c=>c.forEach(l=>l.isIntersecting?a.add(l.target):a.delete(l.target)),{rootMargin:"30% 0px"});o.forEach((c,l)=>s.observe(l));const h=c=>{let l=c._po;if(!l||l.v!==Ut){let f=0,r=c;for(;r;)f+=r.offsetTop,r=r.offsetParent;l=c._po={t:f,h:c.offsetHeight,v:Ut}}return l},d=()=>a.forEach(c=>{const l=h(c),f=Math.min(k,1e3)*.5;let r=Y((l.t+l.h/2-(Dt+k/2))/((l.h+k)/2),-1,1);r>0&&(r*=.45),o.get(c).forEach(m=>{const y=m._up&&r>0?0:r,g=(y*m._par*f).toFixed(1)+"px";m._pv!==g&&(m._pv=g,m.style.setProperty("--pz",g))})});mt.push(d),d()}}const me=E(".alter-p");if(me){const e=E(".alter",me),t=F(".alter-sw__b"),n=E("[data-alter-say]"),o=r=>E(`.alter__l[data-c="${r}"]`,e),a={a:E(".alter__s-a",me),s:E(".alter__s-s",me)},s={a:"--alter",s:"--astro"},h={a:"Joe\u2019s alter ego, the agency guy",s:"The astronaut"};let d=null;const c=r=>new Promise(m=>{const y=a[r];if(!y)return m();y.loading="eager";const g=()=>{const u=y.currentSrc||y.src;u&&e.style.setProperty(s[r],`url("${u}")`),m()};y.complete&&y.naturalWidth?g():(y.addEventListener("load",g,{once:!0}),y.addEventListener("error",()=>m(),{once:!0}))}),l=()=>{c("a"),c("s")};t.forEach(r=>{r.addEventListener("pointerenter",l,{once:!0}),r.addEventListener("focus",l,{once:!0})}),ke(l,6e3);const f=r=>{d=r,t.forEach(m=>m.setAttribute("aria-pressed",String(m.dataset.c===(r||"j")))),["a","s"].forEach(m=>o(m).classList.toggle("on",m===r)),n&&(n.textContent=r?h[r]+", over Joe\u2019s portrait":"Joe\u2019s portrait")};t.forEach(r=>r.addEventListener("click",async()=>{const m=r.dataset.c==="j"?null:r.dataset.c;d!==m&&(m&&await c(m),f(m))}))}const co=F("[data-orb]");if(co.length&&!N){const e=new Set,t=new IntersectionObserver(s=>s.forEach(h=>h.isIntersecting?e.add(h.target):e.delete(h.target)),{rootMargin:"20% 0px"});co.forEach(s=>{s._k=+s.dataset.orb||0,t.observe(s)});let n=0,o=0;const a=()=>e.forEach(s=>{const h=dt(s.parentElement),d=s._k,c=h.top+h.height/2-k/2,l=`translate3d(${(n*d*120).toFixed(1)}px,${(-c*d*.22+o*d*90).toFixed(1)}px,0)`;s._tv!==l&&(s._tv=l,s.style.transform=l)});nt&&Ot(()=>{e.size&&(n=at(n,Et/Z-.5,.05),o=at(o,bt/k-.5,.05),a())})}if(!N){const e=[];if(F(".mq").forEach(t=>e.push({el:t,at:t,flat:!0})),e.length){const t=new Set,n=new IntersectionObserver(a=>a.forEach(s=>{const h=e.find(d=>d.at===s.target||d.el===s.target);h&&(s.isIntersecting?t.add(h):t.delete(h))}),{rootMargin:"10% 0px"});e.forEach(a=>n.observe(a.at));const o=()=>{t.forEach(a=>{const s=dt(a.at),h=s.left+s.width/2,d=s.top+s.height/2;let c,l;if(nt){const f=Y((Et-h)/(Z*.45),-1,1),r=Y((bt-d)/(k*.45),-1,1);c=50+f*34,l=50+r*34}else c=34,l=50-Y((d-k*.2)/k,-1,1)*28;a.x=a.x===void 0?c:at(a.x,c,.08),a.y=a.y===void 0?l:at(a.y,l,.08),B(a.el,"--lx",a.x.toFixed(1)+"%"),B(a.el,"--ly",a.y.toFixed(1)+"%")})};nt?Ot(()=>{t.size&&o()}):e.forEach(a=>{B(a.el,"--lx","34%"),B(a.el,"--ly","42%")})}}await xt(),F("[data-statement]").forEach(e=>{const t=F(".sw",e),n=E(".statement__stage > .wrap",e);if(N){t.forEach(c=>c.classList.add("on"));return}let o=-1;const a=()=>{const c=dt(e);return(k-c.top)/k};mt.push(()=>{const c=dt(e);if(c.bottom<0||c.top>k)return;const l=a(),f=c.height/k,r=Math.round(K(.6,1.35,l)*t.length);r!==o&&(o=r,t.forEach((m,y)=>m.classList.toggle("on",y({el:c,i:l,z:+c.dataset.sv||.6,ico:E(".ico",c),ax:0,ay:0,x:0,y:0})),h=()=>s.forEach(c=>{const l=c.el.offsetParent||e;c.vis=c.el.offsetWidth>0,c.ax=c.el.offsetLeft+c.el.offsetWidth/2-l.clientWidth/2,c.ay=c.el.offsetTop+c.el.offsetHeight/2-l.clientHeight/2});h(),_t(h);let d=Math.random()*10;s.length&&At(e,c=>{d+=c/1e3;const l=dt(e),f=a(),r=l.height/k;s.forEach(m=>{if(!m.vis)return;const y=m.i*.07,g=K(.35+y,1.05+y,f),u=Math.pow(K(r-.8+m.i*.03,r-.22+m.i*.02,f),1.4),v=Math.hypot(m.ax,m.ay)||1,p=m.ax/v,i=m.ay/v,b=(.3+.7*g)*(1+u*(1.4+m.z*1.6)),S=(1-g)*.85,L=-m.ax*S+(nt?(Et/Z-.5)*-46*m.z:0)+Math.sin(d*.45+m.i*1.7)*9*m.z+p*u*Z*.75,M=-m.ay*S+(1.3-f)*120*m.z+Math.cos(d*.55+m.i)*11*m.z+(nt?(bt/k-.5)*-30*m.z:0)+i*u*k*.8;m.x=at(m.x,L,u>.01?.3:.1),m.y=at(m.y,M,u>.01?.3:.1),B(m.el,"--tx",m.x.toFixed(1)+"px"),B(m.el,"--ty",m.y.toFixed(1)+"px"),B(m.el,"--sc",b.toFixed(4)),B(m.el,"--rz",(u*(m.i%2?1:-1)*70).toFixed(1)+"deg"),B(m.el,"--o",(K(.3+y,.55+y,f)*(1-K(r-.2,r-.02,f))).toFixed(3)),B(m.el,"--lo",(K(.95+y,1.1+y,f)*(1-K(r-.85,r-.65,f))).toFixed(3)),m.ico&&(m.ico._k=b)})},"20% 0px")});const Ct=E("[data-warp]");let Lt=0;if(Ct){const e=F(".step",Ct),t=E(".warp__content",Ct),n=E(".warp__words",Ct),o=F(".ww",Ct),a=E(".warp__flash",Ct);if(N)e.forEach(s=>s.classList.add("on"));else{let s=!1;const h=()=>{const f=dt(Ct);if(f.bottom<-k||f.top>k*1.5)return;Lt=Y(-f.top/Math.max(1,f.height-k),0,1),e.forEach((p,i)=>p.classList.toggle("on",Lt>.03+i*.08)),B(t,"--co",(1-K(.4,.5,Lt)).toFixed(3)),B(t,"--ci",K(.4,1,Y((k-f.top)/k,0,1)).toFixed(3)),o.forEach((p,i)=>B(p,"--f",K(.4+i*.07,.54+i*.07,Lt).toFixed(3)));const r=K(.74,.99,Lt),m=nt?772:600,y=(Math.pow(r,1.7)*m).toFixed(1),g=(1-K(nt?.93:.88,nt?1:.97,Lt)).toFixed(3),u=+y<.05?"none":`scale(${(800/(800-+y)).toFixed(3)})`;n&&n._wz!==u&&(n._wz=u,n.style.transform=u),n&&n._wo!==g&&(n._wo=g,n.style.opacity=g),B(a,"--fl",(K(.86,.93,Lt)*(1-K(.93,.995,Lt))*.55).toFixed(3));const v=Lt>.8;if(v&&!s)try{U.boost+=.04}catch{}s=v};mt.push(h);const d=F(".warp__shapes .shape",Ct),c=Math.PI*2;let l=0;d.length&&At(Ct,f=>{l+=f/1e3;const r=Z<768,m=Z>=1024,y=800,g=d.length,u=m?.255*Z:0,v=m?-.15*k:r?-.29*k:-.27*k,p=m?Math.min(.18*Z,340):r?.34*Z:.3*Z,i=m?.42:.36,b=Math.sqrt(1-i*i),S=l*.2+Lt*2.6;d.forEach((L,M)=>{const P=S+M*c/g,V=Math.cos(P)*p,I=Math.sin(P)*p,z=I*b,A=I*i+Math.sin(l*.7+M*2)*6,C=y/(y-z),O=K(.4+M*.03,.82+M*.02,Lt),et=O*690-(1-K(0,.1,Lt))*600,ot=y/(y-et),W=(u+V*C)*ot,D=(v+A*C)*ot,x=C*ot,w=`translate3d(-50%,-50%,0) translate3d(${W.toFixed(1)}px,${D.toFixed(1)}px,0) scale(${x.toFixed(3)}) rotate(${(Math.sin(l*.4+M)*14+O*120*(M%2?1:-1)).toFixed(1)}deg)`;L._tf!==w&&(L._tf=w,L.style.transform=w),L._k=x;const T=(I/p+1)/2,q=String(10+Math.round(T*20+O*40));L.style.zIndex!==q&&(L.style.zIndex=q);const _=K(0,.08,Lt)*(1-K(.72,.88,Lt+M*.01))*(.42+.58*Math.max(T,O)),j=_.toFixed(3);L._op!==j&&(L._op=j,L.style.opacity=j),B(L,"visibility",_<.005?"hidden":"visible")})},"10% 0px")}}const ge=e=>F(".jn__media",e).forEach(t=>{if(t._jn)return;t._jn=1;const n=E("video",t),o=E("img",t),a=t.closest(".jn__card"),s=()=>{t.classList.add("is-ready")},h=()=>{t.classList.add("is-missing")},d=E(".jn__spin",t),c=d?Te(d):()=>{};if(o&&(o.addEventListener("load",()=>s()),o.addEventListener("error",()=>{const f=o.dataset.orig;f&&o.getAttribute("src")!==f?(o.removeAttribute("srcset"),o.src=f):h()}),o.complete&&o.getAttribute("src")&&(o.naturalWidth?s(o.naturalWidth,o.naturalHeight):h()),o.dataset.jsrc&&!o.getAttribute("src"))){const f=()=>{const m=(o.dataset.jsrcset||"").split(",").map(u=>u.trim().split(" ")).filter(u=>u[0]).map(u=>[u[0],parseInt(u[1])||0]),y=(t.clientWidth||320)*Math.min(2,devicePixelRatio||1);m.sort((u,v)=>u[1]-v[1]);const g=m.find(u=>u[1]>=y)||m[m.length-1];return g?g[0]:o.dataset.jsrc},r=()=>{const m=f(),y=()=>{o.src=m};if(l(),!window.fetch||!window.ReadableStream||!window.URL){y();return}fetch(m,Pt?{signal:Pt.signal}:void 0).then(g=>{if(!g.ok)throw 0;return Xe(g,c)}).then(g=>{const u=URL.createObjectURL(g);o.addEventListener("load",()=>setTimeout(()=>URL.revokeObjectURL(u),4e3),{once:!0}),o.src=u},y)};if("IntersectionObserver"in window){const m=new IntersectionObserver(y=>{y[0].isIntersecting&&(m.disconnect(),r())},{rootMargin:"500px 0px"});m.observe(t)}else r()}if(n){n.addEventListener("loadeddata",()=>{c(1),s()}),n.addEventListener("error",h),n.addEventListener("progress",()=>{try{n.buffered.length&&c(Math.min(.99,n.buffered.end(0)/Math.min(n.duration||1,1)))}catch{}});const f=()=>{n.getAttribute("src")||(n.preload="metadata",n.src=n.dataset.src,n.load())};if("IntersectionObserver"in window){const y=new IntersectionObserver(g=>{g[0].isIntersecting&&(f(),y.disconnect())},{rootMargin:"400px 0px"});y.observe(t)}else f();const r=()=>{if(!t.classList.contains("is-ready"))return;const y=n.play();y&&y.catch(()=>{}),t.classList.add("is-playing")},m=()=>{n.pause(),t.classList.remove("is-playing")};nt?(a.addEventListener("mouseenter",r),a.addEventListener("mouseleave",m)):"IntersectionObserver"in window&&!N&&!yt&&new IntersectionObserver(y=>y.forEach(g=>g.intersectionRatio>.6?r():m()),{threshold:[0,.6]}).observe(t)}const l=()=>setTimeout(()=>{!t.classList.contains("is-ready")&&!(o.complete&&o.naturalWidth)&&h()},25e3);o&&!o.dataset.jsrc&&l()}),Zt=e=>F(".jn__x",e).forEach(t=>t.classList.toggle("is-clamped",t.scrollHeight>t.clientHeight+2)),vt=E("[data-jn-wall]");let qe=()=>{};const Ht={};{const e=E("#jn-data");if(e)try{JSON.parse(e.textContent).forEach(t=>{Ht[t.s]=t})}catch{}}let ve=()=>[],je=()=>Promise.resolve(),oe=()=>!1;const Nt=(E("[data-jn-more]")||{}).dataset&&E("[data-jn-more]").dataset.jnSrc||"";if(vt){let e=F(".jn",vt),t="all",n=0,o=0;const a=()=>e.filter(L=>t==="all"||(t==="video"?/video|youtube/.test(L.dataset.type):L.dataset.type===t)),s=()=>{o=0,vt.style.minHeight=vt.offsetHeight+"px";const L=parseInt(getComputedStyle(vt).getPropertyValue("--jn-cols"))||1,M=a();if(e.forEach(I=>I.classList.toggle("is-off",!M.includes(I))),F(".jn-col",vt).forEach(I=>I.remove()),L<2){vt.classList.remove("is-cols"),e.forEach(I=>vt.appendChild(I)),n=1,vt.style.minHeight="";return}vt.classList.add("is-cols"),n=L;const P=Array.from({length:L},()=>{const I=R.createElement("div");return I.className="jn-col",vt.appendChild(I),I}),V=P.map(()=>0);M.forEach(I=>{let z=0;for(let A=1;A!M.includes(I)).forEach(I=>P[0].appendChild(I)),vt.style.minHeight=""};qe=()=>{o||(o=requestAnimationFrame(s))},ge(vt),Zt(vt),s(),R.fonts&&R.fonts.ready&&R.fonts.ready.then(()=>{Zt(vt),qe()});let h=innerWidth;_t(()=>{innerWidth!==h&&(h=innerWidth,Zt(vt),qe())});const d=E("[data-jn-more]"),c=E("#jn-rest"),l=d&&d.parentNode;let f={};try{f=JSON.parse(vt.dataset.jnTotal||"{}")}catch{}let r=null;const m=L=>requestAnimationFrame(()=>requestAnimationFrame(()=>L.forEach(M=>M.classList.add("in")))),y=(L,M)=>{const P=scrollY;M&&(e.forEach(V=>V.remove()),e=[]),L.forEach((V,I)=>{V.style.setProperty("--rv-delay",I%8*60+"ms"),vt.appendChild(V),e.push(V)}),ge(vt),Zt(vt),s(),m(L),!M&&Math.abs(scrollY-P)>1&&scrollTo(0,P),it.cur=it.target=scrollY},g=()=>{var M;const L=E("[data-jn-count]");L&&(L.textContent=String(c||!Nt?a().length:(M=f[t])!=null?M:a().length).padStart(2,"0"))};oe=()=>c?c.content.children.length>0:!!Nt&&a().length<(f[t]||0);const u=()=>{l&&(l.hidden=!oe())};let v=null;const p=(L,M)=>`${Nt}?format=page&kind=${M}&offset=${L}&limit=12`,i=()=>{if(v||c||!Nt||r||!oe())return;const L=a().length,M=t;v={off:L,k:M,p:fetch(p(L,M)).then(P=>P.ok?P.json():Promise.reject(P.status))},v.p.catch(()=>{v=null})},b=(L,M)=>r||(r=(!M&&v&&v.off===L&&v.k===t?v.p:fetch(p(L,t)).then(P=>P.ok?P.json():Promise.reject(P.status))).then(P=>{(P.posts||[]).forEach(I=>{Ht[I.s]=I}),f[t]=P.total;const V=R.createElement("div");V.innerHTML=P.html,y(Array.from(V.children),M)}).catch(()=>{}).finally(()=>{r=null,v=null,d&&d.classList.remove("is-busy"),u(),g(),S&&i()}));je=()=>{if(c){const L=Array.from(c.content.children).slice(0,12);return y(L,!1),u(),Promise.resolve()}return Nt?(d&&d.classList.add("is-busy"),b(a().length,!1)):Promise.resolve()},ve=()=>a().map(L=>L.dataset.slug),d&&d.addEventListener("click",()=>je());let S=!1;d&&"IntersectionObserver"in window&&new IntersectionObserver(L=>L.forEach(M=>{S=M.isIntersecting,S&&i()}),{rootMargin:"900px 0px"}).observe(l),F("[data-jn-filter]").forEach(L=>L.addEventListener("click",()=>{if(t!==L.dataset.jnFilter){if(t=L.dataset.jnFilter,F("[data-jn-filter]").forEach(M=>{const P=M===L;M.classList.toggle("is-on",P),M.setAttribute("aria-pressed",P)}),!c&&Nt){vt.classList.add("is-loading"),b(0,!0).then(()=>vt.classList.remove("is-loading"));return}g(),u(),s(),a().forEach((M,P)=>{M.classList.remove("in"),M.style.setProperty("--rv-delay",P%8*60+"ms"),requestAnimationFrame(()=>requestAnimationFrame(()=>M.classList.add("in")))})}})),u()}const Vt=E(".jn-row");Vt&&(ge(Vt),Zt(Vt),/^https?:$/.test(location.protocol)&&!zt&&window.fetch&&fetch("/journal?format=page&limit=3",{credentials:"same-origin"}).then(e=>e.ok&&/json/.test(e.headers.get("content-type")||"")?e.json():null).then(e=>{if(!e||!e.html)return;const t=R.createElement("div");t.innerHTML=e.html;const n=F("article.jn",t),o=F("article.jn",Vt);if(!n.length||n.map(s=>s.dataset.slug).join()===o.map(s=>s.dataset.slug).join())return;(e.posts||[]).forEach(s=>{Ht[s.s]=s});const a=o.some(s=>s.classList.contains("in"));Vt.replaceChildren(...n),ge(Vt),Zt(Vt),a||N?n.forEach(s=>s.classList.add("in")):ae(n,s=>s.classList.add("in"),{rootMargin:"0px 0px -8% 0px"})}).catch(()=>{}));const ct=E("[data-jm]");if(ct&&ct.showModal){const e=E("[data-jm-media]",ct),t=E(".jm__in",ct),n=R.title;let o=null,a=!1,s=null;const h=()=>{const g=ve(),u=g.indexOf(o);E("[data-jm-prev]",ct).disabled=u<=0,E("[data-jm-next]",ct).disabled=u<0||u>=g.length-1&&!oe()},d=g=>{const u=Ht[g];if(!u)return;o=g;const v=u.m||{},p=v.type==="image"?"Image":"Video";if(e.innerHTML="",t.classList.toggle("is-text",!v.src),v.src){const i=R.createElement("span");i.className="jn__ph",i.innerHTML=`${p}`,v.w&&v.h&&(i.style.aspectRatio=v.w+"/"+v.h);let b;v.type==="video"?(b=R.createElement("video"),Object.assign(b,{muted:!0,loop:!0,playsInline:!0,autoplay:!N,controls:!0,preload:"auto"}),v.poster&&(b.poster=v.poster),v.w&&v.h&&(b.style.cssText=`width:100%;height:auto;aspect-ratio:${v.w}/${v.h}`),b.addEventListener("loadedmetadata",()=>{b.videoWidth&&b.videoHeight&&(i.style.aspectRatio=b.videoWidth+"/"+b.videoHeight)}),b.src=v.src):v.type==="image"?(b=R.createElement("img"),b.alt=u.t,b.decoding="async",b.src=v.big||v.src):(b=R.createElement("iframe"),b.src=v.src.replace("watch?v=","embed/"),b.title=u.t,b.allow="autoplay; encrypted-media; picture-in-picture",b.style.cssText="width:100%;aspect-ratio:16/9;border:0"),v.type==="video"&&v.poster?e.append(b):e.append(b,i);const S=()=>{i.remove()},L=()=>{if(b.tagName==="IMG"&&v.big&&b.getAttribute("src")!==v.src){b.src=v.src;return}b.remove();const M=i.querySelector("i");M&&M.remove(),i.isConnected||e.append(i)};b.addEventListener(v.type==="video"?"loadeddata":"load",S),b.addEventListener("error",L),b.tagName==="IMG"&&b.complete&&(b.naturalWidth?S():L())}E("[data-jm-date]",ct).textContent=u.d,E("[data-jm-date]",ct).setAttribute("datetime",u.iso),E("[data-jm-title]",ct).textContent=u.t,E("[data-jm-body]",ct).innerHTML=u.b,E("[data-jm-tags]",ct).innerHTML=(u.g||[]).map(i=>`#${i}`).join(""),h(),E("[data-jm-copy]",ct).textContent="Copy link",E(".jm__side",ct).scrollTop=0,R.title=u.t.slice(0,60)+" \u2014 mytechpark Journal"},c=g=>location.pathname+"?post="+encodeURIComponent(g),l=(g,u)=>{Ht[g]&&(d(g),ct.open||(st.classList.add("jm-lock"),ct.showModal(),E("[data-jm-close]",ct).focus({preventScroll:!0})),u==="push"?(history.pushState({jm:1},"",c(g)),a=!0):u==="replace"&&history.replaceState(history.state,"",c(g)))},f=g=>{const u=ve(),v=u.indexOf(o);if(v<0)return;if(g>0&&v>=u.length-1){oe()&&je().then(()=>{const i=ve(),b=i.indexOf(o);b>=0&&i[b+1]&&l(i[b+1],"replace")});return}const p=u[v+g];p&&l(p,"replace")},r=()=>{const g=E("video",e);g&&g.pause(),e.innerHTML="",st.classList.remove("jm-lock"),R.title=n,s&&(s.focus({preventScroll:!0}),s=null)},m=()=>{if(a){a=!1,history.back();return}ct.open&&ct.close(),location.search&&history.replaceState(null,"",location.pathname)};ct.addEventListener("close",r),ct.addEventListener("cancel",g=>{g.preventDefault(),m()}),ct.addEventListener("click",g=>{g.target===ct&&m()}),E("[data-jm-close]",ct).addEventListener("click",m),E("[data-jm-prev]",ct).addEventListener("click",()=>f(-1)),E("[data-jm-next]",ct).addEventListener("click",()=>f(1)),ct.addEventListener("keydown",g=>{g.key==="ArrowLeft"&&f(-1),g.key==="ArrowRight"&&f(1)}),E("[data-jm-copy]",ct).addEventListener("click",g=>{const u=g.currentTarget,v=location.origin+c(o);(navigator.clipboard?navigator.clipboard.writeText(v):Promise.reject()).then(()=>{u.textContent="Link copied"},()=>{u.textContent=v})}),R.addEventListener("click",g=>{const u=g.target.closest&&g.target.closest("[data-jn-open]");if(!u||g.metaKey||g.ctrlKey||g.shiftKey||g.button!==0)return;const v=(u.closest("[data-slug]")||{}).dataset;!v||!Ht[v.slug]||(g.preventDefault(),s=u,l(v.slug,"push"))});const y=()=>{const g=new URLSearchParams(location.search).get("post");if(!g){ct.open&&ct.close();return}if(Ht[g])return l(g,null);Nt&&fetch(`${Nt}?format=post&slug=${encodeURIComponent(g)}`).then(u=>u.ok?u.json():null).then(u=>{u&&u.post&&(Ht[u.post.s]=u.post,l(g,null))}).catch(()=>{})};addEventListener("popstate",()=>{a=!1,y()}),y()}const lo=`float sdBox(vec3 p, vec3 b, float r){ vec3 q = abs(p) - b + r; return length(max(q, 0.)) + min(max(q.x, max(q.y, q.z)), 0.) - r; } float sdTor(vec3 p, vec2 t){ vec2 q = vec2(length(p.xz) - t.x, p.y); return length(q) - t.y; } float sdCone(vec3 p, float h, float r1, float r2){ vec2 q = vec2(length(p.xz), p.y), k1 = vec2(r2, h), k2 = vec2(r2 - r1, 2. * h); vec2 ca = vec2(q.x - min(q.x, q.y < 0. ? r1 : r2), abs(q.y) - h); vec2 cb = q - k1 + k2 * clamp(dot(k1 - q, k2) / dot(k2, k2), 0., 1.); float s = (cb.x < 0. && ca.y < 0.) ? -1. : 1.; return s * sqrt(min(dot(ca, ca), dot(cb, cb))); } float sdOct(vec3 p, float s){ p = abs(p); float m = p.x + p.y + p.z - s; vec3 q; if (3. * p.x < m) q = p; else if (3. * p.y < m) q = p.yzx; else if (3. * p.z < m) q = p.zxy; else return m * .57735027; float k = clamp(.5 * (q.z - q.y + s), 0., s); return length(vec3(q.x, q.y - s + k, q.z - k)); } float sdHex(vec3 p, vec2 h){ const vec3 k = vec3(-.8660254, .5, .57735); p = abs(p); p.xy -= 2. * min(dot(k.xy, p.xy), 0.) * k.xy; vec2 d = vec2(length(p.xy - vec2(clamp(p.x, -k.z * h.x, k.z * h.x), h.x)) * sign(p.y - h.x), p.z - h.y); return min(max(d.x, d.y), 0.) + length(max(d, 0.)); } float sdLink(vec3 p, float le, float r1, float r2){ vec3 q = vec3(p.x, max(abs(p.y) - le, 0.), p.z); return length(vec2(length(q.xy) - r1, q.z)) - r2; } float sdB2(vec2 d){ return min(max(d.x, d.y), 0.) + length(max(d, 0.)); } float sdRc(vec3 p, float ra, float h, float rr){ vec2 d = vec2(length(p.xy) - ra + rr, abs(p.z) - h + rr); return min(max(d.x, d.y), 0.) + length(max(d, 0.)) - rr; } float smn(float a, float b, float k){ float h = clamp(.5 + .5 * (b - a) / k, 0., 1.); return mix(b, a, h) - k * h * (1. - h); } float sdSeg(vec3 p, vec3 a, vec3 b, float r){ vec3 pa = p - a, ba = b - a; float h = clamp(dot(pa, ba) / dot(ba, ba), 0., 1.); return length(pa - ba * h) - r; } float sdHeart2(vec2 q){ q.x = abs(q.x); if (q.y + q.x > 1.) return sqrt(dot(q - vec2(.25, .75), q - vec2(.25, .75))) - .35355339; return sqrt(min(dot(q - vec2(0., 1.), q - vec2(0., 1.)), dot(q - .5 * max(q.x + q.y, 0.), q - .5 * max(q.x + q.y, 0.)))) * sign(q.x - q.y); } /* 8.54 (Joe): softer, more sophisticated forms. Generous radii everywhere, thicker tubes, no knife edges */ float shp(int uS, vec3 p){ if (uS == 0) return sdBox(p, vec3(.53), .19); /* cube, soft bevel */ if (uS == 1) return sdCone(p - vec3(0., .24, 0.), .47, .66, .0) - .055; /* cone, rounded rim and tip */ if (uS == 2) { float R = .4, r = .125; /* two interlocked rings, a soft knot */ vec3 q = p - vec3(-.2, 0., 0.); float c = .93, s = .37; q.xy = mat2(c, -s, s, c) * q.xy; float d = sdTor(q, vec2(R, r)); q = p - vec3(.2, 0., 0.); c = .93; s = -.37; q.yz = mat2(c, -s, s, c) * q.yz; return min(d, sdTor(q.xzy, vec2(R, r))); } if (uS == 3) { vec3 q = p; q.y -= clamp(q.y, -.4, .4); return length(q) - .34; } /* capsule */ if (uS == 4) return sdTor(p, vec2(.52, .27)); /* torus */ if (uS == 5) return length(p) - .78; /* sphere */ if (uS == 6) { vec3 q = p - vec3(0., .3, 0.); return max(length(q) - .74, q.y + .03) - .07; } /* half sphere, flat face up */ if (uS == 7) { vec3 q = p + vec3(0., .34, 0.); return max(sdTor(q.xzy, vec2(.55, .17)), .06 - q.y) - .06; } /* arch */ if (uS == 8) return sdRc(p, .74, .17, .14); /* disc, a soft puck */ if (uS == 9) return sdOct(vec3(p.x, p.y * .8, p.z), .6) * .8 - .1; /* gem, rounded */ if (uS == 10) return max(sdHex(p, vec2(.62, .15)) - .07, .28 - length(p.xy)); /* hex nut */ if (uS == 11) return sdB2(vec2(abs(length(p.xz) - .36) - .05, abs(p.y) - .54)) - .06; /* tube */ if (uS == 12) { vec3 q = abs(p); return max(q.z - .3, max(q.x * .866025 + p.y * .5, -p.y) - .32) - .09; } /* prism */ if (uS == 13) { float R = .42, P = .34, a = atan(p.z, p.x), y = p.y - P * a / 6.2831853; /* spring */ y = mod(y + .5 * P, P) - .5 * P; return max(length(vec2(length(p.xz) - R, y)) - .1, abs(p.y) - .54) * .85; } if (uS == 20) { /* processor chip */ float d = sdBox(p, vec3(.5, .5, .17), .1); vec3 q = vec3(abs(p.x), abs(p.y), p.z); d = min(d, sdBox(vec3(q.x - .62, q.y - .24, p.z), vec3(.13, .06, .09), .03)); d = min(d, sdBox(vec3(q.x - .24, q.y - .62, p.z), vec3(.06, .13, .09), .03)); return d; } if (uS == 21) { /* cloud */ float d = length(p * vec3(1., 1.6, 1.)) - .4; d = smn(d, length(p - vec3(-.32, .1, 0.)) - .3, .18); d = smn(d, length(p - vec3(.3, .14, 0.)) - .27, .18); d = smn(d, length(p - vec3(.02, .3, 0.)) - .27, .18); return max(d, .06 - p.y) - .02; } if (uS == 22) { /* database, three stacked discs */ float d = sdRc(p.xzy - vec3(0., -.28, 0.), .5, .1, .07); d = min(d, sdRc(p.xzy - vec3(0., 0., 0.), .5, .1, .07)); d = min(d, sdRc(p.xzy - vec3(0., .28, 0.), .5, .1, .07)); return d - .02; } if (uS == 23) { /* code brackets < > */ float d = sdSeg(p, vec3(-.58, .1, 0.), vec3(-.14, .48, 0.), .09); d = min(d, sdSeg(p, vec3(-.58, .1, 0.), vec3(-.14, -.28, 0.), .09)); d = min(d, sdSeg(p, vec3(.58, .1, 0.), vec3(.14, .48, 0.), .09)); d = min(d, sdSeg(p, vec3(.58, .1, 0.), vec3(.14, -.28, 0.), .09)); return d; } if (uS == 24) { /* chat bubble */ float d = length(p * vec3(1., 1.28, 1.)) - .56; vec3 t = p - vec3(-.3, -.52, 0.); d = smn(d, sdCone(t, .3, .02, .17) - .04, .12); return d; } if (uS == 25) { /* heart */ vec2 q = (p.xy - vec2(0., .34)) / .62; vec2 w = vec2(sdHeart2(q), abs(p.z) - .2); return min(max(w.x, w.y), 0.) + length(max(w, 0.)) - .05; } if (uS == 26) { /* network nodes */ float d = length(p - vec3(-.52, .3, -.12)) - .19; d = min(d, length(p - vec3(.56, -.2, .1)) - .17); d = min(d, length(p - vec3(-.1, .55, .05)) - .18); d = min(d, length(p - vec3(-.12, -.15, -.05)) - .16); d = min(d, sdSeg(p, vec3(-.52, .3, -.12), vec3(.56, -.2, .1), .06)); d = min(d, sdSeg(p, vec3(-.52, .3, -.12), vec3(-.1, .55, .05), .06)); d = min(d, sdSeg(p, vec3(.56, -.2, .1), vec3(-.1, .55, .05), .06)); d = min(d, sdSeg(p, vec3(-.12, -.15, -.05), vec3(-.52, .3, -.12), .06)); d = min(d, sdSeg(p, vec3(-.12, -.15, -.05), vec3(.56, -.2, .1), .06)); d = min(d, sdSeg(p, vec3(-.12, -.15, -.05), vec3(-.1, .55, .05), .06)); return d; } vec3 qa = p - vec3(0., .27, 0.), qb = (p + vec3(0., .27, 0.)).zyx; /* two chain links */ return min(sdLink(qa, .15, .27, .11), sdLink(qb, .15, .27, .11)); } `;await xt();const Bt=E("[data-morph]");Bt&&(()=>{const e=Bt.closest(".hero")||Bt.parentElement;let t=null;if(!pt&&!ut())try{t=Bt.getContext("webgl2",{alpha:!0,premultipliedAlpha:!0,antialias:!1,depth:!1,stencil:!1,powerPreference:"high-performance"})}catch{}if(!t){e.classList.add("morph-fail");return}const n=`#version 300 es precision highp float; uniform vec2 uRes; uniform mat3 uR; uniform int uA, uB; uniform float uK, uT, uWob, uZ, uMetal, uFlick; out vec4 o; __SDF__ /* a studio for the chrome: dark floor, grey horizon, bright sky, two softboxes, a strip light, a magenta bounce from below */ vec3 env(vec3 r){ float y = r.y; vec3 c = mix(vec3(.015, .012, .02), vec3(.13, .13, .15), smoothstep(-.7, .02, y)); c += vec3(.5, .52, .58) * smoothstep(-.04, .1, y) * (1. - smoothstep(.1, .42, y)) * .55; c += vec3(.85, .88, 1.) * smoothstep(.25, .95, y) * .4; c += vec3(1.) * smoothstep(.74, .93, dot(r, normalize(vec3(-.45, .75, .5)))) * 1.9; c += vec3(1.) * smoothstep(.9, .975, dot(r, normalize(vec3(0.583333,0.25,0.75)))) * 1.6; c += vec3(1.) * smoothstep(.07, .0, abs(r.x + .62)) * smoothstep(-.3, .25, y) * 1.1; c += vec3(.9, .92, 1.) * smoothstep(.05, .0, abs(r.x - .55 + r.y * .2)) * smoothstep(-.1, .4, y) * .7; c *= .8 + .2 * smoothstep(-.4, .4, sin(r.y * 9. + r.x * 2.)); c += vec3(0.548333,0.05,1) * smoothstep(-.12, -.62, y) * .55; return c; } float smin(float a, float b, float k){ float h = clamp(.5 + .5 * (b - a) / k, 0., 1.); return mix(b, a, h) - k * h * (1. - h); } float map(vec3 w){ vec3 p = uR * w; float k = smoothstep(0., 1., uK), m = sin(3.14159265 * clamp(uK, 0., 1.)); float d = mix(shp(uA, p), shp(uB, p), k); /* half way it gathers into a drop, so the change reads as liquid, not as a cross-fade of geometry */ d = mix(d, smin(d, length(p) - .62, .34), m * .6); float wv = sin(p.x * 4.6 + uT * 1.6) * sin(p.y * 3.9 - uT * 1.25) * sin(p.z * 4.3 + uT * 1.05); return d + wv * (.006 + .045 * m + uWob); } vec3 nrm(vec3 p){ vec2 e = vec2(.002, 0.); return normalize(vec3(map(p + e.xyy) - map(p - e.xyy), map(p + e.yxy) - map(p - e.yxy), map(p + e.yyx) - map(p - e.yyx))); } void main(){ vec2 uv = (gl_FragCoord.xy * 2. - uRes) / uRes.y; vec3 ro = vec3(0., 0., uZ), rd = normalize(vec3(uv * .215, -1.)); float b = dot(ro, rd), c = dot(ro, ro) - 1.32, h = b * b - c; if (h < 0.) { o = vec4(0.); return; } h = sqrt(h); float t = -b - h, t1 = -b + h, dm = 1e9, tm = t; bool hit = false; for (int i = 0; i < 120; i++) { float d = map(ro + rd * t); if (d < dm) { dm = d; tm = t; } if (d < .0007) { hit = true; break; } t += d * .72; if (t > t1) break; } float px = 2.2 / uRes.y * .215; float a = hit ? 1. : 1. - smoothstep(0., px * tm, dm); if (a <= 0.) { o = vec4(0.); return; } vec3 p = ro + rd * (hit ? t : tm), n = nrm(p), v = -rd; vec3 base = vec3(0.417333,0.08,1); vec3 L1 = normalize(vec3(-.55, .7, .65)), L2 = normalize(vec3(.85, -.15, .35)); float dif = max(dot(n, L1), 0.), dif2 = max(dot(n, L2), 0.); float ao = clamp(map(p + n * .1) / .1, 0., 1.); ao = .45 + .55 * ao; vec3 col = base * (.12 + .9 * dif + .3 * dif2) * ao; vec3 r = reflect(rd, n); /* a studio: a big softbox top left, a strip right, a magenta floor bounce */ float box = smoothstep(.72, .93, dot(r, normalize(vec3(-.45, .75, .5)))); float box2 = smoothstep(.88, .975, dot(r, normalize(vec3(0.583333,0.25,0.75)))); float fre = pow(1. - max(dot(n, v), 0.), 3.); col += vec3(0.873333,0.8,1) * (box * .9 + box2 * .55) * (.35 + .65 * ao); col += vec3(0.651667,0.45,1) * smoothstep(-.3, .12, r.y) * (1. - smoothstep(.12, .55, r.y)) * .18 * ao; col += vec3(0.556667,0.3,1) * fre * .4 + base * smoothstep(.0, .5, r.y) * .12; col += pow(max(dot(reflect(-L1, n), v), 0.), 70.) * .8; if (uMetal > 0.) { /* chrome: almost no colour of its own, it is the room it reflects; Fresnel pushes the edges to full mirror */ float fr = .62 + .38 * pow(1. - max(dot(n, v), 0.), 4.); /* the room is close: where the point sits shifts what it sees, so flat faces carry gradients like real chrome */ vec3 ch = env(normalize(r + p * .38)) * fr * (.45 + .55 * ao) + vec3(.03) * dif; ch += pow(max(dot(reflect(-L1, n), v), 0.), 90.) * 1.4; /* the neon fault: for a moment it burns magenta from inside */ vec3 ne = col * 1.15 + vec3(0.43,0.1,1) * (.25 + 1.1 * fre); col = mix(col, mix(ch, ne, uFlick), uMetal); } col = 1. - exp(-col * 1.9); o = vec4(col * a, a); }`,o=`#version 300 es void main(){ vec2 p = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2); gl_Position = vec4(p * 2. - 1., 0., 1.); }`,a=(D,x)=>{const w=t.createShader(D);return t.shaderSource(w,x),t.compileShader(w),t.getShaderParameter(w,t.COMPILE_STATUS)||console.warn(t.getShaderInfoLog(w)),w},s=t.createProgram();if(t.attachShader(s,a(t.VERTEX_SHADER,o)),t.attachShader(s,a(t.FRAGMENT_SHADER,n.replace("__SDF__",lo))),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))return;t.useProgram(s),t.bindVertexArray(t.createVertexArray()),t.clearColor(0,0,0,0);const h=D=>t.getUniformLocation(s,D),d=h("uRes"),c=h("uR"),l=h("uA"),f=h("uB"),r=h("uK"),m=h("uT"),y=h("uWob"),g=h("uZ"),u=h("uMetal"),v=h("uFlick"),p=[20,21,22,25,23,24,26],i={a:0,b:20,k:1,t:Math.random()*20,wob:0,ax:.42,ay:.7,spin:[.13,N?.21:2.6,.05],q:[0,0,0],tx:0,ty:0,metal:1,mt:1,fl:0,fseq:null,fs:0,fhold:0,nextF:0};i.nextF=i.t+2.2;try{localStorage.removeItem("dz-hero-finish")}catch{}const b=()=>{const D=[];let x=0;const w=3+(Math.random()*4|0);for(let T=0;T{const x=p[D%p.length];x!==i.b&&(i.a=i.k>.5?i.b:i.a,i.b=x,i.k=0,i.wob=.02)};let L=0;i.nextS=i.t+3.4,e.addEventListener("pointerdown",D=>{D.target.closest("a,button")||(i.wob=.06,i.spin[1]+=1.6)},{passive:!0});let M=0,P=0,V=1,I=0,z=-60,A=0;const C=()=>{const D=Bt.offsetWidth,x=Bt.offsetHeight;let w=Math.min(devicePixelRatio||1,1.5);const T=(yt||!nt?5e5:13e5)*V*V,q=D*x*w*w;q>T&&(w*=Math.sqrt(T/q));const _=Math.max(2,Math.round(D*w)),j=Math.max(2,Math.round(x*w));_===M&&j===P||(M=_,P=j,Bt.width=M,Bt.height=P)};C(),_t(C);const O=D=>{if(D>200)return;if(z<0){z++;return}if(z++,A+=D,z<45)return;const x=A/z;z=0,A=0,x>24&&V>.55?(V=Math.max(.55,V*.8),C()):x<19&&V<1&&I<2&&(I++,V=Math.min(1,V*1.15),C())},et=(D,x,w)=>{const T=Math.cos(D),q=Math.sin(D),_=Math.cos(x),j=Math.sin(x),H=Math.cos(w),Q=Math.sin(w);return[_*H,T*Q+q*j*H,q*Q-T*j*H,-_*Q,T*H-q*j*Q,q*H+T*j*Q,j,-q*_,T*_]};let ot=!1;const W=D=>{const x=D/1e3;O(D),i.t+=x,i.k<1&&(i.k=Math.min(1,i.k+x/1.15)),i.wob*=Math.exp(-x*2.2),i.metal=at(i.metal,i.mt,1-Math.exp(-x*3)),i.t>i.nextS&&(L=(L+1)%p.length,S(L),i.nextS=i.t+3.4),i.mt>.5&&i.t>i.nextF&&(b(),i.nextF=i.t+3+Math.random()*4.5);let w=0;if(i.fseq){const _=i.t-i.fs;if(_=j&&(w=H);else w=Math.exp(-(_-i.fhold)*5),w<.01&&(w=0,i.fseq=null)}(Math.abs(w-i.fl)>.004||w===0&&i.fl!==0)&&B(Bt,"--fl",w.toFixed(3)),i.fl=w;const T=1+Math.min(4,Math.abs(Ft)*.04);i.spin[1]=at(i.spin[1],.21,1-Math.exp(-x*.8)),i.q[0]+=i.spin[0]*x*T,i.q[1]+=i.spin[1]*x*T,i.q[2]+=i.spin[2]*x,i.tx=at(i.tx,nt?(bt/k-.5)*.6:0,1-Math.exp(-x*2)),i.ty=at(i.ty,nt?(Et/Z-.5)*.9:0,1-Math.exp(-x*2));const q=et(i.q[0]+i.tx,i.q[1]+i.ty,i.q[2]);t.viewport(0,0,M,P),t.clear(t.COLOR_BUFFER_BIT),t.uniform2f(d,M,P),t.uniformMatrix3fv(c,!1,q),t.uniform1i(l,i.a),t.uniform1i(f,i.b),t.uniform1f(r,i.k),t.uniform1f(m,i.t),t.uniform1f(y,i.wob),t.uniform1f(g,M/P<.9?6.4:6),t.uniform1f(u,i.metal<.002?0:i.metal),t.uniform1f(v,i.fl),t.drawArrays(t.TRIANGLES,0,3),ot||(ot=!0,e.classList.add("morph-on"))};if(N){W(16);return}At(e,W)})(),await xt();const fo=F("[data-ico]");fo.length&&!N&&!pt&&!ut()&&!yt&&(()=>{const t=R.createElement("canvas");t.width=t.height=512;let n=null;try{n=t.getContext("webgl2",{alpha:!0,premultipliedAlpha:!0,antialias:!1,depth:!1,stencil:!1,powerPreference:"low-power"})}catch{}if(!n)return;const o=`#version 300 es precision highp float; uniform vec2 uRes; uniform mat3 uR; uniform int uS; out vec4 o; __SDF__ /* every shape sits on its own centre of mass, so it turns around its own axis; all fit inside r = 1 */ vec3 envI(vec3 r){ float y = r.y; vec3 c = mix(vec3(.015, .012, .02), vec3(.13, .13, .15), smoothstep(-.7, .02, y)); c += vec3(.5, .52, .58) * smoothstep(-.04, .1, y) * (1. - smoothstep(.1, .42, y)) * .55; c += vec3(.85, .88, 1.) * smoothstep(.25, .95, y) * .4; c += vec3(1.) * smoothstep(.74, .93, dot(r, normalize(vec3(-.45, .75, .5)))) * 1.9; c += vec3(1.) * smoothstep(.9, .975, dot(r, normalize(vec3(0.583333,0.25,0.75)))) * 1.6; c += vec3(1.) * smoothstep(.07, .0, abs(r.x + .62)) * smoothstep(-.3, .25, y) * 1.1; c += vec3(.9, .92, 1.) * smoothstep(.05, .0, abs(r.x - .55 + r.y * .2)) * smoothstep(-.1, .4, y) * .7; c *= .8 + .2 * smoothstep(-.4, .4, sin(r.y * 9. + r.x * 2.)); /* magenta as a light band low in the room (a strip on the floor's edge), not the whole floor: edges glow, faces stay chrome */ c += vec3(0.548333,0.05,1) * smoothstep(-.06, -.24, y) * (1. - smoothstep(-.32, -.66, y)) * 1.15; c += vec3(.05, .045, .06) * smoothstep(-.2, -.9, y); return c; } float map(vec3 w){ return shp(uS, uR * w); } vec3 nrm(vec3 p){ vec2 e = vec2(.0015, 0.); return normalize(vec3(map(p + e.xyy) - map(p - e.xyy), map(p + e.yxy) - map(p - e.yxy), map(p + e.yyx) - map(p - e.yyx))); } void main(){ vec2 uv = (gl_FragCoord.xy * 2. - uRes) / uRes.y; vec3 ro = vec3(0., 0., 5.2), rd = normalize(vec3(uv * .215, -1.)); float b = dot(ro, rd), c = dot(ro, ro) - 1., h = b * b - c; if (h < 0.) { o = vec4(0.); return; } h = sqrt(h); float t = -b - h, t1 = -b + h, dm = 1e9, tm = t; bool hit = false; for (int i = 0; i < 110; i++) { float d = map(ro + rd * t); if (d < dm) { dm = d; tm = t; } if (d < .0005) { hit = true; break; } t += d * .9; if (t > t1) break; } float px = 2.2 / uRes.y * .215; float a = hit ? 1. : 1. - smoothstep(0., px * tm, dm); if (a <= 0.) { o = vec4(0.); return; } vec3 p = ro + rd * (hit ? t : tm), n = nrm(p), v = -rd; /* 8.55 (Joe): every service shape in the hero's liquid chrome: it shows the studio it sits in, magenta glows up from below */ vec3 L1 = normalize(vec3(-.55, .7, .65)); float dif = max(dot(n, L1), 0.); float ao = clamp(map(p + n * .1) / .1, 0., 1.); ao = .45 + .55 * ao; vec3 r = reflect(rd, n); float fr = .62 + .38 * pow(1. - max(dot(n, v), 0.), 4.); vec3 col = envI(normalize(r + p * .38)) * fr * (.45 + .55 * ao) + vec3(.03) * dif; col += pow(max(dot(reflect(-L1, n), v), 0.), 90.) * 1.4; col += vec3(0.548333,0.05,1) * smoothstep(-.35, -.95, n.y) * .28 * ao * fr; col = 1. - exp(-col * 1.9); o = vec4(col * a, a); }`,a=`#version 300 es void main(){ vec2 p = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2); gl_Position = vec4(p * 2. - 1., 0., 1.); }`,s=(x,w)=>{const T=n.createShader(x);return n.shaderSource(T,w),n.compileShader(T),T},h=n.createProgram();if(n.attachShader(h,s(n.VERTEX_SHADER,a)),n.attachShader(h,s(n.FRAGMENT_SHADER,o.replace("__SDF__",lo))),n.linkProgram(h),!n.getProgramParameter(h,n.LINK_STATUS))return;n.useProgram(h),n.bindVertexArray(n.createVertexArray()),n.clearColor(0,0,0,0);const d=n.getUniformLocation(h,"uR"),c=n.getUniformLocation(h,"uS"),l=n.getUniformLocation(h,"uRes"),f=(x,w)=>{const T=new Array(9);for(let q=0;q<3;q++)for(let _=0;_<3;_++)T[q*3+_]=x[_]*w[q*3]+x[3+_]*w[q*3+1]+x[6+_]*w[q*3+2];return T},r=x=>{const w=Math.cos(x),T=Math.sin(x);return[1,0,0,0,w,T,0,-T,w]},m=x=>{const w=Math.cos(x),T=Math.sin(x);return[w,0,-T,0,1,0,T,0,w]},y=x=>{const w=Math.cos(x),T=Math.sin(x);return[w,T,0,-T,w,0,0,0,1]},g=x=>Math.hypot(x[0],x[1],x[2]),u=x=>{const w=g(x)||1;return[x[0]/w,x[1]/w,x[2]/w]},v=(x,w)=>{const T=Math.cos(w),q=Math.sin(w),_=1-T,j=x[0],H=x[1],Q=x[2];return[_*j*j+T,_*j*H+q*Q,_*j*Q-q*H,_*j*H-q*Q,_*H*H+T,_*H*Q+q*j,_*j*Q+q*H,_*H*Q-q*j,_*Q*Q+T]},p=(x,w)=>[x[0]*w[0]+x[3]*w[1]+x[6]*w[2],x[1]*w[0]+x[4]*w[1]+x[7]*w[2],x[2]*w[0]+x[5]*w[1]+x[8]*w[2]],i=x=>{let w=u([x[0],x[1],x[2]]);const T=[x[3],x[4],x[5]],q=w[0]*T[0]+w[1]*T[1]+w[2]*T[2],_=u([T[0]-w[0]*q,T[1]-w[1]*q,T[2]-w[2]*q]);return[...w,..._,w[1]*_[2]-w[2]*_[1],w[2]*_[0]-w[0]*_[2],w[0]*_[1]-w[1]*_[0]]},b=new Float32Array(9),S={cube:0,cone:1,rings:2,capsule:3,torus:4,sphere:5,bowl:6,arch:7,dish:8,gem:9,hex:10,tube:11,prism:12,spring:13,link:14,chip:20,code:21,cloud:22,database:23,chat:24,heart:25,network:26},L={cube:[.5,.6,0],cone:[-.3,0,0],rings:[.35,.45,.15],capsule:[0,0,.8],torus:[1.1,0,.1],sphere:[0,0,0],bowl:[.45,0,0],arch:[.15,0,0],dish:[.95,.45,.2],gem:[.25,.5,0],hex:[.35,.4,0],tube:[.5,0,.3],prism:[.3,.5,0],spring:[.35,0,.15],link:[.3,.6,.2],chip:[.3,.4,0],code:[0,0,.6],cloud:[0,0,0],database:[0,0,0],chat:[.2,.3,0],heart:[0,0,.5],network:[.4,.3,.1]},M=Math.min(2,devicePixelRatio||1);let P=1,V=0;const I=fo.map((x,w)=>{const T=E("canvas",x),q=x.dataset.ico,_=L[q]||[0,0,0],j=w*2.399963,H=u([Math.sin(j)*.55,1,Math.cos(j)*.45]),Q=(.24+w%5*.045)*(w%2?-1:1);return T.style.animationDelay=(-(w*1.9)%9).toFixed(1)+"s",{el:x,cv:T,cx:T.getContext("2d"),s:S[q]!==void 0?S[q]:5,R:f(y(_[2]),f(m(_[1]),r(_[0]))),ax:H,sp:Q,pa:u([Math.cos(j*1.7),Math.sin(j*.9),.6]),w:[H[0]*Q,H[1]*Q,H[2]*Q],vis:!1,res:0,cw:0,on:!1,drag:!1,hov:0,gate:x.closest("[data-ico-gate]")}}),z=()=>I.forEach(x=>{x.cw=x.cv.offsetWidth}),A=x=>{if(!x.cw)return;const w=Math.min(512,Math.max(48,Math.round(x.cw*M*P*Math.min(4,x.el._k||1)/16)*16));w!==x.res&&(x.res=x.cv.width=x.cv.height=w);const T=x.R;b[0]=T[0],b[1]=T[3],b[2]=T[6],b[3]=T[1],b[4]=T[4],b[5]=T[7],b[6]=T[2],b[7]=T[5],b[8]=T[8],n.viewport(0,0,w,w),n.clear(n.COLOR_BUFFER_BIT),n.uniform2f(l,w,w),n.uniform1i(c,x.s),n.uniformMatrix3fv(d,!1,b),n.drawArrays(n.TRIANGLES,0,3),x.cx.clearRect(0,0,w,w),x.cx.drawImage(t,0,512-w,w,w,0,0,w,w),x.on||(x.on=!0,x.el.classList.add("ico--gl"))},C=(x,w,T)=>{const q=g(w)*T;q>1e-6&&(x.R=f(v(u(w),q),x.R))};let O=0,et=0,ot=0;const W=x=>{const w=Math.min(x,50)/1e3,T=1-Math.exp(-x/900),q=Y(Ft*.01,-1.4,1.4);V=at(V,x,.05),++et>90&&V>34&&P>.55&&(P*=.85,et=0),ot++,I.forEach((_,j)=>{if(!(!_.vis||_.gate&&!_.gate.classList.contains("on")||_.el._v&&_.el._v.visibility==="hidden")){if(!_.drag){_.ax=u(p(v(_.pa,.07*w),_.ax));const H=_.sp*(1+_.hov*1.4),Q=[_.ax[0]*H+q,_.ax[1]*H,_.ax[2]*H];for(let gt=0;gt<3;gt++)_.w[gt]+=(Q[gt]-_.w[gt])*T;C(_,_.w,w)}et%30===0&&(_.R=i(_.R)),(!wt||_.drag||ot+j&1)&&A(_)}})},D=new IntersectionObserver(x=>{x.forEach(T=>{const q=I.find(_=>_.el===T.target);q&&(q.vis=T.isIntersecting)});const w=I.filter(T=>T.vis).length;w&&!O?(O=1,z(),Ot(W)):!w&&O&&(O=0,de(W))},{rootMargin:"15% 0px"});I.forEach(x=>D.observe(x.el)),_t(z),R.fonts&&R.fonts.ready&&R.fonts.ready.then(z),I.forEach(x=>{if(!("icoDrag"in x.el.dataset))return;const w=x.cv;let T=0,q=0,_=0;w.addEventListener("pointerenter",()=>{x.hov=1}),w.addEventListener("pointerleave",()=>{x.hov=0}),w.addEventListener("pointerdown",H=>{x.drag=!0,T=H.clientX,q=H.clientY,_=performance.now();try{w.setPointerCapture(H.pointerId)}catch{}x.el.classList.add("is-grab")}),w.addEventListener("pointermove",H=>{if(!x.drag)return;const Q=performance.now(),gt=H.clientX-T,$=H.clientY-q,X=Math.max(8,Q-_)/1e3;T=H.clientX,q=H.clientY,_=Q;const tt=2.4/Math.max(60,x.cw),G=[$*tt,gt*tt,0];C(x,G,1);const J=Math.min(14,g(G)/X),ht=u(G);for(let rt=0;rt<3;rt++)x.w[rt]=at(x.w[rt],ht[rt]*J,.5);O||A(x)});const j=()=>{x.drag=!1,x.el.classList.remove("is-grab")};w.addEventListener("pointerup",j),w.addEventListener("pointercancel",j)})})();const ft=E("[data-starfield]"),ho={radial:[0,0,0],horizontal:[1,1,0],highway:[1,1,0],diagonal:[1,1,0],rise:[1,0,-1],vortex:[2,0,0]},Be=!!(ft&&ft.dataset.sf==="highway"),It=ho[ft&&ft.dataset.sf||"radial"]||ho.radial,xe=!!(ft&&ft.hasAttribute("data-sf-ink")),Oe=!!(ft&&ft.hasAttribute("data-sf-quiet")),U={ramp:0,boost:Tt?.07:0,hold:0,holdT:0,fade:1,magenta:0,vpx:0,vpy:0,travel:Math.random()*10,speed:.0018,covered:!1,calm:0,calmT:0,vort:0,vortT:0,spin:0,rad:0},Rt={idle:.0016,active:.011,max:.046,decay:.93,scrollPower:6e-5,trail:5.2};let po=!1;const uo=()=>{if(po||!ft)return;po=!0;const e=Z<768,t=Math.round((ut()?420:e?900:Y(Z*k/760,1200,2200))*(ft.hasAttribute("data-sf-dim")?.5:1)*(Oe?.45:1));let n=ut()?1:Math.min(devicePixelRatio||1,e?1.25:wt?1.5:1.75),o=null;if(!ut())try{o=ft.getContext("webgl2",{alpha:!0,antialias:!1,premultipliedAlpha:!0,powerPreference:"high-performance"})}catch{o=null}let a=null,s=null;if(o){const p=`#version 300 es precision highp float; layout(location=0) in vec2 aC; layout(location=1) in vec3 aS; uniform float uTravel,uSpeed,uTrail,uDpr,uMode,uSpin,uVort; uniform vec2 uRes,uVP,uDir; out float vA; out float vX; out float vL; out float vT; out float vM; float h(float n){return fract(sin(n)*43758.5453123);} mat2 rot(float a){float c=cos(a),s=sin(a);return mat2(c,s,-s,c);} void main(){ float id=float(gl_InstanceID); vec2 head,tail; float depth; if(uMode>0.5&&uMode<1.5){ float k=mix(0.1,1.0,aS.z); float L=length(uRes)*1.08; float u=fract(h(id*1.713+aS.x)+uTravel*0.3/k); float v=h(id*3.371+aS.y); vec2 nrm=vec2(-uDir.y,uDir.x); vec2 c=uRes*0.5+uVP*uDpr*(0.3/k); head=c+uDir*(u-0.5)*L+nrm*(v-0.5)*L; tail=head-uDir*(uSpeed*uTrail*0.3/k*L); depth=1.0-k; } else { float raw=aS.z-uTravel; float cyc=floor(raw); float z=mix(0.02,1.0,fract(raw)); vec2 xy=vec2(h(id*1.713+cyc*13.17+aS.x),h(id*3.371+cyc*7.73+aS.y))*2.0-1.0; xy*=uRes*0.6; vec2 c=uRes*0.5+uVP*uDpr; float zt=min(z+uSpeed*uTrail,1.0); vec2 a=xy/z,b=xy/zt; float tw=uMode>1.5?0.11:uVort*0.34; a=rot(tw/z+uSpin)*a;b=rot(tw/zt+uSpin)*b; head=c+a; tail=c+b; depth=1.0-z; } vec2 dv=head-tail; float len=length(dv); float cap=340.0*uDpr; if(len>cap){tail=head-dv/len*cap;dv=head-tail;len=cap;} float w=max(depth*2.1,0.5)*uDpr; vec2 n=len>0.0001?dv/len:vec2(1.0,0.0); vec2 pp=vec2(-n.y,n.x); vec2 p=mix(tail-n*w,head+n*w,aC.x)+pp*aC.y*w; vA=depth*depth*0.95+0.1; vX=aC.y; vL=aC.x; vT=clamp(len/(80.0*uDpr),0.0,1.0); vM=step(0.86,h(id*7.31+3.7)); vec2 cl=p/uRes*2.0-1.0; gl_Position=vec4(cl.x,-cl.y,0.0,1.0); }`,i=`#version 300 es precision mediump float; in float vA; in float vX; in float vL; in float vT; in float vM; uniform float uFade,uMag,uInk; out vec4 o; void main(){ float e=1.0-smoothstep(0.25,1.0,abs(vX)); float a=vA*e*uFade*mix(0.15,1.0,vL); float m=max(vM*0.9,uMag*vT*(1.0-vL*0.5)); vec3 col=mix(vec3(1.0-uInk),vec3(0.366667,0,1),m); o=vec4(col*a,a); }`,b=(S,L)=>{const M=o.createShader(S);if(o.shaderSource(M,L),o.compileShader(M),!o.getShaderParameter(M,o.COMPILE_STATUS))throw o.getShaderInfoLog(M);return M};try{const S=o.createProgram();if(o.attachShader(S,b(o.VERTEX_SHADER,p)),o.attachShader(S,b(o.FRAGMENT_SHADER,i)),o.linkProgram(S),!o.getProgramParameter(S,o.LINK_STATUS))throw o.getProgramInfoLog(S);o.useProgram(S);const L=o.createVertexArray();o.bindVertexArray(L);const M=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,M),o.bufferData(o.ARRAY_BUFFER,new Float32Array([0,-1,1,-1,0,1,1,1]),o.STATIC_DRAW),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,o.FLOAT,!1,0,0);const P=new Float32Array(t*3);for(let j=0;jo.getUniformLocation(S,j);o.uniform1f(I("uInk"),xe?1:0);const z=I("uTravel"),A=I("uSpeed"),C=I("uTrail"),O=I("uDpr"),et=I("uRes"),ot=I("uVP"),W=I("uFade"),D=I("uMag"),x=I("uMode"),w=I("uDir"),T=I("uSpin"),q=I("uVort"),_=Math.hypot(It[1],It[2])||1;o.uniform1f(x,It[0]),o.uniform2f(w,It[1]/_,It[2]/_),s=()=>{ft.width=Math.round(Z*n),ft.height=Math.round(k*n),o.viewport(0,0,ft.width,ft.height)},a=()=>{if(o.clear(o.COLOR_BUFFER_BIT),o.uniform1f(z,U.travel),o.uniform1f(A,U.speed),o.uniform1f(C,Rt.trail),o.uniform1f(O,n),o.uniform1f(T,It[0]>1.5?U.travel*.9:U.spin),o.uniform1f(q,U.vort),o.uniform2f(et,ft.width,ft.height),o.uniform2f(ot,U.vpx,U.vpy),o.uniform1f(D,U.magenta),!Be){o.uniform1f(W,U.fade),o.drawArraysInstanced(o.TRIANGLE_STRIP,0,4,t);return}const j=U.rad;j<.995&&(o.uniform1f(x,1),o.uniform1f(W,U.fade*(1-j)),o.drawArraysInstanced(o.TRIANGLE_STRIP,0,4,t)),j>.005&&(o.uniform1f(x,0),o.uniform1f(W,U.fade*j),o.drawArraysInstanced(o.TRIANGLE_STRIP,0,4,t))}}catch(S){o=null,a=null,console.warn("starfield webgl fallback",S)}}if(!a){const p=ft.getContext("2d"),i=Math.min(t,520),b=[],S=It[0]===1,L=Math.hypot(It[1],It[2])||1,M=It[1]/L,P=It[2]/L,V=(C,O)=>(S?(C.u=Math.random(),C.v=Math.random(),C.k=.1+Math.random()*.9):(C.x=(Math.random()*2-1)*Z*.6,C.y=(Math.random()*2-1)*k*.6,C.z=O?Math.random():1),C.m=Math.random()>.86,C);s=()=>{ft.width=Math.round(Z*n),ft.height=Math.round(k*n),p.setTransform(n,0,0,n,0,0),b.length=0;for(let C=0;C{const C=I===null?0:U.travel-I;I=U.travel,p.clearRect(0,0,Z,k),p.lineCap="round";const O=Z/2+U.vpx,et=k/2+U.vpy,ot=[[],[],[],[],[],[]];if(S){const W=Math.hypot(Z,k)*1.08;for(const D of b){D.u=(D.u+C*.3/D.k)%1;const x=O+M*(D.u-.5)*W-P*(D.v-.5)*W,w=et+P*(D.u-.5)*W+M*(D.v-.5)*W,T=Math.min(340,U.speed*Rt.trail*.3/D.k*W),q=1-D.k;ot[(q<.4?0:q<.75?1:2)+(D.m?3:0)].push(x-M*T,w-P*T,x,w)}}else for(const W of b){W.z-=C,W.z<=.02&&V(W,!1);const D=O+W.x/W.z,x=et+W.y/W.z;if(D<-60||D>Z+60||x<-60||x>k+60){V(W,!1);continue}const w=Math.min(1,W.z+U.speed*Rt.trail),T=1-W.z;ot[(T<.4?0:T<.75?1:2)+(W.m?3:0)].push(O+W.x/w,et+W.y/w,D,x)}ot.forEach((W,D)=>{p.strokeStyle=D>2?"#8f57f2":(xe||document.documentElement.classList.contains("theme-light"))?"#1a1a38":"#fff",p.globalAlpha=z[D%3]*U.fade,p.lineWidth=A[D%3],p.beginPath();for(let x=0;x{ft.style.opacity=(1-K(k*.15,k*.7,Dt)).toFixed(3)};mt.push(p),p()}const d=[...F("main > .section:not(.closing), main > .fv, .foot").map(p=>[p,1]),...F(".phero").map(p=>[p,.5]),...F("[data-calm]").map(p=>[p,+p.dataset.calm||1])];mt.push(p=>{let i=0;const b=k*.5;for(const[S,L]of d){const M=dt(S);if(M.topb){i=L;break}}U.calmT=i,U.boost+=Math.abs(p-h)*Rt.scrollPower*(1-U.calm*.82),h=p});const c=Be&&E(".platform");c&&mt.push(()=>{const p=dt(c);U.platT=p.topk*.38?1:0,U.holdT=U.platT?Math.max(U.holdT,.0024):U.holdT===.0024?0:U.holdT}),F("[data-boost]").forEach(p=>{p.addEventListener("pointerenter",()=>{U.holdT=.012}),p.addEventListener("pointerleave",()=>{U.holdT=0})});let l=!1,f=0,r=-90,m=0;const y=p=>{if(!o||n<=1)return;if(r<0){r++;return}if(r++,m+=p,r<60)return;const i=m/r;r=0,m=0,i>24&&(n=n>1.3?1.25:1,s())},g=p=>{if(ut()&&(f^=1))return;ut()?p*=2:y(p);const i=p/16.667;if(N)U.speed=0;else{if(U.ramp=Ct?K(0,.8,Lt)*(1-K(.97,1,Lt)):0,U.boost*=Math.pow(Rt.decay,i),U.boost<1e-5&&(U.boost=0),U.hold=at(U.hold,U.holdT,.06),U.calm=at(U.calm,U.calmT,.04*i),U.vort=at(U.vort,U.vortT,.035*i),Be){const L=U.vortT||U.platT||Ct&&Lt>.02&&Lt<.995?1:0;U.rad=at(U.rad,L,.03*i),Math.abs(U.rad-L)<.004&&(U.rad=L)}U.fade=xe?.5:(1-U.calm*.62)*(Oe?.55:1),U.speed=Math.min(Rt.max,Math.min(Rt.max*(1-U.calm*.5),Rt.idle*(Oe?.55:1)+(Rt.active-Rt.idle)*U.ramp+U.boost)+U.hold),U.magenta=Y((U.speed-Rt.idle)/(Rt.max*.45),0,1),U.travel+=U.speed*i;const b=nt?Y((Et-Z/2)*-.06,-48,48):0,S=nt?Y((bt-k/2)*-.06,-40,40):0;U.vpx=at(U.vpx,b,.04),U.vpy=at(U.vpy,S,.04)}a()},u=p=>{if(ut()||N){ft.style.visibility=p?"visible":"hidden";return}p!==l&&(l=p,ft.style.visibility=p?"visible":"hidden",p?Ot(g):de(g))},v=()=>!R.hidden&&!st.classList.contains("rvh-on");mt.push(()=>u(v())),R.addEventListener("visibilitychange",()=>u(v())),Gt(),ut()||N?(U.speed=ut()?.0022:0,a(),l=!0,ft.style.visibility="visible"):u(v()),requestAnimationFrame(()=>ft.classList.add("is-live"))};if(ft&&!pt&&(Tt&&!N?requestAnimationFrame(uo):ke(()=>requestAnimationFrame(uo))),R.addEventListener("click",e=>{const t=e.target.closest&&e.target.closest("a[href]");if(!t||e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||t.target==="_blank"||t.hasAttribute("download"))return;const n=t.getAttribute("href");if(!n||n[0]==="#"||/^(mailto|tel|https?):/i.test(n))return;try{sessionStorage.setItem("dz-warp","1")}catch{}if(N)return;if(e.preventDefault(),U.boost+=.08,st.classList.add("is-leaving"),Pt)try{Pt.abort()}catch{}F("video").forEach(l=>{try{l.pause(),l.currentSrc&&!l.dataset.keep&&(l.dataset.back=l.currentSrc,l.removeAttribute("src"),l.load())}catch{}}),Qt&&Qt();const o=()=>{o.d||(o.d=1,location.href=t.href)},a=st.classList.contains("menu-leaving")?360:140,s=performance.now(),h=E(".pt-wait"),d=h?Te(h,620):null;d&&(d(0),st.classList.add("is-waiting"));const c=()=>{if(!d){setTimeout(o,Math.max(0,a-(performance.now()-s)));return}d(1),d.done(()=>setTimeout(o,80))};setTimeout(o,8e3);try{const l=new URL(t.href,location.href),f=l.pathname.replace(/\.html$/,"").replace(/\/index$/,"/")||"/",r=typeof window.__pb=="object"?window.__pb:{},m=r[f]||6e4;if(l.origin!==location.origin||zt)throw 0;let y=0,g=0,u=0;const v=()=>d&&d(u?y*.45+g*.55:y);fetch(l.pathname+l.search,{credentials:"same-origin"}).then(p=>{if(!p.ok||!p.body||!p.body.getReader)return p.text();const i=p.body.getReader(),b=new TextDecoder;let S=0,L="";const M=()=>i.read().then(({done:P,value:V})=>P?(L+=b.decode(),L):(S+=V.length,L+=b.decode(V,{stream:!0}),y=Math.min(.99,S/m),v(),M()));return M()}).then(p=>{y=1;const i=p&&p.match(/(?:(?!<\/picture>).)*?fetchpriority="high"(?:(?!<\/picture>).)*?<\/picture>/s);if(!i)return v(),c();const b=i[0],S=b.match(/]*srcset="([^"]+)"/)||b.match(/]*src="([^"]+)"/),M=z=>z.split(",").map(A=>A.trim().split(/\s+/)).map(([A,C])=>[A,parseInt(C,10)||0]).sort((A,C)=>A[1]-C[1]),P=Z*Math.min(2,devicePixelRatio||1),V=z=>(z.find(A=>A[1]>=P)||z[z.length-1])[0],I=Ve&&S?V(M(S[1])):L?V(M(L[1])):"";return I?(u=1,v(),fetch(new URL(I,l).href,{credentials:"same-origin"}).then(z=>Xe(z,A=>{g=A,v()})).then(c,c)):(v(),c())}).catch(c)}catch{setTimeout(o,a)}}),addEventListener("pageshow",e=>{e.persisted&&(st.classList.remove("is-leaving","is-waiting","is-entering","menu-leaving","menu-open"),Pt&&Pt.signal.aborted&&location.reload())}),st.classList.contains("is-entering")&&setTimeout(()=>st.classList.remove("is-entering"),900),!(HTMLScriptElement.supports&&HTMLScriptElement.supports("speculationrules"))){const e=new Set,t=n=>{const o=n.target.closest&&n.target.closest("a[href]");if(!o||o.target==="_blank")return;const a=o.getAttribute("href");if(!a||a[0]==="#"||/^(mailto|tel|https?):/i.test(a))return;const s=new URL(a,location.href);s.origin!==location.origin||e.has(s.pathname)||(e.add(s.pathname),!zt&&fetch(s.pathname,{credentials:"same-origin"}).then(h=>h.ok?h.text():"").then(h=>{const d=h.match(/]*fetchpriority="high"[^>]*>/);if(!d)return;const c=d[0],l=m=>{const y=c.match(new RegExp(m+'="([^"]*)"'));return y?y[1]:""},f=new Image,r=l("srcset");r&&(f.sizes=l("sizes")||"100vw",f.srcset=r),f.src=l("src")}).catch(()=>{}))};R.addEventListener("pointerover",t,{passive:!0}),R.addEventListener("touchstart",t,{passive:!0}),R.addEventListener("focusin",t)}const Co=e=>"requestIdleCallback"in window?requestIdleCallback(e,{timeout:1500}):setTimeout(e,300),Io=`#version 300 es in vec2 p;void main(){gl_Position=vec4(p,0.,1.);}`,zo="k11 K10 k1 K20 k1 K10 k1 K10 D10 M1 L10 k21 D1 M10 D11 k11 K10 k1 K20 k1 K10 k1 K10 k22 K20 k1 K10 k1 K20 k11 D1 M10 D11 M10 k11 K10 k1 K10 k1 K20 k1 K10 M1 L10 M11 D10 M1 L20 M1 k10 D1 M32 L10 D11 K10 k1 K20 k1 K10 k1 K10 L10 M1 k10 M1 L20 M1 L10 M1 L10 M10 D1 K10 k1 K20 k1 K10 k1 K10 D11 M10 k11 K10 k1 K10 k1 K20 k1 K10 k1 K20 k1 K10 k1 K20 M1 L10 M1 L10 k10 D1 M10 k11 M11 D10 M1 L10 k10 M1 L10 M1 L10 K10 k1 K10 k1 K20 k1 K10 D1 M21 L10 M1 D10",Po={K:[42,1,43],k:[51,1,52],D:[73,0,198],M:[93,1,251],L:[213,188,255]},Ue=`vec3 m289(vec3 x){return x-floor(x*(1./289.))*289.;}vec4 m289(vec4 x){return x-floor(x*(1./289.))*289.;}vec4 prm(vec4 x){return m289(((x*34.)+1.)*x);} vec4 tis(vec4 r){return 1.79284291400159-.85373472095314*r;}vec3 fd(vec3 t){return t*t*t*(t*(t*6.-15.)+10.);} float cn(vec3 P){vec3 i0=floor(P),i1=i0+1.;i0=m289(i0);i1=m289(i1);vec3 f0=fract(P),f1=f0-1.;vec4 ix=vec4(i0.x,i1.x,i0.x,i1.x),iy=vec4(i0.yy,i1.yy),z0=i0.zzzz,z1=i1.zzzz; vec4 ixy=prm(prm(ix)+iy),a0=prm(ixy+z0),a1=prm(ixy+z1);vec4 gx0=a0*(1./7.),gy0=fract(floor(gx0)*(1./7.))-.5;gx0=fract(gx0);vec4 gz0=.5-abs(gx0)-abs(gy0),s0=step(gz0,vec4(0.));gx0-=s0*(step(0.,gx0)-.5);gy0-=s0*(step(0.,gy0)-.5); vec4 gx1=a1*(1./7.),gy1=fract(floor(gx1)*(1./7.))-.5;gx1=fract(gx1);vec4 gz1=.5-abs(gx1)-abs(gy1),s1=step(gz1,vec4(0.));gx1-=s1*(step(0.,gx1)-.5);gy1-=s1*(step(0.,gy1)-.5); vec3 g000=vec3(gx0.x,gy0.x,gz0.x),g100=vec3(gx0.y,gy0.y,gz0.y),g010=vec3(gx0.z,gy0.z,gz0.z),g110=vec3(gx0.w,gy0.w,gz0.w),g001=vec3(gx1.x,gy1.x,gz1.x),g101=vec3(gx1.y,gy1.y,gz1.y),g011=vec3(gx1.z,gy1.z,gz1.z),g111=vec3(gx1.w,gy1.w,gz1.w); vec4 n0=tis(vec4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));g000*=n0.x;g010*=n0.y;g100*=n0.z;g110*=n0.w; vec4 n1=tis(vec4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));g001*=n1.x;g011*=n1.y;g101*=n1.z;g111*=n1.w; float a=dot(g000,f0),b=dot(g100,vec3(f1.x,f0.yz)),c=dot(g010,vec3(f0.x,f1.y,f0.z)),d=dot(g110,vec3(f1.xy,f0.z)),e=dot(g001,vec3(f0.xy,f1.z)),f=dot(g101,vec3(f1.x,f0.y,f1.z)),g=dot(g011,vec3(f0.x,f1.yz)),h=dot(g111,f1); vec3 u=fd(f0);vec4 nz=mix(vec4(a,b,c,d),vec4(e,f,g,h),u.z);vec2 ny=mix(nz.xy,nz.zw,u.y);return 2.2*mix(ny.x,ny.y,u.x);}`,Do=`#version 300 es precision highp float; in vec2 uv; uniform mat4 uPV;uniform float uT,uScroll,uMaxH,uDist,uRoad,uXs; out float vD;out float vFog; ${Ue} void main(){ float t=uT*3.; float ac=uv.y*12.566+t*.9; float co=(sin(ac)+sin(ac*.5))*uDist; float h=cn(vec3(uv.x*10.,uv.y*10.+uScroll,10.))+1.; h*=pow(abs(cos((uv.x-co)*3.1416)),1.5+uRoad); vD=h; vec3 p=vec3((-50.+100.*uv.x)*uXs,h*uMaxH*mix(1.,uXs,.5),20.-400.*uv.y); vec4 c=uPV*vec4(p,1.); vFog=clamp(-(p.z-4.)/400.,0.,1.); gl_Position=c; }`,qo=`#version 300 es precision highp float; uniform sampler2D uPal;uniform float uT;uniform vec3 uFog; in float vD;in float vFog;out vec4 o; void main(){ vec3 c=texture(uPal,vec2(vD*(sin(uT*.7)*.22+.78),.5)).rgb*(1.-vD*.8)*1.12; c=max(c,0.); c=mix(c,uFog,smoothstep(0.,1.,vFog)); o=vec4(c,1.); }`,mo=` /* comets: all on one course, from the top right down toward the middle of the horizon, like a shower from one radiant. Some short and quick, some long and slow with a tail across half the sky; often two side by side. A white-hot head with a magenta bloom, a tail that widens and cools to violet, a faint ion streak */ float asp=uR.x/uR.y,hz=smoothstep(.03,.2,e); vec2 dir=normalize(vec2(-1.,-.56)),nr=vec2(-dir.y,dir.x); for(int i=0;i<4;i++){ float fi=float(i),P=3.2+fi*1.55,tt=uT+fi*1.37,k=floor(tt/P),life=tt-k*P,pair=step(.55,hs(vec2(k,fi+11.))); float big=pow(hs(vec2(fi+4.,k+9.)),1.6); float off=(hs(vec2(k,fi))-.5)*1.25; vec2 st=vec2(asp*.58,.86)+nr*off-dir*(.25+big*.3); float L=1.05+big*.75+hs(vec2(k+3.,fi))*.25,D=.85+big*.75+hs(vec2(k+1.,fi+2.))*.2,tlen=.28+big*1.35; for(int j=0;j<2;j++){ float fj=float(j),lj=life-fj*.12; if(j==1&&pair<.5)break; if(lj<0.||lj>D)continue; float u=lj/D,en=sin(u*3.1416),fl=pow(en,.7); vec2 rel=q-(st+nr*fj*.07-dir*fj*.05+dir*(u*u*.3+u*.8)*L); float al=dot(rel,-dir),ac=length(rel+dir*al),tl=(tlen-fj*.08)*(.3+.7*en); float ahead=step(0.,al),fall=1.-smoothstep(0.,tl,al); float sg=.0018+al*.012*(1.-big*.35),core=exp(-ac*ac/(sg*sg))*fall*ahead; float ion=exp(-ac*ac/(.0008+al*al*.0003))*(1.-smoothstep(0.,tl*1.6,al))*ahead*.35; float r2=dot(rel,rel),head=exp(-r2/(.00003+big*.00003))*1.7+exp(-r2/.0016)*(.3+big*.25)+exp(-sqrt(r2)*7.)*.1; float w=fl*(1.-fj*.22)*(.75+big*.5); vec3 tc=mix(vec3(0.968333,0.95,1),vec3(0.562667,0.12,1),smoothstep(0.,.35,al/max(tl,.01))); tc=mix(tc,vec3(.55,.08,.75),smoothstep(.45,1.,al/max(tl,.01))); c+=(tc*core*1.5+vec3(0.583333,0.5,1)*ion+mix(vec3(0.606667,0.3,1),vec3(1.),exp(-r2/.00004))*head)*w*hz; } } `,jo=`#version 300 es precision highp float; uniform vec2 uR;uniform mat3 uCam;uniform float uTan,uSun,uT; out vec4 o; float hs(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} void main(){ vec2 q=(gl_FragCoord.xy*2.-uR)/uR.y; vec3 d=normalize(uCam*vec3(q*uTan,-1.)); float e=d.y; /* magenta dusk: a glowing band on the horizon, plum above, almost black at the top */ vec3 c=mix(vec3(0.466333,0.15,0.74),vec3(0.239333,0.06,0.44),smoothstep(0.,.05,e)); c=mix(c,vec3(0.0823333,0.02,0.19),smoothstep(.03,.16,e)); c=mix(c,vec3(0.0189667,0.006,0.055),smoothstep(.12,.36,e)); c=mix(c,vec3(0.0043,0.003,0.012),smoothstep(.3,.62,e)); c=mix(c,vec3(0.155333,0.04,0.3),1.-smoothstep(-.03,0.,e)); /* the sun: a magenta glow sitting on the horizon, white-hot in the middle */ vec3 sd=normalize(vec3(0.,uSun,-1.));float a=acos(clamp(dot(d,sd),-1.,1.)); c+=vec3(0.55,0.1,1)*exp(-a*a*55.)*.5+vec3(0.588333,0.35,1)*exp(-a*a*700.)*.55; c=mix(c,mix(vec3(0.573333,0.2,1),vec3(0.911333,0.86,1),exp(-a*a*9000.)),1.-smoothstep(.0145,.0165,a)); ${mo} o=vec4(c,1.); }`,Bo="A26 B16 C9 E4 W1 E3 C10 B18 A30 M1 A22 B14 C11 E5 W2 E4 C9 B16 A28 P2 A20 B17 C10 E4 W1 E5 C12 B15 A26 M1 A24",Oo={A:[22,22,24],B:[52,52,56],C:[96,96,102],E:[160,160,166],W:[232,232,236],M:[74,74,80],P:[120,120,126]},Uo=`#version 300 es precision highp float; in vec2 uv; uniform mat4 uPV;uniform float uS,uXs; out vec3 vN;out float vH;out float vFog; ${Ue} float h2(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} float hills(vec2 p){return cn(vec3(p*.014,1.7))*5.+cn(vec3(p*.045,4.1))*1.4;} float ground(vec2 p){ float h=hills(p);vec2 gi=floor(p/16.); for(int j=-1;j<=1;j++)for(int i=-1;i<=1;i++){ vec2 c=gi+vec2(float(i),float(j));if(h2(c+.37)<.28)continue; vec2 o=(c+.2+.6*vec2(h2(c),h2(c+5.1)))*16.;float rad=3.+7.*h2(c+9.2)*h2(c+2.7); float d=length(p-o)/rad; /* soft bowls, rounded rims */ h+=(-(1.-smoothstep(0.,1.,d))*.8+exp(-pow((d-1.05)/.32,2.))*.42)*rad*.42; } return h; } vec3 at(float u,float zw){ float dist=4.-zw,s=uS+dist; float xw=(u-.5)*2.*(16.+max(dist,0.)*1.)*uXs; return vec3(xw,ground(vec2(xw,s))-hills(vec2(0.,uS+6.)),s); } void main(){ float zw=20.-400.*uv.y; vec3 g=at(uv.x,zw); float e=.6,du=e/(2.*(16.+max(4.-zw,0.))*uXs); vec3 gx=at(uv.x+du,zw),gz=at(uv.x,zw-e); vN=normalize(cross(vec3(0.,gz.y-g.y,-e),vec3(gx.x-g.x,gx.y-g.y,0.))); if(vN.y<0.)vN=-vN; vH=g.y;vFog=clamp((4.-zw)/400.,0.,1.); gl_Position=uPV*vec4(g.x,g.y,zw,1.); }`,$o=`#version 300 es precision highp float; uniform sampler2D uPal;uniform float uT;uniform vec3 uFog; in vec3 vN;in float vH;in float vFog;out vec4 o; void main(){ vec3 n=normalize(vN),L=normalize(vec3(-.7,.45,-.3)); float dif=max(dot(n,L),0.); vec3 c=texture(uPal,vec2(vH*.055+uT*.006,.5)).rgb; c*=.5+dif*1.; c=mix(c,uFog,smoothstep(.05,1.,vFog)); o=vec4(c,1.); }`,Ho=`#version 300 es precision highp float; uniform vec2 uR;uniform mat3 uCam;uniform float uTan,uT,uEl,uEx,uR0; out vec4 o; ${Ue} float hs(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} void main(){ vec2 q=(gl_FragCoord.xy*2.-uR)/uR.y; vec3 d=normalize(uCam*vec3(q*uTan,-1.)); float e=d.y; /* night: near black, a faint glow on the horizon */ vec3 c=mix(vec3(0.0566667,0.03,0.13),vec3(0.0283333,0.02,0.07),smoothstep(0.,.06,e)); c=mix(c,vec3(.02,.008,.025),smoothstep(.04,.22,e)); c=mix(c,vec3(.006,.004,.009),smoothstep(.2,.6,e)); vec2 sg=floor(q*170.),sf=fract(q*170.)-.5;float sr=hs(sg); c+=vec3(.86,.84,1.)*step(.9965,sr)*(.3+.7*hs(sg+3.))*(.75+.25*sin(uT*1.7+sr*90.))*exp(-dot(sf,sf)*16.)*smoothstep(.12,.35,e); /* the big sphere: one magenta body that looms. It comes closer as you scroll (it grows), its night side is almost black, a slow dark band of storm crosses it, the silhouette wobbles a little and the rim glow beats slowly, like a pulse */ vec3 ed=normalize(vec3(uEx,uEl,-1.)),rt=normalize(cross(ed,vec3(0.,1.,0.))),up=cross(rt,ed); float R=uR0;vec2 pp=vec2(dot(d,rt),dot(d,up))/sin(R); float ang=atan(pp.y,pp.x),wob=1.+.009*cn(vec3(cos(ang)*1.6,sin(ang)*1.6,uT*.28)); pp/=wob;float r2=dot(pp,pp),rr=sqrt(r2); vec3 L=normalize(vec3(-.75,.4,-.25)); float beat=.72+.28*pow(.5+.5*sin(uT*.8),2.); vec3 mg=vec3(0.565667,0.03,1); if(r2<1.&&dot(d,ed)>0.){ float z=sqrt(1.-r2);vec3 N=rt*pp.x+up*pp.y-ed*z;float lit=dot(N,L); float lat=pp.y+cn(vec3(pp*1.4,uT*.05))*.09; float band=.5+.5*sin(lat*8.+uT*.1); float storm=smoothstep(.15,.6,cn(vec3(pp.x*1.2+uT*.025,pp.y*3.,3.))); vec3 b=mix(vec3(0.229667,0.01,0.5),vec3(0.537667,0.22,0.95),band*.3); b*=1.-storm*.55; float day=smoothstep(-.35,.85,lit); vec3 col=b*(.05+day*.95); col=mix(col,mg,pow(1.-z,1.8)*.7*(.55+.45*beat)); c=mix(c,col,smoothstep(1.,.99,rr)); } c+=mg*exp(-max(rr-1.,0.)*7.)*step(.99,rr)*.6*beat; c+=mg*exp(-max(rr-1.,0.)*1.8)*step(.99,rr)*.16*beat; ${mo} o=vec4(c,1.); }`,No=e=>{let t=null;try{t=e.getContext("webgl2",{antialias:!0,alpha:!1,powerPreference:"high-performance",preserveDrawingBuffer:pt})}catch{t=null}if(!t)return!1;const n=(D,x)=>{const w=t.createShader(D);return t.shaderSource(w,x),t.compileShader(w),t.getShaderParameter(w,t.COMPILE_STATUS)?w:(console.warn(t.getShaderInfoLog(w)),null)},o=(D,x,w)=>{const T=n(t.VERTEX_SHADER,D),q=n(t.FRAGMENT_SHADER,x);if(!T||!q)return null;const _=t.createProgram();if(t.attachShader(_,T),t.attachShader(_,q),t.bindAttribLocation(_,0,w),t.linkProgram(_),!t.getProgramParameter(_,t.LINK_STATUS))return null;const j={};return{p:_,U:H=>j[H]!==void 0?j[H]:j[H]=t.getUniformLocation(_,H)}},a=e.dataset.planet==="moon",s=a?o(Uo,$o,"uv"):o(Do,qo,"uv"),h=o(Io,a?Ho:jo,"p");if(!s||!h)return!1;const d=Z<768,c=d?110:180,l=d?220:340,f=new Float32Array((c+1)*(l+1)*2);let r=0;for(let D=0;D<=l;D++)for(let x=0;x<=c;x++)f[r++]=x/c,f[r++]=D/l;const m=new Uint16Array(c*l*6);r=0;for(let D=0;D{const w=L[x[0]],T=+x.slice(1)*(a?3:1);for(let q=0;q{const D=e.getBoundingClientRect(),x=Math.min(devicePixelRatio||1,d?1.5:1.25);I=Math.max(2,Math.round(D.width*x)),z=Math.max(2,Math.round(D.height*x)),e.width=I,e.height=z};A(),_t(A);const C={x:.5,y:.45,xd:.5,yd:.45};let O=pt?3.2:Math.random()*20,et=0,ot=0;const W=D=>{const x=dt(P);ot=Y((k-x.top)/(k+x.height),0,1),pt||(O+=D/1e3),et+=D/1e3*(1+Math.min(6,Math.abs(Ft)*.08)),nt?(C.x=Y(Et/Z,0,1),C.y=Y(V?bt/k:(bt-x.top)/Math.max(1,x.height),0,1)):(C.x=.5+Math.sin(O*.21)*.3,C.y=.35+ot*.3),C.xd=at(C.xd,C.x,.06),C.yd=at(C.yd,C.y,.06);const w=a?6.2+C.yd*3.2:4.5+C.yd*5.5,T=d?.16:.11,q=d?66:58,_=Math.tan(q*Math.PI/360),j=I/z,H=Math.cos(T),Q=Math.sin(T),gt=1/_,$=.1,X=2e3,tt=[1,0,0,0,0,H,-Q,0,0,Q,H,0,0,-(H*w+Q*4),Q*w-H*4,1],G=[gt/j,0,0,0,0,gt,0,0,0,0,(X+$)/($-X),-1,0,0,2*X*$/($-X),0],J=new Float32Array(16);for(let ht=0;ht<4;ht++)for(let rt=0;rt<4;rt++){let St=0;for(let lt=0;lt<4;lt++)St+=G[lt*4+rt]*tt[ht*4+lt];J[ht*4+rt]=St}t.viewport(0,0,I,z),t.disable(t.DEPTH_TEST),t.useProgram(h.p),t.bindVertexArray(v),t.uniform2f(h.U("uR"),I,z),t.uniform1f(h.U("uTan"),_),t.uniform1f(h.U("uT"),O),a?(t.uniform1f(h.U("uEl"),-.02+ot*.16),t.uniform1f(h.U("uEx"),d?.05:.22),t.uniform1f(h.U("uR0"),.36+ot*.12)):t.uniform1f(h.U("uSun"),.006+ot*.03),t.uniformMatrix3fv(h.U("uCam"),!1,new Float32Array([1,0,0,0,H,Q,0,-Q,H])),t.drawArrays(t.TRIANGLES,0,3),t.enable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.useProgram(s.p),t.bindVertexArray(y),t.uniformMatrix4fv(s.U("uPV"),!1,J),a?(t.uniform1f(s.U("uS"),et*16+C.yd*8),t.uniform1f(s.U("uXs"),Y(I/z/1.6,.6,1)),t.uniform1f(s.U("uT"),O),t.uniform3f(s.U("uFog"),.07,.06,.08)):(t.uniform1f(s.U("uT"),O),t.uniform1f(s.U("uScroll"),et+C.yd*4),t.uniform1f(s.U("uMaxH"),10),t.uniform1f(s.U("uDist"),Math.sin(O)*.1),t.uniform1f(s.U("uRoad"),.6+C.xd*2.8),t.uniform1f(s.U("uXs"),Y(I/z/1.6,.32,1)),t.uniform3f(s.U("uFog"),.3,.05,.28)),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,M),t.uniform1i(s.U("uPal"),0),t.drawElements(t.TRIANGLES,m.length,t.UNSIGNED_SHORT,0),t.bindVertexArray(null)};return W(16),pt||At(P,W,"10% 0px"),e.classList.add("is-live"),P.classList.add("pl-on"),!0};F("[data-planet]").forEach(e=>{if(N)return;const t=()=>{if(!(ut()||yt))try{No(e)}catch(n){console.warn(n)}};pt?t():new IntersectionObserver((n,o)=>n.forEach(a=>{a.isIntersecting&&(o.disconnect(),Co(t))}),{rootMargin:"60% 0px"}).observe(e)}),F("[data-depth]").forEach(e=>{const t=E(".depth__stage",e),n=E("[data-depth-n]",e),o=E(".depth__strips",e),a=E(".depth__img",e),s=E(".depth__title",e),h=e.nextElementSibling,d=e.classList.contains("depth--fade"),c=e.classList.contains("depth--reveal"),l=o&&!yt?F("i",o):[];if(N){t.style.setProperty("--e",1),t.style.setProperty("--ia",1);return}if(yt){const v=E(".depth__seq",e);v&&v.remove(),e.classList.remove("depth--seq"),e.classList.add("depth--still","depth--flat"),t.style.setProperty("--e",1),t.style.setProperty("--ia",1),n&&(n.textContent="100"),a&&new IntersectionObserver((p,i)=>p.forEach(b=>{b.isIntersecting&&(a.loading="eager",i.disconnect())}),{rootMargin:"150% 0px"}).observe(e),s&&ae([s],p=>p.classList.add("in"));return}if(o&&a&&!yt){const v=()=>{const p=a.currentSrc||a.src;p&&o.style.setProperty("--img",`url("${p}")`)};a.complete&&a.naturalWidth?v():a.addEventListener("load",v,{once:!0}),new IntersectionObserver((p,i)=>p.forEach(b=>{b.isIntersecting&&(a.loading="eager",i.disconnect())}),{rootMargin:"120% 0px"}).observe(e)}let f=E(".depth__seq",e);f&&(zt||se)&&(f.remove(),f=null,e.classList.remove("depth--seq"),e.classList.add("depth--still"));let r=null;if(f&&!pt&&(yt||!ut())){const v=+f.dataset.seqN||0,p=f.dataset.seq,i=f.getContext("2d",{alpha:!1}),b=Z<768||Z=L;$>>=1)for(let X=0;X`${p}/${S}${String($).padStart(2,"0")}.webp`;let z=-99;const A=$=>{let X=0;for(const tt of P)tt>=$&&X++;return X},C=()=>{let $=0,X=M.length,tt=0,G=0;const J=performance.now(),ht=()=>{if($>=X||Pt&&Pt.signal.aborted)return;const rt=M[$++],St=lt=>{if(r.fr[rt]=lt,r.drawn=-1,Math.abs(rt-z)<14&&(z=-99),V&<&<.size&&(G+=lt.size,++tt===6)){const Yt=G*8/Math.max(.05,(performance.now()-J)/1e3)/1e6;X=Yt<2.5?A(4):Yt<7?A(2):M.length}};if(V)fetch(I(rt),Pt?{signal:Pt.signal}:void 0).then(lt=>lt.ok?lt.blob():null).then(lt=>{lt&&St(lt)},()=>{}).then(ht);else{const lt=new Image;lt.decoding="async",lt.src=I(rt),(lt.decode?lt.decode():new Promise(Yt=>{lt.onload=Yt})).then(()=>St(lt),()=>{}).then(ht)}};for(let rt=0;rt<6;rt++)ht()};let O=!1,et=!1,ot=!1;const W=()=>{O&&et&&!ot&&(ot=!0,C())};ke(()=>{et=!0,W()},9e3),new IntersectionObserver(($,X)=>$.forEach(tt=>{tt.isIntersecting&&(O=!0,W(),X.disconnect())}),{rootMargin:yt?"140% 0px":"230% 0px"}).observe(e);const D=+f.dataset.seqFy||.5,x=()=>{const $=f.getBoundingClientRect(),X=b?720:1920,tt=1080,G=Math.max($.width/X,$.height/tt),J=Math.max(1,Math.min(devicePixelRatio||1,1/G)),ht=Math.round($.width*J),rt=Math.round($.height*J);ht===r.W&&rt===r.H||(r.W=f.width=ht,r.H=f.height=rt,r.drawn=-1)};x(),_t(x);const w=new Map,T=$=>w.get($)||(V?null:r.fr[$]),q=$=>{for(let X=0;X{const tt=$.naturalWidth||$.width,G=$.naturalHeight||$.height,J=Math.max(r.W/tt,r.H/G),ht=tt*J,rt=G*J;i.globalAlpha=X,i.drawImage($,(r.W-ht)/2,(r.H-rt)*D,ht,rt)},j=3,H=9,Q=$=>{if(Math.abs($-z)<2)return;z=$;const X=$-j,tt=$+H;for(let G=Math.max(0,X);G<=Math.min(v-1,tt);G++){const J=r.fr[G];!J||w.has(G)||(V||"createImageBitmap"in window?(w.set(G,null),createImageBitmap(J).then(ht=>{!w.has(G)||Gz+H+3?(ht.close&&ht.close(),w.get(G)===null&&w.delete(G)):(w.set(G,ht),r.drawn=-1)},()=>w.delete(G))):J.decode&&J.decode().catch(()=>{}))}w.forEach((G,J)=>{(Jtt+3)&&(G&&G.close&&G.close(),w.delete(J))})},gt=()=>{w.forEach($=>{$&&$.close&&$.close()}),w.clear(),z=-99};new IntersectionObserver($=>$.forEach(X=>{X.isIntersecting||gt()}),{rootMargin:"60% 0px"}).observe(e),r.draw=()=>{if(Math.abs(r.cur-r.drawn)<.004)return;const $=r.cur,X=Math.floor($);let tt=-1,G=-1;for(let J=X;J>=Math.max(0,X-12);J--)if(T(J)){tt=J;break}for(let J=X+1;J<=Math.min(v-1,X+12);J++)if(T(J)){G=J;break}if(tt<0&&G<0){const J=q(X);if(!J)return;_(J,1)}else if(tt<0)_(T(G),1);else{_(T(tt),1);const J=G>tt?($-tt)/(G-tt):0;J>.02&&_(T(G),Math.min(1,J))}i.globalAlpha=1,r.drawn=r.cur,r.ok=!0},At(e,$=>{const X=r.ok?r.qa:0;X!==r.qs&&(r.qs=X,B(f,"--qa",X.toFixed(3))),r.on&&(r.cur=at(r.cur,r.tgt,1-Math.exp(-$/70)),Math.abs(r.cur-r.tgt)<.003&&(r.cur=r.tgt),Q(Math.round(r.tgt)),r.draw())})}let m=-9,y=1;const g=()=>{y=h?Math.max(0,-(parseFloat(getComputedStyle(h).marginTop)||0))/k:1,m=-9};g(),_t(g);const u=()=>{const v=dt(e),p=Math.max(1,(v.height-k)/k),i=(k-v.top)/k;if(Math.abs(i-m)<.0015||(m=i,h&&(B(h,"--cov",(1-K(p+1,p+1.3,i)).toFixed(3)),B(t,"visibility",i>p+1.01?"hidden":"visible")),v.bottom<0||v.top>k))return;const b=r&&i>1?1+(i-1)*1.45:i,S=Mt?1:K(.22,1.55,b);if(B(t,"--e",S.toFixed(4)),i>.8&&s&&!s.classList.contains("in")&&s.classList.add("in"),Mt||B(t,"--ty",(-Math.max(0,i-(p+1-y))*k).toFixed(1)+"px"),r){const M=p-(d?.64:.06),P=Y((i-r.t0)/(M-r.t0),0,1);if(r.qa=K(1.37,1.44,i),r.on=i>1.3,r.tgt=P*(r.n-1),n&&i>r.t0){const V=Math.round(P*120),I=`00:0${Math.floor(V/24)}:${String(V%24).padStart(2,"0")}`;n.textContent!==I&&(n.textContent=I)}}if(d||c){const M=r?r.t0:1.42,P=p-.64,V=M+.7*(P-M),I=Math.max(1.72,V-.42),z=K(I,I+.42,i);Mt?B(t,"--tto",(1-K(I-.05,I+.3,i)).toFixed(3)):(B(t,"--tt",(-z*z*.98*k).toFixed(1)+"px"),B(t,"--tto",(1-K(I+.24,I+.42,i)).toFixed(3)),c&&B(t,"--tr",z.toFixed(4)),r||B(t,"--kb",K(1.5,p,i).toFixed(4)))}else r&&(Mt?B(t,"--tto",(1-K(r.t0,r.t0+.3,i)).toFixed(3)):B(t,"--tt",(-Math.max(0,i-r.t0)*k).toFixed(1)+"px"));d&&B(t,"--fo",(r?K(p-.62,p-.12,i):K(p-.45,p-.05,i)).toFixed(4));const L=b>=1.56;if(L!==t._b&&(t._b=L,t.classList.toggle("is-built",L)),l.length&&(l.forEach((M,P)=>B(M,"--s",K(.2+P*.065,.85+P*.065,b).toFixed(3))),B(t,"--sc",K(.2,1.5,b).toFixed(4)),B(t,"--so",(K(.2,.4,b)*(1-K(1.35,1.55,b))).toFixed(3)),B(t,"--ia",K(1.4,1.55,b).toFixed(3))),n&&!(r&&i>r.t0)){const M=String(Math.round(S*100)).padStart(3,"0");n.textContent!==M&&(n.textContent=M)}};mt.push(u)});{const e=F(".depth__title");let t=0;const n=()=>{!e.length||innerWidth===t||(t=innerWidth,e.forEach(o=>{if(innerWidth>=768){o.style.removeProperty("font-size");return}const a=o.cloneNode(!0);a.removeAttribute("id"),a.style.cssText="position:absolute;left:-9999px;top:0;font-size:100px;padding:0;transform:none;white-space:nowrap;display:inline-block;visibility:hidden",R.body.appendChild(a);const s=a.getBoundingClientRect().width;a.remove();const h=getComputedStyle(o),d=Math.min(o.parentElement.clientWidth||innerWidth,innerWidth)-parseFloat(h.paddingLeft)-parseFloat(h.paddingRight);s>0&&d>0&&(o.style.fontSize=Math.max(44,Math.min(112,d*.95/s*100)).toFixed(1)+"px")}))};e.length&&((R.fonts&&R.fonts.ready?R.fonts.ready:Promise.resolve()).then(n),_t(n))}const Wt=E("[data-tri-sec]");if(Wt){const e=F(".tri__line",Wt),t=F(".tri__scene",Wt),n=E("[data-tri-n]",Wt);let o=-1,a=()=>{};const s=z=>{z!==o&&(o=z,e.forEach((A,C)=>A.classList.toggle("on",C===z)),t.forEach((A,C)=>A.classList.toggle("on",C===z)),n&&(n.textContent="0"+(z+1)),a(z))},h=E("[data-render]",Wt),d=h&&h.closest(".tv");let c=null,l=null;if(h&&!N&&!pt&&!ut()&&!yt){try{c=h.getContext("webgl2",{antialias:!1,alpha:!1,powerPreference:"high-performance"})}catch{}if(c){const z=`#version 300 es precision highp float; uniform vec2 uR; uniform float uSplit; uniform mat3 uRot; out vec4 o; float sdOct(vec3 p, float s){ p = abs(p); float m = p.x + p.y + p.z - s; vec3 q; if (3. * p.x < m) q = p; else if (3. * p.y < m) q = p.yzx; else if (3. * p.z < m) q = p.zxy; else return m * .57735027; float k = clamp(.5 * (q.z - q.y + s), 0., s); return length(vec3(q.x, q.y - s + k, q.z - k)); } float obj(vec3 p){ vec3 q = uRot * (p - vec3(0., .12, 0.)); return sdOct(vec3(q.x, q.y * .78, q.z), .78) * .78 - .03; } const float FY = -1.02; vec3 nrm(vec3 p){ vec2 e = vec2(.0015, 0.); return normalize(vec3(obj(p + e.xyy) - obj(p - e.xyy), obj(p + e.yxy) - obj(p - e.yxy), obj(p + e.yyx) - obj(p - e.yyx))); } float march(vec3 ro, vec3 rd, float tmax){ float t = 0.; for (int i = 0; i < 80; i++){ float d = obj(ro + rd * t); if (d < .0008) return t; t += d * .95; if (t > tmax) break; } return -1.; } vec3 shadeRender(vec3 p, vec3 rd){ vec3 n = nrm(p), v = -rd, base = vec3(0.43,0.1,1); vec3 L1 = normalize(vec3(-.55, .8, .6)), L2 = normalize(vec3(.85, -.1, .4)); float dif = max(dot(n, L1), 0.), dif2 = max(dot(n, L2), 0.); vec3 col = base * (.12 + .85 * dif + .3 * dif2); vec3 r = reflect(rd, n); col += vec3(0.873333,0.8,1) * smoothstep(.7, .95, dot(r, normalize(vec3(-.4, .8, .45)))) * .9; col += vec3(0.860667,0.78,1) * smoothstep(.85, .97, dot(r, normalize(vec3(.8, .3, .5)))) * .5; col += vec3(0.588333,0.35,1) * pow(1. - max(dot(n, v), 0.), 3.) * .45; col += pow(max(dot(reflect(-L1, n), v), 0.), 70.) * .9; return col; } vec3 shadeClay(vec3 p){ vec3 n = nrm(p); vec3 L = normalize(vec3(-.5, .85, .55)); float dif = max(dot(n, L), 0.), amb = .5 + .5 * n.y; return vec3(.62, .6, .63) * (.25 + .7 * dif) * (.6 + .4 * amb); } void main(){ vec2 uv = (gl_FragCoord.xy * 2. - uR) / uR.y; bool clay = gl_FragCoord.x < uSplit * uR.x; vec3 ro = vec3(0., .5, 4.4), ta = vec3(0., -.12, 0.); vec3 f = normalize(ta - ro), rr = normalize(cross(f, vec3(0., 1., 0.))), uu = cross(rr, f); vec3 rd = normalize(f * 2.3 + uv.x * rr + uv.y * uu); /* studio: black, a soft magenta bloom high behind the object */ vec3 col = mix(vec3(.012, .008, .016), vec3(0.0183333,0.01,0.06), smoothstep(-.4, .9, uv.y)); col += vec3(0.196,0.02,0.5) * exp(-dot(uv - vec2(.05, .45), uv - vec2(.05, .45)) * 2.4) * (clay ? .12 : .35); if (clay) col = vec3(dot(col, vec3(.33)) * .9); float tf = rd.y < 0. ? (FY - ro.y) / rd.y : 1e9; float to = march(ro, rd, min(tf, 12.)); if (to > 0.) { vec3 p = ro + rd * to; col = clay ? shadeClay(p) : shadeRender(p, rd); } else if (tf < 30.) { vec3 p = ro + rd * tf; vec2 g = abs(fract(p.xz * 1.5) - .5) / fwidth(p.xz * 1.5); float grid = 1. - min(min(g.x, g.y), 1.); float fade = exp(-tf * .16); float sh = smoothstep(0., 1.2, length(p.xz)) * .65 + .35; vec3 fl = (clay ? vec3(.14) : vec3(0.016,0.01,0.04)) * sh + grid * (clay ? .18 : .22) * vec3(.561,clay?.341:.62,.949) * fade; if (!clay) { vec3 rd2 = reflect(rd, vec3(0., 1., 0.)), p2 = p + vec3(0., .002, 0.); float t2 = march(p2, rd2, 6.); if (t2 > 0.) fl += shadeRender(p2 + rd2 * t2, rd2) * .32 * exp(-t2 * .5); } col = mix(col, fl, fade * .95 + .05); } col = 1. - exp(-col * 1.7); vec2 q = gl_FragCoord.xy / uR; col *= .55 + .45 * pow(16. * q.x * q.y * (1. - q.x) * (1. - q.y), .18); o = vec4(col, 1.); }`,A=`#version 300 es void main(){ vec2 p = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2); gl_Position = vec4(p * 2. - 1., 0., 1.); }`,C=(et,ot)=>{const W=c.createShader(et);return c.shaderSource(W,ot),c.compileShader(W),W},O=c.createProgram();if(c.attachShader(O,C(c.VERTEX_SHADER,A)),c.attachShader(O,C(c.FRAGMENT_SHADER,z)),c.linkProgram(O),c.getProgramParameter(O,c.LINK_STATUS)){c.useProgram(O),c.bindVertexArray(c.createVertexArray());const et=c.getUniformLocation(O,"uR"),ot=c.getUniformLocation(O,"uSplit"),W=c.getUniformLocation(O,"uRot"),D=E("[data-tv-split]",d),x=E("[data-tv-s]",d),w=E("[data-tv-t]",d),T=E("[data-tv-bar]",d);let q=0,_=.75,j=16,H=0;d.classList.add("is-gl"),l=Q=>{q+=Q/1e3,j=at(j,Q,.05),++H>90&&j>34&&_>.45&&(_*=.85,H=0);const gt=Math.round(h.clientWidth*Math.min(1.5,devicePixelRatio||1)*_),$=Math.round(h.clientHeight*Math.min(1.5,devicePixelRatio||1)*_);(h.width!==gt||h.height!==$)&&(h.width=gt,h.height=$);const X=q%7/7,tt=.12+.76*(.5-.5*Math.cos(X*Math.PI*2)),G=q*.45,J=.35+Math.sin(q*.3)*.12,ht=Math.cos(G),rt=Math.sin(G),St=Math.cos(J),lt=Math.sin(J);c.viewport(0,0,gt,$),c.uniform2f(et,gt,$),c.uniform1f(ot,tt),c.uniformMatrix3fv(W,!1,new Float32Array([ht,rt*lt,-rt*St,0,St,lt,rt,-ht*lt,ht*St])),c.drawArrays(c.TRIANGLES,0,3);const Yt=1-Math.abs(X*2-1);B(D,"--sx",(tt*100).toFixed(2)+"%"),B(T,"--rb",(tt*100).toFixed(1)+"%");const Ae="Samples "+Math.round(tt*256)+"/256";x.textContent!==Ae&&(x.textContent=Ae);const Me="00:"+(q%60).toFixed(1).padStart(4,"0");w.textContent!==Me&&(w.textContent=Me)}}}}const f=E("[data-type]",Wt),r=f&&f.closest(".tc"),m=r?F("[data-g]",r):[],y=[];f&&f.childNodes.forEach(z=>y.push({c:z.nodeType===1?z.className:"",t:z.textContent}));const g=y.reduce((z,A)=>z+A.t.length,0),u=z=>z.replace(/&/g,"&").replace(/{let A="",C=z;for(const O of y){if(C<=0)break;const et=O.t.slice(0,C);C-=et.length,A+=O.c?`${u(et)}`:u(et)}return A+''};let p=0,i=0,b=-1;const S=z=>{if(p=g&&(b=0))}else b>=0&&(b+=z/1e3,r.classList.add("is-scores"),m.forEach((A,C)=>{const O=K(.2+C*.15,1.5+C*.15,b);B(A.parentNode,"--g",O.toFixed(3));const et=String(Math.round(O*100));A.textContent!==et&&(A.textContent=et)}))},L=()=>{f&&(p=0,i=0,b=-1,f.innerHTML=v(0),r.classList.remove("is-scores"),m.forEach(z=>{B(z.parentNode,"--g","0"),z.textContent="0"}))};let M=null;const P=z=>{o===1&&l&&l(z),o===2&&f&&S(z)};if(!c&&d){const z=E("[data-tv-s]",d),A=E("[data-tv-t]",d),C=E("[data-tv-split]",d),O=E("[data-tv-bar]",d);z&&(z.textContent="Samples 128/256"),A&&(A.textContent="00:01.8"),C&&B(C,"--sx","50%"),O&&B(O,"--rb","50%")}const I=()=>{f&&(p=g,b=-1,f.innerHTML=v(g),r.classList.add("is-scores"),m.forEach(z=>{B(z.parentNode,"--g","1"),z.textContent="100"}))};if(a=z=>{z===2&&(yt?I():L())},f&&!N&&L(),s(0),!N){const z=()=>{const A=dt(Wt);if(A.bottom<0||A.top>k)return;const C=Y(-A.top/Math.max(1,A.height-k),0,1);s(Math.min(2,Math.floor(C*3.1)))};mt.push(z),At(Wt,P,"10% 0px")}}F("[data-fv]").forEach(e=>{const t=F("[data-fv-i]",e),n=F(".fv__p",e),o=F(".fv__dots i",e),a=t.length;if(!a)return;let s=-1,h=-1;const d=l=>{l!==s&&(s=l,t.forEach((f,r)=>f.classList.toggle("is-on",r===l)),n.forEach((f,r)=>f.classList.toggle("on",r===l)),o.forEach((f,r)=>{f.classList.toggle("on",r===l),f.classList.toggle("done",rl.classList.add("is-on")),n[0]&&n[0].classList.add("on"));return}d(0);const c=()=>{const l=dt(e);if(l.bottom<0||l.top>k)return;const f=Y(-l.top/Math.max(1,l.height-k),0,.9999),r=Math.min(a-1,Math.floor(f*a)),m=f*a-r;if(h>=0)return;d(r);const y=o[r];y&&B(y,"--fp",m.toFixed(3))};mt.push(c),nt&&t.forEach((l,f)=>{l.addEventListener("pointerenter",()=>{h=f,d(f);const r=o[f];r&&r.style.setProperty("--fp","1")}),l.addEventListener("pointerleave",()=>{h=-1,c()})}),o.forEach((l,f)=>l.addEventListener("click",()=>{const r=dt(e),m=Dt+r.top+(f+.5)/a*Math.max(1,r.height-k);scrollTo({top:m,behavior:"smooth"})}))}),F("[data-marquee]").forEach(e=>{if(N)return;const t=E(".mq__track",e);let n=0,o=0,a=1,s=null,h=0,d=0,c=0,l=0,f=0;const r=()=>{o=t.scrollWidth/2};_t(r),addEventListener("load",r),e.addEventListener("pointerdown",y=>{if(!(y.pointerType==="mouse"&&y.button!==0)){s={id:y.pointerId,px:y.clientX,x0:n},h=0,d=0,c=y.clientX,l=performance.now();try{e.setPointerCapture(y.pointerId)}catch{}e.classList.add("is-grab")}}),e.addEventListener("pointermove",y=>{if(!s||y.pointerId!==s.id)return;const g=performance.now(),u=Math.max(1,g-l);d=at(d,(y.clientX-c)/u,.35),c=y.clientX,l=g,n=s.x0+(y.clientX-s.px)});const m=()=>{s&&(s=null,e.classList.remove("is-grab"),performance.now()-l>90&&(d=0),h=Y(d,-4,4),Math.abs(h)>.05&&(a=h>0?-1:1))};e.addEventListener("pointerup",m),e.addEventListener("pointercancel",m),e.addEventListener("lostpointercapture",m),e.addEventListener("dragstart",y=>y.preventDefault()),At(e,y=>{if(o||r(),!o)return;s||(Ft>.5?a=1:Ft<-.5&&(a=-1),n+=h*y,h*=Math.exp(-y/420),Math.abs(h)<.01&&(h=0),n-=a*(y*.05*(1-Math.min(1,Math.abs(h)*2))+Math.min(40,Math.abs(Ft))*.6));let g=0;for(;n<=-o;)n+=o,g+=o;for(;n>0;)n-=o,g-=o;s&&g&&(s.x0+=g);const u=s?d:h;f=at(f,Y(-Ft*.25-u*4,-10,10),.2),t.style.transform=`translate3d(${n.toFixed(1)}px,0,0) skewX(${f.toFixed(2)}deg)`})}),F("[data-rot]").forEach(e=>{const t=F(".rot__i",e);if(t.length<2||N)return;let n=0,o=0,a=!1;At(e,s=>{if(a||(a=!0,o=-600),o+=s,o<2400)return;o=0;const h=t[n];n=(n+1)%t.length;const d=t[n];h.classList.remove("is-on"),h.classList.add("is-out"),d.classList.remove("is-out"),d.classList.add("is-on"),setTimeout(()=>h.classList.remove("is-out"),900)})}),F("[data-reel-frame]").forEach(e=>{if(N){e.classList.add("is-in");return}if(!(window.CSS&&CSS.supports("animation-timeline: view()"))&&nt){e.classList.add("is-js");let t=-1;mt.push(()=>{const n=dt(e);if(n.top>k*1.2||n.bottom<-k*.2)return;const o=Y((k-n.top)/(.46*(k+n.height)),0,1);Math.abs(o-t)>.001&&(t=o,B(e,"--u",o.toFixed(4)))});return}new IntersectionObserver((t,n)=>t.forEach(o=>{o.isIntersecting&&(e.classList.add("is-in"),n.disconnect())}),{threshold:.18}).observe(e),e.addEventListener("transitionend",t=>{t.target===e&&t.propertyName==="transform"&&e.classList.add("is-set")})}),F("[data-kong-gag]").forEach(e=>{const t=E("[data-kg-big]",e);if("IntersectionObserver"in window&&new IntersectionObserver(s=>s.forEach(h=>e.classList.toggle("is-live",h.isIntersecting))).observe(e),N)return;let n=-9,o=0;mt.push(()=>{const s=dt(e),h=Math.max(.6,(s.height-k)/k),d=(k-s.top)/k;Math.abs(d-n)<.001||(n=d,o=Y((d-.45)/(Math.min(h,.9)+.2),0,1))});const a={kp:0,sx:2.2,sy:3,t:0};At(e,s=>{const h=1-Math.pow(.9,s/16.667);a.t+=s/1e3,a.kp=at(a.kp,K(0,1,o),h);const d=1.8+(nt?Y((Z/2-Et)/Z*5,-2.4,2.4):Math.sin(a.t*.6)*1.2),c=2.6+(nt?Y((k*.45-bt)/k*4,-1.4,1.8):Math.cos(a.t*.5)*.5);a.sx=at(a.sx,d,h*.6),a.sy=at(a.sy,c,h*.6),B(e,"--kp",a.kp.toFixed(4)),t&&(B(t,"--sx",a.sx.toFixed(2)),B(t,"--sy",a.sy.toFixed(2)))})}),F("[data-flame]").forEach(e=>{if(N||pt||ut()||yt)return;let t=null;try{t=e.getContext("webgl2",{antialias:!1,alpha:!1,powerPreference:"low-power"})}catch{}if(!t)return;const n=`#version 300 es precision highp float; uniform vec2 uR; uniform float uT, uB; out vec4 o; float hs(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); } float vn(vec2 p){ vec2 i = floor(p), f = fract(p); f = f * f * (3. - 2. * f); return mix(mix(hs(i), hs(i + vec2(1., 0.)), f.x), mix(hs(i + vec2(0., 1.)), hs(i + vec2(1., 1.)), f.x), f.y); } float fbm(vec2 p){ float s = 0., a = .5; for (int i = 0; i < 5; i++){ s += a * vn(p); p *= 2.03; a *= .5; } return s; } void main(){ vec2 uv = gl_FragCoord.xy / uR; float asp = uR.x / uR.y, x = (uv.x - .5) * asp, y = uv.y - uB, yy = max(y, 0.); /* the flame of chat.mytechpark.io: a column of light rising from the line above the cards, streaked, widening, fading */ float w = .06 + yy * .5; float core = exp(-x * x / (w * w)); float s1 = fbm(vec2(x * 8. / (.35 + yy), yy * 2. - uT * .5)); float s2 = fbm(vec2(x * 20. / (.35 + yy) + 3.1, yy * 1.2 - uT * .85)); float I = core * (.3 + 1.5 * s1 * s2) * exp(-yy * 2.1) * smoothstep(-.01, .03, y); I *= .88 + .12 * sin(uT * 1.6 + s1 * 6.); float below = exp(-x * x / .03) * exp(y * 22.) * step(y, 0.) * .25; vec3 indigo = vec3(.14, .18, .6), violet = vec3(.4, .18, .85), mag = vec3(0.425,0.1,0.85); float edge = smoothstep(.1, .9, abs(x) / max(w, .001)); vec3 col = indigo * I * 1.6 + vec3(.45, .55, 1.) * I * I * .45 + violet * I * edge * .6 + mag * I * smoothstep(.12, .6, yy) * .4 + indigo * below * 1.3; col += vec3(.012, .008, .02) * (1. - uv.y); col += (hs(gl_FragCoord.xy + fract(uT) * 31.) - .5) * .025; o = vec4(max(col, 0.), 1.); }`,o=`#version 300 es void main(){ vec2 p = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2); gl_Position = vec4(p * 2. - 1., 0., 1.); }`,a=(i,b)=>{const S=t.createShader(i);return t.shaderSource(S,b),t.compileShader(S),S},s=t.createProgram();if(t.attachShader(s,a(t.VERTEX_SHADER,o)),t.attachShader(s,a(t.FRAGMENT_SHADER,n)),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))return;t.useProgram(s),t.bindVertexArray(t.createVertexArray());const h=t.getUniformLocation(s,"uR"),d=t.getUniformLocation(s,"uT"),c=t.getUniformLocation(s,"uB"),l=e.parentElement,f=E(".app__cards",l);let r=Math.random()*20,m=!1,y=0,g=0,u=.2,v=0;const p=()=>{y=l.clientWidth,g=l.clientHeight,u=f?1-f.offsetTop/Math.max(1,g):.2};_t(p),At(l,i=>{r+=i/1e3,v++%20===0&&p();const b=Math.round(y*.6),S=Math.round(g*.6);!b||!S||((e.width!==b||e.height!==S)&&(e.width=b,e.height=S),t.viewport(0,0,b,S),t.uniform2f(h,b,S),t.uniform1f(d,r),t.uniform1f(c,u),t.drawArrays(t.TRIANGLES,0,3),m||(m=!0,e.classList.add("is-live")))},"10% 0px")}),F("[data-chat]").forEach(e=>{const t=F(".msg,.brief",e),n=E(".app__card.is-pick",e),o=E(".dock__typed",e),a=E(".dock__send",e),s=E(".dock__n",e),h=E(".dock__bar",e),d=E(".dock__chips",e),c=d?d.innerHTML:"",l=p=>{d&&p&&(d.innerHTML=p.split("|").map(i=>`${i}`).join(""))},f=p=>{h&&h.style.setProperty("--bp",(p/t.length).toFixed(3)),s&&(s.textContent=p>=t.length?"Ready for review":`${p} of ${t.length}`),e.classList.toggle("is-done",p>=t.length)},r=(...p)=>d&&F("span",d).forEach((i,b)=>i.classList.toggle("on",p.includes(b))),m=p=>(p.dataset.pick||"").split(",").filter(Boolean).map(Number);if(N){e.classList.add("is-chat"),t.forEach(i=>i.classList.add("on")),f(t.length);const p=t[t.length-1];l(p.dataset.chips),r(...m(p));return}let y=0;const g=(p,i)=>new Promise(b=>setTimeout(()=>b(i===y),p)),u=()=>{e.classList.remove("is-chat","is-typing","is-cursor","is-click","is-typing-u"),t.forEach(p=>p.classList.remove("on")),o&&(o.textContent=""),f(0),d&&(d.innerHTML=c),n&&n.classList.remove("is-press"),e.style.setProperty("--cx","82%"),e.style.setProperty("--cy","96%")},v=async p=>{if(u(),!await g(900,p))return;if(e.classList.add("is-cursor"),n){const S=e.getBoundingClientRect(),L=n.getBoundingClientRect();e.style.setProperty("--cx",((L.left+L.width*.45-S.left)/S.width*100).toFixed(1)+"%"),e.style.setProperty("--cy",((L.top+L.height*.5-S.top)/S.height*100).toFixed(1)+"%")}if(!await g(950,p)||(e.classList.add("is-click"),n&&n.classList.add("is-press"),!await g(200,p))||(e.classList.remove("is-click"),!await g(220,p))||(e.classList.add("is-chat"),e.classList.remove("is-cursor"),n&&n.classList.remove("is-press"),!await g(260,p)))return;let i=0,b=0;for(const S of t){if(!S.classList.contains("msg--u")){if(e.classList.add("is-typing"),!await g(i?820:520,p))return;if(e.classList.remove("is-typing"),S.classList.add("on"),l(S.dataset.chips),S.dataset.pick){if(!await g(750,p))return;r(...m(S))}if(!await g(700,p))return}else{r(...m(S)),e.classList.add("is-typing-u");const M=S.textContent;for(let P=1;P<=M.length;P+=2)if(o&&(o.textContent=M.slice(0,P)),!await g(32,p))return;if(o&&(o.textContent=M),!await g(380,p)||(a&&a.classList.add("is-hit"),!await g(160,p))||(a&&a.classList.remove("is-hit"),o&&(o.textContent=""),e.classList.remove("is-typing-u"),S.classList.add("on"),b++,!await g(700,p)))return}f(++i)}await g(5200,p)&&v(p)};if(!("IntersectionObserver"in window)){v(y);return}new IntersectionObserver(p=>p.forEach(i=>{y++,i.isIntersecting&&v(y)}),{threshold:.25,rootMargin:"0px 0px -12% 0px"}).observe(e)}),ae(F("[data-foot]"),e=>e.classList.add("is-in"),{threshold:.05});const go=Pe&&E(".foot__depth",Pe);if(go&&!N&&!Mt){const e=()=>{const t=dt(Pe);t.top>k*1.1||t.bottom<0||B(go,"--fk",Y(t.top/k,-1,1).toFixed(4))};mt.push(e)}const qt=E("[data-spiral]");if(qt)if(N)qt.classList.add("is-static");else{const e=F(".spiral__card",qt),t=e.length,n=E("[data-spiral-title]",qt),o=E(".spiral__stage",qt),a=E(".spiral__space:not(.spiral__space--front)",qt),s=E(".spiral__space--front",qt);let h=0;const d=null,c=null;let l=!1;const f=()=>{l||(l=!0,F("img",qt).forEach(A=>{A.loading="eager";try{A.fetchPriority="high"}catch{}A.decode&&A.decode().catch(()=>{})}))};R.readyState==="complete"?setTimeout(f,400):addEventListener("load",()=>setTimeout(f,400),{once:!0}),new IntersectionObserver((A,C)=>A.forEach(O=>{O.isIntersecting&&(f(),C.disconnect())}),{rootMargin:"600% 0px"}).observe(qt);let r=0,m=0,y=!1,g=null,u=0;const v=560,p=700,i=820,b=Z<768?160:300,S=[];for(let A=0;A{d&&(P=Math.min(devicePixelRatio||1,1.5),L=d.clientWidth,M=d.clientHeight,d.width=Math.round(L*P),d.height=Math.round(M*P))};V(),_t(V);const I=A=>{m+=A/1e3;const C=Z<768,O=C?Z*.34:Math.min(Z*.31,560),et=C?k*.28:O*.7,ot=t*v+p,W=K(0,1,h),D=K(.05,.5,h),x=r*ot+m*22-(1-W)*3200;u+=Math.abs(Ft)*1e-4*Math.min(4,A/16.7);const w=r*Math.PI*2.6+m*.1+u-(1-W)*1.8,T=O*(.18+.82*W),q=et*(.18+.82*W);g!==null&&(U.spin+=(w-g)*U.vort*1.15),g=w;for(let _=0;_-20;s&&j._f!==gt&&(j._f=gt,(gt?s:a).appendChild(j));const $=_*.74+w,X=Math.cos($),tt=Math.sin($);j.style.transform=`translate3d(${(X*T).toFixed(1)}px,${(tt*q).toFixed(1)}px,${H.toFixed(1)}px) rotateY(${(-X*32).toFixed(2)}deg) rotateX(${(tt*22).toFixed(2)}deg) rotateZ(${(X*tt*10).toFixed(2)}deg)`,j.style.opacity=Q.toFixed(3)}if(c&&L){c.setTransform(P,0,0,P,0,0),c.clearRect(0,0,L,M),c.lineCap="round";const _=L/2,j=M/2,H=5200,Q=x*.45+m*60,gt=26+Math.min(110,Math.abs(Ft)*5);for(const $ of S){const X=(Q+$.s*H)%H-H+i*.55,tt=K(-H+i*.55,-H*.55,X)*(1-K(i*.3,i*.52,X));if(tt<.02)continue;const G=$.a+w*.55,J=Math.cos(G),ht=Math.sin(G),rt=O*$.rf,St=i/(i-X),lt=i/(i-X+gt),Yt=_+J*rt*St,Ae=j+ht*rt*.78*St,Me=_+J*rt*lt,Ko=j+ht*rt*.78*lt;c.globalAlpha=tt*.55,c.strokeStyle=$.m?"#a86bff":document.documentElement.classList.contains("theme-light")?"#1a1a38":"#ffffff",c.lineWidth=Math.min(2.2,$.w*(.6+St*.35)),c.beginPath(),c.moveTo(Me,Ko),c.lineTo(Yt+.01,Ae),c.stroke()}c.globalAlpha=1}if(n){const _=K(.1,.92,h);B(n,"--ts",(.04+_*.78+K(0,1,r)*.5).toFixed(4)),n.style.opacity=(K(.08,.6,h)*(1-K(.86,.97,r))).toFixed(3)}o&&B(o,"--sbg",(K(.2,.95,h)*(1-K(.74,.95,r))).toFixed(3)),o&&B(o,"--sx",(1-K(.74,.95,r)).toFixed(3))},z=()=>{const A=dt(qt);r=Y(-A.top/Math.max(1,A.height-k),0,1),h=Y(1-A.top/k,0,1);const C=!yt&&A.top>0&&A.top0;U.vortT=A.topk*.65?1:0,O&&!y?(y=!0,Ot(I)):!O&&y&&(y=!1,de(I))};I(0),mt.push(z)}!N&&!Mt&&F("[data-settle]").forEach(e=>{let t=-1;const n=()=>{const o=dt(e);if(o.top>k*1.1||o.bottom<-k*.2)return;const a=Y((k-o.top)/(k*.62),0,1),s=1+Math.pow(1-a,2.2)*.3;Math.abs(s-t)<5e-4||(t=s,B(e,"--st",s.toFixed(4)))};mt.push(n)});const vo=e=>{if(e.dataset.loaded)return;const t=Z<768&&e.dataset.srcMobile;e.src=t?e.dataset.srcMobile:e.dataset.src,e.dataset.loaded="1",e.addEventListener("playing",()=>{e.style.opacity=1},{once:!0})};if(!zt&&!N&&"IntersectionObserver"in window){const e=new IntersectionObserver(n=>n.forEach(o=>{o.isIntersecting&&(vo(o.target),e.unobserve(o.target))}),{rootMargin:yt?"120% 0px":"250% 0px"}),t=new IntersectionObserver(n=>n.forEach(o=>{const a=o.target;if(o.isIntersecting){vo(a);const s=a.play();s&&s.catch(()=>{})}else a.pause()}),{threshold:.15});F("video[data-src]").filter(n=>!n.closest("[data-rvh]")).forEach(n=>{n.muted=!0,e.observe(n),t.observe(n)})}F("[data-rvh]").forEach(e=>{const t=E("video",e),n=E("[data-rvh-bar]",e);if(!t||zt)return;const o=(t.dataset.ladder||"").split(",").map(A=>{const[C,O]=A.trim().split(" ");return{u:C,m:+O||0}}).filter(A=>A.u),a=Z<768,s=a?1:0;if(N){t.src=o.length?o[Math.min(o.length-1,Math.max(s,1))].u:t.dataset.src,t.controls=!0;return}t.muted=!0,t.playsInline=!0;let h=!1,d=!1,c="",l=!1;const f=()=>{if(h||!l)return;const A=t.play();A&&A.catch&&A.catch(()=>{})};t.addEventListener("playing",()=>{d=!0,e.classList.add("is-playing")},{once:!0});const r=E(".rvh__load",e),m=r?Te(r,900):null;let y=0;const g=A=>{let C=s;if(A)for(;CA;)C++;else C=Math.max(s,1);return Math.min(C,o.length-1)},u=()=>new Promise(A=>{if(!window.fetch||!window.AbortController||!window.ReadableStream){A(0);return}const C=new AbortController,O=performance.now();let et=0,ot=0,W=0,D=!1;const x=()=>{if(D)return;D=!0;try{C.abort()}catch{}const w=(performance.now()-(et||O))/1e3;A(w>.05&&ot-W>6e4?(ot-W)*8/w/1e6:0)};setTimeout(x,1500),fetch(o[s].u,{headers:{Range:`bytes=0-${a?999999:1499999}`},signal:C.signal,cache:"no-store"}).then(w=>{if(!w.body){x();return}const T=w.body.getReader(),q=()=>T.read().then(({done:_,value:j})=>{if(_){x();return}et||(et=performance.now(),W=j.length),ot+=j.length,q()},x);q()},x)}),v=()=>{if(c!=="mp4"){c="mp4";try{t.removeAttribute("src"),t.load()}catch{}if(!o.length){t.src=a&&t.dataset.srcMobile||t.dataset.src,f();return}u().then(A=>{y=g(A),t.src=o[y].u,V()})}},p=()=>{if(c!=="mp4"||y>=o.length-1)return;const A=t.currentTime;y++,t.src=o[y].u,t.addEventListener("loadedmetadata",()=>{try{t.currentTime=A}catch{}f()},{once:!0})},i=()=>{try{for(let A=0;A=t.currentTime)return t.buffered.end(A)}catch{}return t.currentTime};let b=-1,S=0,L=0,M=0;setInterval(()=>{if(c!=="mp4"||!d||h||t.paused||t.seeking){b=t.currentTime,S=0,L=0;return}const A=t.currentTime;if(S=Math.abs(A-b)<.05?S+500:0,b=A,S>=1200){S=0,L=0,p();return}const C=performance.now(),O=i();if(!L){L=C,M=O;return}C-L>=4e3&&((O-M)/((C-L)/1e3)<1.25&&O-A<8&&O<(t.duration||1e9)-1?(L=0,p()):(L=C,M=O))},500);let P=0;const V=()=>{if(l)return;const A=performance.now(),C=()=>{if(l)return;const O=performance.now();!P&&!st.classList.contains("ld")&&(P=O);const et=t.duration||1e9,ot=Math.max(1,Math.min(6,et-.5)),W=i()-t.currentTime;if(m&&m(Math.min(1,W/ot)),(W>=ot||O-A>9e3||W<.05&&O-A>3e3)&&P&&O-P>=1700){l=!0;const D=()=>{if(document.prerendering){document.addEventListener("prerenderingchange",D,{once:!0});return}f()};m?(m(1),m.done(D)):D();return}setTimeout(C,120)};C()},I=_e&&_e.v===t?_e:null;e.classList.contains("is-playing")&&(d=!0,l=!0),I&&I.mode==="hls"?(c="hls",I.err=()=>v(),I.parsed?V():I.onParsed=V,setTimeout(()=>{if(!l&&c==="hls"&&!(i()>t.currentTime+.5)){try{I.h&&I.h.destroy()}catch{}I.h=null,v()}},8e3)):v(),st.classList.add("rvh-on");const z=e.nextElementSibling;mt.push(()=>{const A=z?dt(z).top<=0:!1;A!==h&&(h=A,st.classList.toggle("rvh-on",!A),A?t.pause():f())}),n&&At(e,()=>{!h&&t.duration&&B(n,"--p",(t.currentTime/t.duration).toFixed(4))})}),F("[data-copy]").forEach(e=>e.addEventListener("click",t=>{const n=E(".cx__tip",e);if(n){t.preventDefault(),t.stopPropagation();const d=c=>{n.textContent=c?"Copied":"Copy failed",e.classList.toggle("is-done",c),clearTimeout(e._t),e._t=setTimeout(()=>{e.classList.remove("is-done"),n.textContent="Copy"},1800)};try{navigator.clipboard.writeText(e.dataset.copy).then(()=>d(!0),()=>d(!1))}catch{d(!1)}return}const o=e.dataset.copy,a=E("span",e)||e,s=a.textContent,h=d=>{a.textContent=d?"Copied":"Select and copy",setTimeout(()=>{a.textContent=s},1600)};try{navigator.clipboard.writeText(o).then(()=>h(!0),()=>h(!1))}catch{h(!1)}}));const xo="mytechpark.analytics.choice.v2",Wo=[],ye=()=>{try{const e=JSON.parse(localStorage.getItem(xo)||"null");if(!e)return null;if(typeof e.analytics=="boolean"){const t=Date.parse(e.expiresAt);return t>Date.now()?{choice:e.analytics?"granted":"denied",expiresAt:t}:null}return e.expiresAt>Date.now()?e:null}catch{return null}},yo=()=>{const e=ye();return!!(e&&e.choice==="granted")},we="G-DX061NHCQD",be=/(^|\.)mytechpark\.com$/.test(location.hostname),wo=()=>{if(!be)return;if(window["ga-disable-"+we]=!1,window.__dzga){window.gtag("consent","update",{analytics_storage:"granted"});return}window.__dzga=1,window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("consent","default",{analytics_storage:"granted",ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied"}),window.gtag("js",new Date),window.gtag("config",we,{allow_google_signals:!1,allow_ad_personalization_signals:!1,cookie_domain:"none",cookie_expires:63072e3,cookie_update:!0});const e=R.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id="+we,R.head.appendChild(e)},Ee=(e,t)=>{be&&window.__dzga&&yo()&&window.gtag("event",e,t||{}),Xo(e,t)};R.addEventListener("click",e=>{const t=e.target.closest&&e.target.closest("a[href]");if(!t)return;const n=t.getAttribute("href");/^mailto:/i.test(n)?Ee("contact_click",{method:"email"}):/^tel:/i.test(n)?Ee("contact_click",{method:"phone"}):/chat\.mytechpark\.io/i.test(n)&&Ee("brief_click",{link_url:"https://chat.mytechpark.io/"})},!0);const Vo=()=>{window["ga-disable-"+we]=!0,window.gtag&&window.gtag("consent","update",{analytics_storage:"denied"});const e=location.hostname,t=e.split(".").slice(-2).join(".");R.cookie.split(";").map(n=>n.split("=")[0].trim()).filter(n=>/^_ga/.test(n)).forEach(n=>["",e,"."+e,"."+t].forEach(o=>{R.cookie=`${n}=; Max-Age=0; path=/${o?"; domain="+o:""}`}))},bo=e=>{const t=Date.now();try{localStorage.setItem(xo,JSON.stringify({choice:e,decidedAt:t,expiresAt:t+180*864e5,version:2}))}catch{}e==="granted"?wo():Vo(),Wo.forEach(n=>n(e))};yo()&&wo();const $e=()=>{const e=ye();return!!(e&&e.choice==="denied")};if(be&&!$e()&&!window.va){window.va=function(){(window.vaq=window.vaq||[]).push(arguments)},window.va("beforeSend",t=>$e()?null:t);const e=R.createElement("script");e.defer=!0,e.src="/_vercel/insights/script.js",R.head.appendChild(e)}const Xo=(e,t)=>{try{if(!be||!window.va||$e())return;const n={};Object.keys(t||{}).slice(0,2).forEach(o=>{n[o]=t[o]}),window.va("event",Object.keys(n).length?{name:e,data:n}:{name:e})}catch{}},Xt=E("[data-ckb]");Xt&&(ye()||/cookie-settings/.test(location.pathname)?Xt.remove():(Xt.hidden=!1,setTimeout(()=>Xt.classList.add("is-on"),pt?0:1400),F("[data-ck]",Xt).forEach(e=>e.addEventListener("click",()=>{bo(e.dataset.ck),Xt.classList.remove("is-on"),setTimeout(()=>Xt.remove(),700)}))));const ne="https://calendly.com/mytechpark/30min";F("[data-cal-inline]").forEach(e=>{const t=`${ne}?embed_domain=${encodeURIComponent(location.host||"mytechpark.com")}&embed_type=Inline&hide_event_type_details=1&hide_gdpr_banner=1`,n=()=>parseFloat(getComputedStyle(e).getPropertyValue("--cal-crop"))||0;let o=!1,a=!1;const s=Array.from({length:28},(c,l)=>``).join(""),h=()=>{if(o)return;o=!0;const c=E("iframe",e);c&&c.remove(),e.insertAdjacentHTML("beforeend",`

    Joe\u2019s calendar

    This preview cannot load outside frames. On the website the calendar is open right here, no pop-up.

    Pick a time
    `),e.classList.add("is-ready")};(()=>{if(a)return;a=!0,e.classList.remove("is-ready"),R.addEventListener("securitypolicyviolation",g=>{/calendly/.test(g.blockedURI||"")&&h()});const c=R.createElement("iframe");c.title="Book a 15-minute intro call with mytechpark (Calendly)",c.allow="payment",c.src=t;const l=()=>{o||e.classList.add("is-ready")};let f=!1;const r=()=>{const g=E(".calbox__dead",e);g&&g.remove(),e.classList.remove("is-dead")},m=g=>{if(f&&!g||o||E(".calbox__dead",e))return;e.classList.add("is-dead","is-ready"),e.insertAdjacentHTML("beforeend",`

    Pick a time with Joe

    In this browser the calendar can\u2019t be used inside the page. It opens in a small window instead: same calendar, same two clicks.

    Open the calendar
    `),E("[data-cal-pop]",e).addEventListener("click",v=>{const i=Math.min(820,screen.availHeight-60),b=Math.max(0,(screen.availWidth-1040)/2),S=Math.max(0,(screen.availHeight-i)/2),L=open(ne,"mytechpark-calendar",`popup=yes,width=1040,height=${i},left=${b},top=${S}`);if(L){v.preventDefault();try{L.focus()}catch{}}})},y=()=>{if(!f){if(R.hidden){R.addEventListener("visibilitychange",()=>setTimeout(y,6e3),{once:!0});return}m()}};["pointerdown","mousedown","click"].forEach(g=>e.addEventListener(g,u=>{u.target===c&&m(!0)})),addEventListener("message",g=>{if(g.origin!=="https://calendly.com"||g.source!==c.contentWindow)return;const u=g.data&&g.data.event;if(!(typeof u!="string"||u.indexOf("calendly.")!==0)){if(f||r(),f=!0,u==="calendly.page_height"){const v=parseInt(g.data.payload&&g.data.payload.height,10);v>420&&v<2400&&(e.style.height=Math.round(v-n())+"px")}u==="calendly.event_scheduled"&&Ee("generate_lead",{lead_type:"call"}),l()}}),c.addEventListener("load",()=>{setTimeout(l,3500),setTimeout(y,7e3)},{once:!0}),e.appendChild(c),setTimeout(()=>{if(e.classList.contains("is-ready"))return;const g=E(".calbox__wait",e);g&&!E("a",g)&&g.insertAdjacentHTML("beforeend",`Taking a while? Open the calendar in a new tab`)},9e3)})()});const He=F("[data-toc]");if(He.length&&"IntersectionObserver"in window){const e=new Map(He.map(o=>[o.dataset.toc,o]));let t=null;const n=new IntersectionObserver(o=>o.forEach(a=>{a.isIntersecting&&(t&&t.classList.remove("is-on"),t=e.get(a.target.id),t&&t.classList.add("is-on"))}),{rootMargin:"-20% 0px -70% 0px"});He.forEach(o=>{const a=R.getElementById(o.dataset.toc);a&&n.observe(a)})}const Le=E("[data-consent]");if(Le){const e=E("[data-consent-status]",Le),t=()=>{const n=ye(),o=!!(n&&n.choice==="granted");Le.classList.toggle("is-granted",o),e.textContent=`${n?o?"You accepted all":"You rejected all":"No choice yet"}: Analytics is ${o?"on":"off"} for ${location.host&&/mytechpark/.test(location.host)?location.host:"www.mytechpark.com"}. Choices on mytechpark.io and chat.mytechpark.io are set separately.`};F("[data-consent-set]",Le).forEach(n=>n.addEventListener("click",()=>{bo(n.dataset.consentSet),t()})),t()}let Kt=null;const Eo=()=>{if(!Kt)return;const e=parseInt(getComputedStyle(st).getPropertyValue("--cols"))||12;Kt.innerHTML='
    '+"".repeat(e)+"
    "},Lo=()=>{Kt||(Kt=R.createElement("div"),Kt.className="grid-overlay",Kt.setAttribute("aria-hidden","true"),R.body.appendChild(Kt),Eo(),_t(Eo)),st.classList.toggle("show-grid")};R.addEventListener("keydown",e=>{(e.key==="g"||e.key==="G")&&!/input|textarea|select/i.test(e.target.tagName)&&!e.metaKey&&!e.ctrlKey&&Lo()}),F("[data-grid-toggle]").forEach(e=>e.addEventListener("click",Lo)),await xt(),Ge(F("main section,[data-orb],[data-px],.mq,[data-reel-frame],.foot,[data-liquid]")),Gt()},We=()=>{location.hash==="#snap"?Ne():requestAnimationFrame(()=>setTimeout(Ne,0))};document.prerendering?document.addEventListener("prerenderingchange",We,{once:!0}):We()})(); /* dark / light mode toggle */ ;(function(){ var d=document.documentElement,K="mtp-theme"; function syncMeta(){var m=document.querySelector('meta[name="theme-color"]');if(m)m.content=d.classList.contains("theme-light")?"#ffffff":"#000828"} var b=document.querySelector("[data-theme-toggle]"); if(b)b.addEventListener("click",function(){var light=d.classList.toggle("theme-light");try{localStorage.setItem(K,light?"light":"dark")}catch(e){}b.setAttribute("aria-label",light?"Switch to dark mode":"Switch to light mode");syncMeta()}); syncMeta(); })();