@tsparticles/confetti 3.6.0-beta.0 → 3.6.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.
@@ -1 +1 @@
1
- /*! tsParticles Confetti v3.6.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Confetti v3.6.0 by Matteo Bruni */
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.6.0-beta.0
7
+ * v3.6.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
34
34
  \*****************************************/
35
35
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36
36
 
37
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConfettiOptions: () => (/* binding */ ConfettiOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass ConfettiOptions {\n constructor() {\n this.angle = 90;\n this.count = 50;\n this.spread = 45;\n this.startVelocity = 45;\n this.decay = 0.9;\n this.gravity = 1;\n this.drift = 0;\n this.ticks = 200;\n this.position = {\n x: 50,\n y: 50\n };\n this.colors = [\"#26ccff\", \"#a25afd\", \"#ff5e7e\", \"#88ff5a\", \"#fcff42\", \"#ffa62d\", \"#ff36ff\"];\n this.shapes = [\"square\", \"circle\"];\n this.scalar = 1;\n this.zIndex = 100;\n this.disableForReducedMotion = true;\n this.flat = false;\n this.shapeOptions = {};\n }\n get origin() {\n return {\n x: this.position.x / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator,\n y: this.position.y / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator\n };\n }\n set origin(value) {\n this.position.x = value.x * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n this.position.y = value.y * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n get particleCount() {\n return this.count;\n }\n set particleCount(value) {\n this.count = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.angle !== undefined) {\n this.angle = data.angle;\n }\n const count = data.count ?? data.particleCount;\n if (count !== undefined) {\n this.count = count;\n }\n if (data.spread !== undefined) {\n this.spread = data.spread;\n }\n if (data.startVelocity !== undefined) {\n this.startVelocity = data.startVelocity;\n }\n if (data.decay !== undefined) {\n this.decay = data.decay;\n }\n if (data.flat !== undefined) {\n this.flat = data.flat;\n }\n if (data.gravity !== undefined) {\n this.gravity = data.gravity;\n }\n if (data.drift !== undefined) {\n this.drift = data.drift;\n }\n if (data.ticks !== undefined) {\n this.ticks = data.ticks;\n }\n const origin = data.origin;\n if (origin && !data.position) {\n data.position = {\n x: origin.x !== undefined ? origin.x * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator : undefined,\n y: origin.y !== undefined ? origin.y * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator : undefined\n };\n }\n const position = data.position;\n if (position) {\n if (position.x !== undefined) {\n this.position.x = position.x;\n }\n if (position.y !== undefined) {\n this.position.y = position.y;\n }\n }\n if (data.colors !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.colors)) {\n this.colors = [...data.colors];\n } else {\n this.colors = data.colors;\n }\n }\n const options = data.shapeOptions;\n if (options !== undefined) {\n for (const shape in options) {\n const item = options[shape];\n if (item) {\n this.shapeOptions[shape] = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(this.shapeOptions[shape] ?? {}, item);\n }\n }\n }\n if (data.shapes !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.shapes)) {\n this.shapes = [...data.shapes];\n } else {\n this.shapes = data.shapes;\n }\n }\n if (data.scalar !== undefined) {\n this.scalar = data.scalar;\n }\n if (data.zIndex !== undefined) {\n this.zIndex = data.zIndex;\n }\n if (data.disableForReducedMotion !== undefined) {\n this.disableForReducedMotion = data.disableForReducedMotion;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/./dist/browser/ConfettiOptions.js?");
37
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConfettiOptions: () => (/* binding */ ConfettiOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass ConfettiOptions {\n constructor() {\n this.angle = 90;\n this.count = 50;\n this.spread = 45;\n this.startVelocity = 45;\n this.decay = 0.9;\n this.gravity = 1;\n this.drift = 0;\n this.ticks = 200;\n this.position = {\n x: 50,\n y: 50\n };\n this.colors = [\"#26ccff\", \"#a25afd\", \"#ff5e7e\", \"#88ff5a\", \"#fcff42\", \"#ffa62d\", \"#ff36ff\"];\n this.shapes = [\"square\", \"circle\"];\n this.scalar = 1;\n this.zIndex = 100;\n this.disableForReducedMotion = true;\n this.flat = false;\n this.shapeOptions = {};\n }\n get origin() {\n return {\n x: this.position.x / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator,\n y: this.position.y / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator\n };\n }\n set origin(value) {\n this.position.x = value.x * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n this.position.y = value.y * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n get particleCount() {\n return this.count;\n }\n set particleCount(value) {\n this.count = value;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.angle !== undefined) {\n this.angle = data.angle;\n }\n const count = data.count ?? data.particleCount;\n if (count !== undefined) {\n this.count = count;\n }\n if (data.spread !== undefined) {\n this.spread = data.spread;\n }\n if (data.startVelocity !== undefined) {\n this.startVelocity = data.startVelocity;\n }\n if (data.decay !== undefined) {\n this.decay = data.decay;\n }\n if (data.flat !== undefined) {\n this.flat = data.flat;\n }\n if (data.gravity !== undefined) {\n this.gravity = data.gravity;\n }\n if (data.drift !== undefined) {\n this.drift = data.drift;\n }\n if (data.ticks !== undefined) {\n this.ticks = data.ticks;\n }\n const origin = data.origin;\n if (origin && !data.position) {\n data.position = {\n x: origin.x !== undefined ? origin.x * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator : undefined,\n y: origin.y !== undefined ? origin.y * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator : undefined\n };\n }\n const position = data.position;\n if (position) {\n if (position.x !== undefined) {\n this.position.x = position.x;\n }\n if (position.y !== undefined) {\n this.position.y = position.y;\n }\n }\n if (data.colors !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.colors)) {\n this.colors = [...data.colors];\n } else {\n this.colors = data.colors;\n }\n }\n const options = data.shapeOptions;\n if (options !== undefined) {\n for (const shape in options) {\n const item = options[shape];\n if (item) {\n this.shapeOptions[shape] = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(this.shapeOptions[shape] ?? {}, item);\n }\n }\n }\n if (data.shapes !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.shapes)) {\n this.shapes = [...data.shapes];\n } else {\n this.shapes = data.shapes;\n }\n }\n if (data.scalar !== undefined) {\n this.scalar = data.scalar;\n }\n if (data.zIndex !== undefined) {\n this.zIndex = data.zIndex;\n }\n if (data.disableForReducedMotion !== undefined) {\n this.disableForReducedMotion = data.disableForReducedMotion;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/./dist/browser/ConfettiOptions.js?");
38
38
 
39
39
  /***/ }),
40
40
 
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.confetti.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-emitters","@tsparticles/basic","@tsparticles/shape-cards","@tsparticles/shape-emoji","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,p,d,c,u,h,f,m)=>(()=>{var y={145:e=>{e.exports=i},303:t=>{t.exports=e},526:e=>{e.exports=t},235:e=>{e.exports=l},720:e=>{e.exports=a},109:e=>{e.exports=s},899:e=>{e.exports=r},162:e=>{e.exports=o},73:e=>{e.exports=p},400:e=>{e.exports=u},29:e=>{e.exports=h},75:e=>{e.exports=n},544:e=>{e.exports=d},668:e=>{e.exports=c},844:e=>{e.exports=f},238:e=>{e.exports=m}},v={};function w(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={exports:{}};return y[e](i,i.exports,w),i.exports}w.d=(e,t)=>{for(var i in t)w.o(t,i)&&!w.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};w.r(x),w.d(x,{confetti:()=>N});var b=w(303),g=w(526);class q{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/b.percentDenominator,y:this.position.y/b.percentDenominator}}set origin(e){this.position.x=e.x*b.percentDenominator,this.position.y=e.y*b.percentDenominator}get particleCount(){return this.count}set particleCount(e){this.count=e}load(e){if(!e)return;void 0!==e.angle&&(this.angle=e.angle);const t=e.count??e.particleCount;void 0!==t&&(this.count=t),void 0!==e.spread&&(this.spread=e.spread),void 0!==e.startVelocity&&(this.startVelocity=e.startVelocity),void 0!==e.decay&&(this.decay=e.decay),void 0!==e.flat&&(this.flat=e.flat),void 0!==e.gravity&&(this.gravity=e.gravity),void 0!==e.drift&&(this.drift=e.drift),void 0!==e.ticks&&(this.ticks=e.ticks);const i=e.origin;i&&!e.position&&(e.position={x:void 0!==i.x?i.x*b.percentDenominator:void 0,y:void 0!==i.y?i.y*b.percentDenominator:void 0});const a=e.position;a&&(void 0!==a.x&&(this.position.x=a.x),void 0!==a.y&&(this.position.y=a.y)),void 0!==e.colors&&((0,b.isArray)(e.colors)?this.colors=[...e.colors]:this.colors=e.colors);const s=e.shapeOptions;if(void 0!==s)for(const e in s){const t=s[e];t&&(this.shapeOptions[e]=(0,b.deepExtend)(this.shapeOptions[e]??{},t))}void 0!==e.shapes&&((0,b.isArray)(e.shapes)?this.shapes=[...e.shapes]:this.shapes=e.shapes),void 0!==e.scalar&&(this.scalar=e.scalar),void 0!==e.zIndex&&(this.zIndex=e.zIndex),void 0!==e.disableForReducedMotion&&(this.disableForReducedMotion=e.disableForReducedMotion)}}var S=w(145),P=w(720),j=w(109),O=w(899),z=w(162),M=w(75),I=w(235),k=w(73),R=w(544),V=w(668),C=w(400),D=w(29),E=w(844),F=w(238);const T=9.81,U=5,A=3,L=1,_=0,B=0;let H=!1,W=!1;const G=new Map;async function J(e){if(!H){if(W)return new Promise((e=>{const t=setInterval((()=>{H&&(clearInterval(t),e())}),100)}));W=!0,await(0,g.loadEmittersPlugin)(e,!1),await(0,I.loadMotionPlugin)(e,!1),await(0,P.loadCardsShape)(e,!1),await(0,O.loadHeartShape)(e,!1),await(0,z.loadImageShape)(e,!1),await(0,k.loadPolygonShape)(e,!1),await(0,C.loadSquareShape)(e,!1),await(0,D.loadStarShape)(e,!1),await(0,j.loadEmojiShape)(e,!1),await(0,V.loadRotateUpdater)(e,!1),await(0,M.loadLifeUpdater)(e,!1),await(0,R.loadRollUpdater)(e,!1),await(0,E.loadTiltUpdater)(e,!1),await(0,F.loadWobbleUpdater)(e,!1),await(0,S.loadBasic)(e),W=!1,H=!0}}async function K(e){const t=new q;let i;t.load(e.options);const a=t.ticks*b.millisecondsToSeconds/(3.6*b.millisecondsToSeconds*120);if(G.has(e.id)&&(i=G.get(e.id),i&&!i.destroyed)){const e=i;if(e.addEmitter)return void await e.addEmitter({startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:t.colors},shape:{type:t.shapes,options:t.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min"}},size:{value:U*t.scalar},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},gravity:{acceleration:t.gravity*T},speed:t.startVelocity*A,decay:L-t.decay,direction:-t.angle},rotate:{value:t.flat?_:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?B:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}}})}const s={fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:t.colors},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min"}},size:{value:U*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:t.gravity*T},speed:t.startVelocity*A,decay:L-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:t.flat?_:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?B:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return i=await b.tsParticles.load({id:e.id,element:e.canvas,options:s}),G.set(e.id,i),i}async function N(e,t){let i,a;return await J(b.tsParticles),(0,b.isString)(e)?(a=e,i=t??{}):(a="confetti",i=e),K({id:a,options:i})}return N.create=async(e,t)=>{if(!e)return N;await J(b.tsParticles);const i=e.getAttribute("id")??"confetti";return e.setAttribute("id",i),async(a,s)=>{let r,o;return(0,b.isString)(a)?(o=a,r=s??t):(o=i,r=a),K({id:o,canvas:e,options:r})}},N.init=async()=>{await J(b.tsParticles)},N.version=b.tsParticles.version,(0,b.isSsr)()||(window.confetti=N),x})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-emitters","@tsparticles/basic","@tsparticles/shape-cards","@tsparticles/shape-emoji","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,p,d,c,u,h,f,m)=>(()=>{var y={145:e=>{e.exports=i},303:t=>{t.exports=e},526:e=>{e.exports=t},235:e=>{e.exports=l},720:e=>{e.exports=a},109:e=>{e.exports=s},899:e=>{e.exports=r},162:e=>{e.exports=o},73:e=>{e.exports=p},400:e=>{e.exports=u},29:e=>{e.exports=h},75:e=>{e.exports=n},544:e=>{e.exports=d},668:e=>{e.exports=c},844:e=>{e.exports=f},238:e=>{e.exports=m}},v={};function w(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={exports:{}};return y[e](i,i.exports,w),i.exports}w.d=(e,t)=>{for(var i in t)w.o(t,i)&&!w.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};w.r(x),w.d(x,{confetti:()=>K});var b=w(303),g=w(526);class q{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/b.percentDenominator,y:this.position.y/b.percentDenominator}}set origin(e){this.position.x=e.x*b.percentDenominator,this.position.y=e.y*b.percentDenominator}get particleCount(){return this.count}set particleCount(e){this.count=e}load(e){if((0,b.isNull)(e))return;void 0!==e.angle&&(this.angle=e.angle);const t=e.count??e.particleCount;void 0!==t&&(this.count=t),void 0!==e.spread&&(this.spread=e.spread),void 0!==e.startVelocity&&(this.startVelocity=e.startVelocity),void 0!==e.decay&&(this.decay=e.decay),void 0!==e.flat&&(this.flat=e.flat),void 0!==e.gravity&&(this.gravity=e.gravity),void 0!==e.drift&&(this.drift=e.drift),void 0!==e.ticks&&(this.ticks=e.ticks);const i=e.origin;i&&!e.position&&(e.position={x:void 0!==i.x?i.x*b.percentDenominator:void 0,y:void 0!==i.y?i.y*b.percentDenominator:void 0});const a=e.position;a&&(void 0!==a.x&&(this.position.x=a.x),void 0!==a.y&&(this.position.y=a.y)),void 0!==e.colors&&((0,b.isArray)(e.colors)?this.colors=[...e.colors]:this.colors=e.colors);const s=e.shapeOptions;if(void 0!==s)for(const e in s){const t=s[e];t&&(this.shapeOptions[e]=(0,b.deepExtend)(this.shapeOptions[e]??{},t))}void 0!==e.shapes&&((0,b.isArray)(e.shapes)?this.shapes=[...e.shapes]:this.shapes=e.shapes),void 0!==e.scalar&&(this.scalar=e.scalar),void 0!==e.zIndex&&(this.zIndex=e.zIndex),void 0!==e.disableForReducedMotion&&(this.disableForReducedMotion=e.disableForReducedMotion)}}var S=w(145),P=w(720),j=w(109),O=w(899),z=w(162),M=w(75),I=w(235),k=w(73),R=w(544),V=w(668),C=w(400),D=w(29),E=w(844),F=w(238);const T=9.81,U=5,A=3,L=1,_=0,B=0;let H=!1,N=!1;const W=new Map;async function G(e){if(!H){if(N)return new Promise((e=>{const t=setInterval((()=>{H&&(clearInterval(t),e())}),100)}));N=!0,await(0,g.loadEmittersPlugin)(e,!1),await(0,I.loadMotionPlugin)(e,!1),await(0,P.loadCardsShape)(e,!1),await(0,O.loadHeartShape)(e,!1),await(0,z.loadImageShape)(e,!1),await(0,k.loadPolygonShape)(e,!1),await(0,C.loadSquareShape)(e,!1),await(0,D.loadStarShape)(e,!1),await(0,j.loadEmojiShape)(e,!1),await(0,V.loadRotateUpdater)(e,!1),await(0,M.loadLifeUpdater)(e,!1),await(0,R.loadRollUpdater)(e,!1),await(0,E.loadTiltUpdater)(e,!1),await(0,F.loadWobbleUpdater)(e,!1),await(0,S.loadBasic)(e),N=!1,H=!0}}async function J(e){const t=new q;let i;t.load(e.options);const a=t.ticks*b.millisecondsToSeconds/(3.6*b.millisecondsToSeconds*120);if(W.has(e.id)&&(i=W.get(e.id),i&&!i.destroyed)){const e=i;if(e.addEmitter)return void await e.addEmitter({startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:t.colors},shape:{type:t.shapes,options:t.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min"}},size:{value:U*t.scalar},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},gravity:{acceleration:t.gravity*T},speed:t.startVelocity*A,decay:L-t.decay,direction:-t.angle},rotate:{value:t.flat?_:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?B:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}}})}const s={fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:t.colors},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min"}},size:{value:U*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:t.gravity*T},speed:t.startVelocity*A,decay:L-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:t.flat?_:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?B:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return i=await b.tsParticles.load({id:e.id,element:e.canvas,options:s}),W.set(e.id,i),i}async function K(e,t){let i,a;return await G(b.tsParticles),(0,b.isString)(e)?(a=e,i=t??{}):(a="confetti",i=e),J({id:a,options:i})}return K.create=async(e,t)=>{if(!e)return K;await G(b.tsParticles);const i=e.getAttribute("id")??"confetti";return e.setAttribute("id",i),async(a,s)=>{let r,o;return(0,b.isString)(a)?(o=a,r=s??t):(o=i,r=a),J({id:o,canvas:e,options:r})}},K.init=async()=>{await G(b.tsParticles)},K.version=b.tsParticles.version,(0,b.isSsr)()||(window.confetti=K),x})()));
@@ -1 +1 @@
1
- /*! tsParticles Confetti v3.6.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Confetti v3.6.0 by Matteo Bruni */
@@ -50,7 +50,7 @@
50
50
  this.count = value;
51
51
  }
52
52
  load(data) {
53
- if (!data) {
53
+ if ((0, engine_1.isNull)(data)) {
54
54
  return;
55
55
  }
56
56
  if (data.angle !== undefined) {