dune-react 0.0.1

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 (269) hide show
  1. package/README.md +49 -0
  2. package/dist/_virtual/_commonjsHelpers.js +8 -0
  3. package/dist/_virtual/index.js +4 -0
  4. package/dist/_virtual/sha1.js +4 -0
  5. package/dist/_virtual/util.js +4 -0
  6. package/dist/components/index.d.ts +4 -0
  7. package/dist/components/ui-custom/background.d.ts +8 -0
  8. package/dist/components/ui-custom/background.js +51 -0
  9. package/dist/components/ui-custom/cover.d.ts +17 -0
  10. package/dist/components/ui-custom/cover.js +231 -0
  11. package/dist/components/ui-custom/sparkles.d.ts +13 -0
  12. package/dist/components/ui-custom/sparkles.js +418 -0
  13. package/dist/components/ui-custom/spotlight-new.d.ts +13 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +40 -0
  16. package/dist/node_modules/.pnpm/@fluid-tailwind_tailwind-merge@0.0.3_tailwind-merge@3.3.1/node_modules/@fluid-tailwind/tailwind-merge/dist/index.js +50 -0
  17. package/dist/node_modules/.pnpm/@tsparticles_basic@3.9.1/node_modules/@tsparticles/basic/browser/index.js +25 -0
  18. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js +510 -0
  19. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Container.js +463 -0
  20. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Engine.js +293 -0
  21. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particle.js +355 -0
  22. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particles.js +326 -0
  23. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Retina.js +37 -0
  24. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js +105 -0
  25. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js +309 -0
  26. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js +10 -0
  27. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js +64 -0
  28. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js +10 -0
  29. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js +9 -0
  30. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js +60 -0
  31. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js +57 -0
  32. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js +120 -0
  33. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/AnimationStatus.js +8 -0
  34. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/MoveDirection.js +17 -0
  35. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/OutModeDirection.js +10 -0
  36. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/RotateDirection.js +9 -0
  37. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/InteractivityDetect.js +9 -0
  38. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/AnimationMode.js +10 -0
  39. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/CollisionMode.js +9 -0
  40. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/LimitMode.js +8 -0
  41. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/OutMode.js +11 -0
  42. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/PixelMode.js +8 -0
  43. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ResponsiveMode.js +8 -0
  44. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ThemeMode.js +9 -0
  45. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/AlterType.js +8 -0
  46. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DestroyType.js +9 -0
  47. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js +8 -0
  48. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EasingType.js +33 -0
  49. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EventType.js +18 -0
  50. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/GradientType.js +9 -0
  51. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/InteractorType.js +8 -0
  52. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/ParticleOutType.js +9 -0
  53. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/StartValueType.js +9 -0
  54. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js +38 -0
  55. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js +60 -0
  56. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js +39 -0
  57. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js +27 -0
  58. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +24 -0
  59. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js +22 -0
  60. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js +21 -0
  61. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js +20 -0
  62. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
  63. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js +30 -0
  64. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js +33 -0
  65. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
  66. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js +25 -0
  67. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
  68. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js +25 -0
  69. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js +28 -0
  70. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js +24 -0
  71. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js +163 -0
  72. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js +29 -0
  73. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
  74. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +10 -0
  75. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js +36 -0
  76. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
  77. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
  78. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js +36 -0
  79. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js +95 -0
  80. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js +22 -0
  81. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js +36 -0
  82. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js +30 -0
  83. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js +30 -0
  84. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js +26 -0
  85. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
  86. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js +22 -0
  87. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
  88. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js +26 -0
  89. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js +27 -0
  90. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js +23 -0
  91. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +22 -0
  92. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js +23 -0
  93. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +22 -0
  94. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js +97 -0
  95. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js +38 -0
  96. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js +36 -0
  97. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js +23 -0
  98. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js +22 -0
  99. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js +25 -0
  100. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
  101. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js +31 -0
  102. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js +24 -0
  103. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js +26 -0
  104. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js +46 -0
  105. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Types/RangeType.js +8 -0
  106. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js +168 -0
  107. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js +316 -0
  108. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js +47 -0
  109. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js +135 -0
  110. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js +15 -0
  111. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js +26 -0
  112. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js +475 -0
  113. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/index.js +82 -0
  114. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/init.js +9 -0
  115. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js +81 -0
  116. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Options/Classes/Attract.js +38 -0
  117. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js +50 -0
  118. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/index.js +10 -0
  119. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js +45 -0
  120. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Options/Classes/Bounce.js +17 -0
  121. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js +47 -0
  122. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/index.js +10 -0
  123. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js +274 -0
  124. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Enums.js +9 -0
  125. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/Bubble.js +20 -0
  126. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleBase.js +39 -0
  127. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleDiv.js +20 -0
  128. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js +13 -0
  129. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/index.js +10 -0
  130. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js +59 -0
  131. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/Connect.js +24 -0
  132. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/ConnectLinks.js +17 -0
  133. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js +44 -0
  134. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/index.js +10 -0
  135. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js +76 -0
  136. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/Grab.js +20 -0
  137. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/GrabLinks.js +29 -0
  138. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js +19 -0
  139. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/index.js +10 -0
  140. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js +32 -0
  141. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/index.js +10 -0
  142. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Options/Classes/Push.js +34 -0
  143. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js +47 -0
  144. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/index.js +10 -0
  145. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Options/Classes/Remove.js +19 -0
  146. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js +39 -0
  147. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/index.js +10 -0
  148. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/Repulse.js +20 -0
  149. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseBase.js +38 -0
  150. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseDiv.js +20 -0
  151. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js +160 -0
  152. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/index.js +10 -0
  153. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Options/Classes/Slow.js +21 -0
  154. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js +53 -0
  155. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/index.js +10 -0
  156. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js +37 -0
  157. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/index.js +10 -0
  158. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js +28 -0
  159. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js +18 -0
  160. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js +41 -0
  161. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js +17 -0
  162. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js +23 -0
  163. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js +10 -0
  164. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js +33 -0
  165. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js +152 -0
  166. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js +109 -0
  167. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js +18 -0
  168. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/Links.js +58 -0
  169. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksShadow.js +25 -0
  170. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksTriangle.js +28 -0
  171. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js +106 -0
  172. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/index.js +10 -0
  173. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js +9 -0
  174. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js +8 -0
  175. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/BaseMover.js +37 -0
  176. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/Utils.js +128 -0
  177. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/index.js +10 -0
  178. package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js +31 -0
  179. package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/index.js +10 -0
  180. package/dist/node_modules/.pnpm/@tsparticles_plugin-easing-quad@3.9.1/node_modules/@tsparticles/plugin-easing-quad/browser/index.js +11 -0
  181. package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/HexColorManager.js +43 -0
  182. package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/index.js +8 -0
  183. package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/HslColorManager.js +46 -0
  184. package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/index.js +8 -0
  185. package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/RgbColorManager.js +45 -0
  186. package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/index.js +8 -0
  187. package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/Particles.js +18 -0
  188. package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/index.js +9 -0
  189. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js +28 -0
  190. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/Utils.js +12 -0
  191. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/index.js +8 -0
  192. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js +103 -0
  193. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/Utils.js +13 -0
  194. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/index.js +8 -0
  195. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js +51 -0
  196. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js +6 -0
  197. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Enums/DisposalMethod.js +14 -0
  198. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Types/GIFDataHeaders.js +13 -0
  199. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js +419 -0
  200. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js +130 -0
  201. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js +36 -0
  202. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js +33 -0
  203. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Utils.js +94 -0
  204. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/index.js +54 -0
  205. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/LineDrawer.js +16 -0
  206. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/Utils.js +9 -0
  207. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/index.js +8 -0
  208. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js +27 -0
  209. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js +16 -0
  210. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js +30 -0
  211. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/Utils.js +19 -0
  212. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/index.js +20 -0
  213. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js +16 -0
  214. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/Utils.js +8 -0
  215. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/index.js +8 -0
  216. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/StarDrawer.js +22 -0
  217. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/Utils.js +14 -0
  218. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/index.js +8 -0
  219. package/dist/node_modules/.pnpm/@tsparticles_slim@3.9.1/node_modules/@tsparticles/slim/browser/index.js +56 -0
  220. package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js +23 -0
  221. package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/index.js +10 -0
  222. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js +52 -0
  223. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js +23 -0
  224. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js +20 -0
  225. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js +20 -0
  226. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Utils.js +58 -0
  227. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/index.js +10 -0
  228. package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js +38 -0
  229. package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/index.js +10 -0
  230. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js +36 -0
  231. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js +37 -0
  232. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js +36 -0
  233. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js +45 -0
  234. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js +110 -0
  235. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js +66 -0
  236. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/index.js +10 -0
  237. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js +29 -0
  238. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js +30 -0
  239. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js +77 -0
  240. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/index.js +10 -0
  241. package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js +30 -0
  242. package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/index.js +10 -0
  243. package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js +35 -0
  244. package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/index.js +10 -0
  245. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  246. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/index.js +826 -0
  247. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/supported.js +242 -0
  248. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/util.js +64 -0
  249. package/dist/node_modules/.pnpm/js-sha1@0.6.0/node_modules/js-sha1/src/sha1.js +311 -0
  250. package/dist/node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js +22 -0
  251. package/dist/node_modules/.pnpm/tailwind-merge@3.3.1/node_modules/tailwind-merge/dist/bundle-mjs.js +3007 -0
  252. package/dist/utils/css-utils.d.ts +10 -0
  253. package/dist/utils/css-utils.js +17 -0
  254. package/dist/utils/index.d.ts +9 -0
  255. package/dist/utils/storage-qetag.d.ts +22 -0
  256. package/dist/utils/storage-qetag.js +3 -0
  257. package/dist/utils/utils-api.d.ts +17 -0
  258. package/dist/utils/utils-api.js +31 -0
  259. package/dist/utils/utils-canvas.d.ts +30 -0
  260. package/dist/utils/utils-canvas.js +54 -0
  261. package/dist/utils/utils-common.d.ts +6 -0
  262. package/dist/utils/utils-common.js +15 -0
  263. package/dist/utils/utils-image.d.ts +33 -0
  264. package/dist/utils/utils-image.js +57 -0
  265. package/dist/utils/utils-random.d.ts +1 -0
  266. package/dist/utils/utils-random.js +6 -0
  267. package/dist/utils/utils-time.d.ts +49 -0
  268. package/dist/utils/utils-time.js +112 -0
  269. package/package.json +81 -0
@@ -0,0 +1,419 @@
1
+ import { loadImage } from "../Utils.js";
2
+ import { InterlaceOffsets, InterlaceSteps } from "./Constants.js";
3
+ import { ByteStream } from "./ByteStream.js";
4
+ import { DisposalMethod } from "./Enums/DisposalMethod.js";
5
+ import { GIFDataHeaders } from "./Types/GIFDataHeaders.js";
6
+ const origin = {
7
+ x: 0,
8
+ y: 0
9
+ }, defaultFrame = 0, half = 0.5, initialTime = 0, firstIndex = 0, defaultLoopCount = 0;
10
+ function parseColorTable(byteStream, count) {
11
+ const colors = [];
12
+ for (let i = 0; i < count; i++) {
13
+ colors.push({
14
+ r: byteStream.data[byteStream.pos],
15
+ g: byteStream.data[byteStream.pos + 1],
16
+ b: byteStream.data[byteStream.pos + 2]
17
+ });
18
+ byteStream.pos += 3;
19
+ }
20
+ return colors;
21
+ }
22
+ function parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex) {
23
+ switch (byteStream.nextByte()) {
24
+ case GIFDataHeaders.GraphicsControlExtension: {
25
+ const frame = gif.frames[getFrameIndex(false)];
26
+ byteStream.pos++;
27
+ const packedByte = byteStream.nextByte();
28
+ frame.GCreserved = (packedByte & 224) >>> 5;
29
+ frame.disposalMethod = (packedByte & 28) >>> 2;
30
+ frame.userInputDelayFlag = (packedByte & 2) === 2;
31
+ const transparencyFlag = (packedByte & 1) === 1;
32
+ frame.delayTime = byteStream.nextTwoBytes() * 10;
33
+ const transparencyIndex = byteStream.nextByte();
34
+ if (transparencyFlag) {
35
+ getTransparencyIndex(transparencyIndex);
36
+ }
37
+ byteStream.pos++;
38
+ break;
39
+ }
40
+ case GIFDataHeaders.ApplicationExtension: {
41
+ byteStream.pos++;
42
+ const applicationExtension = {
43
+ identifier: byteStream.getString(8),
44
+ authenticationCode: byteStream.getString(3),
45
+ data: byteStream.readSubBlocksBin()
46
+ };
47
+ gif.applicationExtensions.push(applicationExtension);
48
+ break;
49
+ }
50
+ case GIFDataHeaders.CommentExtension: {
51
+ gif.comments.push([getFrameIndex(false), byteStream.readSubBlocks()]);
52
+ break;
53
+ }
54
+ case GIFDataHeaders.PlainTextExtension: {
55
+ if (gif.globalColorTable.length === 0) {
56
+ throw new EvalError("plain text extension without global color table");
57
+ }
58
+ byteStream.pos++;
59
+ gif.frames[getFrameIndex(false)].plainTextData = {
60
+ left: byteStream.nextTwoBytes(),
61
+ top: byteStream.nextTwoBytes(),
62
+ width: byteStream.nextTwoBytes(),
63
+ height: byteStream.nextTwoBytes(),
64
+ charSize: {
65
+ width: byteStream.nextTwoBytes(),
66
+ height: byteStream.nextTwoBytes()
67
+ },
68
+ foregroundColor: byteStream.nextByte(),
69
+ backgroundColor: byteStream.nextByte(),
70
+ text: byteStream.readSubBlocks()
71
+ };
72
+ break;
73
+ }
74
+ default:
75
+ byteStream.skipSubBlocks();
76
+ break;
77
+ }
78
+ }
79
+ async function parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {
80
+ const frame = gif.frames[getFrameIndex(true)];
81
+ frame.left = byteStream.nextTwoBytes();
82
+ frame.top = byteStream.nextTwoBytes();
83
+ frame.width = byteStream.nextTwoBytes();
84
+ frame.height = byteStream.nextTwoBytes();
85
+ const packedByte = byteStream.nextByte(), localColorTableFlag = (packedByte & 128) === 128, interlacedFlag = (packedByte & 64) === 64;
86
+ frame.sortFlag = (packedByte & 32) === 32;
87
+ frame.reserved = (packedByte & 24) >>> 3;
88
+ const localColorCount = 1 << (packedByte & 7) + 1;
89
+ if (localColorTableFlag) {
90
+ frame.localColorTable = parseColorTable(byteStream, localColorCount);
91
+ }
92
+ const getColor = (index) => {
93
+ const { r, g, b } = (localColorTableFlag ? frame.localColorTable : gif.globalColorTable)[index];
94
+ if (index !== getTransparencyIndex(null)) {
95
+ return { r, g, b, a: 255 };
96
+ }
97
+ return { r, g, b, a: avgAlpha ? ~~((r + g + b) / 3) : 0 };
98
+ };
99
+ const image = (() => {
100
+ try {
101
+ return new ImageData(frame.width, frame.height, { colorSpace: "srgb" });
102
+ } catch (error) {
103
+ if (error instanceof DOMException && error.name === "IndexSizeError") {
104
+ return null;
105
+ }
106
+ throw error;
107
+ }
108
+ })();
109
+ if (image == null) {
110
+ throw new EvalError("GIF frame size is to large");
111
+ }
112
+ const minCodeSize = byteStream.nextByte(), imageData = byteStream.readSubBlocksBin(), clearCode = 1 << minCodeSize;
113
+ const readBits = (pos, len) => {
114
+ const bytePos = pos >>> 3, bitPos = pos & 7;
115
+ return (imageData[bytePos] + (imageData[bytePos + 1] << 8) + (imageData[bytePos + 2] << 16) & (1 << len) - 1 << bitPos) >>> bitPos;
116
+ };
117
+ if (interlacedFlag) {
118
+ for (let code = 0, size = minCodeSize + 1, pos = 0, dic = [[0]], pass = 0; pass < 4; pass++) {
119
+ if (InterlaceOffsets[pass] < frame.height) {
120
+ let pixelPos = 0, lineIndex = 0, exit = false;
121
+ while (!exit) {
122
+ const last = code;
123
+ code = readBits(pos, size);
124
+ pos += size + 1;
125
+ if (code === clearCode) {
126
+ size = minCodeSize + 1;
127
+ dic.length = clearCode + 2;
128
+ for (let i = 0; i < dic.length; i++) {
129
+ dic[i] = i < clearCode ? [i] : [];
130
+ }
131
+ } else {
132
+ if (code >= dic.length) {
133
+ dic.push(dic[last].concat(dic[last][0]));
134
+ } else if (last !== clearCode) {
135
+ dic.push(dic[last].concat(dic[code][0]));
136
+ }
137
+ for (const item of dic[code]) {
138
+ const { r, g, b, a } = getColor(item);
139
+ image.data.set([r, g, b, a], InterlaceOffsets[pass] * frame.width + InterlaceSteps[pass] * lineIndex + pixelPos % (frame.width * 4));
140
+ pixelPos += 4;
141
+ }
142
+ if (dic.length === 1 << size && size < 12) {
143
+ size++;
144
+ }
145
+ }
146
+ if (pixelPos === frame.width * 4 * (lineIndex + 1)) {
147
+ lineIndex++;
148
+ if (InterlaceOffsets[pass] + InterlaceSteps[pass] * lineIndex >= frame.height) {
149
+ exit = true;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ frame.image = image;
156
+ frame.bitmap = await createImageBitmap(image);
157
+ } else {
158
+ let code = 0, size = minCodeSize + 1, pos = 0, pixelPos = -4, exit = false;
159
+ const dic = [[0]];
160
+ while (!exit) {
161
+ const last = code;
162
+ code = readBits(pos, size);
163
+ pos += size;
164
+ if (code === clearCode) {
165
+ size = minCodeSize + 1;
166
+ dic.length = clearCode + 2;
167
+ for (let i = 0; i < dic.length; i++) {
168
+ dic[i] = i < clearCode ? [i] : [];
169
+ }
170
+ } else {
171
+ if (code === clearCode + 1) {
172
+ exit = true;
173
+ break;
174
+ }
175
+ if (code >= dic.length) {
176
+ dic.push(dic[last].concat(dic[last][0]));
177
+ } else if (last !== clearCode) {
178
+ dic.push(dic[last].concat(dic[code][0]));
179
+ }
180
+ for (const item of dic[code]) {
181
+ const { r, g, b, a } = getColor(item);
182
+ image.data.set([r, g, b, a], pixelPos += 4);
183
+ }
184
+ if (dic.length >= 1 << size && size < 12) {
185
+ size++;
186
+ }
187
+ }
188
+ }
189
+ frame.image = image;
190
+ frame.bitmap = await createImageBitmap(image);
191
+ }
192
+ }
193
+ async function parseBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {
194
+ switch (byteStream.nextByte()) {
195
+ case GIFDataHeaders.EndOfFile:
196
+ return true;
197
+ case GIFDataHeaders.Image:
198
+ await parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex);
199
+ break;
200
+ case GIFDataHeaders.Extension:
201
+ parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex);
202
+ break;
203
+ default:
204
+ throw new EvalError("undefined block found");
205
+ }
206
+ return false;
207
+ }
208
+ function getGIFLoopAmount(gif) {
209
+ for (const extension of gif.applicationExtensions) {
210
+ if (extension.identifier + extension.authenticationCode !== "NETSCAPE2.0") {
211
+ continue;
212
+ }
213
+ return extension.data[1] + (extension.data[2] << 8);
214
+ }
215
+ return NaN;
216
+ }
217
+ async function decodeGIF(gifURL, progressCallback, avgAlpha) {
218
+ if (!avgAlpha)
219
+ avgAlpha = false;
220
+ const res = await fetch(gifURL);
221
+ if (!res.ok && res.status === 404) {
222
+ throw new EvalError("file not found");
223
+ }
224
+ const buffer = await res.arrayBuffer();
225
+ const gif = {
226
+ width: 0,
227
+ height: 0,
228
+ totalTime: 0,
229
+ colorRes: 0,
230
+ pixelAspectRatio: 0,
231
+ frames: [],
232
+ sortFlag: false,
233
+ globalColorTable: [],
234
+ backgroundImage: new ImageData(1, 1, { colorSpace: "srgb" }),
235
+ comments: [],
236
+ applicationExtensions: []
237
+ }, byteStream = new ByteStream(new Uint8ClampedArray(buffer));
238
+ if (byteStream.getString(6) !== "GIF89a") {
239
+ throw new Error("not a supported GIF file");
240
+ }
241
+ gif.width = byteStream.nextTwoBytes();
242
+ gif.height = byteStream.nextTwoBytes();
243
+ const packedByte = byteStream.nextByte(), globalColorTableFlag = (packedByte & 128) === 128;
244
+ gif.colorRes = (packedByte & 112) >>> 4;
245
+ gif.sortFlag = (packedByte & 8) === 8;
246
+ const globalColorCount = 1 << (packedByte & 7) + 1, backgroundColorIndex = byteStream.nextByte();
247
+ gif.pixelAspectRatio = byteStream.nextByte();
248
+ if (gif.pixelAspectRatio !== 0) {
249
+ gif.pixelAspectRatio = (gif.pixelAspectRatio + 15) / 64;
250
+ }
251
+ if (globalColorTableFlag) {
252
+ gif.globalColorTable = parseColorTable(byteStream, globalColorCount);
253
+ }
254
+ const backgroundImage = (() => {
255
+ try {
256
+ return new ImageData(gif.width, gif.height, { colorSpace: "srgb" });
257
+ } catch (error) {
258
+ if (error instanceof DOMException && error.name === "IndexSizeError") {
259
+ return null;
260
+ }
261
+ throw error;
262
+ }
263
+ })();
264
+ if (backgroundImage == null) {
265
+ throw new Error("GIF frame size is to large");
266
+ }
267
+ const { r, g, b } = gif.globalColorTable[backgroundColorIndex];
268
+ backgroundImage.data.set(globalColorTableFlag ? [r, g, b, 255] : [0, 0, 0, 0]);
269
+ for (let i = 4; i < backgroundImage.data.length; i *= 2) {
270
+ backgroundImage.data.copyWithin(i, 0, i);
271
+ }
272
+ gif.backgroundImage = backgroundImage;
273
+ let frameIndex = -1, incrementFrameIndex = true, transparencyIndex = -1;
274
+ const getframeIndex = (increment) => {
275
+ if (increment) {
276
+ incrementFrameIndex = true;
277
+ }
278
+ return frameIndex;
279
+ };
280
+ const getTransparencyIndex = (newValue) => {
281
+ if (newValue != null) {
282
+ transparencyIndex = newValue;
283
+ }
284
+ return transparencyIndex;
285
+ };
286
+ try {
287
+ do {
288
+ if (incrementFrameIndex) {
289
+ gif.frames.push({
290
+ left: 0,
291
+ top: 0,
292
+ width: 0,
293
+ height: 0,
294
+ disposalMethod: DisposalMethod.Replace,
295
+ image: new ImageData(1, 1, { colorSpace: "srgb" }),
296
+ plainTextData: null,
297
+ userInputDelayFlag: false,
298
+ delayTime: 0,
299
+ sortFlag: false,
300
+ localColorTable: [],
301
+ reserved: 0,
302
+ GCreserved: 0
303
+ });
304
+ frameIndex++;
305
+ transparencyIndex = -1;
306
+ incrementFrameIndex = false;
307
+ }
308
+ } while (!await parseBlock(byteStream, gif, avgAlpha, getframeIndex, getTransparencyIndex, progressCallback));
309
+ gif.frames.length--;
310
+ for (const frame of gif.frames) {
311
+ if (frame.userInputDelayFlag && frame.delayTime === 0) {
312
+ gif.totalTime = Infinity;
313
+ break;
314
+ }
315
+ gif.totalTime += frame.delayTime;
316
+ }
317
+ return gif;
318
+ } catch (error) {
319
+ if (error instanceof EvalError) {
320
+ throw new Error(`error while parsing frame ${frameIndex} "${error.message}"`);
321
+ }
322
+ throw error;
323
+ }
324
+ }
325
+ function drawGif(data) {
326
+ const { context, radius, particle, delta } = data, image = particle.image;
327
+ if (!(image == null ? void 0 : image.gifData) || !image.gif) {
328
+ return;
329
+ }
330
+ const offscreenCanvas = new OffscreenCanvas(image.gifData.width, image.gifData.height), offscreenContext = offscreenCanvas.getContext("2d");
331
+ if (!offscreenContext) {
332
+ throw new Error("could not create offscreen canvas context");
333
+ }
334
+ offscreenContext.imageSmoothingQuality = "low";
335
+ offscreenContext.imageSmoothingEnabled = false;
336
+ offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
337
+ if (particle.gifLoopCount === void 0) {
338
+ particle.gifLoopCount = image.gifLoopCount ?? defaultLoopCount;
339
+ }
340
+ let frameIndex = particle.gifFrame ?? defaultFrame;
341
+ const pos = { x: -image.gifData.width * half, y: -image.gifData.height * half }, frame = image.gifData.frames[frameIndex];
342
+ if (particle.gifTime === void 0) {
343
+ particle.gifTime = initialTime;
344
+ }
345
+ if (!frame.bitmap) {
346
+ return;
347
+ }
348
+ context.scale(radius / image.gifData.width, radius / image.gifData.height);
349
+ switch (frame.disposalMethod) {
350
+ case DisposalMethod.UndefinedA:
351
+ case DisposalMethod.UndefinedB:
352
+ case DisposalMethod.UndefinedC:
353
+ case DisposalMethod.UndefinedD:
354
+ case DisposalMethod.Replace:
355
+ offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);
356
+ context.drawImage(offscreenCanvas, pos.x, pos.y);
357
+ offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
358
+ break;
359
+ case DisposalMethod.Combine:
360
+ offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);
361
+ context.drawImage(offscreenCanvas, pos.x, pos.y);
362
+ break;
363
+ case DisposalMethod.RestoreBackground:
364
+ offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);
365
+ context.drawImage(offscreenCanvas, pos.x, pos.y);
366
+ offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
367
+ if (!image.gifData.globalColorTable.length) {
368
+ offscreenContext.putImageData(image.gifData.frames[firstIndex].image, pos.x + frame.left, pos.y + frame.top);
369
+ } else {
370
+ offscreenContext.putImageData(image.gifData.backgroundImage, pos.x, pos.y);
371
+ }
372
+ break;
373
+ case DisposalMethod.RestorePrevious:
374
+ {
375
+ const previousImageData = offscreenContext.getImageData(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
376
+ offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);
377
+ context.drawImage(offscreenCanvas, pos.x, pos.y);
378
+ offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
379
+ offscreenContext.putImageData(previousImageData, origin.x, origin.y);
380
+ }
381
+ break;
382
+ }
383
+ particle.gifTime += delta.value;
384
+ if (particle.gifTime > frame.delayTime) {
385
+ particle.gifTime -= frame.delayTime;
386
+ if (++frameIndex >= image.gifData.frames.length) {
387
+ if (--particle.gifLoopCount <= defaultLoopCount) {
388
+ return;
389
+ }
390
+ frameIndex = firstIndex;
391
+ offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);
392
+ }
393
+ particle.gifFrame = frameIndex;
394
+ }
395
+ context.scale(image.gifData.width / radius, image.gifData.height / radius);
396
+ }
397
+ async function loadGifImage(image) {
398
+ if (image.type !== "gif") {
399
+ await loadImage(image);
400
+ return;
401
+ }
402
+ image.loading = true;
403
+ try {
404
+ image.gifData = await decodeGIF(image.source);
405
+ image.gifLoopCount = getGIFLoopAmount(image.gifData) ?? defaultLoopCount;
406
+ if (!image.gifLoopCount) {
407
+ image.gifLoopCount = Infinity;
408
+ }
409
+ } catch {
410
+ image.error = true;
411
+ }
412
+ image.loading = false;
413
+ }
414
+ export {
415
+ decodeGIF,
416
+ drawGif,
417
+ getGIFLoopAmount,
418
+ loadGifImage
419
+ };
@@ -0,0 +1,130 @@
1
+ import { replaceImageColor } from "./Utils.js";
2
+ import { drawGif } from "./GifUtils/Utils.js";
3
+ import { errorPrefix } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js";
4
+ const double = 2, defaultAlpha = 1, sides = 12, defaultRatio = 1;
5
+ class ImageDrawer {
6
+ constructor(engine) {
7
+ this.validTypes = ["image", "images"];
8
+ this.loadImageShape = async (imageShape) => {
9
+ if (!this._engine.loadImage) {
10
+ throw new Error(`${errorPrefix} image shape not initialized`);
11
+ }
12
+ await this._engine.loadImage({
13
+ gif: imageShape.gif,
14
+ name: imageShape.name,
15
+ replaceColor: imageShape.replaceColor ?? false,
16
+ src: imageShape.src
17
+ });
18
+ };
19
+ this._engine = engine;
20
+ }
21
+ addImage(image) {
22
+ if (!this._engine.images) {
23
+ this._engine.images = [];
24
+ }
25
+ this._engine.images.push(image);
26
+ }
27
+ draw(data) {
28
+ const { context, radius, particle, opacity } = data, image = particle.image, element = image == null ? void 0 : image.element;
29
+ if (!image) {
30
+ return;
31
+ }
32
+ context.globalAlpha = opacity;
33
+ if (image.gif && image.gifData) {
34
+ drawGif(data);
35
+ } else if (element) {
36
+ const ratio = image.ratio, pos = {
37
+ x: -radius,
38
+ y: -radius
39
+ }, diameter = radius * double;
40
+ context.drawImage(element, pos.x, pos.y, diameter, diameter / ratio);
41
+ }
42
+ context.globalAlpha = defaultAlpha;
43
+ }
44
+ getSidesCount() {
45
+ return sides;
46
+ }
47
+ async init(container) {
48
+ const options = container.actualOptions;
49
+ if (!options.preload || !this._engine.loadImage) {
50
+ return;
51
+ }
52
+ for (const imageData of options.preload) {
53
+ await this._engine.loadImage(imageData);
54
+ }
55
+ }
56
+ loadShape(particle) {
57
+ if (particle.shape !== "image" && particle.shape !== "images") {
58
+ return;
59
+ }
60
+ if (!this._engine.images) {
61
+ this._engine.images = [];
62
+ }
63
+ const imageData = particle.shapeData;
64
+ if (!imageData) {
65
+ return;
66
+ }
67
+ const image = this._engine.images.find((t) => t.name === imageData.name || t.source === imageData.src);
68
+ if (!image) {
69
+ void this.loadImageShape(imageData).then(() => {
70
+ this.loadShape(particle);
71
+ });
72
+ }
73
+ }
74
+ particleInit(container, particle) {
75
+ if (particle.shape !== "image" && particle.shape !== "images") {
76
+ return;
77
+ }
78
+ if (!this._engine.images) {
79
+ this._engine.images = [];
80
+ }
81
+ const images = this._engine.images, imageData = particle.shapeData;
82
+ if (!imageData) {
83
+ return;
84
+ }
85
+ const color = particle.getFillColor(), image = images.find((t) => t.name === imageData.name || t.source === imageData.src);
86
+ if (!image) {
87
+ return;
88
+ }
89
+ const replaceColor = imageData.replaceColor ?? image.replaceColor;
90
+ if (image.loading) {
91
+ setTimeout(() => {
92
+ this.particleInit(container, particle);
93
+ });
94
+ return;
95
+ }
96
+ void (async () => {
97
+ let imageRes;
98
+ if (image.svgData && color) {
99
+ imageRes = await replaceImageColor(image, imageData, color, particle);
100
+ } else {
101
+ imageRes = {
102
+ color,
103
+ data: image,
104
+ element: image.element,
105
+ gif: image.gif,
106
+ gifData: image.gifData,
107
+ gifLoopCount: image.gifLoopCount,
108
+ loaded: true,
109
+ ratio: imageData.width && imageData.height ? imageData.width / imageData.height : image.ratio ?? defaultRatio,
110
+ replaceColor,
111
+ source: imageData.src
112
+ };
113
+ }
114
+ if (!imageRes.ratio) {
115
+ imageRes.ratio = 1;
116
+ }
117
+ const fill = imageData.fill ?? particle.shapeFill, close = imageData.close ?? particle.shapeClose, imageShape = {
118
+ image: imageRes,
119
+ fill,
120
+ close
121
+ };
122
+ particle.image = imageShape.image;
123
+ particle.shapeFill = imageShape.fill;
124
+ particle.shapeClose = imageShape.close;
125
+ })();
126
+ }
127
+ }
128
+ export {
129
+ ImageDrawer
130
+ };
@@ -0,0 +1,36 @@
1
+ import { Preload } from "./Options/Classes/Preload.js";
2
+ class ImagePreloaderPlugin {
3
+ constructor(engine) {
4
+ this.id = "imagePreloader";
5
+ this._engine = engine;
6
+ }
7
+ async getPlugin() {
8
+ await Promise.resolve();
9
+ return {};
10
+ }
11
+ loadOptions(options, source) {
12
+ if (!(source == null ? void 0 : source.preload)) {
13
+ return;
14
+ }
15
+ if (!options.preload) {
16
+ options.preload = [];
17
+ }
18
+ const preloadOptions = options.preload;
19
+ for (const item of source.preload) {
20
+ const existing = preloadOptions.find((t) => t.name === item.name || t.src === item.src);
21
+ if (existing) {
22
+ existing.load(item);
23
+ } else {
24
+ const preload = new Preload();
25
+ preload.load(item);
26
+ preloadOptions.push(preload);
27
+ }
28
+ }
29
+ }
30
+ needsPlugin() {
31
+ return true;
32
+ }
33
+ }
34
+ export {
35
+ ImagePreloaderPlugin
36
+ };
@@ -0,0 +1,33 @@
1
+ import { isNull } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
2
+ class Preload {
3
+ constructor() {
4
+ this.src = "";
5
+ this.gif = false;
6
+ }
7
+ load(data) {
8
+ if (isNull(data)) {
9
+ return;
10
+ }
11
+ if (data.gif !== void 0) {
12
+ this.gif = data.gif;
13
+ }
14
+ if (data.height !== void 0) {
15
+ this.height = data.height;
16
+ }
17
+ if (data.name !== void 0) {
18
+ this.name = data.name;
19
+ }
20
+ if (data.replaceColor !== void 0) {
21
+ this.replaceColor = data.replaceColor;
22
+ }
23
+ if (data.src !== void 0) {
24
+ this.src = data.src;
25
+ }
26
+ if (data.width !== void 0) {
27
+ this.width = data.width;
28
+ }
29
+ }
30
+ }
31
+ export {
32
+ Preload
33
+ };