"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=[[[0,0],[1,0],[0,1]],[[0,0],[1,0],[1,1]],[[0,0],[0,1],[1,1]],[[0,1],[1,0],[1,1]]],w=9301,F=49297,R=233280,X=4,_=1,k=8,H=.12,Y=.3,N={circle:.2,dot:.35,triangle:.5,diamond:.62,cross:.75},j=.3,v=.3,z=450,V=320,Z=300,q=.8,J=.17,h=.25,d=.25,K=.25,Q=7e3,$=2,g=5,W=.75;function M(t,o,s){return Math.floor(s()*(o-t+1))+t}function tt(t){return()=>(t=(t*w+F)%R,t/R)}function ot(t,o,s,I,i,c="right",n=2){return et(t,o,s,I,i,c,n)}function et(t,o,s,I,i,c,n){if(t<=0||o<=0)return[];const A=Math.max(X,s),E=Math.max(_,Math.floor(o/A)),r=Math.min(k,Math.max(_,n));let a=1;for(;a<E&&o/(a+1)>=A;)a++;let e=o/a;e>t&&(e=t,a=Math.max(_,Math.floor(o/e)));const L=t/r,P=o/r;if(e=Math.min(e,L,P),e<=0)return[];a=Math.max(_,Math.floor(o/e));const S=Math.max(_,Math.floor(t/e)),O=()=>i()>H,x=l=>M(Math.max(_,Math.floor(l*Y)),l,i),u=c==="right"||c==="left",D=u?a:S,f=u?S:a,C=c==="right"||c==="bottom",p=[];for(let l=0;l<D;l++){if(!O())continue;const m=x(f),U=C?f-m:0,G=C?f:m;for(let T=U;T<G;T++){const B=u?T:l,b=u?l:T;at(p,B*e,b*e,e,e,I,i)}}return p}function nt(t){const o=t();if(o<N.circle)return{shapeType:"circle"};if(o<N.dot)return{shapeType:"dot",dotScale:j+t()*v};if(o<N.triangle)return{shapeType:"triangle",triangleIndex:M(0,y.length-1,t)};if(o<N.diamond)return{shapeType:"diamond"};if(o<N.cross)return{shapeType:"cross"};const s=M($,g,t);return{shapeType:"stripes",stripeDirection:t()>.35?1:0,stripeCount:s,stripeMask:Array.from({length:s},()=>t()>1-W)}}function at(t,o,s,I,i,c,n){const A=M(0,c-1,n);let E=M(0,c-1,n);for(;E===A;)E=M(0,c-1,n);const r=nt(n),a=n();let e;a<h?e="breathe":a<h+d?e="pulse":a<h+d+K&&(e="opacity"),t.push({x:o,y:s,width:I,height:i,bgColorIndex:A,shapeColorIndex:E,shapeType:r.shapeType,triangleIndex:r.triangleIndex,stripeDirection:r.stripeDirection,stripeCount:r.stripeCount,stripeMask:r.stripeMask,animationDelay:Math.floor(n()*z),animationDuration:V+Math.floor(n()*Z),animationScaleFrom:q+n()*J,dotScale:r.dotScale,animationType:e,animationPhase:e?Math.floor(n()*Q):void 0})}exports.TRIANGLE_TEMPLATES=y;exports.createSeededRandom=tt;exports.generatePattern=ot;exports.getRandomInt=M;
//# sourceMappingURL=index.cjs58.js.map
