PageSourceSearch

https://speckle.systems/_nuxt/CXyGGab8.js

js speckle.systems collected 2026-10-09 21:36:16 UTC 3,607 bytes, 1 lines download raw bytes

1import{s as Y}from"./BzLCLO6P.js";import{M as J,as as Q}from"#entry";function pt(R,U){const O=Math.PI*2,X="#136CFF";let c=[],u=0,p=0,l=0,a=0,g=null,C=null,I=null,h=null,d=null,f=[],P=null,m=!0,A=!0,M=null,S=null;function L(t,n,e){return t<n?n:t>e?e:t}function F(){return .15+Math.random()*(.25-.15)}function H(){const t=Math.ceil(10)+2,n=document.createElement("canvas");n.width=t,n.height=t;const e=n.getContext("2d");e&&(e.fillStyle="#fff",e.beginPath(),e.arc(t/2,t/2,t/2,0,O),e.fill(),C=n)}function Z(){c=Array.from({length:u*p},(t,n)=>{const e=n%u,s=Math.floor(n/u);return{baseOpacity:F(),isBlinking:!1,phaseOffset:Math.random()*O,x:e*11+2.5,y:s*11+2.5}})}function k(){const t=U.value;if(!t||l===0||a===0)return;const n=window.devicePixelRatio||1;t.width=Math.round(l*n),t.height=Math.round(a*n),t.style.width=`${l}px`,t.style.height=`${a}px`;const e=t.getContext("2d");e&&(e.scale(n,n),g=e)}function v(t,n){const e=Math.floor(t/11)+1,s=Math.floor(n/11)+1;l=t,a=n,(e!==u||s!==p)&&(u=e,p=s,Z()),k()}function q(t){const n=t[0];if(!n)return;const{width:e,height:s}=n.contentRect;v(e,s)}function G(t,n){if(t.isBlinking)return .7;const e=Math.sin(n*8e-4+t.phaseOffset)*.04;return Math.max(.02,t.baseOpacity+e)}function W(t,n){let e=1;for(let s=0;s<n.length;s++){const o=n[s];if(!o)continue;const r=t.x-o.originX,i=t.y-o.originY,_=r*r+i*i;if(_<o.innerSq||_>o.outerSq)continue;const T=Math.sqrt(_),E=Math.abs(T-o.currentRadius);if(E<65){const B=1+1*(1-E/65)*o.decayFactor;B>e&&(e=B)}}return e}function V(t){const n=[];let e=0;for(let s=0;s<f.length;s++){const o=f[s];if(!o)continue;const r=(t-o.startTime)/1e3*150;if(r-65>o.maxRadius)continue;f[e++]=o;const i=r-65;n.push({originX:o.originX,originY:o.originY,currentRadius:r,innerSq:i>0?i*i:0,outerSq:(r+65)**2,decayFactor:Math.max(0,1-r*.001)})}return f.length=e,n}function z(t,n){t.clearRect(0,0,l,a);const e=V(n),s=e.length>0,o=C;if(o){t.globalCompositeOperation="source-over",t.fillStyle=X;for(let r=0;r<c.length;r++){const i=c[r];if(!i)continue;const _=s?W(i,e):1,T=G(i,n),E=2.5*_,D=E*2;t.globalAlpha=T,t.drawImage(o,i.x-E,i.y-E,D,D)}t.globalCompositeOperation="source-in",t.globalAlpha=1,t.fillRect(0,0,l,a),t.globalCompositeOperation="source-over"}}function y(){if(!m||!A){I=null;return}g&&z(g,performance.now()),I=requestAnimationFrame(y)}function N(){I!==null&&(cancelAnimationFrame(I),I=null),h!==null&&(clearInterval(h),h=null),d!==null&&(clearTimeout(d),d=null),P!==null&&(clearInterval(P),P=null),f=[]}function b(){h===null&&(h=Y(K,1e3)),P===null&&(P=Y($,800)),I===null&&m&&A&&(I=requestAnimationFrame(y))}function w(){m&&A?b():N()}function K(){if(c.length===0)return;const t=Math.floor(Math.random()*c.length),n=c[t];n&&(n.isBlinking=!0,d=setTimeout(()=>{n.isBlinking=!1,d=null},750))}function $(){if(c.length===0||f.length>=4)return;const t=l/2,n=a/2,e=t+(Math.random()+Math.random()-1)*t*.8,s=n+(Math.random()+Math.random()-1)*n*.8,o=L(Math.round((L(e,0,l)-2.5)/11),0,u-1),r=L(Math.round((L(s,0,a)-2.5)/11),0,p-1),i=c[r*u+o];if(!i)return;const _=Math.sqrt(Math.max(i.x,l-i.x)**2+Math.max(i.y,a-i.y)**2);f.push({originX:i.x,originY:i.y,startTime:performance.now(),maxRadius:_})}function x(){A=!document.hidden,w()}function j(){R.value&&(S=new IntersectionObserver(t=>{const n=t[0];n&&(m=n.isIntersecting,w())},{threshold:0}),S.observe(R.value))}J(()=>{if(H(),R.value){const{width:t,height:n}=R.value.getBoundingClientRect();v(t,n),M=new ResizeObserver(q),M.observe(R.value)}j(),document.addEventListener("visibilitychange",x),b()}),Q(()=>{N(),M?.disconnect(),S?.disconnect(),document.removeEventListener("visibilitychange",x)})}export{pt as u};

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.