PageSourceSearch

https://cdn.buymeacoffee.com/static/prod/1052/build/assets/BlurHashDecoder-BnjDmSW_.js

js buymeacoffee.com collected 2026-09-24 06:04:52 UTC 1,884 bytes, 1 lines download raw bytes

1import{Ht as e,b as t,ct as n,mt as r,vn as i}from"./runtime-core.esm-bundler-BKdLzFmX.js";var a=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~`,o=(e,t,n)=>{let r=0;for(;t<n;)r=r*83+a.indexOf(e[t++]);return r},s=Math.pow,c=Math.PI,l=3294.6,u=269.025,d=e=>e>10.31475?s(e/u+.052132,2.4):e/l,f=e=>~~(e>1227e-8?u*s(e,.416666)-13.025:e*l+1),p=4096,m=new Uint8ClampedArray(4097);for(let e=0;e<=p;e++)m[e]=f(e/p);var h=e=>e<=0?0:e>=1?255:m[e*p+.5|0],g=e=>(e<0?-1:1)*e*e,_=e=>{for(e+=c/2;e>c;)e-=c*2;let t=1.27323954*e-.405284735*g(e);return .225*(g(t)-t)+t};function v(e){let t=o(e,2,6);return[t>>16,t>>8&255,t&255]}function y(e,t,n,r){let i=o(e,0,1),a=i%9+1,s=~~(i/9)+1,l=a*s,u,f,p,m,y,b,x,S,C,w,T,E,D=(o(e,1,2)+1)/13446*(r|1),O=new Float64Array(l*3),k=v(e);for(u=0;u<3;u++)O[u]=d(k[u]);for(u=1;u<l;u++)E=o(e,4+u*2,6+u*2),O[u*3]=g(~~(E/361)-9)*D,O[u*3+1]=g(~~(E/19)%19-9)*D,O[u*3+2]=g(E%19-9)*D;let A=new Float64Array(s*n),j=new Float64Array(a*t);for(f=0;f<s;f++)for(m=0;m<n;m++)A[f*n+m]=_(c*m*f/n);for(u=0;u<a;u++)for(p=0;p<t;p++)j[u*t+p]=_(c*p*u/t);let M=t*4,N=new Uint8ClampedArray(M*n),P=new Float64Array(a*3);for(m=0;m<n;m++){for(u=0;u<a;u++){for(y=b=x=0,f=0;f<s;f++)C=A[f*n+m],w=(u+f*a)*3,y+=O[w]*C,b+=O[w+1]*C,x+=O[w+2]*C;P[u*3]=y,P[u*3+1]=b,P[u*3+2]=x}for(p=0;p<t;p++){for(y=b=x=0,u=0;u<a;u++)S=j[u*t+p],w=u*3,y+=P[w]*S,b+=P[w+1]*S,x+=P[w+2]*S;T=4*p+m*M,N[T]=h(y),N[T+1]=h(b),N[T+2]=h(x),N[T+3]=255}}return N}var b=[`width`,`height`],x={__name:`BlurHashDecoder`,props:[`width`,`height`,`blurhash`],setup(a){let o=a,s=i(),c=()=>{let e=y(o.blurhash,o.width,o.height),t=s.value.getContext(`2d`),n=t.createImageData(o.width,o.height);n.data.set(e),t.putImageData(n,0,0)};return e(()=>o.blurhash,e=>{c()}),n(()=>{c()}),(e,n)=>(r(),t(`canvas`,{width:a.width,height:a.height,"aria-hidden":!0,ref_key:`canvasElement`,ref:s},null,8,b))}};export{x as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.