PageSourceSearch

https://c-squared.shop/assets/confetti.module.3865e7a1.js

js c-squared.shop collected 2026-09-29 09:19:20 UTC 7,535 bytes, 3 lines download raw bytes

vendor: 4,212 bytes, lines 1-2
1var S={};(function B(h,y,x,M){var P=!!(h.Worker&&h.Blob&&h.Promise&&h.OffscreenCanvas&&h.OffscreenCanvasRenderingContext2D&&h.HTMLCanvasElement&&h.HTMLCanvasElement.prototype.transferControlToOffscreen&&h.URL&&h.URL.createObjectURL);function L(){}function C(r){var e=y.exports.Promise,t=e!==void 0?e:h.Promise;return typeof t=="function"?new t(r):(r(L,L),null)}var I=function(){var r=Math.floor(16.666666666666668),e,t,a={},o=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(e=function(i){var n=Math.random();return a[n]=requestAnimationFrame(function l(u){o===u||o+r-1<u?(o=u,delete a[n],i()):a[n]=requestAnimationFrame(l)}),n},t=function(i){a[i]&&cancelAnimationFrame(a[i])}):(e=function(i){return setTimeout(i,r)},t=function(i){return clearTimeout(i)}),{frame:e,cancel:t}}(),U=function(){var r,e,t={};function a(o){function i(n,l){o.postMessage({options:n||{},callback:l})}o.init=function(l){var u=l.transferControlToOffscreen();o.postMessage({canvas:u},[u])},o.fire=function(l,u,g){if(e)return i(l,null),e;var d=Math.random().toString(36).slice(2);return e=C(function(v){function f(c){c.data.callback===d&&(delete t[d],o.removeEventListener("message",f),e=null,g(),v())}o.addEventListener("message",f),i(l,d),t[d]=f.bind(null,{data:{callback:d}})}),e},o.reset=function(){o.postMessage({reset:!0});for(var l in t)t[l](),delete t[l]}}return function(){if(r)return r;if(!x&&P){var o=["var CONFETTI, SIZE = {}, module = {};","("+B.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join(`
2`);try{r=new Worker(URL.createObjectURL(new Blob([o])))}catch(i){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",i),null}a(r)}return r}}(),_={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function V(r,e){return e?e(r):r}function Z(r){return r!=null}function s(r,e,t){return V(r&&Z(r[e])?r[e]:_[e],t)}function X(r){return r<0?0:Math.floor(r)}function Y(r,e){return Math.floor(Math.random()*(e-r))+r}function T(r){return parseInt(r,16)}function q(r){return r.map(j)}function j(r){var e=String(r).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:T(e.substring(0,2)),g:T(e.substring(2,4)),b:T(e.substring(4,6))}}function H(r){var e=s(r,"origin",Object);return e.x=s(e,"x",Number),e.y=s(e,"y",Number),e}function G(r){r.width=document.documentElement.clientWidth,r.height=document.documentElement.clientHeight}function J(r){var e=r.getBoundingClientRect();r.width=e.width,r.height=e.height}function K(r){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=r,e}function Q(r,e,t,a,o,i,n,l,u){r.save(),r.translate(e,t),r.rotate(i),r.scale(a,o),r.arc(0,0,1,n,l,u),r.restore()}function $(r){var e=r.angle*(Math.PI/180),t=r.spread*(Math.PI/180);return{x:r.x,y:r.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:r.startVelocity*.5+Math.random()*r.startVelocity,angle2D:-e+(.5*t-Math.random()*t),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:r.color,shape:r.shape,tick:0,totalTicks:r.ticks,decay:r.decay,drift:r.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:r.gravity*3,ovalScalar:.6,scalar:r.scalar}}function ee(r,e){e.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.wobble+=e.wobbleSpeed,e.velocity
2*=e.decay,e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2,e.wobbleX=e.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.y+10*e.scalar*Math.sin(e.wobble);var t=e.tick++/e.totalTicks,a=e.x+e.random*e.tiltCos,o=e.y+e.random*e.tiltSin,i=e.wobbleX+e.random*e.tiltCos,n=e.wobbleY+e.random*e.tiltSin;return r.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-t)+")",r.beginPath(),e.shape==="circle"?r.ellipse?r.ellipse(e.x,e.y,Math.abs(i-a)*e.ovalScalar,Math.abs(n-o)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):Q(r,e.x,e.y,Math.abs(i-a)*e.ovalScalar,Math.abs(n-o)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):(r.moveTo(Math.floor(e.x),Math.floor(e.y)),r.lineTo(Math.floor(e.wobbleX),Math.floor(o)),r.lineTo(Math.floor(i),Math.floor(n)),r.lineTo(Math.floor(a),Math.floor(e.wobbleY))),r.closePath(),r.fill(),e.tick<e.totalTicks}function re(r,e,t,a,o){var i=e.slice(),n=r.getContext("2d"),l,u,g=C(function(d){function v(){l=u=null,n.clearRect(0,0,a.width,a.height),o(),d()}function f(){x&&!(a.width===M.width&&a.height===M.height)&&(a.width=r.width=M.width,a.height=r.height=M.height),!a.width&&!a.height&&(t(r),a.width=r.width,a.height=r.height),n.clearRect(0,0,a.width,a.height),i=i.filter(function(c){return ee(n,c)}),i.length?l=I.frame(f):v()}l=I.frame(f),u=v});return{addFettis:function(d){return i=i.concat(d),g},canvas:r,promise:g,reset:function(){l&&I.cancel(l),u&&u()}}}function N(r,e){var t=!r,a=!!s(e||{},"resize"),o=s(e,"disableForReducedMotion",Boolean),i=P&&!!s(e||{},"useWorker"),n=i?U():null,l=t?G:J,u=r&&n?!!r.__confetti_initialized:!1,g=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,d;function v(c,k,E){for(var b=s(c,"particleCount",X),w=s(c,"angle",Number),p=s(c,"spread",Number),m=s(c,"startVelocity",Number),ae=s(c,"decay",Number),ne=s(c,"gravity",Number),te=s(c,"drift",Number),W=s(c,"colors",q),ie=s(c,"ticks",Number),A=s(c,"shapes"),oe=s(c,"scalar"),D=H(c),z=b,R=[],le=r.width*D.x,ce=r.height*D.y;z--;)R.push($({x:le,y:ce,angle:w,spread:p,startVelocity:m,color:W[z%W.length],shape:A[Y(0,A.length)],ticks:ie,decay:ae,gravity:ne,drift:te,scalar:oe}));return d?d.addFettis(R):(d=re(r,R,l,k,E),d.promise)}function f(c){var k=o||s(c,"disableForReducedMotion",Boolean),E=s(c,"zIndex",Number);if(k&&g)return C(function(m){m()});t&&d?r=d.canvas:t&&!r&&(r=K(E),document.body.appendChild(r)),a&&!u&&l(r);var b={width:r.width,height:r.height};n&&!u&&n.init(r),u=!0,n&&(r.__confetti_initialized=!0);function w(){if(n){var m={getBoundingClientRect:function(){if(!t)return r.getBoundingClientRect()}};l(m),n.postMessage({resize:{width:m.width,height:m.height}});return}b.width=b.height=null}function p(){d=null,a&&h.removeEventListener("resize",w),t&&r&&(document.body.removeChild(r),r=null,u=!1)}return a&&h.addEventListener("resize",w,!1),n?n.fire(c,b,p):v(c,b,p)}return f.reset=function(){n&&n.reset(),d&&d.reset()},f}var F;function O(){return F||(F=N(null,{useWorker:!0,resize:!0})),F}y.exports=function(){return O().apply(this,arguments)},y.exports.reset=function(){O().reset()},y.exports.create=N})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),S,!1);const se=S.exports;var ue=S.exports.create;export{ue as create,se as default};
3//# sourceMappingURL=confetti.module.3865e7a1.js.map

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.