partycles 1.2.2 → 1.2.4

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.
package/README.md CHANGED
@@ -627,7 +627,13 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
627
627
 
628
628
  ## 📈 Changelog
629
629
 
630
- ### v1.2.2 (Latest)
630
+ ### v1.2.3 (Latest)
631
+ - 🔮 Updated bokeh animation defaults for better visual impact
632
+ - 📊 Increased default particle count from 25 to 50
633
+ - ⏱️ Reduced lifetime from 400 to 200 for snappier animations
634
+ - 🎯 Adjusted physics for more natural movement
635
+
636
+ ### v1.2.2
631
637
  - 🔮 Added new `bokeh` animation with soft, dreamy light orbs
632
638
  - 🙏 Added credits section to acknowledge contributors
633
639
  - 📱 Optimized bokeh effect for smooth performance
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';var z=require('react'),client=require('react-dom/client');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var z__default=/*#__PURE__*/_interopDefault(z);/* Partycles - Delightful particle animations for React */
2
- var Ce=Object.defineProperty,Me=Object.defineProperties;var $e=Object.getOwnPropertyDescriptors;var yt=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var gt=(t,e,r)=>e in t?Ce(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,L=(t,e)=>{for(var r in e||(e={}))we.call(e,r)&&gt(t,r,e[r]);if(yt)for(var r of yt(e))ze.call(e,r)&&gt(t,r,e[r]);return t},O=(t,e)=>Me(t,$e(e));var o=(t,e)=>Math.random()*(e-t)+t,g=t=>t*Math.PI/180,f=()=>Math.random().toString(36).substring(2,9),F=t=>t[Math.floor(Math.random()*t.length)]||t[0]||"#ffffff",xt=(t,e)=>({position:"absolute",left:`${t.x}px`,top:`${t.y}px`,width:`${t.size}px`,height:`${t.size}px`,transform:`rotate(${t.rotation}deg) translateX(-50%) translateY(-50%)`,opacity:t.opacity,pointerEvents:"none",transition:"none",willChange:"transform, opacity"});var J=class{constructor(e=1e3){this.pool=[];this.created=0;this.maxSize=e;}acquire(){let e=this.pool.pop();return e?(e._pooled=false,e):(this.created++,{id:`p${this.created}`,x:0,y:0,vx:0,vy:0,life:0,opacity:0,size:0,rotation:0,color:"",_pooled:false})}release(e){e._pooled||this.pool.length>=this.maxSize||(e._pooled=true,e.element=void 0,e.config=void 0,this.pool.push(e));}releaseAll(e){e.forEach(r=>this.release(r));}clear(){this.pool=[];}getStats(){return {poolSize:this.pool.length,totalCreated:this.created,maxSize:this.maxSize}}},w=new J;function Ae(t){let e=w.acquire();return Object.assign(e,t),t.id||(e.id=`p${Date.now()}-${Math.random().toString(36).substr(2,9)}`),e}function m(t,e){let r=[];for(let n=0;n<t;n++)r.push(Ae(e(n)));return r}var Re=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],bt=(t,e)=>{let{particleCount:r=50,startVelocity:n=20,colors:a=Re,elementSize:i=20}=e;return m(r,()=>{let s=o(0,360),l=o(n*.5,n),c=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(g(s))*l,vy:Math.sin(g(s))*l-30,life:e.lifetime||150,opacity:1,size:o(i*.7,i*1.5),rotation:o(0,360),color:c}})},Pt=t=>{var a,i;let n=((i=(a=t.config)==null?void 0:a.effects)==null?void 0:i.flutter)&&t.life>0?`rotateY(${Math.sin(t.life*.1)*360}deg)`:"";return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"60%",backgroundColor:t.color,borderRadius:"3px",boxShadow:"0 2px 4px rgba(0,0,0,0.2)",transform:n,transformStyle:"preserve-3d",perspective:"1000px"}})};var Ft=(t,e)=>{let{particleCount:r=35,spread:n=120,startVelocity:a=15,elementSize:i=25,colors:s=["#FFD700","#FFFFFF"]}=e;return m(r,()=>{let l=a/45;return {id:f(),x:t.x+o(-n,n),y:t.y+o(-n,n),vx:o(-3,3)*l,vy:o(-3,3)*l,life:e.lifetime||120,opacity:0,size:o(i*.4,i*1.2),rotation:o(0,360),color:s[Math.floor(Math.random()*s.length)]||s[0]||"#ffffff"}})},Ct=t=>{var n,a;let e=t.opacity,r=(a=(n=t.config)==null?void 0:n.effects)!=null&&a.twinkle?.3+Math.abs(Math.sin(t.life*.2))*.7:1;return z__default.default.createElement("svg",{key:t.id,width:"100%",height:"100%",viewBox:"0 0 24 24",style:{transform:`scale(${e}) rotate(${t.rotation}deg)`,filter:"drop-shadow(0 0 6px rgba(255, 215, 0, 0.8))",opacity:r,transition:"opacity 0.1s ease-out"}},z__default.default.createElement("path",{d:"M12 0L14.59 8.41L23 11L14.59 13.59L12 22L9.41 13.59L1 11L9.41 8.41L12 0Z",fill:t.color}))};var Se=["#ff1744","#e91e63","#ff4569","#ff6b6b","#ee5a70"],$t=(t,e)=>{let{particleCount:r=25,startVelocity:n=12,colors:a=Se,elementSize:i=30}=e;return m(r,()=>{let s=o(-45,-135),l=o(n*.7,n*1.3),c=o(-2,2);return {id:f(),x:t.x+o(-10,10),y:t.y,vx:Math.cos(s*Math.PI/180)*l+c,vy:Math.sin(s*Math.PI/180)*l,life:e.lifetime||180,opacity:1,size:o(i*.6,i*1.2),rotation:o(-20,20),color:F(a)}})},wt=t=>{var r,n;let e=(n=(r=t.config)==null?void 0:r.effects)!=null&&n.pulse?1+Math.sin(t.life*.2)*.1:1;return z__default.default.createElement("svg",{key:t.id,width:"100%",height:"100%",viewBox:"0 0 24 24",fill:t.color,style:{filter:`drop-shadow(0 0 ${t.size*.15}px ${t.color})`,transform:`scale(${e})`,transition:"transform 0.1s ease-out"}},z__default.default.createElement("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"}))};var Ee=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ffffff"],zt=(t,e)=>{let{particleCount:r=60,startVelocity:n=25,colors:a=Ee,elementSize:i=8}=e;return m(r,s=>{let l=360/r*s+o(-5,5),c=o(n*.5,n*1.2),u=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(g(l))*c,vy:Math.sin(g(l))*c-10,life:e.lifetime||140,opacity:1,size:o(i*.6,i*1.4),rotation:0,color:u}})},At=t=>z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:"#ffffff",borderRadius:"50%",boxShadow:`
2
+ var Ce=Object.defineProperty,Me=Object.defineProperties;var $e=Object.getOwnPropertyDescriptors;var yt=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var gt=(t,e,r)=>e in t?Ce(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r,L=(t,e)=>{for(var r in e||(e={}))we.call(e,r)&&gt(t,r,e[r]);if(yt)for(var r of yt(e))ze.call(e,r)&&gt(t,r,e[r]);return t},O=(t,e)=>Me(t,$e(e));var o=(t,e)=>Math.random()*(e-t)+t,y=t=>t*Math.PI/180,f=()=>Math.random().toString(36).substring(2,9),F=t=>t[Math.floor(Math.random()*t.length)]||t[0]||"#ffffff",xt=(t,e)=>({position:"absolute",left:`${t.x}px`,top:`${t.y}px`,width:`${t.size}px`,height:`${t.size}px`,transform:`rotate(${t.rotation}deg) translateX(-50%) translateY(-50%)`,opacity:t.opacity,pointerEvents:"none",transition:"none",willChange:"transform, opacity"});var J=class{constructor(e=1e3){this.pool=[];this.created=0;this.maxSize=e;}acquire(){let e=this.pool.pop();return e?(e._pooled=false,e):(this.created++,{id:`p${this.created}`,x:0,y:0,vx:0,vy:0,life:0,opacity:0,size:0,rotation:0,color:"",_pooled:false})}release(e){e._pooled||this.pool.length>=this.maxSize||(e._pooled=true,e.element=void 0,e.config=void 0,this.pool.push(e));}releaseAll(e){e.forEach(r=>this.release(r));}clear(){this.pool=[];}getStats(){return {poolSize:this.pool.length,totalCreated:this.created,maxSize:this.maxSize}}},w=new J;function Ae(t){let e=w.acquire();return Object.assign(e,t),t.id||(e.id=`p${Date.now()}-${Math.random().toString(36).substr(2,9)}`),e}function m(t,e){let r=[];for(let n=0;n<t;n++)r.push(Ae(e(n)));return r}var Se=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],bt=(t,e)=>{let{particleCount:r=50,startVelocity:n=20,colors:a=Se,elementSize:i=20}=e;return m(r,()=>{let s=o(0,360),l=o(n*.5,n),c=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(y(s))*l,vy:Math.sin(y(s))*l-30,life:e.lifetime||150,opacity:1,size:o(i*.7,i*1.5),rotation:o(0,360),color:c}})},Pt=t=>{var a,i;let n=((i=(a=t.config)==null?void 0:a.effects)==null?void 0:i.flutter)&&t.life>0?`rotateY(${Math.sin(t.life*.1)*360}deg)`:"";return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"60%",backgroundColor:t.color,borderRadius:"3px",boxShadow:"0 2px 4px rgba(0,0,0,0.2)",transform:n,transformStyle:"preserve-3d",perspective:"1000px"}})};var Ft=(t,e)=>{let{particleCount:r=35,spread:n=120,startVelocity:a=15,elementSize:i=25,colors:s=["#FFD700","#FFFFFF"]}=e;return m(r,()=>{let l=a/45;return {id:f(),x:t.x+o(-n,n),y:t.y+o(-n,n),vx:o(-3,3)*l,vy:o(-3,3)*l,life:e.lifetime||120,opacity:0,size:o(i*.4,i*1.2),rotation:o(0,360),color:s[Math.floor(Math.random()*s.length)]||s[0]||"#ffffff"}})},Ct=t=>{var n,a;let e=t.opacity,r=(a=(n=t.config)==null?void 0:n.effects)!=null&&a.twinkle?.3+Math.abs(Math.sin(t.life*.2))*.7:1;return z__default.default.createElement("svg",{key:t.id,width:"100%",height:"100%",viewBox:"0 0 24 24",style:{transform:`scale(${e}) rotate(${t.rotation}deg)`,filter:"drop-shadow(0 0 6px rgba(255, 215, 0, 0.8))",opacity:r,transition:"opacity 0.1s ease-out"}},z__default.default.createElement("path",{d:"M12 0L14.59 8.41L23 11L14.59 13.59L12 22L9.41 13.59L1 11L9.41 8.41L12 0Z",fill:t.color}))};var Re=["#ff1744","#e91e63","#ff4569","#ff6b6b","#ee5a70"],$t=(t,e)=>{let{particleCount:r=25,startVelocity:n=12,colors:a=Re,elementSize:i=30}=e;return m(r,()=>{let s=o(-45,-135),l=o(n*.7,n*1.3),c=o(-2,2);return {id:f(),x:t.x+o(-10,10),y:t.y,vx:Math.cos(s*Math.PI/180)*l+c,vy:Math.sin(s*Math.PI/180)*l,life:e.lifetime||180,opacity:1,size:o(i*.6,i*1.2),rotation:o(-20,20),color:F(a)}})},wt=t=>{var r,n;let e=(n=(r=t.config)==null?void 0:r.effects)!=null&&n.pulse?1+Math.sin(t.life*.2)*.1:1;return z__default.default.createElement("svg",{key:t.id,width:"100%",height:"100%",viewBox:"0 0 24 24",fill:t.color,style:{filter:`drop-shadow(0 0 ${t.size*.15}px ${t.color})`,transform:`scale(${e})`,transition:"transform 0.1s ease-out"}},z__default.default.createElement("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"}))};var Ee=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ffffff"],zt=(t,e)=>{let{particleCount:r=60,startVelocity:n=25,colors:a=Ee,elementSize:i=8}=e;return m(r,s=>{let l=360/r*s+o(-5,5),c=o(n*.5,n*1.2),u=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(y(l))*c,vy:Math.sin(y(l))*c-10,life:e.lifetime||140,opacity:1,size:o(i*.6,i*1.4),rotation:0,color:u}})},At=t=>z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:"#ffffff",borderRadius:"50%",boxShadow:`
3
3
  0 0 ${t.size}px ${t.color},
4
4
  0 0 ${t.size*2}px ${t.color},
5
5
  0 0 ${t.size*3}px ${t.color},
6
6
  0 0 ${t.size*4}px ${t.color}
7
- `,background:`radial-gradient(circle, #ffffff 0%, ${t.color} 40%, transparent 70%)`}});var De=["rgba(66, 165, 245, 0.4)","rgba(41, 182, 246, 0.4)","rgba(38, 198, 218, 0.4)","rgba(129, 212, 250, 0.4)"],kt=(t,e)=>{let{particleCount:r=30,spread:n=80,startVelocity:a=8,colors:i=De,elementSize:s=40}=e;return m(r,()=>({id:f(),x:t.x+o(-n,n),y:t.y,vx:o(-3,3),vy:-o(a*.7,a*1.2),life:e.lifetime||160,opacity:.7,size:o(s*.4,s*1.2),rotation:0,color:i[Math.floor(Math.random()*i.length)]||i[0]||"#ffffff"}))},Rt=t=>z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",border:"2px solid rgba(255, 255, 255, 0.6)",backgroundImage:"radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent)",boxShadow:`
7
+ `,background:`radial-gradient(circle, #ffffff 0%, ${t.color} 40%, transparent 70%)`}});var De=["rgba(66, 165, 245, 0.4)","rgba(41, 182, 246, 0.4)","rgba(38, 198, 218, 0.4)","rgba(129, 212, 250, 0.4)"],kt=(t,e)=>{let{particleCount:r=30,spread:n=80,startVelocity:a=8,colors:i=De,elementSize:s=40}=e;return m(r,()=>({id:f(),x:t.x+o(-n,n),y:t.y,vx:o(-3,3),vy:-o(a*.7,a*1.2),life:e.lifetime||160,opacity:.7,size:o(s*.4,s*1.2),rotation:0,color:i[Math.floor(Math.random()*i.length)]||i[0]||"#ffffff"}))},St=t=>z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",border:"2px solid rgba(255, 255, 255, 0.6)",backgroundImage:"radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent)",boxShadow:`
8
8
  inset 0 0 ${t.size*.3}px rgba(255, 255, 255, 0.4),
9
9
  0 0 ${t.size*.5}px ${t.color}
10
10
  `}});var Te=["#FFD700","#FFA500","#FF6347","#FFE4B5"],It=(t,e)=>{let{particleCount:r=40,startVelocity:n=18,colors:a=Te,elementSize:i=30}=e;return m(r,()=>{let s=o(0,360),l=o(n*.5,n);return {id:f(),x:t.x,y:t.y,vx:Math.cos(s*Math.PI/180)*l,vy:Math.sin(s*Math.PI/180)*l-15,life:e.lifetime||150,opacity:1,size:o(i*.5,i*1.3),rotation:o(0,360),color:a[Math.floor(Math.random()*a.length)]||a[0]||"#ffffff"}})},Et=t=>{var r,n;let e=(n=(r=t.config)==null?void 0:r.effects)!=null&&n.twinkle?.3+Math.abs(Math.sin(t.life*.15))*.7:1;return z__default.default.createElement("svg",{key:t.id,width:"100%",height:"100%",viewBox:"0 0 24 24",fill:t.color,style:{filter:`drop-shadow(0 0 ${t.size*.2}px ${t.color})`,opacity:e,transition:"opacity 0.1s ease-out"}},z__default.default.createElement("path",{d:"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"}))};var Oe=["#FFFFFF","#F0F8FF","#F5F5F5","#FAFAFA"],Bt=(t,e)=>{let{particleCount:r=50,spread:n=200,startVelocity:a=3,colors:i=Oe,elementSize:s=15}=e;return m(r,()=>{let l=t.x+o(-n*2,n*2),c=t.y-o(100,300);return {id:f(),x:l,y:c,vx:o(-0.5,.5),vy:o(a*.5,a*1.2),life:e.lifetime||300,opacity:o(.4,.9),size:o(s*.3,s),rotation:o(0,360),color:i[Math.floor(Math.random()*i.length)]||i[0]||"#ffffff"}})},Dt=t=>z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",boxShadow:`
@@ -32,11 +32,11 @@ var Ce=Object.defineProperty,Me=Object.defineProperties;var $e=Object.getOwnProp
32
32
  `,opacity:t.opacity*n}},z__default.default.createElement("div",{style:{width:"100%",height:"100%",background:`radial-gradient(circle at 30% 30%, ${t.color}ee, ${t.color})`,borderRadius:"50% 50% 50% 50% / 60% 60% 40% 40%",position:"relative",boxShadow:`
33
33
  inset -5px -5px 10px rgba(0,0,0,0.2),
34
34
  0 4px 8px rgba(0,0,0,0.2)
35
- `}},z__default.default.createElement("div",{style:{position:"absolute",top:"15%",left:"20%",width:"25%",height:"30%",background:"radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%)",borderRadius:"50%",transform:"rotate(-20deg)"}}),z__default.default.createElement("div",{style:{position:"absolute",bottom:"-5px",left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:`8px solid ${t.color}`}})),z__default.default.createElement("svg",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",width:"2px",height:`${t.size*2}px`,opacity:.6}},z__default.default.createElement("path",{d:`M1 0 Q ${1+Math.sin(t.life*.1)*3} ${t.size} 1 ${t.size*2}`,stroke:t.color,strokeWidth:"1.5",fill:"none",opacity:"0.4"})))};var Qe=["#FFFFFF","#FFF9C4","#BBDEFB","#C5CAE9","#D1C4E9","#FFE082","#FFCCBC"],Qt=(t,e)=>{let{particleCount:r=60,spread:n=200,startVelocity:a=15,colors:i=Qe,elementSize:s=8}=e;return m(r,l=>{let c=l/r,u=c*Math.PI*4,d=c*n,h=o(-0.3,.3),y=o(-10,10),P=u+h,C=d+y,M=Math.cos(P)*C,p=Math.sin(P)*C,v=P+Math.PI/2,$=a*(1-c*.5);return {id:f(),x:t.x,y:t.y,vx:Math.cos(v)*$*.3+M*.02,vy:Math.sin(v)*$*.3+p*.02,life:e.lifetime||250,opacity:0,size:o(s*.3,s)*(1-c*.5),rotation:o(0,360),color:i[Math.floor(Math.random()*i.length)]||i[0]||"#ffffff"}})},Kt=t=>{let r=1+(250-t.life)/250*.5,n=Math.min(1,(250-t.life)/30),a=t.life/250,i=Math.min(n,a),s=Math.sin(t.life*.2+t.rotation)*.3+.7;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size}px`,position:"relative",transform:`scale(${r})`,opacity:i*s}},z__default.default.createElement("div",{style:{width:"100%",height:"100%",background:t.color,borderRadius:"50%",boxShadow:`
35
+ `}},z__default.default.createElement("div",{style:{position:"absolute",top:"15%",left:"20%",width:"25%",height:"30%",background:"radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%)",borderRadius:"50%",transform:"rotate(-20deg)"}}),z__default.default.createElement("div",{style:{position:"absolute",bottom:"-5px",left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:`8px solid ${t.color}`}})),z__default.default.createElement("svg",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",width:"2px",height:`${t.size*2}px`,opacity:.6}},z__default.default.createElement("path",{d:`M1 0 Q ${1+Math.sin(t.life*.1)*3} ${t.size} 1 ${t.size*2}`,stroke:t.color,strokeWidth:"1.5",fill:"none",opacity:"0.4"})))};var Qe=["#FFFFFF","#FFF9C4","#BBDEFB","#C5CAE9","#D1C4E9","#FFE082","#FFCCBC"],Qt=(t,e)=>{let{particleCount:r=60,spread:n=200,startVelocity:a=15,colors:i=Qe,elementSize:s=8}=e;return m(r,l=>{let c=l/r,u=c*Math.PI*4,d=c*n,h=o(-0.3,.3),P=o(-10,10),b=u+h,C=d+P,M=Math.cos(b)*C,p=Math.sin(b)*C,v=b+Math.PI/2,$=a*(1-c*.5);return {id:f(),x:t.x,y:t.y,vx:Math.cos(v)*$*.3+M*.02,vy:Math.sin(v)*$*.3+p*.02,life:e.lifetime||250,opacity:0,size:o(s*.3,s)*(1-c*.5),rotation:o(0,360),color:i[Math.floor(Math.random()*i.length)]||i[0]||"#ffffff"}})},Kt=t=>{let r=1+(250-t.life)/250*.5,n=Math.min(1,(250-t.life)/30),a=t.life/250,i=Math.min(n,a),s=Math.sin(t.life*.2+t.rotation)*.3+.7;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size}px`,position:"relative",transform:`scale(${r})`,opacity:i*s}},z__default.default.createElement("div",{style:{width:"100%",height:"100%",background:t.color,borderRadius:"50%",boxShadow:`
36
36
  0 0 ${t.size}px ${t.color},
37
37
  0 0 ${t.size*2}px ${t.color}88,
38
38
  0 0 ${t.size*3}px ${t.color}44
39
- `,position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${t.size*3}px`,height:"1px",background:`linear-gradient(90deg, transparent, ${t.color}, transparent)`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`,opacity:s}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:"1px",height:`${t.size*3}px`,background:`linear-gradient(180deg, transparent, ${t.color}, transparent)`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`,opacity:s}})),t.size>5&&z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${t.size*6}px`,height:`${t.size*6}px`,background:`radial-gradient(circle, ${t.color}22 0%, transparent 70%)`,borderRadius:"50%",transform:"translate(-50%, -50%)",opacity:i*.3,filter:"blur(3px)"}}))};var te=(t,e)=>{let{particleCount:r=20,elementSize:n=200}=e,a=[],i=["r","g","b"];for(let s=0;s<r;s++){let l=Math.random()>.3,c=s%3,u=i[c],d=l?o(50,200):o(2,8),h=l?o(2,8):o(50,200),y=o(-20,20),P=c+(l?4:0)+(Math.floor(d)<<3)+(Math.floor(h)<<11)+(y+32<<19);a.push({id:f(),x:t.x+o(-n/2,n/2),y:t.y+o(-n/2,n/2),vx:o(-50,50),vy:o(-30,30),life:e.lifetime||150,opacity:o(.3,1),size:o(5,20),rotation:P,color:u==="r"?"#ff0000":u==="g"?"#00ff00":"#0000ff"});}return a},ee=t=>{let e=t.rotation&3,r=t.rotation>>3&255,n=t.rotation>>11&255,a=(t.rotation>>19&63)-32,i=["r","g","b"][e],s=t.size,l={r:i==="r"?255:0,g:i==="g"?255:0,b:i==="b"?255:0},c=i==="r"?"screen":i==="g"?"multiply":"difference";return z__default.default.createElement("div",{key:t.id,style:{width:`${r}px`,height:`${n}px`,backgroundColor:`rgba(${l.r}, ${l.g}, ${l.b}, ${t.opacity})`,mixBlendMode:c,filter:`blur(${o(0,2)}px)`,boxShadow:`${a}px 0 ${s}px rgba(${l.r}, ${l.g}, ${l.b}, ${t.opacity*.5})`}})};var to=["#9C27B0","#E91E63","#FF00FF","#00FFFF","#FFD700","#FF69B4","#DA70D6","#9370DB"],oe=(t,e)=>{let{particleCount:r=40,startVelocity:n=8,colors:a=to,elementSize:i=12}=e;return m(r,s=>{let l=s/r*360+o(-30,30),c=o(n*.3,n),u=F(a),d=o(0,360),h=o(0,30);return {id:f(),x:t.x+Math.cos(g(d))*h,y:t.y+Math.sin(g(d))*h,vx:Math.cos(g(l))*c+o(-2,2),vy:Math.sin(g(l))*c+o(-2,2),life:e.lifetime||120,opacity:o(.4,1),size:o(i*.3,i),rotation:o(0,360),color:u}})},re=t=>{let e=t.size*.7;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size}px`,position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",boxShadow:`0 0 ${t.size}px ${t.color}, 0 0 ${t.size*2}px ${t.color}`,filter:"blur(1px)"}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${e}px`,height:`${e}px`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"2px",backgroundColor:"white",top:"50%",left:"0",transform:"translateY(-50%)",boxShadow:"0 0 4px white"}}),z__default.default.createElement("div",{style:{position:"absolute",width:"2px",height:"100%",backgroundColor:"white",left:"50%",top:"0",transform:"translateX(-50%)",boxShadow:"0 0 4px white"}})))};var eo=["#FF1493","#00CED1","#FFD700","#FF69B4","#7B68EE","#00FA9A","#FF6347","#4169E1"],ie=(t,e)=>{let{particleCount:r=15,startVelocity:n=15,colors:a=eo,elementSize:i=25}=e;return m(r,()=>{let s=o(0,360),l=o(n*.5,n),c=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(g(s))*l,vy:Math.sin(g(s))*l-10,life:e.lifetime||150,opacity:o(.7,1),size:o(i*.6,i),rotation:o(0,360),color:c}})},ne=t=>{let e=(Date.now()*.5+t.x+t.y)%360;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size*1.5}px`,position:"relative",transform:`rotate(${t.rotation}deg)`}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",background:`linear-gradient(135deg, ${t.color}, ${t.color}88, transparent)`,clipPath:"polygon(50% 0%, 100% 40%, 75% 100%, 25% 100%, 0% 40%)",boxShadow:`0 0 ${t.size}px ${t.color}44`}}),z__default.default.createElement("div",{style:{position:"absolute",width:"80%",height:"80%",top:"10%",left:"10%",background:"linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent)",clipPath:"polygon(50% 10%, 90% 45%, 65% 90%, 35% 90%, 10% 45%)"}}),z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",background:`linear-gradient(${e}deg,
39
+ `,position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${t.size*3}px`,height:"1px",background:`linear-gradient(90deg, transparent, ${t.color}, transparent)`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`,opacity:s}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:"1px",height:`${t.size*3}px`,background:`linear-gradient(180deg, transparent, ${t.color}, transparent)`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`,opacity:s}})),t.size>5&&z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${t.size*6}px`,height:`${t.size*6}px`,background:`radial-gradient(circle, ${t.color}22 0%, transparent 70%)`,borderRadius:"50%",transform:"translate(-50%, -50%)",opacity:i*.3,filter:"blur(3px)"}}))};var te=(t,e)=>{let{particleCount:r=20,elementSize:n=200}=e,a=[],i=["r","g","b"];for(let s=0;s<r;s++){let l=Math.random()>.3,c=s%3,u=i[c],d=l?o(50,200):o(2,8),h=l?o(2,8):o(50,200),P=o(-20,20),b=c+(l?4:0)+(Math.floor(d)<<3)+(Math.floor(h)<<11)+(P+32<<19);a.push({id:f(),x:t.x+o(-n/2,n/2),y:t.y+o(-n/2,n/2),vx:o(-50,50),vy:o(-30,30),life:e.lifetime||150,opacity:o(.3,1),size:o(5,20),rotation:b,color:u==="r"?"#ff0000":u==="g"?"#00ff00":"#0000ff"});}return a},ee=t=>{let e=t.rotation&3,r=t.rotation>>3&255,n=t.rotation>>11&255,a=(t.rotation>>19&63)-32,i=["r","g","b"][e],s=t.size,l={r:i==="r"?255:0,g:i==="g"?255:0,b:i==="b"?255:0},c=i==="r"?"screen":i==="g"?"multiply":"difference";return z__default.default.createElement("div",{key:t.id,style:{width:`${r}px`,height:`${n}px`,backgroundColor:`rgba(${l.r}, ${l.g}, ${l.b}, ${t.opacity})`,mixBlendMode:c,filter:`blur(${o(0,2)}px)`,boxShadow:`${a}px 0 ${s}px rgba(${l.r}, ${l.g}, ${l.b}, ${t.opacity*.5})`}})};var to=["#9C27B0","#E91E63","#FF00FF","#00FFFF","#FFD700","#FF69B4","#DA70D6","#9370DB"],oe=(t,e)=>{let{particleCount:r=40,startVelocity:n=8,colors:a=to,elementSize:i=12}=e;return m(r,s=>{let l=s/r*360+o(-30,30),c=o(n*.3,n),u=F(a),d=o(0,360),h=o(0,30);return {id:f(),x:t.x+Math.cos(y(d))*h,y:t.y+Math.sin(y(d))*h,vx:Math.cos(y(l))*c+o(-2,2),vy:Math.sin(y(l))*c+o(-2,2),life:e.lifetime||120,opacity:o(.4,1),size:o(i*.3,i),rotation:o(0,360),color:u}})},re=t=>{let e=t.size*.7;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size}px`,position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",boxShadow:`0 0 ${t.size}px ${t.color}, 0 0 ${t.size*2}px ${t.color}`,filter:"blur(1px)"}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${e}px`,height:`${e}px`,transform:`translate(-50%, -50%) rotate(${t.rotation}deg)`}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"2px",backgroundColor:"white",top:"50%",left:"0",transform:"translateY(-50%)",boxShadow:"0 0 4px white"}}),z__default.default.createElement("div",{style:{position:"absolute",width:"2px",height:"100%",backgroundColor:"white",left:"50%",top:"0",transform:"translateX(-50%)",boxShadow:"0 0 4px white"}})))};var eo=["#FF1493","#00CED1","#FFD700","#FF69B4","#7B68EE","#00FA9A","#FF6347","#4169E1"],ie=(t,e)=>{let{particleCount:r=15,startVelocity:n=15,colors:a=eo,elementSize:i=25}=e;return m(r,()=>{let s=o(0,360),l=o(n*.5,n),c=F(a);return {id:f(),x:t.x,y:t.y,vx:Math.cos(y(s))*l,vy:Math.sin(y(s))*l-10,life:e.lifetime||150,opacity:o(.7,1),size:o(i*.6,i),rotation:o(0,360),color:c}})},ne=t=>{let e=(Date.now()*.5+t.x+t.y)%360;return z__default.default.createElement("div",{key:t.id,style:{width:`${t.size}px`,height:`${t.size*1.5}px`,position:"relative",transform:`rotate(${t.rotation}deg)`}},z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",background:`linear-gradient(135deg, ${t.color}, ${t.color}88, transparent)`,clipPath:"polygon(50% 0%, 100% 40%, 75% 100%, 25% 100%, 0% 40%)",boxShadow:`0 0 ${t.size}px ${t.color}44`}}),z__default.default.createElement("div",{style:{position:"absolute",width:"80%",height:"80%",top:"10%",left:"10%",background:"linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent)",clipPath:"polygon(50% 10%, 90% 45%, 65% 90%, 35% 90%, 10% 45%)"}}),z__default.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",background:`linear-gradient(${e}deg,
40
40
  hsla(${e}, 100%, 50%, 0.3),
41
41
  hsla(${(e+60)%360}, 100%, 50%, 0.3),
42
42
  hsla(${(e+120)%360}, 100%, 50%, 0.3)
@@ -44,12 +44,12 @@ var Ce=Object.defineProperty,Me=Object.defineProperties;var $e=Object.getOwnProp
44
44
  M 0,-${t.size/2}
45
45
  C -${t.size/3},-${t.size/3} -${t.size/3},${t.size/3} 0,${t.size/2}
46
46
  C ${t.size/3},${t.size/3} ${t.size/3},-${t.size/3} 0,-${t.size/2}
47
- `,fill:t.color,opacity:"0.9"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/2,x2:"0",y2:t.size/2,stroke:"#8B4513",strokeWidth:"1",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/4,x2:-t.size/4,y2:-t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/4,x2:t.size/4,y2:-t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:t.size/4,x2:-t.size/4,y2:t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:t.size/4,x2:t.size/4,y2:t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"})))};var ro=["#ff6b6b","#4ecdc4","#45b7d1","#f7dc6f","#bb8fce","#85c1f5","#ffd93d","#6bcf7f"],le=(t,e)=>{let{particleCount:r=3,spread:n=60,startVelocity:a=12,colors:i=ro,elementSize:s=8}=e,l=[],c=m(r,u=>{let h=r>1?n/(r-1):0,y=-90-n/2+h*u,P=o(a*.9,a*1.1),C=i[Math.floor(Math.random()*i.length)],M=g(y),p=o(20,35);return {id:f(),x:t.x,y:t.y,vx:Math.cos(M)*P,vy:Math.sin(M)*P,life:e.lifetime||200,opacity:1,size:s,rotation:0,color:C,config:e,element:JSON.stringify({isShell:true,hasExploded:false,timeToExplode:p,burstCount:o(30,45),burstColor:C})}});l.push(...c);for(let u=0;u<8;u++){let d=m(1,()=>({id:f(),x:t.x+o(-5,5),y:t.y,vx:o(-2,2),vy:o(-10,-3),life:o(10,20),opacity:1,size:o(2,3),rotation:0,color:"#ffaa00",element:JSON.stringify({isLaunchSpark:true})}));l.push(...d);}return l},ce=t=>{let e={};try{t.element&&typeof t.element=="string"&&(e=JSON.parse(t.element));}catch(r){}if(e.isLaunchSpark)return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:t.opacity,boxShadow:`0 0 3px ${t.color}`}});if(e.isTrail){let r=t.opacity*(t.life/30)*.4;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",background:`radial-gradient(circle, ${t.color}88 0%, transparent 60%)`,borderRadius:"50%",opacity:r,filter:"blur(1px)"}})}if(e.isBurst){let r=t.opacity*Math.pow(t.life/120,.5);if(e.isGalaxy){let n=e.twinkle?.3+Math.sin(t.life*.3)*.7:1;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:r*n,boxShadow:`0 0 ${t.size*2}px ${t.color}`,transform:`rotate(${t.rotation}deg)`}})}return e.isCore?z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:"#FFFFFF",borderRadius:"50%",opacity:r,boxShadow:`0 0 ${t.size*3}px #FFFFFF`}}):z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:r,boxShadow:`
47
+ `,fill:t.color,opacity:"0.9"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/2,x2:"0",y2:t.size/2,stroke:"#8B4513",strokeWidth:"1",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/4,x2:-t.size/4,y2:-t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:-t.size/4,x2:t.size/4,y2:-t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:t.size/4,x2:-t.size/4,y2:t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"}),z__default.default.createElement("line",{x1:"0",y1:t.size/4,x2:t.size/4,y2:t.size/8,stroke:"#8B4513",strokeWidth:"0.5",opacity:"0.5"})))};var ro=["#ff6b6b","#4ecdc4","#45b7d1","#f7dc6f","#bb8fce","#85c1f5","#ffd93d","#6bcf7f"],le=(t,e)=>{let{particleCount:r=3,spread:n=60,startVelocity:a=12,colors:i=ro,elementSize:s=8}=e,l=[],c=m(r,u=>{let h=r>1?n/(r-1):0,P=-90-n/2+h*u,b=o(a*.9,a*1.1),C=i[Math.floor(Math.random()*i.length)],M=y(P),p=o(20,35);return {id:f(),x:t.x,y:t.y,vx:Math.cos(M)*b,vy:Math.sin(M)*b,life:e.lifetime||200,opacity:1,size:s,rotation:0,color:C,config:e,element:JSON.stringify({isShell:true,hasExploded:false,timeToExplode:p,burstCount:o(30,45),burstColor:C})}});l.push(...c);for(let u=0;u<8;u++){let d=m(1,()=>({id:f(),x:t.x+o(-5,5),y:t.y,vx:o(-2,2),vy:o(-10,-3),life:o(10,20),opacity:1,size:o(2,3),rotation:0,color:"#ffaa00",element:JSON.stringify({isLaunchSpark:true})}));l.push(...d);}return l},ce=t=>{let e={};try{t.element&&typeof t.element=="string"&&(e=JSON.parse(t.element));}catch(r){}if(e.isLaunchSpark)return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:t.opacity,boxShadow:`0 0 3px ${t.color}`}});if(e.isTrail){let r=t.opacity*(t.life/30)*.4;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",background:`radial-gradient(circle, ${t.color}88 0%, transparent 60%)`,borderRadius:"50%",opacity:r,filter:"blur(1px)"}})}if(e.isBurst){let r=t.opacity*Math.pow(t.life/120,.5);if(e.isGalaxy){let n=e.twinkle?.3+Math.sin(t.life*.3)*.7:1;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:r*n,boxShadow:`0 0 ${t.size*2}px ${t.color}`,transform:`rotate(${t.rotation}deg)`}})}return e.isCore?z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:"#FFFFFF",borderRadius:"50%",opacity:r,boxShadow:`0 0 ${t.size*3}px #FFFFFF`}}):z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:r,boxShadow:`
48
48
  0 0 ${t.size}px ${t.color},
49
49
  0 0 ${t.size*2}px ${t.color}88
50
50
  `,filter:t.life>80?"blur(0px)":"blur(1px)"}})}if(e.isShell){if(e.hasExploded)return null;let r=Math.atan2(t.vy,t.vx)*180/Math.PI;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",position:"relative",transform:`rotate(${r}deg)`}},z__default.default.createElement("div",{style:{width:"100%",height:"100%",backgroundColor:"#ffffff",borderRadius:"50%",boxShadow:`
51
51
  0 0 ${t.size*.5}px #ffffff,
52
52
  0 0 ${t.size}px ${t.color},
53
53
  0 0 ${t.size*2}px ${t.color}88
54
- `}}))}return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:t.opacity}})};var io=["#FFFFFF","#FFF8DC","#FFFACD","#FFE4B5","#FFDEAD","#F0E68C","#FFD700"],de=(t,e)=>{let{particleCount:r=25,spread:n=300,startVelocity:a=1,colors:i=io,elementSize:s=40,lifetime:l=400}=e;return m(r,c=>{let u=Math.random()*Math.PI*2,d=o(0,n),h=Math.random(),y=s*(.3+h*.7);return {id:f(),x:t.x+Math.cos(u)*d,y:t.y+Math.sin(u)*d,vx:o(-0.5,.5)*a,vy:o(-0.5,-1.5)*a,life:l,opacity:.1+h*.5,size:y,rotation:0,color:i[Math.floor(Math.random()*i.length)],element:JSON.stringify({depth:h,pulsePhase:Math.random()*Math.PI*2,baseSize:y})}})},fe=t=>{var l;let e={};try{t.element&&typeof t.element=="string"&&(e=JSON.parse(t.element));}catch(c){}let r=Math.sin(t.life*.05+(e.pulsePhase||0))*.1+1,n=(e.baseSize||t.size)*r,a=Math.min(1,(((l=t.config)==null?void 0:l.lifetime)||400-t.life)/20),i=Math.min(1,t.life/40),s=t.opacity*a*i;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n*3}px`,height:`${n*3}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}22 0%, transparent 50%)`,filter:"blur(20px)",opacity:s*.6}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n*2}px`,height:`${n*2}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}44 0%, transparent 60%)`,filter:"blur(10px)",opacity:s*.8}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n}px`,height:`${n}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}88 0%, ${t.color}44 50%, transparent 100%)`,borderRadius:"50%",filter:"blur(2px)",opacity:s}}))};var me={confetti:{createParticles:bt,renderParticle:Pt},sparkles:{createParticles:Ft,renderParticle:Ct},hearts:{createParticles:$t,renderParticle:wt},fireworks:{createParticles:zt,renderParticle:At},bubbles:{createParticles:kt,renderParticle:Rt},stars:{createParticles:It,renderParticle:Et},snow:{createParticles:Bt,renderParticle:Dt},emoji:{createParticles:Lt,renderParticle:Ot},coins:{createParticles:jt,renderParticle:Vt},petals:{createParticles:Ht,renderParticle:Ut},aurora:{createParticles:Wt,renderParticle:Xt},fireflies:{createParticles:Gt,renderParticle:qt},paint:{createParticles:Jt,renderParticle:Yt},balloons:{createParticles:_t,renderParticle:Zt},galaxy:{createParticles:Qt,renderParticle:Kt},glitch:{createParticles:te,renderParticle:ee},magicdust:{createParticles:oe,renderParticle:re},crystals:{createParticles:ie,renderParticle:ne},leaves:{createParticles:ae,renderParticle:se},mortar:{createParticles:le,renderParticle:ce},bokeh:{createParticles:de,renderParticle:fe}};var Q=()=>{if(typeof window=="undefined")return false;let t=navigator.userAgent||navigator.vendor||window.opera||"",e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t),r=window.innerWidth<=768,n="ontouchstart"in window||navigator.maxTouchPoints>0;return e||r&&n},K=t=>{var e,r,n;return Q()?O(L({},t),{particleCount:Math.floor((t.particleCount||50)*.6),elementSize:Math.floor((t.elementSize||20)*.8),lifetime:Math.floor((t.lifetime||150)*.8),physics:O(L({},t.physics),{gravity:Math.round((((e=t.physics)==null?void 0:e.gravity)||0)*100)/100,wind:Math.round((((r=t.physics)==null?void 0:r.wind)||0)*100)/100,friction:Math.round((((n=t.physics)==null?void 0:n.friction)||.98)*100)/100})}):t},ue=t=>Q()?t%3===0:false;var tt=class{constructor(){this.animations=new Map;this.rafId=null;this.isRunning=false;this.lastFrameTime=0;this.frameInterval=1e3/60;this.frameCount=0;this.fpsUpdateInterval=1e3;this.lastFpsUpdate=0;this.currentFps=0;this.update=this.update.bind(this);}addAnimation(e){this.animations.set(e.id,e),!this.isRunning&&this.animations.size>0&&this.start();}removeAnimation(e){let r=this.animations.get(e);r&&(w.releaseAll(r.particles),r.containerElement&&document.body.contains(r.containerElement)&&document.body.removeChild(r.containerElement),this.animations.delete(e)),this.animations.size===0&&this.stop();}start(){this.isRunning||(this.isRunning=true,this.lastFrameTime=performance.now(),this.lastFpsUpdate=this.lastFrameTime,this.frameCount=0,this.rafId=requestAnimationFrame(this.update));}stop(){this.isRunning&&(this.isRunning=false,this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null));}update(e){let r=e-this.lastFrameTime;if(r<this.frameInterval){this.rafId=requestAnimationFrame(this.update);return}if(this.lastFrameTime=e-r%this.frameInterval,this.frameCount++,e-this.lastFpsUpdate>=this.fpsUpdateInterval&&(this.currentFps=this.frameCount,this.frameCount=0,this.lastFpsUpdate=e),!!document.hidden){this.rafId=requestAnimationFrame(this.update);return}let a=[];this.animations.forEach((i,s)=>{if(i.isPaused)return;i.frameCount++;let l=ue(i.frameCount),c=0,u=[];i.particles=i.particles.map(d=>(d.life<=0||(c++,d.x+=d.vx,d.y+=d.vy,d.vy+=i.physics.gravity,d.vx+=i.physics.wind,d.vx*=i.physics.friction,d.vy*=i.physics.friction,i.animationType==="sparkles"?d.rotation+=5:d.rotation+=d.vx*2,d.life-=1.2,this.applyEffects(d,i),this.handleMortarExplosion(d,i,u),this.updateOpacity(d,i)),d)),u.length>0&&i.particles.push(...u),i.updateCallback&&!l&&i.updateCallback(i.particles),c===0&&(a.push(s),i.onComplete&&i.onComplete());}),a.forEach(i=>this.removeAnimation(i)),this.isRunning&&(this.rafId=requestAnimationFrame(this.update));}applyEffects(e,r){var i;let n=(i=r.config)==null?void 0:i.effects;if(!n)return;let{animationType:a}=r;n.flutter&&a==="confetti"&&(e.x+=Math.sin(e.life*.1)*.5,e.rotation+=Math.sin(e.life*.05)*2),n.windDrift&&(a==="snow"||a==="leaves")&&(e.x+=Math.sin(e.life*.05+e.id.charCodeAt(0))*.8),n.wobble&&a==="bubbles"&&(e.x+=Math.sin(e.life*.08)*.3,e.y+=Math.cos(e.life*.08)*.2);}handleMortarExplosion(e,r,n){var a,i;if(!(r.animationType!=="mortar"||!e.element))try{let s=JSON.parse(e.element);if(s.isShell&&!s.hasExploded){if(r.frameCount%3===0){let d=w.acquire();Object.assign(d,{id:`${e.id}-trail-${Date.now()}`,x:e.x+o(-2,2),y:e.y+o(-2,2),vx:o(-1,1),vy:o(0,2),life:30,opacity:.8,size:e.size*.7,rotation:0,color:e.color,element:JSON.stringify({isTrail:!0}),config:e.config}),n.push(d);}if(((i=(a=e.config)==null?void 0:a.lifetime)!=null?i:200)-e.life>=(s.timeToExplode||25)){s.hasExploded=!0,e.element=JSON.stringify(s);let d=window.innerWidth<768,h=d?20:30,y=[],P=["#FFFFFF","#FFF9C4","#BBDEFB","#C5CAE9","#D1C4E9","#FFE082","#FFCCBC"];for(let p=0;p<h;p++){let v=p/h,$=v*Math.PI*6,I=v*80,E=o(-.4,.4),B=o(-15,15),R=$+E,S=(I+B)*.5,x=R+Math.PI/2,W=3*(1-v*.3),b=w.acquire();Object.assign(b,{id:`${e.id}-burst-${p}`,x:e.x+Math.cos(R)*S*.1,y:e.y+Math.sin(R)*S*.1,vx:Math.cos(x)*W+Math.cos(R)*2,vy:Math.sin(x)*W+Math.sin(R)*2,life:120-v*40,opacity:1,size:o(2,5)*(1-v*.5),rotation:o(0,360),color:P[Math.floor(Math.random()*P.length)],element:JSON.stringify({isBurst:!0,isGalaxy:!0,twinkle:Math.random()>.7}),config:e.config}),y.push(b);}let C=d?5:8;for(let p=0;p<C;p++){let v=Math.PI*2*p/C,$=w.acquire();Object.assign($,{id:`${e.id}-core-${p}`,x:e.x,y:e.y,vx:Math.cos(v)*o(1,2),vy:Math.sin(v)*o(1,2),life:60,opacity:1,size:o(3,5),rotation:0,color:"#FFFFFF",element:JSON.stringify({isBurst:!0,isCore:!0}),config:e.config}),y.push($);}let M=w.acquire();Object.assign(M,{id:`${e.id}-flash`,x:e.x,y:e.y,vx:0,vy:0,life:20,opacity:1,size:30,rotation:0,color:"#ffffff",element:JSON.stringify({isBurst:!0}),config:e.config}),y.push(M),n.push(...y);}}}catch(s){}}updateOpacity(e,r){let{animationType:n,config:a}=r,i=a==null?void 0:a.effects;n==="sparkles"?(e.life>70?e.opacity=(100-e.life)/30:e.life<30&&(e.opacity=e.life/30),i!=null&&i.twinkle&&(e.opacity*=.5+Math.sin(e.life*.3)*.5)):n==="stars"&&(i!=null&&i.twinkle)?e.opacity=e.life/100*(.5+Math.sin(e.life*.3)*.5):e.opacity=e.life/100;}getStats(){return {activeAnimations:this.animations.size,currentFps:this.currentFps,isRunning:this.isRunning,totalParticles:Array.from(this.animations.values()).reduce((e,r)=>e+r.particles.filter(n=>n.life>0).length,0)}}setTargetFPS(e){this.frameInterval=1e3/e;}pauseAnimation(e){let r=this.animations.get(e);r&&!r.isPaused&&(r.isPaused=true,r.pausedAt=performance.now());}resumeAnimation(e){let r=this.animations.get(e);r&&r.isPaused&&(r.isPaused=false,this.animations.size>0&&!this.isRunning&&this.start());}isAnimationPaused(e){let r=this.animations.get(e);return r?!!r.isPaused:false}getAnimation(e){return this.animations.get(e)}},k=new tt;function so(t,e,r){let[n,a]=z.useState(false),i=z.useRef(null),s=z.useRef(null),l=z.useRef(null),c=z.useRef(null),u=typeof t=="string",d=u?c:t,h=z.useCallback(()=>new Promise(I=>{var rt,it,nt,at,st,lt,ct,dt,ft,mt,ut,ht,pt;let E=null;if(u){if(typeof document=="undefined")return;E=document.getElementById(t);}else E=d.current;if(!E){(rt=console.warn)==null||rt.call(console,`[Partycles] Element ${u?`with ID "${t}"`:"from ref"} not found. Make sure the element exists when reward() is called.`),I();return}let B=E.getBoundingClientRect(),R={x:B.left+B.width/2,y:B.top+B.height/2},S=me[e];if(!S){console.error(`Animation type "${e}" not found`),I();return}let x=r?K(r):void 0,W=S.createParticles(R,x||{}).map(q=>O(L({},q),{config:x||r}));if(typeof document=="undefined"){I();return}let b=document.createElement("div");b.style.position="fixed",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.pointerEvents="none",b.style.zIndex="9999",document.body.appendChild(b),s.current=b;let ye=client.createRoot(b);l.current=ye;b.getBoundingClientRect();let xe=e==="bubbles"?-0.1:e==="snow"?.05:.35,be=(st=(at=(it=x==null?void 0:x.physics)==null?void 0:it.gravity)!=null?at:(nt=r==null?void 0:r.physics)==null?void 0:nt.gravity)!=null?st:xe,Pe=(ft=(dt=(lt=x==null?void 0:x.physics)==null?void 0:lt.friction)!=null?dt:(ct=r==null?void 0:r.physics)==null?void 0:ct.friction)!=null?ft:.98,ve=(pt=(ht=(mt=x==null?void 0:x.physics)==null?void 0:mt.wind)!=null?ht:(ut=r==null?void 0:r.physics)==null?void 0:ut.wind)!=null?pt:0,ot=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;i.current=ot;let Fe=q=>{l.current&&l.current.render(z__default.default.createElement(z__default.default.Fragment,null,q.filter(T=>T.life>0).map(T=>z__default.default.createElement("div",{key:T.id,style:xt(T)},S.renderParticle(T)))));};k.addAnimation({id:ot,particles:W,containerElement:b,renderFunction:S.renderParticle,updateCallback:Fe,onComplete:()=>{l.current&&(l.current.unmount(),l.current=null),s.current=null,i.current=null,a(false),I();},physics:{gravity:be,friction:Pe,wind:ve},animationType:e,config:x||r,frameCount:0}),a(true);}),[t,e,r,u,d]),y=z.useCallback(()=>n?Promise.resolve():h(),[h,n]),P=z.useCallback(()=>{i.current&&k.pauseAnimation(i.current);},[]),C=z.useCallback(()=>{i.current&&k.resumeAnimation(i.current);},[]),M=z.useCallback(()=>(i.current&&(k.removeAnimation(i.current),i.current=null),a(false),h()),[h]),[p,v]=z.useState(null);z.useEffect(()=>{v(i.current);},[n]);let $=z.useMemo(()=>p?k.isAnimationPaused(p):false,[p]);return z.useEffect(()=>()=>{i.current&&k.removeAnimation(i.current),l.current&&(l.current.unmount(),l.current=null),s.current&&document.body.contains(s.current)&&(document.body.removeChild(s.current),s.current=null);},[]),u?{reward:y,isAnimating:n,pause:P,resume:C,replay:M,isPaused:$}:{reward:y,isAnimating:n,targetRef:d,pause:P,resume:C,replay:M,isPaused:$}}exports.animationManager=k;exports.emojiPresets=Xe;exports.isMobileDevice=Q;exports.optimizeConfigForMobile=K;exports.particlePool=w;exports.useReward=so;//# sourceMappingURL=index.js.map
54
+ `}}))}return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",backgroundColor:t.color,borderRadius:"50%",opacity:t.opacity}})};var io=["#FFFFFF","#FFF8DC","#FFFACD","#FFE4B5","#FFDEAD","#F0E68C","#FFD700"],de=(t,e)=>{let{particleCount:r=50,spread:n=300,startVelocity:a=1,colors:i=io,elementSize:s=40,lifetime:l=200}=e;return m(r,()=>{let c=Math.random()*Math.PI*2,u=o(0,n),d=Math.random(),h=s*(.3+d*.7);return {id:f(),x:t.x+Math.cos(c)*u,y:t.y+Math.sin(c)*u,vx:o(-0.5,.5)*a,vy:o(-0.5,-1.5)*a,life:l,opacity:.1+d*.5,size:h,rotation:0,color:i[Math.floor(Math.random()*i.length)],element:JSON.stringify({depth:d,pulsePhase:Math.random()*Math.PI*2,baseSize:h})}})},fe=t=>{var l;let e={};try{t.element&&typeof t.element=="string"&&(e=JSON.parse(t.element));}catch(c){}let r=Math.sin(t.life*.05+(e.pulsePhase||0))*.1+1,n=(e.baseSize||t.size)*r,a=Math.min(1,(((l=t.config)==null?void 0:l.lifetime)||200-t.life)/20),i=Math.min(1,t.life/40),s=t.opacity*a*i;return z__default.default.createElement("div",{key:t.id,style:{width:"100%",height:"100%",position:"relative"}},z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n*3}px`,height:`${n*3}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}22 0%, transparent 50%)`,filter:"blur(20px)",opacity:s*.6}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n*2}px`,height:`${n*2}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}44 0%, transparent 60%)`,filter:"blur(10px)",opacity:s*.8}}),z__default.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",width:`${n}px`,height:`${n}px`,transform:"translate(-50%, -50%)",background:`radial-gradient(circle, ${t.color}88 0%, ${t.color}44 50%, transparent 100%)`,borderRadius:"50%",filter:"blur(2px)",opacity:s}}))};var me={confetti:{createParticles:bt,renderParticle:Pt},sparkles:{createParticles:Ft,renderParticle:Ct},hearts:{createParticles:$t,renderParticle:wt},fireworks:{createParticles:zt,renderParticle:At},bubbles:{createParticles:kt,renderParticle:St},stars:{createParticles:It,renderParticle:Et},snow:{createParticles:Bt,renderParticle:Dt},emoji:{createParticles:Lt,renderParticle:Ot},coins:{createParticles:jt,renderParticle:Vt},petals:{createParticles:Ht,renderParticle:Ut},aurora:{createParticles:Wt,renderParticle:Xt},fireflies:{createParticles:Gt,renderParticle:qt},paint:{createParticles:Jt,renderParticle:Yt},balloons:{createParticles:_t,renderParticle:Zt},galaxy:{createParticles:Qt,renderParticle:Kt},glitch:{createParticles:te,renderParticle:ee},magicdust:{createParticles:oe,renderParticle:re},crystals:{createParticles:ie,renderParticle:ne},leaves:{createParticles:ae,renderParticle:se},mortar:{createParticles:le,renderParticle:ce},bokeh:{createParticles:de,renderParticle:fe}};var Q=()=>{if(typeof window=="undefined")return false;let t=navigator.userAgent||navigator.vendor||window.opera||"",e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t),r=window.innerWidth<=768,n="ontouchstart"in window||navigator.maxTouchPoints>0;return e||r&&n},K=t=>{var e,r,n;return Q()?O(L({},t),{particleCount:Math.floor((t.particleCount||50)*.6),elementSize:Math.floor((t.elementSize||20)*.8),lifetime:Math.floor((t.lifetime||150)*.8),physics:O(L({},t.physics),{gravity:Math.round((((e=t.physics)==null?void 0:e.gravity)||0)*100)/100,wind:Math.round((((r=t.physics)==null?void 0:r.wind)||0)*100)/100,friction:Math.round((((n=t.physics)==null?void 0:n.friction)||.98)*100)/100})}):t},ue=t=>Q()?t%3===0:false;var tt=class{constructor(){this.animations=new Map;this.rafId=null;this.isRunning=false;this.lastFrameTime=0;this.frameInterval=1e3/60;this.frameCount=0;this.fpsUpdateInterval=1e3;this.lastFpsUpdate=0;this.currentFps=0;this.update=this.update.bind(this);}addAnimation(e){this.animations.set(e.id,e),!this.isRunning&&this.animations.size>0&&this.start();}removeAnimation(e){let r=this.animations.get(e);r&&(w.releaseAll(r.particles),r.containerElement&&document.body.contains(r.containerElement)&&document.body.removeChild(r.containerElement),this.animations.delete(e)),this.animations.size===0&&this.stop();}start(){this.isRunning||(this.isRunning=true,this.lastFrameTime=performance.now(),this.lastFpsUpdate=this.lastFrameTime,this.frameCount=0,this.rafId=requestAnimationFrame(this.update));}stop(){this.isRunning&&(this.isRunning=false,this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null));}update(e){let r=e-this.lastFrameTime;if(r<this.frameInterval){this.rafId=requestAnimationFrame(this.update);return}if(this.lastFrameTime=e-r%this.frameInterval,this.frameCount++,e-this.lastFpsUpdate>=this.fpsUpdateInterval&&(this.currentFps=this.frameCount,this.frameCount=0,this.lastFpsUpdate=e),!!document.hidden){this.rafId=requestAnimationFrame(this.update);return}let a=[];this.animations.forEach((i,s)=>{if(i.isPaused)return;i.frameCount++;let l=ue(i.frameCount),c=0,u=[];i.particles=i.particles.map(d=>(d.life<=0||(c++,d.x+=d.vx,d.y+=d.vy,d.vy+=i.physics.gravity,d.vx+=i.physics.wind,d.vx*=i.physics.friction,d.vy*=i.physics.friction,i.animationType==="sparkles"?d.rotation+=5:d.rotation+=d.vx*2,d.life-=1.2,this.applyEffects(d,i),this.handleMortarExplosion(d,i,u),this.updateOpacity(d,i)),d)),u.length>0&&i.particles.push(...u),i.updateCallback&&!l&&i.updateCallback(i.particles),c===0&&(a.push(s),i.onComplete&&i.onComplete());}),a.forEach(i=>this.removeAnimation(i)),this.isRunning&&(this.rafId=requestAnimationFrame(this.update));}applyEffects(e,r){var i;let n=(i=r.config)==null?void 0:i.effects;if(!n)return;let{animationType:a}=r;n.flutter&&a==="confetti"&&(e.x+=Math.sin(e.life*.1)*.5,e.rotation+=Math.sin(e.life*.05)*2),n.windDrift&&(a==="snow"||a==="leaves")&&(e.x+=Math.sin(e.life*.05+e.id.charCodeAt(0))*.8),n.wobble&&a==="bubbles"&&(e.x+=Math.sin(e.life*.08)*.3,e.y+=Math.cos(e.life*.08)*.2);}handleMortarExplosion(e,r,n){var a,i;if(!(r.animationType!=="mortar"||!e.element))try{let s=JSON.parse(e.element);if(s.isShell&&!s.hasExploded){if(r.frameCount%3===0){let d=w.acquire();Object.assign(d,{id:`${e.id}-trail-${Date.now()}`,x:e.x+o(-2,2),y:e.y+o(-2,2),vx:o(-1,1),vy:o(0,2),life:30,opacity:.8,size:e.size*.7,rotation:0,color:e.color,element:JSON.stringify({isTrail:!0}),config:e.config}),n.push(d);}if(((i=(a=e.config)==null?void 0:a.lifetime)!=null?i:200)-e.life>=(s.timeToExplode||25)){s.hasExploded=!0,e.element=JSON.stringify(s);let d=window.innerWidth<768,h=d?20:30,P=[],b=["#FFFFFF","#FFF9C4","#BBDEFB","#C5CAE9","#D1C4E9","#FFE082","#FFCCBC"];for(let p=0;p<h;p++){let v=p/h,$=v*Math.PI*6,I=v*80,E=o(-.4,.4),B=o(-15,15),S=$+E,R=(I+B)*.5,g=S+Math.PI/2,W=3*(1-v*.3),x=w.acquire();Object.assign(x,{id:`${e.id}-burst-${p}`,x:e.x+Math.cos(S)*R*.1,y:e.y+Math.sin(S)*R*.1,vx:Math.cos(g)*W+Math.cos(S)*2,vy:Math.sin(g)*W+Math.sin(S)*2,life:120-v*40,opacity:1,size:o(2,5)*(1-v*.5),rotation:o(0,360),color:b[Math.floor(Math.random()*b.length)],element:JSON.stringify({isBurst:!0,isGalaxy:!0,twinkle:Math.random()>.7}),config:e.config}),P.push(x);}let C=d?5:8;for(let p=0;p<C;p++){let v=Math.PI*2*p/C,$=w.acquire();Object.assign($,{id:`${e.id}-core-${p}`,x:e.x,y:e.y,vx:Math.cos(v)*o(1,2),vy:Math.sin(v)*o(1,2),life:60,opacity:1,size:o(3,5),rotation:0,color:"#FFFFFF",element:JSON.stringify({isBurst:!0,isCore:!0}),config:e.config}),P.push($);}let M=w.acquire();Object.assign(M,{id:`${e.id}-flash`,x:e.x,y:e.y,vx:0,vy:0,life:20,opacity:1,size:30,rotation:0,color:"#ffffff",element:JSON.stringify({isBurst:!0}),config:e.config}),P.push(M),n.push(...P);}}}catch(s){}}updateOpacity(e,r){let{animationType:n,config:a}=r,i=a==null?void 0:a.effects;n==="sparkles"?(e.life>70?e.opacity=(100-e.life)/30:e.life<30&&(e.opacity=e.life/30),i!=null&&i.twinkle&&(e.opacity*=.5+Math.sin(e.life*.3)*.5)):n==="stars"&&(i!=null&&i.twinkle)?e.opacity=e.life/100*(.5+Math.sin(e.life*.3)*.5):e.opacity=e.life/100;}getStats(){return {activeAnimations:this.animations.size,currentFps:this.currentFps,isRunning:this.isRunning,totalParticles:Array.from(this.animations.values()).reduce((e,r)=>e+r.particles.filter(n=>n.life>0).length,0)}}setTargetFPS(e){this.frameInterval=1e3/e;}pauseAnimation(e){let r=this.animations.get(e);r&&!r.isPaused&&(r.isPaused=true,r.pausedAt=performance.now());}resumeAnimation(e){let r=this.animations.get(e);r&&r.isPaused&&(r.isPaused=false,this.animations.size>0&&!this.isRunning&&this.start());}isAnimationPaused(e){let r=this.animations.get(e);return r?!!r.isPaused:false}getAnimation(e){return this.animations.get(e)}},k=new tt;function so(t,e,r){let[n,a]=z.useState(false),i=z.useRef(null),s=z.useRef(null),l=z.useRef(null),c=z.useRef(null),u=typeof t=="string",d=u?c:t,h=z.useCallback(()=>new Promise(I=>{var rt,it,nt,at,st,lt,ct,dt,ft,mt,ut,ht,pt;let E=null;if(u){if(typeof document=="undefined")return;E=document.getElementById(t);}else E=d.current;if(!E){(rt=console.warn)==null||rt.call(console,`[Partycles] Element ${u?`with ID "${t}"`:"from ref"} not found. Make sure the element exists when reward() is called.`),I();return}let B=E.getBoundingClientRect(),S={x:B.left+B.width/2,y:B.top+B.height/2},R=me[e];if(!R){console.error(`Animation type "${e}" not found`),I();return}let g=r?K(r):void 0,W=R.createParticles(S,g||{}).map(q=>O(L({},q),{config:g||r}));if(typeof document=="undefined"){I();return}let x=document.createElement("div");x.style.position="fixed",x.style.top="0",x.style.left="0",x.style.width="100%",x.style.height="100%",x.style.pointerEvents="none",x.style.zIndex="9999",document.body.appendChild(x),s.current=x;let ye=client.createRoot(x);l.current=ye;x.getBoundingClientRect();let xe=e==="bubbles"?-0.1:e==="snow"?.05:.35,be=(st=(at=(it=g==null?void 0:g.physics)==null?void 0:it.gravity)!=null?at:(nt=r==null?void 0:r.physics)==null?void 0:nt.gravity)!=null?st:xe,Pe=(ft=(dt=(lt=g==null?void 0:g.physics)==null?void 0:lt.friction)!=null?dt:(ct=r==null?void 0:r.physics)==null?void 0:ct.friction)!=null?ft:.98,ve=(pt=(ht=(mt=g==null?void 0:g.physics)==null?void 0:mt.wind)!=null?ht:(ut=r==null?void 0:r.physics)==null?void 0:ut.wind)!=null?pt:0,ot=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;i.current=ot;let Fe=q=>{l.current&&l.current.render(z__default.default.createElement(z__default.default.Fragment,null,q.filter(T=>T.life>0).map(T=>z__default.default.createElement("div",{key:T.id,style:xt(T)},R.renderParticle(T)))));};k.addAnimation({id:ot,particles:W,containerElement:x,renderFunction:R.renderParticle,updateCallback:Fe,onComplete:()=>{l.current&&(l.current.unmount(),l.current=null),s.current=null,i.current=null,a(false),I();},physics:{gravity:be,friction:Pe,wind:ve},animationType:e,config:g||r,frameCount:0}),a(true);}),[t,e,r,u,d]),P=z.useCallback(()=>n?Promise.resolve():h(),[h,n]),b=z.useCallback(()=>{i.current&&k.pauseAnimation(i.current);},[]),C=z.useCallback(()=>{i.current&&k.resumeAnimation(i.current);},[]),M=z.useCallback(()=>(i.current&&(k.removeAnimation(i.current),i.current=null),a(false),h()),[h]),[p,v]=z.useState(null);z.useEffect(()=>{v(i.current);},[n]);let $=z.useMemo(()=>p?k.isAnimationPaused(p):false,[p]);return z.useEffect(()=>()=>{i.current&&k.removeAnimation(i.current),l.current&&(l.current.unmount(),l.current=null),s.current&&document.body.contains(s.current)&&(document.body.removeChild(s.current),s.current=null);},[]),u?{reward:P,isAnimating:n,pause:b,resume:C,replay:M,isPaused:$}:{reward:P,isAnimating:n,targetRef:d,pause:b,resume:C,replay:M,isPaused:$}}exports.animationManager=k;exports.emojiPresets=Xe;exports.isMobileDevice=Q;exports.optimizeConfigForMobile=K;exports.particlePool=w;exports.useReward=so;//# sourceMappingURL=index.js.map
55
55
  //# sourceMappingURL=index.js.map