asciify-engine 4.29.0 → 4.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/THIRD_PARTY.md +3 -0
- package/dist/field.cjs +1 -1
- package/dist/field.d.cts +1 -1
- package/dist/field.d.ts +1 -1
- package/dist/field.js +1 -1
- package/dist/{glyph-field-DRC-7uVf.d.ts → glyph-field-BCwGhohg.d.ts} +11 -0
- package/dist/{glyph-field-C2fQIlnq.d.cts → glyph-field-DKWHAMml.d.cts} +11 -0
- package/dist/kit/chunk-26HU7QJW.js +1 -0
- package/dist/kit/{chunk-4NV5APSJ.js → chunk-2NACMWVV.js} +1 -1
- package/dist/kit/chunk-2ZBPTNGK.js +1 -0
- package/dist/kit/{chunk-G4ZSMTFN.js → chunk-4NR7QENR.js} +1 -1
- package/dist/kit/{chunk-KY5KCIZE.js → chunk-62KEKWSM.js} +1 -1
- package/dist/kit/chunk-6646EUJY.js +1 -0
- package/dist/kit/{chunk-2FH6GGV6.js → chunk-6G2ZVIBS.js} +1 -1
- package/dist/kit/chunk-6YLMG37G.js +1 -0
- package/dist/kit/{chunk-FPCCX4FM.js → chunk-7DBDSJ5R.js} +1 -1
- package/dist/kit/chunk-7NS6YAD3.js +1 -0
- package/dist/kit/chunk-7OPCQDAL.js +1 -0
- package/dist/kit/{chunk-3OD5BMF5.js → chunk-AAV5QNHU.js} +1 -1
- package/dist/kit/chunk-AU33Y2SZ.js +1 -0
- package/dist/kit/{chunk-KCEYRIU4.js → chunk-BGPEFFKK.js} +1 -1
- package/dist/kit/{chunk-KDROJANO.js → chunk-BJJUDT26.js} +1 -1
- package/dist/kit/{chunk-2LBQ7QJT.js → chunk-BO4CPM26.js} +1 -1
- package/dist/kit/chunk-BQ53B2HP.js +1 -0
- package/dist/kit/chunk-BV6AOHFU.js +1 -0
- package/dist/kit/{chunk-QVICL57J.js → chunk-CH64MY3U.js} +1 -1
- package/dist/kit/{chunk-6G5MPND3.js → chunk-CIGEXHZ5.js} +1 -1
- package/dist/kit/{chunk-LVCGC3SO.js → chunk-CMGMCRAD.js} +1 -1
- package/dist/kit/{chunk-4U72YE65.js → chunk-CZL5WMU6.js} +1 -1
- package/dist/kit/chunk-DANNL7WR.js +1 -0
- package/dist/kit/{chunk-PB5E3D4E.js → chunk-DKRZSP5K.js} +1 -1
- package/dist/kit/{chunk-KFXMLIVF.js → chunk-E427W6P5.js} +1 -1
- package/dist/kit/{chunk-776H2BJ7.js → chunk-ECGALF3G.js} +1 -1
- package/dist/kit/chunk-EOTPXDMH.js +1 -0
- package/dist/kit/{chunk-K6JX64AS.js → chunk-FU4WW3PU.js} +1 -1
- package/dist/kit/chunk-GI5BNKBL.js +1 -0
- package/dist/kit/{chunk-Z2FRNFMB.js → chunk-HENGH3DE.js} +1 -1
- package/dist/kit/chunk-I377LEZA.js +1 -0
- package/dist/kit/chunk-IFZDWKIX.js +1 -0
- package/dist/kit/{chunk-3MHEDZLZ.js → chunk-J7TFGVZT.js} +1 -1
- package/dist/kit/{chunk-WDS7VM2E.js → chunk-J7Y2KBXK.js} +1 -1
- package/dist/kit/{chunk-KXI3T72F.js → chunk-JF3WEYIE.js} +1 -1
- package/dist/kit/{chunk-Z3KD6CLE.js → chunk-JSRXW3FL.js} +1 -1
- package/dist/kit/chunk-KO5NAI4S.js +1 -0
- package/dist/kit/chunk-LZGSWPH4.js +1 -0
- package/dist/kit/{chunk-ILXVBO7M.js → chunk-MT23DCGU.js} +1 -1
- package/dist/kit/{chunk-NF4WVWAC.js → chunk-MWUPCAET.js} +1 -1
- package/dist/kit/chunk-MZDZ6G75.js +1 -0
- package/dist/kit/{chunk-3YSK7V26.js → chunk-N7J4UAWY.js} +1 -1
- package/dist/kit/{chunk-YSN7EHSH.js → chunk-NP7UG7DS.js} +1 -1
- package/dist/kit/{chunk-ZCXNGJGB.js → chunk-NQ4PFWOG.js} +1 -1
- package/dist/kit/chunk-NSKX2OFA.js +1 -0
- package/dist/kit/{chunk-TRDA73HN.js → chunk-O25QXHEZ.js} +1 -1
- package/dist/kit/chunk-ODLKGAX2.js +1 -0
- package/dist/kit/chunk-P5M6AQQX.js +1 -0
- package/dist/kit/{chunk-W4U5CK6L.js → chunk-P5MVACML.js} +1 -1
- package/dist/kit/chunk-PZKQUZQK.js +1 -0
- package/dist/kit/{chunk-EKYEA7Z4.js → chunk-QRSVLQ2I.js} +1 -1
- package/dist/kit/{chunk-CGSWUO67.js → chunk-R3ALZFUQ.js} +1 -1
- package/dist/kit/{chunk-7DXSG526.js → chunk-RGV7VRYC.js} +1 -1
- package/dist/kit/chunk-RPSE33GI.js +1 -0
- package/dist/kit/chunk-RU2KQTTL.js +1 -0
- package/dist/kit/chunk-SBAUVRBY.js +1 -0
- package/dist/kit/chunk-SQNULNT3.js +1 -0
- package/dist/kit/{chunk-HYVTFKWX.js → chunk-TJHSBZBF.js} +1 -1
- package/dist/kit/{chunk-FWODCYYJ.js → chunk-UHLNVM63.js} +1 -1
- package/dist/kit/{chunk-UOYBFLGJ.js → chunk-UT6MJP5B.js} +1 -1
- package/dist/kit/{chunk-6WU247CB.js → chunk-UXDJSGED.js} +1 -1
- package/dist/kit/{chunk-GBNV3GXG.js → chunk-UZR3T5XA.js} +1 -1
- package/dist/kit/{chunk-FHN3PPSI.js → chunk-V3J6KJQ2.js} +1 -1
- package/dist/kit/{chunk-KLRF3S7O.js → chunk-V42Q4L2G.js} +1 -1
- package/dist/kit/{chunk-ZWZZMU5P.js → chunk-VQ4KIRBW.js} +1 -1
- package/dist/kit/chunk-VWFC5XOB.js +1 -0
- package/dist/kit/chunk-VXPUEFYR.js +1 -0
- package/dist/kit/{chunk-RXOPJJC4.js → chunk-W3GINZLK.js} +1 -1
- package/dist/kit/{chunk-F6F2C3RH.js → chunk-WOKKM6CG.js} +1 -1
- package/dist/kit/{chunk-OZFSNW5N.js → chunk-WPWCFCEZ.js} +1 -1
- package/dist/kit/{chunk-H5KHXZWR.js → chunk-WRBLIULG.js} +1 -1
- package/dist/kit/{chunk-SDSW7422.js → chunk-WSWIOD2C.js} +1 -1
- package/dist/kit/{chunk-NW4U2YRE.js → chunk-X6GAMLEH.js} +1 -1
- package/dist/kit/chunk-XB7XBYHA.js +1 -0
- package/dist/kit/{chunk-B3TY6UXJ.js → chunk-XDX6WLED.js} +1 -1
- package/dist/kit/chunk-XJBVU5QP.js +1 -0
- package/dist/kit/{chunk-42KMN727.js → chunk-XVA7UGUQ.js} +1 -1
- package/dist/kit/{chunk-DMRPBFLW.js → chunk-YFW377RN.js} +1 -1
- package/dist/kit/{chunk-CG6SGQMY.js → chunk-ZGCKUXYP.js} +1 -1
- package/dist/kit/{chunk-XUCYFWC3.js → chunk-ZTCSVEHT.js} +1 -1
- package/dist/kit.cjs +1 -1
- package/dist/kit.d.cts +235 -6
- package/dist/kit.d.ts +235 -6
- package/dist/kit.js +1 -1
- package/package.json +1 -1
- package/skills/asciify-engine/SKILL.md +4 -4
- package/skills/asciify-engine/references/applying-asciify.md +19 -2
- package/skills/asciify-engine/references/components.md +107 -0
- package/skills/asciify-engine/references/glyph-field.md +2 -0
- package/skills/asciify-engine/references/kit.md +165 -3
- package/skills/asciify-engine/references/scenario-prompts.md +17 -1
- package/dist/kit/chunk-2GAV4OAK.js +0 -1
- package/dist/kit/chunk-3LJ5C3U3.js +0 -1
- package/dist/kit/chunk-3VEMKDBW.js +0 -1
- package/dist/kit/chunk-7M2FFUZ3.js +0 -1
- package/dist/kit/chunk-AIGAJMNN.js +0 -1
- package/dist/kit/chunk-BFBG3VHI.js +0 -1
- package/dist/kit/chunk-E3FPFANJ.js +0 -1
- package/dist/kit/chunk-EEV6Y7NH.js +0 -1
- package/dist/kit/chunk-GF72XM4C.js +0 -1
- package/dist/kit/chunk-GKR3ROYR.js +0 -1
- package/dist/kit/chunk-I5R2347P.js +0 -1
- package/dist/kit/chunk-KEE55QSD.js +0 -1
- package/dist/kit/chunk-M5VVLYI2.js +0 -1
- package/dist/kit/chunk-ORSI57T2.js +0 -1
- package/dist/kit/chunk-PGFBIU7R.js +0 -1
- package/dist/kit/chunk-QSTDYL35.js +0 -1
- package/dist/kit/chunk-UVLKCAKH.js +0 -1
- package/dist/kit/chunk-VBWG7HQA.js +0 -1
- package/dist/kit/chunk-VV2KP7ZW.js +0 -1
- package/dist/kit/chunk-WI2AF2KE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-7DBDSJ5R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{MONO as e,GRAPHITE_LIGHT as o,GRAPHITE_DARK as r,pixelSnap as n,parseColor as c,band as i,ditherIndex as a,toneAlpha as l,vnoise as s}from"./chunk-ZCHGV2CV.js";function h(t,h,f,d,g={x:.5,y:.5},u={}){const{fontSize:m=13,chars:M=" .:-=+*#%@",accentColor:p,color:$,octaves:x=4,speed:S=1,scale:b=1,accentThreshold:y=.9,mouseWarp:z=.3,lightMode:A=!1}=u,C=Array.from(M),k=.62*m,V=1.3*m,j=Math.ceil(h/k),v=Math.ceil(f/V);t.clearRect(0,0,h,f),t.font=`${m}px ${e}`,t.textBaseline="top";const w=A?o:r;let H=w.r,N=w.g,T=w.b;const q=n(t);if($){const t=c($);t&&(H=t.r,N=t.g,T=t.b)}let B=H,G=N,Q=T;const R=p?c(p):null;R&&(B=R.r,G=R.g,Q=R.b);const U=.035*b,W=d*S,Z=Math.min(6,Math.max(1,x)),D=(t,e)=>{let o=0,r=.5,n=1,c=0;for(let i=0;i<Z;i++)o+=s(t*n,e*n)*r,c+=r,r*=.5,n*=2.1;return o/c};for(let e=0;e<v;e++)for(let o=0;o<j;o++){const r=o*U+.06*W,n=e*U*1.3-.04*W,c=o/j-g.x,s=e/v-g.y,h=Math.sqrt(c*c+s*s),f=z>0?.12*Math.max(0,1-h/z):0,d=D(r+f*Math.sin(1.3*W+8*s),n+f*Math.cos(.9*W+8*c)),m=i(.5*d+.5,.7,.83);if(m<=0)continue;const M=C[a(m,C.length,o,e,u.ditherStrength)];if(" "===M)continue;const p=!!R&&m>y,$=l(m);t.fillStyle=p?`rgba(${B},${G},${Q},${$})`:`rgba(${H},${N},${T},${$})`,t.fillText(M,q(o*k),q(e*V))}}var f={id:"noise",name:"Noise",description:"A slow fractal noise field that warps around the cursor.",cellSize:13,speed:.5,cursor:!0,mount:e=>t(e,(t,e,o,r,n,c)=>h(t,e,o,r,n,{ditherStrength:c.ditherStrength,fontSize:c.fontSize,chars:c.chars,lightMode:c.lightMode,color:c.ink,accentColor:c.accent}))};export{f as noise,h as renderNoiseBackground};//# sourceMappingURL=chunk-7NS6YAD3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{simPreset as t,rng as s}from"./chunk-ODLKGAX2.js";var i=500,h=class{constructor(t=1){this.seed=t,this.cols=0,this.rows=0,this.rest=new Float32Array(0),this.live=new Float32Array(0),this.tips=0,this.x=new Float32Array(i),this.y=new Float32Array(i),this.a=new Float32Array(i),this.life=new Float32Array(i),this.span=new Float32Array(i),this.ink=new Float32Array(i),this.pull={x:0,y:0,on:!1},this.walked=0,this.fade=0,this.lit=!1,this.random=s(t)}resize(t,i){this.cols=t,this.rows=i,this.rest=new Float32Array(t*i),this.live=new Float32Array(t*i),this.random=s(this.seed),this.tips=0,this.pull.on=!1;const h=this.random,a=Math.max(3,Math.round(t*i/2600));for(let s=0;s<a;s++)this.sprout(h()*t,h()*i,h()*Math.PI*2,60+90*h(),1);for(let t=0;this.tips&&t<4e3;t++)this.grow(this.rest);this.tips=0}sprout(t,s,h,a,r){if(this.tips>=i)return;const l=this.tips++;this.x[l]=t,this.y[l]=s,this.a[l]=h,this.life[l]=a,this.span[l]=a,this.ink[l]=r}grow(t){const{cols:s,rows:h,x:a,y:r,a:l,life:e,span:o,ink:n}=this,p=this.random;for(let c=this.tips-1;c>=0;c--){if(l[c]+=.45*(p()-.5),this.pull.on&&t===this.live){let t=Math.atan2(this.pull.y-r[c],this.pull.x-a[c])-l[c];t-=2*Math.PI*Math.floor((t+Math.PI)/(2*Math.PI)),l[c]+=.6*Math.max(-.06,Math.min(.06,t))}a[c]+=.7*Math.cos(l[c]),r[c]+=.7*Math.sin(l[c]),e[c]-=1;const u=0|a[c],f=0|r[c];if(e[c]<=0||a[c]<0||r[c]<0||u>=s||f>=h){this.kill(c);continue}const w=f*s+u,d=n[c]*(.35+e[c]/o[c]*.65);d>t[w]&&(t[w]=d),p()<.022&&this.tips<i&&this.sprout(a[c],r[c],l[c]+(p()<.5?-1:1)*(.45+.6*p()),.8*e[c],.9*n[c])}}kill(t){const s=--this.tips;t!==s&&(this.x[t]=this.x[s],this.y[t]=this.y[s],this.a[t]=this.a[s],this.life[t]=this.life[s],this.span[t]=this.span[s],this.ink[t]=this.ink[s])}step(t,s){if(!this.lit&&!this.tips)return!1;const i=Math.min(8,Math.round(60*t*Math.max(.25,s)*1.6));for(let t=0;t<i&&this.tips;t++)this.grow(this.live);const h=Math.exp(.4*-t),a=this.live;let r=0;for(let t=0;t<a.length;t++){const s=a[t]*h;a[t]=s<.004?0:s,s>r&&(r=s)}return this.fade=r,this.lit=r>0,this.lit||this.tips||(this.pull.on=!1),this.lit||this.tips>0}render(t){const{rest:s,live:i}=this;for(let h=0;h<t.length;h++){const a=.16*s[h],r=.9*i[h];t[h]=a>r?a:r}}move(t,s,i,h){if(!this.cols)return;if(this.pull.x=t,this.pull.y=s,this.pull.on=!0,this.walked+=Math.hypot(i,h),this.walked<2.5)return;this.walked=0;const a=this.random,r=.12*Math.max(this.cols,this.rows);for(let i=0;i<6;i++){const i=t+2*(a()-.5)*r,h=s+2*(a()-.5)*r,l=0|i,e=0|h;if(!(l<0||e<0||l>=this.cols||e>=this.rows||this.rest[e*this.cols+l]<.3)){this.sprout(i,h,Math.atan2(s-h,t-i)+(a()-.5),30+40*a(),.8);break}}this.sprout(t,s,Math.atan2(h,i)+Math.PI+2*(a()-.5),20+30*a(),.7),this.lit=!0}press(t,s){const i=this.random;for(let h=0;h<9;h++)this.sprout(t,s,h/9*Math.PI*2+.5*i(),50+60*i(),1);this.lit=!0}leave(){this.pull.on=!1}get level(){return this.fade}},a=t({id:"capillary",name:"Capillary",description:"Thin branching veins: a faint network at rest, new veins that grow toward the cursor and burst from a click.",cellSize:8,charset:" .·:-+*",detail:1/3,create:t=>new h(t)});export{h as Capillary,a as capillary};//# sourceMappingURL=chunk-7OPCQDAL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-
|
|
1
|
+
import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-I377LEZA.js";var r="#6f6d67",s="#8f8d86",a={x:-1,y:-1,users:0},c=e=>{a.x=e.clientX,a.y=e.clientY};function d(d,l,u=0){if("undefined"==typeof document)return null;const{host:m}=d,h=document.createElement("canvas");let f=null;try{f=h.getContext("2d")}catch{f=null}if(!f)return null;const v=f,p=e();"static"===getComputedStyle(m).position&&p.set(m,"position","relative"),p.set(m,"isolation","isolate"),h.dataset.asciiKit="",h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:-1"),m.appendChild(h);let g,y=t(m),b="";const x=()=>{b=n(d.ink(y),m,y?s:r)??s;const e=d.settings().accent;g=e?n(e,m)??void 0:void 0};x();let E=0,M=!0,w=!1,L=!1,A=0,C=0,F=0,O=!1,S=9,R=9,z=1,k=1,q=u;const I={x:.5,y:.5},j=()=>!!(d.reducedMotion()??i()),H=()=>{const e=d.settings(),t=performance.now(),n={fontSize:e.cellSize,chars:e.charset,ditherStrength:e.dither,lightMode:!y,ink:b,accent:g,elapsed:R,speed:e.speed};for(v.globalAlpha=1,v.globalCompositeOperation="source-over";q>0;q--)l(v,z,k,S,I,n);l(v,z,k,S,I,n),(e=>{if(!e||!e.isConnected)return;const t=o(h,e);if(!t.w||!t.h)return;const n=.71*t.w+32,i=.71*t.h+32,r=h.width/z||1;v.save(),v.setTransform(r*n,0,0,r*i,r*(t.x+t.w/2),r*(t.y+t.h/2));const s=v.createRadialGradient(0,0,0,0,0,1);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(.72,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),v.globalCompositeOperation="destination-out",v.fillStyle=s,v.fillRect(-1,-1,2,2),v.restore()})(e.clear),F=.9*F+.1*(performance.now()-t),h.dataset.painted=""},P=e=>{if(E=0,L||w||!M||"undefined"!=typeof document&&document.hidden)return void(A=C=0);const t=j(),n=d.settings(),i=C?e-C:17;if(C=e,!t&&F>4.5&&i<12&&(O=!O))return void(E=requestAnimationFrame(P));const o=A?Math.min(.05,(e-A)/1e3):0;if(A=e,t||(S+=o*n.speed,R+=o),n.cursor&&a.x>=0){const e=h.getBoundingClientRect();e.width&&e.height&&(I.x+=.07*((a.x-e.left)/e.width-I.x),I.y+=.07*((a.y-e.top)/e.height-I.y))}else n.cursor||(I.x+=.07*(.5-I.x),I.y+=.07*(.5-I.y));H(),t||(E=requestAnimationFrame(P))},T=()=>{E||L||w||!M||(E=requestAnimationFrame(P))},W=()=>{if(L)return;const e=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio||1);z=Math.max(1,h.clientWidth||m.clientWidth||1),k=Math.max(1,h.clientHeight||m.clientHeight||1),h.width=Math.round(z*e),h.height=Math.round(k*e),v.setTransform(e,0,0,e,0,0),q=u,M&&!w&&H(),T()};W();const B="function"==typeof ResizeObserver?new ResizeObserver(W):null;B?.observe(m);const G="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{M=e.isIntersecting,A=0,M?T():E&&(cancelAnimationFrame(E),E=0)},{rootMargin:"64px"}):null;G?.observe(m);const K=()=>{A=0,T()};document.addEventListener("visibilitychange",K);const X="function"==typeof matchMedia?matchMedia("(prefers-reduced-motion: reduce)"):null;X?.addEventListener?.("change",K),0===a.users++&&"function"==typeof addEventListener&&addEventListener("pointermove",c,{passive:!0});const Y="object"==typeof document.fonts?document.fonts:null,Z=()=>{L||!M||w||(H(),T())};Y?.addEventListener?.("loadingdone",Z),Y?.ready?.then(Z,()=>{});let D=0;const J=()=>{D||L||(D=requestAnimationFrame(()=>{D=0,L||(y=t(m),x(),j()&&H(),T())}))},N="function"==typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null;N?.addEventListener?.("change",J);const Q="function"==typeof MutationObserver?new MutationObserver(J):null;for(const e of[document.documentElement,document.body])e&&Q?.observe(e,{attributes:!0,attributeFilter:["class","data-theme","data-mode","style"]});return{field:null,canvas:h,refresh(){L||(y=t(m),x(),j()&&M&&!w&&H(),T())},play(){w&&(w=!1,A=0,T())},pause(){w=!0,E&&cancelAnimationFrame(E),E=0},destroy(){L||(L=!0,E&&cancelAnimationFrame(E),D&&cancelAnimationFrame(D),E=D=0,B?.disconnect(),G?.disconnect(),Q?.disconnect(),document.removeEventListener("visibilitychange",K),X?.removeEventListener?.("change",K),N?.removeEventListener?.("change",J),Y?.removeEventListener?.("loadingdone",Z),0===--a.users&&"function"==typeof removeEventListener&&removeEventListener("pointermove",c),h.remove(),h.width=h.height=0,p.restore())}}}export{d as mountCanvas};//# sourceMappingURL=chunk-AAV5QNHU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{srOnly as t,mountSurface as e,handle as n,house as o,clamp as i}from"./chunk-I377LEZA.js";var l={hold:3200,transition:1e3,autoplay:!0,fit:"cover",layer:"under"};function r(t,e,n,o,i,l){if("function"==typeof e)return e(t,n,o,i),!0;const[r,a]="videoWidth"in(c=e)?[c.videoWidth,c.videoHeight]:"naturalWidth"in c?[c.naturalWidth,c.naturalHeight]:[c.width,c.height];var c;if(!r||!a)return!1;const s="cover"===l?Math.max(n/r,o/a):Math.min(n/r,o/a);return t.drawImage(e,(n-r*s)/2,(o-a*s)/2,r*s,a*s),!0}function a(a,c){const s={current:{...l,...c}},u=()=>s.current;let h,d=[],g=u().sources,p=0,m=0,f=-1;const k=u().label?t(u().label):null,v=()=>{d=u().sources.map(t=>{if("string"!=typeof t)return t;const e=document.createElement("img");return e.crossOrigin="anonymous",e.decoding="async",e.onload=()=>y?.kick(),e.src=t,e})};v();let y=null;y=e({host:a,kit:s,layer:u().layer,look:()=>({mark:"engraving",markAngle:-45,charset:" .:-=+*#%@",cellSize:7,cellAspect:1,contrast:1.15,levels:"none",...u().look}),ink:()=>u().ink??"--ascii-ink-strong",reducedMotion:()=>u().reducedMotion,onFail:()=>{y=null},paint:({pen:t,width:e,height:n,now:l,still:a})=>{if(!d.length)return!1;const c=f<0||a?1:o(i((l-f)/u().transition)),s=u().fit;if(c<1)return r(t,d[m],e,n,l,s),t.globalAlpha=c,t.fillStyle="#000",t.fillRect(0,0,e,n),t.globalAlpha=1,t.globalCompositeOperation="lighter",t.globalAlpha=c,r(t,d[p],e,n,l,s),t.globalAlpha=1,t.globalCompositeOperation="source-over",!0;f>=0&&(f=-1,A());const h=r(t,d[p],e,n,l,s);return!a&&("function"==typeof(g=d[p])||!!g&&"videoWidth"in g&&!g.paused||!h);var g}});const b=t=>{const e=d.length;e&&((t=(t%e+e)%e)===p&&f<0||(clearTimeout(h),m=p,p=t,u().onChange?.(p),f=y&&!y.still()?performance.now():-1,y?.kick(),f<0&&A()))};function A(){clearTimeout(h),!y||!u().autoplay||y.still()||d.length<2||(h=setTimeout(()=>b(p+1),u().hold))}return y&&(k&&a.appendChild(k),A()),n(()=>y,s,t=>{t.sources!==g&&(g=t.sources,v(),p=Math.min(p,Math.max(0,d.length-1))),k&&(k.textContent=t.label??""),A(),y?.refresh()},{next:()=>b(p+1),go:b,get index(){return p}},()=>{clearTimeout(h),k?.remove()})}export{r as drawMorphSource,a as morphField};//# sourceMappingURL=chunk-AU33Y2SZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountSurface as n,mixHex as t,handle as e,resolveColor as i}from"./chunk-
|
|
1
|
+
import{mountSurface as n,mixHex as t,handle as e,resolveColor as i}from"./chunk-I377LEZA.js";var r={colourByState:!0,ring:!0},o={success:["--ascii-success","#17844a","#3ccf7e"],warning:["--ascii-warning","#9a6700","#f5b83d"],error:["--ascii-error","#c93636","#ff6b6b"]},a=120,c=280,s=520,l=2*Math.PI,u=l/1050,d=n=>1-(1-n)**4,f=n=>`rgb(${255*n} ${255*n} ${255*n})`,h=n=>n*u-Math.PI/2,g=(n,t=0)=>78+5*Math.sin(n/1600*l)*(1-t);function p(n,t,e=78,i=24){n.strokeStyle=f(t),n.lineWidth=i,n.beginPath(),n.arc(a,a,e,0,l),n.stroke()}function k(n,t,e,i=0,r=1){if(p(n,(.3+(e-78)/100)*r,e,24-6*i),i>=1)return void p(n,.72*r,e,18);const o=3.4+(l-3.4)*i;n.lineCap="round";for(let c=0;c<32;c++){const s=c/32,l=.3+.7*(1-s)**1.6;n.strokeStyle=f((l+(.72-l)*i)*r),n.lineWidth=28-6*s+(18-(28-6*s))*i,n.beginPath(),n.arc(a,a,e,t-(s+1/32)*o,t-s*o),n.stroke()}}function m(n,t,e,i=800,r=0,o=!0){if("idle"===t)return void p(n,.34);if("loading"===t)return void k(n,h(e),g(e));const f=(n=>n<.5?4*n*n*n:1-(-2*n+2)**3/2)(Math.min(1,i/c)),m=Math.min(i,c),M=r+u*(m-m*m/560);o?k(n,M,g(e,f),f):f<1&&k(n,M,g(e,f),0,1-f);const b=(i-196)/s;o&&b>0&&b<1&&p(n,.5*(1-b)**2,88+24*b,16-8*b),function(n,t,e,i=30){n.strokeStyle="#fff",n.lineWidth=i,n.lineCap="round",n.lineJoin="round";const r=(t,e)=>{const i=t.slice(1).map((n,e)=>Math.hypot(n[0]-t[e][0],n[1]-t[e][1]));let r=e*i.reduce((n,t)=>n+t,0);n.beginPath(),n.moveTo(t[0][0],t[0][1]);for(let e=1;e<t.length&&r>0;e++){const o=Math.min(1,r/i[e-1]);n.lineTo(t[e-1][0]+(t[e][0]-t[e-1][0])*o,t[e-1][1]+(t[e][1]-t[e-1][1])*o),r-=i[e-1]}n.stroke()};"success"===t?r([[86,122],[110,146],[156,96]],e):"warning"===t?(n.lineWidth=i-4,r([[a,74],[a,114]],Math.min(1,e/.7)),e>.7&&(n.fillStyle="#fff",n.beginPath(),n.arc(a,152,i/2*d((e-.7)/.3),0,l),n.fill())):(r([[92,92],[148,148]],e),r([[148,92],[92,148]],e))}(n,t,d(Math.min(1,Math.max(0,(i-40)/260))),o?24:30)}function M(a,c={}){const s={current:{...r,...c}};let l="idle",u=0,f=0,g="",p="",k=-1e9,M="",b=null;const y=n=>{if(!s.current.colourByState||"idle"===l||"loading"===l)return(n=>i(s.current.ink??"--ascii-ink-strong",a,n?"#d8d6cf":"#1d1d1b"))(n);const[t,e,r]=o[l];return i(s.current.colors?.[l]??t,a,n?r:e)};b=n({host:a,look:()=>({mark:"glyph",fit:"contain",charset:" .:-=+*#%@",cellSize:5,cellAspect:.62,glyphScale:.94,font:'"Geist Mono", ui-monospace, monospace',fontWeight:600,contrast:1.1,shade:.5,...s.current.look}),ink:n=>y(n),kit:s,reducedMotion:()=>s.current.reducedMotion,resolution:()=>[240,240],onFail:()=>{b=null},onTheme:()=>{k=-1e9,M=""},paint:({pen:n,now:e,still:i,dark:r})=>{const o=e-u;m(n,l,i?380:e,i?800:o,f,s.current.ring);const a=y(r);a!==p&&(g=p||a,p=a,k=e);const c=i?1:d(Math.min(1,(e-k)/200)),h=c<1?t(g,p,c):p;return h!==M&&(M=h,b?.field.update({ink:h})),"loading"===l||o<800||c<1}});const S=n=>{const t=performance.now();"loading"===l&&"loading"!==n&&(f=h(t)),l=n,u=t,a.dataset.state=n,"error"===n&&b&&!b.still()&&"function"==typeof a.animate&&a.animate({translate:["0","-5px 0","4px 0","-2px 0","0"]},{duration:260,easing:"cubic-bezier(.16, 1, .3, 1)"}),b?.kick()};return e(()=>b,s,()=>b?.refresh(),{idle:()=>S("idle"),loading:()=>S("loading"),success:()=>S("success"),warning:()=>S("warning"),error:()=>S("error"),get state(){return l}},()=>{delete a.dataset.state})}var b=r;export{b as STATUS_ORB_DEFAULTS,m as orbFrame,M as statusOrb};//# sourceMappingURL=chunk-BGPEFFKK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{driftNoise as t}from"./chunk-
|
|
1
|
+
import{driftNoise as t}from"./chunk-IFZDWKIX.js";import{styleKeeper as e,mountSurface as r,handle as i}from"./chunk-I377LEZA.js";var a=680,n=12,o={preview:[{k:.55,blur:6},{k:.8,blur:2.5}],final:{k:1,blur:0}},l=t=>.5-.5*Math.cos(Math.PI*Math.min(1,Math.max(0,t))),s=t=>{const e=t/1e3;return e<60?`${e.toFixed(1)}s`:`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`},m=async t=>{if("function"==typeof createImageBitmap)return createImageBitmap("string"==typeof t?await(await fetch(t)).blob():t);const e=new Image;return e.crossOrigin="anonymous",e.src="string"==typeof t?t:URL.createObjectURL(t),await e.decode(),e};function c(c,u={}){const g={current:{...u}},h=e(),f=document.createElement("canvas");let b="idle",p=0,d=0,k="",M=null;const w={from:{img:null,k:0,blur:n},to:{img:null,k:0,blur:n},at:-1e6},y=()=>void 0===g.current.image?c.querySelector("img"):g.current.image,v=(t,e)=>{const r=e?1:l((t-w.at)/a),i="generating"===b&&!e&&w.to.img?1-.45*(1-Math.exp(-Math.max(0,t-w.at)/1600)):1,n=(w.from.blur+(w.to.blur-w.from.blur)*r)*i,o=(w.from.img?w.from.k:0)+((w.to.img?w.to.k:0)-(w.from.img?w.from.k:0))*r;return w.to.img??w.from.img?[{img:w.from.img,k:o,blur:n,mix:1},{img:w.to.img,k:o,blur:n,mix:w.from.img?r:1}].filter(t=>t.img):[]},x=(t,e,r)=>{const i=performance.now(),o=M?.still()?1:l((i-w.at)/a),[s]=v(i,!!M?.still());w.from={img:(o>=.5?w.to.img:w.from.img)??w.to.img??w.from.img,k:s?.k??0,blur:s?.blur??n},w.to={img:t,k:e,blur:r},w.at=i,M?.kick()};M=r({host:c,layer:"under",look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,contrast:1.4,drift:.5,speed:.6,hover:"trail",trail:{strength:.9,radius:.35},...g.current.look}),ink:()=>g.current.ink??"--ascii-ink-strong",kit:g,reducedMotion:()=>g.current.reducedMotion,resolution:(t,e)=>{const r=Math.min(480,Math.max(2,Math.round(t)));return[r,Math.max(2,Math.round(r*e/Math.max(1,t)))]},onFail:()=>{M=null,h.restore()},paint:({pen:e,width:r,height:i,now:n,still:o})=>{const l="generating"===b,m=o?0:(n-p)/1e3;l&&g.current.elapsed&&(g.current.elapsed.textContent=s(n-p));const c=l&&!o?1+.12*Math.sin(2.1*m)*(.7+.3*Math.sin(.37*m)):1,u=Math.max(2,Math.ceil(24*i/Math.max(1,r)));24===f.width&&f.height===u||(f.width=24,f.height=u),t(f,3.1+(l?.55*m:0),.35);const h=v(n,o),d=Math.min(1,h[0]?.k??0);e.imageSmoothingEnabled=!0,e.globalAlpha=Math.max(0,1-d),e.filter=`brightness(${1.7*c})`,e.drawImage(f,0,0,r,i);for(const{img:t,k:a,blur:n,mix:o=1}of h){if(!t||a<=0||o<=0)continue;const l=t.width,s=t.height,m=Math.min(s,l*i/r),c=Math.min(l,s*r/i);e.globalAlpha=Math.min(1,1.25*a)*o,e.filter=`brightness(1.3) blur(${n*r/480}px)`,e.drawImage(t,(l-c)/2,Math.max(0,.45*(s-m)),c,m,0,0,r,i)}const k=l&&!o?.6*Math.min(1,d)*(1-Math.max(0,d-.8)/.2):0;return k>.01&&(e.globalCompositeOperation="lighter",e.globalAlpha=k,e.filter=`brightness(${.9*c})`,e.drawImage(f,0,0,r,i),e.globalCompositeOperation="source-over"),e.filter="none",e.globalAlpha=1,l||n-w.at<a}});const A=(t,e)=>{b=t,c.dataset.state=t,c.setAttribute("aria-busy",String("generating"===t)),g.current.onState?.(t,e)},I=t=>{const e=y();e&&M&&(h.set(e,"transition",M.still()?"none":`opacity ${t?560:440}ms cubic-bezier(.45, 0, .25, 1)`),h.set(e,"opacity",t?"1":"0"))},L=t=>new Promise(e=>setTimeout(e,t)),R=t=>{const e=y();e&&(k&&URL.revokeObjectURL(k),k="string"==typeof t?"":URL.createObjectURL(t),e.src=k||t,M||h.set(e,"visibility","visible"))},S=async(t=g.current.stream)=>{if(!t)return b;const e=++d,r=()=>e===d,i=!!M?.still();p=performance.now(),A("generating"),I(!1),x(null,0,n);let a=0;try{for await(const e of"function"==typeof t?t():t){if(!r())return b;if(!(e.final??e.preview))continue;if(e.final){R(e.final),M&&x(await m(e.final),o.final.k,o.final.blur);break}if(!M){R(e.preview);continue}const t=o.preview[Math.min(a++,o.preview.length-1)];x(await m(e.preview),t.k,t.blur)}if(await L(i?0:544),!r())return b;A("done"),I(!0),M?.kick()}catch(t){if(!r())return b;x(null,0,n),await L(i?0:340),A("failed",t)}return b};{const t=y();t&&h.set(t,M?"opacity":"visibility",M?"0":t.getAttribute("src")?"visible":"hidden")}return g.current.stream&&S(),i(()=>M,g,()=>M?.refresh(),{run:S,reset(){d++,x(null,0,n),A("idle"),I(!1)},get state(){return b}},()=>{d++,k&&URL.revokeObjectURL(k),delete c.dataset.state,c.removeAttribute("aria-busy"),h.restore()})}export{s as elapsedLabel,c as imageGenerate};//# sourceMappingURL=chunk-BJJUDT26.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountPageField as e,pageHandle as t}from"./chunk-
|
|
1
|
+
import{mountPageField as e,pageHandle as t}from"./chunk-RGV7VRYC.js";import{styleKeeper as r,prefersReduced as o}from"./chunk-I377LEZA.js";var n="position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit;pointer-events:none";function s(s,i={}){const l={current:{...i}},a=r(),c=[],p=s.querySelector("video"),u=l.current.src??p??null,d=()=>l.current.reducedMotion??o();let y=null,h=0;y=u?e({host:s,layer:"over",look:()=>({mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:6,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.25,levels:"auto",fit:"cover",focus:{x:.5,y:.5},hover:"trail",trail:{strength:.9,radius:.35},...l.current.look}),ink:()=>l.current.ink??"--ascii-ink-strong",source:u,label:l.current.label??"Video, drawn in characters",kit:l,ownPoster:!0,reducedMotion:()=>l.current.reducedMotion,onFail:()=>{y=null,a.restore(),v()},onRelease:()=>{f=!1,g(),u instanceof HTMLVideoElement&&u.pause?.()},onMount:()=>{h++&&(y?.field.ready.then(()=>{f=!0,g()}),k&&u instanceof HTMLVideoElement&&u.play?.()?.catch?.(()=>{}))}}):null,y&&u instanceof HTMLVideoElement&&(s.contains(u)&&a.set(u,"opacity","0"),u.muted=!0,u.loop=!0,u.playsInline=!0);let m=null;l.current.poster&&u&&(m=Object.assign(document.createElement("img"),{alt:"",decoding:"async"}),m.className="ascii-video-poster",m.setAttribute("aria-hidden","true"),m.setAttribute("style",`${n};transition:opacity 280ms cubic-bezier(.16, 1, .3, 1)`),m.src=l.current.poster,"static"===getComputedStyle(s).position&&a.set(s,"position","relative"),s.appendChild(m),c.push(m));let f=!1;const g=()=>{m&&(m.style.opacity=y&&f&&(k||!d())?"0":"1")};let b=null;function v(){!b&&u&&(u instanceof HTMLVideoElement?b=u:(b=document.createElement("video"),b.src=u,b.setAttribute("style",n),b.setAttribute("aria-label",l.current.label??"Video"),"static"===getComputedStyle(s).position&&a.set(s,"position","relative"),m?s.insertBefore(b,m):s.appendChild(b),c.push(b)),l.current.poster&&!b.poster&&(b.poster=l.current.poster),b.muted=!0,b.loop=!0,b.playsInline=!0,m&&(m.style.opacity="0"),k&&b.play?.()?.catch?.(()=>{}))}let k=l.current.autoplay??!(y?y.still():d());y?(y.field.ready.then(()=>{f=!0,k||y?.field.pause(),g()}),k&&u instanceof HTMLVideoElement&&u.play?.()?.catch?.(()=>{}),g()):v();const E=t(()=>y,l,e=>{m&&e.poster&&m.getAttribute("src")!==e.poster&&(m.src=e.poster),b&&e.poster&&(b.poster=e.poster)},{toggle:()=>(k?E.pause():E.play(),k),get playing(){return k}},()=>{c.forEach(e=>e.remove()),a.restore()}),M=E.play,V=E.pause;return E.play=()=>{y&&!E.supported||(k=!0,y?M():b?.play?.()?.catch?.(()=>{}),g())},E.pause=()=>{y&&!E.supported||(k=!1,y?V():b?.pause?.(),g())},E}export{s as asciiVideo};//# sourceMappingURL=chunk-BO4CPM26.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeOptions as t,prefersReduced as e,hash as i,mountSurface as s,resolveColor as h}from"./chunk-I377LEZA.js";import{isGlyphFieldSupported as a,watchPointer as r,watchVisibility as n,watchMotionPreference as o}from"../field.js";var l=class{constructor(t,e,i){this.previous=null,this.peak=0,this.width=t,this.height=e,this.span=i??Math.min(t,e);const s=t*e;this.pixels=new Uint8Array(4*s),this.signal=new Float32Array(s),this.offsetX=new Float32Array(s),this.offsetY=new Float32Array(s),this.driftX=new Float32Array(s),this.driftY=new Float32Array(s),this.u=new Float32Array(s),this.v=new Float32Array(s),this.ink=new Float32Array(s),this.a=new Float32Array(s),this.b=new Float32Array(s),this.c=new Float32Array(s),this.pressure=new Float32Array(s),this.pressureNext=new Float32Array(s),this.divergence=new Float32Array(s),this.curl=new Float32Array(s)}get active(){return this.peak>2e-4}clear(){for(const t of[this.u,this.v,this.ink,this.a,this.b,this.c,this.pressure,this.pressureNext,this.divergence,this.curl,this.signal,this.pixels,this.offsetX,this.offsetY,this.driftX,this.driftY])t.fill(0);this.previous=null,this.peak=0}leave(){this.previous=null}move(t,e,i,s=performance.now()){if(!Number.isFinite(t+e+i+s))return;t=Math.max(0,Math.min(1,t)),e=Math.max(0,Math.min(1,e)),i=Math.max(.1,Math.min(1,i));const h=this.previous;if(this.previous={x:t,y:e,time:s},!h)return;const a=(t-h.x)*(this.width-1),r=(e-h.y)*(this.height-1),n=Math.hypot(a,r);if(n<.001)return;const o=this.span,l=s>h.time?Math.max(1/240,(s-h.time)/1e3):1/60,c=Math.min(12,n/o/l),u=1-Math.exp(-c/2.2),d=o*(.022+.075*i)*(.65+.95*u),p=Math.min(128,Math.max(1,Math.ceil(n/(.4*d)))),f=n/d*(.32+.22*u)/p,m=a/n,M=r/n,y=-M,x=m,v=n*(2+18*u)/p;for(let i=0;i<p;i++){const s=(i+.5)/p,a=(h.x+(t-h.x)*s)*(this.width-1),r=(h.y+(e-h.y)*s)*(this.height-1),n=Math.max(1,Math.floor(a-3*d)),o=Math.min(this.width-2,Math.ceil(a+3*d)),l=Math.max(1,Math.floor(r-3*d)),c=Math.min(this.height-2,Math.ceil(r+3*d));for(let t=l;t<=c;t++)for(let e=n;e<=o;e++){const i=((e-a)*m+(t-r)*M)/d,s=((e-a)*y+(t-r)*x)/d,h=Math.exp(-i*i*.65-s*s*1.7),n=t*this.width+e;this.ink[n]=1-(1-this.ink[n])*Math.exp(-h*f);const o=1-s*s*.55,l=i*s*.7;this.u[n]=Math.max(-80,Math.min(80,this.u[n]+(m*o+y*l)*h*v)),this.v[n]=Math.max(-80,Math.min(80,this.v[n]+(M*o+x*l)*h*v))}}this.peak=1}read(t,e,i){const s=0|(e=Math.max(.5,Math.min(this.width-1.5,e))),h=0|(i=Math.max(.5,Math.min(this.height-1.5,i))),a=e-s,r=i-h,n=h*this.width+s;return(t[n]*(1-a)+t[n+1]*a)*(1-r)+(t[n+this.width]*(1-a)+t[n+this.width+1]*a)*r}sample(t,e){return this.read(this.signal,t*(this.width-1),e*(this.height-1))}displacement(t,e,i){i[0]=this.read(this.offsetX,t*(this.width-1),e*(this.height-1)),i[1]=this.read(this.offsetY,t*(this.width-1),e*(this.height-1))}step(t){if(!this.active||!Number.isFinite(t))return;let e=Math.max(0,Math.min(.05,t));const i=this.width,s=this.height;for(;e>1e-7;){const t=Math.min(1/60,e);e-=t;const h=Math.exp(-1.9*t),a=Math.exp(-3.2*t);for(let e=1;e<s-1;e++)for(let r=1;r<i-1;r++){const n=e*i+r,o=Math.max(.5,Math.min(i-1.5,r-this.u[n]*t)),l=Math.max(.5,Math.min(s-1.5,e-this.v[n]*t)),c=0|o,u=0|l,d=o-c,p=l-u,f=u*i+c,m=(1-d)*(1-p),M=d*(1-p),y=(1-d)*p,x=d*p;this.a[n]=(this.u[f]*m+this.u[f+1]*M+this.u[f+i]*y+this.u[f+i+1]*x)*h,this.b[n]=(this.v[f]*m+this.v[f+1]*M+this.v[f+i]*y+this.v[f+i+1]*x)*h,this.c[n]=(this.ink[f]*m+this.ink[f+1]*M+this.ink[f+i]*y+this.ink[f+i+1]*x)*a}[this.u,this.a]=[this.a,this.u],[this.v,this.b]=[this.b,this.v],[this.ink,this.c]=[this.c,this.ink];for(let t=1;t<s-1;t++)for(let e=1;e<i-1;e++){const s=t*i+e;this.curl[s]=.5*(this.v[s+1]-this.v[s-1]-this.u[s+i]+this.u[s-i])}for(let e=1;e<s-1;e++)for(let s=1;s<i-1;s++){const h=e*i+s,a=Math.abs(this.curl[h+1])-Math.abs(this.curl[h-1]),r=Math.abs(this.curl[h+i])-Math.abs(this.curl[h-i]),n=Math.hypot(a,r)+1e-4,o=this.curl[h]*t*10,l=Math.hypot(this.u[h],this.v[h]);this.u[h]+=r/n*o,this.v[h]-=a/n*o;const c=Math.min(1,l/(Math.hypot(this.u[h],this.v[h])+1e-6));this.u[h]*=c,this.v[h]*=c,this.divergence[h]=-.5*(this.u[h+1]-this.u[h-1]+this.v[h+i]-this.v[h-i])}this.pressure.fill(0);for(let t=0;t<4;t++){for(let t=1;t<s-1;t++)for(let e=1;e<i-1;e++){const s=t*i+e;this.pressureNext[s]=.25*(this.divergence[s]+this.pressure[s-1]+this.pressure[s+1]+this.pressure[s-i]+this.pressure[s+i])}[this.pressure,this.pressureNext]=[this.pressureNext,this.pressure]}let r=0;for(let e=1;e<s-1;e++)for(let s=1;s<i-1;s++){const h=e*i+s;this.u[h]=Math.max(-80,Math.min(80,this.u[h]-.5*(this.pressure[h+1]-this.pressure[h-1]))),this.v[h]=Math.max(-80,Math.min(80,this.v[h]-.5*(this.pressure[h+i]-this.pressure[h-i]))),this.driftX[h]+=(3.6*this.u[h]-58*this.offsetX[h]-12*this.driftX[h])*t,this.driftY[h]+=(3.6*this.v[h]-58*this.offsetY[h]-12*this.driftY[h])*t,this.offsetX[h]=Math.max(-2,Math.min(2,this.offsetX[h]+this.driftX[h]*t)),this.offsetY[h]=Math.max(-2,Math.min(2,this.offsetY[h]+this.driftY[h]*t)),this.signal[h]=1-Math.exp(.06*-Math.hypot(this.u[h],this.v[h])-.16*this.ink[h]),r=Math.max(r,this.signal[h])}this.peak=r}if(this.active)for(let t=0;t<this.ink.length;t++){const e=Math.round(65535*Math.min(1,this.signal[t]));this.pixels[4*t]=e>>>8,this.pixels[4*t+1]=255&e,this.pixels[4*t+2]=Math.round(128+63.5*this.offsetX[t]),this.pixels[4*t+3]=Math.round(128+63.5*this.offsetY[t])}else this.clear()}},c={style:"trail",charset:" .:-=+*#%@",cellSize:9,zIndex:1e3},u='input, textarea, select, [contenteditable], dialog, [role="dialog"], [role="alertdialog"], [data-ascii-cursor-skip]',d={trail:64,wake:48,water:20,sparkle:140,spray:90},p={strength:.62,radius:.22,span:540,cell:15},f=t=>{const e=Math.round(255*Math.max(0,Math.min(1,t)));return`rgb(${e},${e},${e})`};function m(t,e,i,s,h,a,r){for(let n=1;n<e.length;n++){const o=e[n-1],l=e[n],c=e[n-2]??o,u=1-(s-l.t)/h;u<=0||(t.strokeStyle=f(r(u)),t.lineWidth=Math.max(1,a(u)*i),t.beginPath(),t.moveTo((c.x+o.x)/2*i,(c.y+o.y)/2*i),t.quadraticCurveTo(o.x*i,o.y*i,(o.x+l.x)/2*i,(o.y+l.y)/2*i),t.lineTo(l.x*i,l.y*i),t.stroke())}}function M(t,e,i,s,h,a,r,n){if(t.lineCap="round",t.lineJoin="round",t.globalCompositeOperation="lighten","trail"===i)m(t,e,r,s,h,t=>a*(.5+.95*t),t=>t**1.25);else if("wake"===i)m(t,e,r,s,h,t=>a*(2+3.2*t),t=>.34*t**1.6),m(t,e,r,s,h,t=>a*(.8+1.4*t),t=>.62*t**1.4);else if("water"===i)for(const i of e){const e=s-i.t,n=1-e/h;n<=0||(t.strokeStyle=f(.9*n**1.5),t.lineWidth=Math.max(1,a*(.45+.5*n)*r),t.beginPath(),t.arc(i.x*r,i.y*r,(.8*a+.085*e)*r,0,2*Math.PI),t.stroke())}else if("spray"===i){for(const i of e){const e=1-(s-i.t)/h;if(e<=0)continue;const n=a*(1.1+1.6*i.seed)*(.75+.25*e)*r,o=i.x*r,l=i.y*r,c=t.createRadialGradient(o,l,0,o,l,n);c.addColorStop(0,f(.95*e**.8)),c.addColorStop(.6,f(.6*e**.8)),c.addColorStop(1,f(0)),t.fillStyle=c,t.fillRect(o-n,l-n,2*n,2*n)}if(n){const e=n.t?1-(s-n.t)/h:1;e>0&&(t.strokeStyle=f(.85*e),t.lineWidth=Math.max(1,.5*a*r),t.strokeRect(Math.min(n.x0,n.x1)*r,Math.min(n.y0,n.y1)*r,Math.abs(n.x1-n.x0)*r,Math.abs(n.y1-n.y0)*r))}}else for(const i of e){const e=s-i.t,n=1-e/h;if(n<=0)continue;const o=.55+.45*Math.sin(.028*e+6.28*i.seed),l=a*(.55+.6*i.seed)*(.6+.4*n)*r;t.fillStyle=f(n**1.2*o),t.fillRect((i.x+i.vx*e)*r-l/2,(i.y+i.vy*e)*r-l/2,l,l)}t.globalCompositeOperation="source-over"}function y(f={}){const m={current:{...c,...f}},y=()=>m.current,x=()=>y().life??("water"===y().style?950:800);let v=[],g=null;const w=[];let k=-1/0,b=0;const A=(t,e,i,s)=>{if(!y().readout||!S)return;const a=s??b++%2+2;let r=w[a];r||(r=document.createElement("span"),w[a]=r,S.appendChild(r));const n=h(y().ink??"--ascii-ink",document.body,"#1d1d1b")??"#1d1d1b";r.textContent=`${Math.round(t)}, ${Math.round(e)}`,r.style.cssText=`position:absolute;left:${Math.round(t+10)}px;top:${Math.round(e-22)}px;padding:1px 5px;font:500 10px/1.5 ui-monospace,"SF Mono",Menlo,monospace;letter-spacing:.02em;white-space:nowrap;color:var(--ascii-readout-text,#fff);background:${n};opacity:.9;transition:opacity ${x()}ms linear`,k=i,requestAnimationFrame?.(()=>{r&&(r.style.opacity="0")})};let F=null,S=null,X=!1,Y=!1,z=!1,C=0;const $="undefined"!=typeof document&&"undefined"!=typeof window&&a(),I=()=>!!(y().reducedMotion??e()),E=()=>({mark:"glyph",charset:y().charset,cellSize:y().cellSize,..."trail"===y().style?{font:'"Geist", Arial, sans-serif',fontWeight:500,cellAspect:.8,glyphScale:.8,shade:0,levels:"none"}:"spray"===y().style?{mark:"engraving",markAngle:-45,cellAspect:1,shade:0}:{cellAspect:.62,glyphScale:.92,shade:.6},contrast:1,...y().look}),N={trail:null,cols:0,rows:0,at:0,moved:0,lit:!1,art:null},T=()=>({...p,...y().trail}),L=()=>{const{cell:t,span:e}=T(),i=window.innerWidth||1280,s=window.innerHeight||800,h=Math.ceil(i/t)+2,a=Math.ceil(s/t)+2;return N.trail&&N.cols===h&&N.rows===a&&N.trail.span===e/t||(N.trail=new l(h,a,e/t),N.cols=h,N.rows=a),N.trail},P=t=>{t.style.cssText=`position:fixed;left:0;top:0;width:100vw;height:100vh;pointer-events:none;z-index:${y().zIndex};contain:strict`},W=t=>{if("trail"===y().style)return(({pen:t,now:e,scale:i})=>{const s=L(),h=N.at?Math.max(0,e-N.at)/1e3:1/60;if(N.at=Math.max(N.at,e),s.step(h),!s.active)return N.at=0,N.lit=!1;const{cols:a,rows:r}=N,{strength:n,cell:o}=T(),l=s.pixels,c=N.art??(N.art=document.createElement("canvas")),u=3*a,d=3*r;c.width===u&&c.height===d||(c.width=u,c.height=d);const p=c.getContext("2d");if(!p)return N.at=0,N.lit=!1;const f=p.createImageData(u,d),m=f.data,M=t=>(256*l[4*t]+l[4*t+1])/65535;let y=0;for(let t=0;t<d;t++){const e=Math.min(r-1.001,Math.max(0,(t+.5)/3-.5)),i=0|e,s=e-i;for(let e=0;e<u;e++){const h=Math.min(a-1.001,Math.max(0,(e+.5)/3-.5)),r=0|h,o=h-r,l=i*a+r,c=((M(l)*(1-o)+M(l+1)*o)*(1-s)+(M(l+a)*(1-o)+M(l+a+1)*o)*s)*n,d=Math.min(1,c/.38),p=d*d*(3-2*d);p>y&&(y=p);const f=Math.round(255*p),x=4*(t*u+e);m[x]=m[x+1]=m[x+2]=f,m[x+3]=255}}return y<.05&&e-N.moved>150?(s.clear(),N.at=0,N.lit=!1):(p.putImageData(f,0,0),t.imageSmoothingEnabled=!0,t.drawImage(c,-o/2*i,-o/2*i,a*o*i,r*o*i),N.lit=!0)})(t);const{pen:e,now:i,scale:s}=t,h=x();return v=v.filter(t=>i-t.t<h),g&&g.t&&i-g.t>h&&(g=null),!(!v.length&&!g)&&(M(e,v,y().style,i,h,y().cellSize,s,g),!0)},R=()=>{F||X||Y||!$||(S=document.createElement("div"),S.setAttribute("aria-hidden","true"),S.dataset.asciiCursor="",P(S),document.body.appendChild(S),F=s({host:S,kit:{get current(){return{lazy:!1,globalLook:y().globalLook??!1}}},look:E,ink:()=>y().ink??"--ascii-ink",resolution:.5,paint:W,reducedMotion:()=>y().reducedMotion,onFail:()=>{X=!0,F=null,S?.remove(),S=null}}),F||(X=!0,S.remove(),S=null))},j=()=>{v=[],g=null,(()=>{for(const t of w)t?.remove();w.length=0})(),N.trail?.clear(),N.lit=!1,N.at=0},q=()=>{g&&!g.t&&(g.t=performance.now(),F?.kick())};$&&window.addEventListener("pointerup",q,!0);const D=$?[()=>window.removeEventListener("pointerup",q,!0),r({target:window,move:t=>{if(Y||z||"touch"===t.pointerType||"function"==typeof matchMedia&&matchMedia("(hover: none)").matches&&matchMedia("(pointer: coarse)").matches||I()||(t=>{const e=t;return!!e?.closest&&!!e.closest(y().skip?`${u}, ${y().skip}`:u)})(t.target))return void N.trail?.leave();const e=performance.now(),s=t.clientX,h=t.clientY,a=y().style;if("trail"===a){const{cell:t,radius:i}=T(),a=L();return N.at||(N.at=e),N.moved=e,a.move(s/(t*(N.cols-1)),h/(t*(N.rows-1)),i,e),N.lit=!0,R(),void F?.kick()}if("spray"===a){!(1&~t.buttons)?(g&&!g.t||(g={x0:s,y0:h,x1:s,y1:h,t:0},R(),A(s,h,e,0)),g.x1=s,g.y1=h,e-k>60&&A(s,h,e,1)):g&&!g.t&&(g.t=e)}const r=v[v.length-1],n=r?Math.hypot(s-r.x,h-r.y):1/0;if("water"===a?n<2.6*y().cellSize&&e-C<90:"spray"===a?n<2.2*y().cellSize:n<2)g&&F?.kick();else{if(C=e,"sparkle"===a)for(let t=0;t<2;t++){const a=i(e+17*t,s+h),r=i(h+t,e)*Math.PI*2,n=1.4*y().cellSize*i(s,e+t);v.push({x:s+Math.cos(r)*n,y:h+Math.sin(r)*n,t:e,seed:a,vx:.012*Math.cos(r),vy:.012*Math.sin(r)+.01})}else if("spray"===a){const t=i(e,s)*Math.PI*2,a=2.6*y().cellSize*i(h,e);v.push({x:s+Math.cos(t)*a,y:h+Math.sin(t)*a,t:e,seed:i(s+e,h),vx:0,vy:0}),!g&&e-k>140&&(R(),A(s,h,e))}else v.push({x:s,y:h,t:e,seed:0,vx:0,vy:0});for(;v.length>d[a];)v.shift();R(),F?.kick()}},leave(){}}),n(()=>{document.hidden&&j()}),o(()=>{I()&&j(),F?.kick()})]:[];return{get supported(){return $&&!X&&!Y},get field(){return Y?null:F?.field??null},get active(){return v.length>0||!!g||N.lit},clear(){j(),F?.kick()},update(e){if(Y)return;const i=y().style;m.current={...c,...t(m.current,e)},y().style!==i&&j(),S&&P(S),F?.refresh()},play(){Y||(z=!1,F?.play())},pause(){Y||(z=!0,j(),F?.pause())},destroy(){if(!Y){Y=!0;for(const t of D)t();j(),F?.destroy(),F=null,S?.remove(),S=null}}}}export{y as cursorTrail,M as cursorTrailFrame};//# sourceMappingURL=chunk-BQ53B2HP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{clamp as t,mountSurface as o,handle as e}from"./chunk-I377LEZA.js";import{watchPointer as r}from"../field.js";var n={lights:[{x:.5,y:1.08,radius:.62,strength:1}],base:.05,motion:.35,follow:.06,layer:"under"},l=o=>{const e=Math.round(255*t(o));return`rgb(${e},${e},${e})`};function i(o,e,r,n,i,a,s,c){o.fillStyle=l(i),o.fillRect(0,0,e,r),o.globalCompositeOperation="lighter";const h=Math.max(e,r);n.forEach((n,i)=>{const d=.035*a,u=1+.14*a*Math.sin(.55*s+2.1*i),x=(n.x+d*Math.sin(.17*s+1.7*i)+(0===i?c.x:0))*e,y=(n.y+d*Math.cos(.13*s+2.3*i)+(0===i?c.y:0))*r,m=Math.max(1,(n.radius??.6)*h*u),g=t(n.strength??1),p=o.createRadialGradient(x,y,0,x,y,m);p.addColorStop(0,l(g)),p.addColorStop(.35,l(.62*g)),p.addColorStop(.7,l(.2*g)),p.addColorStop(1,l(0)),o.fillStyle=p,o.fillRect(0,0,e,r)}),o.globalCompositeOperation="source-over"}function a(l,a={}){const s={current:{...n,...a}},c=()=>s.current,h={x:0,y:0,tx:0,ty:0};let d=null;d=o({host:l,kit:s,layer:c().layer,look:()=>({mark:"dither",charset:" .:-=+*#%@",cellSize:6,cellAspect:1,contrast:1,...c().look}),ink:()=>c().ink??getComputedStyle(l).color,reducedMotion:()=>c().reducedMotion,resolution:(t,o)=>{const e=Math.min(1,180/Math.max(t,o));return[Math.max(4,Math.round(t*e)),Math.max(4,Math.round(o*e))]},onFail:()=>{d=null},paint:({pen:o,width:e,height:r,now:n,still:l})=>{const a=!l&&(Math.abs(h.tx-h.x)>.001||Math.abs(h.ty-h.y)>.001);l?h.x=h.tx=h.y=h.ty=0:(h.x+=.08*(h.tx-h.x),h.y+=.08*(h.ty-h.y));const s=l?0:t(c().motion);return i(o,e,r,c().lights,t(c().base),s,n/1e3,h),!l&&(s>0||a)}});const u=d?r({target:l,move:o=>{const e=c().follow;if(!e||!d)return;const r=l.getBoundingClientRect();h.tx=2*t((o.clientX-r.left)/(r.width||1)-.5,-.5,.5)*e,h.ty=2*t((o.clientY-r.top)/(r.height||1)-.5,-.5,.5)*e,d.kick()},leave:()=>{h.tx=h.ty=0,d?.kick()}}):()=>{};return e(()=>d,s,()=>d?.refresh(),{setLights(t){s.current={...s.current,lights:t},d?.kick()}},u)}export{a as ditherGradient,i as ditherGradientFrame};//# sourceMappingURL=chunk-BV6AOHFU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hash as e,styleKeeper as t,srOnly as n,mountSurface as r,handle as i}from"./chunk-
|
|
1
|
+
import{hash as e,styleKeeper as t,srOnly as n,mountSurface as r,handle as i}from"./chunk-I377LEZA.js";import{isGlyphFieldSupported as l}from"../field.js";var o={check:!0,shake:!0};function a(e,t){const n=Math.max(3,3*Math.round(e*t/3));return{cw:n/3*2/t,ch:n/t,cellSize:n/t}}function s(t,n,r,i,l,o=0){const a=24*r+170;if(n<a){const r=(n-24*t)/170;return r<1?1+Math.floor(e(t+o,Math.floor(n/46))*(r<0?3:9)):0}if(!i||l)return 0;const s=(((n-a)/1250-.07*t)%1+1)%1;return s<.3?1+Math.round(8*Math.sin(Math.PI*(s/.3))):0}var c="cubic-bezier(.16, 1, .3, 1)";function d(e,d={}){const u={current:{...o,...d}},h=t(),p=u.current.label??e,m=u.current.text??(p.textContent??"").trim(),f=[...p.childNodes],g=void 0!==u.current.icon?u.current.icon:m?null:e.querySelector("svg"),y=e.getAttribute("aria-label");let v="idle",b=m,x=-1e9,M=0,C=null,w={cw:9,ch:15,cellSize:15};const $=n(m),k=document.createElement("span"),A=document.createElement("span");A.setAttribute("aria-hidden","true"),A.dataset.asciiCheck="",A.innerHTML='<svg viewBox="0 0 24 24" width="1.1em" height="1.1em" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>';const S=()=>{const e=Math.min(globalThis.devicePixelRatio||1,2);w=a(parseFloat(getComputedStyle(p).fontSize)||15,e)},z=()=>{if(g)return k.replaceChildren(),C&&k.appendChild(C.canvas),k.style.width=`${w.cw}px`,void(k.style.height=`${w.ch}px`);const t=[...b];for(const e of[...k.children])"SPAN"===e.tagName&&e.remove();const n=C&&C.canvas.parentElement===k?C.canvas:null;for(const[e,r]of t.entries()){const t=document.createElement("span");t.textContent=r,t.setAttribute("style",`position:absolute;top:0;left:${e*w.cw}px;width:${w.cw}px;height:${w.ch}px;line-height:${w.ch}px;text-align:center`),n?k.insertBefore(t,n):k.appendChild(t)}C&&!n&&k.appendChild(C.canvas),k.style.width=t.length*w.cw+"px",k.style.height=`${w.ch}px`,$.textContent=b,M=Math.max(M,e.offsetWidth),M&&h.set(e,"min-width",`${M}px`)},E="undefined"!=typeof document&&l();if(E){S(),k.setAttribute("aria-hidden","true");const t="position:absolute;left:50%;top:50%;translate:-50% -50%;pointer-events:none";g?("static"===getComputedStyle(e).position&&h.set(e,"position","relative"),k.setAttribute("style",t),A.setAttribute("style",`${t};display:grid;place-items:center;opacity:0;scale:.5`),e.appendChild(k),e.appendChild(A)):(k.setAttribute("style","display:inline-block;vertical-align:middle;position:relative;white-space:pre"),A.setAttribute("style","display:inline-grid;place-items:center;vertical-align:middle;overflow:hidden;width:0;opacity:0;scale:.5"),p.replaceChildren($,A,k)),z()}C=E?r({host:k,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:w.cellSize,cellAspect:2/3,glyphScale:.94,...u.current.look}),ink:()=>u.current.ink??getComputedStyle(p).color,kit:u,reducedMotion:()=>u.current.reducedMotion,resolution:(e,t)=>[Math.max(2,2*Math.round(e/w.cw)),Math.max(3,3*Math.round(t/w.ch))],onFail:()=>{C=null,k.remove(),A.remove(),h.restore(),g||(p.replaceChildren(...f),p.textContent=b)},paint:({pen:e,now:t,still:n})=>{const r=t-x;if(g){if("loading"!==v||n)return!1;const t=1+Math.round(8*(.5-.5*Math.cos(2*Math.PI*r/720))),i=Math.round(t/9*255);return e.fillStyle=`rgb(${i} ${i} ${i})`,e.fillRect(0,0,2,3),!0}const i=[...k.children].filter(e=>"SPAN"===e.tagName);let l="loading"===v&&!n;for(let t=0;t<i.length;t++){const o=n?0:s(t,r,i.length,"loading"===v,n,b.length);r<24*i.length+170&&(l=!0);const a=" "===b[t];if(i[t].style.visibility=o&&!a?"hidden":"",!o||a)continue;const c=Math.round(o/9*255);e.fillStyle=`rgb(${c} ${c} ${c})`,e.fillRect(2*t,0,2,3)}return l}}):null,E&&!C&&(k.remove(),A.remove(),g||p.replaceChildren(...f),h.restore());const N=(t,n)=>{v=t,b=g?"":n,e.dataset.state=t,"loading"===t?e.setAttribute("aria-busy","true"):e.removeAttribute("aria-busy"),g&&null!==y&&e.setAttribute("aria-label","idle"===t?y:n),u.current.announce&&(u.current.announce.textContent="idle"===t?"":n),C?(x=performance.now(),((e,t)=>{const n=t?"none":`opacity 160ms ${c} ${e?120:0}ms, scale 240ms ${c} ${e?120:0}ms`;if(A.style.transition=n,A.style.opacity=e?"1":"0",A.style.scale=e?"1":".5",g||(A.style.width=e?"1.1em":"0",A.style.marginRight=e?".45em":"0"),g&&"style"in g){const e="idle"!==v&&"error"!==v;h.set(g,"transition",n.replace(/ 120ms/g,"")),h.set(g,"opacity",e?t&&"loading"===v?".4":"0":"1"),h.set(g,"scale",e&&!t?".6":"1")}})(!("success"!==t||!g&&!u.current.check),C.still()),z(),C.kick(),"error"===t&&u.current.shake&&!C.still()&&"function"==typeof e.animate&&e.animate([{translate:"0"},{translate:"-4px 0"},{translate:"4px 0"},{translate:"-2px 0"},{translate:"0"}],{duration:280,easing:c})):g||(p.textContent=n)};return i(()=>C,u,()=>{C&&(S(),z(),C.refresh())},{start(e=(g?y??"":`${m}…`)){N("loading",e)},succeed(e="Done"){N("success",e)},fail(e="Retry"){N("error",e)},reset(e=(g?y??"":m)){N("idle",e)},get state(){return v}},()=>{C&&(k.remove(),A.remove(),g||p.replaceChildren(...f)),g&&null!==y&&e.setAttribute("aria-label",y),delete e.dataset.state,e.removeAttribute("aria-busy"),h.restore()})}var u=o;export{u as BUTTON_LOADING_DEFAULTS,d as buttonLoading,a as letterCells,s as letterGlyph};//# sourceMappingURL=chunk-CH64MY3U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"halo",name:"Halo",description:"A corona breathes slowly round the middle, its rays turning; the centre stays empty for a headline.",cellSize:11,scene:"halo",charset:" .·:-=+*",hover:"lantern",middle:!1,feather:.12});export{r as halo};//# sourceMappingURL=chunk-CIGEXHZ5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{snapshot as t}from"./chunk-
|
|
1
|
+
import{snapshot as t}from"./chunk-HENGH3DE.js";import{hash as e,styleKeeper as a,mountSurface as n,handle as o,house as i,prefersReduced as s}from"./chunk-I377LEZA.js";var r={dissolve:300,condense:300},c=10,l=16,h=t=>.5-.5*Math.cos(Math.PI*Math.min(1,Math.max(0,t))),d=t=>i(Math.min(1,Math.max(0,t))),u=()=>{let t=()=>{};return[new Promise(e=>{t=e}),t]};function g(t,a,n,o,i,s=!1){const r=a.width,h=a.height,d=Math.ceil(r/c),u=Math.ceil(h/l),g=[],m=[],f=Math.max(...[[0,0],[r,0],[0,h],[r,h]].map(([t,e])=>Math.hypot(t-o.x,e-o.y)))||1,x=function(t,e,a){const n=p.get(t);if(n)return n;const o=Object.assign(document.createElement("canvas"),{width:e,height:a}),i=Object.assign(document.createElement("canvas"),{width:t.width,height:t.height}),s=o.getContext("2d"),r=i.getContext("2d"),c={mask:o,maskPen:s,data:s.createImageData(e,a),clip:i,clipPen:r};return p.set(t,c),c}(a,d,u),M=x.data.data;let w=0;for(let t=0;t<u;t++)for(let a=0;a<d;a++){const i=a*c,r=t*l,h=Math.hypot(i+5-o.x,r+8-o.y)/f*.72+.28*e(i,r),u=s?n-h-.12:h-n;M[4*(t*d+a)+3]=u>0?255:0,u>0&&w++,u>0&&u<.07?g.push([i,r]):u<=0&&u>-.12&&m.push([i,r,-u/.12])}if(w){x.maskPen.putImageData(x.data,0,0);const e=x.clipPen;e.globalCompositeOperation="source-over",e.clearRect(0,0,r,h),e.drawImage(a,0,0),e.globalCompositeOperation="destination-in",e.imageSmoothingEnabled=!1,e.drawImage(x.mask,0,0,d*c,u*l),e.globalCompositeOperation="source-over",t.drawImage(x.clip,0,0)}for(const[n,o,r]of m)t.globalAlpha=(1-r)*(s?.7:1),t.drawImage(a,n,o,c,l,n+18*(e(o,n+i)-.5)*r,o-10*r*(s?-.6:1),c,l);t.globalAlpha=1,t.globalCompositeOperation="lighter",t.globalAlpha=s?.5:1;for(const[e,n]of g)t.drawImage(a,e,n,c,l,e,n,c,l);t.globalAlpha=1,t.globalCompositeOperation="source-over"}var p=new WeakMap;function m(e,i={}){const c={current:{...r,...i}},l=a();let p=null,m=0,f=0,x=Promise.resolve(),M=0,w=null;const b="function"==typeof matchMedia&&matchMedia("(pointer: coarse)").matches?1:2,k=t=>{t.handed(),t.landing(),t.done()};w=n({host:e,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:8,cellAspect:.6,glyphScale:.9,contrast:1.15,shade:.55,...c.current.look}),ink:()=>c.current.ink??"--ascii-ink-strong",kit:{get current(){return{...c.current,poster:void 0}}},reducedMotion:()=>c.current.reducedMotion,resolution:b,onFail:()=>{w=null;const t=p;p=null,l.restore(),t&&k(t)},paint:({pen:t,width:e,height:a,now:n})=>{const o=p;if(!o)return!1;const i=n-o.start,s=i/o.outMs,r=o.next?(n-o.nextAt)/o.nextMs:0;var c;s<1&&g(t,o.out,1.12*h(s),o.at,++f),o.next&&r>0&&g(t,o.next,.1+1.14*(c=r,1-(1-Math.min(1,Math.max(0,c)))**2),o.at,f,!0);const l=o.next?(n-o.nextAt-o.nextMs+o.hand)/o.hand:-1,u=d(i/o.hand)*(1-d(l));u<1&&(t.globalAlpha=1-u,t.fillStyle="#000",t.fillRect(0,0,e,a),t.globalAlpha=1);const x=Math.round(-160*h(2*s)*(o.next?1-h(r):1))/1e3;return x!==m&&(m=x,w?.field.update({brightness:x})),0===o.stage&&i>=o.hand&&(o.stage=1,o.handed()),1===o.stage&&l>=0&&(o.stage=2,o.landing()),!(l>=1)||(p=null,o.done(),!1)}});const v=(t,a)=>{if(t&&"getBoundingClientRect"in t){const e=a.box(t);return{x:(e.x+e.w/2)*b,y:(e.y+e.h/2)*b}}return t?{x:t.x*b,y:t.y*b}:{x:e.offsetWidth/2*b,y:0}},y=a=>t(e,a.box,e.offsetWidth,e.offsetHeight,b,{skip:a.canvas}),A=(t,a)=>{for(const n of[...e.children].filter(t=>void 0===t.dataset.asciiKit&&void 0===t.dataset.asciiPoster))l.set(n,"transition",a?`opacity ${a}ms cubic-bezier(.16, 1, .3, 1)`:"none"),l.set(n,"opacity",t?"1":"0")},C=async(t,a)=>{const n=w;if(!n||(c.current.reducedMotion??s())||!n.live)return void await t();const{dissolve:o,condense:i}=c.current,r=Math.max(1,Math.min(110,o/2,i/2)),[h,d]=u(),[g,f]=u(),[x,M]=u(),b=p={at:v(a??c.current.origin,n),start:performance.now(),hand:r,out:y(n),outMs:Math.max(1,o),next:null,nextAt:0,nextMs:Math.max(1,i),handed:d,landing:f,done:M,stage:0};if(e.dataset.state="out",A(!1,r),n.kick(),await h,p===b){try{await t()}catch(t){throw p===b&&(p=null,l.restore(),w?.field.update({brightness:0})),t}w&&p===b&&(n.canvas.isConnected&&n.canvas.parentElement===e||e.appendChild(n.canvas),A(!1,0),e.dataset.state="in",b.next=y(n),b.nextAt=performance.now(),n.kick(),await g,p===b&&A(!0,r),await x,l.restore(),m=0,w?.field.update({brightness:0}),w?.kick())}};return o(()=>w,c,()=>w?.refresh(),{swap(t,a){M++;const n=x.then(()=>C(t,a)).finally(()=>{0===--M&&delete e.dataset.state});return x=n.catch(()=>{}),n},get busy(){return M>0}},()=>{const t=p;p=null,l.restore(),delete e.dataset.state,t&&k(t)})}var f=r;export{f as PAGE_DISSOLVE_DEFAULTS,g as dissolveFrame,m as pageDissolve};//# sourceMappingURL=chunk-CMGMCRAD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{snapshot as e,drawCover as t,toneOf as n}from"./chunk-
|
|
1
|
+
import{snapshot as e,drawCover as t,toneOf as n}from"./chunk-DKRZSP5K.js";import{styleKeeper as r,srOnly as o,mountSurface as i,clamp as a,smoothstep as s,easeOut as l,handle as h}from"./chunk-I377LEZA.js";var c={threshold:64},u=.3;function d(e,t,n=300,r=.86,o=.2){const i=2*Math.sqrt(n)*r,a=Math.max(1,Math.ceil(240*t)),s=t/a;for(let t=0;t<a;t++)e.v+=(-n*(e.x-e.to)-i*e.v)*s,e.x+=e.v*s;return!(Math.abs(e.x-e.to)<o&&Math.abs(e.v)<12*o)||(e.x=e.to,e.v=0,!1)}function p(p,f){const m={current:{...c,...f}},v=r(),g=()=>m.current.content??p.children[0]??null,y=o("",!0),w={x:0,v:0,to:0};let M="idle",x=!1,b=!1,k=0,E=-1,L=0,P=0,A=0,S=!0,C=0,I=null,T=[];const R=new WeakSet,F=e=>{y.textContent=e};I=i({host:p,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.94,...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,resolution:2,onFail:()=>{I=null},paint:({pen:r,w:o,now:i,still:h,scale:c,box:p})=>{const f=A?Math.min(1/30,(i-A)/1e3):1/60;A=i;let y=x;h?(w.x=w.to,w.v=0):x||(y=d(w,f)||y),"refreshing"===M&&(L+=6.5*f,y=!0),"done"===M&&i-P<320&&(y=!0);const b=g();b&&v.set(b,"translate",`0 ${Math.max(0,w.x).toFixed(2)}px`),r.setTransform(c,0,0,c,0,0);const k=m.current,E=Math.max(0,w.x),R=a(E/k.threshold),F=Math.min(k.threshold,48),q="idle"===M||"pulling"===M?s(.1,.55,R):a(E/F),D=o/2,Y=Math.min(E,F)/2+.25*Math.max(0,E-F);"pulling"===M&&R>=1&&!C&&(C=i),R<1&&(C=0);const H=C&&!h&&i-C<260?.14*Math.sin(Math.PI*((i-C)/260)):0;if(H&&(y=!0),E>.5&&q>.01){if(r.save(),r.beginPath(),r.rect(0,0,o,E),r.clip(),r.translate(D,Y),r.scale(q*(1+H),q*(1+H)),r.lineWidth=4,r.lineCap="round","idle"===M||"pulling"===M){const e=-Math.PI/2+.03*Math.max(0,E-k.threshold);r.strokeStyle=`rgba(255,255,255,${.55+.45*R})`,r.beginPath(),r.arc(0,0,11,e,e+2*Math.PI*Math.max(.02,R)),r.stroke()}else{const e="done"===M&&S?h?1:l((i-P)/300):0,t="refreshing"!==M||h?1:l((i-P)/240),n=24,o=2*Math.PI*(1-.22*t);for(let i=0;i<n;i++){const a=L-Math.PI/2+i/n*o,s=1-.85*t*(1-i/(n-1));r.strokeStyle=`rgba(255,255,255,${s*(1-e)*("done"!==M||S?1:.4)})`,r.beginPath(),r.arc(0,0,11,a,a+o/n+.02),r.stroke()}e>0&&function(e,t,n,r,o){if(o<=0)return;const i=[[-.82,.02],[-.26,.56],[.86,-.6]].map(([e,o])=>[t+e*r,n+o*r]),a=Math.hypot(i[1][0]-i[0][0],i[1][1]-i[0][1])+Math.hypot(i[2][0]-i[1][0],i[2][1]-i[1][1]);e.save(),e.strokeStyle="#fff",e.lineWidth=4.5,e.lineCap="round",e.lineJoin="round",e.setLineDash([a*o,a]),e.beginPath(),e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.stroke(),e.restore()}(r,0,0,11,e)}r.restore()}return T=T.filter(o=>{if(!o.row.isConnected)return W(o,!0),!1;const a=h?1:(i-o.start)/760;if(a<0||!Number.isFinite(a))return y=y||Number.isFinite(a),!0;if(a>=u&&W(o),a>=1)return W(o,!0),!1;const s=p(o.row);(!o.snap||Math.abs(o.snap.width/2-s.w)>.5||Math.abs(o.snap.height/2-s.h)>.5)&&(o.snap=e(o.row,s.w,s.h,e=>{const t=p(e);return{x:t.x-s.x,y:t.y-s.y,w:t.w,h:t.h}}).canvas,o.photos=[...o.row.querySelectorAll("img")]);const c=o.snap;return o.photos.length&&function(e,r,o){const i=r.getContext("2d"),a=o(e.row);e.photos=e.photos.filter(e=>{if(!e.complete)return!0;if(!i||!e.naturalWidth)return!1;const r=o(e),s=r.x-a.x,l=r.y-a.y,h=Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.w/2,r.h/2);return i.save(),i.setTransform(2,0,0,2,0,0),i.beginPath(),i.roundRect(s,l,r.w,r.h,h),i.clip(),i.fillStyle="#000",i.fillRect(s,l,r.w,r.h),t(i,n({image:e,width:e.naturalWidth,height:e.naturalHeight},!I?.dark()),s,l,r.w,r.h),i.restore(),!1})}(o,c,p),r.globalAlpha=a<u?l(a/u,3):1-l((a-u)/.7,3),r.drawImage(c,s.x,s.y,s.w,s.h),r.globalAlpha=1,y=!0,!0}),y||(A=0),y}});const q=()=>I?.kick();function W(e,t=!1){const n=e.row.style;e.shown||(e.shown=!0,n.transition="opacity 280ms cubic-bezier(.16, 1, .3, 1)",n.opacity=e.opacity),t&&(n.transition=e.transition)}const D=(e,t)=>{if(I&&!I.still()){for(const n of e)n instanceof HTMLElement&&!R.has(n)&&(R.add(n),T.push({row:n,snap:null,start:t,opacity:n.style.opacity,transition:n.style.transition,shown:!1,photos:[...n.querySelectorAll("img")]}),n.style.transition="none",n.style.opacity="0");q()}},Y=()=>{const e=performance.now();T.forEach(t=>{t.start===1/0&&(t.start=e)}),q()},H=e=>new Promise(t=>setTimeout(t,e)),$=async()=>{if("refreshing"===M||"done"===M)return;const e=m.current,t=!I||I.still();M="refreshing",x=b=!1,w.to=Math.min(e.threshold,48),P=performance.now(),p.setAttribute("aria-busy","true"),F(e.messages?.refreshing??"Refreshing."),q(),S=!0;try{await Promise.all([e.onRefresh(),H(t?0:600)])}catch{S=!1}if("refreshing"===M){if(S&&e.reveal&&!t){await new Promise(e=>"function"==typeof requestAnimationFrame?requestAnimationFrame(()=>e()):e());const t=g();t&&D(t.querySelectorAll(e.reveal),1/0)}M="done",P=performance.now(),F(S?e.messages?.done??"Updated.":e.messages?.failed??"Couldn’t refresh."),q(),await H(t?0:620),"done"===M?(M="idle",w.to=0,Y(),p.removeAttribute("aria-busy"),q()):Y()}},j=e=>{0!==e.button||"idle"!==M||p.scrollTop>0||(x=!0,b=!1,k=e.clientY,E=e.pointerId)},z=e=>{if(!x||e.pointerId!==E)return;e.clientY<k&&(k=e.clientY);const t=(e.clientY-k)/(p.getBoundingClientRect().height/(p.clientHeight||1)||1);if(!b){if(t<6)return;b=!0,M="pulling";try{p.setPointerCapture?.(e.pointerId)}catch{}}w.x=w.to=(e=>128*(1-Math.exp(-Math.max(0,e)/128)))(t-6),w.v=0,q()},K=()=>{if(x&&(x=!1,b)){if(b=!1,w.x>=m.current.threshold)return M="idle",void $();M="idle",w.to=0,q()}},N=e=>{b&&e.preventDefault()},Z=e=>{x&&e.preventDefault()};return I?(v.set(p,"overscroll-behavior-y","contain"),p.appendChild(y),p.addEventListener("pointerdown",j),p.addEventListener("pointermove",z),p.addEventListener("pointerup",K),p.addEventListener("pointercancel",K),p.addEventListener("touchmove",N,{passive:!1}),p.addEventListener("dragstart",Z),p.addEventListener("selectstart",Z)):p.appendChild(y),h(()=>I,m,()=>I?.refresh(),{refresh:$,revealRows:e=>D(e,performance.now()),get state(){return M}},()=>{M="idle",T.forEach(e=>{e.row.style.opacity=e.opacity,e.row.style.transition=e.transition}),T=[],p.removeEventListener("pointerdown",j),p.removeEventListener("pointermove",z),p.removeEventListener("pointerup",K),p.removeEventListener("pointercancel",K),p.removeEventListener("touchmove",N),p.removeEventListener("dragstart",Z),p.removeEventListener("selectstart",Z),p.removeAttribute("aria-busy"),y.remove(),v.restore()})}var f=c;export{f as PULL_REFRESH_DEFAULTS,p as pullRefresh,d as stepSpring};//# sourceMappingURL=chunk-CZL5WMU6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mountCanvas as t}from"./chunk-AAV5QNHU.js";import{parseColor as e,hash2 as o}from"./chunk-ZCHGV2CV.js";function n(t,n,c,r,s={x:.5,y:.5},l={}){const{fontSize:a=14,chars:i=" . · * + ° ★",accentColor:h,color:f,speed:d=1,count:g=180,lightMode:m=!1}=l,p=h??(m?"#6b8700":"#d4ff00");t.clearRect(0,0,n,c),t.textBaseline="middle",t.textAlign="center";const M=n*(.2+.6*s.x),x=c*(.2+.6*s.y),$=.65*Math.sqrt(n*n+c*c);let u=255,S=255,b=255;if(m&&(u=55,S=55,b=55),f){const t=e(f);t&&(u=t.r,S=t.g,b=t.b)}let A=212,k=255,z=0;const C=e(p);C&&(A=C.r,k=C.g,z=C.b);const y=i.replace(/ /g,"").split("");if(0!==y.length){for(let e=0;e<g;e++){const s=o(17*e,3)*Math.PI*2,l=(r*(.15+.85*o(31*e,7))*d*.22+o(13*e,11))%1,i=M+Math.cos(s)*l*$,h=x+Math.sin(s)*l*$;if(i<-20||i>n+20||h<-20||h>c+20)continue;const f=Math.max(6,a*(.4+.9*l));t.font=`${f}px monospace`;const g=y[Math.min(y.length-1,Math.floor(l*y.length))],p=l>.72,C=m?.85*l:.2*l;t.fillStyle=p?`rgba(${A},${k},${z},${Math.min(m?.92:.32,2.2*C)})`:`rgba(${u},${S},${b},${C})`,t.fillText(g,i,h)}t.textAlign="left"}}var c={id:"stars",name:"Stars",description:"A sparse starfield that twinkles, drifts and leans toward the cursor.",cellSize:14,speed:1,cursor:!0,mount:e=>t(e,(t,e,o,c,r,s)=>n(t,e,o,c,r,{fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink,accentColor:s.accent}))};export{n as renderStarsBackground,c as stars};//# sourceMappingURL=chunk-DANNL7WR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clamp as t,hash as e}from"./chunk-
|
|
1
|
+
import{clamp as t,hash as e}from"./chunk-I377LEZA.js";function n(t){const e=()=>({image:t,width:t.naturalWidth,height:t.naturalHeight});return t.complete&&t.naturalWidth?Promise.resolve(e()):new Promise((n,o)=>{const a=()=>{i(),n(e())},r=()=>{i(),o(new Error(`Could not load ${t.src}`))},i=()=>{t.removeEventListener("load",a),t.removeEventListener("error",r)};t.addEventListener("load",a),t.addEventListener("error",r)})}function o(t,e=document.createElement("img")){return(t=>{try{return"undefined"!=typeof location&&new URL(t,location.href).origin!==location.origin}catch{return!1}})(t)&&!e.crossOrigin&&(e.crossOrigin="anonymous"),e.decoding="async",e.src=t,e}function a(t,e,n,o,a,r,i=.5,h=.5){if(a<=0||r<=0||!e.width||!e.height)return;const l=Math.max(a/e.width,r/e.height),c=e.width*l,d=e.height*l;t.save(),t.beginPath(),t.rect(n,o,a,r),t.clip(),t.drawImage(e.image,n+(a-c)*i,o+(r-d)*h,c,d),t.restore()}function r(e,n,o=.08){const a=Math.min(1,420/Math.max(1,e.width,e.height)),r=document.createElement("canvas");r.width=Math.max(1,Math.round(e.width*a)),r.height=Math.max(1,Math.round(e.height*a));const i=r.getContext("2d",{willReadFrequently:!0});if(!i)return e;let h;i.drawImage(e.image,0,0,r.width,r.height);try{h=i.getImageData(0,0,r.width,r.height)}catch{return e}const l=h.data,c=new Uint32Array(256),d=l.length/4,s=t=>.2126*l[t]+.7152*l[t+1]+.0722*l[t+2];for(let t=0;t<l.length;t+=4)c[Math.round(s(t))]++;let u=0,f=255,g=0;for(let t=0;t<256;t++)if(g+=c[t],g>=.02*d){u=t;break}g=0;for(let t=255;t>=0;t--)if(g+=c[t],g>=.02*d){f=t;break}const m=Math.max(1,f-u);for(let e=0;e<l.length;e+=4){let a=t((s(e)-u)/m);n&&(a=1-a),l[e]=l[e+1]=l[e+2]=Math.round(255*(o+(1-o)*a)),l[e+3]=255}return i.putImageData(h,0,0),{image:r,width:r.width,height:r.height}}var i={strong:1,text:.82,meta:.55,tile:.42,icon:.62},h=new Set(["IMG","SVG","svg","VIDEO","PICTURE"]),l=t=>[...t.children].flatMap(t=>h.has(t.tagName)?[t]:[t,...l(t)]);function c(e,n,o,a){const r=document.createElement("canvas");r.width=Math.max(2,Math.round(2*n)),r.height=Math.max(2,Math.round(2*o));const c=[],d=r.getContext("2d");if(!d)return{canvas:r,rects:c};d.scale(2,2),d.fillStyle="#000",d.fillRect(0,0,n,o);const s=a(e),u=e.getBoundingClientRect(),f=u.width/(e.offsetWidth||u.width||1)||1,g=t=>{for(let n=t;n&&n!==e.parentElement;n=n.parentElement){const t=n.dataset?.paint;if(t&&void 0!==i[t])return i[t]}return parseFloat(t?getComputedStyle(t).fontWeight:"400")>=500?1:.7},m=e=>{const n=Math.round(255*t(e));return`rgb(${n} ${n} ${n})`},w=l(e),p=[e,...w].filter(t=>{const e=t.dataset?.paint;return"tile"===e||"icon"===e||!e&&h.has(t.tagName)&&!t.closest("[data-paint]")});for(const t of p){const e=a(t);if(e.w<=0||e.h<=0)continue;const n=t.dataset?.paint;d.fillStyle=m("icon"===n?i.icon:i.tile),d.beginPath(),"icon"===n||"svg"===t.tagName.toLowerCase()?d.arc(e.x+e.w/2,e.y+e.h/2,.4*Math.min(e.w,e.h),0,2*Math.PI):d.roundRect(e.x,e.y,e.w,e.h,Math.min(parseFloat(getComputedStyle(t).borderTopLeftRadius)||0,e.h/2)),d.fill(),c.push(e)}const y=document.createTreeWalker(e,4),x=document.createRange();d.textBaseline="middle";for(let t=y.nextNode();t;t=y.nextNode()){const e=t.parentElement;if(!e||e.closest('[data-paint="none"]'))continue;const n=getComputedStyle(e);d.font=`${n.fontStyle} ${n.fontWeight} ${n.fontSize} ${n.fontFamily}`,d.fillStyle=m(g(e)),d.shadowColor=d.fillStyle,d.shadowBlur=4;for(const e of t.data.matchAll(/\S+/g)){x.setStart(t,e.index),x.setEnd(t,e.index+e[0].length);const n=x.getClientRects()[0];if(!n)continue;const o={x:s.x+(n.left-u.left)/f,y:s.y+(n.top-u.top)/f,w:n.width/f,h:n.height/f};d.fillText(e[0],o.x,o.y+o.h/2),c.push(o)}}return d.shadowBlur=0,x.detach?.(),{canvas:r,rects:c}}function d(t){const n=new Set,o=[];for(const a of t)for(let t=6*Math.floor((a.y-2)/6);t<a.y+a.h+2;t+=6)for(let r=4*Math.floor((a.x-2)/4);r<a.x+a.w+2;r+=4){const a=`${r},${t}`;n.has(a)||(n.add(a),o.push({x:r,y:t,seed:e(r,t)}))}return o}function s(t,e,n,o,a,r,i=1,h=.32){for(let l=0;l<n.length;l++){const c=n[l],d=(a-o[l]*(1-h))/h;if(d<=0)continue;const s=d>=1?0:1-d;let u=c.x,f=c.y;if(s>0){const[t,e]=r(c,s);u+=t,f+=e}t.globalAlpha=i*(1-s*s),t.drawImage(e,2*c.x,2*c.y,8,12,u,f,4,6)}t.globalAlpha=1}function u(t,e){if("undefined"==typeof document||document.getElementById(t))return;const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,(document.head??document.documentElement).appendChild(n)}export{d as blocksOf,s as drawBlocks,a as drawCover,o as imageFor,n as imageReady,u as injectStyle,c as snapshot,r as toneOf};//# sourceMappingURL=chunk-DKRZSP5K.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,mountSurface as e,handle as r,hash as n,prefersReduced as o,clamp as a,house as i}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,mountSurface as e,handle as r,hash as n,prefersReduced as o,clamp as a,house as i}from"./chunk-I377LEZA.js";var s={length:6,accept:"digits",cells:"[data-cell]"},l=560,c=t=>{const e=Math.round(255*a(t));return`rgb(${e} ${e} ${e})`},u=(t,e,r="digits")=>("digits"===r?t.replace(/\D/g,""):t.replace(/[^a-z\d]/gi,"").toUpperCase()).slice(0,e);function d(d,h={}){const p={current:{...s,...h}},f=t(),m=t(),g=[],v=()=>!!(p.current.reducedMotion??o()),b=()=>Math.max(1,Math.round(p.current.length));let y="",x="idle",M=!1,A=[],w="",E=-1e9,k="",S=-1e9,C=[],$=[],L=0,P=null;const T=new Map;"static"===getComputedStyle(d).position&&f.set(d,"position","relative");let B=d.querySelector("input");B||(B=document.createElement("input"),B.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;font-size:16px;cursor:text"),d.appendChild(B),g.push(B));const q=B;q.setAttribute("inputmode","digits"===p.current.accept?"numeric":"text"),q.setAttribute("autocomplete","one-time-code"),q.setAttribute("maxlength",String(b())),"digits"===p.current.accept&&q.setAttribute("pattern","[0-9]*"),q.hasAttribute("aria-label")||q.hasAttribute("aria-labelledby")||q.setAttribute("aria-label",`Verification code, ${b()} ${"digits"===p.current.accept?"digits":"characters"}`);const z=()=>{const t=[...d.querySelectorAll(p.current.cells)];for(;t.length<b();){const e=document.createElement("span");e.dataset.cell="",e.setAttribute("aria-hidden","true"),q.parentElement===d?d.insertBefore(e,q):d.appendChild(e),g.push(e),t.push(e)}return t.slice(0,b())},I=t=>{let e=t.querySelector("[data-digit]");return e||(e=document.createElement("span"),e.dataset.digit="",t.appendChild(e),g.push(e)),e},W=(t,e,r,o,a,i,s,l=1,c=0,u=0,d=1)=>{const h=((t,e,r,n)=>{const o=`${t}|${Math.round(e)}x${Math.round(r)}|${n}`;let a=T.get(o);if(!a){a=document.createElement("canvas"),a.width=Math.max(2,Math.round(2*e)),a.height=Math.max(2,Math.round(2*r));const i=a.getContext("2d");i&&(i.scale(2,2),i.fillStyle="#fff",i.shadowColor="#fff",i.shadowBlur=3,i.font=`600 ${Math.round(.6*r)}px ${n}`,i.textAlign="center",i.textBaseline="middle",i.fillText(t,e/2,r/2+1)),T.set(o,a)}return a})(e,r.w,r.h,s);t.globalAlpha=l;const p=r.w*d,f=r.h*d,m=r.x+(r.w-p)/2+c,g=r.y+(r.h-f)/2+u;for(let e=0;e<r.h;e+=4)for(let s=0;s<r.w;s+=3){if(n(s+31*i,e)>1.3*o-.12)continue;const r=3*(1-o);t.drawImage(h,2*s,2*e,6,8,m+s*d+(n(s,e+a)-.5)*r,g+e*d+(n(e,s+a)-.5)*r,3*d,4*d)}t.globalAlpha=1},F=(t,e)=>{t.toggleAttribute("data-shown",e),m.set(I(t),"opacity",e?"1":"0")};P=e({host:d,outset:16,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.92,...p.current.look}),ink:()=>p.current.ink??"--ascii-ink-strong",kit:p,reducedMotion:()=>p.current.reducedMotion,resolution:2,onFail:()=>{P=null,m.restore(),z().forEach(t=>F(t,!0))},paint:({pen:t,w:e,h:r,now:n,still:o,box:s})=>{t.setTransform(2,0,0,2,0,0);const u=z(),h=o?0:Math.floor(n/110),p=getComputedStyle(d).fontFamily||"sans-serif";if("success"===x){const s=o?1:(n-S)/700,l=e/2,d=r/2;if(u.forEach(t=>F(t,!1)),s<.55){const e=(s/.55)**2;C.forEach((r,n)=>k[n]&&W(t,k[n],r,1,h,n,p,1-e**3,(l-r.x-r.w/2)*e,(d-r.y-r.h/2)*e,1-.65*e))}const f=a((s-.45)/.55);return f>0&&f<1&&(t.strokeStyle=c(.55*(1-f)),t.lineWidth=3,t.beginPath(),t.arc(l,d,18+44*(t=>1-(1-a(t))**3)(f),0,2*Math.PI),t.stroke()),((t,e,r,n)=>{if(n<=0)return;const o=[[e-20,r+1],[e-7,r+14],[e+21,r-14]],a=Math.hypot(13,13),i=Math.hypot(28,28);let s=n*(a+i);t.strokeStyle="#fff",t.lineWidth=8,t.lineCap="round",t.lineJoin="round",t.shadowColor="#fff",t.shadowBlur=4,t.beginPath(),t.moveTo(o[0][0],o[0][1]);const l=Math.min(1,s/a);if(t.lineTo(o[0][0]+(o[1][0]-o[0][0])*l,o[0][1]+(o[1][1]-o[0][1])*l),s-=a,s>0){const e=Math.min(1,s/i);t.lineTo(o[1][0]+(o[2][0]-o[1][0])*e,o[1][1]+(o[2][1]-o[1][1])*e)}t.stroke(),t.shadowBlur=0})(t,l,d+1,i(a((s-.4)/.45))),s<1}let f=!1;const m=n-E;return u.forEach((e,r)=>{const a=s(e),i=y[r];if(m<l&&w[r])return F(e,!1),W(t,w[r],a,1-m/l,h,r,p),void(f=!0);if(i){const s=o?1:(n-A[r])/300;if(F(e,s>=.7),s>=1)return;return f=!0,void(s>0&&W(t,i,a,s,h,r,p,s>.7?1-(s-.7)/.3:1))}if(F(e,!1),M&&r===y.length&&m>=l){const e=o?.6:.5-.5*Math.cos(n/1600*Math.PI*2);t.fillStyle=c(.2+.26*e),t.beginPath(),t.roundRect(a.x+a.w/2-1.5,a.y+a.h/2-11,3,22,1.5),t.fill(),f=!0}}),f}});const j=(t,e)=>{$.push(setTimeout(e,t))},D=()=>{$.forEach(clearTimeout),$=[]},G=()=>{d.dataset.state=x,"error"===x?q.setAttribute("aria-invalid","true"):q.removeAttribute("aria-invalid");const t=M&&"success"!==x?Math.min(y.length,b()-1):-1;z().forEach((e,r)=>{I(e).textContent=y[r]??"",e.toggleAttribute("data-active",r===t),P||F(e,!0),"success"===x&&P?(f.set(e,"transition","opacity 200ms, scale 240ms cubic-bezier(.16, 1, .3, 1)"),f.set(e,"opacity","0"),f.set(e,"scale",".86")):(e.style.removeProperty("opacity"),e.style.removeProperty("scale"))}),q.value!==y&&(q.value=y),P?.kick()},J=t=>{D(),"idle"!==x&&(x="idle",S=-1e9),w="",E=-1e9;const e=u(t,b(),p.current.accept),r=performance.now();let n=0;for(let t=0;t<e.length;t++)e[t]!==y[t]&&(A[t]=v()?-1e9:r+L*n++);y=e,G(),e.length===b()&&j(v()||!P?0:300+L*Math.max(0,n-1)+80,()=>p.current.onComplete?.(e)),L=0},R=()=>J(q.value),U=()=>{L=55},V=()=>{M=!0,G()},Z=()=>{M=!1,G()};return q.addEventListener("input",R),q.addEventListener("paste",U),q.addEventListener("focus",V),q.addEventListener("blur",Z),q.value?J(q.value):G(),r(()=>P,p,()=>{q.setAttribute("maxlength",String(b())),G(),P?.refresh()},{verify:t=>{D();const e=performance.now();if(t)return k=y,C=P?z().map(t=>P.box(t)):[],S=e,x="success",void G();w=y,E=v()||!P?e-l:e,x="error",G(),v()||"function"!=typeof d.animate||d.animate([{translate:"0"},{translate:"-9px"},{translate:"7px"},{translate:"-4px"},{translate:"2px"},{translate:"0"}],{duration:380,easing:"ease-out"});const r=y;j(v()||!P?0:l,()=>{w===r&&(w="",y="",G())})},clear:()=>{D(),w="",E=-1e9,S=-1e9,y="",x="idle",G()},fill(t){L=55,J(t)},get value(){return y},get state(){return x}},()=>{D(),q.removeEventListener("input",R),q.removeEventListener("paste",U),q.removeEventListener("focus",V),q.removeEventListener("blur",Z),m.restore(),f.restore();for(const t of g)t.remove();for(const t of d.querySelectorAll(p.current.cells))t.removeAttribute("data-shown"),t.removeAttribute("data-active");delete d.dataset.state})}var h=s;export{h as CODE_INPUT_DEFAULTS,u as cleanCode,d as codeInput};//# sourceMappingURL=chunk-E427W6P5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-VWFC5XOB.js";var r=e({id:"mesh",name:"Mesh",description:"Four soft lights on slow paths: a gradient mesh written in characters.",cellSize:11,scene:"mesh",charset:" .:-=+*#%@",hover:"trail"});export{r as mesh};//# sourceMappingURL=chunk-ECGALF3G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{clamp as e,styleKeeper as t,srOnly as n,mountSurface as o,handle as a,resolveColor as r,hexRgb as i}from"./chunk-I377LEZA.js";var s=["fish","shark","hammerhead","manta","jellyfish","school"],h={fish:{len:.13,speed:.55,beat:2.1,amp:.07,waves:.9,turn:1.8,prey:!0,hunter:!1},school:{len:.055,speed:1.15,beat:3.6,amp:.08,waves:.9,turn:3.4,prey:!0,hunter:!1},shark:{len:.44,speed:.2,beat:.75,amp:.05,waves:.75,turn:.5,prey:!1,hunter:!0},hammerhead:{len:.4,speed:.22,beat:.8,amp:.05,waves:.75,turn:.55,prey:!1,hunter:!0},manta:{len:.2,speed:.3,beat:.42,amp:.025,waves:.5,turn:.4,prey:!1,hunter:!1},jellyfish:{len:.085,speed:.4,beat:.6,amp:0,waves:0,turn:.35,prey:!1,hunter:!1}};function l(t,n){if(n=e(n),"shark"===t||"hammerhead"===t){const e=.3;return("shark"===t?.085:.072)*(n<e?(n/e)**("shark"===t?.6:.4):((1-n)/(1-e))**1.35)+.008*n}if("manta"===t)return n<.5?.09*Math.sin(Math.PI*(n/.5)**.8):0;if("jellyfish"===t)return 0;const o=.32;return("school"===t?.14:.16)*(n<o?Math.sin(n/o*Math.PI/2)**.7:((1-n)/(1-o))**1.1)+.01*n}var c=16,d=()=>({x:new Float32Array(17),y:new Float32Array(17),nx:new Float32Array(17),ny:new Float32Array(17)});function u(e,t,n,o,a,r,i,s,h){const l=r/c;let d=t,u=n;for(let t=0;t<=c;t++){const n=t/c,y=o-a*n;t>0&&(d-=Math.cos(y)*l,u-=Math.sin(y)*l);const f=s*r*(.12+.88*n*n)*Math.sin(i-n*h*Math.PI*2);e.x[t]=d-Math.sin(y)*f,e.y[t]=u+Math.cos(y)*f}for(let t=0;t<=c;t++){const n=t>0?t-1:0,o=t<c?t+1:c,a=e.x[n]-e.x[o],r=e.y[n]-e.y[o],i=Math.hypot(a,r)||1;e.nx[t]=-r/i,e.ny[t]=a/i}}var y=1/60,f=2*Math.PI,p=e=>e-f*Math.floor((e+Math.PI)/f);function x(e){let t=(2654435769^Math.floor(2654435761*e))>>>0;return()=>{t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}var M=e=>Math.max(40,Math.min(e.w,e.h)),m=(e,t,n)=>h[t.kind].len*t.size*M(e)*(1-.5*t.z*n);function g(e,t,n=1,o="turn"){return{w:e,h:t,t:0,bodies:[],order:[],pointer:{x:0,y:0,at:-1e9,on:!1},burst:{x:0,y:0,at:-1e9},rng:x(n),edges:o,nextId:1,nextGroup:0,acc:0}}function k(e){const{bodies:t,order:n}=e;n.length=t.length;for(let e=0;e<t.length;e++)n[e]=e;for(let e=1;e<n.length;e++){const o=n[e],a=t[o].z;let r=e-1;for(;r>=0&&t[n[r]].z<a;)n[r+1]=n[r],r--;n[r+1]=o}}function v(t,n,o,a=1){const r=t.rng,i=260-t.bodies.length,s=Math.max(0,Math.min(i,Math.round(o)));if(!s||!h[n])return 0;const l=M(t),c="school"===n?t.nextGroup++:-1,d=t.w*(.15+.7*r()),u=t.h*(.15+.7*r()),y=r()*f,p=r();for(let o=0;o<s;o++){const o=c>=0,i=o?h.school.len*a*l*.8*Math.sqrt(s):0,x=r()*f,M=Math.sqrt(r())*i;t.bodies.push({id:t.nextId++,kind:n,size:a,x:o?d+Math.cos(x)*M:t.w*r(),y:o?u+Math.sin(x)*M:t.h*r(),heading:o?y+.4*(r()-.5):r()*f,omega:0,speed:0,phase:r()*f,z:o?e(p+.15*(r()-.5)):r(),seed:o?7.31*c+.2*r():100*r(),group:c,fear:0})}return k(t),s}function b(e,t){const{bodies:n}=e;for(let o=n.length-1;o>=0;o--){const a=n[o];if(!t||a.kind===t){if(a.group>=0){const t=a.group;e.bodies=n.filter(e=>e.group!==t)}else n.splice(o,1);return k(e),!0}}return!1}function w(e,t,n){if(e.w===t&&e.h===n)return;const o=t/(e.w||t),a=n/(e.h||n);for(const t of e.bodies)t.x*=o,t.y*=a;e.w=t,e.h=n}var T=(e,t)=>.6*Math.sin(.37*t+6.1*e)+.4*Math.sin(.91*t+2.3*e);function P(t,n,o){const{bodies:a,pointer:r,burst:i}=t,s=M(t),l=t.t,c=Math.max(0,o.speed),d=o.depth,u=o.interactive&&r.on&&l-r.at<2.5,y=o.interactive&&l-i.at<.9;for(let o=0;o<a.length;o++){const x=a[o],M=h[x.kind],g=m(t,x,d),k=1-.5*x.z*d;let v=Math.cos(x.heading),b=Math.sin(x.heading),w=0,P=0;if("turn"===t.edges){const e=Math.min(.16*s+.4*g,Math.min(t.w,t.h)/3);x.x<e?v+=2.5*(e-x.x)/e:x.x>t.w-e&&(v-=2.5*(x.x-t.w+e)/e),x.y<e?b+=2.5*(e-x.y)/e:x.y>t.h-e&&(b-=2.5*(x.y-t.h+e)/e)}if(M.prey){if(u){const e=.24*s,t=x.x-r.x,n=x.y-r.y,o=Math.hypot(t,n);if(o<e&&o>0){const a=(1-o/e)**2;v+=t/o*a*5,b+=n/o*a*5,w=Math.max(w,1.6*a)}}if(y){const e=.42*s,t=x.x-i.x,n=x.y-i.y,o=Math.hypot(t,n);if(o<e&&o>0){const a=1-o/e;v+=t/o*a*6,b+=n/o*a*6,w=Math.max(w,2*a)}}for(let e=0;e<a.length;e++){const n=a[e];if(!h[n.kind].hunter)continue;const o=.55*m(t,n,d),r=x.x-n.x,i=x.y-n.y,s=Math.hypot(r,i);if(s<o&&s>0){const e=1-s/o;v+=r/s*e*3,b+=i/s*e*3,w=Math.max(w,e)}}}else if(M.hunter&&(u||y)){const e=y?i.x:r.x,t=y?i.y:r.y,n=.65*s,o=e-x.x,a=t-x.y,h=Math.hypot(o,a);if(h<n&&h>0){const e=1-h/n;if(h>.7*g)v+=o/h*e*2.4,b+=a/h*e*2.4;else{const e=Math.sign(p(Math.atan2(a,o)-x.heading))||1;v+=-a/h*e*1.6,b+=o/h*e*1.6}P=e}}if(x.group>=0){let e=0,t=0,n=0,o=0,r=0,i=0,s=0;const h=.9*g,l=7*g;for(let c=0;c<a.length;c++){const d=a[c];if(d===x||d.group!==x.group)continue;const u=d.x-x.x,y=d.y-x.y,f=Math.hypot(u,y);if(!(f>l)&&(s++,e+=Math.cos(d.heading),t+=Math.sin(d.heading),n+=u,o+=y,f<h&&f>0)){const e=(1-f/h)/f;r-=u*e,i-=y*e}}if(s){const a=Math.hypot(e,t)||1,s=Math.hypot(n,o)||1;v+=e/a*1.1+n/s*1.1+1.8*r,b+=t/a*1.1+o/s*1.1+1.8*i}}x.fear=Math.max(x.fear-.9*n,w);const S=M.turn*(1+2*x.fear+.6*P),C=e(3*p(Math.atan2(b,v)-x.heading)+T(x.seed,l)*M.turn*.7,-S,S);x.omega+=(C-x.omega)*Math.min(1,3*n),x.heading=p(x.heading+x.omega*n*Math.min(1,c));const z=M.beat*f*(1+1.4*x.fear);x.phase+=z*n*c;let I=M.speed*g*k*c*(1+1.8*x.fear+.25*P);if("jellyfish"===x.kind){const e=Math.max(0,Math.sin(x.phase));I*=.25+1.6*e*e}x.speed+=(I-x.speed)*Math.min(1,n*(x.fear>.1?5:2)),x.x+=Math.cos(x.heading)*x.speed*n,x.y+=Math.sin(x.heading)*x.speed*n;const q=1.1*g;("wrap"===t.edges||x.x<-2*q||x.x>t.w+2*q||x.y<-2*q||x.y>t.h+2*q)&&(x.x<-q?x.x+=t.w+2*q:x.x>t.w+q&&(x.x-=t.w+2*q),x.y<-q?x.y+=t.h+2*q:x.y>t.h+q&&(x.y-=t.h+2*q))}t.t+=n}function S(e,t,n){for(e.acc=Math.min(e.acc+Math.max(0,t),.1);e.acc>=y;)P(e,y,n),e.acc-=y}var C=null;function z(e,t){const n=(.2126*e[0]+.7152*e[1]+.0722*e[2])/255||.001;if(t<=n)return e.map(e=>e*t/n);const o=(t-n)/(1-n);return e.map(e=>e+(255-e)*o)}var I=(t,n)=>{const o=t.styles[t.kind];return o?o[Math.round(63*e(n))]:(C??(C=Array.from({length:256},(e,t)=>`rgb(${t},${t},${t})`)))[Math.round(255*e(n))]};function q(e,t,n,o,a,r,i,s){const h=e.pen;h.fillStyle=I(e,s),h.beginPath();for(let e=r;e<=i;e++){const i=l(n,e/c)*o*a;e===r?h.moveTo(t.x[e]+t.nx[e]*i,t.y[e]+t.ny[e]*i):h.lineTo(t.x[e]+t.nx[e]*i,t.y[e]+t.ny[e]*i)}for(let e=i;e>=r;e--){const r=l(n,e/c)*o*a;h.lineTo(t.x[e]-t.nx[e]*r,t.y[e]-t.ny[e]*r)}h.closePath(),h.fill()}function A(e,t,n,o,a,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(o,a),e.lineTo(r,i),e.closePath(),e.fill()}function $(e,t,n,o){e.beginPath(),e.arc(t,n,Math.max(.3,o),0,f),e.fill()}function j(e,t,n,o,a,r,i,s,h){const d=e.pen,u=t.ny[a],y=-t.nx[a],f=l(n,a/c)*o*.9;d.fillStyle=I(e,h);for(let e=-1;e<=1;e+=2){const n=t.nx[a]*e,h=t.ny[a]*e,l=t.x[a]+n*f,c=t.y[a]+h*f;A(d,l+u*s*.3*o,c+y*s*.3*o,l+n*r*o-u*i*o,c+h*r*o-y*i*o,l-u*s*o,c-y*s*o)}}function E(e,t,n,o,a,r,i,s){const h=e.pen,l=c,d=-t.ny[l],u=t.nx[l],y=t.nx[l],f=t.ny[l],p=t.x[l],x=t.y[l];h.fillStyle=I(e,s),h.beginPath(),h.moveTo(p+.02*y*n,x+.02*f*n),h.lineTo(p+(d*o*r+y*a*r)*n,x+(u*o*r+f*a*r)*n),h.quadraticCurveTo(p+d*o*.5*n,x+u*o*.5*n,p+(d*o*i-y*a*i)*n,x+(u*o*i-f*a*i)*n),h.lineTo(p-.02*y*n,x-.02*f*n),h.closePath(),h.fill()}function L(e,t,n,o,a){const r=n.kind,i="school"===r;if(E(e,t,o,i?.2:.22,.14,1,1,.8*a),i||j(e,t,r,o,5,.09,.08,.05,.7*a),q(e,t,r,o,1,0,c,.72*a),q(e,t,r,o,.55,1,14,.9*a),!i){q(e,t,r,o,.22,1,12,a),e.pen.fillStyle=I(e,0);const n=l(r,.125)*o*.7;$(e.pen,t.x[2]+t.nx[2]*n,t.y[2]+t.ny[2]*n,.025*o),$(e.pen,t.x[2]-t.nx[2]*n,t.y[2]-t.ny[2]*n,.025*o)}}function F(e,t,n,o,a){const r=n.kind,i=e.pen;if(E(e,t,o,.17,.15,1.2,.8,.8*a),j(e,t,r,o,5,.19,.13,.08,.78*a),j(e,t,r,o,10,.06,.05,.035,.65*a),q(e,t,r,o,1,0,c,.7*a),q(e,t,r,o,.6,1,15,.84*a),q(e,t,r,o,.24,2,13,.92*a),q(e,t,r,o,.14,5,8,a),"hammerhead"===r){const n=t.ny[0],r=-t.nx[0],s=t.nx[0],h=t.ny[0],l=t.x[0]-.015*n*o,c=t.y[0]-.015*r*o,d=.2*o,u=.055*o;i.fillStyle=I(e,.7*a),i.beginPath(),i.moveTo(l+s*d,c+h*d),i.quadraticCurveTo(l+.04*n*o,c+.04*r*o,l-s*d,c-h*d),i.lineTo(l-s*d*.9-n*u,c-h*d*.9-r*u),i.quadraticCurveTo(l-n*u*.4,c-r*u*.4,l+s*d*.9-n*u,c+h*d*.9-r*u),i.closePath(),i.fill(),i.fillStyle=I(e,0),$(i,l+s*d*.95-n*u*.4,c+h*d*.95-r*u*.4,.014*o),$(i,l-s*d*.95-n*u*.4,c-h*d*.95-r*u*.4,.014*o)}else{i.fillStyle=I(e,0);const n=l(r,.0875)*o*.8,a=1;$(i,t.x[a]+t.nx[a]*n,t.y[a]+t.ny[a]*n,.011*o),$(i,t.x[a]-t.nx[a]*n,t.y[a]-t.ny[a]*n,.011*o)}}var W={cx:0,cy:0,fx:1,fy:0},G=(e,t)=>W.cx+W.fx*e-W.fy*t,J=(e,t)=>W.cy+W.fy*e+W.fx*t;function B(e,t,n,o,a){const r=e.pen;let i=t.x[2]-t.x[6],s=t.y[2]-t.y[6];const h=Math.hypot(i,s)||1;i/=h,s/=h,W.cx=t.x[4],W.cy=t.y[4],W.fx=i,W.fy=s;const l=.8*o*(.8+.2*Math.cos(n.phase)),d=.08*o*Math.sin(n.phase-.7);r.strokeStyle=I(e,.7*a),r.lineWidth=Math.max(.6,.022*o),r.lineCap="round",r.lineJoin="round",r.beginPath(),r.moveTo(t.x[8],t.y[8]);for(let e=9;e<=c;e++)r.lineTo(t.x[e],t.y[e]);r.stroke(),r.fillStyle=I(e,.72*a),r.beginPath(),r.moveTo(G(.46*o,.08*o),J(.46*o,.08*o)),r.quadraticCurveTo(G(.3*o,.6*l),J(.3*o,.6*l),G(-.2*o-d,l),J(-.2*o-d,l)),r.quadraticCurveTo(G(-.12*o,.3*l),J(-.12*o,.3*l),G(-.44*o,.05*o),J(-.44*o,.05*o)),r.lineTo(G(-.44*o,-.05*o),J(-.44*o,-.05*o)),r.quadraticCurveTo(G(-.12*o,-.3*l),J(-.12*o,-.3*l),G(-.2*o-d,-l),J(-.2*o-d,-l)),r.quadraticCurveTo(G(.3*o,-.6*l),J(.3*o,-.6*l),G(.46*o,-.08*o),J(.46*o,-.08*o)),r.closePath(),r.fill(),r.fillStyle=I(e,.8*a);for(let e=-1;e<=1;e+=2)A(r,G(.46*o,.12*e*o),J(.46*o,.12*e*o),G(.62*o,.08*e*o),J(.62*o,.08*e*o),G(.48*o,.03*e*o),J(.48*o,.03*e*o));q(e,t,"manta",1.4*o,1,0,8,.86*a),q(e,t,"manta",1.4*o,.4,1,7,a)}function O(e,t,n,o,a){const r=e.pen,i=.5*o*(1.08-.16*Math.max(0,Math.sin(n.phase))),s=t.x[0],h=t.y[0];r.lineCap="round",r.lineJoin="round",r.strokeStyle=I(e,.6*a),r.lineWidth=Math.max(.5,.035*o);for(let e=0;e<7;e++){const a=n.heading+Math.PI+2.4*(e/6-.5),l=s+Math.cos(a)*i*.85,d=h+Math.sin(a)*i*.85,u=.9+.35*Math.sin(n.seed+1.7*e);r.beginPath(),r.moveTo(l,d);for(let a=2;a<=c;a+=2){const i=a/c,y=.12*Math.sin(.8*n.phase+.9*e-5*i)*o*i;r.lineTo(l+(t.x[a]-s)*u+t.nx[a]*y,d+(t.y[a]-h)*u+t.ny[a]*y)}r.stroke()}r.strokeStyle=I(e,.7*a),r.lineWidth=Math.max(.8,.08*o);for(let e=-1;e<=1;e++){r.beginPath(),r.moveTo(s,h);for(let a=2;a<=8;a+=2){const i=a/c,l=(.08*e+.06*Math.sin(n.phase+2*e-6*i))*o;r.lineTo(s+.9*(t.x[a]-s)+t.nx[a]*l,h+.9*(t.y[a]-h)+t.ny[a]*l)}r.stroke()}r.fillStyle=I(e,.6*a),$(r,s,h,i),r.strokeStyle=I(e,a),r.lineWidth=Math.max(.6,.2*i),r.beginPath(),r.arc(s,h,.88*i,0,f),r.stroke(),r.fillStyle=I(e,.78*a);for(let e=0;e<4;e++){const t=n.heading+Math.PI/4+e*Math.PI/2;$(r,s+Math.cos(t)*i*.32,h+Math.sin(t)*i*.32,.13*i)}}function R(t,n,o,a,r=[]){const i=X;i.pen=t,i.styles=r;const{bodies:l,order:c}=n;for(let t=0;t<c.length;t++){const r=l[c[t]];if(!r)continue;const d=h[r.kind],y=m(n,r,a),f=1-.5*r.z*a,p=e(r.speed>1?r.omega*y/r.speed*.5:0,-1.1,1.1);i.kind=s.indexOf(r.kind),"jellyfish"===r.kind?u(o,r.x,r.y,r.heading,p,1.9*y,.5*r.phase,.02,.6):"manta"===r.kind?u(o,r.x+Math.cos(r.heading)*y*.5,r.y+Math.sin(r.heading)*y*.5,r.heading,p,2*y,r.phase,d.amp,d.waves):u(o,r.x,r.y,r.heading,p,y,r.phase,d.amp,d.waves),"fish"===r.kind||"school"===r.kind?L(i,o,r,y,f):"shark"===r.kind||"hammerhead"===r.kind?F(i,o,r,y,f):"manta"===r.kind?B(i,o,r,y,f):O(i,o,r,y,f)}}var X={pen:null,styles:[],kind:0},Y=[{kind:"shark"},{kind:"hammerhead"},{kind:"manta"},{kind:"fish",count:4},{kind:"jellyfish",count:2},{kind:"school",count:28}],Z={speed:1,density:1,depth:.7,interactive:!0,ripples:!0,edges:"turn",seed:1,layer:"under"};function D(h,l={}){const c={current:{...Z,...l}},u=()=>c.current,f=t(),p=d(),x=s.map(()=>null),M=u().label?n(u().label):null;let m=g(0,0,u().seed,u().edges),k=!1,T=0,C=null;const I={speed:1,depth:.7,interactive:!0};let q={creatures:u().creatures,seed:u().seed,density:u().density};const A=(t,n)=>{m=g(t,n,u().seed,u().edges);for(const e of u().creatures??Y){const t="school"===e.kind?28:1;v(m,e.kind,(e.count??t)*Math.max(0,u().density),e.size??1)}const o={speed:1,depth:e(u().depth),interactive:!1};for(let e=0;e<1.5;e+=y)P(m,y,o);k=!0},$=()=>{const e=u().palette;for(let t=0;t<s.length;t++){const n=e?.[s[t]],o=n?r(n,h):null;x[t]=o?Array.from({length:64},(e,t)=>{const[n,a,r]=z(i(o),t/63);return`rgb(${0|n},${0|a},${0|r})`}):null}if(e){const e=r(u().ink??"--ascii-ink-strong",h)??r(getComputedStyle(h).color,h);for(let t=0;t<s.length;t++)!x[t]&&e&&(x[t]=Array.from({length:64},(t,n)=>{const[o,a,r]=z(i(e),n/63);return`rgb(${0|o},${0|a},${0|r})`}))}};$(),C=o({host:h,kit:c,look:()=>{const e=u().background;return{mark:"glyph",charset:" .:-=+*#%@",cellSize:7,cellAspect:.62,glyphScale:.92,contrast:1,background:e&&"transparent"!==e?r(e,h)??"transparent":"transparent",color:u().palette?"source":"ink",saturation:1,...u().look}},layer:u().layer,ink:()=>u().ink??"--ascii-ink-strong",reducedMotion:()=>u().reducedMotion,resolution:(e,t)=>{const n=Math.min(.6,560/Math.max(e,t));return[Math.max(8,Math.round(e*n)),Math.max(8,Math.round(t*n))]},onFail:()=>{C=null,f.restore()},onTheme:()=>{$(),u().background&&"transparent"!==u().background&&C?.refresh()},paint:({pen:t,width:n,height:o,w:a,h:r,now:i,still:s})=>{k?w(m,a,r):A(a,r);const h=T?Math.min(.1,Math.max(0,i-T)/1e3):0;return T=i,s||S(m,h,(I.speed=u().speed,I.depth=e(u().depth),I.interactive=u().interactive,I)),t.setTransform(n/a,0,0,o/r,0,0),R(t,m,p,e(u().depth),x),!s&&u().speed>0}});const j=e=>{const t=h.getBoundingClientRect();m.pointer.x=e.clientX-t.left,m.pointer.y=e.clientY-t.top},E=e=>{u().interactive&&(j(e),m.pointer.on=!0,m.pointer.at=m.t,C?.kick())},L=()=>{m.pointer.on=!1},F=e=>{u().interactive&&u().ripples&&0===e.button&&C&&(j(e),m.burst.x=m.pointer.x,m.burst.y=m.pointer.y,m.burst.at=m.t,C.field.pulse({x:m.burst.x,y:m.burst.y,strength:.5}),C.kick())};C&&(M&&h.appendChild(M),h.addEventListener("pointermove",E),h.addEventListener("pointerleave",L),h.addEventListener("pointerdown",F));return a(()=>C,c,e=>{M&&(M.textContent=e.label??""),m.edges=e.edges,!k||q.creatures===e.creatures&&q.seed===e.seed&&q.density===e.density||A(m.w,m.h),q={creatures:e.creatures,seed:e.seed,density:e.density},$(),C?.refresh()},{add(e,t={}){k||A(m.w||800,m.h||450);const n=v(m,e,t.count??("school"===e?28:1),t.size??1);return C?.kick(),n},remove(e){k||A(m.w||800,m.h||450);const t=b(m,e);return C?.kick(),t},get count(){return k||A(m.w||800,m.h||450),m.bodies.length}},()=>{h.removeEventListener("pointermove",E),h.removeEventListener("pointerleave",L),h.removeEventListener("pointerdown",F),M?.remove(),f.restore()})}export{s as OCEAN_KINDS,h as SPECIES,c as SPINE,S as advanceWorld,m as bodyLength,l as bodyWidth,d as createSpine,g as createWorld,b as despawn,R as drawWorld,u as laySpine,D as ocean,w as resizeWorld,x as seeded,v as spawn,P as stepWorld,z as tint};//# sourceMappingURL=chunk-EOTPXDMH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,mountSurface as e,clamp as r,handle as n,resolveColor as o,mixHex as a,prefersReduced as i}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,mountSurface as e,clamp as r,handle as n,resolveColor as o,mixHex as a,prefersReduced as i}from"./chunk-I377LEZA.js";var s={thumb:'[role="slider"]',label:"[data-label]",threshold:.9,resetAfter:0},l=720,c=(t,e,r)=>t+(e-t)*r,d=t=>1-(1-t)**3,u=(t,e,r)=>({x:t,v:0,to:t,k:e,z:r});function m(t,e,r=.4){const n=2*Math.sqrt(t.k)*t.z,o=Math.max(1,Math.ceil(240*e)),a=e/o;for(let e=0;e<o;e++)t.v+=(-t.k*(t.x-t.to)-n*t.v)*a,t.x+=t.v*a;return!(Math.abs(t.x-t.to)<r&&Math.abs(t.v)<12*r)||(t.x=t.to,t.v=0,!1)}var f=t=>{t.x=t.to,t.v=0};function h(t,e){const r=t.filter(([,t])=>e-t<80);if(r.length<2)return 0;const[n,o]=r[0],[a,i]=r[r.length-1];return i>o?(a-n)/(i-o)*1e3:0}function p(p,v={}){const x={current:{...s,...v}},b=t(),g=p.querySelector(x.current.thumb)??p.firstElementChild,A=()=>p.querySelector(x.current.label),k=()=>!!(x.current.reducedMotion??i());let y=u(0,520,.8),w=u(0,150,1),M=!1,E=0,L=!1,S=0,C=0,I=[],T=0,P=0,q=0,z="",D=-1,R=null;const W=()=>{if(!g)return null;const t=Math.max(0,(p.clientHeight-g.offsetHeight)/2);return{pad:t,size:g.offsetHeight,max:Math.max(1,p.clientWidth-g.offsetWidth-2*t)}},$=()=>p.getBoundingClientRect().width/(p.clientWidth||1)||1,F=t=>o(x.current.ink??"--ascii-ink-strong",p)??o(getComputedStyle(p).color,p)??(t?"#d8d6cf":"#1d1d1b");R=e({host:p,layer:"under",look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.94,...x.current.look}),ink:F,kit:x,reducedMotion:()=>x.current.reducedMotion,onFail:()=>{R=null},onTheme:()=>{z=""},paint:({pen:t,w:e,h:n,now:i,still:s,dark:u,box:m})=>{const f=W();if(!f)return!1;const h=L?s?1:r((i-S)/l):0,v=d(r(h/.5)),b=d(r((h-.36)/.3)),g=d(r((h-.46)/.4)),A=r((h-.5)/.5),k=1+.07*Math.sin(Math.PI*A)*(1-A),M=C?1-r((i-C)/260):1,E=x.current.mark?m(x.current.mark):{x:e/2-18,y:n/2-18,w:36,h:36},I=E.x+E.w/2,T=E.y+E.h/2,P=Math.min(E.w/2,n/2-2)*k,q=L?a(F(u),(t=>o(x.current.color??"--ascii-success",p,t?"#3ccf7e":"#17844a"))(u),d(r(s?1:(i-S)/360))):F(u);q!==z&&(z=q,R?.field.update({ink:q})),t.save(),t.globalAlpha=M,t.beginPath(),e>4&&n>4&&t.roundRect(2,2,e-4,n-4,(n-4)/2),t.clip(),t.fillStyle=`rgba(255,255,255,${.1*(1-v)})`,t.fillRect(0,0,e,n);const D=f.pad+y.x+f.size/2,$=L?1:w.x,H=c(0,I-P,v),G=c(D,I+P,v),X=c(0,T-P,v),j=c(n,T+P,v);if(G-H>1&&$>.004){const e=t.createLinearGradient(H,0,G,0);e.addColorStop(0,`rgba(255,255,255,${c(.14,1,v)*$})`),e.addColorStop(.62,`rgba(255,255,255,${c(.48,1,v)*$})`),e.addColorStop(1,`rgba(255,255,255,${$})`),t.fillStyle=e,t.globalAlpha=M*(1-.28*b),t.beginPath(),t.roundRect(H,X,G-H,j-X,c(0,P,v)),t.fill()}return b>0&&(t.globalAlpha=1,t.fillStyle="#000",t.beginPath(),t.arc(I,T,Math.max(0,P-5)*b,0,2*Math.PI),t.fill()),t.restore(),g>0&&function(t,e,r,n,o,a,i){if(o<=0||a<=0)return;const s=[[-.82,.02],[-.26,.56],[.86,-.6]].map(([t,o])=>[e+t*n,r+o*n]),l=Math.hypot(s[1][0]-s[0][0],s[1][1]-s[0][1])+Math.hypot(s[2][0]-s[1][0],s[2][1]-s[1][1]);t.save(),t.globalAlpha=a,t.strokeStyle="#fff",t.lineWidth=i,t.lineCap="round",t.lineJoin="round",t.setLineDash([l*o,l]),t.beginPath(),t.moveTo(s[0][0],s[0][1]),t.lineTo(s[1][0],s[1][1]),t.lineTo(s[2][0],s[2][1]),t.stroke(),t.restore()}(t,I+.02*P,T+.07*P,.55*P,g,M,4.5),!1}});const H=()=>{const t=W();if(!t||!g)return;const e=y.x/t.max;b.set(g,"translate",`${y.x}px 0`),g.setAttribute("aria-valuenow",String(Math.round(100*r(e))));const n=A();n&&b.set(n,"opacity",String(L?0:1-r(1.7*e)))},G=t=>{T=0;const e=Math.min(1/30,Math.max(0,(t-P)/1e3));P=t;let r=!M&&m(y,e,.3);r=m(w,e,.003)||r,C&&(t-C>=260||k())&&(C=0,L=!1,y=u(0,520,.8),w=u(0,150,1),p.dataset.state="idle",delete p.dataset.confirmed,g&&(b.set(g,"opacity","1"),b.set(g,"scale","1"),g.tabIndex=0)),L&&t-S>302.4&&(p.dataset.confirmed=""),H(),R?.kick(),(r||M||L&&t-S<760||C>0)&&(T=requestAnimationFrame(G))},X=()=>{T||(P=performance.now(),T=requestAnimationFrame(G))},j=()=>{const t=W();if(!t||L)return;const e=t.max-y.x;M=!1,L=!0,y.to=t.max,w.to=1,S=performance.now()+(e>4?200:90),k()&&(f(y),f(w),S=-1e6,p.dataset.confirmed=""),p.dataset.state="confirmed",g&&(g.setAttribute("aria-valuetext","Confirmed"),g.tabIndex=-1,b.set(g,"transition","opacity 200ms 160ms, scale 240ms 160ms"),b.set(g,"opacity","0"),b.set(g,"scale",".6")),q&&clearTimeout(q),x.current.resetAfter>0&&(q=setTimeout(B,x.current.resetAfter)),H(),X(),x.current.onConfirm?.()};function B(){if(q&&clearTimeout(q),q=0,!L)return y.to=0,w.to=0,void X();C=performance.now(),p.dataset.state="resetting",g?.removeAttribute("aria-valuetext"),X()}const J=t=>{const e=W();if(!M||!e||void 0!==t&&void 0!==t.pointerId&&t.pointerId!==D)return;M=!1;const n=h(I,performance.now());y.x>=e.max*x.current.threshold||n>900&&y.x>.5*e.max?j():(y.to=0,y.v=.25*r(n,-1500,1500),w.to=0,k()&&(f(y),f(w)),p.dataset.state="idle",X())},U=t=>{if(0===t.button&&!L&&g)if(g.contains(t.target)){try{g.setPointerCapture?.(t.pointerId)}catch{}D=t.pointerId,M=!0,E=t.clientX-y.x*$(),w.to=1,I=[],p.dataset.state="dragging",X()}else M||k()||(y.v+=420,w.to=0,X())},Z=t=>{const e=W();M&&e&&t.pointerId===D&&(y.x=y.to=r((t.clientX-E)/$(),0,e.max),y.v=0,I.push([y.x,performance.now()]),I.length>8&&I.shift(),y.x>=e.max-.5?j():X())},K=t=>{const e=W();if(!e||L)return;if("Enter"===t.key||" "===t.key||"End"===t.key)return t.preventDefault(),void j();const n={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1}[t.key],o="Home"===t.key?0:void 0!==n?r(y.to+n*e.max/4,0,e.max):null;null!==o&&(t.preventDefault(),y.to=o,w.to=o>0?1:0,k()&&(f(y),f(w)),o>=e.max-.5?j():X())};g&&(g.hasAttribute("role")||g.setAttribute("role","slider"),g.hasAttribute("tabindex")||(g.tabIndex=0),g.hasAttribute("aria-label")||g.setAttribute("aria-label",A()?.textContent?.trim()||"Slide to confirm"),g.setAttribute("aria-valuemin","0"),g.setAttribute("aria-valuemax","100"),g.setAttribute("aria-valuenow","0"),b.set(g,"touch-action","none"),g.addEventListener("keydown",K));const N=t=>t.preventDefault();return p.dataset.state="idle",p.addEventListener("pointerdown",U),p.addEventListener("pointermove",Z),p.addEventListener("pointerup",J),p.addEventListener("pointercancel",J),p.addEventListener("lostpointercapture",J),p.addEventListener("dragstart",N),n(()=>R,x,()=>R?.refresh(),{confirm:j,reset:B,get confirmed(){return L}},()=>{T&&cancelAnimationFrame(T),q&&clearTimeout(q),T=q=0,g?.removeEventListener("keydown",K),p.removeEventListener("pointerdown",U),p.removeEventListener("pointermove",Z),p.removeEventListener("pointerup",J),p.removeEventListener("pointercancel",J),p.removeEventListener("lostpointercapture",J),p.removeEventListener("dragstart",N),b.restore(),delete p.dataset.state,delete p.dataset.confirmed})}var v=s;export{v as SLIDE_TO_CONFIRM_DEFAULTS,p as slideToConfirm,m as stepSpring,h as velocity};//# sourceMappingURL=chunk-FU4WW3PU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mountPageField as e,pageHandle as r}from"./chunk-RGV7VRYC.js";import{styleKeeper as t,prefersReduced as n,resolveColor as s,entryProgress as o,clamp as i,house as l}from"./chunk-I377LEZA.js";import{requestFieldFrame as c}from"../field.js";var a={tones:["transparent","--ascii-ink-strong"],mark:"dither",cellSize:5,reveal:"visible",duration:1100};function f(f,u={}){const d={current:{...a,...u}},v=()=>d.current,h=t(),p=v().src?null:f.querySelector("img"),b=v().src??p??null;let k="none"===v().reveal||(v().reducedMotion??n())?1:0,m=-1,w=!1;let y=null;y=e({host:f,layer:"under",look:e=>{const r=v().tones[0],t="transparent"===r?"transparent":s(r,f,e?"#000000":"#ffffff")??"transparent";return{mark:v().mark,charset:" .:-=+*#%@",cellSize:v().cellSize,cellAspect:1,levels:"auto",contrast:1.1,fit:"cover",focus:v().focus??{x:.5,y:.5},background:t,...v().look,brightness:(v().look?.brightness??0)-(1-k)}},ink:()=>v().ink??v().tones[1],source:b,label:v().label??(p?.alt||("object"==typeof v().src?v().src.alt:"")||void 0),kit:d,reducedMotion:()=>v().reducedMotion,onFail:()=>{y=null,h.restore()}}),y&&p&&h.set(p,"visibility","hidden"),y?.still()&&(k=1);const g=e=>{if(w=!1,!y||m<0)return;const r=i((e-m)/v().duration);k=l(r),y.refresh(),r<1?(w=!0,c(g)):m=-1},I=()=>{if(y){if(y.still())return k=1,void y.refresh();m=performance.now(),k=0,y.refresh(),w||(w=!0,c(g))}},j=()=>{if(!y||y.still())return;const e=o(f);Math.abs(e-k)<.004||(k=e,y.refresh())};let M=!1;const S=y&&"visible"===v().reveal&&"function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{e.isIntersecting&&!M&&I(),M=e.isIntersecting},{threshold:.3}):null;S?.observe(f);const z=!!y&&"scroll"===v().reveal&&"undefined"!=typeof window;return z&&(window.addEventListener("scroll",j,{passive:!0}),j()),y?.refresh(),r(()=>y,d,()=>{},{replay:I},()=>{S?.disconnect(),z&&window.removeEventListener("scroll",j),h.restore()})}export{f as ditherImage};//# sourceMappingURL=chunk-GI5BNKBL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hash as t,settledSource as e}from"./chunk-
|
|
1
|
+
import{hash as t,settledSource as e}from"./chunk-I377LEZA.js";var o=t=>{const e=Math.round(255*Math.min(1,Math.max(0,t)));return`rgb(${e} ${e} ${e})`},n=t=>{if(!t||"transparent"===t)return 0;const e=/\/\s*([\d.]+)(%?)\s*\)$/.exec(t);if(e)return parseFloat(e[1])/(e[2]?100:1);const o=/^rgba\([^)]*,\s*([\d.]+)\s*\)$/.exec(t);return o?parseFloat(o[1]):1},i=/^(IMG|PICTURE|VIDEO|CANVAS|SVG|svg)$/;function a(t,a,s,c){const d=(t,e)=>Math.max(0,Math.min(parseFloat(t.borderTopLeftRadius)||0,e.w/2,e.h/2)),f=[a,...a.querySelectorAll("*")];t.save();for(const l of f){if("CANVAS"===l.tagName&&void 0!==l.dataset?.asciiKit){if(!c||l===c.skip)continue;const o=s(l),n=o.w>0&&o.h>0?e(l):null;n&&(t.globalCompositeOperation="lighter",t.drawImage(n,o.x,o.y,o.w,o.h),t.globalCompositeOperation="source-over");continue}if(void 0!==l.dataset?.asciiPoster)continue;const f=s(l);if(f.w<=0||f.h<=0)continue;const h=getComputedStyle(l);if("hidden"===h.visibility||"none"===h.display)continue;const u=n(h.backgroundColor)>.03,g=(parseFloat(h.borderTopWidth)||0)>0&&n(h.borderTopColor)>.1;if(t.beginPath(),l===a)(u||g)&&(t.strokeStyle=o(.42),t.lineWidth=3,t.roundRect(f.x+1.5,f.y+1.5,f.w-3,f.h-3,d(h,f)),t.stroke());else{if(i.test(l.tagName)){t.fillStyle=o(.5),f.w<32&&f.h<32?t.arc(f.x+f.w/2,f.y+f.h/2,.36*Math.min(f.w,f.h),0,2*Math.PI):t.roundRect(f.x,f.y,f.w,f.h,d(h,f)),t.fill();continue}u?(t.fillStyle=o(.22),t.roundRect(f.x,f.y,f.w,f.h,d(h,f)),t.fill()):g&&(t.strokeStyle=o(.32),t.lineWidth=1.5,t.roundRect(f.x+.75,f.y+.75,f.w-1.5,f.h-1.5,d(h,f)),t.stroke())}if("INPUT"===l.tagName||"TEXTAREA"===l.tagName){const e=l,o=e.value||e.placeholder||"";o&&r(t,o,f.x+(parseFloat(h.paddingLeft)||0),f.y,f.h,h,e.value?.82:.5)}}!function(t,e,o){if("function"!=typeof document.createTreeWalker)return;const n=document.createTreeWalker(e,4),i=document.createRange(),a=o(e),s=e.getBoundingClientRect(),c=s.width/(e.offsetWidth||s.width||1)||1;let d=0;for(let o=n.nextNode();o&&d<2e3;o=n.nextNode()){const n=o.parentElement;if(!n)continue;const f=getComputedStyle(n);if("hidden"===f.visibility||l(n,e))continue;const h=(parseFloat(f.fontWeight)||400)>=600||/^H[1-6]$/.test(n.tagName)?1:.8;for(const e of o.data.matchAll(/\S+/g)){i.setStart(o,e.index),i.setEnd(o,e.index+e[0].length);const n=i.getClientRects()[0];n&&(d++,r(t,e[0],a.x+(n.left-s.left)/c,a.y+(n.top-s.top)/c,n.height/c,f,h))}}i.detach?.()}(t,a,s),t.restore()}function r(t,e,n,i,a,r,l){const s=Math.min(900,(parseFloat(r.fontWeight)||400)+200);t.font=`${r.fontStyle||"normal"} ${s} ${r.fontSize} ${r.fontFamily}`,t.fillStyle=o(l),t.shadowColor=o(l),t.shadowBlur=3,t.textBaseline="middle",t.fillText(e,n,i+a/2),t.shadowBlur=0}function l(t,e){for(;t&&t!==e;t=t.parentElement){const e=t,o=getComputedStyle(e);if(e.offsetWidth<=1&&e.offsetHeight<=1&&"hidden"===o.overflow)return!0;if("inset(50%)"===o.clipPath||"rect(0px, 0px, 0px, 0px)"===o.clip)return!0}return!1}function s(t,e,o,n,i=2,r){const l=document.createElement("canvas");l.width=Math.max(2,Math.round(o*i)),l.height=Math.max(2,Math.round(n*i));const s=l.getContext("2d",{willReadFrequently:!0});return s?(s.setTransform(i,0,0,i,0,0),s.fillStyle="#000",s.fillRect(0,0,o,n),a(s,t,e,r),l):l}var c=4,d=6;function f(e,o=2){const n=e.getContext("2d",{willReadFrequently:!0});if(!n)return[];const i=e.width,a=e.height,r=n.getImageData(0,0,i,a).data,l=[];for(let e=0;e<a/o;e+=6)for(let n=0;n<i/o;n+=4){let s=!1;for(let t=0;t<6*o&&!s;t+=3)for(let l=0;l<4*o&&!s;l+=2){const c=Math.round(n*o+l),d=Math.round(e*o+t);c<i&&d<a&&r[4*(d*i+c)]>10&&(s=!0)}s&&l.push({x:n,y:e,seed:t(n,e)})}return l}function h(t,e,o,n,i,a,r=1,l=.32,s=2){for(let c=0;c<o.length;c++){const d=o[c],f=(i-n[c]*(1-l))/l;if(f<=0)continue;const h=f>=1?0:1-f;let u=d.x,g=d.y;if(h>0){const[t,e]=a(d,h);u+=t,g+=e}t.globalAlpha=r*(1-h*h),t.drawImage(e,d.x*s,d.y*s,4*s,6*s,u,g,4,6)}t.globalAlpha=1}export{d as BLOCK_H,c as BLOCK_W,f as blocksOf,h as drawBlocks,s as snapshot};//# sourceMappingURL=chunk-HENGH3DE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{poster as e,liveField as t,disposeKit as n,setPosterSource as o}from"./chunk-FEAFQY7O.js";import{isGlyphFieldSupported as r,watchPointer as i,requestFieldFrame as a,watchVisibility as s,watchTheme as c,watchMotionPreference as l,cancelFieldFrame as u,ambientFactor as d}from"../field.js";var p,h=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),f=(e,t)=>{const n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)},m=(e,t=3)=>1-(1-h(e))**t,g=(e,t,n)=>{const o=h((n-e)/(t-e));return o*o*(3-2*o)},y=e=>{if(e<=0)return 0;if(e>=1)return 1;const t=(e,t,n)=>3*t*e*(1-e)**2+3*n*e*e*(1-e)+e**3;let n=0,o=1,r=e;for(let i=0;i<22;i++)r=(n+o)/2,t(r,.16,.3)<e?n=r:o=r;return t(r,1,1)};function v(e){const t=e.getBoundingClientRect(),n="number"==typeof innerHeight&&innerHeight>0?innerHeight:800;return h((n-t.top)/Math.max(1,Math.min(t.height||n,.5*n)))}var b,x=()=>"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches,w=e=>e??x(),M={scene:"none",background:"transparent",color:"ink",levels:"none",fit:"cover",focus:{x:.5,y:.5},vignette:0,drift:0,hover:"none",shade:0,contrast:1,brightness:0,gamma:1,maxPixelRatio:2,clear:!1};function k(e,t,n){let o=(e??"").trim();const r=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/.exec(o);if(r?o=C(t,r[1])||(r[2]??"").trim():o.startsWith("--")&&(o=C(t,o)),!o)return n?k(n,t):null;if(/^#[\da-f]{6}$/i.test(o))return o.toLowerCase();if(/^#[\da-f]{3}$/i.test(o))return`#${[...o.slice(1)].map(e=>e+e).join("")}`.toLowerCase();const i=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(o);if(i)return R([+i[1],+i[2],+i[3]]);if(void 0===b)try{b="undefined"==typeof document?null:Object.assign(document.createElement("canvas"),{width:1,height:1}).getContext("2d",{willReadFrequently:!0})}catch{b=null}if(!b)return n?k(n,t):null;b.clearRect(0,0,1,1),b.fillStyle="#000",b.fillStyle=o,b.fillRect(0,0,1,1);const[a,s,c]=b.getImageData(0,0,1,1).data;return R([a,s,c])}var C=(e,t)=>"function"==typeof getComputedStyle?getComputedStyle(e).getPropertyValue(t).trim():"",R=e=>`#${e.map(e=>Math.round(h(e,0,255)).toString(16).padStart(2,"0")).join("")}`,S=e=>{const t=parseInt(e.slice(1,7),16);return[t>>16&255,t>>8&255,255&t]},$=(e,t,n)=>{const o=S(e),r=S(t);return R(o.map((e,t)=>e+(r[t]-e)*n))};function O(e){const t="function"==typeof getComputedStyle?getComputedStyle(e):null,n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?/i.exec(t?.backgroundColor??"");if(n){if((void 0===n[4]?1:n[4].endsWith("%")?parseFloat(n[4])/100:parseFloat(n[4]))>=.5)return.2126*+n[1]+.7152*+n[2]+.0722*+n[3]<128}const o=k(t?.color??"",e);if(!o)return"function"==typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)").matches;const[r,i,a]=S(o);return.2126*r+.7152*i+.0722*a>140}function j(){const e=[];return{set(t,n,o){e.some(([e,o])=>e===t&&o===n)||e.push([t,n,t.style.getPropertyValue(n)]),t.style.setProperty(n,o)},restore(){for(const[t,n,o]of e.reverse())o?t.style.setProperty(n,o):t.style.removeProperty(n);e.length=0}}}function E(e="",t=!1){const n=document.createElement("span");return n.setAttribute("style","position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0"),t&&n.setAttribute("aria-live","polite"),n.textContent=e,n}function F(e,t){const n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=n.width/(e.offsetWidth||n.width||1)||1;return{x:(o.left-n.left)/r,y:(o.top-n.top)/r,w:o.width/r,h:o.height/r}}function P(e,t){const n={...e,...t},o=e.look,r=t.look;return r&&(n.look=Object.fromEntries(Object.entries({...o,...r}).filter(([,e])=>void 0!==e))),n}var W=new WeakMap,A=e=>W.get(e)?.()??null;function H(n){const{host:o,layer:h="over",outset:f=0,kit:m}=n;if("undefined"==typeof document)return null;const g=`position:absolute;left:${-f}px;top:${-f}px;width:calc(100% + ${2*f}px);height:calc(100% + ${2*f}px);pointer-events:none;z-index:${"under"===h?-1:"auto"}`;if(!r())return m?.current.poster&&e(o,m.current.poster,g,m),null;const y=j(),v=document.createElement("canvas"),b=document.createElement("canvas"),w=b.getContext("2d");if(!w)return null;"static"===getComputedStyle(o).position&&y.set(o,"position","relative"),"under"===h&&y.set(o,"isolation","isolate"),v.setAttribute("aria-hidden","true"),v.dataset.asciiKit="";const C=v.style;C.position="absolute",C.left=C.top=-f+"px",C.width=C.height=`calc(100% + ${2*f}px)`,C.pointerEvents="none",C.zIndex="under"===h?"-1":"",o.appendChild(v);const R=()=>{const e=getComputedStyle(o);T.canvas.style.borderRadius=[e.borderTopLeftRadius,e.borderTopRightRadius,e.borderBottomRightRadius,e.borderBottomLeftRadius].map(e=>f&&/^[\d.]+px$/.test(e)?`${parseFloat(e)+f}px`:e).join(" ")};let S=O(o);const $=()=>k(n.ink(S),o)??k(getComputedStyle(o).color,o)??(S?"#d8d6cf":"#1d1d1b");let E=!1,P=!1,A=!0,H=!1,I=-1/0,z=-1/0;const B=i({target:o,move:e=>{z=e.timeStamp},leave(){}}),T=t({host:o,canvas:v,kit:m,place:g,options:()=>({...M,...n.look(),ink:$(),interactionTarget:o,label:""}),onMount:(e,t)=>{W.set(t,K),t.removeAttribute("role"),t.removeAttribute("aria-label"),e.ready.then(Y,()=>{}),Y()},onRelease:()=>{E&&u(Q),E=!1},onFail:()=>{ee(),n.onFail?.()}}),L=T.field;R();const D=()=>!!(n.reducedMotion()??x()),V=e=>F(T.canvas,e),q=e=>{const t=T.canvas,r=Math.max(1,t.clientWidth||o.clientWidth+2*f),i=Math.max(1,t.clientHeight||o.clientHeight+2*f),a=n.resolution??1,[s,c]="function"==typeof a?a(r,i):[Math.max(1,Math.round(r*a)),Math.max(1,Math.round(i*a))];b.width===s&&b.height===c||(b.width=s,b.height=c),w.setTransform(1,0,0,1,0,0),w.globalAlpha=1,w.globalCompositeOperation="source-over",w.filter="none",w.fillStyle="#000",w.fillRect(0,0,s,c);let l=!1;try{l=n.paint({pen:w,width:s,height:c,w:r,h:i,scale:s/r,now:e,still:D(),dark:S,box:V})}catch(e){"undefined"!=typeof console&&console.error(e)}return L.setSource(b),H||L.redraw(),l};function K(){const e=T.canvas,t=Math.max(1,e.clientWidth||o.clientWidth+2*f),r=Math.max(1,e.clientHeight||o.clientHeight+2*f),i=n.resolution??1,[a,s]="function"==typeof i?i(t,r):[Math.max(1,Math.round(t*i)),Math.max(1,Math.round(r*i))],c=document.createElement("canvas");c.width=a,c.height=s;const l=c.getContext("2d");if(!l)return null;l.fillStyle="#000",l.fillRect(0,0,a,s);try{n.paint({pen:l,width:a,height:s,w:t,h:r,scale:a/t,now:performance.now(),still:!0,dark:S,box:V})}catch{return null}return c}function Q(e){if(E=!1,H||P||!T.live)return;if(e-I<(p??(p=(()=>{const e="undefined"==typeof navigator?void 0:navigator;return 1e3/(e&&(e.hardwareConcurrency>0&&e.hardwareConcurrency<=2||e.deviceMemory&&e.deviceMemory<=2||e.connection?.saveData)?30:60)-2})()))*d()&&e-z>1e3)return E=!0,void a(Q);I=e;!q(e)||D()||!A||"undefined"!=typeof document&&document.hidden||(E=!0,a(Q))}function Y(){E||H||P||!T.live||(E=!0,a(Q))}W.set(v,K);const G="function"==typeof ResizeObserver?new ResizeObserver(()=>{R(),L.resize(),!T.live||H||P||q(performance.now()),Y()}):null;G?.observe(o);const J="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{A=e.isIntersecting,A&&Y()},{rootMargin:"64px"}):null;J?.observe(o);const N=s(()=>{document.hidden||Y()});let U=!1;const X=()=>{U=!1,H||(S=O(o),L.update({ink:$()}),n.onTheme?.(),Y())},Z=c(()=>{U||H||(U=!0,a(X))}),_=l(Y);function ee(){H||(H=!0,E&&u(Q),U&&u(X),E=U=!1,G?.disconnect(),J?.disconnect(),N(),B(),Z(),_(),T.destroy(),y.restore(),b.width=b.height=1)}return T.start(),T.failed?(ee(),null):{field:L,get canvas(){return T.canvas},get live(){return T.live},kick:Y,refresh(){H||(S=O(o),L.update({...M,...n.look(),ink:$()}),Y())},still:D,dark:()=>S,box:V,play(){P&&(P=!1,L.play(),Y())},pause(){P=!0,E&&u(Q),E=!1,L.pause()},destroy:ee}}function I(e,t,r,i,a=()=>{}){let s=!1;const c={get supported(){return!!e()&&!s},get field(){return s?null:e()?.field??null},update(e){if(s)return;t.current=P(t.current,e);const n=e.poster;n&&o(t,n),r(t.current)},play(){s||e()?.play()},pause(){s||e()?.pause()},destroy(){s||(s=!0,e()?.destroy(),n(t),a())}};return Object.defineProperties(i,Object.getOwnPropertyDescriptors(c))}export{M as BASE_LOOK,F as boxIn,h as clamp,m as easeOut,v as entryProgress,I as handle,f as hash,S as hexRgb,y as house,O as isDark,P as mergeOptions,$ as mixHex,H as mountSurface,x as prefersReduced,w as reducedFrom,k as resolveColor,A as settledSource,g as smoothstep,E as srOnly,j as styleKeeper,R as toHex};//# sourceMappingURL=chunk-I377LEZA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hash as t,styleKeeper as e,mountSurface as n,clamp as r,handle as o,entryProgress as a,house as i}from"./chunk-I377LEZA.js";var l={duration:800,trigger:"visible",replayOnHover:!0,settle:"glyphs"},c=["あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん","가나다라마바사아자차카타파하연결함께성장미래교류접","ÁÀÂÄÃÅÆÇÉÈÊËÍÌÎÏÑÓÒÔÖØŒÚÙÛÜÝŸßÐÞ","БГДЖЗИЙЛПФЦЧШЩЪЫЬЭЮЯ","ΑΒΓΔΘΛΞΠΣΦΨΩαβγδεζηθλμξπσφψω","0123456789#%&*+=<>/\\[]{}@$"];function s(e,n,r,o,a){if(n<o||!e.trim())return e;const i=[...a[Math.floor(r/4)%a.length]??e];return i[Math.floor(t(3.1*n+r,.7*r+n)*i.length)]??e}function f(e,n,r=.82){const o=e.getContext("2d");if(!o)return;const a=e.width,i=e.height,l=o.createImageData(a,i),c=t=>t*t*(3-2*t),s=(e,n)=>{const r=Math.floor(e),o=Math.floor(n),a=c(e-r),i=c(n-o),l=t(r,o),s=t(r+1,o),f=t(r,o+1);return l+(s-l)*a+(f-l)*i+(l-s-f+t(r+1,o+1))*a*i};for(let t=0;t<i;t++)for(let e=0;e<a;e++){const o=.6*s(e/6+2.4*n,t/3.5-.8*n)+.4*s(e/2.5-3*n,t/2),c=Math.min(1,2.4*(1-Math.hypot(2*(e/a-.5),2*(t/i-.5))*r)),f=.72*Math.max(0,o-.42)*Math.max(0,c)*255,h=4*(t*a+e);l.data[h]=l.data[h+1]=l.data[h+2]=f,l.data[h+3]=255}o.putImageData(l,0,0)}function h(h,u={}){const d={current:{...l,...u}},g=e(),m=document.createElement("canvas"),p=document.createElement("canvas");void 0===u.duration&&u.scramble&&(d.current.duration=1400);let x=-1,v="",w=!1,M=!1,y=null,S=[],b=0;const E=(t,e,n)=>{t.fillStyle="#fff",t.textAlign="center",t.textBaseline="alphabetic",S.forEach((r,o)=>{const a=s(r.char,o,e,n,Array.isArray(d.current.scramble)&&d.current.scramble.length?d.current.scramble:c);a.trim()&&(t.font=r.font,t.fillText(a,r.x+r.w/2,r.y,Math.max(1,1.2*r.w)))})},k=(t,e)=>{const n=`${t}x${e}:${d.current.text??""}:${h.textContent}`;if(n===v)return;v=n,m.width=t,m.height=e;const r=m.getContext("2d");r.fillStyle="#000",r.fillRect(0,0,t,e),S=[];const o=d.current.scramble?S:void 0;void 0!==d.current.text?function(t,e,n,r,o,a){const i=getComputedStyle(e),l=n.split("\n");t.fillStyle="#fff",t.textAlign="center",t.textBaseline="middle";const c=(parseFloat(i.letterSpacing)||0)/(parseFloat(i.fontSize)||16),s=e=>{"letterSpacing"in t&&(t.letterSpacing=c*e+"px")};t.font=`${i.fontWeight} 100px ${i.fontFamily}`,s(0);const f=Math.max(1,...l.map(e=>t.measureText(e).width)),h=Math.min(.94*r/f*100,.9*o/l.length);t.font=`${i.fontWeight} ${h}px ${i.fontFamily}`,s(h),l.forEach((e,n)=>{const i=o/2+(n-(l.length-1)/2)*h*1.04;if(t.fillText(e,r/2,i),!a)return;const s=c*h;let f=r/2-t.measureText(e).width/2;for(const n of e){const e=t.measureText(n).width;a.push({char:n,x:f,y:i+.36*h,w:e,font:t.font}),f+=e+s}})}(r,h,d.current.text,t,e,o):function(t,e,n,r,o){const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=document.createRange();t.fillStyle="#fff",t.textAlign="left",t.textBaseline="alphabetic";for(let e=a.nextNode();e;e=a.nextNode()){const a=e.parentElement;if(!a)continue;const l=getComputedStyle(a);t.font=`${l.fontStyle} ${l.fontWeight} ${parseFloat(l.fontSize)*r}px ${l.fontFamily}`,"letterSpacing"in t&&(t.letterSpacing=(parseFloat(l.letterSpacing)||0)*r+"px");const c=t.measureText("Hg"),s=c.fontBoundingBoxAscent||parseFloat(l.fontSize)*r*.8,f=c.fontBoundingBoxDescent||parseFloat(l.fontSize)*r*.2,h="uppercase"===l.textTransform?t=>t.toUpperCase():"lowercase"===l.textTransform?t=>t.toLowerCase():t=>t;for(const a of e.data.matchAll(/\S+/g)){i.setStart(e,a.index),i.setEnd(e,a.index+a[0].length);const l=i.getClientRects()[0];if(!l)continue;const c=(l.top-n.top)*r+(l.height*r-s-f)/2+s;if(t.fillText(h(a[0]),(l.left-n.left)*r,c),!o)continue;let u=a.index;for(const l of a[0]){i.setStart(e,u),i.setEnd(e,u+l.length);const a=i.getClientRects()[0];a&&o.push({char:h(l),x:(a.left-n.left)*r,y:c,w:a.width*r,font:t.font}),u+=l.length}}}i.detach?.()}(r,h,h.getBoundingClientRect(),t/(h.getBoundingClientRect().width||1),o)};y=n({host:h,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4.5,cellAspect:.62,glyphScale:.92,contrast:1.35,hover:"trail",trail:{strength:.6,radius:.2},...d.current.look}),ink:()=>d.current.ink??getComputedStyle(h).color,kit:d,reducedMotion:()=>d.current.reducedMotion,resolution:2,onFail:()=>{y=null,g.restore()},paint:({pen:e,width:n,height:o,now:a,still:l})=>{k(n,o);const c=d.current,s="text"===c.settle;if("scroll"===c.trigger){const t=l?1:b;if(t>=1)return s||e.drawImage(m,0,0),!1;if(t<=0)return!1;if(c.scramble)return E(e,Math.floor(48*t),Math.floor(r((t-.25)/.75)*S.length)),!1;const a=t*n;return e.drawImage(m,0,0,Math.max(1,a),o,0,0,Math.max(1,a),o),!1}if(x<0||l)return!(!M&&"visible"===c.trigger&&!l)&&(s&&x>=0||e.drawImage(m,0,0),x>=0&&I(),!1);const h=a-x,u=.3*c.duration,g=.7*c.duration;if(c.scramble){if(h>=c.duration)return s||e.drawImage(m,0,0),I(),!1;const t=Math.floor(i(r((h-.4*c.duration)/(.6*c.duration)))*S.length);return E(e,Math.floor(h/65),t),!0}const v=Math.max(2,Math.ceil(n/20)),y=Math.max(2,Math.ceil(o/20));if(p.width===v&&p.height===y||(p.width=v,p.height=y),f(p,h/1e3),e.imageSmoothingEnabled=!0,h<u)return e.drawImage(p,0,0,n,o),w&&(e.globalAlpha=1-i(h/u),e.drawImage(m,0,0),e.globalAlpha=1),!0;const $=Math.min(1,(h-u)/g),A=(1.18*$-.02)*n,C=.14*n,L=5.58,T=Math.floor(a/16);if($>=1)return s||e.drawImage(m,0,0),I(),!1;e.drawImage(p,0,0,n,o),A>0&&e.drawImage(m,0,0,A,o,0,0,A,o);for(let n=Math.max(0,Math.floor(A/L)*L);n<A+C;n+=L){const r=(n-A)/C;for(let a=0;a<o;a+=9)t(n+13*T,a)<r||(e.globalAlpha=.35+.65*t(a+7*T,n),e.fillStyle="#000",e.fillRect(n,a,L,9),e.drawImage(m,n,a,L,9,n,a,L,9))}return e.globalAlpha=1,!0}});const I=()=>{x=-1,w="text"!==d.current.settle,w||g.restore()},$=()=>{y&&(g.set(h,"-webkit-text-fill-color","transparent"),M=!0,x=performance.now(),y.kick())},A=()=>{if(!y)return;const t=a(h);Math.abs(t-b)<.002||(b=t,"text"===d.current.settle&&(t>=1?g.restore():g.set(h,"-webkit-text-fill-color","transparent")),y.kick())},C=!!y&&"scroll"===d.current.trigger&&"undefined"!=typeof window;C&&(window.addEventListener("scroll",A,{passive:!0}),b=-1,A());let L=!1;const T=y&&"visible"===d.current.trigger&&"function"==typeof IntersectionObserver?new IntersectionObserver(([t])=>{t.isIntersecting&&!L&&$(),L=t.isIntersecting},{threshold:.5}):null;y&&("text"!==d.current.settle&&g.set(h,"-webkit-text-fill-color","transparent"),w="text"!==d.current.settle&&"manual"===d.current.trigger,T?T.observe(h):"visible"===d.current.trigger&&$());let F=!1;const B=()=>{F||(F=!0,d.current.replayOnHover&&x<0&&"scroll"!==d.current.trigger&&$())},R=()=>{F=!1},W=t=>{!F||t.target instanceof Node&&h.contains(t.target)||(F=!1)};return y&&(h.addEventListener("pointerenter",B),h.addEventListener("pointermove",B),h.addEventListener("pointerleave",R),document.addEventListener("pointermove",W,!0)),y&&document.fonts?.ready.then(()=>{v="",y?.kick()}),o(()=>y,d,()=>{v="",y?.refresh()},{replay:$},()=>{T?.disconnect(),C&&window.removeEventListener("scroll",A),h.removeEventListener("pointerenter",B),h.removeEventListener("pointermove",B),h.removeEventListener("pointerleave",R),document.removeEventListener("pointermove",W,!0),g.restore()})}var u=l;export{u as DECODE_DEFAULTS,c as SCRAMBLE_SCRIPTS,h as decode,f as driftNoise,s as scrambleLetter};//# sourceMappingURL=chunk-IFZDWKIX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-VWFC5XOB.js";var n=e({id:"constellation",name:"Constellation",description:"Points wander and neighbours close enough are linked by fine lines that come and go.",cellSize:11,scene:"constellation",charset:" .·:+*#",hover:"lantern",tune:()=>({blend:"off"})});export{n as constellation};//# sourceMappingURL=chunk-J7TFGVZT.js.map
|