1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | (function webpackUniversalModuleDefinition(root, factory) {
|
10 | if(typeof exports === 'object' && typeof module === 'object')
|
11 | module.exports = factory(require("tsparticles-engine"), require("tsparticles-basic"), require("tsparticles-shape-cards"), require("tsparticles-plugin-emitters"), 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-shape-text"), require("tsparticles-updater-tilt"), require("tsparticles-updater-wobble"));
|
12 | else if(typeof define === 'function' && define.amd)
|
13 | define(["tsparticles-engine", "tsparticles-basic", "tsparticles-shape-cards", "tsparticles-plugin-emitters", "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-shape-text", "tsparticles-updater-tilt", "tsparticles-updater-wobble"], factory);
|
14 | else {
|
15 | var a = typeof exports === 'object' ? factory(require("tsparticles-engine"), require("tsparticles-basic"), require("tsparticles-shape-cards"), require("tsparticles-plugin-emitters"), 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-shape-text"), require("tsparticles-updater-tilt"), require("tsparticles-updater-wobble")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
16 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
17 | }
|
18 | })(this, (__WEBPACK_EXTERNAL_MODULE__961__, __WEBPACK_EXTERNAL_MODULE__477__, __WEBPACK_EXTERNAL_MODULE__522__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__516__, __WEBPACK_EXTERNAL_MODULE__520__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__255__, __WEBPACK_EXTERNAL_MODULE__841__, __WEBPACK_EXTERNAL_MODULE__852__, __WEBPACK_EXTERNAL_MODULE__389__, __WEBPACK_EXTERNAL_MODULE__860__, __WEBPACK_EXTERNAL_MODULE__208__, __WEBPACK_EXTERNAL_MODULE__706__, __WEBPACK_EXTERNAL_MODULE__95__, __WEBPACK_EXTERNAL_MODULE__585__) => {
|
19 | return (() => {
|
20 | "use strict";
|
21 | var __webpack_modules__ = ({
|
22 |
|
23 | 477:
|
24 | ((module) => {
|
25 |
|
26 | module.exports = __WEBPACK_EXTERNAL_MODULE__477__;
|
27 |
|
28 | }),
|
29 |
|
30 | 961:
|
31 | ((module) => {
|
32 |
|
33 | module.exports = __WEBPACK_EXTERNAL_MODULE__961__;
|
34 |
|
35 | }),
|
36 |
|
37 | 716:
|
38 | ((module) => {
|
39 |
|
40 | module.exports = __WEBPACK_EXTERNAL_MODULE__716__;
|
41 |
|
42 | }),
|
43 |
|
44 | 255:
|
45 | ((module) => {
|
46 |
|
47 | module.exports = __WEBPACK_EXTERNAL_MODULE__255__;
|
48 |
|
49 | }),
|
50 |
|
51 | 522:
|
52 | ((module) => {
|
53 |
|
54 | module.exports = __WEBPACK_EXTERNAL_MODULE__522__;
|
55 |
|
56 | }),
|
57 |
|
58 | 516:
|
59 | ((module) => {
|
60 |
|
61 | module.exports = __WEBPACK_EXTERNAL_MODULE__516__;
|
62 |
|
63 | }),
|
64 |
|
65 | 520:
|
66 | ((module) => {
|
67 |
|
68 | module.exports = __WEBPACK_EXTERNAL_MODULE__520__;
|
69 |
|
70 | }),
|
71 |
|
72 | 841:
|
73 | ((module) => {
|
74 |
|
75 | module.exports = __WEBPACK_EXTERNAL_MODULE__841__;
|
76 |
|
77 | }),
|
78 |
|
79 | 860:
|
80 | ((module) => {
|
81 |
|
82 | module.exports = __WEBPACK_EXTERNAL_MODULE__860__;
|
83 |
|
84 | }),
|
85 |
|
86 | 208:
|
87 | ((module) => {
|
88 |
|
89 | module.exports = __WEBPACK_EXTERNAL_MODULE__208__;
|
90 |
|
91 | }),
|
92 |
|
93 | 706:
|
94 | ((module) => {
|
95 |
|
96 | module.exports = __WEBPACK_EXTERNAL_MODULE__706__;
|
97 |
|
98 | }),
|
99 |
|
100 | 86:
|
101 | ((module) => {
|
102 |
|
103 | module.exports = __WEBPACK_EXTERNAL_MODULE__86__;
|
104 |
|
105 | }),
|
106 |
|
107 | 852:
|
108 | ((module) => {
|
109 |
|
110 | module.exports = __WEBPACK_EXTERNAL_MODULE__852__;
|
111 |
|
112 | }),
|
113 |
|
114 | 389:
|
115 | ((module) => {
|
116 |
|
117 | module.exports = __WEBPACK_EXTERNAL_MODULE__389__;
|
118 |
|
119 | }),
|
120 |
|
121 | 95:
|
122 | ((module) => {
|
123 |
|
124 | module.exports = __WEBPACK_EXTERNAL_MODULE__95__;
|
125 |
|
126 | }),
|
127 |
|
128 | 585:
|
129 | ((module) => {
|
130 |
|
131 | module.exports = __WEBPACK_EXTERNAL_MODULE__585__;
|
132 |
|
133 | })
|
134 |
|
135 | });
|
136 |
|
137 |
|
138 | var __webpack_module_cache__ = {};
|
139 |
|
140 |
|
141 | function __webpack_require__(moduleId) {
|
142 |
|
143 | var cachedModule = __webpack_module_cache__[moduleId];
|
144 | if (cachedModule !== undefined) {
|
145 | return cachedModule.exports;
|
146 | }
|
147 |
|
148 | var module = __webpack_module_cache__[moduleId] = {
|
149 |
|
150 |
|
151 | exports: {}
|
152 | };
|
153 |
|
154 |
|
155 | __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
156 |
|
157 |
|
158 | return module.exports;
|
159 | }
|
160 |
|
161 |
|
162 |
|
163 | (() => {
|
164 |
|
165 | __webpack_require__.d = (exports, definition) => {
|
166 | for(var key in definition) {
|
167 | if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
168 | Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
169 | }
|
170 | }
|
171 | };
|
172 | })();
|
173 |
|
174 |
|
175 | (() => {
|
176 | __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
177 | })();
|
178 |
|
179 |
|
180 | (() => {
|
181 |
|
182 | __webpack_require__.r = (exports) => {
|
183 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
184 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
185 | }
|
186 | Object.defineProperty(exports, '__esModule', { value: true });
|
187 | };
|
188 | })();
|
189 |
|
190 |
|
191 | var __webpack_exports__ = {};
|
192 |
|
193 | (() => {
|
194 |
|
195 | __webpack_require__.r(__webpack_exports__);
|
196 |
|
197 |
|
198 | __webpack_require__.d(__webpack_exports__, {
|
199 | confetti: () => ( confetti)
|
200 | });
|
201 |
|
202 |
|
203 | var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(961);
|
204 | ;
|
205 |
|
206 | class ConfettiOptions {
|
207 | constructor() {
|
208 | this.angle = 90;
|
209 | this.count = 50;
|
210 | this.spread = 45;
|
211 | this.startVelocity = 45;
|
212 | this.decay = 0.9;
|
213 | this.gravity = 1;
|
214 | this.drift = 0;
|
215 | this.ticks = 200;
|
216 | this.position = {
|
217 | x: 50,
|
218 | y: 50
|
219 | };
|
220 | this.colors = ["#26ccff", "#a25afd", "#ff5e7e", "#88ff5a", "#fcff42", "#ffa62d", "#ff36ff"];
|
221 | this.shapes = ["square", "circle"];
|
222 | this.scalar = 1;
|
223 | this.zIndex = 100;
|
224 | this.disableForReducedMotion = true;
|
225 | this.shapeOptions = {};
|
226 | }
|
227 | get origin() {
|
228 | return {
|
229 | x: this.position.x / 100,
|
230 | y: this.position.y / 100
|
231 | };
|
232 | }
|
233 | set origin(value) {
|
234 | this.position.x = value.x * 100;
|
235 | this.position.y = value.y * 100;
|
236 | }
|
237 | get particleCount() {
|
238 | return this.count;
|
239 | }
|
240 | set particleCount(value) {
|
241 | this.count = value;
|
242 | }
|
243 | load(data) {
|
244 | if (!data) {
|
245 | return;
|
246 | }
|
247 | if (data.angle !== undefined) {
|
248 | this.angle = data.angle;
|
249 | }
|
250 | const count = data.count ?? data.particleCount;
|
251 | if (count !== undefined) {
|
252 | this.count = count;
|
253 | }
|
254 | if (data.spread !== undefined) {
|
255 | this.spread = data.spread;
|
256 | }
|
257 | if (data.startVelocity !== undefined) {
|
258 | this.startVelocity = data.startVelocity;
|
259 | }
|
260 | if (data.decay !== undefined) {
|
261 | this.decay = data.decay;
|
262 | }
|
263 | if (data.gravity !== undefined) {
|
264 | this.gravity = data.gravity;
|
265 | }
|
266 | if (data.drift !== undefined) {
|
267 | this.drift = data.drift;
|
268 | }
|
269 | if (data.ticks !== undefined) {
|
270 | this.ticks = data.ticks;
|
271 | }
|
272 | const origin = data.origin;
|
273 | if (origin && !data.position) {
|
274 | data.position = {
|
275 | x: origin.x !== undefined ? origin.x * 100 : undefined,
|
276 | y: origin.y !== undefined ? origin.y * 100 : undefined
|
277 | };
|
278 | }
|
279 | const position = data.position;
|
280 | if (position) {
|
281 | if (position.x !== undefined) {
|
282 | this.position.x = position.x;
|
283 | }
|
284 | if (position.y !== undefined) {
|
285 | this.position.y = position.y;
|
286 | }
|
287 | }
|
288 | if (data.colors !== undefined) {
|
289 | if ((0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.isArray)(data.colors)) {
|
290 | this.colors = [...data.colors];
|
291 | } else {
|
292 | this.colors = data.colors;
|
293 | }
|
294 | }
|
295 | const options = data.shapeOptions;
|
296 | if (options !== undefined) {
|
297 | for (const shape in options) {
|
298 | const item = options[shape];
|
299 | if (item) {
|
300 | this.shapeOptions[shape] = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.deepExtend)(this.shapeOptions[shape] ?? {}, item);
|
301 | }
|
302 | }
|
303 | }
|
304 | if (data.shapes !== undefined) {
|
305 | if ((0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.isArray)(data.shapes)) {
|
306 | this.shapes = [...data.shapes];
|
307 | } else {
|
308 | this.shapes = data.shapes;
|
309 | }
|
310 | }
|
311 | if (data.scalar !== undefined) {
|
312 | this.scalar = data.scalar;
|
313 | }
|
314 | if (data.zIndex !== undefined) {
|
315 | this.zIndex = data.zIndex;
|
316 | }
|
317 | if (data.disableForReducedMotion !== undefined) {
|
318 | this.disableForReducedMotion = data.disableForReducedMotion;
|
319 | }
|
320 | }
|
321 | }
|
322 |
|
323 | var external_commonjs_tsparticles_basic_commonjs2_tsparticles_basic_amd_tsparticles_basic_root_window_ = __webpack_require__(477);
|
324 |
|
325 | var external_commonjs_tsparticles_shape_cards_commonjs2_tsparticles_shape_cards_amd_tsparticles_shape_cards_root_window_ = __webpack_require__(522);
|
326 |
|
327 | var external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_ = __webpack_require__(716);
|
328 |
|
329 | var external_commonjs_tsparticles_shape_heart_commonjs2_tsparticles_shape_heart_amd_tsparticles_shape_heart_root_window_ = __webpack_require__(516);
|
330 |
|
331 | var external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_ = __webpack_require__(520);
|
332 |
|
333 | var external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_ = __webpack_require__(86);
|
334 |
|
335 | var external_commonjs_tsparticles_plugin_motion_commonjs2_tsparticles_plugin_motion_amd_tsparticles_plugin_motion_root_window_ = __webpack_require__(255);
|
336 |
|
337 | var external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_ = __webpack_require__(841);
|
338 |
|
339 | var external_commonjs_tsparticles_updater_roll_commonjs2_tsparticles_updater_roll_amd_tsparticles_updater_roll_root_window_ = __webpack_require__(852);
|
340 |
|
341 | var external_commonjs_tsparticles_updater_rotate_commonjs2_tsparticles_updater_rotate_amd_tsparticles_updater_rotate_root_window_ = __webpack_require__(389);
|
342 |
|
343 | var external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_ = __webpack_require__(860);
|
344 |
|
345 | var external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_ = __webpack_require__(208);
|
346 |
|
347 | var external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_ = __webpack_require__(706);
|
348 |
|
349 | var external_commonjs_tsparticles_updater_tilt_commonjs2_tsparticles_updater_tilt_amd_tsparticles_updater_tilt_root_window_ = __webpack_require__(95);
|
350 |
|
351 | var external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_wobble_amd_tsparticles_updater_wobble_root_window_ = __webpack_require__(585);
|
352 | ;
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 | let initialized = false;
|
371 | let initializing = false;
|
372 | const ids = new Map();
|
373 | async function initPlugins(engine) {
|
374 | if (initialized) {
|
375 | return;
|
376 | }
|
377 | if (initializing) {
|
378 | return new Promise(resolve => {
|
379 | const interval = setInterval(() => {
|
380 | if (!initialized) {
|
381 | return;
|
382 | }
|
383 | clearInterval(interval);
|
384 | resolve();
|
385 | }, 100);
|
386 | });
|
387 | }
|
388 | initializing = true;
|
389 | await (0,external_commonjs_tsparticles_basic_commonjs2_tsparticles_basic_amd_tsparticles_basic_root_window_.loadBasic)(engine);
|
390 | await (0,external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_.loadEmittersPlugin)(engine);
|
391 | await (0,external_commonjs_tsparticles_plugin_motion_commonjs2_tsparticles_plugin_motion_amd_tsparticles_plugin_motion_root_window_.loadMotionPlugin)(engine);
|
392 | await (0,external_commonjs_tsparticles_shape_cards_commonjs2_tsparticles_shape_cards_amd_tsparticles_shape_cards_root_window_.loadCardsShape)(engine);
|
393 | await (0,external_commonjs_tsparticles_shape_heart_commonjs2_tsparticles_shape_heart_amd_tsparticles_shape_heart_root_window_.loadHeartShape)(engine);
|
394 | await (0,external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_.loadImageShape)(engine);
|
395 | await (0,external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_.loadPolygonShape)(engine);
|
396 | await (0,external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_.loadSquareShape)(engine);
|
397 | await (0,external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_.loadStarShape)(engine);
|
398 | await (0,external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_.loadTextShape)(engine);
|
399 | await (0,external_commonjs_tsparticles_updater_rotate_commonjs2_tsparticles_updater_rotate_amd_tsparticles_updater_rotate_root_window_.loadRotateUpdater)(engine);
|
400 | await (0,external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_.loadLifeUpdater)(engine);
|
401 | await (0,external_commonjs_tsparticles_updater_roll_commonjs2_tsparticles_updater_roll_amd_tsparticles_updater_roll_root_window_.loadRollUpdater)(engine);
|
402 | await (0,external_commonjs_tsparticles_updater_tilt_commonjs2_tsparticles_updater_tilt_amd_tsparticles_updater_tilt_root_window_.loadTiltUpdater)(engine);
|
403 | await (0,external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_wobble_amd_tsparticles_updater_wobble_root_window_.loadWobbleUpdater)(engine);
|
404 | initializing = false;
|
405 | initialized = true;
|
406 | }
|
407 | async function setConfetti(params) {
|
408 | const actualOptions = new ConfettiOptions();
|
409 | actualOptions.load(params.options);
|
410 | let container;
|
411 | const fpsLimit = 120,
|
412 | opacitySpeed = actualOptions.ticks * 1000 / (3600 * fpsLimit);
|
413 | if (ids.has(params.id)) {
|
414 | container = ids.get(params.id);
|
415 | if (container && !container.destroyed) {
|
416 | const alias = container;
|
417 | if (alias.addEmitter) {
|
418 | alias.addEmitter({
|
419 | startCount: actualOptions.count,
|
420 | position: actualOptions.position,
|
421 | size: {
|
422 | width: 0,
|
423 | height: 0
|
424 | },
|
425 | rate: {
|
426 | delay: 0,
|
427 | quantity: 0
|
428 | },
|
429 | life: {
|
430 | duration: 0.1,
|
431 | count: 1
|
432 | },
|
433 | particles: {
|
434 | color: {
|
435 | value: actualOptions.colors
|
436 | },
|
437 | shape: {
|
438 | type: actualOptions.shapes,
|
439 | options: actualOptions.shapeOptions
|
440 | },
|
441 | life: {
|
442 | count: 1
|
443 | },
|
444 | opacity: {
|
445 | value: {
|
446 | min: 0,
|
447 | max: 1
|
448 | },
|
449 | animation: {
|
450 | enable: true,
|
451 | sync: true,
|
452 | speed: opacitySpeed,
|
453 | startValue: "max",
|
454 | destroy: "min"
|
455 | }
|
456 | },
|
457 | size: {
|
458 | value: 5 * actualOptions.scalar
|
459 | },
|
460 | move: {
|
461 | angle: {
|
462 | value: actualOptions.spread,
|
463 | offset: 0
|
464 | },
|
465 | drift: {
|
466 | min: -actualOptions.drift,
|
467 | max: actualOptions.drift
|
468 | },
|
469 | gravity: {
|
470 | acceleration: actualOptions.gravity * 9.81
|
471 | },
|
472 | speed: actualOptions.startVelocity * 3,
|
473 | decay: 1 - actualOptions.decay,
|
474 | direction: -actualOptions.angle
|
475 | }
|
476 | }
|
477 | });
|
478 | return;
|
479 | }
|
480 | }
|
481 | }
|
482 | const particlesOptions = {
|
483 | fullScreen: {
|
484 | enable: !params.canvas,
|
485 | zIndex: actualOptions.zIndex
|
486 | },
|
487 | fpsLimit: 120,
|
488 | particles: {
|
489 | number: {
|
490 | value: 0
|
491 | },
|
492 | color: {
|
493 | value: actualOptions.colors
|
494 | },
|
495 | shape: {
|
496 | type: actualOptions.shapes,
|
497 | options: actualOptions.shapeOptions
|
498 | },
|
499 | opacity: {
|
500 | value: {
|
501 | min: 0,
|
502 | max: 1
|
503 | },
|
504 | animation: {
|
505 | enable: true,
|
506 | sync: true,
|
507 | speed: opacitySpeed,
|
508 | startValue: "max",
|
509 | destroy: "min"
|
510 | }
|
511 | },
|
512 | size: {
|
513 | value: 5 * actualOptions.scalar
|
514 | },
|
515 | links: {
|
516 | enable: false
|
517 | },
|
518 | life: {
|
519 | count: 1
|
520 | },
|
521 | move: {
|
522 | angle: {
|
523 | value: actualOptions.spread,
|
524 | offset: 0
|
525 | },
|
526 | drift: {
|
527 | min: -actualOptions.drift,
|
528 | max: actualOptions.drift
|
529 | },
|
530 | enable: true,
|
531 | gravity: {
|
532 | enable: true,
|
533 | acceleration: actualOptions.gravity * 9.81
|
534 | },
|
535 | speed: actualOptions.startVelocity * 3,
|
536 | decay: 1 - actualOptions.decay,
|
537 | direction: -actualOptions.angle,
|
538 | random: true,
|
539 | straight: false,
|
540 | outModes: {
|
541 | default: "none",
|
542 | bottom: "destroy"
|
543 | }
|
544 | },
|
545 | rotate: {
|
546 | value: {
|
547 | min: 0,
|
548 | max: 360
|
549 | },
|
550 | direction: "random",
|
551 | animation: {
|
552 | enable: true,
|
553 | speed: 60
|
554 | }
|
555 | },
|
556 | tilt: {
|
557 | direction: "random",
|
558 | enable: true,
|
559 | value: {
|
560 | min: 0,
|
561 | max: 360
|
562 | },
|
563 | animation: {
|
564 | enable: true,
|
565 | speed: 60
|
566 | }
|
567 | },
|
568 | roll: {
|
569 | darken: {
|
570 | enable: true,
|
571 | value: 25
|
572 | },
|
573 | enable: true,
|
574 | speed: {
|
575 | min: 15,
|
576 | max: 25
|
577 | }
|
578 | },
|
579 | wobble: {
|
580 | distance: 30,
|
581 | enable: true,
|
582 | speed: {
|
583 | min: -15,
|
584 | max: 15
|
585 | }
|
586 | }
|
587 | },
|
588 | detectRetina: true,
|
589 | motion: {
|
590 | disable: actualOptions.disableForReducedMotion
|
591 | },
|
592 | emitters: {
|
593 | name: "confetti",
|
594 | startCount: actualOptions.count,
|
595 | position: actualOptions.position,
|
596 | size: {
|
597 | width: 0,
|
598 | height: 0
|
599 | },
|
600 | rate: {
|
601 | delay: 0,
|
602 | quantity: 0
|
603 | },
|
604 | life: {
|
605 | duration: 0.1,
|
606 | count: 1
|
607 | }
|
608 | }
|
609 | };
|
610 | container = await external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles.load({
|
611 | id: params.id,
|
612 | element: params.canvas,
|
613 | options: particlesOptions
|
614 | });
|
615 | ids.set(params.id, container);
|
616 | return container;
|
617 | }
|
618 | async function confetti(idOrOptions, confettiOptions) {
|
619 | await initPlugins(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
620 | let options;
|
621 | let id;
|
622 | if ((0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.isString)(idOrOptions)) {
|
623 | id = idOrOptions;
|
624 | options = confettiOptions ?? {};
|
625 | } else {
|
626 | id = "confetti";
|
627 | options = idOrOptions;
|
628 | }
|
629 | return setConfetti({
|
630 | id,
|
631 | options
|
632 | });
|
633 | }
|
634 | confetti.create = async (canvas, options) => {
|
635 | if (!canvas) {
|
636 | return confetti;
|
637 | }
|
638 | await initPlugins(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
639 | const id = canvas.getAttribute("id") || "confetti";
|
640 | canvas.setAttribute("id", id);
|
641 | return async (idOrOptions, confettiOptions) => {
|
642 | let subOptions;
|
643 | let subId;
|
644 | if ((0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.isString)(idOrOptions)) {
|
645 | subId = idOrOptions;
|
646 | subOptions = confettiOptions ?? options;
|
647 | } else {
|
648 | subId = id;
|
649 | subOptions = idOrOptions;
|
650 | }
|
651 | return setConfetti({
|
652 | id: subId,
|
653 | canvas,
|
654 | options: subOptions
|
655 | });
|
656 | };
|
657 | };
|
658 | confetti.version = external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles.version;
|
659 | if (!(0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.isSsr)()) {
|
660 | window.confetti = confetti;
|
661 | }
|
662 | ;
|
663 |
|
664 | })();
|
665 |
|
666 | return __webpack_exports__;
|
667 | })()
|
668 | ;
|
669 | }); |
\ | No newline at end of file |