@tsparticles/confetti 4.0.0-beta.8 → 4.0.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.
Files changed (166) hide show
  1. package/README.md +106 -107
  2. package/browser/ConfettiParams.js +1 -0
  3. package/browser/browser.js +5 -0
  4. package/browser/bundle.js +4 -0
  5. package/browser/confetti.js +37 -302
  6. package/browser/confetti.lazy.js +96 -0
  7. package/browser/index.lazy.js +1 -0
  8. package/browser/types.js +1 -0
  9. package/browser/utils.js +279 -0
  10. package/cjs/ConfettiParams.js +1 -0
  11. package/cjs/browser.js +5 -0
  12. package/cjs/bundle.js +4 -0
  13. package/cjs/confetti.js +37 -302
  14. package/cjs/confetti.lazy.js +96 -0
  15. package/cjs/index.lazy.js +1 -0
  16. package/cjs/types.js +1 -0
  17. package/cjs/utils.js +279 -0
  18. package/esm/ConfettiParams.js +1 -0
  19. package/esm/browser.js +5 -0
  20. package/esm/bundle.js +4 -0
  21. package/esm/confetti.js +37 -302
  22. package/esm/confetti.lazy.js +96 -0
  23. package/esm/index.lazy.js +1 -0
  24. package/esm/types.js +1 -0
  25. package/esm/utils.js +279 -0
  26. package/package.json +24 -17
  27. package/report.html +4949 -94
  28. package/tsparticles.confetti.bundle.js +9847 -977
  29. package/tsparticles.confetti.bundle.min.js +1 -2
  30. package/tsparticles.confetti.js +512 -322
  31. package/tsparticles.confetti.min.js +1 -1
  32. package/types/ConfettiParams.d.ts +7 -0
  33. package/types/browser.d.ts +1 -0
  34. package/types/confetti.d.ts +3 -10
  35. package/types/confetti.lazy.d.ts +16 -0
  36. package/types/index.d.ts +1 -0
  37. package/types/index.lazy.d.ts +5 -0
  38. package/types/types.d.ts +4 -0
  39. package/types/utils.d.ts +7 -0
  40. package/1080.min.js +0 -1
  41. package/1241.min.js +0 -1
  42. package/1336.min.js +0 -1
  43. package/1581.min.js +0 -1
  44. package/1583.min.js +0 -1
  45. package/1712.min.js +0 -1
  46. package/1723.min.js +0 -1
  47. package/189.min.js +0 -1
  48. package/2066.min.js +0 -1
  49. package/2127.min.js +0 -1
  50. package/2182.min.js +0 -1
  51. package/2270.min.js +0 -1
  52. package/2528.min.js +0 -1
  53. package/2602.min.js +0 -1
  54. package/2760.min.js +0 -1
  55. package/3047.min.js +0 -1
  56. package/3073.min.js +0 -1
  57. package/3443.min.js +0 -1
  58. package/3583.min.js +0 -1
  59. package/374.min.js +0 -1
  60. package/382.min.js +0 -1
  61. package/404.min.js +0 -1
  62. package/4067.min.js +0 -1
  63. package/4068.min.js +0 -1
  64. package/4077.min.js +0 -1
  65. package/4086.min.js +0 -1
  66. package/4186.min.js +0 -1
  67. package/4217.min.js +0 -1
  68. package/4427.min.js +0 -1
  69. package/4519.min.js +0 -1
  70. package/4626.min.js +0 -1
  71. package/4657.min.js +0 -1
  72. package/5048.min.js +0 -1
  73. package/5294.min.js +0 -1
  74. package/5344.min.js +0 -1
  75. package/5601.min.js +0 -1
  76. package/6055.min.js +0 -1
  77. package/6171.min.js +0 -1
  78. package/6192.min.js +0 -1
  79. package/6265.min.js +0 -1
  80. package/6466.min.js +0 -1
  81. package/648.min.js +0 -1
  82. package/6943.min.js +0 -1
  83. package/6957.min.js +0 -1
  84. package/6972.min.js +0 -1
  85. package/6996.min.js +0 -1
  86. package/7162.min.js +0 -1
  87. package/7175.min.js +0 -1
  88. package/7213.min.js +0 -1
  89. package/7259.min.js +0 -1
  90. package/7316.min.js +0 -1
  91. package/7711.min.js +0 -1
  92. package/7757.min.js +0 -1
  93. package/7775.min.js +0 -1
  94. package/8204.min.js +0 -1
  95. package/8630.min.js +0 -1
  96. package/8731.min.js +0 -1
  97. package/8855.min.js +0 -1
  98. package/9674.min.js +0 -1
  99. package/9726.min.js +0 -1
  100. package/980.min.js +0 -1
  101. package/9835.min.js +0 -1
  102. package/9907.min.js +0 -1
  103. package/basic_dist_browser_index_js.js +0 -30
  104. package/engine_dist_browser_Core_Container_js.js +0 -100
  105. package/plugins_colors_hex_dist_browser_HexColorManager_js.js +0 -30
  106. package/plugins_colors_hex_dist_browser_index_js.js +0 -30
  107. package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +0 -30
  108. package/plugins_colors_hsl_dist_browser_index_js.js +0 -30
  109. package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +0 -30
  110. package/plugins_colors_rgb_dist_browser_index_js.js +0 -30
  111. package/plugins_emitters_dist_browser_EmitterInstance_js.js +0 -30
  112. package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +0 -100
  113. package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +0 -30
  114. package/plugins_emitters_dist_browser_EmittersPlugin_js.js +0 -100
  115. package/plugins_emitters_dist_browser_ShapeManager_js.js +0 -30
  116. package/plugins_emitters_dist_browser_addEmittersShapesManager_js.js +0 -30
  117. package/plugins_emitters_dist_browser_getEmittersInstancesManager_js.js +0 -30
  118. package/plugins_emitters_dist_browser_plugin_js.js +0 -50
  119. package/plugins_motion_dist_browser_MotionPluginInstance_js.js +0 -30
  120. package/plugins_motion_dist_browser_MotionPlugin_js.js +0 -50
  121. package/plugins_motion_dist_browser_index_js.js +0 -30
  122. package/plugins_move_dist_browser_MovePluginInstance_js.js +0 -40
  123. package/plugins_move_dist_browser_MovePlugin_js.js +0 -30
  124. package/plugins_move_dist_browser_index_js.js +0 -30
  125. package/shapes_cards_dist_browser_clubs_ClubDrawer_js.js +0 -30
  126. package/shapes_cards_dist_browser_diamonds_DiamondDrawer_js.js +0 -30
  127. package/shapes_cards_dist_browser_hearts_HeartDrawer_js.js +0 -30
  128. package/shapes_cards_dist_browser_paths_js.js +0 -70
  129. package/shapes_cards_dist_browser_spades_SpadeDrawer_js.js +0 -30
  130. package/shapes_cards_dist_browser_suits_js.js +0 -70
  131. package/shapes_circle_dist_browser_CircleDrawer_js.js +0 -40
  132. package/shapes_circle_dist_browser_index_js.js +0 -30
  133. package/shapes_emoji_dist_browser_EmojiDrawer_js.js +0 -50
  134. package/shapes_emoji_dist_browser_index_js.js +0 -40
  135. package/shapes_heart_dist_browser_HeartDrawer_js.js +0 -40
  136. package/shapes_heart_dist_browser_index_js.js +0 -30
  137. package/shapes_image_dist_browser_GifUtils_Utils_js.js +0 -70
  138. package/shapes_image_dist_browser_ImageDrawer_js.js +0 -30
  139. package/shapes_image_dist_browser_ImagePreloaderInstance_js.js +0 -30
  140. package/shapes_image_dist_browser_ImagePreloader_js.js +0 -40
  141. package/shapes_image_dist_browser_index_js.js +0 -40
  142. package/shapes_polygon_dist_browser_PolygonDrawer_js.js +0 -50
  143. package/shapes_polygon_dist_browser_TriangleDrawer_js.js +0 -50
  144. package/shapes_polygon_dist_browser_index_js.js +0 -30
  145. package/shapes_square_dist_browser_SquareDrawer_js.js +0 -40
  146. package/shapes_square_dist_browser_index_js.js +0 -30
  147. package/shapes_star_dist_browser_StarDrawer_js.js +0 -40
  148. package/shapes_star_dist_browser_index_js.js +0 -30
  149. package/updaters_fillColor_dist_browser_FillColorUpdater_js.js +0 -30
  150. package/updaters_fillColor_dist_browser_index_js.js +0 -30
  151. package/updaters_life_dist_browser_LifeUpdater_js.js +0 -70
  152. package/updaters_life_dist_browser_index_js.js +0 -30
  153. package/updaters_opacity_dist_browser_OpacityUpdater_js.js +0 -30
  154. package/updaters_opacity_dist_browser_index_js.js +0 -30
  155. package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +0 -80
  156. package/updaters_outModes_dist_browser_index_js.js +0 -30
  157. package/updaters_roll_dist_browser_RollUpdater_js.js +0 -70
  158. package/updaters_roll_dist_browser_index_js.js +0 -30
  159. package/updaters_rotate_dist_browser_RotateUpdater_js.js +0 -50
  160. package/updaters_rotate_dist_browser_index_js.js +0 -30
  161. package/updaters_size_dist_browser_SizeUpdater_js.js +0 -30
  162. package/updaters_size_dist_browser_index_js.js +0 -30
  163. package/updaters_tilt_dist_browser_TiltUpdater_js.js +0 -60
  164. package/updaters_tilt_dist_browser_index_js.js +0 -30
  165. package/updaters_wobble_dist_browser_WobbleUpdater_js.js +0 -60
  166. package/updaters_wobble_dist_browser_index_js.js +0 -30
@@ -1,2 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,()=>(()=>{"use strict";var e,t,i,a={5560(e,t,i){i.d(t,{$G:()=>L,$_:()=>F,$v:()=>U,$x:()=>O,BF:()=>eg,BW:()=>p,DN:()=>j,D_:()=>ed,Dv:()=>ec,Eo:()=>Q,Fl:()=>em,GW:()=>$,Ie:()=>V,JC:()=>Z,K3:()=>eo,L1:()=>A,LD:()=>er,MX:()=>l,NF:()=>o,Nu:()=>ep,Nx:()=>N,PZ:()=>W,Pf:()=>ew,R1:()=>v,RF:()=>x,RV:()=>G,Rq:()=>D,U0:()=>I,Ug:()=>u,WH:()=>Y,X$:()=>b,X_:()=>ee,Xu:()=>d,Zp:()=>P,a5:()=>r,aE:()=>ev,aZ:()=>m,bo:()=>c,ce:()=>y,dm:()=>M,dv:()=>J,eb:()=>a,eu:()=>E,gd:()=>f,hB:()=>k,hK:()=>eb,hv:()=>B,i8:()=>K,iU:()=>eu,iX:()=>z,jn:()=>ey,lA:()=>es,mR:()=>h,nK:()=>s,nq:()=>ei,oi:()=>R,ou:()=>et,rq:()=>w,tA:()=>el,tR:()=>ex,vF:()=>H,vS:()=>_,vd:()=>eh,w2:()=>q,wM:()=>ea,xH:()=>X,xd:()=>S,yj:()=>n,yx:()=>T,z$:()=>g,z9:()=>en,zg:()=>ef,zs:()=>C});let a="generated",n="source-over",o="resize",s="visibilitychange",r=100,l=.5,d=1e3,c={x:0,y:0,z:0},u={a:1,b:0,c:0,d:1},h="random",p="mid",f=2,v=2*Math.PI,g=60,m=1,y="true",b="false",x="canvas",w=0,M=2,z=100,S=1,O=1,P=1,k=1,R=255,_=360,E=100,F=100,A=0,T=0,I=60,V=0,L=.25,D=.75,$=0,C=1,q=0,G=1,B=1,Z=1,H=0,K=120,j=0,N=0,U=1e4,W=0,X=1,J=0,Y=1,Q=1,ee=0,et=0,ei=1,ea=0,en=0,eo=1,es=1,er=1,el=0,ed=1,ec=0,eu=1,eh=0,ep=3,ef=6,ev=1,eg=1,em=0,ey=0,eb=0,ex=0,ew=1},1045(e,t,i){i.d(t,{dg:()=>r,jl:()=>l,M_:()=>d}),(a=n||(n={})).circle="circle",a.rectangle="rectangle";var a,n,o=i(5286),s=i(5560);class r{position;type;constructor(e,t,i){this.position={x:e,y:t},this.type=i}_resetPosition(e,t){this.position.x=e,this.position.y=t}}class l extends r{radius;constructor(e,t,i){super(e,t,n.circle),this.radius=i}contains(e){return(0,o.gp)(e,this.position,this.radius)}intersects(e){let t=this.position,i=e.position,a=this.radius,o=Math.abs(i.x-t.x),r=Math.abs(i.y-t.y);if(e instanceof l||e.type===n.circle)return a+e.radius>Math.hypot(o,r);if(e instanceof d||e.type===n.rectangle){let{width:t,height:i}=e.size;return Math.pow(o-t,s.dm)+Math.pow(r-i,s.dm)<=a**s.dm||o<=a+t&&r<=a+i||o<=t||r<=i}return!1}reset(e,t,i){return this._resetPosition(e,t),this.radius=i,this}}class d extends r{size;constructor(e,t,i,a){super(e,t,n.rectangle),this.size={height:a,width:i}}contains(e){let t=this.size.width,i=this.size.height,a=this.position;return e.x>=a.x&&e.x<=a.x+t&&e.y>=a.y&&e.y<=a.y+i}intersects(e){if(e instanceof l)return e.intersects(this);if(!(e instanceof d))return!1;let t=this.size.width,i=this.size.height,a=this.position,n=e.position,o=e.size,s=o.width,r=o.height;return n.x<a.x+t&&n.x+s>a.x&&n.y<a.y+i&&n.y+r>a.y}reset(e,t,i,a){return this._resetPosition(e,t),this.size.width=i,this.size.height=a,this}}},6129(e,t,i){i.d(t,{M:()=>s,p:()=>o});var a=i(5560);function n(e){return"z"in e?e.z:a.bo.z}class o{x;y;z;constructor(e=a.bo.x,t=a.bo.y,i=a.bo.z){this.x=e,this.y=t,this.z=i}static get origin(){return o.create(a.bo.x,a.bo.y,a.bo.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this._updateFromAngle(e,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(e){this._updateFromAngle(this.angle,e)}static clone(e){return o.create(e.x,e.y,n(e))}static create(e,t,i){return"number"==typeof e?new o(e,t??a.bo.y,i??a.bo.z):new o(e.x,e.y,n(e))}add(e){return o.create(this.x+e.x,this.y+e.y,this.z+n(e))}addTo(e){this.x+=e.x,this.y+=e.y,this.z+=n(e)}copy(){return o.clone(this)}div(e){return o.create(this.x/e,this.y/e,this.z/e)}divTo(e){this.x/=e,this.y/=e,this.z/=e}getLengthSq(){return this.x**a.dm+this.y**a.dm}mult(e){return o.create(this.x*e,this.y*e,this.z*e)}multTo(e){this.x*=e,this.y*=e,this.z*=e}normalize(){let e=this.length;e!=a.dv&&this.multTo(a.hB/e)}rotate(e){return o.create(this.x*Math.cos(e)-this.y*Math.sin(e),this.x*Math.sin(e)+this.y*Math.cos(e),a.bo.z)}setTo(e){this.x=e.x,this.y=e.y,this.z=n(e)}sub(e){return o.create(this.x-e.x,this.y-e.y,this.z-n(e))}subFrom(e){this.x-=e.x,this.y-=e.y,this.z-=n(e)}_updateFromAngle(e,t){this.x=Math.cos(e)*t,this.y=Math.sin(e)*t}}class s extends o{constructor(e=a.bo.x,t=a.bo.y){super(e,t,a.bo.z)}static get origin(){return s.create(a.bo.x,a.bo.y)}static clone(e){return s.create(e.x,e.y)}static create(e,t){return"number"==typeof e?new s(e,t??a.bo.y):new s(e.x,e.y)}}},7662(e,t,i){var a,n;i.d(t,{H:()=>a}),(n=a||(a={})).increasing="increasing",n.decreasing="decreasing"},1907(e,t,i){var a,n;i.d(t,{F:()=>a}),(n=a||(a={})).bottom="bottom",n.bottomLeft="bottom-left",n.bottomRight="bottom-right",n.left="left",n.none="none",n.right="right",n.top="top",n.topLeft="top-left",n.topRight="top-right",n.outside="outside",n.inside="inside"},8545(e,t,i){var a,n;i.d(t,{v:()=>a}),(n=a||(a={})).bottom="bottom",n.left="left",n.right="right",n.top="top"},1668(e,t,i){var a,n;i.d(t,{g:()=>a}),(n=a||(a={})).auto="auto",n.increase="increase",n.decrease="decrease",n.random="random"},6101(e,t,i){var a,n;i.d(t,{d:()=>a}),(n=a||(a={})).delete="delete",n.wait="wait"},1946(e,t,i){var a,n;i.d(t,{Y:()=>a}),(n=a||(a={})).bounce="bounce",n.none="none",n.out="out",n.destroy="destroy",n.split="split"},5354(e,t,i){var a,n;i.d(t,{q:()=>a}),(n=a||(a={})).precise="precise",n.percent="percent"},3832(e,t,i){var a,n;i.d(t,{H:()=>a}),(n=a||(a={})).darken="darken",n.enlighten="enlighten"},9718(e,t,i){var a,n;i.d(t,{V:()=>a}),(n=a||(a={})).none="none",n.max="max",n.min="min"},8356(e,t,i){var a,n;i.d(t,{B:()=>a}),(n=a||(a={})).configAdded="configAdded",n.containerInit="containerInit",n.particlesSetup="particlesSetup",n.containerStarted="containerStarted",n.containerStopped="containerStopped",n.containerDestroyed="containerDestroyed",n.containerPaused="containerPaused",n.containerPlay="containerPlay",n.containerBuilt="containerBuilt",n.particleAdded="particleAdded",n.particleDestroyed="particleDestroyed",n.particleRemoved="particleRemoved"},1386(e,t,i){var a,n;i.d(t,{x:()=>a}),(n=a||(a={})).normal="normal",n.inside="inside",n.outside="outside"},4819(e,t,i){var a,n;i.d(t,{S:()=>a}),(n=a||(a={})).max="max",n.min="min",n.random="random"},602(e,t,i){i.d(t,{A:()=>s});var a=i(7420),n=i(3478),o=i(1196);class s extends o.O{animation;constructor(){super(),this.animation=new n.i}static create(e,t){let i=new s;return i.load(e),void 0!==t&&((0,a.Kg)(t)||(0,a.cy)(t)?i.load({value:t}):i.load(t)),i}load(e){if(super.load(e),(0,a.kZ)(e))return;let t=e.animation;void 0!==t&&(void 0===t.enable?this.animation.load(e.animation):this.animation.h.load(t))}}},5501(e,t,i){i.d(t,{Q:()=>l,p:()=>r});var a=i(1668),n=i(4819),o=i(7420),s=i(5286);class r{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(e){(0,o.kZ)(e)||(void 0!==e.count&&(this.count=(0,s.DT)(e.count)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=(0,s.DT)(e.speed)),void 0!==e.decay&&(this.decay=(0,s.DT)(e.decay)),void 0!==e.delay&&(this.delay=(0,s.DT)(e.delay)),void 0!==e.sync&&(this.sync=e.sync))}}class l extends r{mode;startValue;constructor(){super(),this.mode=a.g.auto,this.startValue=n.S.random}load(e){super.load(e),(0,o.kZ)(e)||(void 0!==e.mode&&(this.mode=e.mode),void 0!==e.startValue&&(this.startValue=e.startValue))}}},9172(e,t,i){i.d(t,{V:()=>o});var a=i(1196),n=i(7420);class o{color;image;opacity;position;repeat;size;constructor(){this.color=new a.O,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(e){(0,n.kZ)(e)||(void 0!==e.color&&(this.color=a.O.create(this.color,e.color)),void 0!==e.image&&(this.image=e.image),void 0!==e.position&&(this.position=e.position),void 0!==e.repeat&&(this.repeat=e.repeat),void 0!==e.size&&(this.size=e.size),void 0!==e.opacity&&(this.opacity=e.opacity))}}},338(e,t,i){i.d(t,{e:()=>s});var a=i(5501),n=i(7420),o=i(5286);class s extends a.p{max;min;offset;constructor(e,t){super(),this.min=e,this.max=t,this.offset=0,this.sync=!0}load(e){super.load(e),(0,n.kZ)(e)||(void 0!==e.max&&(this.max=e.max),void 0!==e.min&&(this.min=e.min),void 0!==e.offset&&(this.offset=(0,o.DT)(e.offset)))}}},8886(e,t,i){i.d(t,{m:()=>n});var a=i(7420);class n{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(e){(0,a.kZ)(e)||(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.zIndex&&(this.zIndex=e.zIndex))}}},3478(e,t,i){i.d(t,{i:()=>s});var a=i(5560),n=i(338),o=i(7420);class s{h=new n.e(a.L1,a.vS);l=new n.e(a.vd,a.$_);s=new n.e(a.yx,a.eu);load(e){(0,o.kZ)(e)||(this.h.load(e.h),this.s.load(e.s),this.l.load(e.l))}}},2215(e,t,i){i.d(t,{J:()=>c});var a=i(5244),n=i(7420),o=i(9172),s=i(8886),r=i(3897),l=i(714),d=i(5286);class c{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(e,t){this._pluginManager=e,this._container=t,this.autoPlay=!0,this.background=new o.V,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new s.m,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=(0,l.y)(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new r.z,this.smooth=!1,this.style={},this.zLayers=100}load(e){if((0,n.kZ)(e))return;void 0!==e.preset&&(this.preset=e.preset,(0,a.wJ)(this.preset,e=>{this._importPreset(e)})),void 0!==e.palette&&(this.palette=e.palette,this._importPalette(this.palette)),void 0!==e.autoPlay&&(this.autoPlay=e.autoPlay),void 0!==e.clear&&(this.clear=e.clear),void 0!==e.key&&(this.key=e.key),void 0!==e.name&&(this.name=e.name),void 0!==e.delay&&(this.delay=(0,d.DT)(e.delay));let t=e.detectRetina;void 0!==t&&(this.detectRetina=t),void 0!==e.duration&&(this.duration=(0,d.DT)(e.duration));let i=e.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==e.hdr&&(this.hdr=e.hdr),void 0!==e.pauseOnBlur&&(this.pauseOnBlur=e.pauseOnBlur),void 0!==e.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=e.pauseOnOutsideViewport),void 0!==e.zLayers&&(this.zLayers=e.zLayers),this.background.load(e.background);let o=e.fullScreen;(0,n.Lm)(o)?this.fullScreen.enable=o:this.fullScreen.load(o),this.particles.load(e.particles),this.resize.load(e.resize),this.style=(0,a.zw)(this.style,e.style),void 0!==e.smooth&&(this.smooth=e.smooth),this._pluginManager.plugins.forEach(t=>{t.loadOptions(this._container,this,e)})}_importPalette=e=>{let t=this._pluginManager.getPalette(e);t&&this.load({background:{color:t.background},blend:{enable:!0,mode:t.blendMode},particles:{palette:e}})};_importPreset=e=>{this.load(this._pluginManager.getPreset(e))}}},1196(e,t,i){i.d(t,{O:()=>n});var a=i(7420);class n{value;constructor(){this.value=""}static create(e,t){let i=new n;return i.load(e),void 0!==t&&((0,a.Kg)(t)||(0,a.cy)(t)?i.load({value:t}):i.load(t)),i}load(e){!(0,a.kZ)(e)&&((0,a.kZ)(e.value)||(this.value=e.value))}}},4505(e,t,i){i.d(t,{w:()=>o});var a=i(2506),n=i(7420);class o{horizontal;vertical;constructor(){this.horizontal=new a.F,this.vertical=new a.F}load(e){(0,n.kZ)(e)||(this.horizontal.load(e.horizontal),this.vertical.load(e.vertical))}}},2506(e,t,i){i.d(t,{F:()=>n});var a=i(8239);class n extends a.PV{constructor(){super(),this.value=1}}},5940(e,t,i){i.d(t,{S:()=>s});var a=i(602),n=i(7420),o=i(5286);class s{color;enable;opacity;constructor(){this.enable=!0,this.color=new a.A,this.color.value="#fff",this.opacity=1}load(e){(0,n.kZ)(e)||(void 0!==e.color&&(this.color=a.A.create(this.color,e.color)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.opacity&&(this.opacity=(0,o.DT)(e.opacity)))}}},6142(e,t,i){i.d(t,{y:()=>h});var a=i(1907),n=i(7420),o=i(9447),s=i(6019),r=i(414),l=i(9345),d=i(7563),c=i(5487),u=i(5286);class h{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new o.h,this.center=new s.Z,this.decay=0,this.distance={},this.direction=a.F.none,this.drift=0,this.enable=!1,this.gravity=new r.y,this.path=new l.v,this.outModes=new d.j,this.random=!1,this.size=!1,this.speed=2,this.spin=new c.t,this.straight=!1,this.vibrate=!1,this.warp=!1}load(e){if((0,n.kZ)(e))return;this.angle.load((0,n.Et)(e.angle)?{value:e.angle}:e.angle),this.center.load(e.center),void 0!==e.decay&&(this.decay=(0,u.DT)(e.decay)),void 0!==e.direction&&(this.direction=e.direction),void 0!==e.distance&&(this.distance=(0,n.Et)(e.distance)?{horizontal:e.distance,vertical:e.distance}:{...e.distance}),void 0!==e.drift&&(this.drift=(0,u.DT)(e.drift)),void 0!==e.enable&&(this.enable=e.enable),this.gravity.load(e.gravity);let t=e.outModes;void 0!==t&&((0,n.Gv)(t)?this.outModes.load(t):this.outModes.load({default:t})),this.path.load(e.path),void 0!==e.random&&(this.random=e.random),void 0!==e.size&&(this.size=e.size),void 0!==e.speed&&(this.speed=(0,u.DT)(e.speed)),this.spin.load(e.spin),void 0!==e.straight&&(this.straight=e.straight),void 0!==e.vibrate&&(this.vibrate=e.vibrate),void 0!==e.warp&&(this.warp=e.warp)}}},9447(e,t,i){i.d(t,{h:()=>o});var a=i(7420),n=i(5286);class o{offset;value;constructor(){this.offset=0,this.value=90}load(e){(0,a.kZ)(e)||(void 0!==e.offset&&(this.offset=(0,n.DT)(e.offset)),void 0!==e.value&&(this.value=(0,n.DT)(e.value)))}}},6019(e,t,i){i.d(t,{Z:()=>o});var a=i(5354),n=i(7420);class o{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=a.q.percent,this.radius=0}load(e){(0,n.kZ)(e)||(void 0!==e.x&&(this.x=e.x),void 0!==e.y&&(this.y=e.y),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.radius&&(this.radius=e.radius))}}},414(e,t,i){i.d(t,{y:()=>o});var a=i(7420),n=i(5286);class o{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(e){(0,a.kZ)(e)||(void 0!==e.acceleration&&(this.acceleration=(0,n.DT)(e.acceleration)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.inverse&&(this.inverse=e.inverse),void 0!==e.maxSpeed&&(this.maxSpeed=(0,n.DT)(e.maxSpeed)))}}},7563(e,t,i){i.d(t,{j:()=>o});var a=i(1946),n=i(7420);class o{bottom;default;left;right;top;constructor(){this.default=a.Y.out}load(e){(0,n.kZ)(e)||(void 0!==e.default&&(this.default=e.default),this.bottom=e.bottom??e.default,this.left=e.left??e.default,this.right=e.right??e.default,this.top=e.top??e.default)}}},9345(e,t,i){i.d(t,{v:()=>s});var a=i(8239),n=i(5244),o=i(7420);class s{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new a.PV,this.enable=!1,this.options={}}load(e){!(0,o.kZ)(e)&&(void 0!==e.clamp&&(this.clamp=e.clamp),this.delay.load(e.delay),void 0!==e.enable&&(this.enable=e.enable),this.generator=e.generator,e.options&&(this.options=(0,n.zw)(this.options,e.options)))}}},5487(e,t,i){i.d(t,{t:()=>s});var a=i(5244),n=i(7420),o=i(5286);class s{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(e){!(0,n.kZ)(e)&&(void 0!==e.acceleration&&(this.acceleration=(0,o.DT)(e.acceleration)),void 0!==e.enable&&(this.enable=e.enable),e.position&&(this.position=(0,a.zw)({},e.position)))}}},7086(e,t,i){i.d(t,{M:()=>n});var a=i(7420);class n{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(e){if((0,a.kZ)(e))return;void 0!==e.enable&&(this.enable=e.enable);let t=e.width;void 0!==t&&(this.width=t);let i=e.height;void 0!==i&&(this.height=i)}}},7501(e,t,i){i.d(t,{N:()=>s});var a=i(7086),n=i(9682),o=i(7420);class s{density;limit;value;constructor(){this.density=new a.M,this.limit=new n.A,this.value=0}load(e){(0,o.kZ)(e)||(this.density.load(e.density),this.limit.load(e.limit),void 0!==e.value&&(this.value=e.value))}}},9682(e,t,i){i.d(t,{A:()=>o});var a=i(6101),n=i(7420);class o{mode;value;constructor(){this.mode=a.d.delete,this.value=0}load(e){(0,n.kZ)(e)||(void 0!==e.mode&&(this.mode=e.mode),void 0!==e.value&&(this.value=e.value))}}},4666(e,t,i){i.d(t,{Y:()=>s});var a=i(4770),n=i(8239),o=i(7420);class s extends n.AI{animation;constructor(){super(),this.animation=new a.I,this.value=1}load(e){if((0,o.kZ)(e))return;super.load(e);let t=e.animation;void 0!==t&&this.animation.load(t)}}},4770(e,t,i){i.d(t,{I:()=>s});var a=i(9718),n=i(5501),o=i(7420);class s extends n.Q{destroy;constructor(){super(),this.destroy=a.V.none,this.speed=2}load(e){super.load(e),(0,o.kZ)(e)||void 0!==e.destroy&&(this.destroy=e.destroy)}}},8008(e,t,i){i.d(t,{U:()=>v});var a=i(5244),n=i(7420);class o{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(e){if((0,n.kZ)(e))return;let t=e.options;if(void 0!==t)for(let e in t){let i=t[e];i&&(this.options[e]=(0,a.zw)(this.options[e]??{},i))}void 0!==e.close&&(this.close=e.close),void 0!==e.type&&(this.type=e.type)}}var s=i(5940),r=i(6142),l=i(4666),d=i(4505),c=i(7501),u=i(9430),h=i(8806),p=i(7793),f=i(148);class v{bounce;effect;fill;groups;move;number;opacity;palette;reduceDuplicates;shape;size;stroke;zIndex;_container;_pluginManager;constructor(e,t){this._pluginManager=e,this._container=t,this.bounce=new d.w,this.effect=new o,this.fill=new s.S,this.groups={},this.move=new r.y,this.number=new c.N,this.opacity=new l.Y,this.reduceDuplicates=!1,this.shape=new u.y,this.size=new h.o,this.stroke=new p.t,this.zIndex=new f.P}load(e){if((0,n.kZ)(e))return;if(e.palette&&(this.palette=e.palette,this._importPalette(this.palette)),void 0!==e.groups)for(let t of Object.keys(e.groups)){if(!(t in e.groups))continue;let i=e.groups[t];void 0!==i&&(this.groups[t]=(0,a.zw)(this.groups[t]??{},i))}void 0!==e.reduceDuplicates&&(this.reduceDuplicates=e.reduceDuplicates),this.bounce.load(e.bounce),this.effect.load(e.effect),this.move.load(e.move),this.number.load(e.number),this.opacity.load(e.opacity),this.shape.load(e.shape),this.size.load(e.size),this.zIndex.load(e.zIndex);let t=e.fill;t&&(this.fill=(0,a.wJ)(t,e=>{let t=new s.S;return t.load(e),t}));let i=e.stroke;if(i&&(this.stroke=(0,a.wJ)(i,e=>{let t=new p.t;return t.load(e),t})),this._container){for(let t of this._pluginManager.plugins)t.loadParticlesOptions&&t.loadParticlesOptions(this._container,this,e);let t=this._pluginManager.updaters.get(this._container);if(t)for(let i of t)i.loadOptions&&i.loadOptions(this,e)}}_importPalette=e=>{let t=this._pluginManager.getPalette(e);t&&this.load({fill:{color:t.fill?{value:t.colors}:void 0,enable:t.fill},stroke:t.fill?void 0:t.colors.map(e=>({color:{value:e},width:1})),blend:{enable:!0,mode:t.blendMode}})}}},9430(e,t,i){i.d(t,{y:()=>o});var a=i(5244),n=i(7420);class o{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(e){if((0,n.kZ)(e))return;let t=e.options;if(void 0!==t)for(let e in t){let i=t[e];i&&(this.options[e]=(0,a.zw)(this.options[e]??{},i))}void 0!==e.close&&(this.close=e.close),void 0!==e.type&&(this.type=e.type)}}},8806(e,t,i){i.d(t,{o:()=>s});var a=i(8239),n=i(7502),o=i(7420);class s extends a.AI{animation;constructor(){super(),this.animation=new n.q,this.value=3}load(e){if(super.load(e),(0,o.kZ)(e))return;let t=e.animation;void 0!==t&&this.animation.load(t)}}},7502(e,t,i){i.d(t,{q:()=>s});var a=i(9718),n=i(5501),o=i(7420);class s extends n.Q{destroy;constructor(){super(),this.destroy=a.V.none,this.speed=5}load(e){super.load(e),(0,o.kZ)(e)||void 0!==e.destroy&&(this.destroy=e.destroy)}}},7793(e,t,i){i.d(t,{t:()=>s});var a=i(602),n=i(7420),o=i(5286);class s{color;opacity;width;constructor(){this.width=0}load(e){(0,n.kZ)(e)||(void 0!==e.color&&(this.color=a.A.create(this.color,e.color)),void 0!==e.width&&(this.width=(0,o.DT)(e.width)),void 0!==e.opacity&&(this.opacity=(0,o.DT)(e.opacity)))}}},148(e,t,i){i.d(t,{P:()=>o});var a=i(8239),n=i(7420);class o extends a.PV{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(e){super.load(e),(0,n.kZ)(e)||(void 0!==e.opacityRate&&(this.opacityRate=e.opacityRate),void 0!==e.sizeRate&&(this.sizeRate=e.sizeRate),void 0!==e.velocityRate&&(this.velocityRate=e.velocityRate))}}},3897(e,t,i){i.d(t,{z:()=>n});var a=i(7420);class n{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(e){(0,a.kZ)(e)||(void 0!==e.delay&&(this.delay=e.delay),void 0!==e.enable&&(this.enable=e.enable))}}},8239(e,t,i){i.d(t,{AI:()=>l,Jm:()=>r,PV:()=>s});var a=i(5501),n=i(7420),o=i(5286);class s{value;constructor(){this.value=0}load(e){!(0,n.kZ)(e)&&((0,n.kZ)(e.value)||(this.value=(0,o.DT)(e.value)))}}class r extends s{animation=new a.p;load(e){if(super.load(e),(0,n.kZ)(e))return;let t=e.animation;void 0!==t&&this.animation.load(t)}}class l extends r{animation;constructor(){super(),this.animation=new a.Q}load(e){super.load(e)}}},1912(e,t,i){i.d(t,{IU:()=>s,KG:()=>c,Md:()=>o,Sn:()=>n,VG:()=>h,Wb:()=>p,gF:()=>u,k:()=>l,p0:()=>r,z5:()=>d});var a=i(5560);function n(e,t,i){e.fillStyle=i??"rgba(0,0,0,0)",e.fillRect(a.bo.x,a.bo.y,t.width,t.height)}function o(e,t,i,n){if(!i)return;let o=e.globalAlpha;e.globalAlpha=n,e.drawImage(i,a.bo.x,a.bo.y,t.width,t.height),e.globalAlpha=o}function s(e,t){e.clearRect(a.bo.x,a.bo.y,t.width,t.height)}function r(e){let{container:t,context:i,particle:n,delta:o,colorStyles:s,radius:r,opacity:p,transform:f}=e,{effectDrawers:v,shapeDrawers:g}=t,m=n.getPosition(),y=n.getTransformData(f),b=a.Pf,x={x:m.x,y:m.y};i.setTransform(y.a,y.b,y.c,y.d,m.x,m.y),s.fill&&(i.fillStyle=s.fill);let w=!!n.fillEnabled,M=n.strokeWidth??a.Dv;i.lineWidth=M,s.stroke&&(i.strokeStyle=s.stroke);let z={context:i,particle:n,radius:r,drawRadius:r*b,opacity:p,delta:o,pixelRatio:t.retina.pixelRatio,fill:w,stroke:M>a.Dv,transformData:y,position:{...m},drawPosition:x,drawScale:b};for(let e of t.plugins)e.drawParticleTransform?.(z);let S=n.effect?v.get(n.effect):void 0,O=n.shape?g.get(n.shape):void 0;d(S,z),h(O,z),c(O,z),u(O,z),l(S,z),i.resetTransform()}function l(e,t){if(!e?.drawAfter)return;let{particle:i}=t;i.effect&&e.drawAfter(t)}function d(e,t){if(!e?.drawBefore)return;let{particle:i}=t;i.effect&&e.drawBefore(t)}function c(e,t){if(!e)return;let{context:i,fill:a,particle:n,stroke:o}=t;n.shape&&(i.beginPath(),e.draw(t),n.shapeClose&&i.closePath(),o&&i.stroke(),a&&i.fill())}function u(e,t){if(!e?.afterDraw)return;let{particle:i}=t;i.shape&&e.afterDraw(t)}function h(e,t){if(!e?.beforeDraw)return;let{particle:i}=t;i.shape&&e.beforeDraw(t)}function p(e,t,i,a){t.drawParticle&&t.drawParticle(e,i,a)}},8329(e,t,i){i.d(t,{BN:()=>h,EY:()=>O,Jv:()=>A,K6:()=>g,Ko:()=>F,LC:()=>S,OH:()=>w,O_:()=>R,PG:()=>k,R5:()=>v,YL:()=>b,_h:()=>P,ay:()=>x,eg:()=>y,mK:()=>f,pz:()=>_,qe:()=>p,xx:()=>M,yx:()=>T,zI:()=>m});var a=i(5286),n=i(5560),o=i(7420),s=i(3832),r=i(7662),l=i(5244);let d=new Map;function c(e,t){let i=d.get(e);return i||(i=t(),d.size>=1e3&&[...d.keys()].slice(0,1e3*n.MX).forEach(e=>d.delete(e)),d.set(e,i)),i}function u(e,t){if(t){for(let i of e.colorManagers.values())if(i.accepts(t))return i.parseString(t)}}function h(e,t,i,a=!0){if(!t)return;let n=(0,o.Kg)(t)?{value:t}:t;if((0,o.Kg)(n.value))return p(e,n.value,i,a);if((0,o.cy)(n.value)){let t=(0,l.Vh)(n.value,i,a);if(!t)return;return h(e,{value:t})}for(let t of e.colorManagers.values()){let e=t.handleRangeColor(n);if(e)return e}}function p(e,t,i,a=!0){if(!t)return;let s=(0,o.Kg)(t)?{value:t}:t;if((0,o.Kg)(s.value))return s.value===n.mR?w():u(e,s.value);if((0,o.cy)(s.value)){let t=(0,l.Vh)(s.value,i,a);if(!t)return;return p(e,{value:t})}for(let t of e.colorManagers.values()){let e=t.handleColor(s);if(e)return e}}function f(e,t,i,a=!0){let n=p(e,t,i,a);return n?g(n):void 0}function v(e,t,i,a=!0){let n=h(e,t,i,a);return n?g(n):void 0}function g(e){let t=e.r/n.oi,i=e.g/n.oi,a=e.b/n.oi,o=Math.max(t,i,a),s=Math.min(t,i,a),r={h:n.L1,l:(o+s)*n.MX,s:n.yx};return o!==s&&(r.s=r.l<n.MX?(o-s)/(o+s):(o-s)/(n.gd-o-s),t===o?r.h=(i-a)/(o-s):i===o?r.h=n.gd+(a-t)/(o-s):r.h=n.gd*n.gd+(t-i)/(o-s)),r.l*=n.$_,r.s*=n.eu,r.h*=n.U0,r.h<n.L1&&(r.h+=n.vS),r.h>=n.vS&&(r.h-=n.vS),r}function m(e,t){return u(e,t)?.a}function y(e,t){return u(e,t)}function b(e){let t=(e.h%n.vS+n.vS)%n.vS,i=Math.max(n.yx,Math.min(n.eu,e.s)),a=Math.max(n.vd,Math.min(n.$_,e.l)),o=t/n.vS,s=i/n.eu,r=a/n.$_;if(i===n.yx){let e=Math.round(r*n.oi);return{r:e,g:e,b:e}}let l=(e,t,i)=>(i<0&&i++,i>1&&i--,i*n.zg<1)?e+(t-e)*n.zg*i:i*n.gd<1?t:i*n.Nu<+n.gd?e+(t-e)*(n.gd/n.Nu-i)*n.zg:e,d=r<n.MX?r*(n.aE+s):r+s-r*s,c=n.gd*r-d,u=n.BF/n.Nu;return{r:Math.round(Math.min(n.oi,n.oi*l(c,d,o+u))),g:Math.round(Math.min(n.oi,n.oi*l(c,d,o))),b:Math.round(Math.min(n.oi,n.oi*l(c,d,o-u)))}}function x(e){let t=b(e);return{a:e.a,b:t.b,g:t.g,r:t.r}}function w(e){let t=e??n.Fl,i=n.oi+n.D_,o=()=>Math.floor((0,a.e4)(t,i));return{b:o(),g:o(),r:o()}}function M(e,t,i){let a=i??n.hv;return c(`rgb-${e.r.toFixed(2)}-${e.g.toFixed(2)}-${e.b.toFixed(2)}-${t?"hdr":"sdr"}-${a.toString()}`,()=>{var a,o;return t?z(e,i):(a=e,o=i,`rgba(${a.r.toString()}, ${a.g.toString()}, ${a.b.toString()}, ${(o??n.hv).toString()})`)})}function z(e,t){return`color(display-p3 ${(e.r/n.oi).toString()} ${(e.g/n.oi).toString()} ${(e.b/n.oi).toString()} / ${(t??n.hv).toString()})`}function S(e,t,i){let a=i??n.hv;return c(`hsl-${e.h.toFixed(2)}-${e.s.toFixed(2)}-${e.l.toFixed(2)}-${t?"hdr":"sdr"}-${a.toString()}`,()=>{var a,o,s,r;return t?(a=e,o=i,z(b(a),o)):(s=e,r=i,`hsla(${s.h.toString()}, ${s.s.toString()}%, ${s.l.toString()}%, ${(r??n.hv).toString()})`)})}function O(e,t,i,n){let o=e,s=t;return"r"in o||(o=b(e)),"r"in s||(s=b(t)),{b:(0,a.jh)(o.b,s.b,i,n),g:(0,a.jh)(o.g,s.g,i,n),r:(0,a.jh)(o.r,s.r,i,n)}}function P(e,t,i){if(i===n.mR)return w();if(i!==n.BW)return i;{let i=e.getFillColor()??e.getStrokeColor(),a=t?.getFillColor()??t?.getStrokeColor();if(i&&a&&t)return O(i,a,e.getRadius(),t.getRadius());{let e=i??a;if(e)return b(e)}}}function k(e,t,i,a){let s=(0,o.Kg)(t)?t:t.value;return s===n.mR?a?h(e,{value:s}):i?n.mR:n.BW:s===n.BW?n.BW:h(e,{value:s})}function R(e){return void 0===e?void 0:{h:e.h.value,s:e.s.value,l:e.l.value}}function _(e,t,i){let a={h:{enable:!1,value:e.h,min:n.L1,max:n.vS},s:{enable:!1,value:e.s,min:n.yx,max:n.eu},l:{enable:!1,value:e.l,min:n.vd,max:n.$_}};return t&&(E(a.h,t.h,i),E(a.s,t.s,i),E(a.l,t.l,i)),a}function E(e,t,i){e.enable=t.enable,e.min=t.min,e.max=t.max,e.enable?(e.velocity=(0,a.VG)(t.speed)/n.a5*i,e.decay=n.WH-(0,a.VG)(t.decay),e.status=r.H.increasing,e.loops=n.hK,e.maxLoops=(0,a.VG)(t.count),e.time=n.tR,e.delayTime=(0,a.VG)(t.delay)*n.Xu,t.sync||(e.velocity*=(0,a.G0)(),e.value*=(0,a.G0)()),e.initialValue=e.value,e.offset=(0,a.DT)(t.offset)):e.velocity=n.jn}function F(e,t,i){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0)||(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=i.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0)))return;let n=e.offset?(0,a.vE)(e.offset):0,o=(e.velocity??0)*i.factor+3.6*n,s=e.decay??1,l=e.max,d=e.min;t&&e.status!==r.H.increasing?(e.value-=o,e.value<d&&(e.loops??=0,e.loops++,e.status=r.H.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,t?e.status=r.H.decreasing:e.value-=l)),e.velocity&&1!==s&&(e.velocity*=s),e.value=(0,a.qE)(e.value,d,l)}function A(e,t){if(!e)return;let{h:i,s:a,l:n}=e;F(i,!1,t),F(a,!0,t),F(n,!0,t)}function T(e,t,i){return{h:e.h,s:e.s,l:e.l+(t===s.H.darken?-n.iU:n.iU)*i}}},7382(e,t,i){i.d(t,{B:()=>n,t:()=>o});let a={debug:console.debug,error:(e,t)=>{console.error(`tsParticles - Error - ${e}`,t)},info:console.info,log:console.log,trace:console.trace,verbose:console.log,warning:console.warn};function n(e){a.debug=e.debug,a.error=e.error,a.info=e.info,a.log=e.log,a.verbose=e.verbose,a.warning=e.warning}function o(){return a}},5286(e,t,i){i.d(t,{$m:()=>R,AD:()=>p,DT:()=>function e(t,i){if(t===i||void 0===i&&(0,s.Et)(t))return t;let a=x(t),n=w(t);return void 0!==i?{min:Math.min(a,i),max:Math.max(n,i)}:e(a,n)},G0:()=>u,JY:()=>k,M3:()=>V,Mh:()=>F,Nx:()=>T,OE:()=>c,OW:()=>_,Sc:()=>z,Sg:()=>x,VG:()=>b,W9:()=>w,Yf:()=>S,e4:()=>h,eh:()=>E,gp:()=>O,i0:()=>f,jh:()=>m,l1:()=>A,pu:()=>P,px:()=>v,qE:()=>g,qM:()=>I,vE:()=>y,vr:()=>M});var a=i(1907),n=i(5560),o=i(6129),s=i(7420);let r=Math.PI/180,l=Math.random,d={nextFrame:e=>requestAnimationFrame(e),cancel:e=>{cancelAnimationFrame(e)}};function c(e=Math.random){l=e}function u(){return g(l(),0,1-Number.EPSILON)}function h(e,t){return u()*(t-e)+e}function p(e,t){d.nextFrame=e,d.cancel=t}function f(e){return d.nextFrame(e)}function v(e){d.cancel(e)}function g(e,t,i){return Math.min(Math.max(e,t),i)}function m(e,t,i,a){return Math.floor((e*i+t*a)/(i+a))}function y(e){let t=w(e),i=x(e);return t===i&&(i=0),h(i,t)}function b(e){return(0,s.Et)(e)?e:y(e)}function x(e){return(0,s.Et)(e)?e:e.min}function w(e){return(0,s.Et)(e)?e:e.max}function M(e,t){let i=e.x-t.x,a=e.y-t.y;return{dx:i,dy:a,distance:Math.hypot(i,a)}}function z(e,t){let i=e.x-t.x,a=e.y-t.y;return i*i+a*a}function S(e,t){return Math.sqrt(z(e,t))}function O(e,t,i){return z(e,t)<=i*i}function P(e){return e*r}function k(e,t,i){if((0,s.Et)(e))return e*r;switch(e){case a.F.top:return-Math.PI*n.MX;case a.F.topRight:return-Math.PI*n.$G;case a.F.right:return n.Ie;case a.F.bottomRight:return Math.PI*n.$G;case a.F.bottom:return Math.PI*n.MX;case a.F.bottomLeft:return Math.PI*n.Rq;case a.F.left:return Math.PI;case a.F.topLeft:return-Math.PI*n.Rq;case a.F.inside:return Math.atan2(i.y-t.y,i.x-t.x);case a.F.outside:return Math.atan2(t.y-i.y,t.x-i.x);default:return u()*n.R1}}function R(e){let t=o.M.origin;return t.length=1,t.angle=e,t}function _(e,t,i,a){return o.M.create(e.x*(i-a)/(i+a)+t.x*n.gd*a/(i+a),e.y)}function E(e){return e.position?.x!==void 0&&void 0!==e.position.y?{x:e.position.x*e.size.width/n.a5,y:e.position.y*e.size.height/n.a5}:void 0}function F(e){return{x:(e.position?.x??u()*n.a5)*e.size.width/n.a5,y:(e.position?.y??u()*n.a5)*e.size.height/n.a5}}function A(e){let t={x:e.position?.x!==void 0?b(e.position.x):void 0,y:e.position?.y!==void 0?b(e.position.y):void 0};return F({size:e.size,position:t})}function T(e){let{position:t,size:i}=e;return{x:t?.x??u()*i.width,y:t?.y??u()*i.height}}function I(e){let t={x:e.position?.x!==void 0?b(e.position.x):void 0,y:e.position?.y!==void 0?b(e.position.y):void 0};return T({size:e.size,position:t})}function V(e){return e?e.endsWith("%")?parseFloat(e)/n.a5:parseFloat(e):1}},714(e,t,i){i.d(t,{Z:()=>n,y:()=>o});var a=i(8008);function n(e,...t){for(let i of t)e.load(i)}function o(e,t,...i){let s=new a.U(e,t);return n(s,...i),s}},7420(e,t,i){function a(e){return"boolean"==typeof e}function n(e){return"string"==typeof e}function o(e){return"number"==typeof e}function s(e){return"function"==typeof e}function r(e){return"object"==typeof e&&null!==e}function l(e){return Array.isArray(e)}function d(e){return null==e}i.d(t,{Et:()=>o,Gv:()=>r,Kg:()=>n,Lm:()=>a,Tn:()=>s,cy:()=>l,kZ:()=>d})},5244(e,t,i){i.d(t,{AE:()=>S,BR:()=>m,Bj:()=>p,E9:()=>A,HQ:()=>$,Kp:()=>D,O2:()=>z,Ot:()=>C,T5:()=>v,TA:()=>R,Tg:()=>O,Tj:()=>M,UC:()=>I,Vh:()=>w,Xs:()=>E,YC:()=>T,hJ:()=>L,hn:()=>b,lV:()=>g,n0:()=>x,pE:()=>P,q8:()=>f,tG:()=>y,td:()=>V,w3:()=>_,wJ:()=>k,zw:()=>function e(t,...i){for(let a of i){if((0,o.kZ)(a))continue;if(!(0,o.Gv)(a)){t=a;continue}Array.isArray(a)?Array.isArray(t)||(t=[]):(!(0,o.Gv)(t)||Array.isArray(t))&&(t={});let i=Object.keys(a),n=new Set(["__proto__","constructor","prototype"]);if(!i.some(e=>{let t=a[e];return(0,o.Gv)(t)||Array.isArray(t)})){let e=t;for(let t of i)if(!n.has(t)&&t in a){let i=a[t];void 0!==i&&(e[t]=i)}continue}for(let o of i){if(n.has(o))continue;let i=t,s=a[o];i[o]=Array.isArray(s)?s.map(t=>e(void 0,t)):e(i[o],s)}}return t}});var a=i(5286),n=i(5560),o=i(7420),s=i(1668),r=i(7662),l=i(9718),d=i(8545),c=i(5354),u=i(4819),h=i(6129);function p(e,t){let i=new Map,a=t?.maxSize,n=t?.ttlMs,o=t?.keyFn,s=(e,t=new WeakSet)=>{if(null===e)return"null";let i=typeof e;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(e);if("function"===i)try{return e.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return e.toString()}catch{return'"[Symbol]"'}if(Array.isArray(e))return`[${e.map(e=>s(e,t)).join(",")}]`;if(t.has(e))return'"[Circular]"';t.add(e);let a=Object.keys(e).sort();return`{${a.map(i=>`${JSON.stringify(i)}:${s(e[i],t)}`).join(",")}}`};return(...t)=>{let r,l=(r=t,o?o(r):s(r)),d=Date.now(),c=i.get(l);if(void 0!==c)if(!n||!(d-c.ts>n))return i.delete(l),i.set(l,{value:c.value,ts:c.ts}),c.value;else i.delete(l);let u=e(...t);if(i.set(l,{value:u,ts:d}),"number"==typeof a&&a>=0)for(;i.size>a;){let e=i.keys().next().value;if(void 0===e)break;i.delete(e)}return u}}function f(){return"u">typeof matchMedia}function v(){return globalThis.document}function g(e){if(f())return matchMedia(e)}function m(e){if("u">typeof IntersectionObserver)return new IntersectionObserver(e)}function y(e){if("u">typeof MutationObserver)return new MutationObserver(e)}function b(e,t){return e===t||(0,o.cy)(t)&&t.includes(e)}function x(e){return Math.floor((0,a.G0)()*e.length)}function w(e,t,i=!0){return e[void 0!==t&&i?t%e.length:x(e)]}function M(e,t,i,a,n){return z(S(e,a??0),t,i,n)}function z(e,t,i,a){let n=!0;return a&&a!==d.v.bottom||(n=e.top<t.height+i.x),n&&(!a||a===d.v.left)&&(n=e.right>i.x),n&&(!a||a===d.v.right)&&(n=e.left<t.width+i.y),n&&(!a||a===d.v.top)&&(n=e.bottom>i.y),n}function S(e,t){return{bottom:e.y+t,left:e.x-t,right:e.x+t,top:e.y-t}}function O(e){return{position:e.getPosition(),radius:e.getRadius(),mass:e.getMass(),velocity:e.velocity,factor:h.M.create((0,a.VG)(e.options.bounce.horizontal.value),(0,a.VG)(e.options.bounce.vertical.value))}}function P(e,t){let{x:i,y:n}=e.velocity.sub(t.velocity),[o,s]=[e.position,t.position],{dx:r,dy:l}=(0,a.vr)(s,o);if(i*r+n*l<0)return;let d=-Math.atan2(l,r),c=e.mass,u=t.mass,h=e.velocity.rotate(d),p=t.velocity.rotate(d),f=(0,a.OW)(h,p,c,u),v=(0,a.OW)(p,h,c,u),g=f.rotate(-d),m=v.rotate(-d);e.velocity.x=g.x*e.factor.x,e.velocity.y=g.y*e.factor.y,t.velocity.x=m.x*t.factor.x,t.velocity.y=m.y*t.factor.y}function k(e,t){return(0,o.cy)(e)?e.map((e,i)=>t(e,i)):t(e,0)}function R(e,t,i){return(0,o.cy)(e)?w(e,t,i):e}function _(e,t){return(0,o.cy)(e)?e.find((e,i)=>t(e,i)):t(e,0)?e:void 0}function E(e,t){let i=e.value,o=e.animation,l={delayTime:(0,a.VG)(o.delay)*n.Xu,enable:o.enable,value:(0,a.VG)(e.value)*t,max:(0,a.W9)(i)*t,min:(0,a.Sg)(i)*t,loops:0,maxLoops:(0,a.VG)(o.count),time:0};if(o.enable){switch(l.decay=1-(0,a.VG)(o.decay),o.mode){case s.g.increase:l.status=r.H.increasing;break;case s.g.decrease:l.status=r.H.decreasing;break;case s.g.random:l.status=(0,a.G0)()>=n.MX?r.H.increasing:r.H.decreasing}let e=o.mode===s.g.auto;switch(o.startValue){case u.S.min:l.value=l.min,e&&(l.status=r.H.increasing);break;case u.S.max:l.value=l.max,e&&(l.status=r.H.decreasing);break;case u.S.random:default:l.value=(0,a.vE)(l),e&&(l.status=(0,a.G0)()>=n.MX?r.H.increasing:r.H.decreasing)}}return l.initialValue=l.value,l}function F(e,t){if(e.mode!==c.q.percent){let{mode:t,...i}=e;return i}return"x"in e?{x:e.x/n.a5*t.width,y:e.y/n.a5*t.height}:{width:e.width/n.a5*t.width,height:e.height/n.a5*t.height}}function A(e,t){return F(e,t)}function T(e,t){return F(e,t)}function I(e,t,i,n,o){if(e.destroyed||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;let s=(t.velocity??0)*o.factor,d=t.min,c=t.max,u=t.decay??1;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=o.value),!((t.delayTime??0)>0)||!(t.time<(t.delayTime??0))){switch(t.status){case r.H.increasing:t.value+=s;break;case r.H.decreasing:t.value-=s}switch(t.velocity&&1!==u&&(t.velocity*=u),t.status){case r.H.increasing:t.value>=c&&(i?t.status=r.H.decreasing:t.value-=c,t.loops??=0,t.loops++);break;case r.H.decreasing:t.value<=d&&(i?t.status=r.H.increasing:t.value+=c,t.loops??=0,t.loops++)}var h=t.value;switch(n){case l.V.max:h>=c&&e.destroy();break;case l.V.min:h<=d&&e.destroy()}e.destroyed||(t.value=(0,a.qE)(t.value,d,c))}}function V(e){let t=v().createElement("div").style;for(let i in e){let a=e[i];if(!(i in e)||(0,o.kZ)(a))continue;let n=e.getPropertyValue?.(a);if(!n)continue;let s=e.getPropertyPriority?.(a);s?t.setProperty(a,n,s):t.setProperty(a,n)}return t}let L=p(function(e){let t=v().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:e.toString(10),"z-index":e.toString(10),top:"0",left:"0"};for(let e in i){let a=i[e];void 0!==a&&t.setProperty(e,a)}return t});function D(e,t,i,a,n){if(a){let a={passive:!0};(0,o.Lm)(n)?a.capture=n:void 0!==n&&(a=n),e.addEventListener(t,i,a)}else e.removeEventListener(t,i,n)}async function $(e,t,i,a=!1){let n=t.get(e);return(!n||a)&&(n=await Promise.all([...i.values()].map(t=>t(e))),t.set(e,n)),n}async function C(e,t,i,a=!1){let n=t.get(e);return(!n||a)&&(n=new Map(await Promise.all([...i.entries()].map(([t,i])=>i(e).then(e=>[t,e])))),t.set(e,n)),n}},8753(e,t,i){i.d(t,{HKZ:()=>k.H,A9e:()=>A.A,gmr:()=>z.g,pK_:()=>T.p,H_P:()=>F.H,Jmi:()=>el.Jm,VS$:()=>I.V,dgY:()=>b.dg,jlt:()=>b.jl,evc:()=>V.e,VKE:()=>R.V,mgy:()=>l,Bx4:()=>h.B,SQl:()=>Z.S,mcU:()=>L.m,hqM:()=>r,i74:()=>D.i,dtg:()=>S.d,yUV:()=>K.y,hzL:()=>j.h,Zgv:()=>N.Z,FWc:()=>w.F,y1u:()=>U.y,vU7:()=>X.v,Y4E:()=>et.Y,IhC:()=>ei.I,JYR:()=>$.J,Oit:()=>C.O,Yzx:()=>O.Y,v5k:()=>M.v,j$q:()=>W.j,x_I:()=>_.x,wvn:()=>q.w,F5W:()=>G.F,M1g:()=>ee.M,NeW:()=>Y.N,Ad4:()=>Q.A,UOj:()=>B.U,qiC:()=>P.q,Q4c:()=>T.Q,AIw:()=>el.AI,M_G:()=>b.M_,z0z:()=>er.z,pTR:()=>s,ypk:()=>ea.y,or0:()=>en.o,qvJ:()=>eo.q,tKH:()=>J.t,SKz:()=>E.S,tcj:()=>H.t,PVU:()=>el.PV,Miz:()=>x.M,pGL:()=>x.p,Pyx:()=>es.P,yxh:()=>ec.yx,i0Z:()=>v.i0,O2_:()=>c.O2,n02:()=>c.n0,NxB:()=>v.Nx,qMV:()=>v.qM,ehY:()=>v.eh,MhH:()=>v.Mh,l1q:()=>v.l1,AEc:()=>c.AE,pxm:()=>v.px,Nxk:()=>d.Nx,RFH:()=>d.RF,gpg:()=>v.gp,pEn:()=>c.pE,Tgl:()=>c.Tg,qE8:()=>v.qE,IUd:()=>ed.IU,td3:()=>c.td,OWw:()=>v.OW,EYT:()=>ec.EY,mKQ:()=>ec.mK,qe:()=>ec.qe,nqC:()=>d.nq,WH8:()=>d.WH,zwS:()=>c.zw,aZx:()=>d.aZ,tAJ:()=>d.tA,yjn:()=>d.yj,lA:()=>d.lA,z$P:()=>d.z$,i8E:()=>d.i8,hKc:()=>d.hK,hvP:()=>d.hv,$xb:()=>d.$x,ZpR:()=>d.Zp,xd3:()=>d.xd,rqX:()=>d.rq,Fli:()=>d.Fl,tRb:()=>d.tR,UgP:()=>d.Ug,zss:()=>d.zs,jnW:()=>d.jn,Pf9:()=>d.Pf,puj:()=>v.pu,LDU:()=>d.LD,gdl:()=>d.gd,R1e:()=>d.R1,kac:()=>ed.k,z5n:()=>ed.z5,p0m:()=>ed.p0,Wbn:()=>ed.Wb,KG7:()=>ed.KG,gF3:()=>ed.gF,VGT:()=>ed.VG,Iex:()=>d.Ie,wJ2:()=>c.wJ,w3Z:()=>c.w3,eb4:()=>d.eb,X$G:()=>d.X$,cei:()=>d.ce,YfF:()=>v.Yf,Scl:()=>v.Sc,vrU:()=>v.vr,hJS:()=>c.hJ,pzy:()=>ec.pz,O_i:()=>ec.O_,OtU:()=>c.Ot,HQK:()=>c.HQ,_hh:()=>ec._h,PGG:()=>ec.PG,tZQ:()=>f.t,$mf:()=>v.$m,JYE:()=>v.JY,E90:()=>c.E9,G0i:()=>v.G0,e4g:()=>v.e4,OHq:()=>ec.OH,W9e:()=>v.W9,Sgh:()=>v.Sg,VGA:()=>v.VG,YCE:()=>c.YC,LCf:()=>ec.LC,xxz:()=>ec.xx,vSh:()=>d.vS,L1V:()=>d.L1,U0s:()=>d.U0,MXx:()=>d.MX,q8J:()=>c.q8,YLU:()=>ec.YL,ayx:()=>ec.ay,D_O:()=>d.D_,XsS:()=>c.Xs,hBr:()=>d.hB,cyL:()=>eh.cy,Lmq:()=>eh.Lm,Tnt:()=>eh.Tn,hnD:()=>c.hn,kZJ:()=>eh.kZ,EtT:()=>eh.Et,Gvm:()=>eh.Gv,Tj8:()=>c.Tj,KgX:()=>eh.Kg,Vh1:()=>c.Vh,TA3:()=>c.TA,iUN:()=>d.iU,$_c:()=>d.$_,vd6:()=>d.vd,K3:()=>d.K3,PZY:()=>d.PZ,ZGK:()=>eu.Z,yVN:()=>eu.y,$v4:()=>d.$v,KpY:()=>c.Kp,BjF:()=>c.Bj,BWm:()=>d.BW,XuV:()=>d.Xu,wMU:()=>d.wM,DNI:()=>d.DN,z94:()=>d.z9,ou7:()=>d.ou,Dvh:()=>d.Dv,GWL:()=>d.GW,X_1:()=>d.X_,w20:()=>d.w2,jhA:()=>v.jh,dvp:()=>d.dv,xHs:()=>d.xH,boI:()=>d.bo,SnF:()=>ed.Sn,MdX:()=>ed.Md,M3Y:()=>v.M3,a56:()=>d.a5,BFN:()=>d.BF,$GP:()=>d.$G,mRf:()=>d.mR,vEz:()=>v.vE,R5R:()=>ec.R5,BN0:()=>ec.BN,JC0:()=>d.JC,vFD:()=>d.vF,NFi:()=>d.NF,oiR:()=>d.oi,K6u:()=>ec.K6,euA:()=>d.eu,yxQ:()=>d.yx,aEA:()=>d.aE,T5G:()=>c.T5,BRq:()=>c.BR,lVH:()=>c.lV,tGT:()=>c.tG,ADE:()=>v.AD,Bro:()=>f.B,OEu:()=>v.OE,DT4:()=>v.DT,zgn:()=>d.zg,iXO:()=>d.iX,dmB:()=>d.dm,zIs:()=>ec.zI,egF:()=>ec.eg,RqE:()=>d.Rq,NuQ:()=>d.Nu,Eow:()=>d.Eo,$k3:()=>ep,UC0:()=>c.UC,JvX:()=>ec.Jv,Kog:()=>ec.Ko,nKi:()=>d.nK,RVs:()=>d.RV});var a,n,o,s,r,l,d=i(5560),c=i(5244);class u{_listeners;constructor(){this._listeners=new Map}addEventListener(e,t){this.removeEventListener(e,t);let i=this._listeners.get(e);i||(i=[],this._listeners.set(e,i)),i.push(t)}dispatchEvent(e,t){let i=this._listeners.get(e);i?.forEach(e=>{e(t)})}hasEventListener(e){return!!this._listeners.get(e)}removeAllEventListeners(e){e?this._listeners.delete(e):this._listeners=new Map}removeEventListener(e,t){let i=this._listeners.get(e);if(!i)return;let a=i.length,n=i.indexOf(t);n<d.z9||(a===d.LD?this._listeners.delete(e):i.splice(n,d.LD))}}var h=i(8356);class p{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(e){this._engine=e}get configs(){let e={};for(let[t,i]of this._configs)e[t]=i;return e}addColorManager(e,t){this.colorManagers.set(e,t)}addConfig(e){let t=e.key??e.name??"default";this._configs.set(t,e),this._engine.dispatchEvent(h.B.configAdded,{data:{name:t,config:e}})}addEasing(e,t){this.easingFunctions.get(e)||this.easingFunctions.set(e,t)}addEffect(e,t){this.initializers.effects.set(e,t)}addPalette(e,t){this.palettes.set(e,t)}addParticleUpdater(e,t){this.initializers.updaters.set(e,t)}addPlugin(e){this.getPlugin(e.id)||this.plugins.push(e)}addPreset(e,t,i=!1){(i||!this.getPreset(e))&&this.presets.set(e,t)}addShape(e,t){for(let i of e)this.initializers.shapes.set(i,t)}clearPlugins(e){this.effectDrawers.delete(e),this.shapeDrawers.delete(e),this.updaters.delete(e)}getEasing(e){return this.easingFunctions.get(e)??(e=>e)}getEffectDrawers(e,t=!1){return(0,c.Ot)(e,this.effectDrawers,this.initializers.effects,t)}getPalette(e){return this.palettes.get(e)}getPlugin(e){return this.plugins.find(t=>t.id===e)}getPreset(e){return this.presets.get(e)}async getShapeDrawers(e,t=!1){return(0,c.Ot)(e,this.shapeDrawers,this.initializers.shapes,t)}async getUpdaters(e,t=!1){return(0,c.HQ)(e,this.updaters,this.initializers.updaters,t)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(let e of this._allLoadersSet)await this._runLoader(e,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(e,t,...i){let a=this.updaters.get(e);a&&a.forEach(e=>e.loadOptions?.(t,...i))}async register(...e){if(this._initialized)throw Error("Register plugins can only be done before calling tsParticles.load()");for(let t of e)this._isRunningLoaders?await this._runLoader(t,this._executedSet,this._allLoadersSet):this._loadPromises.add(t)}async _runLoader(e,t,i){t.has(e)||(t.add(e),i.add(e),await e(this._engine))}}var f=i(7382),v=i(5286);let g="100%";async function m(e){let t=(0,c.TA)(e.url,e.index);if(!t)return e.fallback;let i=await fetch(t);return i.ok?await i.json():((0,f.t)().error(`${i.status.toString()} while retrieving config file`),e.fallback)}class y{pluginManager=new p(this);_domArray=[];_eventDispatcher=new u;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.8"}addEventListener(e,t){this._eventDispatcher.addEventListener(e,t)}checkVersion(e){if(this.version!==e)throw Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${e}`)}dispatchEvent(e,t){this._eventDispatcher.dispatchEvent(e,t)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(e){let{items:t}=this,i=t[e];return i?.destroyed?void t.splice(e,d.JC):i}async load(e){var t;let a,n;await this.init();let{Container:o}=await i.e(648).then(i.bind(i,648)),s=e.id??e.element?.id??`tsparticles${Math.floor((0,v.G0)()*d.$v).toString()}`,{index:r,url:l}=e,u=l?await m({fallback:e.options,url:l,index:r}):e.options,h=(0,c.TA)(u,r),{items:p}=this,f=p.findIndex(e=>e.id.description===s),y=new o({dispatchCallback:(e,t)=>{this.dispatchEvent(e,t)},id:s,onDestroy:e=>{if(!e)return;let t=this.items,i=t.indexOf(y);i>=d.vF&&t.splice(i,d.JC)},pluginManager:this.pluginManager,sourceOptions:h});if(f>=d.PZ){let e=this.item(f),t=e?d.xH:d.dv;e&&!e.destroyed&&e.destroy(!1),p.splice(f,t,y)}else p.push(y);let b=(e=>{let t,i=(0,c.T5)();if(e instanceof HTMLCanvasElement||e.tagName.toLowerCase()===d.RF)t=e,t.dataset[d.eb]??=d.X$;else{let a=e.getElementsByTagName(d.RF)[d.Nx];a?(t=a).dataset[d.eb]=d.X$:((t=i.createElement(d.RF)).dataset[d.eb]=d.ce,e.appendChild(t))}return t.style.width||=g,t.style.height||=g,t})((t=e.element,a=(0,c.T5)(),(n=t??a.getElementById(s))||((n=a.createElement("canvas")).id=s,n.dataset[d.eb]=d.ce,a.body.append(n)),n));return y.canvas.loadCanvas(b),await y.start(),y}async refresh(e=!0){e&&await Promise.all(this.items.map(e=>e.refresh()))}removeEventListener(e,t){this._eventDispatcher.removeEventListener(e,t)}}var b=i(1045),x=i(6129),w=i(1907);(a=s||(s={})).clockwise="clockwise",a.counterClockwise="counter-clockwise",a.random="random";var M=i(8545),z=i(1668),S=i(6101),O=i(1946),P=i(5354),k=i(3832),R=i(9718);(n=r||(r={})).linear="linear",n.radial="radial",n.random="random";var _=i(1386),E=i(4819);(o=l||(l={})).easeInBack="ease-in-back",o.easeInBounce="ease-in-bounce",o.easeInCirc="ease-in-circ",o.easeInCubic="ease-in-cubic",o.easeInElastic="ease-in-elastic",o.easeInExpo="ease-in-expo",o.easeInGaussian="ease-in-gaussian",o.easeInLinear="ease-in-linear",o.easeInQuad="ease-in-quad",o.easeInQuart="ease-in-quart",o.easeInQuint="ease-in-quint",o.easeInSigmoid="ease-in-sigmoid",o.easeInSine="ease-in-sine",o.easeInSmoothstep="ease-in-smoothstep",o.easeOutBack="ease-out-back",o.easeOutBounce="ease-out-bounce",o.easeOutCirc="ease-out-circ",o.easeOutCubic="ease-out-cubic",o.easeOutElastic="ease-out-elastic",o.easeOutExpo="ease-out-expo",o.easeOutGaussian="ease-out-gaussian",o.easeOutLinear="ease-out-linear",o.easeOutQuad="ease-out-quad",o.easeOutQuart="ease-out-quart",o.easeOutQuint="ease-out-quint",o.easeOutSigmoid="ease-out-sigmoid",o.easeOutSine="ease-out-sine",o.easeOutSmoothstep="ease-out-smoothstep",o.easeInOutBack="ease-in-out-back",o.easeInOutBounce="ease-in-out-bounce",o.easeInOutCirc="ease-in-out-circ",o.easeInOutCubic="ease-in-out-cubic",o.easeInOutElastic="ease-in-out-elastic",o.easeInOutExpo="ease-in-out-expo",o.easeInOutGaussian="ease-in-out-gaussian",o.easeInOutLinear="ease-in-out-linear",o.easeInOutQuad="ease-in-out-quad",o.easeInOutQuart="ease-in-out-quart",o.easeInOutQuint="ease-in-out-quint",o.easeInOutSigmoid="ease-in-out-sigmoid",o.easeInOutSine="ease-in-out-sine",o.easeInOutSmoothstep="ease-in-out-smoothstep";var F=i(7662),A=i(602),T=i(5501),I=i(9172),V=i(338),L=i(8886),D=i(3478),$=i(2215),C=i(1196),q=i(4505),G=i(2506),B=i(8008),Z=i(5940),H=i(7793),K=i(6142),j=i(9447),N=i(6019),U=i(414),W=i(7563),X=i(9345),J=i(5487),Y=i(7501),Q=i(9682),ee=i(7086),et=i(4666),ei=i(4770),ea=i(9430),en=i(8806),eo=i(7502),es=i(148),er=i(3897),el=i(8239),ed=i(1912),ec=i(8329),eu=i(714),eh=i(7420);let ep=new y;globalThis.tsParticles=ep}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return a[e](i,i.exports,o),i.exports}o.m=a,o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,i)=>(o.f[i](e,t),t),[])),o.u=e=>""+e+".min.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},o.l=(e,t,i,a)=>{if(s[e])return void s[e].push(t);if(void 0!==i)for(var n,r,l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var c=l[d];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/confetti:"+i){n=c;break}}n||(r=!0,(n=document.createElement("script")).charset="utf-8",o.nc&&n.setAttribute("nonce",o.nc),n.setAttribute("data-webpack","@tsparticles/confetti:"+i),n.src=e),s[e]=[t];var u=(t,i)=>{n.onerror=n.onload=null,clearTimeout(h);var a=s[e];if(delete s[e],n.parentNode&&n.parentNode.removeChild(n),a&&a.forEach(e=>e(i)),t)return t(i)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),r&&document.head.appendChild(n)},o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.g.importScripts&&(r=o.g.location+"");var s,r,l=o.g.document;if(!r&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(r=l.currentScript.src),!r)){var d=l.getElementsByTagName("script");if(d.length)for(var c=d.length-1;c>-1&&(!r||!/^http(s?):/.test(r));)r=d[c--].src}if(!r)throw Error("Automatic publicPath is not supported in this browser");o.p=r=r.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e={1483:0},o.f.j=(t,i)=>{var a=o.o(e,t)?e[t]:void 0;if(0!==a)if(a)i.push(a[2]);else{var n=new Promise((i,n)=>a=e[t]=[i,n]);i.push(a[2]=n);var s=o.p+o.u(t),r=Error();o.l(s,i=>{if(o.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var n=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;r.message="Loading chunk "+t+` failed.
2
- (`+n+": "+s+")",r.name="ChunkLoadError",r.type=n,r.request=s,a[1](r)}},"chunk-"+t,t)}},t=(t,i)=>{var a,n,[s,r,l]=i,d=0;if(s.some(t=>0!==e[t])){for(a in r)o.o(r,a)&&(o.m[a]=r[a]);l&&l(o)}for(t&&t(i);d<s.length;d++)n=s[d],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0},(i=this.webpackChunk_tsparticles_confetti=this.webpackChunk_tsparticles_confetti||[]).forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i));var u={};o.r(u),o.d(u,{AlterType:()=>h.HKZ,AnimatableColor:()=>h.A9e,AnimationMode:()=>h.gmr,AnimationOptions:()=>h.pK_,AnimationStatus:()=>h.H_P,AnimationValueWithRandom:()=>h.Jmi,Background:()=>h.VS$,BaseRange:()=>h.dgY,Circle:()=>h.jlt,ColorAnimation:()=>h.evc,DestroyType:()=>h.VKE,EasingType:()=>h.mgy,EventType:()=>h.Bx4,Fill:()=>h.SQl,FullScreen:()=>h.mcU,GradientType:()=>h.hqM,HslAnimation:()=>h.i74,LimitMode:()=>h.dtg,Move:()=>h.yUV,MoveAngle:()=>h.hzL,MoveCenter:()=>h.Zgv,MoveDirection:()=>h.FWc,MoveGravity:()=>h.y1u,MovePath:()=>h.vU7,Opacity:()=>h.Y4E,OpacityAnimation:()=>h.IhC,Options:()=>h.JYR,OptionsColor:()=>h.Oit,OutMode:()=>h.Yzx,OutModeDirection:()=>h.v5k,OutModes:()=>h.j$q,ParticleOutType:()=>h.x_I,ParticlesBounce:()=>h.wvn,ParticlesBounceFactor:()=>h.F5W,ParticlesDensity:()=>h.M1g,ParticlesNumber:()=>h.NeW,ParticlesNumberLimit:()=>h.Ad4,ParticlesOptions:()=>h.UOj,PixelMode:()=>h.qiC,RangedAnimationOptions:()=>h.Q4c,RangedAnimationValueWithRandom:()=>h.AIw,Rectangle:()=>h.M_G,ResizeEvent:()=>h.z0z,RotateDirection:()=>h.pTR,Shape:()=>h.ypk,Size:()=>h.or0,SizeAnimation:()=>h.qvJ,Spin:()=>h.tKH,StartValueType:()=>h.SKz,Stroke:()=>h.tcj,ValueWithRandom:()=>h.PVU,Vector:()=>h.Miz,Vector3d:()=>h.pGL,ZIndex:()=>h.Pyx,alterHsl:()=>h.yxh,animate:()=>h.i0Z,areBoundsInside:()=>h.O2_,arrayRandomIndex:()=>h.n02,calcExactPositionOrRandomFromSize:()=>h.NxB,calcExactPositionOrRandomFromSizeRanged:()=>h.qMV,calcPositionFromSize:()=>h.ehY,calcPositionOrRandomFromSize:()=>h.MhH,calcPositionOrRandomFromSizeRanged:()=>h.l1q,calculateBounds:()=>h.AEc,cancelAnimation:()=>h.pxm,canvasFirstIndex:()=>h.Nxk,canvasTag:()=>h.RFH,checkDistance:()=>h.gpg,circleBounce:()=>h.pEn,circleBounceDataFromParticle:()=>h.Tgl,clamp:()=>h.qE8,clear:()=>h.IUd,cloneStyle:()=>h.td3,collisionVelocity:()=>h.OWw,colorMix:()=>h.EYT,colorToHsl:()=>h.mKQ,colorToRgb:()=>h.qe,confetti:()=>b,countOffset:()=>h.nqC,decayOffset:()=>h.WH8,deepExtend:()=>h.zwS,defaultAlpha:()=>h.aZx,defaultAngle:()=>h.tAJ,defaultCompositeValue:()=>h.yjn,defaultDensityFactor:()=>h.lA,defaultFps:()=>h.z$P,defaultFpsLimit:()=>h.i8E,defaultLoops:()=>h.hKc,defaultOpacity:()=>h.hvP,defaultRatio:()=>h.$xb,defaultReduceFactor:()=>h.ZpR,defaultRemoveQuantity:()=>h.xd3,defaultRetryCount:()=>h.rqX,defaultRgbMin:()=>h.Fli,defaultTime:()=>h.tRb,defaultTransform:()=>h.UgP,defaultTransformValue:()=>h.zss,defaultVelocity:()=>h.jnW,defaultZoom:()=>h.Pf9,degToRad:()=>h.puj,deleteCount:()=>h.LDU,double:()=>h.gdl,doublePI:()=>h.R1e,drawAfterEffect:()=>h.kac,drawBeforeEffect:()=>h.z5n,drawParticle:()=>h.p0m,drawParticlePlugin:()=>h.Wbn,drawShape:()=>h.KG7,drawShapeAfterDraw:()=>h.gF3,drawShapeBeforeDraw:()=>h.VGT,empty:()=>h.Iex,executeOnSingleOrMultiple:()=>h.wJ2,findItemFromSingleOrMultiple:()=>h.w3Z,generatedAttribute:()=>h.eb4,generatedFalse:()=>h.X$G,generatedTrue:()=>h.cei,getDistance:()=>h.YfF,getDistanceSq:()=>h.Scl,getDistances:()=>h.vrU,getFullScreenStyle:()=>h.hJS,getHslAnimationFromHsl:()=>h.pzy,getHslFromAnimation:()=>h.O_i,getItemMapFromInitializer:()=>h.OtU,getItemsFromInitializer:()=>h.HQK,getLinkColor:()=>h._hh,getLinkRandomColor:()=>h.PGG,getLogger:()=>h.tZQ,getParticleBaseVelocity:()=>h.$mf,getParticleDirectionAngle:()=>h.JYE,getPosition:()=>h.E90,getRandom:()=>h.G0i,getRandomInRange:()=>h.e4g,getRandomRgbColor:()=>h.OHq,getRangeMax:()=>h.W9e,getRangeMin:()=>h.Sgh,getRangeValue:()=>h.VGA,getSize:()=>h.YCE,getStyleFromHsl:()=>h.LCf,getStyleFromRgb:()=>h.xxz,hMax:()=>h.vSh,hMin:()=>h.L1V,hPhase:()=>h.U0s,half:()=>h.MXx,hasMatchMedia:()=>h.q8J,hslToRgb:()=>h.YLU,hslaToRgba:()=>h.ayx,identity:()=>h.D_O,initParticleNumericAnimationValue:()=>h.XsS,inverseFactorNumerator:()=>h.hBr,isArray:()=>h.cyL,isBoolean:()=>h.Lmq,isFunction:()=>h.Tnt,isInArray:()=>h.hnD,isNull:()=>h.kZJ,isNumber:()=>h.EtT,isObject:()=>h.Gvm,isPointInside:()=>h.Tj8,isString:()=>h.KgX,itemFromArray:()=>h.Vh1,itemFromSingleOrMultiple:()=>h.TA3,lFactor:()=>h.iUN,lMax:()=>h.$_c,lMin:()=>h.vd6,lengthOffset:()=>h.K3,loadMinIndex:()=>h.PZY,loadOptions:()=>h.ZGK,loadParticlesOptions:()=>h.yVN,loadRandomFactor:()=>h.$v4,manageListener:()=>h.KpY,memoize:()=>h.BjF,midColorValue:()=>h.BWm,millisecondsToSeconds:()=>h.XuV,minCount:()=>h.wMU,minFpsLimit:()=>h.DNI,minIndex:()=>h.z94,minLimit:()=>h.ou7,minStrokeWidth:()=>h.Dvh,minVelocity:()=>h.GWL,minZ:()=>h.X_1,minimumSize:()=>h.w20,mix:()=>h.jhA,none:()=>h.dvp,one:()=>h.xHs,originPoint:()=>h.boI,paintBase:()=>h.SnF,paintImage:()=>h.MdX,parseAlpha:()=>h.M3Y,percentDenominator:()=>h.a56,phaseNumerator:()=>h.BFN,quarter:()=>h.$GP,randomColorValue:()=>h.mRf,randomInRangeValue:()=>h.vEz,rangeColorToHsl:()=>h.R5R,rangeColorToRgb:()=>h.BN0,removeDeleteCount:()=>h.JC0,removeMinIndex:()=>h.vFD,resizeEvent:()=>h.NFi,rgbMax:()=>h.oiR,rgbToHsl:()=>h.K6u,sMax:()=>h.euA,sMin:()=>h.yxQ,sNormalizedOffset:()=>h.aEA,safeDocument:()=>h.T5G,safeIntersectionObserver:()=>h.BRq,safeMatchMedia:()=>h.lVH,safeMutationObserver:()=>h.tGT,setAnimationFunctions:()=>h.ADE,setLogger:()=>h.Bro,setRandom:()=>h.OEu,setRangeValue:()=>h.DT4,sextuple:()=>h.zgn,spatialHashGridCellSize:()=>h.iXO,squareExp:()=>h.dmB,stringToAlpha:()=>h.zIs,stringToRgb:()=>h.egF,threeQuarter:()=>h.RqE,triple:()=>h.NuQ,tryCountIncrement:()=>h.Eow,tsParticles:()=>h.$k3,updateAnimation:()=>h.UC0,updateColor:()=>h.JvX,updateColorValue:()=>h.Kog,visibilityChangeEvent:()=>h.nKi,zIndexFactorOffset:()=>h.RVs});var h=o(8753);class p{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;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/h.a56,y:this.position.y/h.a56}}set origin(e){this.position.x=e.x*h.a56,this.position.y=e.y*h.a56}get particleCount(){return this.count}set particleCount(e){this.count=e}load(e){if((0,h.kZJ)(e))return;void 0!==e.angle&&(this.angle=e.angle);let 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);let i=e.origin;i&&!e.position&&(e.position={x:void 0===i.x?void 0:i.x*h.a56,y:void 0===i.y?void 0:i.y*h.a56});let 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,h.cyL)(e.colors)?this.colors=[...e.colors]:this.colors=e.colors);let n=e.shapeOptions;if(void 0!==n)for(let e in n){let t=n[e];t&&(this.shapeOptions[e]=(0,h.zwS)(this.shapeOptions[e]??{},t))}void 0!==e.shapes&&((0,h.cyL)(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)}}let f=!1,v=!1,g=new Map;async function m(e){if(!f){if(v)return new Promise(e=>{let t=setInterval(()=>{f&&(clearInterval(t),e())},100)});v=!0,e.checkVersion("4.0.0-beta.8"),await e.pluginManager.register(async e=>{let[{loadBasic:t},{loadEmittersPluginSimple:i},{loadMotionPlugin:a},{loadCardSuitsShape:n},{loadHeartShape:s},{loadImageShape:r},{loadPolygonShape:l},{loadSquareShape:d},{loadStarShape:c},{loadEmojiShape:u},{loadRotateUpdater:h},{loadLifeUpdater:p},{loadRollUpdater:f},{loadTiltUpdater:v},{loadWobbleUpdater:g}]=await Promise.all([o.e(2760).then(o.bind(o,2760)),o.e(404).then(o.bind(o,404)),o.e(980).then(o.bind(o,980)),o.e(6265).then(o.bind(o,6265)),o.e(2182).then(o.bind(o,2182)),o.e(7213).then(o.bind(o,7213)),o.e(6972).then(o.bind(o,6972)),o.e(9907).then(o.bind(o,9907)),o.e(6466).then(o.bind(o,6466)),o.e(7316).then(o.bind(o,7316)),o.e(4519).then(o.bind(o,4519)),o.e(6996).then(o.bind(o,6996)),o.e(7259).then(o.bind(o,7259)),o.e(1583).then(o.bind(o,1583)),o.e(4657).then(o.bind(o,4657))]);await Promise.all([t(e),a(e),i(e),n(e),s(e),r(e),l(e),d(e),c(e),u(e),h(e),p(e),f(e),v(e),g(e)])}),v=!1,f=!0}}async function y(e){let t,i=new p;i.load(e.options);let a=i.ticks*h.XuV/(3.6*h.XuV*120);if(g.has(e.id)&&(t=g.get(e.id))&&!t.destroyed){let e=t;if("addEmitter"in e)return void await e.addEmitter?.({startCount:i.count,position:i.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{fill:{color:{value:i.colors},enable:!0},shape:{type:i.shapes,options:i.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min",count:1}},size:{value:5*i.scalar},move:{angle:{value:i.spread,offset:0},drift:{min:-i.drift,max:i.drift},gravity:{acceleration:9.81*i.gravity},speed:3*i.startVelocity,decay:1-i.decay,direction:-i.angle},rotate:{value:i.flat?0:{min:0,max:360},direction:"random",animation:{enable:!i.flat,speed:60}},tilt:{direction:"random",enable:!i.flat,value:i.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!i.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!i.flat,speed:{min:-15,max:15}}}})}let n={fullScreen:{enable:!e.canvas,zIndex:i.zIndex},fpsLimit:120,particles:{number:{value:0},fill:{color:{value:i.colors},enable:!0},shape:{type:i.shapes,options:i.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:a,startValue:"max",destroy:"min",count:1}},size:{value:5*i.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:i.spread,offset:0},drift:{min:-i.drift,max:i.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*i.gravity},speed:3*i.startVelocity,decay:1-i.decay,direction:-i.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:i.flat?0:{min:0,max:360},direction:"random",animation:{enable:!i.flat,speed:60}},tilt:{direction:"random",enable:!i.flat,value:i.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!i.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!i.flat,speed:{min:-15,max:15}}},motion:{disable:i.disableForReducedMotion},emitters:{name:"confetti",startCount:i.count,position:i.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return t=await h.$k3.load({id:e.id,element:e.canvas,options:n}),g.set(e.id,t),t}async function b(e,t){let i,a;return await m(h.$k3),(0,h.KgX)(e)?(a=e,i=t??{}):(a="confetti",i=e),y({id:a,options:i})}return b.create=async(e,t)=>{await m(h.$k3);let i=e.getAttribute("id")??"confetti";return e.setAttribute("id",i),async(a,n)=>{let o,s;return(0,h.KgX)(a)?(s=a,o=n??t):(s=i,o=a),y({id:s,canvas:e,options:o})}},b.init=async()=>{await m(h.$k3)},b.version="4.0.0-beta.8",globalThis.confetti=b,u})());
1
+ !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.confetti=t.__tsParticlesInternals.bundles.confetti||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,_=100,w=.25,b=.75;var x;function P(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class M{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,P(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??l.y,i??l.z):new M(t.x,t.y,P(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+P(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=P(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=P(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-P(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=P(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return z.create(l.x,l.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??l.y):new z(t.x,t.y)}}function S(t){return"boolean"==typeof t}function C(t){return"string"==typeof t}function k(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function O(t){return null==t}const T=Math.PI/180;let E=Math.random;const R={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return V(E(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function B(t){return R.nextFrame(t)}function L(t){R.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=j(t);let i=G(t);return e===i&&(i=0),F(i,e)}function q(t){return k(t)?t:$(t)}function G(t){return k(t)?t:t.min}function j(t){return k(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&k(t))return t;const i=G(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function H(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(H(t,e))}function K(t,e,i){return H(t,e)<=i*i}function X(t){return t*T}function Y(e,i,s){if(k(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function Z(t){const e=z.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return z.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function et(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,at,ot,rt,lt,ct;t.AnimationMode=void 0,(nt=t.AnimationMode||(t.AnimationMode={})).auto="auto",nt.increase="increase",nt.decrease="decrease",nt.random="random",t.AnimationStatus=void 0,(at=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",at.decreasing="decreasing",t.DestroyType=void 0,(ot=t.DestroyType||(t.DestroyType={})).none="none",ot.max="max",ot.min="min",t.OutModeDirection=void 0,(rt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",rt.left="left",rt.right="right",rt.top="top",t.PixelMode=void 0,(lt=t.PixelMode||(t.PixelMode={})).precise="precise",lt.percent="percent",t.StartValueType=void 0,(ct=t.StartValueType||(t.StartValueType={})).max="max",ct.min="min",ct.random="random";function ht(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function dt(){return"undefined"!=typeof matchMedia}function ut(){return globalThis.document}function pt(t){if(dt())return matchMedia(t)}function gt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ft(t,e){return t===e||I(e)&&e.includes(t)}function yt(t){return Math.floor(A()*t.length)}function mt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:yt(t)]}function vt(t,e,i,s,n){return _t(wt(t,s??0),e,i,n)}function _t(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function wt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function bt(t,...e){for(const i of e){if(O(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>bt(void 0,t)):bt(e[n],a)}}return t}function xt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Pt(t,e,i){return I(t)?mt(t,e,i):t}function Mt(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:j(s)*i,min:G(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=$(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function zt(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}function St(t,e){return zt(t,e)}function Ct(t,e){return zt(t,e)}function kt(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=V(i.value,r,l))}}function Dt(t){const e=ut().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}const It=ht(function(t){const e=ut().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Ot(t,e,i,s,n){if(s){let s={passive:!0};S(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Tt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function Et(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Rt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var At;t.EventType=void 0,(At=t.EventType||(t.EventType={})).configAdded="configAdded",At.containerInit="containerInit",At.particlesSetup="particlesSetup",At.containerStarted="containerStarted",At.containerStopped="containerStopped",At.containerDestroyed="containerDestroyed",At.containerPaused="containerPaused",At.containerPlay="containerPlay",At.containerBuilt="containerBuilt",At.particleAdded="particleAdded",At.particleDestroyed="particleDestroyed",At.particleRemoved="particleRemoved";class Ft{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this._configs.set(i,e),this._engine.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Et(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Et(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Tt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const Bt=t=>(...e)=>{t(...e)},Lt={debug:Bt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Bt(console.info),log:Bt(console.log),trace:Bt(console.trace),verbose:Bt(console.log),warning:Bt(console.warn)};function Vt(){return Lt}const Ut="100%";class $t{pluginManager=new Ft(this);_domArray=[];_eventDispatcher=new Rt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0"}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return aa}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=Pt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Vt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=Pt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ut();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Ut,s.style.height||=Ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Ut,s.style.height||=Ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ut();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var qt,Gt,jt,Wt,Nt,Ht,Qt,Kt;!function(t){t.circle="circle",t.rectangle="rectangle"}(qt||(qt={}));class Xt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Yt extends Xt{radius;constructor(t,e,i){super(t,e,qt.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Yt||t.type===qt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Zt||t.type===qt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Zt extends Xt{size;constructor(t,e,i,s){super(t,e,qt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Yt)return t.intersects(this);if(!(t instanceof Zt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Gt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Gt.counterClockwise="counter-clockwise",Gt.random="random",t.LimitMode=void 0,(jt=t.LimitMode||(t.LimitMode={})).delete="delete",jt.wait="wait",t.OutMode=void 0,(Wt=t.OutMode||(t.OutMode={})).bounce="bounce",Wt.none="none",Wt.out="out",Wt.destroy="destroy",Wt.split="split",t.AlterType=void 0,(Nt=t.AlterType||(t.AlterType={})).darken="darken",Nt.enlighten="enlighten",t.GradientType=void 0,(Ht=t.GradientType||(t.GradientType={})).linear="linear",Ht.radial="radial",Ht.random="random",t.ParticleOutType=void 0,(Qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Qt.inside="inside",Qt.outside="outside",t.EasingType=void 0,(Kt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Kt.easeInBounce="ease-in-bounce",Kt.easeInCirc="ease-in-circ",Kt.easeInCubic="ease-in-cubic",Kt.easeInElastic="ease-in-elastic",Kt.easeInExpo="ease-in-expo",Kt.easeInGaussian="ease-in-gaussian",Kt.easeInLinear="ease-in-linear",Kt.easeInQuad="ease-in-quad",Kt.easeInQuart="ease-in-quart",Kt.easeInQuint="ease-in-quint",Kt.easeInSigmoid="ease-in-sigmoid",Kt.easeInSine="ease-in-sine",Kt.easeInSmoothstep="ease-in-smoothstep",Kt.easeOutBack="ease-out-back",Kt.easeOutBounce="ease-out-bounce",Kt.easeOutCirc="ease-out-circ",Kt.easeOutCubic="ease-out-cubic",Kt.easeOutElastic="ease-out-elastic",Kt.easeOutExpo="ease-out-expo",Kt.easeOutGaussian="ease-out-gaussian",Kt.easeOutLinear="ease-out-linear",Kt.easeOutQuad="ease-out-quad",Kt.easeOutQuart="ease-out-quart",Kt.easeOutQuint="ease-out-quint",Kt.easeOutSigmoid="ease-out-sigmoid",Kt.easeOutSine="ease-out-sine",Kt.easeOutSmoothstep="ease-out-smoothstep",Kt.easeInOutBack="ease-in-out-back",Kt.easeInOutBounce="ease-in-out-bounce",Kt.easeInOutCirc="ease-in-out-circ",Kt.easeInOutCubic="ease-in-out-cubic",Kt.easeInOutElastic="ease-in-out-elastic",Kt.easeInOutExpo="ease-in-out-expo",Kt.easeInOutGaussian="ease-in-out-gaussian",Kt.easeInOutLinear="ease-in-out-linear",Kt.easeInOutQuad="ease-in-out-quad",Kt.easeInOutQuart="ease-in-out-quart",Kt.easeInOutQuint="ease-in-out-quint",Kt.easeInOutSigmoid="ease-in-out-sigmoid",Kt.easeInOutSine="ease-in-out-sine",Kt.easeInOutSmoothstep="ease-in-out-smoothstep";class Jt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){O(t)||(void 0!==t.count&&(this.count=W(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=W(t.speed)),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.delay&&(this.delay=W(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class te extends Jt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ee extends Jt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),O(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=W(t.offset)))}}class ie{h=new ee(0,m);l=new ee(0,_);s=new ee(0,v);load(t){O(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class se{value;constructor(){this.value=""}static create(t,e){const i=new se;return i.load(t),void 0!==e&&(C(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){O(t)||O(t.value)||(this.value=t.value)}}class ne extends se{animation;constructor(){super(),this.animation=new ie}static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(C(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ae{color;image;opacity;position;repeat;size;constructor(){this.color=new se,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=se.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class oe{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class re{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){O(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class le{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=bt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ce{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class he{offset;value;constructor(){this.offset=0,this.value=90}load(t){O(t)||(void 0!==t.offset&&(this.offset=W(t.offset)),void 0!==t.value&&(this.value=W(t.value)))}}class de{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){O(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ue{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=W(t.maxSpeed)))}}class pe{value;constructor(){this.value=0}load(t){O(t)||O(t.value)||(this.value=W(t.value))}}class ge extends pe{animation=new Jt;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class fe extends ge{animation;constructor(){super(),this.animation=new te}load(t){super.load(t)}}class ye{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new pe,this.enable=!1,this.options={}}load(t){O(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=bt(this.options,t.options)))}}class me{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){O(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class ve{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=bt({},t.position)))}}class _e{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new he,this.center=new de,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ue,this.path=new ye,this.outModes=new me,this.random=!1,this.size=!1,this.speed=2,this.spin=new ve,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(O(t))return;this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=W(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=W(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class we extends te{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class be extends fe{animation;constructor(){super(),this.animation=new we,this.value=1}load(t){if(O(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xe{color;opacity;width;constructor(){this.width=0}load(t){O(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.width&&(this.width=W(t.width)),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class Pe{color;fill;stroke;load(t){O(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new ce,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class Me extends pe{constructor(){super(),this.value=1}}class ze{horizontal;vertical;constructor(){this.horizontal=new Me,this.vertical=new Me}load(t){O(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Se{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(O(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Ce{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ke{density;limit;value;constructor(){this.density=new Se,this.limit=new Ce,this.value=0}load(t){O(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class De{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=bt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Ie extends te{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Oe extends fe{animation;constructor(){super(),this.animation=new Ie,this.value=3}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Te extends pe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),O(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Ee{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ze,this.effect=new le,this.groups={},this.move=new _e,this.number=new ke,this.opacity=new be,this.paint=new Pe,this.paint.color=new ne,this.paint.color.value="#fff",this.paint.fill=new ce,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new De,this.size=new Oe,this.zIndex=new Te}load(t){if(O(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=bt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(I(e)?this.paint=xt(e,t=>{const e=new Pe;return e.load(t),e}):I(this.paint)?(this.paint=new Pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Re(t,...e){for(const i of e)t.load(i)}function Ae(t,e,...i){const s=new Ee(t,e);return Re(s,...i),s}class Fe{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new ae,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new oe,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ae(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new re,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(O(t))return;void 0!==t.preset&&(this.preset=t.preset,xt(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=W(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=W(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;S(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=bt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function Be(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Le(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Ve(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ue(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;qe(m,y),We(v,y),Ge(v,y),je(v,y),$e(m,y),i.resetTransform()}function $e(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function qe(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Ge(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}function je(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function We(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ne(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const He=new Map;function Qe(t,e){let i=He.get(t);if(!i){if(i=e(),He.size>=1e3){[...He.keys()].slice(0,500).forEach(t=>He.delete(t))}He.set(t,i)}return i}function Ke(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Xe(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return Ye(t,n.value,i,s);if(I(n.value)){const e=mt(n.value,i,s);if(!e)return;return Xe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ye(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return n.value===h?si():ti(t,n.value);if(I(n.value)){const e=mt(n.value,i,s);if(!e)return;return Ye(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ze(t,e,i,s=!0){const n=Xe(t,e,i,s);return n?Je(n):void 0}function Je(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=_,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function ti(t,e){return Ke(t,e)}function ei(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(_,t.l)),n=e/m,a=i/v,r=s/_;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,d=1/3,u=Math.min(y,y*l(h,c,n+d)),p=Math.min(y,y*l(h,c,n)),g=Math.min(y,y*l(h,c,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function ii(t){const e=ei(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function si(t){const e=t??0,i=()=>Math.floor(F(e,256));return{b:i(),g:i(),r:i()}}function ni(t,e,i){const s=i??1;return Qe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?ai(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ai(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function oi(t,e,i){const s=i??1;return Qe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return ai(ei(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function ri(t,e,i,s){let n=t,a=e;return"r"in n||(n=ei(t)),"r"in a||(a=ei(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function li(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ci(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:_}};return e&&(hi(s.h,e.h,i),hi(s.s,e.s,i),hi(s.l,e.l,i)),s}function hi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=W(i.offset)):e.velocity=0}function di(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?$(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,l,r)}function ui(t,e){if(!t)return;const{h:i,s:s,l:n}=t;di(i,!1,e),di(s,!0,e),di(n,!0,e)}function pi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const gi=new $t;class fi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=D(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function yi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new fi))})}var mi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(mi||(mi={}));const vi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,_i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class wi{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(vi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=_i.exec(e);return i?{a:i[mi.a]?Number.parseInt(i[mi.a],16)/255:1,b:Number.parseInt(i[mi.b]??"0",16),g:Number.parseInt(i[mi.g]??"0",16),r:Number.parseInt(i[mi.r]??"0",16)}:void 0}}async function bi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new wi)})}var xi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(xi||(xi={}));const Pi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Mi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ei(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ei({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Pi.exec(t);return e?ii({a:e.length>4?st(e[xi.a]):1,h:Number.parseInt(e[xi.h]??"0",10),l:Number.parseInt(e[xi.l]??"0",10),s:Number.parseInt(e[xi.s]??"0",10)}):void 0}}async function zi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Mi)})}class Si{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ra});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Ci(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Et(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Si(t.pluginManager))})}class ki{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=Mt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&kt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Di(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ki(t)))})}class Ii{container;modes;_particleBouncePlugins;constructor(e){this.container=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this._particleBouncePlugins=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;let o=!1;for(const t of this._particleBouncePlugins)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=wt(r,c),d=a.canvas.size;!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.direction===t.OutModeDirection.right&&e.bounds.right>=e.canvasSize.width&&i>0||e.direction===t.OutModeDirection.left&&e.bounds.left<=0&&i<0){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.bounds.right>=e.canvasSize.width&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.bounds.left<=0&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.direction===t.OutModeDirection.bottom&&e.bounds.bottom>=e.canvasSize.height&&i>0||e.direction===t.OutModeDirection.top&&e.bounds.top<=0&&i<0){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.bounds.bottom>=e.canvasSize.height&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.bounds.top<=0&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,size:c})}}class Oi{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(vt(e.position,a.canvas.size,l,e.getRadius(),i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}class Ti{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.container,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;vt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ei=z.origin;class Ri{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ei.setTo(l),Ei.length=e.moveCenter.radius,Ei.angle=e.velocity.angle+Math.PI,Ei.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Ei);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor($({min:0,max:a.canvas.size.width})),e.position.y=Math.floor($({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(vt(e.position,a.canvas.size,l,e.getRadius(),i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor($({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor($({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=wt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ai{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,t.OutMode.bounce,t=>new Ii(t)),this._addUpdaterIfMissing(e,t.OutMode.out,t=>new Ri(t)),this._addUpdaterIfMissing(e,t.OutMode.destroy,t=>new Oi(t)),this._addUpdaterIfMissing(e,t.OutMode.none,t=>new Ti(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this._updateOutMode(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this._updateOutMode(e,i,s.left??s.default,t.OutModeDirection.left),this._updateOutMode(e,i,s.right??s.default,t.OutModeDirection.right),this._updateOutMode(e,i,s.top??s.default,t.OutModeDirection.top)}_addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Fi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ai(t)))})}class Bi{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=Pt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ne.create(void 0===a?void 0:ne.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ze(this._pluginManager,i);s&&(t.fillColor=ci(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ne.create(void 0===a?void 0:ne.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ze(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=ci(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ui(t.fillColor,e),ui(t.strokeColor,e))}}async function Li(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Bi(t.pluginManager,e)))})}var Vi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Vi||(Vi={}));const Ui=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class $i{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ui.exec(t);return e?{a:e.length>4?st(e[Vi.a]):1,b:parseInt(e[Vi.b]??"0",10),g:parseInt(e[Vi.g]??"0",10),r:parseInt(e[Vi.r]??"0",10)}:void 0}}async function qi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new $i)})}class Gi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,i.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&kt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ji(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Gi(t)))})}async function Wi(t){t.checkVersion("4.0.0"),await t.pluginManager.register(async t=>{await Promise.all([bi(t),zi(t),qi(t),Ci(t),yi(t),Li(t),Di(t),Fi(t),ji(t)])})}var Ni;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Ni||(Ni={}));function Hi(t,e,i){const s=i.segments[0];if(!s)return;const n=s.values[0];if(!n)return;t.moveTo(n.x*e,n.y*e);for(const s of i.segments){const i=s.values[0];if(!i)continue;const n=s.values[1],a=s.values[2],o=s.values[3];switch(s.type){case Ni.move:t.moveTo(i.x*e,i.y*e);break;case Ni.line:t.lineTo(i.x*e,i.y*e);break;case Ni.bezier:if(!n||!a||!o)continue;t.bezierCurveTo(n.x*e,n.y*e,a.x*e,a.y*e,o.x*e,o.y*e);break;case Ni.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case Ni.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case Ni.ellipse:if(!n||!a||!o)continue;t.ellipse(i.x*e,i.y*e,n.x*e,n.y*e,a.x,o.x,o.y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s];if(!n)continue;const a=n.values[0],o=1,r=2,l=n.values[o],c=n.values[r];switch(n.type){case Ni.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case Ni.bezier:if(!a||!l||!c)break;t.bezierCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e,-a.x*e,a.y*e);break;case Ni.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case Ni.arc:case Ni.ellipse:}}}var Qi;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(Qi||(Qi={}));const Ki=o,Xi=.25,Yi=-Ki,Zi=-.25,Ji=.0625,ts=.375,es={half:!0,segments:[{type:Ni.bezier,values:[{x:0,y:Yi},{x:0,y:Yi},{x:Xi,y:Yi},{x:Xi,y:Zi}]},{type:Ni.bezier,values:[{x:Xi,y:Zi},{x:Xi,y:Zi},{x:Ki,y:Zi},{x:Ki,y:0}]},{type:Ni.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:Ki,y:Xi},{x:Xi,y:Xi}]},{type:Ni.bezier,values:[{x:Xi,y:Xi},{x:Xi,y:Xi},{x:Ji,y:Xi},{x:Ji,y:Ji}]},{type:Ni.bezier,values:[{x:Ji,y:Ji},{x:Ji,y:Xi},{x:Xi,y:Ki},{x:Xi,y:Ki}]},{type:Ni.bezier,values:[{x:Xi,y:Ki},{x:Xi,y:Ki},{x:0,y:Ki},{x:0,y:Ki}]}]},is={half:!0,segments:[{type:Ni.bezier,values:[{x:0,y:Ki},{x:0,y:Ki},{x:ts,y:0},{x:ts,y:0}]},{type:Ni.bezier,values:[{x:ts,y:0},{x:ts,y:0},{x:0,y:Yi},{x:0,y:Yi}]}]},ss={half:!0,segments:[{type:Ni.bezier,values:[{x:0,y:Ki},{x:0,y:Ki},{x:Ki,y:0},{x:Ki,y:Zi}]},{type:Ni.bezier,values:[{x:Ki,y:Zi},{x:Ki,y:Zi},{x:Ki,y:Yi},{x:Xi,y:Yi}]},{type:Ni.bezier,values:[{x:Xi,y:Yi},{x:Xi,y:Yi},{x:0,y:Yi},{x:0,y:Zi}]}]},ns={half:!0,segments:[{type:Ni.bezier,values:[{x:0,y:Yi},{x:0,y:Yi},{x:Ki,y:Zi},{x:Ki,y:0}]},{type:Ni.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:Ki,y:Xi},{x:Xi,y:Xi}]},{type:Ni.bezier,values:[{x:Xi,y:Xi},{x:Xi,y:Xi},{x:Ji,y:Xi},{x:Ji,y:Ji}]},{type:Ni.bezier,values:[{x:Ji,y:Ji},{x:Ji,y:Xi},{x:Xi,y:Ki},{x:Xi,y:Ki}]},{type:Ni.bezier,values:[{x:Xi,y:Ki},{x:Xi,y:Ki},{x:0,y:Ki},{x:0,y:Ki}]}]},as={[Qi.hearts]:ss,[Qi.diamonds]:is,[Qi.clubs]:es,[Qi.spades]:ns};class os{draw(t){const{context:e,radius:i}=t;Hi(e,i,as.clubs)}}async function rs(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new os))})}class ls{draw(t){const{context:e,radius:i}=t;Hi(e,i,as.diamonds)}}async function cs(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new ls))})}let hs=class{draw(t){const{context:e,radius:i}=t;Hi(e,i,as.hearts)}};async function ds(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new hs))})}class us{draw(t){const{context:e,radius:i}=t;Hi(e,i,as.spades)}}async function ps(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new us))})}async function gs(t){t.checkVersion("4.0.0"),await Promise.all([rs(t),cs(t),ds(t),ps(t)])}class fs{count;delay;duration;wait;constructor(){this.wait=!1}load(t){O(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=W(t.delay)),void 0!==t.duration&&(this.duration=W(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class ys{delay;quantity;constructor(){this.quantity=1,this.delay=.1}load(t){O(t)||(void 0!==t.quantity&&(this.quantity=W(t.quantity)),void 0!==t.delay&&(this.delay=W(t.delay)))}}class ms{color;opacity;constructor(){this.color=!1,this.opacity=!1}load(t){O(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class vs{options;replace;type;constructor(){this.options={},this.replace=new ms,this.type="square"}load(t){O(t)||(void 0!==t.options&&(this.options=bt({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class _s{height;mode;width;constructor(){this.mode=t.PixelMode.percent,this.height=0,this.width=0}load(t){O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ws{fill;stroke;load(t){O(t)||(t.fill&&(this.fill??=new ce,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class bs{autoPlay;direction;domId;fill;life;name;particles;position;rate;shape;size;spawn;spawnFillColor;spawnStrokeColor;startCount;constructor(){this.autoPlay=!0,this.fill=!0,this.life=new fs,this.rate=new ys,this.shape=new vs,this.spawn=new ws,this.startCount=0}load(t){O(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size??=new _s,this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=xt(t.particles,t=>bt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ne,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ne,this.spawnStrokeColor.load(t.spawnStrokeColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class xs{id="emitters";_instancesManager;constructor(t){this._instancesManager=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return la});return new e(this._instancesManager,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=xt(i.emitters,t=>{const e=new bs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ps=new WeakMap;var Ms;async function zs(t){t.checkVersion("4.0.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ps.get(e);return i||(i=Promise.resolve().then(function(){return da}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ps.delete(e),t}),Ps.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ha}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new xs(e))})}!function(t){t.emitter="emitter"}(Ms||(Ms={}));const Ss=["emoji"];async function Cs(t,e){try{await ut().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const ks='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Ds{_emojiShapeDict=new Map;destroy(){for(const[t,e]of this._emojiShapeDict)e instanceof ImageBitmap&&e.close(),this._emojiShapeDict.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this._emojiShapeDict.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Ss.some(t=>ft(t,e.type)))return;const i=[Cs(ks)];xt(Ss.map(t=>e.options[t])[0],t=>{t.font&&i.push(Cs(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=Pt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??ks,padding:i.padding??0,value:s}:{font:ks,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this._emojiShapeDict.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=j(e.size.value),h=c+l,d=2*h,u=new OffscreenCanvas(d,d),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,h,h);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this._emojiShapeDict.set(r,g),e.emojiDataKey=r}}async function Is(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Ss,()=>Promise.resolve(new Ds))})}class Os{draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=i*o,a=i+n,r=-i,l=-i;e.moveTo(r,l+n),e.quadraticCurveTo(r,l,r+n,l),e.quadraticCurveTo(r+i,l,r+i,l+n),e.quadraticCurveTo(r+i,l,r+a,l),e.quadraticCurveTo(r+s,l,r+s,l+n),e.quadraticCurveTo(r+s,l+i,r+a,l+a),e.lineTo(r+i,l+s),e.lineTo(r+n,l+a),e.quadraticCurveTo(r,l+i,r,l+n)}(t)}}async function Ts(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Os))})}const Es=["image","images"],Rs=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function As(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Vt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Fs(t){if("svg"!==t.type)return void await As(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Vt().error("Image not found"),t.error=!0),t.loading=!1}function Bs(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=oi(e,s,i);if(n.includes("fill"))return n.replaceAll(Rs,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await As(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}const Ls=[0,4,2,1],Vs=[8,8,4,2];class Us{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var $s,qs;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}($s||($s={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(qs||(qs={}));function Gs(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function js(t,e,i){const s=e>>>3,n=7&e;return(t[s]+(t[s+1]<<8)+(t[s+2]<<16)&(1<<i)-1<<n)>>>n}async function Ws(t,e,i,s,n,a,o){switch(t.nextByte()){case qs.EndOfFile:return!0;case qs.Image:await async function(t,e,i,s,n,a){const o=e.frames[s(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),l=!(128&~r),c=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const h=1<<1+(7&r);l&&(o.localColorTable=Gs(t,h));const d=t=>{const{r:s,g:a,b:r}=(l?o.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:a,b:r,a:255}:{r:s,g:a,b:r,a:i?Math.trunc((s+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(c){for(let t=0,e=p+1,i=0,s=[[0]],n=0;n<4;n++)if(Ls[n]<o.height){let a=0,r=0,l=!1;for(;!l;){const c=t;if(t=js(g,i,e),i+=e+1,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{t>=s.length?s.push(s[c].concat(s[c][0])):c!==f&&s.push(s[c].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:l}=d(e);u.data.set([t,i,s,l],Ls[n]*o.width+Vs[n]*r+a%(4*o.width)),a+=4}s.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Ls[n]+Vs[n]*r>=o.height&&(l=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,s=-4;const n=[[0]];for(;;){const a=t;if(t=js(g,i,e),i+=e,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=n.length?n.push(n[a].concat(n[a][0])):a!==f&&n.push(n[a].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:a}=d(e);s+=4,u.data.set([t,i,n,a],s)}n.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,s,n,a);break;case qs.Extension:!function(t,e,i,s){switch(t.nextByte()){case qs.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const a=t.nextByte();n.GCreserved=(224&a)>>>5,n.disposalMethod=(28&a)>>>2,n.userInputDelayFlag=!(2&~a);const o=!(1&~a);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&s(r),t.pos++;break}case qs.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case qs.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case qs.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function Ns(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,s){s??=!1;const n=await fetch(t);if(!n.ok&&404===n.status)throw new EvalError("file not found");const a=await n.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new Us(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const l=r.nextByte(),c=!(128&~l);o.colorRes=(112&l)>>>4,o.sortFlag=!(8&~l);const h=1<<1+(7&l),d=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Gs(r,h));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[d];u.data.set(c?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let y=-1,m=!0,v=-1;const _=t=>(t&&(m=!0),y),w=t=>(null!=t&&(v=t),v);try{do{m&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:$s.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),y++,v=-1,m=!1)}while(!await Ws(r,o,s,_,w,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${y.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await As(t)}class Hs{_container;_engine;constructor(t,e){this._engine=t,this._container=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=n,a.gif&&a.gifData)!function(t,e){const{context:i,radius:s,particle:n,delta:a}=t,r=n.image;if(!r?.gifData||!r.gif)return;const c=new OffscreenCanvas(r.gifData.width,r.gifData.height),h=c.getContext("2d",e);if(!h)throw new Error("could not create offscreen canvas context");h.imageSmoothingQuality="low",h.imageSmoothingEnabled=!1,h.clearRect(l.x,l.y,c.width,c.height),n.gifLoopCount??=r.gifLoopCount??0;let d=n.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[d];if(n.gifTime??=0,p.bitmap){switch(i.scale(s/r.gifData.width,s/r.gifData.height),p.disposalMethod){case $s.UndefinedA:case $s.UndefinedB:case $s.UndefinedC:case $s.UndefinedD:case $s.Replace:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height);break;case $s.Combine:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y);break;case $s.RestoreBackground:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),r.gifData.globalColorTable.length?h.putImageData(r.gifData.backgroundImage,u.x,u.y):h.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case $s.RestorePrevious:{const t=h.getImageData(l.x,l.y,c.width,c.height);h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),h.putImageData(t,l.x,l.y)}}if(n.gifTime+=a.value,n.gifTime>p.delayTime){if(n.gifTime-=p.delayTime,++d>=r.gifData.frames.length){if(--n.gifLoopCount<=0)return;d=0,h.clearRect(l.x,l.y,c.width,c.height)}n.gifFrame=d}i.scale(r.gifData.width/s,r.gifData.height/s)}}(t,this._container.canvas.render.settings);else if(r){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(r,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this._engine.loadImage)return;const i=[];for(const s of e.preload)i.push(this._engine.loadImage(t,s));await Promise.all(i)}loadShape(t){const{_container:e}=this;if(!t.shape||!Es.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this._engine.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.loadImageShape(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this._engine.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Bs(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}loadImageShape=async(t,e)=>{if(!this._engine.loadImage)throw new Error("Image shape not initialized");await this._engine.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Qs{gif;height;name;replaceColor;src;width;constructor(){this.src="",this.gif=!1}load(t){O(t)||(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class Ks{id="image-preloader";_engine;constructor(t){this._engine=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return ua});return new e(this._engine,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Qs;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Xs(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.gif?t=>Ns(t,{colorSpace:"srgb"}):i.replaceColor?Fs:As,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Ks(t)),t.pluginManager.addShape(Es,e=>Promise.resolve(new Hs(t,e)))})}class Ys extends pe{sync;constructor(){super(),this.sync=!1}load(t){O(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Zs extends pe{sync;constructor(){super(),this.sync=!1}load(t){O(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Js{count;delay;duration;constructor(){this.count=0,this.delay=new Ys,this.duration=new Zs}load(t){O(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class tn{container;constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?q(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life??=new Js;for(const i of e)t.life.load(i?.life)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=W(0,i.width),o=W(0,i.width);t.position.x=$(a),t.position.y=$(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=q(l.delay.value)*r,s.duration=q(l.duration.value)*r)}(t,e,this.container.canvas.size)}}async function en(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new tn(t)))})}class sn{factor;value;constructor(){this.factor=4,this.value=!0}load(t){O(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class nn{disable;reduce;constructor(){this.disable=!0,this.reduce=new sn}load(t){O(t)||(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class an{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return pa});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new nn),s.load(i?.motion)}needsPlugin(){return!0}}async function on(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new an)})}const rn=new Map;function ln(t,e){const{context:i,radius:s}=t,n=function(t){const e=rn.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return rn.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class cn{draw(t){const{particle:e,radius:i}=t;ln(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class hn extends cn{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class dn extends cn{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function un(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new hn))})}async function pn(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new dn))})}async function gn(t){t.checkVersion("4.0.0"),await Promise.all([un(t),pn(t)])}var fn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(fn||(fn={}));class yn{enable;value;constructor(){this.enable=!1,this.value=0}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=W(t.value)))}}class mn{backColor;darken;enable;enlighten;mode;speed;constructor(){this.darken=new yn,this.enable=!1,this.enlighten=new yn,this.mode=fn.vertical,this.speed=25}load(t){O(t)||(void 0!==t.backColor&&(this.backColor=se.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=W(t.speed)))}}class vn{_pluginManager;constructor(t){this._pluginManager=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===fn.horizontal||s.mode===fn.both,vertical:s.mode===fn.vertical||s.mode===fn.both,angle:A()*u,speed:q(s.speed)/360},s.backColor)i.backColor=Ze(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:q(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:q(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:q(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._pluginManager,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll??=new mn;for(const i of e)t.roll.load(i?.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function _n(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new vn(t.pluginManager)))})}class wn{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=W(t.speed)),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class bn extends pe{animation;direction;path;constructor(){super(),this.animation=new wn,this.direction=t.RotateDirection.clockwise,this.path=!1,this.value=0}load(t){O(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class xn{container;constructor(t){this.container=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:X(q(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.container.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){t.rotate??=new bn;for(const i of e)t.rotate.load(i?.rotate)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(kt(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Pn(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new xn(t)))})}class Mn{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function zn(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Mn))})}const Sn=0,Cn=0;class kn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(Sn,Cn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Sn,Cn-s*a),e.rotate(Math.PI/n),e.lineTo(Sn,Cn-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=q(i?.inset??2)}}async function Dn(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new kn))})}var In;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(In||(In={}));class On{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=W(t.speed)),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Tn extends pe{animation;direction;enable;constructor(){super(),this.animation=new On,this.direction=In.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),O(t)||(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class En{container;constructor(t){this.container=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:X(q(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===In.random){s=Math.floor(2*A())>0?In.counterClockwise:In.clockwise}switch(s){case In.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case In.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-q(n.decay),e.tilt.velocity=q(n.speed)/360*this.container.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt??=new Tn;for(const i of e)t.tilt.load(i?.tilt)}update(e,i){this.isEnabled(e)&&e.tilt&&kt(e,e.tilt,!1,t.DestroyType.none,i)}}async function Rn(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new En(t)))})}class An{angle;move;constructor(){this.angle=50,this.move=10}load(t){O(t)||(void 0!==t.angle&&(this.angle=W(t.angle)),void 0!==t.move&&(this.move=W(t.move)))}}class Fn{distance;enable;speed;constructor(){this.distance=5,this.enable=!1,this.speed=new An}load(t){if(!O(t)&&(void 0!==t.distance&&(this.distance=W(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(k(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Bn{_container;constructor(t){this._container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:q(e.speed.angle)/360,moveSpeed:q(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=q(e?.distance??0)*this._container.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){t.wobble??=new Fn;for(const i of e)t.wobble.load(i?.wobble)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this._container,t,e)}}async function Ln(t){t.checkVersion("4.0.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Bn(t)))})}class Vn{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;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/a,y:this.position.y/a}}set origin(t){this.position.x=t.x*a,this.position.y=t.y*a}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(O(t))return;void 0!==t.angle&&(this.angle=t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.flat&&(this.flat=t.flat),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*a,y:void 0===i.y?void 0:i.y*a});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(I(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.shapeOptions[t]=bt(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(I(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}const Un=new Map;async function $n(t,e){const i=new Vn;i.load(e.options);const s=i.ticks*r/432e3;let n=Un.get(e.id);n instanceof Promise&&(await n,n=Un.get(e.id));const a=n;if(a&&!a.destroyed){const t=a;if("addEmitter"in t)return await async function(t,e,i){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,i,s),a}const o=(async()=>{const n=function(t,e,i){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*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:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{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}}},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}}}}(i,e,s),a=await t.load({id:e.id,element:e.canvas,options:n});return Un.set(e.id,a),a})();return Un.set(e.id,o),o}let qn=null;async function Gn(t){return qn||(qn=async function(t){t.checkVersion("4.0.0"),await t.pluginManager.register(async t=>{await Promise.all([Wi(t),on(t),zs(t),gs(t),Ts(t),Xs(t),gn(t),zn(t),Dn(t),Is(t),Pn(t),en(t),_n(t),Rn(t),Ln(t)])})}(t),qn)}async function jn(t,e){let i,s;return await Gn(gi),C(t)?(s=t,i=e??{}):(s="confetti",i=t),$n(gi,{id:s,options:i})}jn.create=async(t,e={})=>{await Gn(gi);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await $n(gi,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let a,o;return C(s)?(o=s,a=n??e):(o=i,a=s),$n(gi,{id:o,canvas:t??void 0,options:a})}},jn.init=async()=>{await Gn(gi)},jn.version="4.0.0",globalThis.confetti=jn;const Wn=globalThis;Wn.__tsParticlesInternals=Wn.__tsParticlesInternals??{},Wn.confetti=jn;function Nn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Hn{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{Ve(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,g=this._reusableColorStyles,f=a?oi(a,r.hdr,h*d):void 0,y=o?oi(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,g,p),Ue({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)Ne(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Be(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{Le(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation=i)}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{Ve(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Nn(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Ze(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ze(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}const Qn=new WeakMap;function Kn(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Xn{domElement;render;renderCanvas;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new Hn(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*o/t,y:i*o/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=gt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Xe(this._pluginManager,e.color);s.backgroundColor=n?ni(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.domElement&&this.domElement.remove();const i=this._container,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this._generated=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Qn.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Qn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this._originalStyle=Dt(n.style));const a=this._standardSize,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this._container.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=pt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this._container,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas._standardSize,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this._container.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.domElement,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};_repairStyle=()=>{const t=this.domElement;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.domElement,e=this._originalStyle;t&&e&&Kn(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.domElement;t&&Kn(t,It(this._container.actualOptions.fullScreen.zIndex),!0)}}class Yn{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(ut().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*r)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),Ot(document,n,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ot(globalThis,s,e.resize,t);const n=i.canvas.domElement;this._resizeObserver&&!t?(n&&this._resizeObserver.unobserve(n),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&n&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this._handleWindowResize()}),this._resizeObserver.observe(n))}}function Zn(t){if(!ft(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class Jn{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this._container,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this._container.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??li(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??li(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c.a),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c.b,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??c.c,this._cachedTransform.d=e.cos*(t.d??c.d),this._cachedTransform}init(e,i,s,n){const a=this._container;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.retina.pixelRatio,r=a.actualOptions,l=Ae(this._pluginManager,a,r.particles),c=l.reduceDuplicates,d=l.effect.type,u=l.shape.type;this.effect=Pt(d,this.id,c),this.shape=Pt(u,this.id,c);const p=l.effect,g=l.shape;if(s){if(s.effect?.type){const t=Pt(s.effect.type,this.id,c);t&&(this.effect=t,p.load(s.effect))}if(s.shape?.type){const t=Pt(s.shape.type,this.id,c);t&&(this.shape=t,g.load(s.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return bt({close:e.close},Pt(n,i,s))}(this.effect,p,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return bt({close:e.close},Pt(n,i,s))}(this.shape,g,this.id,c):void 0,l.load(s);const f=this.effectData;f&&l.load(f.particles);const y=this.shapeData;let m,v;y&&l.load(y.particles),this.effectClose=f?.close??l.effect.close,this.shapeClose=y?.close??l.shape.close,this.options=l,a.retina.initParticle(this),this.size=Mt(this.options.size,o),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(v=a.shapeDrawers.get(this.shape)),v?.loadShape&&v.loadShape(this);const _=v?.getSidesCount;_&&(this.sides=_(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),v?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%u,i=e<0?e+u:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=M.create(t.x,t.y,e);this._fixHorizontal(c,r,o.left??o.default),this._fixHorizontal(c,r,o.right??o.default),this._fixVertical(c,r,o.top??o.default),this._fixVertical(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const e=Z(this.direction).copy(),i=this.options.move;if(i.direction===t.MoveDirection.inside||i.direction===t.MoveDirection.outside)return e;const s=X(q(i.angle.value)),n=X(q(i.angle.offset)),a={left:n-s*o,right:n+s*o};return i.straight||(e.angle+=$(W(a.left,a.right))),i.random&&"number"==typeof i.speed&&(e.length*=A()),e};_fixHorizontal=(e,i,s)=>{Zn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this._container.canvas.size.width,setCb:t=>e.x+=t,radius:i})};_fixVertical=(e,i,s)=>{Zn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this._container.canvas.size.height,setCb:t=>e.y+=t,radius:i})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?pi(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=e=>{const i=this._container,s=Math.floor(q(this.options.zIndex.value)),n=this._calcPosition(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...St(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=z.origin}}class ta{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Yt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Zt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Yt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Zt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class ea{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_nextId;_particleBuckets;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zBuckets;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._particleBuckets=new Map,this._zBuckets=this._createBuckets(this._container.zLayers),this.grid=new ta(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(e,i,s,n){const a=this._container.actualOptions.particles.number.limit.mode,o=void 0===s?this._limit:this._groupLimits.get(s)??this._limit,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this._pool.pop()??new Jn(this._pluginManager,this._container);a.init(this._nextId,e,i,s);let o=!0;return n&&(o=n(a)),o?(this._array.push(a),this._insertParticleIntoBucket(a),this._nextId++,this._container.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this._pool.push(a)}catch(t){Vt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._particleBuckets.clear(),this._resetBuckets(this._container.zLayers)}destroy(){this._array=[],this._pool.length=0,this._particleBuckets.clear(),this._zBuckets=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(let e=this._zBuckets.length-1;e>=0;e--){const i=this._zBuckets[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this._particleBuckets.clear(),this._resetBuckets(t.zLayers),this.grid=new ta(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ae(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setResizeFactor(t){this._resizeFactor=t}update(t){this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const e=this._updateParticlesPhase1(t);for(const e of this._postUpdatePlugins)e.postUpdate?.(t);if(this._updateParticlesPhase2(t,e),e.size)for(const t of e)this.remove(t);delete this._resizeFactor}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this._limit=n.limit.value*a:this._groupLimits.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};_createBuckets=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};_getBucketIndex=t=>{const e=this._zBuckets.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};_getParticleInsertIndex=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};_initDensityFactor=t=>{const e=this._container;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};_insertParticleIntoBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._zBuckets[e];i&&(i.splice(this._getParticleInsertIndex(i,t.id),0,t),this._particleBuckets.set(t.id,e))};_removeParticle=(e,i,s)=>{const n=this._array[e];return!!n&&(n.group===i&&(this._array.splice(e,1),this._removeParticleFromBucket(n),n.destroy(s),this._container.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this._addToPool(n),!0))};_removeParticleFromBucket=t=>{const e=this._particleBuckets.get(t.id)??this._getBucketIndex(t.position.z),i=this._zBuckets[e];if(!i)return void this._particleBuckets.delete(t.id);const s=this._getParticleInsertIndex(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this._particleBuckets.delete(t.id)):this._particleBuckets.delete(t.id)};_resetBuckets=t=>{const e=Math.max(Math.floor(t),1);if(this._zBuckets.length===e)for(const t of this._zBuckets)t.length=0;else this._zBuckets=this._createBuckets(e)};_updateParticleBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._particleBuckets.get(t.id);if(void 0===i)return void this._insertParticleIntoBucket(t);if(i===e)return;const s=this._zBuckets[i];if(s){const e=this._getParticleInsertIndex(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this._zBuckets[e];n?(n.splice(this._getParticleInsertIndex(n,t.id),0,t),this._particleBuckets.set(t.id,e)):this._particleBuckets.set(t.id,e)};_updateParticlesPhase1=t=>{const e=new Set,i=this._resizeFactor;for(const s of this._array){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};_updateParticlesPhase2=(t,e)=>{for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t);this._updateParticleBucket(i)}}}class ia{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i,a.sizeAnimationSpeed=q(e.size.animation.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function sa(t){return!t.destroyed}function na(t,e,...i){const s=new Fe(t,e);return Re(s,...i),s}var aa=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this._pluginManager=s,this._dispatchCallback=i,this._onDestroy=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=o,this._initialSourceOptions=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ia(this),this.canvas=new Xn(this._pluginManager,this),this.particles=new ea(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=na(this._pluginManager,this),this.actualOptions=na(this._pluginManager,this),this._eventListeners=new Yn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&sa(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(e=!0){if(sa(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!sa(this))return;let e=t;this._drawAnimationFrame=B(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Vt().error(`Export plugin with type ${t} not found`)}async init(){if(!sa(this))return;const e=new Map;for(const t of this._pluginManager.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this._options=na(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=na(this._pluginManager,this,this._options),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this._duration=q(s)*r,this._delay=q(i)*r,this._lifeTime=0,this.fpsLimit=n>0?n:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(sa(this)&&(void 0!==this._drawAnimationFrame&&(L(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!sa(this))return;const i=this._paused||e;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(sa(this))return this.stop(),this.start()}async reset(t){if(sa(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=na(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=na(this._pluginManager,this,this._options),this.refresh()}async start(){sa(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this._delayTimeout=setTimeout(()=>{i()},this._delay)}))}stop(){if(sa(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+r/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Vt().error("error in animation loop",t)}}}});function oa(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ra=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-q(i.decay),e.pathDelay=q(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:q(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this._container,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options,n=s.move;if(!n.enable)return;const a=this._container,r=a.retina.pixelRatio,l=function(t){return t.slow.inRange?t.slow.factor:1}(e),c=a.retina.reduceFactor,h=e.retina.moveSpeed,d=e.retina.moveDrift,u=j(s.size.value)*r,p=h*(n.size?e.getRadius()/u:1)*l*(i.factor||1)*o,g=e.retina.maxSpeed;n.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(a,e,p,c):oa(e,n,p,g,d,c,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var la=Object.freeze({__proto__:null,EmittersPluginInstance:class{container;_instancesManager;constructor(t,e){this.container=e,this._instancesManager=t,this._instancesManager.initContainer(e)}async init(){const t=this.container.actualOptions.emitters;if(I(t))for(const e of t)await this._instancesManager.addEmitter(this.container,e);else await this._instancesManager.addEmitter(this.container,t)}pause(){for(const t of this._instancesManager.getArray(this.container))t.pause()}play(){for(const t of this._instancesManager.getArray(this.container))t.play()}resize(){for(const t of this._instancesManager.getArray(this.container))t.resize()}stop(){this._instancesManager.clear(this.container)}update(t){this._instancesManager.getArray(this.container).forEach(e=>{e.update(t)})}}});const ca=new Map;var ha=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ca.set(t,e)}getShapeGenerator(t){return ca.get(t)}getSupportedShapeGenerators(){return ca.keys()}}});var da=Object.freeze({__proto__:null,EmittersInstancesManager:class{_containerArrays;_pluginManager;constructor(t){this._containerArrays=new Map,this._pluginManager=t}async addEmitter(t,e,i){const s=new bs;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ya}),a=new n(this._pluginManager,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this._containerArrays.set(t,[])}getArray(t){this.initContainer(t);let e=this._containerArrays.get(t);return e||(e=[],this._containerArrays.set(t,e)),e}initContainer(t){this._containerArrays.has(t)||(this._containerArrays.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var ua=Object.freeze({__proto__:null,ImagePreloaderInstance:class{_container;_engine;constructor(t,e){this._engine=t,this._container=e}destroy(){this._engine.images?.delete(this._container)}}});var pa=Object.freeze({__proto__:null,MotionPluginInstance:class{_container;constructor(t){this._container=t}async init(){const t=this._container,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=pt("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this._handleMotionChange(i);i.addEventListener("change",()=>{(async()=>{this._handleMotionChange(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}_handleMotionChange=t=>{const e=this._container,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function ga(t,e,i,s){(t.paint??=new Pe).fill={color:ne.create(void 0,{value:e}),enable:s,opacity:i}}function fa(t,e,i,s){(t.paint??=new Pe).stroke={color:ne.create(void 0,{value:e}),opacity:i,width:s}}var ya=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;_container;_currentDuration;_currentEmitDelay;_currentSpawnDelay;_duration;_emitDelay;_firstSpawn;_immortal;_initialPosition;_lifeCount;_mutationObserver;_particlesOptions;_paused;_pluginManager;_removeCallback;_resizeObserver;_shape;_size;_spawnDelay;_startParticlesAdded;constructor(t,e,i,s,n){this._pluginManager=t,this._container=e,this._removeCallback=i,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,s instanceof bs?this.options=s:(this.options=new bs,this.options.load(s)),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;const a=bt({},this.options.particles);if(a.move??={},a.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ze(this._pluginManager,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ze(this._pluginManager,this.options.spawn.stroke.color)),this._paused=!this.options.autoPlay,this._particlesOptions=a,this._size=this._calcSize(),this.size=Ct(this._size,this._container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=ut().getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver(()=>{this.resize()}),this._resizeObserver=new ResizeObserver(()=>{this.resize()}),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const o=this.options.shape,l=this._pluginManager.emitterShapeManager?.getShapeGenerator(o.type);l&&(this._shape=l.generate(this._container,this.position,this.size,this.fill,o.options)),this._container.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(this._paused)return;if(!(this._lifeCount>0||this._immortal)&&this.options.life.count||!(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0)))return;const t=this._container;if(void 0===this._emitDelay){const e=q(this.options.rate.delay);this._emitDelay=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}resize(){const t=this._initialPosition,e=this._container;this.position=t&&vt(t,e.canvas.size,z.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=Ct(this._size,e.canvas.size),this._shape?.resize(this.position,this.size)}update(t){if(this._paused)return;const e=this._container;this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._container.dispatchEvent("emitterPlay"),this.play(),this._currentSpawnDelay-=this._spawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay))}_calcPosition(){const t=this._container;if(this.options.domId){const e=ut().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return et({size:t.canvas.size,position:this.options.position})}_calcSize(){const e=this._container;if(this.options.domId){const i=ut().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new _s;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}_destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this._removeCallback(this),this._container.dispatchEvent("emitterDestroyed",{emitter:this})};_emit(){if(this._paused)return;const t=q(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=Pt(this._particlesOptions)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:q(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:q(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:q(this.options.spawn.stroke.width),l=this._container.retina.reduceFactor,c=!!i,h=!!a,d=!!this._shape,u=c||h,p=u||d,g=u?{h:m,s:v,l:_}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?bt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this._setColorAnimation(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this._setColorAnimation(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this._setColorAnimation(i.l,this.spawnFillColor.l,g.l)),ga(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this._setColorAnimation(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this._setColorAnimation(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this._setColorAnimation(a.l,this.spawnStrokeColor.l,g.l)),fa(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this._shape){const e=this._shape.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&ga(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this._container.particles.addParticle(l,t)}}_prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*r)};_setColorAnimation=(t,e,i,s=1)=>{const n=this._container;if(!t.enable)return e;const a=$(t.offset),o=q(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+q(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=ne,t.AnimationOptions=Jt,t.AnimationValueWithRandom=ge,t.Background=ae,t.BaseRange=Xt,t.Circle=Yt,t.ColorAnimation=ee,t.Fill=ce,t.FullScreen=oe,t.HslAnimation=ie,t.Move=_e,t.MoveAngle=he,t.MoveCenter=de,t.MoveGravity=ue,t.MovePath=ye,t.Opacity=be,t.OpacityAnimation=we,t.Options=Fe,t.OptionsColor=se,t.OutModes=me,t.Paint=Pe,t.ParticlesBounce=ze,t.ParticlesBounceFactor=Me,t.ParticlesDensity=Se,t.ParticlesNumber=ke,t.ParticlesNumberLimit=Ce,t.ParticlesOptions=Ee,t.RangedAnimationOptions=te,t.RangedAnimationValueWithRandom=fe,t.Rectangle=Zt,t.ResizeEvent=re,t.Shape=De,t.Size=Oe,t.SizeAnimation=Ie,t.Spin=ve,t.Stroke=xe,t.ValueWithRandom=pe,t.Vector=z,t.Vector3d=M,t.ZIndex=Te,t.alterHsl=pi,t.animate=B,t.areBoundsInside=_t,t.arrayRandomIndex=yt,t.calcExactPositionOrRandomFromSize=it,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return it({size:t.size,position:e})},t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=et,t.calculateBounds=wt,t.cancelAnimation=L,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:z.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=V,t.clear=Ve,t.cloneStyle=Dt,t.collisionVelocity=J,t.colorMix=ri,t.colorToHsl=function(t,e,i,s=!0){const n=Ye(t,e,i,s);return n?Je(n):void 0},t.colorToRgb=Ye,t.confetti=jn,t.countOffset=1,t.decayOffset=1,t.deepExtend=bt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=u,t.drawAfterEffect=$e,t.drawBeforeEffect=qe,t.drawParticle=Ue,t.drawParticlePlugin=Ne,t.drawShape=Ge,t.drawShapeAfterDraw=je,t.drawShapeBeforeDraw=We,t.empty=0,t.executeOnSingleOrMultiple=xt,t.findItemFromSingleOrMultiple=function(t,e){return I(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=H,t.getDistances=N,t.getFullScreenStyle=It,t.getHslAnimationFromHsl=ci,t.getHslFromAnimation=li,t.getItemMapFromInitializer=Et,t.getItemsFromInitializer=Tt,t.getLinkColor=function(t,e,i){if(i===h)return si();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return ri(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ei(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=C(e)?e:e.value;return n===h?s?Xe(t,{value:n}):i?h:d:n===d?d:Xe(t,{value:n})},t.getLogger=Vt,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=St,t.getRandom=A,t.getRandomInRange=F,t.getRandomRgbColor=si,t.getRangeMax=j,t.getRangeMin=G,t.getRangeValue=q,t.getSize=Ct,t.getStyleFromHsl=oi,t.getStyleFromRgb=ni,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=dt,t.hslToRgb=ei,t.hslaToRgba=ii,t.identity=1,t.initParticleNumericAnimationValue=Mt,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ft,t.isNull=O,t.isNumber=k,t.isObject=D,t.isPointInside=vt,t.isString=C,t.itemFromArray=mt,t.itemFromSingleOrMultiple=Pt,t.lFactor=1,t.lMax=_,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Re,t.loadParticlesOptions=Ae,t.loadRandomFactor=1e4,t.manageListener=Ot,t.memoize=ht,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Be,t.paintImage=Le,t.parseAlpha=st,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ze,t.rangeColorToRgb=Xe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=Je,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ut,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=pt,t.safeMutationObserver=gt,t.setAnimationFunctions=function(t,e){R.nextFrame=t,R.cancel=e},t.setLogger=function(t){t.debug&&(Lt.debug=Bt(t.debug)),t.error&&(Lt.error=Bt(t.error)),t.info&&(Lt.info=Bt(t.info)),t.log&&(Lt.log=Bt(t.log)),t.trace&&(Lt.trace=Bt(t.trace)),t.verbose&&(Lt.verbose=Bt(t.verbose)),t.warning&&(Lt.warning=Bt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=W,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ke(t,e)?.a},t.stringToRgb=ti,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateAnimation=kt,t.updateColor=ui,t.updateColorValue=di,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;