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hC,EAAU8G,EAAE,WAAW,GAAKpG,EAAQ,MAAM,UAAU,EACnF,UAAWqhC,KAAQS,EACf,KAAK,eAAe9hC,EAASV,EAAU+hC,EAAMS,CAAO,EAChDT,EAAK,QAAU3S,KAAepvB,EAAS,OAAO,YAAc6hC,IAAYA,IACxE,KAAK,cAAc7hC,EAAU+hC,CAAI,CAG5C,CACD,MAAM,MAAO,CACT,KAAK,OAAO,MAAQ,IAAI,IACxB,KAAK,OAAO,UAAY,IAAI,IAC5B,MAAM,QAAQ,SACjB,CACD,gBAAgB/hC,EAAU,CAEtB,GADAA,EAAS,MAAQ,GACb,CAACA,EAAS,QAAQ,MAClB,OAEJ,MAAMqe,EAAQ,KAAK,UAAU,OAAO,WAAY,CAAE,OAAAukB,CAAM,EAAK5iC,EAAU,CAAE,SAAA0pB,EAAU,MAAA9d,CAAK,EAAK5L,EAAS,QAAQ,MAC9G4iC,EAAO,cAAgBlZ,EAAWrL,EAClCukB,EAAO,WAAah3B,EAAQyS,CAC/B,CACD,kBAAkBre,EAAU,CACxBA,EAAS,MAAQ,EACpB,CACL","names":["generatedAttribute","mouseDownEvent","mouseUpEvent","mouseLeaveEvent","mouseOutEvent","mouseMoveEvent","touchStartEvent","touchEndEvent","touchMoveEvent","touchCancelEvent","resizeEvent","visibilityChangeEvent","errorPrefix","isBoolean","arg","isString","isNumber","isFunction","isObject","isArray","origin","squareExp","inverseFactorNumerator","Vector3d","xOrCoords","y","z","angle","length","coords3d","source","x","v","n","c","v3d","Vector","_random","easings","double","doublePI","addEasing","name","easing","getEasing","value","setRandom","rnd","getRandom","clamp","num","min","max","mix","comp1","comp2","weight1","weight2","randomInRange","r","getRangeMax","minOffset","getRangeMin","getRangeValue","setRangeValue","getDistances","pointA","pointB","dx","dy","getDistance","degToRad","degrees","getParticleDirectionAngle","direction","position","center","empty","half","quarter","threeQuarter","getParticleBaseVelocity","baseVelocity","collisionVelocity","v1","v2","m1","m2","calcPositionFromSize","data","_a","calcPositionOrRandomFromSize","_b","calcPositionOrRandomFromSizeRanged","calcExactPositionOrRandomFromSize","calcExactPositionOrRandomFromSizeRanged","parseAlpha","input","_logger","setLogger","logger","getLogger","rectSideBounce","res","pSide","pOtherSide","rectSide","rectOtherSide","velocity","factor","minVelocity","checkSelector","element","selectors","executeOnSingleOrMultiple","selector","t","isSsr","hasMatchMedia","safeMatchMedia","query","safeIntersectionObserver","callback","safeMutationObserver","isInArray","array","loadFont","font","weight","arrayRandomIndex","itemFromArray","index","useIndex","isPointInside","point","size","offset","radius","areBoundsInside","calculateBounds","bounds","inside","deepExtend","destination","sources","sourceIsArray","key","sourceDict","destDict","isDivModeEnabled","mode","divs","findItemFromSingleOrMultiple","divModeExecute","div","divMode","singleDivModeExecute","circleBounceDataFromParticle","p","circleBounce","p1","p2","xVelocityDiff","yVelocityDiff","pos1","pos2","xDist","yDist","u1","u2","vFinal1","vFinal2","rectBounce","particle","divBounds","pPos","bounceOptions","resH","resV","obj","item","itemFromSingleOrMultiple","initParticleNumericAnimationValue","options","pxRatio","valueRange","animationOptions","decayOffset","autoStatus","getPositionOrSize","positionOrSize","canvasSize","_","rest","getPosition","getSize","checkDestroy","destroyType","minValue","maxValue","updateAnimation","changeDirection","delta","decay","EventDispatcher","type","listener","arr","args","listeners","handler","idx","deleteCount","getItemsFromInitializer","container","map","initializers","force","getDataFromUrl","url","response","Engine","config","effect","drawer","refresh","interactorInitializer","moverInitializer","updaterInitializer","generator","plugin","preset","override","shape","dom","params","id","domContainer","currentOptions","oldIndex","minIndex","old","canvasEl","existingCanvases","Container","__vitePreload","Container$1","newItem","sourceOptions","updaters","updater","domItem","randomColorValue","midColorValue","colorManagers","addColorManager","manager","stringToRgba","shorthandRegex","hexFixed","g","b","a","regex","result","radix","rangeColorToRgb","color","colorToRgb","getRandomRgbColor","stringToRgb","colorToHsl","rgb","rgbToHsl","rangeColorToHsl","r1","g1","b1","stringToAlpha","hslToRgb","hsl","h","s","l","hNormalized","sNormalized","lNormalized","rgbFactor","triple","grayscaleValue","channel","temp1","temp2","temp3","temp3Offset","sNormalizedOffset","phaseNumerator","phaseThird","red","green","blue","hslaToRgba","hsla","rgbResult","fixedMin","rgbMax","getStyleFromRgb","opacity","getStyleFromHsl","colorMix","color1","color2","size1","size2","rgb1","rgb2","getLinkColor","linkColor","sourceColor","destColor","hslColor","getLinkRandomColor","optColor","blink","consent","getHslFromAnimation","animation","getHslAnimationFromHsl","reduceFactor","resColor","setColorAnimation","colorValue","colorAnimation","defaultVelocity","defaultLoops","defaultTime","updateColorValue","range","decrease","updateColor","ranges","HslColorManager","minLength","defaultAlpha","RgbColorManager","rgbColor","init","rgbColorManager","hslColorManager","engine","ExternalInteractorBase","ParticlesInteractorBase","Point","BaseRange","Circle","distPos","circleRange","rSum","dist","Rectangle","rectRange","width","height","w","pos","w2","h2","AnimationOptions","RangedAnimationOptions","ColorAnimation","HslAnimation","OptionsColor","AnimatableColor","Background","BackgroundMaskCover","BackgroundMask","cover","FullScreen","ClickEvent","DivEvent","Parallax","HoverEvent","ResizeEvent","Events","onDiv","tmp","Modes","interactors","interactor","Interactivity","detectsOn","defaultPosition","ManualParticle","Responsive","ThemeDefault","Theme","CollisionsAbsorb","CollisionsOverlap","ValueWithRandom","AnimationValueWithRandom","RangedAnimationValueWithRandom","ParticlesBounceFactor","ParticlesBounce","Collisions","Effect","MoveAngle","MoveAttract","rotateX","rotateY","MoveCenter","MoveGravity","MovePath","MoveTrailFill","MoveTrail","OutModes","Spin","Move","outModes","OpacityAnimation","Opacity","ParticlesDensity","ParticlesNumberLimit","ParticlesNumber","Shadow","Shape","SizeAnimation","Size","Stroke","ZIndex","ParticlesOptions","group","strokeToLoad","loadOptions","sourceOptionsArr","loadParticlesOptions","Options","theme","detectRetina","fpsLimit","fullScreen","responsive","optResponsive","existingTheme","optTheme","defaultOptions","responsiveOptions","chosenTheme","mediaMatch","clientDarkMode","defaultTheme","drawLine","context","begin","end","paintBase","dimension","baseColor","paintImage","image","clear","drawParticle","colorStyles","backgroundMask","composite","shadow","transform","defaultAngle","rotateData","defaultTransformFactor","transformData","shadowColor","minStrokeWidth","strokeWidth","drawData","drawShape","drawShapeAfterDraw","drawEffect","drawPlugin","drawParticlePlugin","alterHsl","tsParticles","setTransformValue","newFactor","newValue","defaultValue","setStyle","canvas","style","important","elementStyle","Canvas","ctx","zOpacity","fill","stroke","updaterTransform","fColor","sColor","coverRgb","coverColor","resolve","reject","img","evt","trail","trailFill","factorNumerator","fillColor","observer","originalStyle","cb","pfColor","psColor","zIndexOptions","zIndexFactorOffset","zIndexFactor","zOpacityFactor","defaultOpacity","strokeOpacity","zStrokeOpacity","obs","records","record","background","newSize","oldSize","needsRefresh","manageListener","event","add","addOptions","removeOptions","EventListeners","e","mouseInteractivity","mousePos","onClick","mediaEvent","defaultThemes","themeName","handleResize","mouseLeaveTmpEvent","handlers","interactivityEl","html","detectType","entries","interactivity","mouse","handled","mousePosition","mouseEvent","clientRect","target","sourceRect","targetRect","canvasRect","touchEvent","lengthOffset","lastTouch","defaultCoordinate","touches","touch","InteractionManager","defaultRetryCount","loadEffectData","effectOptions","reduceDuplicates","effectData","loadShapeData","shapeOptions","shapeData","fixOutMode","diameter","Particle","zIndex","tryCount","pluginPos","exactPosition","fixHorizontal","outMode","fixVertical","moveOptions","rad","radOffset","collisionsOptions","overlapOptions","retries","rollFactor","none","backFactor","backSum","zIndexValue","minZ","defaultRadius","pathGenerator","shapeDrawer","_c","overrideOptions","mainOptions","particlesOptions","effectType","shapeType","overrideEffectType","overrideShapeType","pathOptions","particles","effectDrawer","sideCountFunc","mover","_d","_e","_f","subdivideCount","QuadTree","rectangle","capacity","i","fixedIndex","sub","check","qTreeCapacity","defaultRemoveQuantity","qTreeRectangle","posOffset","sizeFactor","Particles","manualCount","numberOptions","densityFactor","optParticlesNumber","minLimit","optParticlesLimit","particlesNumber","particlesCount","densityOptions","defaultFactor","initializer","canAdd","zIdx","limitOptions","limit","currentCount","countToRemove","condition","groups","groupOptions","j","nb","quantity","deleted","particlesToDelete","resizeFactor","checkDelete","zArray","defaultRatio","defaultReduceFactor","Retina","ratio","moveDistance","props","maxDistance","guardCheck","defaultFps","initDelta","smooth","loadContainerOptions","entry","timestamp","el","clickOrTouchHandler","posRetina","clickHandler","touchStartHandler","touched","touchMoved","touchMoveHandler","touchEndHandler","minCoordinate","touchCancelHandler","mainArr","refreshTime","frame","effects","shapes","availablePlugins","defaultFpsLimit","minFpsLimit","needsUpdate","start","newMaxWidth","loadSlim","loadParallaxMover","index$u","loadExternalAttractInteraction","index$t","loadExternalBounceInteraction","index$s","loadExternalBubbleInteraction","index$r","loadExternalConnectInteraction","index$q","loadExternalGrabInteraction","index$p","loadExternalPauseInteraction","index$o","loadExternalPushInteraction","index$n","loadExternalRemoveInteraction","loadExternalRepulseInteraction","index$l","loadExternalSlowInteraction","loadParticlesAttractInteraction","index$j","loadParticlesCollisionsInteraction","loadParticlesLinksInteraction","index$h","loadEasingQuadPlugin","index$g","loadEmojiShape","index$f","loadImageShape","index$e","loadLineShape","index$d","loadPolygonShape","index$c","loadSquareShape","index$b","loadStarShape","index$a","loadLifeUpdater","index$9","loadRotateUpdater","index$8","loadStrokeColorUpdater","loadBasic","index$6","ParallaxMover","Attract","Attractor","Bounce","Bouncer","BubbleBase","BubbleDiv","Bubble","Bubbler","ConnectLinks","Connect","Connector","GrabLinks","Grab","Grabber","Pauser","Push","Pusher","Remove","Remover","RepulseBase","RepulseDiv","Repulse","Repulser","Slow","Slower","Collider","LinksShadow","LinksTriangle","Links","loadLinksInteraction","interaction","loadLinksPlugin","validTypes","EmojiDrawer","EmojiDrawer$1","stringStart","currentColorRegex","replaceColorSvg","imageShape","svgData","colorStyle","preFillIndex","loadImage","downloadSvgImage","replaceImageColor","imageData","svgColoredData","imageRes","svg","domUrl","errorHandler","img2","extLength","addLoadImageToEngine","imageFunc","loadGifImage","ImagePreloaderPlugin","ImagePreloader","ImageDrawer","ImageDrawer$1","preloader","LineDrawer","LineDrawer$1","loadGenericPolygonShape","PolygonDrawer","PolygonDrawer$1","loadTriangleShape","TriangleDrawer","TriangleDrawer$1","SquareDrawer","SquareDrawer$1","StarDrawer","StarDrawer$1","LifeUpdater","RotateUpdater","StrokeColorUpdater","loadBaseMover","index$5","loadCircleShape","index$4","loadColorUpdater","index$3","loadOpacityUpdater","index$2","loadOutModesUpdater","index$1","loadSizeUpdater","parallaxOptions","parallaxForce","canvasCenter","parallaxSmooth","centerDistance","minFactor","identity","minRadius","processAttract","attractRadius","area","queryCb","attractOptions","distance","attractFactor","normVec","clickAttract","enabledCb","attract","hoverAttract","attractMode","mouseMoveStatus","events","hoverEnabled","hoverMode","clickEnabled","clickMode","halfPI","toleranceFactor","processBounce","singleSelectorBounce","bounceCb","elem","tolerance","divBounce","bounceMode","mouseBounce","bounce","calculateBubbleValue","particleValue","modeValue","optionsValue","bubbleMode","minDistance","defaultClickTime","ratioOffset","defaultBubbleValue","minRatio","mouseClickPos","bubbleOptions","bubble","distMouse","timeSpent","sizeData","opacityData","pointDistance","divBubble","modeColor","bubbleColor","pColor","modeOpacity","optOpacity","pOpacity","modeSize","optSize","pSize","bubbleParam","bubbleDuration","bubbleDistance","particlesParam","pObjBubble","pObj","repulseRadius","onHover","gradientMin","gradientMax","defaultLinksWidth","gradient","gradStop","sourcePos","destPos","midRgb","grad","drawConnectLine","lineStyle","connectOptions","drawConnection","ls","connectMode","connect","connectModeDistance","connectModeRadius","indexOffset","distMax","xDiff","yDiff","defaultWidth","drawGrabLine","colorLine","drawGrab","lineColor","beginPos","grabMode","minOpacity","grab","grabLineOptions","lineOpacity","opacityLine","linksOptions","pauseMode","pushMode","minQuantity","pushOptions","removeMode","removeNb","repulseMode","repulseRadiusFactor","repulseRadiusPower","squarePower","minSpeed","easingOffset","repulseOptions","repulse","repulseDistance","d","vect","divRepulse","speed","maxSpeed","easingFunc","repulseFactor","repulseOpts","hover","click","slowMode","slow","slowOptions","particlePos","proximityFactor","slowFactor","rotate","ax","ay","p1Factor","p2Factor","absorbFactor","minAbsorbFactor","updateAbsorb","r2","pixelRatio","absorb","fixBounceSpeed","destroy","resolveCollision","radius1","radius2","distP","Linker","LinksPlugin","LinksPlugin$1","drawEmoji","emojiData","previousAlpha","defaultFont","promises","emoji","existingData","maxSize","InterlaceOffsets","InterlaceSteps","ByteStream","bytes","count","slice","acc","curr","blockString","minCount","emptySize","len","increment","blockData","noData","defaultFrame","initialTime","firstIndex","defaultLoopCount","parseColorTable","byteStream","colors","parseExtensionBlock","gif","getFrameIndex","getTransparencyIndex","packedByte","transparencyFlag","transparencyIndex","applicationExtension","parseImageBlock","avgAlpha","progressCallback","localColorTableFlag","interlacedFlag","localColorCount","getColor","error","minCodeSize","clearCode","readBits","bytePos","bitPos","code","dic","pass","pixelPos","lineIndex","exit","last","parseBlock","getGIFLoopAmount","extension","decodeGIF","gifURL","buffer","globalColorTableFlag","globalColorCount","backgroundColorIndex","backgroundImage","frameIndex","incrementFrameIndex","getframeIndex","drawGif","offscreenCanvas","offscreenContext","previousImageData","Preload","preloadOptions","existing","preload","sides","images","replaceColor","close","centerY","piDeg","sidesOffset","drawPolygon","side","sideCount","decimalSides","interiorAngleDegrees","interiorAngle","defaultSides","PolygonDrawerBase","polygon","sidesCenterFactor","yFactor","sidesFactor","fixFactorSquared","fixFactor","drawSquare","fixedRadius","fixedDiameter","defaultInset","drawStar","inset","star","LifeDelay","LifeDuration","Life","noTime","infiniteValue","noLife","minCanvasSize","updateLife","life","justSpawned","widthRange","heightRange","lifeOptions","RotateAnimation","Rotate","doublePIDeg","rotateOptions","rotateDirection","rotateAnimation","strokeHslColor","strokeColor","BaseMover","CircleDrawer","CircleDrawer$1","ColorUpdater","OpacityUpdater","OutOfCanvasUpdater","SizeUpdater","CircleWarp","rect","circle","newPos","biggerCircle","rectSW","opacityOffset","getLinkDistance","optDistance","warp","absDiffs","warpDistances","linkOpt1","linkOpt2","LinkInstance","moveSpeedFactor","minSpinRadius","spinFactor","applyDistance","initialPosition","dxFixed","dyFixed","hDistance","vDistance","hasHDistance","hasVDistance","vel","move","moveSpeed","moveDrift","applyPath","gravityOptions","gravityFactor","zVelocityFactor","spin","updateFunc","maxCanvasSize","halfMaxSize","path","getProximitySpeedFactor","initSpin","spinOptions","spinPos","spinCenter","spinAcceleration","diffFactor","defaultSizeFactor","defaultDeltaFactor","particleOptions","baseSpeed","deltaFactor","minAngle","drawCircle","maxAngle","hAnimation","sAnimation","lAnimation","opacityOptions","opacityAnimation","boundsMin","bounceHorizontal","bounced","newVelocity","minPos","bounceVertical","BounceOutMode","DestroyOutMode","_delta","vx","vy","NoneOutMode","pRadius","OutOutMode","circVec","newDx","newDy","sizeValue","nextBounds","checkOutMode","minLoops","sizeOptions","sizeAnimation","drawTriangle","p3","drawLinkLine","drawn","links","pi1","pi2","endNE","d1","yi","endSW","d2","xi","endSE","d3","drawLinkTriangle","pos3","colorTriangle","opacityTriangle","getLinkKey","ids","setLinkFrequency","dictionary","minWidth","maxFrequency","link","p1LinksOptions","twinkle","twinkleFreq","twinkleRgb","link1","link2","triangleOptions","linksDistance","p1Links","vertices","linkFreq","vertex","retina"],"sources":["../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/Utils.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Engine.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/HslColorManager.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/RgbColorManager.js","../../../ui/node_modules/@tsparticles/engine/browser/init.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js","../../../ui/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js","../../../ui/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js","../../../ui/node_modules/@tsparticles/engine/browser/index.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Canvas.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Particle.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Particles.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Retina.js","../../../ui/node_modules/@tsparticles/engine/browser/Core/Container.js","../../../ui/node_modules/@tsparticles/slim/browser/index.js","../../../ui/node_modules/@tsparticles/move-parallax/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-attract/browser/Options/Classes/Attract.js","../../../ui/node_modules/@tsparticles/interaction-external-attract/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-bounce/browser/Options/Classes/Bounce.js","../../../ui/node_modules/@tsparticles/interaction-external-bounce/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleBase.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleDiv.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/Bubble.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/ConnectLinks.js","../../../ui/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/Connect.js","../../../ui/node_modules/@tsparticles/interaction-external-connect/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/GrabLinks.js","../../../ui/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/Grab.js","../../../ui/node_modules/@tsparticles/interaction-external-grab/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-pause/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-push/browser/Options/Classes/Push.js","../../../ui/node_modules/@tsparticles/interaction-external-push/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-remove/browser/Options/Classes/Remove.js","../../../ui/node_modules/@tsparticles/interaction-external-remove/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseBase.js","../../../ui/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseDiv.js","../../../ui/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/Repulse.js","../../../ui/node_modules/@tsparticles/interaction-external-repulse/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-external-slow/browser/Options/Classes/Slow.js","../../../ui/node_modules/@tsparticles/interaction-external-slow/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-particles-attract/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksShadow.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksTriangle.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/Links.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/index.js","../../../ui/node_modules/@tsparticles/plugin-easing-quad/browser/index.js","../../../ui/node_modules/@tsparticles/shape-emoji/browser/Constants.js","../../../ui/node_modules/@tsparticles/shape-emoji/browser/index.js","../../../ui/node_modules/@tsparticles/shape-image/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-image/browser/index.js","../../../ui/node_modules/@tsparticles/shape-line/browser/index.js","../../../ui/node_modules/@tsparticles/shape-polygon/browser/index.js","../../../ui/node_modules/@tsparticles/shape-square/browser/index.js","../../../ui/node_modules/@tsparticles/shape-star/browser/index.js","../../../ui/node_modules/@tsparticles/updater-life/browser/index.js","../../../ui/node_modules/@tsparticles/updater-rotate/browser/index.js","../../../ui/node_modules/@tsparticles/updater-stroke-color/browser/index.js","../../../ui/node_modules/@tsparticles/basic/browser/index.js","../../../ui/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js","../../../ui/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js","../../../ui/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js","../../../ui/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js","../../../ui/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js","../../../ui/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js","../../../ui/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js","../../../ui/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js","../../../ui/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js","../../../ui/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js","../../../ui/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js","../../../ui/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js","../../../ui/node_modules/@tsparticles/shape-emoji/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js","../../../ui/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js","../../../ui/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js","../../../ui/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js","../../../ui/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js","../../../ui/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js","../../../ui/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js","../../../ui/node_modules/@tsparticles/shape-line/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-line/browser/LineDrawer.js","../../../ui/node_modules/@tsparticles/shape-polygon/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js","../../../ui/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js","../../../ui/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js","../../../ui/node_modules/@tsparticles/shape-square/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js","../../../ui/node_modules/@tsparticles/shape-star/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-star/browser/StarDrawer.js","../../../ui/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js","../../../ui/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js","../../../ui/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js","../../../ui/node_modules/@tsparticles/updater-life/browser/Utils.js","../../../ui/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js","../../../ui/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js","../../../ui/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js","../../../ui/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js","../../../ui/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js","../../../ui/node_modules/@tsparticles/move-base/browser/index.js","../../../ui/node_modules/@tsparticles/shape-circle/browser/index.js","../../../ui/node_modules/@tsparticles/updater-color/browser/index.js","../../../ui/node_modules/@tsparticles/updater-opacity/browser/index.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/index.js","../../../ui/node_modules/@tsparticles/updater-size/browser/index.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js","../../../ui/node_modules/@tsparticles/move-base/browser/Utils.js","../../../ui/node_modules/@tsparticles/move-base/browser/BaseMover.js","../../../ui/node_modules/@tsparticles/shape-circle/browser/Utils.js","../../../ui/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js","../../../ui/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js","../../../ui/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/Utils.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js","../../../ui/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js","../../../ui/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js","../../../ui/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js"],"sourcesContent":["export const generatedAttribute = \"generated\";\nexport const mouseDownEvent = \"pointerdown\";\nexport const mouseUpEvent = \"pointerup\";\nexport const mouseLeaveEvent = \"pointerleave\";\nexport const mouseOutEvent = \"pointerout\";\nexport const mouseMoveEvent = \"pointermove\";\nexport const touchStartEvent = \"touchstart\";\nexport const touchEndEvent = \"touchend\";\nexport const touchMoveEvent = \"touchmove\";\nexport const touchCancelEvent = \"touchcancel\";\nexport const resizeEvent = \"resize\";\nexport const visibilityChangeEvent = \"visibilitychange\";\nexport const errorPrefix = \"tsParticles - Error\";\nexport const percentDenominator = 100;\nexport const halfRandom = 0.5;\nexport const millisecondsToSeconds = 1000;\n","export function isBoolean(arg) {\n return typeof arg === \"boolean\";\n}\nexport function isString(arg) {\n return typeof arg === \"string\";\n}\nexport function isNumber(arg) {\n return typeof arg === \"number\";\n}\nexport function isFunction(arg) {\n return typeof arg === \"function\";\n}\nexport function isObject(arg) {\n return typeof arg === \"object\" && arg !== null;\n}\nexport function isArray(arg) {\n return Array.isArray(arg);\n}\n","import { errorPrefix } from \"./Constants.js\";\nimport { isNumber } from \"../../Utils/TypeUtils.js\";\nconst origin = {\n x: 0,\n y: 0,\n z: 0,\n}, squareExp = 2, inverseFactorNumerator = 1.0;\nexport class Vector3d {\n constructor(xOrCoords, y, z) {\n this._updateFromAngle = (angle, length) => {\n this.x = Math.cos(angle) * length;\n this.y = Math.sin(angle) * length;\n };\n if (!isNumber(xOrCoords) && xOrCoords) {\n this.x = xOrCoords.x;\n this.y = xOrCoords.y;\n const coords3d = xOrCoords;\n this.z = coords3d.z ? coords3d.z : origin.z;\n }\n else if (xOrCoords !== undefined && y !== undefined) {\n this.x = xOrCoords;\n this.y = y;\n this.z = z ?? origin.z;\n }\n else {\n throw new Error(`${errorPrefix} Vector3d not initialized correctly`);\n }\n }\n static get origin() {\n return Vector3d.create(origin.x, origin.y, origin.z);\n }\n get angle() {\n return Math.atan2(this.y, this.x);\n }\n set angle(angle) {\n this._updateFromAngle(angle, this.length);\n }\n get length() {\n return Math.sqrt(this.getLengthSq());\n }\n set length(length) {\n this._updateFromAngle(this.angle, length);\n }\n static clone(source) {\n return Vector3d.create(source.x, source.y, source.z);\n }\n static create(x, y, z) {\n return new Vector3d(x, y, z);\n }\n add(v) {\n return Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n addTo(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n }\n copy() {\n return Vector3d.clone(this);\n }\n distanceTo(v) {\n return this.sub(v).length;\n }\n distanceToSq(v) {\n return this.sub(v).getLengthSq();\n }\n div(n) {\n return Vector3d.create(this.x / n, this.y / n, this.z / n);\n }\n divTo(n) {\n this.x /= n;\n this.y /= n;\n this.z /= n;\n }\n getLengthSq() {\n return this.x ** squareExp + this.y ** squareExp;\n }\n mult(n) {\n return Vector3d.create(this.x * n, this.y * n, this.z * n);\n }\n multTo(n) {\n this.x *= n;\n this.y *= n;\n this.z *= n;\n }\n normalize() {\n const length = this.length, noLength = 0;\n if (length != noLength) {\n this.multTo(inverseFactorNumerator / length);\n }\n }\n rotate(angle) {\n return Vector3d.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle), origin.z);\n }\n setTo(c) {\n this.x = c.x;\n this.y = c.y;\n const v3d = c;\n this.z = v3d.z ? v3d.z : origin.z;\n }\n sub(v) {\n return Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n subFrom(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n }\n}\nexport class Vector extends Vector3d {\n constructor(xOrCoords, y) {\n super(xOrCoords, y, origin.z);\n }\n static get origin() {\n return Vector.create(origin.x, origin.y);\n }\n static clone(source) {\n return Vector.create(source.x, source.y);\n }\n static create(x, y) {\n return new Vector(x, y);\n }\n}\n","import { Vector } from \"../Core/Utils/Vectors.js\";\nimport { isNumber } from \"./TypeUtils.js\";\nimport { percentDenominator } from \"../Core/Utils/Constants.js\";\nlet _random = Math.random;\nconst easings = new Map(), double = 2, doublePI = Math.PI * double;\nexport function addEasing(name, easing) {\n if (easings.get(name)) {\n return;\n }\n easings.set(name, easing);\n}\nexport function getEasing(name) {\n return easings.get(name) ?? ((value) => value);\n}\nexport function setRandom(rnd = Math.random) {\n _random = rnd;\n}\nexport function getRandom() {\n const min = 0, max = 1;\n return clamp(_random(), min, max - Number.EPSILON);\n}\nexport function clamp(num, min, max) {\n return Math.min(Math.max(num, min), max);\n}\nexport function mix(comp1, comp2, weight1, weight2) {\n return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));\n}\nexport function randomInRange(r) {\n const max = getRangeMax(r), minOffset = 0;\n let min = getRangeMin(r);\n if (max === min) {\n min = minOffset;\n }\n return getRandom() * (max - min) + min;\n}\nexport function getRangeValue(value) {\n return isNumber(value) ? value : randomInRange(value);\n}\nexport function getRangeMin(value) {\n return isNumber(value) ? value : value.min;\n}\nexport function getRangeMax(value) {\n return isNumber(value) ? value : value.max;\n}\nexport function setRangeValue(source, value) {\n if (source === value || (value === undefined && isNumber(source))) {\n return source;\n }\n const min = getRangeMin(source), max = getRangeMax(source);\n return value !== undefined\n ? {\n min: Math.min(min, value),\n max: Math.max(max, value),\n }\n : setRangeValue(min, max);\n}\nexport function getDistances(pointA, pointB) {\n const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y, squareExp = 2;\n return { dx: dx, dy: dy, distance: Math.sqrt(dx ** squareExp + dy ** squareExp) };\n}\nexport function getDistance(pointA, pointB) {\n return getDistances(pointA, pointB).distance;\n}\nexport function degToRad(degrees) {\n const PIDeg = 180;\n return (degrees * Math.PI) / PIDeg;\n}\nexport function getParticleDirectionAngle(direction, position, center) {\n if (isNumber(direction)) {\n return degToRad(direction);\n }\n const empty = 0, half = 0.5, quarter = 0.25, threeQuarter = half + quarter;\n switch (direction) {\n case \"top\":\n return -Math.PI * half;\n case \"top-right\":\n return -Math.PI * quarter;\n case \"right\":\n return empty;\n case \"bottom-right\":\n return Math.PI * quarter;\n case \"bottom\":\n return Math.PI * half;\n case \"bottom-left\":\n return Math.PI * threeQuarter;\n case \"left\":\n return Math.PI;\n case \"top-left\":\n return -Math.PI * threeQuarter;\n case \"inside\":\n return Math.atan2(center.y - position.y, center.x - position.x);\n case \"outside\":\n return Math.atan2(position.y - center.y, position.x - center.x);\n default:\n return getRandom() * doublePI;\n }\n}\nexport function getParticleBaseVelocity(direction) {\n const baseVelocity = Vector.origin;\n baseVelocity.length = 1;\n baseVelocity.angle = direction;\n return baseVelocity;\n}\nexport function collisionVelocity(v1, v2, m1, m2) {\n const double = 2;\n return Vector.create((v1.x * (m1 - m2)) / (m1 + m2) + (v2.x * double * m2) / (m1 + m2), v1.y);\n}\nexport function calcPositionFromSize(data) {\n return data.position?.x !== undefined && data.position.y !== undefined\n ? {\n x: (data.position.x * data.size.width) / percentDenominator,\n y: (data.position.y * data.size.height) / percentDenominator,\n }\n : undefined;\n}\nexport function calcPositionOrRandomFromSize(data) {\n return {\n x: ((data.position?.x ?? getRandom() * percentDenominator) * data.size.width) / percentDenominator,\n y: ((data.position?.y ?? getRandom() * percentDenominator) * data.size.height) / percentDenominator,\n };\n}\nexport function calcPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function calcExactPositionOrRandomFromSize(data) {\n return {\n x: data.position?.x ?? getRandom() * data.size.width,\n y: data.position?.y ?? getRandom() * data.size.height,\n };\n}\nexport function calcExactPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcExactPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function parseAlpha(input) {\n const defaultAlpha = 1;\n if (!input) {\n return defaultAlpha;\n }\n return input.endsWith(\"%\") ? parseFloat(input) / percentDenominator : parseFloat(input);\n}\n","import { clamp, collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, randomInRange, } from \"./NumberUtils.js\";\nimport { halfRandom, millisecondsToSeconds, percentDenominator } from \"../Core/Utils/Constants.js\";\nimport { isArray, isObject } from \"./TypeUtils.js\";\nimport { Vector } from \"../Core/Utils/Vectors.js\";\nconst _logger = {\n debug: console.debug,\n error: console.error,\n info: console.info,\n log: console.log,\n verbose: console.log,\n warning: console.warn,\n};\nexport function setLogger(logger) {\n _logger.debug = logger.debug || _logger.debug;\n _logger.error = logger.error || _logger.error;\n _logger.info = logger.info || _logger.info;\n _logger.log = logger.log || _logger.log;\n _logger.verbose = logger.verbose || _logger.verbose;\n _logger.warning = logger.warning || _logger.warning;\n}\nexport function getLogger() {\n return _logger;\n}\nfunction rectSideBounce(data) {\n const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data, half = 0.5, minVelocity = 0;\n if (pOtherSide.min < rectOtherSide.min ||\n pOtherSide.min > rectOtherSide.max ||\n pOtherSide.max < rectOtherSide.min ||\n pOtherSide.max > rectOtherSide.max) {\n return res;\n }\n if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) * half && velocity > minVelocity) ||\n (pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) * half && velocity < minVelocity)) {\n res.velocity = velocity * -factor;\n res.bounced = true;\n }\n return res;\n}\nfunction checkSelector(element, selectors) {\n const res = executeOnSingleOrMultiple(selectors, (selector) => {\n return element.matches(selector);\n });\n return isArray(res) ? res.some((t) => t) : res;\n}\nexport function isSsr() {\n return typeof window === \"undefined\" || !window || typeof window.document === \"undefined\" || !window.document;\n}\nexport function hasMatchMedia() {\n return !isSsr() && typeof matchMedia !== \"undefined\";\n}\nexport function safeMatchMedia(query) {\n if (!hasMatchMedia()) {\n return;\n }\n return matchMedia(query);\n}\nexport function safeIntersectionObserver(callback) {\n if (isSsr() || typeof IntersectionObserver === \"undefined\") {\n return;\n }\n return new IntersectionObserver(callback);\n}\nexport function safeMutationObserver(callback) {\n if (isSsr() || typeof MutationObserver === \"undefined\") {\n return;\n }\n return new MutationObserver(callback);\n}\nexport function isInArray(value, array) {\n const invalidIndex = -1;\n return value === array || (isArray(array) && array.indexOf(value) > invalidIndex);\n}\nexport async function loadFont(font, weight) {\n try {\n await document.fonts.load(`${weight ?? \"400\"} 36px '${font ?? \"Verdana\"}'`);\n }\n catch {\n }\n}\nexport function arrayRandomIndex(array) {\n return Math.floor(getRandom() * array.length);\n}\nexport function itemFromArray(array, index, useIndex = true) {\n return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];\n}\nexport function isPointInside(point, size, offset, radius, direction) {\n const minRadius = 0;\n return areBoundsInside(calculateBounds(point, radius ?? minRadius), size, offset, direction);\n}\nexport function areBoundsInside(bounds, size, offset, direction) {\n let inside = true;\n if (!direction || direction === \"bottom\") {\n inside = bounds.top < size.height + offset.x;\n }\n if (inside && (!direction || direction === \"left\")) {\n inside = bounds.right > offset.x;\n }\n if (inside && (!direction || direction === \"right\")) {\n inside = bounds.left < size.width + offset.y;\n }\n if (inside && (!direction || direction === \"top\")) {\n inside = bounds.bottom > offset.y;\n }\n return inside;\n}\nexport function calculateBounds(point, radius) {\n return {\n bottom: point.y + radius,\n left: point.x - radius,\n right: point.x + radius,\n top: point.y - radius,\n };\n}\nexport function deepExtend(destination, ...sources) {\n for (const source of sources) {\n if (source === undefined || source === null) {\n continue;\n }\n if (!isObject(source)) {\n destination = source;\n continue;\n }\n const sourceIsArray = Array.isArray(source);\n if (sourceIsArray && (isObject(destination) || !destination || !Array.isArray(destination))) {\n destination = [];\n }\n else if (!sourceIsArray && (isObject(destination) || !destination || Array.isArray(destination))) {\n destination = {};\n }\n for (const key in source) {\n if (key === \"__proto__\") {\n continue;\n }\n const sourceDict = source, value = sourceDict[key], destDict = destination;\n destDict[key] =\n isObject(value) && Array.isArray(value)\n ? value.map((v) => deepExtend(destDict[key], v))\n : deepExtend(destDict[key], value);\n }\n }\n return destination;\n}\nexport function isDivModeEnabled(mode, divs) {\n return !!findItemFromSingleOrMultiple(divs, (t) => t.enable && isInArray(mode, t.mode));\n}\nexport function divModeExecute(mode, divs, callback) {\n executeOnSingleOrMultiple(divs, (div) => {\n const divMode = div.mode, divEnabled = div.enable;\n if (divEnabled && isInArray(mode, divMode)) {\n singleDivModeExecute(div, callback);\n }\n });\n}\nexport function singleDivModeExecute(div, callback) {\n const selectors = div.selectors;\n executeOnSingleOrMultiple(selectors, (selector) => {\n callback(selector, div);\n });\n}\nexport function divMode(divs, element) {\n if (!element || !divs) {\n return;\n }\n return findItemFromSingleOrMultiple(divs, (div) => {\n return checkSelector(element, div.selectors);\n });\n}\nexport function circleBounceDataFromParticle(p) {\n return {\n position: p.getPosition(),\n radius: p.getRadius(),\n mass: p.getMass(),\n velocity: p.velocity,\n factor: Vector.create(getRangeValue(p.options.bounce.horizontal.value), getRangeValue(p.options.bounce.vertical.value)),\n };\n}\nexport function circleBounce(p1, p2) {\n const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = getDistances(pos2, pos1), minimumDistance = 0;\n if (xVelocityDiff * xDist + yVelocityDiff * yDist < minimumDistance) {\n return;\n }\n const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = collisionVelocity(u1, u2, m1, m2), v2 = collisionVelocity(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);\n p1.velocity.x = vFinal1.x * p1.factor.x;\n p1.velocity.y = vFinal1.y * p1.factor.y;\n p2.velocity.x = vFinal2.x * p2.factor.x;\n p2.velocity.y = vFinal2.y * p2.factor.y;\n}\nexport function rectBounce(particle, divBounds) {\n const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), bounceOptions = particle.options.bounce, resH = rectSideBounce({\n pSide: {\n min: bounds.left,\n max: bounds.right,\n },\n pOtherSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n rectSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n rectOtherSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n velocity: particle.velocity.x,\n factor: getRangeValue(bounceOptions.horizontal.value),\n });\n if (resH.bounced) {\n if (resH.velocity !== undefined) {\n particle.velocity.x = resH.velocity;\n }\n if (resH.position !== undefined) {\n particle.position.x = resH.position;\n }\n }\n const resV = rectSideBounce({\n pSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n pOtherSide: {\n min: bounds.left,\n max: bounds.right,\n },\n rectSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n rectOtherSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n velocity: particle.velocity.y,\n factor: getRangeValue(bounceOptions.vertical.value),\n });\n if (resV.bounced) {\n if (resV.velocity !== undefined) {\n particle.velocity.y = resV.velocity;\n }\n if (resV.position !== undefined) {\n particle.position.y = resV.position;\n }\n }\n}\nexport function executeOnSingleOrMultiple(obj, callback) {\n const defaultIndex = 0;\n return isArray(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, defaultIndex);\n}\nexport function itemFromSingleOrMultiple(obj, index, useIndex) {\n return isArray(obj) ? itemFromArray(obj, index, useIndex) : obj;\n}\nexport function findItemFromSingleOrMultiple(obj, callback) {\n if (isArray(obj)) {\n return obj.find((t, index) => callback(t, index));\n }\n const defaultIndex = 0;\n return callback(obj, defaultIndex) ? obj : undefined;\n}\nexport function initParticleNumericAnimationValue(options, pxRatio) {\n const valueRange = options.value, animationOptions = options.animation, res = {\n delayTime: getRangeValue(animationOptions.delay) * millisecondsToSeconds,\n enable: animationOptions.enable,\n value: getRangeValue(options.value) * pxRatio,\n max: getRangeMax(valueRange) * pxRatio,\n min: getRangeMin(valueRange) * pxRatio,\n loops: 0,\n maxLoops: getRangeValue(animationOptions.count),\n time: 0,\n }, decayOffset = 1;\n if (animationOptions.enable) {\n res.decay = decayOffset - getRangeValue(animationOptions.decay);\n switch (animationOptions.mode) {\n case \"increase\":\n res.status = \"increasing\";\n break;\n case \"decrease\":\n res.status = \"decreasing\";\n break;\n case \"random\":\n res.status = getRandom() >= halfRandom ? \"increasing\" : \"decreasing\";\n break;\n }\n const autoStatus = animationOptions.mode === \"auto\";\n switch (animationOptions.startValue) {\n case \"min\":\n res.value = res.min;\n if (autoStatus) {\n res.status = \"increasing\";\n }\n break;\n case \"max\":\n res.value = res.max;\n if (autoStatus) {\n res.status = \"decreasing\";\n }\n break;\n case \"random\":\n default:\n res.value = randomInRange(res);\n if (autoStatus) {\n res.status = getRandom() >= halfRandom ? \"increasing\" : \"decreasing\";\n }\n break;\n }\n }\n res.initialValue = res.value;\n return res;\n}\nfunction getPositionOrSize(positionOrSize, canvasSize) {\n const isPercent = positionOrSize.mode === \"percent\";\n if (!isPercent) {\n const { mode: _, ...rest } = positionOrSize;\n return rest;\n }\n const isPosition = \"x\" in positionOrSize;\n if (isPosition) {\n return {\n x: (positionOrSize.x / percentDenominator) * canvasSize.width,\n y: (positionOrSize.y / percentDenominator) * canvasSize.height,\n };\n }\n else {\n return {\n width: (positionOrSize.width / percentDenominator) * canvasSize.width,\n height: (positionOrSize.height / percentDenominator) * canvasSize.height,\n };\n }\n}\nexport function getPosition(position, canvasSize) {\n return getPositionOrSize(position, canvasSize);\n}\nexport function getSize(size, canvasSize) {\n return getPositionOrSize(size, canvasSize);\n}\nfunction checkDestroy(particle, destroyType, value, minValue, maxValue) {\n switch (destroyType) {\n case \"max\":\n if (value >= maxValue) {\n particle.destroy();\n }\n break;\n case \"min\":\n if (value <= minValue) {\n particle.destroy();\n }\n break;\n }\n}\nexport function updateAnimation(particle, data, changeDirection, destroyType, delta) {\n const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minDecay = 1;\n if (particle.destroyed ||\n !data ||\n !data.enable ||\n ((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {\n return;\n }\n const velocity = (data.velocity ?? minVelocity) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? minDecay;\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n return;\n }\n switch (data.status) {\n case \"increasing\":\n if (data.value >= maxValue) {\n if (changeDirection) {\n data.status = \"decreasing\";\n }\n else {\n data.value -= maxValue;\n }\n if (!data.loops) {\n data.loops = minLoops;\n }\n data.loops++;\n }\n else {\n data.value += velocity;\n }\n break;\n case \"decreasing\":\n if (data.value <= minValue) {\n if (changeDirection) {\n data.status = \"increasing\";\n }\n else {\n data.value += maxValue;\n }\n if (!data.loops) {\n data.loops = minLoops;\n }\n data.loops++;\n }\n else {\n data.value -= velocity;\n }\n }\n if (data.velocity && decay !== identity) {\n data.velocity *= decay;\n }\n checkDestroy(particle, destroyType, data.value, minValue, maxValue);\n if (!particle.destroyed) {\n data.value = clamp(data.value, minValue, maxValue);\n }\n}\n","export class EventDispatcher {\n constructor() {\n this._listeners = new Map();\n }\n addEventListener(type, listener) {\n this.removeEventListener(type, listener);\n let arr = this._listeners.get(type);\n if (!arr) {\n arr = [];\n this._listeners.set(type, arr);\n }\n arr.push(listener);\n }\n dispatchEvent(type, args) {\n const listeners = this._listeners.get(type);\n listeners?.forEach((handler) => handler(args));\n }\n hasEventListener(type) {\n return !!this._listeners.get(type);\n }\n removeAllEventListeners(type) {\n if (!type) {\n this._listeners = new Map();\n }\n else {\n this._listeners.delete(type);\n }\n }\n removeEventListener(type, listener) {\n const arr = this._listeners.get(type);\n if (!arr) {\n return;\n }\n const length = arr.length, idx = arr.indexOf(listener), minIndex = 0;\n if (idx < minIndex) {\n return;\n }\n const deleteCount = 1;\n if (length === deleteCount) {\n this._listeners.delete(type);\n }\n else {\n arr.splice(idx, deleteCount);\n }\n }\n}\n","import { errorPrefix, generatedAttribute } from \"./Utils/Constants.js\";\nimport { executeOnSingleOrMultiple, getLogger, itemFromSingleOrMultiple } from \"../Utils/Utils.js\";\nimport { EventDispatcher } from \"../Utils/EventDispatcher.js\";\nimport { getRandom } from \"../Utils/NumberUtils.js\";\nasync function getItemsFromInitializer(container, map, initializers, force = false) {\n let res = map.get(container);\n if (!res || force) {\n res = await Promise.all([...initializers.values()].map((t) => t(container)));\n map.set(container, res);\n }\n return res;\n}\nasync function getDataFromUrl(data) {\n const url = itemFromSingleOrMultiple(data.url, data.index);\n if (!url) {\n return data.fallback;\n }\n const response = await fetch(url);\n if (response.ok) {\n return (await response.json());\n }\n getLogger().error(`${errorPrefix} ${response.status} while retrieving config file`);\n return data.fallback;\n}\nexport class Engine {\n constructor() {\n this._configs = new Map();\n this._domArray = [];\n this._eventDispatcher = new EventDispatcher();\n this._initialized = false;\n this.plugins = [];\n this._initializers = {\n interactors: new Map(),\n movers: new Map(),\n updaters: new Map(),\n };\n this.interactors = new Map();\n this.movers = new Map();\n this.updaters = new Map();\n this.presets = new Map();\n this.effectDrawers = new Map();\n this.shapeDrawers = new Map();\n this.pathGenerators = new Map();\n }\n get configs() {\n const res = {};\n for (const [name, config] of this._configs) {\n res[name] = config;\n }\n return res;\n }\n get version() {\n return \"3.3.0\";\n }\n addConfig(config) {\n const key = config.key ?? config.name ?? \"default\";\n this._configs.set(key, config);\n this._eventDispatcher.dispatchEvent(\"configAdded\", { data: { name: key, config } });\n }\n async addEffect(effect, drawer, refresh = true) {\n executeOnSingleOrMultiple(effect, (type) => {\n if (!this.getEffectDrawer(type)) {\n this.effectDrawers.set(type, drawer);\n }\n });\n await this.refresh(refresh);\n }\n addEventListener(type, listener) {\n this._eventDispatcher.addEventListener(type, listener);\n }\n async addInteractor(name, interactorInitializer, refresh = true) {\n this._initializers.interactors.set(name, interactorInitializer);\n await this.refresh(refresh);\n }\n async addMover(name, moverInitializer, refresh = true) {\n this._initializers.movers.set(name, moverInitializer);\n await this.refresh(refresh);\n }\n async addParticleUpdater(name, updaterInitializer, refresh = true) {\n this._initializers.updaters.set(name, updaterInitializer);\n await this.refresh(refresh);\n }\n async addPathGenerator(name, generator, refresh = true) {\n if (!this.getPathGenerator(name)) {\n this.pathGenerators.set(name, generator);\n }\n await this.refresh(refresh);\n }\n async addPlugin(plugin, refresh = true) {\n if (!this.getPlugin(plugin.id)) {\n this.plugins.push(plugin);\n }\n await this.refresh(refresh);\n }\n async addPreset(preset, options, override = false, refresh = true) {\n if (override || !this.getPreset(preset)) {\n this.presets.set(preset, options);\n }\n await this.refresh(refresh);\n }\n async addShape(shape, drawer, refresh = true) {\n executeOnSingleOrMultiple(shape, (type) => {\n if (!this.getShapeDrawer(type)) {\n this.shapeDrawers.set(type, drawer);\n }\n });\n await this.refresh(refresh);\n }\n clearPlugins(container) {\n this.updaters.delete(container);\n this.movers.delete(container);\n this.interactors.delete(container);\n }\n dispatchEvent(type, args) {\n this._eventDispatcher.dispatchEvent(type, args);\n }\n dom() {\n return this._domArray;\n }\n domItem(index) {\n const dom = this.dom(), item = dom[index];\n if (!item || item.destroyed) {\n const deleteCount = 1;\n dom.splice(index, deleteCount);\n return;\n }\n return item;\n }\n async getAvailablePlugins(container) {\n const res = new Map();\n for (const plugin of this.plugins) {\n if (plugin.needsPlugin(container.actualOptions)) {\n res.set(plugin.id, await plugin.getPlugin(container));\n }\n }\n return res;\n }\n getEffectDrawer(type) {\n return this.effectDrawers.get(type);\n }\n async getInteractors(container, force = false) {\n return await getItemsFromInitializer(container, this.interactors, this._initializers.interactors, force);\n }\n async getMovers(container, force = false) {\n return await getItemsFromInitializer(container, this.movers, this._initializers.movers, force);\n }\n getPathGenerator(type) {\n return this.pathGenerators.get(type);\n }\n getPlugin(plugin) {\n return this.plugins.find((t) => t.id === plugin);\n }\n getPreset(preset) {\n return this.presets.get(preset);\n }\n getShapeDrawer(type) {\n return this.shapeDrawers.get(type);\n }\n getSupportedEffects() {\n return this.effectDrawers.keys();\n }\n getSupportedShapes() {\n return this.shapeDrawers.keys();\n }\n async getUpdaters(container, force = false) {\n return await getItemsFromInitializer(container, this.updaters, this._initializers.updaters, force);\n }\n init() {\n if (this._initialized) {\n return;\n }\n this._initialized = true;\n }\n async load(params) {\n const randomFactor = 10000, id = params.id ?? params.element?.id ?? `tsparticles${Math.floor(getRandom() * randomFactor)}`, { index, url } = params, options = url ? await getDataFromUrl({ fallback: params.options, url, index }) : params.options;\n let domContainer = params.element ?? document.getElementById(id);\n if (!domContainer) {\n domContainer = document.createElement(\"div\");\n domContainer.id = id;\n document.body.append(domContainer);\n }\n const currentOptions = itemFromSingleOrMultiple(options, index), dom = this.dom(), oldIndex = dom.findIndex((v) => v.id.description === id), minIndex = 0;\n if (oldIndex >= minIndex) {\n const old = this.domItem(oldIndex);\n if (old && !old.destroyed) {\n old.destroy();\n const deleteCount = 1;\n dom.splice(oldIndex, deleteCount);\n }\n }\n let canvasEl;\n if (domContainer.tagName.toLowerCase() === \"canvas\") {\n canvasEl = domContainer;\n canvasEl.dataset[generatedAttribute] = \"false\";\n }\n else {\n const existingCanvases = domContainer.getElementsByTagName(\"canvas\");\n if (existingCanvases.length) {\n const firstIndex = 0;\n canvasEl = existingCanvases[firstIndex];\n canvasEl.dataset[generatedAttribute] = \"false\";\n }\n else {\n canvasEl = document.createElement(\"canvas\");\n canvasEl.dataset[generatedAttribute] = \"true\";\n domContainer.appendChild(canvasEl);\n }\n }\n if (!canvasEl.style.width) {\n canvasEl.style.width = \"100%\";\n }\n if (!canvasEl.style.height) {\n canvasEl.style.height = \"100%\";\n }\n const { Container } = await import(\"./Container.js\"), newItem = new Container(this, id, currentOptions);\n if (oldIndex >= minIndex) {\n const deleteCount = 0;\n dom.splice(oldIndex, deleteCount, newItem);\n }\n else {\n dom.push(newItem);\n }\n newItem.canvas.loadCanvas(canvasEl);\n await newItem.start();\n return newItem;\n }\n loadOptions(options, sourceOptions) {\n for (const plugin of this.plugins) {\n plugin.loadOptions(options, sourceOptions);\n }\n }\n loadParticlesOptions(container, options, ...sourceOptions) {\n const updaters = this.updaters.get(container);\n if (!updaters) {\n return;\n }\n for (const updater of updaters) {\n updater.loadOptions?.(options, ...sourceOptions);\n }\n }\n async refresh(refresh = true) {\n if (!refresh) {\n return;\n }\n await Promise.all(this.dom().map((t) => t.refresh()));\n }\n removeEventListener(type, listener) {\n this._eventDispatcher.removeEventListener(type, listener);\n }\n setOnClickHandler(callback) {\n const dom = this.dom();\n if (!dom.length) {\n throw new Error(`${errorPrefix} can only set click handlers after calling tsParticles.load()`);\n }\n for (const domItem of dom) {\n domItem.addClickHandler(callback);\n }\n }\n}\n","import { clamp, getRandom, getRangeMax, getRangeMin, getRangeValue, mix, randomInRange, setRangeValue, } from \"./NumberUtils.js\";\nimport { isArray, isString } from \"./TypeUtils.js\";\nimport { millisecondsToSeconds, percentDenominator } from \"../Core/Utils/Constants.js\";\nimport { itemFromArray } from \"./Utils.js\";\nconst randomColorValue = \"random\", midColorValue = \"mid\", colorManagers = new Map();\nexport function addColorManager(manager) {\n colorManagers.set(manager.key, manager);\n}\nfunction stringToRgba(input) {\n for (const [, manager] of colorManagers) {\n if (input.startsWith(manager.stringPrefix)) {\n return manager.parseString(input);\n }\n }\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])?$/i, hexFixed = input.replace(shorthandRegex, (_, r, g, b, a) => {\n return r + r + g + g + b + b + (a !== undefined ? a + a : \"\");\n }), regex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})?$/i, result = regex.exec(hexFixed), radix = 16, defaultAlpha = 1, alphaFactor = 0xff;\n return result\n ? {\n a: result[4] !== undefined\n ? parseInt(result[4], radix) / alphaFactor\n : defaultAlpha,\n b: parseInt(result[3], radix),\n g: parseInt(result[2], radix),\n r: parseInt(result[1], radix),\n }\n : undefined;\n}\nexport function rangeColorToRgb(input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return colorToRgb(color.value, index, useIndex);\n }\n if (isArray(color.value)) {\n return rangeColorToRgb({\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const [, manager] of colorManagers) {\n const res = manager.handleRangeColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToRgb(input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return color.value === randomColorValue ? getRandomRgbColor() : stringToRgb(color.value);\n }\n if (isArray(color.value)) {\n return colorToRgb({\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const [, manager] of colorManagers) {\n const res = manager.handleColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToHsl(color, index, useIndex = true) {\n const rgb = colorToRgb(color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rangeColorToHsl(color, index, useIndex = true) {\n const rgb = rangeColorToRgb(color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rgbToHsl(color) {\n const rgbMax = 255, hMax = 360, sMax = 100, lMax = 100, hMin = 0, sMin = 0, hPhase = 60, half = 0.5, double = 2, r1 = color.r / rgbMax, g1 = color.g / rgbMax, b1 = color.b / rgbMax, max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1), res = {\n h: hMin,\n l: (max + min) * half,\n s: sMin,\n };\n if (max !== min) {\n res.s = res.l < half ? (max - min) / (max + min) : (max - min) / (double - max - min);\n res.h =\n r1 === max\n ? (g1 - b1) / (max - min)\n : (res.h = g1 === max ? double + (b1 - r1) / (max - min) : double * double + (r1 - g1) / (max - min));\n }\n res.l *= lMax;\n res.s *= sMax;\n res.h *= hPhase;\n if (res.h < hMin) {\n res.h += hMax;\n }\n if (res.h >= hMax) {\n res.h -= hMax;\n }\n return res;\n}\nexport function stringToAlpha(input) {\n return stringToRgba(input)?.a;\n}\nexport function stringToRgb(input) {\n return stringToRgba(input);\n}\nexport function hslToRgb(hsl) {\n const hMax = 360, sMax = 100, lMax = 100, sMin = 0, lMin = 0, h = ((hsl.h % hMax) + hMax) % hMax, s = Math.max(sMin, Math.min(sMax, hsl.s)), l = Math.max(lMin, Math.min(lMax, hsl.l)), hNormalized = h / hMax, sNormalized = s / sMax, lNormalized = l / lMax, rgbFactor = 255, triple = 3;\n if (s === sMin) {\n const grayscaleValue = Math.round(lNormalized * rgbFactor);\n return { r: grayscaleValue, g: grayscaleValue, b: grayscaleValue };\n }\n const half = 0.5, double = 2, channel = (temp1, temp2, temp3) => {\n const temp3Min = 0, temp3Max = 1, sextuple = 6;\n if (temp3 < temp3Min) {\n temp3++;\n }\n if (temp3 > temp3Max) {\n temp3--;\n }\n if (temp3 * sextuple < temp3Max) {\n return temp1 + (temp2 - temp1) * sextuple * temp3;\n }\n if (temp3 * double < temp3Max) {\n return temp2;\n }\n if (temp3 * triple < temp3Max * double) {\n const temp3Offset = double / triple;\n return temp1 + (temp2 - temp1) * (temp3Offset - temp3) * sextuple;\n }\n return temp1;\n }, sNormalizedOffset = 1, temp1 = lNormalized < half\n ? lNormalized * (sNormalizedOffset + sNormalized)\n : lNormalized + sNormalized - lNormalized * sNormalized, temp2 = double * lNormalized - temp1, phaseNumerator = 1, phaseThird = phaseNumerator / triple, red = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized + phaseThird)), green = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized)), blue = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized - phaseThird));\n return { r: Math.round(red), g: Math.round(green), b: Math.round(blue) };\n}\nexport function hslaToRgba(hsla) {\n const rgbResult = hslToRgb(hsla);\n return {\n a: hsla.a,\n b: rgbResult.b,\n g: rgbResult.g,\n r: rgbResult.r,\n };\n}\nexport function getRandomRgbColor(min) {\n const defaultMin = 0, fixedMin = min ?? defaultMin, rgbMax = 256;\n return {\n b: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n g: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n r: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n };\n}\nexport function getStyleFromRgb(color, opacity) {\n const defaultOpacity = 1;\n return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity ?? defaultOpacity})`;\n}\nexport function getStyleFromHsl(color, opacity) {\n const defaultOpacity = 1;\n return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${opacity ?? defaultOpacity})`;\n}\nexport function colorMix(color1, color2, size1, size2) {\n let rgb1 = color1, rgb2 = color2;\n if (rgb1.r === undefined) {\n rgb1 = hslToRgb(color1);\n }\n if (rgb2.r === undefined) {\n rgb2 = hslToRgb(color2);\n }\n return {\n b: mix(rgb1.b, rgb2.b, size1, size2),\n g: mix(rgb1.g, rgb2.g, size1, size2),\n r: mix(rgb1.r, rgb2.r, size1, size2),\n };\n}\nexport function getLinkColor(p1, p2, linkColor) {\n if (linkColor === randomColorValue) {\n return getRandomRgbColor();\n }\n else if (linkColor === midColorValue) {\n const sourceColor = p1.getFillColor() ?? p1.getStrokeColor(), destColor = p2?.getFillColor() ?? p2?.getStrokeColor();\n if (sourceColor && destColor && p2) {\n return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());\n }\n else {\n const hslColor = sourceColor ?? destColor;\n if (hslColor) {\n return hslToRgb(hslColor);\n }\n }\n }\n else {\n return linkColor;\n }\n}\nexport function getLinkRandomColor(optColor, blink, consent) {\n const color = isString(optColor) ? optColor : optColor.value;\n if (color === randomColorValue) {\n if (consent) {\n return rangeColorToRgb({\n value: color,\n });\n }\n if (blink) {\n return randomColorValue;\n }\n return midColorValue;\n }\n else if (color === midColorValue) {\n return midColorValue;\n }\n else {\n return rangeColorToRgb({\n value: color,\n });\n }\n}\nexport function getHslFromAnimation(animation) {\n return animation !== undefined\n ? {\n h: animation.h.value,\n s: animation.s.value,\n l: animation.l.value,\n }\n : undefined;\n}\nexport function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {\n const resColor = {\n h: {\n enable: false,\n value: hsl.h,\n },\n s: {\n enable: false,\n value: hsl.s,\n },\n l: {\n enable: false,\n value: hsl.l,\n },\n };\n if (animationOptions) {\n setColorAnimation(resColor.h, animationOptions.h, reduceFactor);\n setColorAnimation(resColor.s, animationOptions.s, reduceFactor);\n setColorAnimation(resColor.l, animationOptions.l, reduceFactor);\n }\n return resColor;\n}\nfunction setColorAnimation(colorValue, colorAnimation, reduceFactor) {\n colorValue.enable = colorAnimation.enable;\n const defaultVelocity = 0, decayOffset = 1, defaultLoops = 0, defaultTime = 0;\n if (colorValue.enable) {\n colorValue.velocity = (getRangeValue(colorAnimation.speed) / percentDenominator) * reduceFactor;\n colorValue.decay = decayOffset - getRangeValue(colorAnimation.decay);\n colorValue.status = \"increasing\";\n colorValue.loops = defaultLoops;\n colorValue.maxLoops = getRangeValue(colorAnimation.count);\n colorValue.time = defaultTime;\n colorValue.delayTime = getRangeValue(colorAnimation.delay) * millisecondsToSeconds;\n if (!colorAnimation.sync) {\n colorValue.velocity *= getRandom();\n colorValue.value *= getRandom();\n }\n colorValue.initialValue = colorValue.value;\n colorValue.offset = setRangeValue(colorAnimation.offset);\n }\n else {\n colorValue.velocity = defaultVelocity;\n }\n}\nexport function updateColorValue(data, range, decrease, delta) {\n const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minOffset = 0, velocityFactor = 3.6;\n if (!data ||\n !data.enable ||\n ((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {\n return;\n }\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n return;\n }\n const offset = data.offset ? randomInRange(data.offset) : minOffset, velocity = (data.velocity ?? minVelocity) * delta.factor + offset * velocityFactor, decay = data.decay ?? identity, max = getRangeMax(range), min = getRangeMin(range);\n if (!decrease || data.status === \"increasing\") {\n data.value += velocity;\n if (data.value > max) {\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n if (decrease) {\n data.status = \"decreasing\";\n }\n else {\n data.value -= max;\n }\n }\n }\n else {\n data.value -= velocity;\n const minValue = 0;\n if (data.value < minValue) {\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n data.status = \"increasing\";\n }\n }\n if (data.velocity && decay !== identity) {\n data.velocity *= decay;\n }\n data.value = clamp(data.value, min, max);\n}\nexport function updateColor(color, delta) {\n if (!color) {\n return;\n }\n const { h, s, l } = color;\n const ranges = {\n h: { min: 0, max: 360 },\n s: { min: 0, max: 100 },\n l: { min: 0, max: 100 },\n };\n if (h) {\n updateColorValue(h, ranges.h, false, delta);\n }\n if (s) {\n updateColorValue(s, ranges.s, true, delta);\n }\n if (l) {\n updateColorValue(l, ranges.l, true, delta);\n }\n}\n","import { getRangeValue, parseAlpha } from \"./NumberUtils.js\";\nimport { hslToRgb, hslaToRgba } from \"./ColorUtils.js\";\nexport class HslColorManager {\n constructor() {\n this.key = \"hsl\";\n this.stringPrefix = \"hsl\";\n }\n handleColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.s !== undefined && hslColor.l !== undefined) {\n return hslToRgb(hslColor);\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.l !== undefined) {\n return hslToRgb({\n h: getRangeValue(hslColor.h),\n l: getRangeValue(hslColor.l),\n s: getRangeValue(hslColor.s),\n });\n }\n }\n parseString(input) {\n if (!input.startsWith(\"hsl\")) {\n return;\n }\n const regex = /hsla?\\(\\s*(\\d+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*(,\\s*([\\d.%]+)\\s*)?\\)/i, result = regex.exec(input), minLength = 4, defaultAlpha = 1, radix = 10;\n return result\n ? hslaToRgba({\n a: result.length > minLength ? parseAlpha(result[5]) : defaultAlpha,\n h: parseInt(result[1], radix),\n l: parseInt(result[3], radix),\n s: parseInt(result[2], radix),\n })\n : undefined;\n }\n}\n","import { getRangeValue, parseAlpha } from \"./NumberUtils.js\";\nexport class RgbColorManager {\n constructor() {\n this.key = \"rgb\";\n this.stringPrefix = \"rgb\";\n }\n handleColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return rgbColor;\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return {\n r: getRangeValue(rgbColor.r),\n g: getRangeValue(rgbColor.g),\n b: getRangeValue(rgbColor.b),\n };\n }\n }\n parseString(input) {\n if (!input.startsWith(this.stringPrefix)) {\n return;\n }\n const regex = /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([\\d.%]+)\\s*)?\\)/i, result = regex.exec(input), radix = 10, minLength = 4, defaultAlpha = 1;\n return result\n ? {\n a: result.length > minLength ? parseAlpha(result[5]) : defaultAlpha,\n b: parseInt(result[3], radix),\n g: parseInt(result[2], radix),\n r: parseInt(result[1], radix),\n }\n : undefined;\n }\n}\n","import { Engine } from \"./Core/Engine.js\";\nimport { HslColorManager } from \"./Utils/HslColorManager.js\";\nimport { RgbColorManager } from \"./Utils/RgbColorManager.js\";\nimport { addColorManager } from \"./Utils/ColorUtils.js\";\nexport function init() {\n const rgbColorManager = new RgbColorManager(), hslColorManager = new HslColorManager();\n addColorManager(rgbColorManager);\n addColorManager(hslColorManager);\n const engine = new Engine();\n engine.init();\n return engine;\n}\n","export class ExternalInteractorBase {\n constructor(container) {\n this.type = \"external\";\n this.container = container;\n }\n}\n","export class ParticlesInteractorBase {\n constructor(container) {\n this.type = \"particles\";\n this.container = container;\n }\n}\n","export class Point {\n constructor(position, particle) {\n this.position = position;\n this.particle = particle;\n }\n}\n","import { getDistance } from \"../../Utils/NumberUtils.js\";\nconst squareExp = 2;\nexport class BaseRange {\n constructor(x, y, type) {\n this.position = {\n x: x,\n y: y,\n };\n this.type = type;\n }\n}\nexport class Circle extends BaseRange {\n constructor(x, y, radius) {\n super(x, y, \"circle\");\n this.radius = radius;\n }\n contains(point) {\n return getDistance(point, this.position) <= this.radius;\n }\n intersects(range) {\n const pos1 = this.position, pos2 = range.position, distPos = { x: Math.abs(pos2.x - pos1.x), y: Math.abs(pos2.y - pos1.y) }, r = this.radius;\n if (range instanceof Circle || range.type === \"circle\") {\n const circleRange = range, rSum = r + circleRange.radius, dist = Math.sqrt(distPos.x ** squareExp + distPos.y ** squareExp);\n return rSum > dist;\n }\n else if (range instanceof Rectangle || range.type === \"rectangle\") {\n const rectRange = range, { width, height } = rectRange.size, edges = Math.pow(distPos.x - width, squareExp) + Math.pow(distPos.y - height, squareExp);\n return (edges <= r ** squareExp ||\n (distPos.x <= r + width && distPos.y <= r + height) ||\n distPos.x <= width ||\n distPos.y <= height);\n }\n return false;\n }\n}\nexport class Rectangle extends BaseRange {\n constructor(x, y, width, height) {\n super(x, y, \"rectangle\");\n this.size = {\n height: height,\n width: width,\n };\n }\n contains(point) {\n const w = this.size.width, h = this.size.height, pos = this.position;\n return point.x >= pos.x && point.x <= pos.x + w && point.y >= pos.y && point.y <= pos.y + h;\n }\n intersects(range) {\n if (range instanceof Circle) {\n return range.intersects(this);\n }\n const w = this.size.width, h = this.size.height, pos1 = this.position, pos2 = range.position, size2 = range instanceof Rectangle ? range.size : { width: 0, height: 0 }, w2 = size2.width, h2 = size2.height;\n return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;\n }\n}\n","import { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class AnimationOptions {\n constructor() {\n this.count = 0;\n this.enable = false;\n this.speed = 1;\n this.decay = 0;\n this.delay = 0;\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = setRangeValue(data.count);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\nexport class RangedAnimationOptions extends AnimationOptions {\n constructor() {\n super();\n this.mode = \"auto\";\n this.startValue = \"random\";\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.startValue !== undefined) {\n this.startValue = data.startValue;\n }\n }\n}\n","import { AnimationOptions } from \"./AnimationOptions.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class ColorAnimation extends AnimationOptions {\n constructor() {\n super();\n this.offset = 0;\n this.sync = true;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n }\n}\n","import { ColorAnimation } from \"./ColorAnimation.js\";\nexport class HslAnimation {\n constructor() {\n this.h = new ColorAnimation();\n this.s = new ColorAnimation();\n this.l = new ColorAnimation();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.h.load(data.h);\n this.s.load(data.s);\n this.l.load(data.l);\n }\n}\n","import { isArray, isString } from \"../../Utils/TypeUtils.js\";\nexport class OptionsColor {\n constructor() {\n this.value = \"\";\n }\n static create(source, data) {\n const color = new OptionsColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n if (data?.value === undefined) {\n return;\n }\n this.value = data.value;\n }\n}\n","import { isArray, isString } from \"../../Utils/TypeUtils.js\";\nimport { HslAnimation } from \"./HslAnimation.js\";\nimport { OptionsColor } from \"./OptionsColor.js\";\nexport class AnimatableColor extends OptionsColor {\n constructor() {\n super();\n this.animation = new HslAnimation();\n }\n static create(source, data) {\n const color = new AnimatableColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const colorAnimation = data.animation;\n if (colorAnimation !== undefined) {\n if (colorAnimation.enable !== undefined) {\n this.animation.h.load(colorAnimation);\n }\n else {\n this.animation.load(data.animation);\n }\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nexport class Background {\n constructor() {\n this.color = new OptionsColor();\n this.color.value = \"\";\n this.image = \"\";\n this.position = \"\";\n this.repeat = \"\";\n this.size = \"\";\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n if (data.position !== undefined) {\n this.position = data.position;\n }\n if (data.repeat !== undefined) {\n this.repeat = data.repeat;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nexport class BackgroundMaskCover {\n constructor() {\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { BackgroundMaskCover } from \"./BackgroundMaskCover.js\";\nimport { isString } from \"../../../Utils/TypeUtils.js\";\nexport class BackgroundMask {\n constructor() {\n this.composite = \"destination-out\";\n this.cover = new BackgroundMaskCover();\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.composite !== undefined) {\n this.composite = data.composite;\n }\n if (data.cover !== undefined) {\n const cover = data.cover, color = (isString(data.cover) ? { color: data.cover } : data.cover);\n this.cover.load(cover.color !== undefined || cover.image !== undefined ? cover : { color: color });\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","export class FullScreen {\n constructor() {\n this.enable = true;\n this.zIndex = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.zIndex !== undefined) {\n this.zIndex = data.zIndex;\n }\n }\n}\n","export class ClickEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n }\n}\n","export class DivEvent {\n constructor() {\n this.selectors = [];\n this.enable = false;\n this.mode = [];\n this.type = \"circle\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","export class Parallax {\n constructor() {\n this.enable = false;\n this.force = 2;\n this.smooth = 10;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.force !== undefined) {\n this.force = data.force;\n }\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n }\n}\n","import { Parallax } from \"./Parallax.js\";\nexport class HoverEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n this.parallax = new Parallax();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.parallax.load(data.parallax);\n }\n}\n","export class ResizeEvent {\n constructor() {\n this.delay = 0.5;\n this.enable = true;\n }\n load(data) {\n if (data === undefined) {\n return;\n }\n if (data.delay !== undefined) {\n this.delay = data.delay;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { ClickEvent } from \"./ClickEvent.js\";\nimport { DivEvent } from \"./DivEvent.js\";\nimport { HoverEvent } from \"./HoverEvent.js\";\nimport { ResizeEvent } from \"./ResizeEvent.js\";\nimport { executeOnSingleOrMultiple } from \"../../../../Utils/Utils.js\";\nexport class Events {\n constructor() {\n this.onClick = new ClickEvent();\n this.onDiv = new DivEvent();\n this.onHover = new HoverEvent();\n this.resize = new ResizeEvent();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.onClick.load(data.onClick);\n const onDiv = data.onDiv;\n if (onDiv !== undefined) {\n this.onDiv = executeOnSingleOrMultiple(onDiv, (t) => {\n const tmp = new DivEvent();\n tmp.load(t);\n return tmp;\n });\n }\n this.onHover.load(data.onHover);\n this.resize.load(data.resize);\n }\n}\n","export class Modes {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (!this._container) {\n return;\n }\n const interactors = this._engine.interactors.get(this._container);\n if (!interactors) {\n return;\n }\n for (const interactor of interactors) {\n if (!interactor.loadModeOptions) {\n continue;\n }\n interactor.loadModeOptions(this, data);\n }\n }\n}\n","import { Events } from \"./Events/Events.js\";\nimport { Modes } from \"./Modes/Modes.js\";\nexport class Interactivity {\n constructor(engine, container) {\n this.detectsOn = \"window\";\n this.events = new Events();\n this.modes = new Modes(engine, container);\n }\n load(data) {\n if (!data) {\n return;\n }\n const detectsOn = data.detectsOn;\n if (detectsOn !== undefined) {\n this.detectsOn = detectsOn;\n }\n this.events.load(data.events);\n this.modes.load(data.modes);\n }\n}\n","import { deepExtend } from \"../../Utils/Utils.js\";\nconst defaultPosition = 50;\nexport class ManualParticle {\n load(data) {\n if (!data) {\n return;\n }\n if (data.position) {\n this.position = {\n x: data.position.x ?? defaultPosition,\n y: data.position.y ?? defaultPosition,\n mode: data.position.mode ?? \"percent\",\n };\n }\n if (data.options) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","import { deepExtend } from \"../../Utils/Utils.js\";\nexport class Responsive {\n constructor() {\n this.maxWidth = Infinity;\n this.options = {};\n this.mode = \"canvas\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.maxWidth !== undefined) {\n this.maxWidth = data.maxWidth;\n }\n if (data.mode !== undefined) {\n if (data.mode === \"screen\") {\n this.mode = \"screen\";\n }\n else {\n this.mode = \"canvas\";\n }\n }\n if (data.options !== undefined) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","export class ThemeDefault {\n constructor() {\n this.auto = false;\n this.mode = \"any\";\n this.value = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.auto !== undefined) {\n this.auto = data.auto;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { ThemeDefault } from \"./ThemeDefault.js\";\nimport { deepExtend } from \"../../../Utils/Utils.js\";\nexport class Theme {\n constructor() {\n this.name = \"\";\n this.default = new ThemeDefault();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n this.default.load(data.default);\n if (data.options !== undefined) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","export class CollisionsAbsorb {\n constructor() {\n this.speed = 2;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","export class CollisionsOverlap {\n constructor() {\n this.enable = true;\n this.retries = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.retries !== undefined) {\n this.retries = data.retries;\n }\n }\n}\n","import { AnimationOptions, RangedAnimationOptions } from \"./AnimationOptions.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class ValueWithRandom {\n constructor() {\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.value !== undefined) {\n this.value = setRangeValue(data.value);\n }\n }\n}\nexport class AnimationValueWithRandom extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new AnimationOptions();\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\nexport class RangedAnimationValueWithRandom extends AnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new RangedAnimationOptions();\n }\n load(data) {\n super.load(data);\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom.js\";\nexport class ParticlesBounceFactor extends ValueWithRandom {\n constructor() {\n super();\n this.value = 1;\n }\n}\n","import { ParticlesBounceFactor } from \"./ParticlesBounceFactor.js\";\nexport class ParticlesBounce {\n constructor() {\n this.horizontal = new ParticlesBounceFactor();\n this.vertical = new ParticlesBounceFactor();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.horizontal.load(data.horizontal);\n this.vertical.load(data.vertical);\n }\n}\n","import { CollisionsAbsorb } from \"./CollisionsAbsorb.js\";\nimport { CollisionsOverlap } from \"./CollisionsOverlap.js\";\nimport { ParticlesBounce } from \"../Bounce/ParticlesBounce.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Collisions {\n constructor() {\n this.absorb = new CollisionsAbsorb();\n this.bounce = new ParticlesBounce();\n this.enable = false;\n this.maxSpeed = 50;\n this.mode = \"bounce\";\n this.overlap = new CollisionsOverlap();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.absorb.load(data.absorb);\n this.bounce.load(data.bounce);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.overlap.load(data.overlap);\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nexport class Effect {\n constructor() {\n this.close = true;\n this.fill = true;\n this.options = {};\n this.type = [];\n }\n load(data) {\n if (!data) {\n return;\n }\n const options = data.options;\n if (options !== undefined) {\n for (const effect in options) {\n const item = options[effect];\n if (item) {\n this.options[effect] = deepExtend(this.options[effect] ?? {}, item);\n }\n }\n }\n if (data.close !== undefined) {\n this.close = data.close;\n }\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveAngle {\n constructor() {\n this.offset = 0;\n this.value = 90;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n if (data.value !== undefined) {\n this.value = setRangeValue(data.value);\n }\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveAttract {\n constructor() {\n this.distance = 200;\n this.enable = false;\n this.rotate = {\n x: 3000,\n y: 3000,\n };\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = setRangeValue(data.distance);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.rotate) {\n const rotateX = data.rotate.x;\n if (rotateX !== undefined) {\n this.rotate.x = rotateX;\n }\n const rotateY = data.rotate.y;\n if (rotateY !== undefined) {\n this.rotate.y = rotateY;\n }\n }\n }\n}\n","export class MoveCenter {\n constructor() {\n this.x = 50;\n this.y = 50;\n this.mode = \"percent\";\n this.radius = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.x !== undefined) {\n this.x = data.x;\n }\n if (data.y !== undefined) {\n this.y = data.y;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveGravity {\n constructor() {\n this.acceleration = 9.81;\n this.enable = false;\n this.inverse = false;\n this.maxSpeed = 50;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.inverse !== undefined) {\n this.inverse = data.inverse;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n }\n}\n","import { ValueWithRandom } from \"../../../ValueWithRandom.js\";\nimport { deepExtend } from \"../../../../../Utils/Utils.js\";\nexport class MovePath {\n constructor() {\n this.clamp = true;\n this.delay = new ValueWithRandom();\n this.enable = false;\n this.options = {};\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.clamp !== undefined) {\n this.clamp = data.clamp;\n }\n this.delay.load(data.delay);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.generator = data.generator;\n if (data.options) {\n this.options = deepExtend(this.options, data.options);\n }\n }\n}\n","import { OptionsColor } from \"../../OptionsColor.js\";\nexport class MoveTrailFill {\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n }\n}\n","import { MoveTrailFill } from \"./MoveTrailFill.js\";\nexport class MoveTrail {\n constructor() {\n this.enable = false;\n this.length = 10;\n this.fill = new MoveTrailFill();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.fill !== undefined) {\n this.fill.load(data.fill);\n }\n if (data.length !== undefined) {\n this.length = data.length;\n }\n }\n}\n","export class OutModes {\n constructor() {\n this.default = \"out\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n this.bottom = data.bottom ?? data.default;\n this.left = data.left ?? data.default;\n this.right = data.right ?? data.default;\n this.top = data.top ?? data.default;\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Spin {\n constructor() {\n this.acceleration = 0;\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.position) {\n this.position = deepExtend({}, data.position);\n }\n }\n}\n","import { isNumber, isObject } from \"../../../../Utils/TypeUtils.js\";\nimport { MoveAngle } from \"./MoveAngle.js\";\nimport { MoveAttract } from \"./MoveAttract.js\";\nimport { MoveCenter } from \"./MoveCenter.js\";\nimport { MoveGravity } from \"./MoveGravity.js\";\nimport { MovePath } from \"./Path/MovePath.js\";\nimport { MoveTrail } from \"./MoveTrail.js\";\nimport { OutModes } from \"./OutModes.js\";\nimport { Spin } from \"./Spin.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Move {\n constructor() {\n this.angle = new MoveAngle();\n this.attract = new MoveAttract();\n this.center = new MoveCenter();\n this.decay = 0;\n this.distance = {};\n this.direction = \"none\";\n this.drift = 0;\n this.enable = false;\n this.gravity = new MoveGravity();\n this.path = new MovePath();\n this.outModes = new OutModes();\n this.random = false;\n this.size = false;\n this.speed = 2;\n this.spin = new Spin();\n this.straight = false;\n this.trail = new MoveTrail();\n this.vibrate = false;\n this.warp = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.angle.load(isNumber(data.angle) ? { value: data.angle } : data.angle);\n this.attract.load(data.attract);\n this.center.load(data.center);\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n if (data.distance !== undefined) {\n this.distance = isNumber(data.distance)\n ? {\n horizontal: data.distance,\n vertical: data.distance,\n }\n : { ...data.distance };\n }\n if (data.drift !== undefined) {\n this.drift = setRangeValue(data.drift);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.gravity.load(data.gravity);\n const outModes = data.outModes;\n if (outModes !== undefined) {\n if (isObject(outModes)) {\n this.outModes.load(outModes);\n }\n else {\n this.outModes.load({\n default: outModes,\n });\n }\n }\n this.path.load(data.path);\n if (data.random !== undefined) {\n this.random = data.random;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n this.spin.load(data.spin);\n if (data.straight !== undefined) {\n this.straight = data.straight;\n }\n this.trail.load(data.trail);\n if (data.vibrate !== undefined) {\n this.vibrate = data.vibrate;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","import { RangedAnimationOptions } from \"../../AnimationOptions.js\";\nexport class OpacityAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = \"none\";\n this.speed = 2;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { OpacityAnimation } from \"./OpacityAnimation.js\";\nimport { RangedAnimationValueWithRandom } from \"../../ValueWithRandom.js\";\nexport class Opacity extends RangedAnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new OpacityAnimation();\n this.value = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\n","export class ParticlesDensity {\n constructor() {\n this.enable = false;\n this.width = 1920;\n this.height = 1080;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const width = data.width;\n if (width !== undefined) {\n this.width = width;\n }\n const height = data.height;\n if (height !== undefined) {\n this.height = height;\n }\n }\n}\n","export class ParticlesNumberLimit {\n constructor() {\n this.mode = \"delete\";\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { ParticlesDensity } from \"./ParticlesDensity.js\";\nimport { ParticlesNumberLimit } from \"./ParticlesNumberLimit.js\";\nexport class ParticlesNumber {\n constructor() {\n this.density = new ParticlesDensity();\n this.limit = new ParticlesNumberLimit();\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.density.load(data.density);\n this.limit.load(data.limit);\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nexport class Shadow {\n constructor() {\n this.blur = 0;\n this.color = new OptionsColor();\n this.enable = false;\n this.offset = {\n x: 0,\n y: 0,\n };\n this.color.value = \"#000\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.offset === undefined) {\n return;\n }\n if (data.offset.x !== undefined) {\n this.offset.x = data.offset.x;\n }\n if (data.offset.y !== undefined) {\n this.offset.y = data.offset.y;\n }\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nexport class Shape {\n constructor() {\n this.close = true;\n this.fill = true;\n this.options = {};\n this.type = \"circle\";\n }\n load(data) {\n if (!data) {\n return;\n }\n const options = data.options;\n if (options !== undefined) {\n for (const shape in options) {\n const item = options[shape];\n if (item) {\n this.options[shape] = deepExtend(this.options[shape] ?? {}, item);\n }\n }\n }\n if (data.close !== undefined) {\n this.close = data.close;\n }\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { RangedAnimationOptions } from \"../../AnimationOptions.js\";\nexport class SizeAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = \"none\";\n this.speed = 5;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { RangedAnimationValueWithRandom } from \"../../ValueWithRandom.js\";\nimport { SizeAnimation } from \"./SizeAnimation.js\";\nexport class Size extends RangedAnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new SizeAnimation();\n this.value = 3;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\n","import { AnimatableColor } from \"../AnimatableColor.js\";\nimport { setRangeValue } from \"../../../Utils/NumberUtils.js\";\nexport class Stroke {\n constructor() {\n this.width = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = AnimatableColor.create(this.color, data.color);\n }\n if (data.width !== undefined) {\n this.width = setRangeValue(data.width);\n }\n if (data.opacity !== undefined) {\n this.opacity = setRangeValue(data.opacity);\n }\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom.js\";\nexport class ZIndex extends ValueWithRandom {\n constructor() {\n super();\n this.opacityRate = 1;\n this.sizeRate = 1;\n this.velocityRate = 1;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.opacityRate !== undefined) {\n this.opacityRate = data.opacityRate;\n }\n if (data.sizeRate !== undefined) {\n this.sizeRate = data.sizeRate;\n }\n if (data.velocityRate !== undefined) {\n this.velocityRate = data.velocityRate;\n }\n }\n}\n","import { deepExtend, executeOnSingleOrMultiple } from \"../../../Utils/Utils.js\";\nimport { AnimatableColor } from \"../AnimatableColor.js\";\nimport { Collisions } from \"./Collisions/Collisions.js\";\nimport { Effect } from \"./Effect/Effect.js\";\nimport { Move } from \"./Move/Move.js\";\nimport { Opacity } from \"./Opacity/Opacity.js\";\nimport { ParticlesBounce } from \"./Bounce/ParticlesBounce.js\";\nimport { ParticlesNumber } from \"./Number/ParticlesNumber.js\";\nimport { Shadow } from \"./Shadow.js\";\nimport { Shape } from \"./Shape/Shape.js\";\nimport { Size } from \"./Size/Size.js\";\nimport { Stroke } from \"./Stroke.js\";\nimport { ZIndex } from \"./ZIndex/ZIndex.js\";\nexport class ParticlesOptions {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n this.bounce = new ParticlesBounce();\n this.collisions = new Collisions();\n this.color = new AnimatableColor();\n this.color.value = \"#fff\";\n this.effect = new Effect();\n this.groups = {};\n this.move = new Move();\n this.number = new ParticlesNumber();\n this.opacity = new Opacity();\n this.reduceDuplicates = false;\n this.shadow = new Shadow();\n this.shape = new Shape();\n this.size = new Size();\n this.stroke = new Stroke();\n this.zIndex = new ZIndex();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.groups !== undefined) {\n for (const group of Object.keys(data.groups)) {\n if (!Object.hasOwn(data.groups, group)) {\n continue;\n }\n const item = data.groups[group];\n if (item !== undefined) {\n this.groups[group] = deepExtend(this.groups[group] ?? {}, item);\n }\n }\n }\n if (data.reduceDuplicates !== undefined) {\n this.reduceDuplicates = data.reduceDuplicates;\n }\n this.bounce.load(data.bounce);\n this.color.load(AnimatableColor.create(this.color, data.color));\n this.effect.load(data.effect);\n this.move.load(data.move);\n this.number.load(data.number);\n this.opacity.load(data.opacity);\n this.shape.load(data.shape);\n this.size.load(data.size);\n this.shadow.load(data.shadow);\n this.zIndex.load(data.zIndex);\n this.collisions.load(data.collisions);\n if (data.interactivity !== undefined) {\n this.interactivity = deepExtend({}, data.interactivity);\n }\n const strokeToLoad = data.stroke;\n if (strokeToLoad) {\n this.stroke = executeOnSingleOrMultiple(strokeToLoad, (t) => {\n const tmp = new Stroke();\n tmp.load(t);\n return tmp;\n });\n }\n if (this._container) {\n const updaters = this._engine.updaters.get(this._container);\n if (updaters) {\n for (const updater of updaters) {\n if (updater.loadOptions) {\n updater.loadOptions(this, data);\n }\n }\n }\n const interactors = this._engine.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadParticlesOptions) {\n interactor.loadParticlesOptions(this, data);\n }\n }\n }\n }\n }\n}\n","import { ParticlesOptions } from \"../Options/Classes/Particles/ParticlesOptions.js\";\nexport function loadOptions(options, ...sourceOptionsArr) {\n for (const sourceOptions of sourceOptionsArr) {\n options.load(sourceOptions);\n }\n}\nexport function loadParticlesOptions(engine, container, ...sourceOptionsArr) {\n const options = new ParticlesOptions(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\n","import { deepExtend, executeOnSingleOrMultiple, safeMatchMedia } from \"../../Utils/Utils.js\";\nimport { Background } from \"./Background/Background.js\";\nimport { BackgroundMask } from \"./BackgroundMask/BackgroundMask.js\";\nimport { FullScreen } from \"./FullScreen/FullScreen.js\";\nimport { Interactivity } from \"./Interactivity/Interactivity.js\";\nimport { ManualParticle } from \"./ManualParticle.js\";\nimport { Responsive } from \"./Responsive.js\";\nimport { Theme } from \"./Theme/Theme.js\";\nimport { isBoolean } from \"../../Utils/TypeUtils.js\";\nimport { loadParticlesOptions } from \"../../Utils/OptionsUtils.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class Options {\n constructor(engine, container) {\n this._findDefaultTheme = (mode) => {\n return (this.themes.find((theme) => theme.default.value && theme.default.mode === mode) ??\n this.themes.find((theme) => theme.default.value && theme.default.mode === \"any\"));\n };\n this._importPreset = (preset) => {\n this.load(this._engine.getPreset(preset));\n };\n this._engine = engine;\n this._container = container;\n this.autoPlay = true;\n this.background = new Background();\n this.backgroundMask = new BackgroundMask();\n this.clear = true;\n this.defaultThemes = {};\n this.delay = 0;\n this.fullScreen = new FullScreen();\n this.detectRetina = true;\n this.duration = 0;\n this.fpsLimit = 120;\n this.interactivity = new Interactivity(engine, container);\n this.manualParticles = [];\n this.particles = loadParticlesOptions(this._engine, this._container);\n this.pauseOnBlur = true;\n this.pauseOnOutsideViewport = true;\n this.responsive = [];\n this.smooth = false;\n this.style = {};\n this.themes = [];\n this.zLayers = 100;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.preset !== undefined) {\n executeOnSingleOrMultiple(data.preset, (preset) => this._importPreset(preset));\n }\n if (data.autoPlay !== undefined) {\n this.autoPlay = data.autoPlay;\n }\n if (data.clear !== undefined) {\n this.clear = data.clear;\n }\n if (data.key !== undefined) {\n this.key = data.key;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n const detectRetina = data.detectRetina;\n if (detectRetina !== undefined) {\n this.detectRetina = detectRetina;\n }\n if (data.duration !== undefined) {\n this.duration = setRangeValue(data.duration);\n }\n const fpsLimit = data.fpsLimit;\n if (fpsLimit !== undefined) {\n this.fpsLimit = fpsLimit;\n }\n if (data.pauseOnBlur !== undefined) {\n this.pauseOnBlur = data.pauseOnBlur;\n }\n if (data.pauseOnOutsideViewport !== undefined) {\n this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;\n }\n if (data.zLayers !== undefined) {\n this.zLayers = data.zLayers;\n }\n this.background.load(data.background);\n const fullScreen = data.fullScreen;\n if (isBoolean(fullScreen)) {\n this.fullScreen.enable = fullScreen;\n }\n else {\n this.fullScreen.load(fullScreen);\n }\n this.backgroundMask.load(data.backgroundMask);\n this.interactivity.load(data.interactivity);\n if (data.manualParticles) {\n this.manualParticles = data.manualParticles.map((t) => {\n const tmp = new ManualParticle();\n tmp.load(t);\n return tmp;\n });\n }\n this.particles.load(data.particles);\n this.style = deepExtend(this.style, data.style);\n this._engine.loadOptions(this, data);\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n const interactors = this._engine.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadOptions) {\n interactor.loadOptions(this, data);\n }\n }\n }\n if (data.responsive !== undefined) {\n for (const responsive of data.responsive) {\n const optResponsive = new Responsive();\n optResponsive.load(responsive);\n this.responsive.push(optResponsive);\n }\n }\n this.responsive.sort((a, b) => a.maxWidth - b.maxWidth);\n if (data.themes !== undefined) {\n for (const theme of data.themes) {\n const existingTheme = this.themes.find((t) => t.name === theme.name);\n if (!existingTheme) {\n const optTheme = new Theme();\n optTheme.load(theme);\n this.themes.push(optTheme);\n }\n else {\n existingTheme.load(theme);\n }\n }\n }\n this.defaultThemes.dark = this._findDefaultTheme(\"dark\")?.name;\n this.defaultThemes.light = this._findDefaultTheme(\"light\")?.name;\n }\n setResponsive(width, pxRatio, defaultOptions) {\n this.load(defaultOptions);\n const responsiveOptions = this.responsive.find((t) => t.mode === \"screen\" && screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);\n this.load(responsiveOptions?.options);\n return responsiveOptions?.maxWidth;\n }\n setTheme(name) {\n if (name) {\n const chosenTheme = this.themes.find((theme) => theme.name === name);\n if (chosenTheme) {\n this.load(chosenTheme.options);\n }\n }\n else {\n const mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? \"dark\" : \"light\");\n if (defaultTheme) {\n this.load(defaultTheme.options);\n }\n }\n }\n}\n","import { getStyleFromRgb } from \"./ColorUtils.js\";\nconst origin = { x: 0, y: 0 };\nexport function drawLine(context, begin, end) {\n context.beginPath();\n context.moveTo(begin.x, begin.y);\n context.lineTo(end.x, end.y);\n context.closePath();\n}\nexport function paintBase(context, dimension, baseColor) {\n context.fillStyle = baseColor ?? \"rgba(0,0,0,0)\";\n context.fillRect(origin.x, origin.y, dimension.width, dimension.height);\n}\nexport function paintImage(context, dimension, image, opacity) {\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n context.drawImage(image, origin.x, origin.y, dimension.width, dimension.height);\n context.globalAlpha = 1;\n}\nexport function clear(context, dimension) {\n context.clearRect(origin.x, origin.y, dimension.width, dimension.height);\n}\nexport function drawParticle(data) {\n const { container, context, particle, delta, colorStyles, backgroundMask, composite, radius, opacity, shadow, transform, } = data, pos = particle.getPosition(), defaultAngle = 0, angle = particle.rotation + (particle.pathRotation ? particle.velocity.angle : defaultAngle), rotateData = {\n sin: Math.sin(angle),\n cos: Math.cos(angle),\n }, defaultTransformFactor = 1, transformData = {\n a: rotateData.cos * (transform.a ?? defaultTransformFactor),\n b: rotateData.sin * (transform.b ?? defaultTransformFactor),\n c: -rotateData.sin * (transform.c ?? defaultTransformFactor),\n d: rotateData.cos * (transform.d ?? defaultTransformFactor),\n };\n context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, pos.x, pos.y);\n if (backgroundMask) {\n context.globalCompositeOperation = composite;\n }\n const shadowColor = particle.shadowColor;\n if (shadow.enable && shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n context.shadowOffsetX = shadow.offset.x;\n context.shadowOffsetY = shadow.offset.y;\n }\n if (colorStyles.fill) {\n context.fillStyle = colorStyles.fill;\n }\n const minStrokeWidth = 0, strokeWidth = particle.strokeWidth ?? minStrokeWidth;\n context.lineWidth = strokeWidth;\n if (colorStyles.stroke) {\n context.strokeStyle = colorStyles.stroke;\n }\n const drawData = {\n container,\n context,\n particle,\n radius,\n opacity,\n delta,\n transformData,\n strokeWidth,\n };\n drawShape(drawData);\n drawShapeAfterDraw(drawData);\n drawEffect(drawData);\n context.globalCompositeOperation = \"source-over\";\n context.resetTransform();\n}\nexport function drawEffect(data) {\n const { container, context, particle, radius, opacity, delta, transformData } = data;\n if (!particle.effect) {\n return;\n }\n const drawer = container.effectDrawers.get(particle.effect);\n if (!drawer) {\n return;\n }\n drawer.draw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n}\nexport function drawShape(data) {\n const { container, context, particle, radius, opacity, delta, strokeWidth, transformData } = data, minStrokeWidth = 0;\n if (!particle.shape) {\n return;\n }\n const drawer = container.shapeDrawers.get(particle.shape);\n if (!drawer) {\n return;\n }\n context.beginPath();\n drawer.draw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n if (particle.shapeClose) {\n context.closePath();\n }\n if (strokeWidth > minStrokeWidth) {\n context.stroke();\n }\n if (particle.shapeFill) {\n context.fill();\n }\n}\nexport function drawShapeAfterDraw(data) {\n const { container, context, particle, radius, opacity, delta, transformData } = data;\n if (!particle.shape) {\n return;\n }\n const drawer = container.shapeDrawers.get(particle.shape);\n if (!drawer?.afterDraw) {\n return;\n }\n drawer.afterDraw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n}\nexport function drawPlugin(context, plugin, delta) {\n if (!plugin.draw) {\n return;\n }\n plugin.draw(context, delta);\n}\nexport function drawParticlePlugin(context, plugin, particle, delta) {\n if (!plugin.drawParticle) {\n return;\n }\n plugin.drawParticle(context, particle, delta);\n}\nexport function alterHsl(color, type, value) {\n const lFactor = 1;\n return {\n h: color.h,\n s: color.s,\n l: color.l + (type === \"darken\" ? -lFactor : lFactor) * value,\n };\n}\n","import { init } from \"./init.js\";\nimport { isSsr } from \"./Utils/Utils.js\";\nconst tsParticles = init();\nif (!isSsr()) {\n window.tsParticles = tsParticles;\n}\nexport * from \"./exports.js\";\nexport * from \"./export-types.js\";\nexport { tsParticles };\n","import { clear, drawParticle, drawParticlePlugin, drawPlugin, paintBase, paintImage } from \"../Utils/CanvasUtils.js\";\nimport { deepExtend, getLogger, safeMutationObserver } from \"../Utils/Utils.js\";\nimport { getStyleFromHsl, getStyleFromRgb, rangeColorToHsl, rangeColorToRgb } from \"../Utils/ColorUtils.js\";\nimport { generatedAttribute } from \"./Utils/Constants.js\";\nfunction setTransformValue(factor, newFactor, key) {\n const newValue = newFactor[key], defaultValue = 1;\n if (newValue !== undefined) {\n factor[key] = (factor[key] ?? defaultValue) * newValue;\n }\n}\nfunction setStyle(canvas, style, important = false) {\n if (!style) {\n return;\n }\n const element = canvas;\n if (!element) {\n return;\n }\n const elementStyle = element.style;\n if (!elementStyle) {\n return;\n }\n for (const key in style) {\n const value = style[key];\n if (!value) {\n continue;\n }\n elementStyle.setProperty(key, value, important ? \"important\" : \"\");\n }\n}\nexport class Canvas {\n constructor(container) {\n this.container = container;\n this._applyPostDrawUpdaters = (particle) => {\n for (const updater of this._postDrawUpdaters) {\n updater.afterDraw?.(particle);\n }\n };\n this._applyPreDrawUpdaters = (ctx, particle, radius, zOpacity, colorStyles, transform) => {\n for (const updater of this._preDrawUpdaters) {\n if (updater.getColorStyles) {\n const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity);\n if (fill) {\n colorStyles.fill = fill;\n }\n if (stroke) {\n colorStyles.stroke = stroke;\n }\n }\n if (updater.getTransformValues) {\n const updaterTransform = updater.getTransformValues(particle);\n for (const key in updaterTransform) {\n setTransformValue(transform, updaterTransform, key);\n }\n }\n updater.beforeDraw?.(particle);\n }\n };\n this._applyResizePlugins = () => {\n for (const plugin of this._resizePlugins) {\n plugin.resize?.();\n }\n };\n this._getPluginParticleColors = (particle) => {\n let fColor, sColor;\n for (const plugin of this._colorPlugins) {\n if (!fColor && plugin.particleFillColor) {\n fColor = rangeColorToHsl(plugin.particleFillColor(particle));\n }\n if (!sColor && plugin.particleStrokeColor) {\n sColor = rangeColorToHsl(plugin.particleStrokeColor(particle));\n }\n if (fColor && sColor) {\n break;\n }\n }\n return [fColor, sColor];\n };\n this._initCover = async () => {\n const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color;\n if (color) {\n const coverRgb = rangeColorToRgb(color);\n if (coverRgb) {\n const coverColor = {\n ...coverRgb,\n a: cover.opacity,\n };\n this._coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);\n }\n }\n else {\n await new Promise((resolve, reject) => {\n if (!cover.image) {\n return;\n }\n const img = document.createElement(\"img\");\n img.addEventListener(\"load\", () => {\n this._coverImage = {\n image: img,\n opacity: cover.opacity,\n };\n resolve();\n });\n img.addEventListener(\"error\", (evt) => {\n reject(evt.error);\n });\n img.src = cover.image;\n });\n }\n };\n this._initStyle = () => {\n const element = this.element, options = this.container.actualOptions;\n if (!element) {\n return;\n }\n if (this._fullScreen) {\n this._originalStyle = deepExtend({}, element.style);\n this._setFullScreenStyle();\n }\n else {\n this._resetOriginalStyle();\n }\n for (const key in options.style) {\n if (!key || !options.style) {\n continue;\n }\n const value = options.style[key];\n if (!value) {\n continue;\n }\n element.style.setProperty(key, value, \"important\");\n }\n };\n this._initTrail = async () => {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = trail.fill;\n if (!trail.enable) {\n return;\n }\n const factorNumerator = 1, opacity = factorNumerator / trail.length;\n if (trailFill.color) {\n const fillColor = rangeColorToRgb(trailFill.color);\n if (!fillColor) {\n return;\n }\n this._trailFill = {\n color: {\n ...fillColor,\n },\n opacity,\n };\n }\n else {\n await new Promise((resolve, reject) => {\n if (!trailFill.image) {\n return;\n }\n const img = document.createElement(\"img\");\n img.addEventListener(\"load\", () => {\n this._trailFill = {\n image: img,\n opacity,\n };\n resolve();\n });\n img.addEventListener(\"error\", (evt) => {\n reject(evt.error);\n });\n img.src = trailFill.image;\n });\n }\n };\n this._paintBase = (baseColor) => {\n this.draw((ctx) => paintBase(ctx, this.size, baseColor));\n };\n this._paintImage = (image, opacity) => {\n this.draw((ctx) => paintImage(ctx, this.size, image, opacity));\n };\n this._repairStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n this._safeMutationObserver((observer) => observer.disconnect());\n this._initStyle();\n this.initBackground();\n this._safeMutationObserver((observer) => observer.observe(element, { attributes: true }));\n };\n this._resetOriginalStyle = () => {\n const element = this.element, originalStyle = this._originalStyle;\n if (!(element && originalStyle)) {\n return;\n }\n setStyle(element, originalStyle);\n };\n this._safeMutationObserver = (callback) => {\n if (!this._mutationObserver) {\n return;\n }\n callback(this._mutationObserver);\n };\n this._setFullScreenStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n const radix = 10;\n setStyle(element, {\n position: \"fixed\",\n zIndex: this.container.actualOptions.fullScreen.zIndex.toString(radix),\n top: \"0\",\n left: \"0\",\n width: \"100%\",\n height: \"100%\",\n }, true);\n };\n this.size = {\n height: 0,\n width: 0,\n };\n this._context = null;\n this._generated = false;\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n get _fullScreen() {\n return this.container.actualOptions.fullScreen.enable;\n }\n clear() {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = this._trailFill, minimumLength = 0;\n if (options.backgroundMask.enable) {\n this.paint();\n }\n else if (trail.enable && trail.length > minimumLength && trailFill) {\n if (trailFill.color) {\n this._paintBase(getStyleFromRgb(trailFill.color, trailFill.opacity));\n }\n else if (trailFill.image) {\n this._paintImage(trailFill.image, trailFill.opacity);\n }\n }\n else if (options.clear) {\n this.draw((ctx) => {\n clear(ctx, this.size);\n });\n }\n }\n destroy() {\n this.stop();\n if (this._generated) {\n const element = this.element;\n element?.remove();\n }\n else {\n this._resetOriginalStyle();\n }\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n draw(cb) {\n const ctx = this._context;\n if (!ctx) {\n return;\n }\n return cb(ctx);\n }\n drawAsync(cb) {\n const ctx = this._context;\n if (!ctx) {\n return undefined;\n }\n return cb(ctx);\n }\n drawParticle(particle, delta) {\n if (particle.spawning || particle.destroyed) {\n return;\n }\n const radius = particle.getRadius(), minimumSize = 0;\n if (radius <= minimumSize) {\n return;\n }\n const pfColor = particle.getFillColor(), psColor = particle.getStrokeColor() ?? pfColor;\n let [fColor, sColor] = this._getPluginParticleColors(particle);\n if (!fColor) {\n fColor = pfColor;\n }\n if (!sColor) {\n sColor = psColor;\n }\n if (!fColor && !sColor) {\n return;\n }\n this.draw((ctx) => {\n const container = this.container, options = container.actualOptions, zIndexOptions = particle.options.zIndex, zIndexFactorOffset = 1, zIndexFactor = zIndexFactorOffset - particle.zIndexFactor, zOpacityFactor = zIndexFactor ** zIndexOptions.opacityRate, defaultOpacity = 1, opacity = particle.bubble.opacity ?? particle.opacity?.value ?? defaultOpacity, strokeOpacity = particle.strokeOpacity ?? opacity, zOpacity = opacity * zOpacityFactor, zStrokeOpacity = strokeOpacity * zOpacityFactor, transform = {}, colorStyles = {\n fill: fColor ? getStyleFromHsl(fColor, zOpacity) : undefined,\n };\n colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;\n this._applyPreDrawUpdaters(ctx, particle, radius, zOpacity, colorStyles, transform);\n drawParticle({\n container,\n context: ctx,\n particle,\n delta,\n colorStyles,\n backgroundMask: options.backgroundMask.enable,\n composite: options.backgroundMask.composite,\n radius: radius * zIndexFactor ** zIndexOptions.sizeRate,\n opacity: zOpacity,\n shadow: particle.options.shadow,\n transform,\n });\n this._applyPostDrawUpdaters(particle);\n });\n }\n drawParticlePlugin(plugin, particle, delta) {\n this.draw((ctx) => drawParticlePlugin(ctx, plugin, particle, delta));\n }\n drawPlugin(plugin, delta) {\n this.draw((ctx) => drawPlugin(ctx, plugin, delta));\n }\n async init() {\n this._safeMutationObserver((obs) => obs.disconnect());\n this._mutationObserver = safeMutationObserver((records) => {\n for (const record of records) {\n if (record.type === \"attributes\" && record.attributeName === \"style\") {\n this._repairStyle();\n }\n }\n });\n this.resize();\n this._initStyle();\n await this._initCover();\n try {\n await this._initTrail();\n }\n catch (e) {\n getLogger().error(e);\n }\n this.initBackground();\n this._safeMutationObserver((obs) => {\n if (!this.element) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.initUpdaters();\n this.initPlugins();\n this.paint();\n }\n initBackground() {\n const options = this.container.actualOptions, background = options.background, element = this.element;\n if (!element) {\n return;\n }\n const elementStyle = element.style;\n if (!elementStyle) {\n return;\n }\n if (background.color) {\n const color = rangeColorToRgb(background.color);\n elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : \"\";\n }\n else {\n elementStyle.backgroundColor = \"\";\n }\n elementStyle.backgroundImage = background.image || \"\";\n elementStyle.backgroundPosition = background.position || \"\";\n elementStyle.backgroundRepeat = background.repeat || \"\";\n elementStyle.backgroundSize = background.size || \"\";\n }\n initPlugins() {\n this._resizePlugins = [];\n for (const [, plugin] of this.container.plugins) {\n if (plugin.resize) {\n this._resizePlugins.push(plugin);\n }\n if (plugin.particleFillColor ?? plugin.particleStrokeColor) {\n this._colorPlugins.push(plugin);\n }\n }\n }\n initUpdaters() {\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n for (const updater of this.container.particles.updaters) {\n if (updater.afterDraw) {\n this._postDrawUpdaters.push(updater);\n }\n if (updater.getColorStyles ?? updater.getTransformValues ?? updater.beforeDraw) {\n this._preDrawUpdaters.push(updater);\n }\n }\n }\n loadCanvas(canvas) {\n if (this._generated && this.element) {\n this.element.remove();\n }\n this._generated =\n canvas.dataset && generatedAttribute in canvas.dataset\n ? canvas.dataset[generatedAttribute] === \"true\"\n : this._generated;\n this.element = canvas;\n this.element.ariaHidden = \"true\";\n this._originalStyle = deepExtend({}, this.element.style);\n this.size.height = canvas.offsetHeight;\n this.size.width = canvas.offsetWidth;\n this._context = this.element.getContext(\"2d\");\n this._safeMutationObserver((obs) => {\n if (!this.element) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.container.retina.init();\n this.initBackground();\n }\n paint() {\n const options = this.container.actualOptions;\n this.draw((ctx) => {\n if (options.backgroundMask.enable && options.backgroundMask.cover) {\n clear(ctx, this.size);\n if (this._coverImage) {\n this._paintImage(this._coverImage.image, this._coverImage.opacity);\n }\n else if (this._coverColorStyle) {\n this._paintBase(this._coverColorStyle);\n }\n else {\n this._paintBase();\n }\n }\n else {\n this._paintBase();\n }\n });\n }\n resize() {\n if (!this.element) {\n return false;\n }\n const container = this.container, pxRatio = container.retina.pixelRatio, size = container.canvas.size, newSize = {\n width: this.element.offsetWidth * pxRatio,\n height: this.element.offsetHeight * pxRatio,\n };\n if (newSize.height === size.height &&\n newSize.width === size.width &&\n newSize.height === this.element.height &&\n newSize.width === this.element.width) {\n return false;\n }\n const oldSize = { ...size };\n this.element.width = size.width = this.element.offsetWidth * pxRatio;\n this.element.height = size.height = this.element.offsetHeight * pxRatio;\n if (this.container.started) {\n container.particles.setResizeFactor({\n width: size.width / oldSize.width,\n height: size.height / oldSize.height,\n });\n }\n return true;\n }\n stop() {\n this._safeMutationObserver((obs) => obs.disconnect());\n this._mutationObserver = undefined;\n this.draw((ctx) => clear(ctx, this.size));\n }\n async windowResize() {\n if (!this.element || !this.resize()) {\n return;\n }\n const container = this.container, needsRefresh = container.updateActualOptions();\n container.particles.setDensity();\n this._applyResizePlugins();\n if (needsRefresh) {\n await container.refresh();\n }\n }\n}\n","import { executeOnSingleOrMultiple, safeMatchMedia } from \"../../Utils/Utils.js\";\nimport { millisecondsToSeconds, mouseDownEvent, mouseLeaveEvent, mouseMoveEvent, mouseOutEvent, mouseUpEvent, resizeEvent, touchCancelEvent, touchEndEvent, touchMoveEvent, touchStartEvent, visibilityChangeEvent, } from \"./Constants.js\";\nimport { isBoolean } from \"../../Utils/TypeUtils.js\";\nconst double = 2;\nfunction manageListener(element, event, handler, add, options) {\n if (add) {\n let addOptions = { passive: true };\n if (isBoolean(options)) {\n addOptions.capture = options;\n }\n else if (options !== undefined) {\n addOptions = options;\n }\n element.addEventListener(event, handler, addOptions);\n }\n else {\n const removeOptions = options;\n element.removeEventListener(event, handler, removeOptions);\n }\n}\nexport class EventListeners {\n constructor(container) {\n this.container = container;\n this._doMouseTouchClick = (e) => {\n const container = this.container, options = container.actualOptions;\n if (this._canPush) {\n const mouseInteractivity = container.interactivity.mouse, mousePos = mouseInteractivity.position;\n if (!mousePos) {\n return;\n }\n mouseInteractivity.clickPosition = { ...mousePos };\n mouseInteractivity.clickTime = new Date().getTime();\n const onClick = options.interactivity.events.onClick;\n executeOnSingleOrMultiple(onClick.mode, (mode) => this.container.handleClickMode(mode));\n }\n if (e.type === \"touchend\") {\n const touchDelay = 500;\n setTimeout(() => this._mouseTouchFinish(), touchDelay);\n }\n };\n this._handleThemeChange = (e) => {\n const mediaEvent = e, container = this.container, options = container.options, defaultThemes = options.defaultThemes, themeName = mediaEvent.matches ? defaultThemes.dark : defaultThemes.light, theme = options.themes.find((theme) => theme.name === themeName);\n if (theme && theme.default.auto) {\n void container.loadTheme(themeName);\n }\n };\n this._handleVisibilityChange = () => {\n const container = this.container, options = container.actualOptions;\n this._mouseTouchFinish();\n if (!options.pauseOnBlur) {\n return;\n }\n if (document && document.hidden) {\n container.pageHidden = true;\n container.pause();\n }\n else {\n container.pageHidden = false;\n if (container.animationStatus) {\n void container.play(true);\n }\n else {\n void container.draw(true);\n }\n }\n };\n this._handleWindowResize = () => {\n if (this._resizeTimeout) {\n clearTimeout(this._resizeTimeout);\n delete this._resizeTimeout;\n }\n const handleResize = async () => {\n const canvas = this.container.canvas;\n await canvas?.windowResize();\n };\n this._resizeTimeout = setTimeout(() => void handleResize(), this.container.actualOptions.interactivity.events.resize.delay * millisecondsToSeconds);\n };\n this._manageInteractivityListeners = (mouseLeaveTmpEvent, add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n const interactivityEl = container.interactivity.element;\n if (!interactivityEl) {\n return;\n }\n const html = interactivityEl, canvasEl = container.canvas.element;\n if (canvasEl) {\n canvasEl.style.pointerEvents = html === canvasEl ? \"initial\" : \"none\";\n }\n if (!(options.interactivity.events.onHover.enable || options.interactivity.events.onClick.enable)) {\n return;\n }\n manageListener(interactivityEl, mouseMoveEvent, handlers.mouseMove, add);\n manageListener(interactivityEl, touchStartEvent, handlers.touchStart, add);\n manageListener(interactivityEl, touchMoveEvent, handlers.touchMove, add);\n if (!options.interactivity.events.onClick.enable) {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEnd, add);\n }\n else {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEndClick, add);\n manageListener(interactivityEl, mouseUpEvent, handlers.mouseUp, add);\n manageListener(interactivityEl, mouseDownEvent, handlers.mouseDown, add);\n }\n manageListener(interactivityEl, mouseLeaveTmpEvent, handlers.mouseLeave, add);\n manageListener(interactivityEl, touchCancelEvent, handlers.touchCancel, add);\n };\n this._manageListeners = (add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions, detectType = options.interactivity.detectsOn, canvasEl = container.canvas.element;\n let mouseLeaveTmpEvent = mouseLeaveEvent;\n if (detectType === \"window\") {\n container.interactivity.element = window;\n mouseLeaveTmpEvent = mouseOutEvent;\n }\n else if (detectType === \"parent\" && canvasEl) {\n container.interactivity.element = canvasEl.parentElement ?? canvasEl.parentNode;\n }\n else {\n container.interactivity.element = canvasEl;\n }\n this._manageMediaMatch(add);\n this._manageResize(add);\n this._manageInteractivityListeners(mouseLeaveTmpEvent, add);\n if (document) {\n manageListener(document, visibilityChangeEvent, handlers.visibilityChange, add, false);\n }\n };\n this._manageMediaMatch = (add) => {\n const handlers = this._handlers, mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\");\n if (!mediaMatch) {\n return;\n }\n if (mediaMatch.addEventListener !== undefined) {\n manageListener(mediaMatch, \"change\", handlers.themeChange, add);\n return;\n }\n if (mediaMatch.addListener === undefined) {\n return;\n }\n if (add) {\n mediaMatch.addListener(handlers.oldThemeChange);\n }\n else {\n mediaMatch.removeListener(handlers.oldThemeChange);\n }\n };\n this._manageResize = (add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n if (!options.interactivity.events.resize) {\n return;\n }\n if (typeof ResizeObserver === \"undefined\") {\n manageListener(window, resizeEvent, handlers.resize, add);\n return;\n }\n const canvasEl = container.canvas.element;\n if (this._resizeObserver && !add) {\n if (canvasEl) {\n this._resizeObserver.unobserve(canvasEl);\n }\n this._resizeObserver.disconnect();\n delete this._resizeObserver;\n }\n else if (!this._resizeObserver && add && canvasEl) {\n this._resizeObserver = new ResizeObserver((entries) => {\n const entry = entries.find((e) => e.target === canvasEl);\n if (!entry) {\n return;\n }\n this._handleWindowResize();\n });\n this._resizeObserver.observe(canvasEl);\n }\n };\n this._mouseDown = () => {\n const { interactivity } = this.container;\n if (!interactivity) {\n return;\n }\n const { mouse } = interactivity;\n mouse.clicking = true;\n mouse.downPosition = mouse.position;\n };\n this._mouseTouchClick = (e) => {\n const container = this.container, options = container.actualOptions, { mouse } = container.interactivity;\n mouse.inside = true;\n let handled = false;\n const mousePosition = mouse.position;\n if (!mousePosition || !options.interactivity.events.onClick.enable) {\n return;\n }\n for (const [, plugin] of container.plugins) {\n if (!plugin.clickPositionValid) {\n continue;\n }\n handled = plugin.clickPositionValid(mousePosition);\n if (handled) {\n break;\n }\n }\n if (!handled) {\n this._doMouseTouchClick(e);\n }\n mouse.clicking = false;\n };\n this._mouseTouchFinish = () => {\n const interactivity = this.container.interactivity;\n if (!interactivity) {\n return;\n }\n const mouse = interactivity.mouse;\n delete mouse.position;\n delete mouse.clickPosition;\n delete mouse.downPosition;\n interactivity.status = mouseLeaveEvent;\n mouse.inside = false;\n mouse.clicking = false;\n };\n this._mouseTouchMove = (e) => {\n const container = this.container, options = container.actualOptions, interactivity = container.interactivity, canvasEl = container.canvas.element;\n if (!interactivity?.element) {\n return;\n }\n interactivity.mouse.inside = true;\n let pos;\n if (e.type.startsWith(\"pointer\")) {\n this._canPush = true;\n const mouseEvent = e;\n if (interactivity.element === window) {\n if (canvasEl) {\n const clientRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.clientX - clientRect.left,\n y: mouseEvent.clientY - clientRect.top,\n };\n }\n }\n else if (options.interactivity.detectsOn === \"parent\") {\n const source = mouseEvent.target, target = mouseEvent.currentTarget;\n if (source && target && canvasEl) {\n const sourceRect = source.getBoundingClientRect(), targetRect = target.getBoundingClientRect(), canvasRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.offsetX + double * sourceRect.left - (targetRect.left + canvasRect.left),\n y: mouseEvent.offsetY + double * sourceRect.top - (targetRect.top + canvasRect.top),\n };\n }\n else {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else if (mouseEvent.target === canvasEl) {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else {\n this._canPush = e.type !== \"touchmove\";\n if (canvasEl) {\n const touchEvent = e, lengthOffset = 1, lastTouch = touchEvent.touches[touchEvent.touches.length - lengthOffset], canvasRect = canvasEl.getBoundingClientRect(), defaultCoordinate = 0;\n pos = {\n x: lastTouch.clientX - (canvasRect.left ?? defaultCoordinate),\n y: lastTouch.clientY - (canvasRect.top ?? defaultCoordinate),\n };\n }\n }\n const pxRatio = container.retina.pixelRatio;\n if (pos) {\n pos.x *= pxRatio;\n pos.y *= pxRatio;\n }\n interactivity.mouse.position = pos;\n interactivity.status = mouseMoveEvent;\n };\n this._touchEnd = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchFinish();\n };\n this._touchEndClick = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchClick(e);\n };\n this._touchStart = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.set(touch.identifier, performance.now());\n }\n this._mouseTouchMove(e);\n };\n this._canPush = true;\n this._touches = new Map();\n this._handlers = {\n mouseDown: () => this._mouseDown(),\n mouseLeave: () => this._mouseTouchFinish(),\n mouseMove: (e) => this._mouseTouchMove(e),\n mouseUp: (e) => this._mouseTouchClick(e),\n touchStart: (e) => this._touchStart(e),\n touchMove: (e) => this._mouseTouchMove(e),\n touchEnd: (e) => this._touchEnd(e),\n touchCancel: (e) => this._touchEnd(e),\n touchEndClick: (e) => this._touchEndClick(e),\n visibilityChange: () => this._handleVisibilityChange(),\n themeChange: (e) => this._handleThemeChange(e),\n oldThemeChange: (e) => this._handleThemeChange(e),\n resize: () => {\n this._handleWindowResize();\n },\n };\n }\n addListeners() {\n this._manageListeners(true);\n }\n removeListeners() {\n this._manageListeners(false);\n }\n}\n","export class InteractionManager {\n constructor(engine, container) {\n this.container = container;\n this._engine = engine;\n this._interactors = [];\n this._externalInteractors = [];\n this._particleInteractors = [];\n }\n externalInteract(delta) {\n for (const interactor of this._externalInteractors) {\n if (interactor.isEnabled()) {\n interactor.interact(delta);\n }\n }\n }\n handleClickMode(mode) {\n for (const interactor of this._externalInteractors) {\n interactor.handleClickMode?.(mode);\n }\n }\n async init() {\n this._interactors = await this._engine.getInteractors(this.container, true);\n this._externalInteractors = [];\n this._particleInteractors = [];\n for (const interactor of this._interactors) {\n switch (interactor.type) {\n case \"external\":\n this._externalInteractors.push(interactor);\n break;\n case \"particles\":\n this._particleInteractors.push(interactor);\n break;\n }\n interactor.init();\n }\n }\n particlesInteract(particle, delta) {\n for (const interactor of this._externalInteractors) {\n interactor.clear(particle, delta);\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle)) {\n interactor.interact(particle, delta);\n }\n }\n }\n reset(particle) {\n for (const interactor of this._externalInteractors) {\n if (interactor.isEnabled()) {\n interactor.reset(particle);\n }\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle)) {\n interactor.reset(particle);\n }\n }\n }\n}\n","import { Vector, Vector3d } from \"./Utils/Vectors.js\";\nimport { calcExactPositionOrRandomFromSize, clamp, degToRad, getDistance, getParticleBaseVelocity, getParticleDirectionAngle, getRandom, getRangeValue, randomInRange, setRangeValue, } from \"../Utils/NumberUtils.js\";\nimport { deepExtend, getPosition, initParticleNumericAnimationValue, isInArray, itemFromSingleOrMultiple, } from \"../Utils/Utils.js\";\nimport { errorPrefix, millisecondsToSeconds } from \"./Utils/Constants.js\";\nimport { getHslFromAnimation, rangeColorToRgb } from \"../Utils/ColorUtils.js\";\nimport { Interactivity } from \"../Options/Classes/Interactivity/Interactivity.js\";\nimport { alterHsl } from \"../Utils/CanvasUtils.js\";\nimport { loadParticlesOptions } from \"../Utils/OptionsUtils.js\";\nconst defaultRetryCount = 0, double = 2, half = 0.5, squareExp = 2;\nfunction loadEffectData(effect, effectOptions, id, reduceDuplicates) {\n const effectData = effectOptions.options[effect];\n if (!effectData) {\n return;\n }\n return deepExtend({\n close: effectOptions.close,\n fill: effectOptions.fill,\n }, itemFromSingleOrMultiple(effectData, id, reduceDuplicates));\n}\nfunction loadShapeData(shape, shapeOptions, id, reduceDuplicates) {\n const shapeData = shapeOptions.options[shape];\n if (!shapeData) {\n return;\n }\n return deepExtend({\n close: shapeOptions.close,\n fill: shapeOptions.fill,\n }, itemFromSingleOrMultiple(shapeData, id, reduceDuplicates));\n}\nfunction fixOutMode(data) {\n if (!isInArray(data.outMode, data.checkModes)) {\n return;\n }\n const diameter = data.radius * double;\n if (data.coord > data.maxCoord - diameter) {\n data.setCb(-data.radius);\n }\n else if (data.coord < diameter) {\n data.setCb(data.radius);\n }\n}\nexport class Particle {\n constructor(engine, container) {\n this.container = container;\n this._calcPosition = (container, position, zIndex, tryCount = defaultRetryCount) => {\n for (const [, plugin] of container.plugins) {\n const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;\n if (pluginPos) {\n return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);\n }\n }\n const canvasSize = container.canvas.size, exactPosition = calcExactPositionOrRandomFromSize({\n size: canvasSize,\n position: position,\n }), pos = Vector3d.create(exactPosition.x, exactPosition.y, zIndex), radius = this.getRadius(), outModes = this.options.move.outModes, fixHorizontal = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [\"bounce\"],\n coord: pos.x,\n maxCoord: container.canvas.size.width,\n setCb: (value) => (pos.x += value),\n radius,\n });\n }, fixVertical = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [\"bounce\"],\n coord: pos.y,\n maxCoord: container.canvas.size.height,\n setCb: (value) => (pos.y += value),\n radius,\n });\n };\n fixHorizontal(outModes.left ?? outModes.default);\n fixHorizontal(outModes.right ?? outModes.default);\n fixVertical(outModes.top ?? outModes.default);\n fixVertical(outModes.bottom ?? outModes.default);\n if (this._checkOverlap(pos, tryCount)) {\n const increment = 1;\n return this._calcPosition(container, undefined, zIndex, tryCount + increment);\n }\n return pos;\n };\n this._calculateVelocity = () => {\n const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move;\n if (moveOptions.direction === \"inside\" || moveOptions.direction === \"outside\") {\n return res;\n }\n const rad = degToRad(getRangeValue(moveOptions.angle.value)), radOffset = degToRad(getRangeValue(moveOptions.angle.offset)), range = {\n left: radOffset - rad * half,\n right: radOffset + rad * half,\n };\n if (!moveOptions.straight) {\n res.angle += randomInRange(setRangeValue(range.left, range.right));\n }\n if (moveOptions.random && typeof moveOptions.speed === \"number\") {\n res.length *= getRandom();\n }\n return res;\n };\n this._checkOverlap = (pos, tryCount = defaultRetryCount) => {\n const collisionsOptions = this.options.collisions, radius = this.getRadius();\n if (!collisionsOptions.enable) {\n return false;\n }\n const overlapOptions = collisionsOptions.overlap;\n if (overlapOptions.enable) {\n return false;\n }\n const retries = overlapOptions.retries, minRetries = 0;\n if (retries >= minRetries && tryCount > retries) {\n throw new Error(`${errorPrefix} particle is overlapping and can't be placed`);\n }\n return !!this.container.particles.find((particle) => getDistance(pos, particle.position) < radius + particle.getRadius());\n };\n this._getRollColor = (color) => {\n if (!color || !this.roll || (!this.backColor && !this.roll.alter)) {\n return color;\n }\n const rollFactor = 1, none = 0, backFactor = this.roll.horizontal && this.roll.vertical ? double * rollFactor : rollFactor, backSum = this.roll.horizontal ? Math.PI * half : none, rolled = Math.floor(((this.roll.angle ?? none) + backSum) / (Math.PI / backFactor)) % double;\n if (!rolled) {\n return color;\n }\n if (this.backColor) {\n return this.backColor;\n }\n if (this.roll.alter) {\n return alterHsl(color, this.roll.alter.type, this.roll.alter.value);\n }\n return color;\n };\n this._initPosition = (position) => {\n const container = this.container, zIndexValue = getRangeValue(this.options.zIndex.value), minZ = 0;\n this.position = this._calcPosition(container, position, clamp(zIndexValue, minZ, container.zLayers));\n this.initialPosition = this.position.copy();\n const canvasSize = container.canvas.size, defaultRadius = 0;\n this.moveCenter = {\n ...getPosition(this.options.move.center, canvasSize),\n radius: this.options.move.center.radius ?? defaultRadius,\n mode: this.options.move.center.mode ?? \"percent\",\n };\n this.direction = getParticleDirectionAngle(this.options.move.direction, this.position, this.moveCenter);\n switch (this.options.move.direction) {\n case \"inside\":\n this.outType = \"inside\";\n break;\n case \"outside\":\n this.outType = \"outside\";\n break;\n }\n this.offset = Vector.origin;\n };\n this._engine = engine;\n }\n destroy(override) {\n if (this.unbreakable || this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.bubble.inRange = false;\n this.slow.inRange = false;\n const container = this.container, pathGenerator = this.pathGenerator, shapeDrawer = container.shapeDrawers.get(this.shape);\n shapeDrawer?.particleDestroy?.(this);\n for (const [, plugin] of container.plugins) {\n plugin.particleDestroyed?.(this, override);\n }\n for (const updater of container.particles.updaters) {\n updater.particleDestroyed?.(this, override);\n }\n pathGenerator?.reset(this);\n this._engine.dispatchEvent(\"particleDestroyed\", {\n container: this.container,\n data: {\n particle: this,\n },\n });\n }\n draw(delta) {\n const container = this.container, canvas = container.canvas;\n for (const [, plugin] of container.plugins) {\n canvas.drawParticlePlugin(plugin, this, delta);\n }\n canvas.drawParticle(this, delta);\n }\n getFillColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.color));\n }\n getMass() {\n return this.getRadius() ** squareExp * Math.PI * half;\n }\n getPosition() {\n return {\n x: this.position.x + this.offset.x,\n y: this.position.y + this.offset.y,\n z: this.position.z,\n };\n }\n getRadius() {\n return this.bubble.radius ?? this.size.value;\n }\n getStrokeColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.strokeColor));\n }\n init(id, position, overrideOptions, group) {\n const container = this.container, engine = this._engine;\n this.id = id;\n this.group = group;\n this.effectClose = true;\n this.effectFill = true;\n this.shapeClose = true;\n this.shapeFill = true;\n this.pathRotation = false;\n this.lastPathTime = 0;\n this.destroyed = false;\n this.unbreakable = false;\n this.rotation = 0;\n this.misplaced = false;\n this.retina = {\n maxDistance: {},\n };\n this.outType = \"normal\";\n this.ignoresResizeRatio = true;\n const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), effectType = particlesOptions.effect.type, shapeType = particlesOptions.shape.type, { reduceDuplicates } = particlesOptions;\n this.effect = itemFromSingleOrMultiple(effectType, this.id, reduceDuplicates);\n this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);\n const effectOptions = particlesOptions.effect, shapeOptions = particlesOptions.shape;\n if (overrideOptions) {\n if (overrideOptions.effect?.type) {\n const overrideEffectType = overrideOptions.effect.type, effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);\n if (effect) {\n this.effect = effect;\n effectOptions.load(overrideOptions.effect);\n }\n }\n if (overrideOptions.shape?.type) {\n const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);\n if (shape) {\n this.shape = shape;\n shapeOptions.load(overrideOptions.shape);\n }\n }\n }\n this.effectData = loadEffectData(this.effect, effectOptions, this.id, reduceDuplicates);\n this.shapeData = loadShapeData(this.shape, shapeOptions, this.id, reduceDuplicates);\n particlesOptions.load(overrideOptions);\n const effectData = this.effectData;\n if (effectData) {\n particlesOptions.load(effectData.particles);\n }\n const shapeData = this.shapeData;\n if (shapeData) {\n particlesOptions.load(shapeData.particles);\n }\n const interactivity = new Interactivity(engine, container);\n interactivity.load(container.actualOptions.interactivity);\n interactivity.load(particlesOptions.interactivity);\n this.interactivity = interactivity;\n this.effectFill = effectData?.fill ?? particlesOptions.effect.fill;\n this.effectClose = effectData?.close ?? particlesOptions.effect.close;\n this.shapeFill = shapeData?.fill ?? particlesOptions.shape.fill;\n this.shapeClose = shapeData?.close ?? particlesOptions.shape.close;\n this.options = particlesOptions;\n const pathOptions = this.options.move.path;\n this.pathDelay = getRangeValue(pathOptions.delay.value) * millisecondsToSeconds;\n if (pathOptions.generator) {\n this.pathGenerator = this._engine.getPathGenerator(pathOptions.generator);\n if (this.pathGenerator && container.addPath(pathOptions.generator, this.pathGenerator)) {\n this.pathGenerator.init(container);\n }\n }\n container.retina.initParticle(this);\n this.size = initParticleNumericAnimationValue(this.options.size, pxRatio);\n this.bubble = {\n inRange: false,\n };\n this.slow = {\n inRange: false,\n factor: 1,\n };\n this._initPosition(position);\n this.initialVelocity = this._calculateVelocity();\n this.velocity = this.initialVelocity.copy();\n const decayOffset = 1;\n this.moveDecay = decayOffset - getRangeValue(this.options.move.decay);\n const particles = container.particles;\n particles.setLastZIndex(this.position.z);\n this.zIndexFactor = this.position.z / container.zLayers;\n this.sides = 24;\n let effectDrawer = container.effectDrawers.get(this.effect);\n if (!effectDrawer) {\n effectDrawer = this._engine.getEffectDrawer(this.effect);\n if (effectDrawer) {\n container.effectDrawers.set(this.effect, effectDrawer);\n }\n }\n if (effectDrawer?.loadEffect) {\n effectDrawer.loadEffect(this);\n }\n let shapeDrawer = container.shapeDrawers.get(this.shape);\n if (!shapeDrawer) {\n shapeDrawer = this._engine.getShapeDrawer(this.shape);\n if (shapeDrawer) {\n container.shapeDrawers.set(this.shape, shapeDrawer);\n }\n }\n if (shapeDrawer?.loadShape) {\n shapeDrawer.loadShape(this);\n }\n const sideCountFunc = shapeDrawer?.getSidesCount;\n if (sideCountFunc) {\n this.sides = sideCountFunc(this);\n }\n this.spawning = false;\n this.shadowColor = rangeColorToRgb(this.options.shadow.color);\n for (const updater of particles.updaters) {\n updater.init(this);\n }\n for (const mover of particles.movers) {\n mover.init?.(this);\n }\n effectDrawer?.particleInit?.(container, this);\n shapeDrawer?.particleInit?.(container, this);\n for (const [, plugin] of container.plugins) {\n plugin.particleCreated?.(this);\n }\n }\n isInsideCanvas() {\n const radius = this.getRadius(), canvasSize = this.container.canvas.size, position = this.position;\n return (position.x >= -radius &&\n position.y >= -radius &&\n position.y <= canvasSize.height + radius &&\n position.x <= canvasSize.width + radius);\n }\n isVisible() {\n return !this.destroyed && !this.spawning && this.isInsideCanvas();\n }\n reset() {\n for (const updater of this.container.particles.updaters) {\n updater.reset?.(this);\n }\n }\n}\n","import { Circle, Rectangle } from \"./Ranges.js\";\nimport { getDistance } from \"../../Utils/NumberUtils.js\";\nconst half = 0.5, double = 2, subdivideCount = 4;\nexport class QuadTree {\n constructor(rectangle, capacity) {\n this.rectangle = rectangle;\n this.capacity = capacity;\n this._subdivide = () => {\n const { x, y } = this.rectangle.position, { width, height } = this.rectangle.size, { capacity } = this;\n for (let i = 0; i < subdivideCount; i++) {\n const fixedIndex = i % double;\n this._subs.push(new QuadTree(new Rectangle(x + width * half * fixedIndex, y + height * half * (Math.round(i * half) - fixedIndex), width * half, height * half), capacity));\n }\n this._divided = true;\n };\n this._points = [];\n this._divided = false;\n this._subs = [];\n }\n insert(point) {\n if (!this.rectangle.contains(point.position)) {\n return false;\n }\n if (this._points.length < this.capacity) {\n this._points.push(point);\n return true;\n }\n if (!this._divided) {\n this._subdivide();\n }\n return this._subs.some((sub) => sub.insert(point));\n }\n query(range, check) {\n const res = [];\n if (!range.intersects(this.rectangle)) {\n return [];\n }\n for (const p of this._points) {\n if (!range.contains(p.position) &&\n getDistance(range.position, p.position) > p.particle.getRadius() &&\n (!check || check(p.particle))) {\n continue;\n }\n res.push(p.particle);\n }\n if (this._divided) {\n for (const sub of this._subs) {\n res.push(...sub.query(range, check));\n }\n }\n return res;\n }\n queryCircle(position, radius, check) {\n return this.query(new Circle(position.x, position.y, radius), check);\n }\n queryRectangle(position, size, check) {\n return this.query(new Rectangle(position.x, position.y, size.width, size.height), check);\n }\n}\n","import { getLogger, getPosition } from \"../Utils/Utils.js\";\nimport { InteractionManager } from \"./Utils/InteractionManager.js\";\nimport { Particle } from \"./Particle.js\";\nimport { Point } from \"./Utils/Point.js\";\nimport { QuadTree } from \"./Utils/QuadTree.js\";\nimport { Rectangle } from \"./Utils/Ranges.js\";\nimport { errorPrefix } from \"./Utils/Constants.js\";\nconst qTreeCapacity = 4, squareExp = 2, defaultRemoveQuantity = 1;\nconst qTreeRectangle = (canvasSize) => {\n const { height, width } = canvasSize, posOffset = -0.25, sizeFactor = 1.5;\n return new Rectangle(posOffset * width, posOffset * height, sizeFactor * width, sizeFactor * height);\n};\nexport class Particles {\n constructor(engine, container) {\n this._addToPool = (...particles) => {\n for (const particle of particles) {\n this._pool.push(particle);\n }\n };\n this._applyDensity = (options, manualCount, group) => {\n const numberOptions = options.number;\n if (!options.number.density?.enable) {\n if (group === undefined) {\n this._limit = numberOptions.limit.value;\n }\n else if (numberOptions.limit) {\n this._groupLimits.set(group, numberOptions.limit.value);\n }\n return;\n }\n const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, minLimit = 0, optParticlesLimit = numberOptions.limit.value > minLimit ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter((t) => t.group === group).length);\n if (group === undefined) {\n this._limit = numberOptions.limit.value * densityFactor;\n }\n else {\n this._groupLimits.set(group, numberOptions.limit.value * densityFactor);\n }\n if (particlesCount < particlesNumber) {\n this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);\n }\n else if (particlesCount > particlesNumber) {\n this.removeQuantity(particlesCount - particlesNumber, group);\n }\n };\n this._initDensityFactor = (densityOptions) => {\n const container = this._container, defaultFactor = 1;\n if (!container.canvas.element || !densityOptions.enable) {\n return defaultFactor;\n }\n const canvas = container.canvas.element, pxRatio = container.retina.pixelRatio;\n return (canvas.width * canvas.height) / (densityOptions.height * densityOptions.width * pxRatio ** squareExp);\n };\n this._pushParticle = (position, overrideOptions, group, initializer) => {\n try {\n let particle = this._pool.pop();\n if (!particle) {\n particle = new Particle(this._engine, this._container);\n }\n particle.init(this._nextId, position, overrideOptions, group);\n let canAdd = true;\n if (initializer) {\n canAdd = initializer(particle);\n }\n if (!canAdd) {\n return;\n }\n this._array.push(particle);\n this._zArray.push(particle);\n this._nextId++;\n this._engine.dispatchEvent(\"particleAdded\", {\n container: this._container,\n data: {\n particle,\n },\n });\n return particle;\n }\n catch (e) {\n getLogger().warning(`${errorPrefix} adding particle: ${e}`);\n }\n };\n this._removeParticle = (index, group, override) => {\n const particle = this._array[index];\n if (!particle || particle.group !== group) {\n return false;\n }\n const zIdx = this._zArray.indexOf(particle), deleteCount = 1;\n this._array.splice(index, deleteCount);\n this._zArray.splice(zIdx, deleteCount);\n particle.destroy(override);\n this._engine.dispatchEvent(\"particleRemoved\", {\n container: this._container,\n data: {\n particle,\n },\n });\n this._addToPool(particle);\n return true;\n };\n this._engine = engine;\n this._container = container;\n this._nextId = 0;\n this._array = [];\n this._zArray = [];\n this._pool = [];\n this._limit = 0;\n this._groupLimits = new Map();\n this._needsSort = false;\n this._lastZIndex = 0;\n this._interactionManager = new InteractionManager(engine, container);\n this._pluginsInitialized = false;\n const canvasSize = container.canvas.size;\n this.quadTree = new QuadTree(qTreeRectangle(canvasSize), qTreeCapacity);\n this.movers = [];\n this.updaters = [];\n }\n get count() {\n return this._array.length;\n }\n addManualParticles() {\n const container = this._container, options = container.actualOptions;\n for (const particle of options.manualParticles) {\n this.addParticle(particle.position ? getPosition(particle.position, container.canvas.size) : undefined, particle.options);\n }\n }\n addParticle(position, overrideOptions, group, initializer) {\n const limitOptions = this._container.actualOptions.particles.number.limit, limit = group === undefined ? this._limit : this._groupLimits.get(group) ?? this._limit, currentCount = this.count, minLimit = 0;\n if (limit > minLimit) {\n if (limitOptions.mode === \"delete\") {\n const countOffset = 1, minCount = 0, countToRemove = currentCount + countOffset - limit;\n if (countToRemove > minCount) {\n this.removeQuantity(countToRemove);\n }\n }\n else if (limitOptions.mode === \"wait\") {\n if (currentCount >= limit) {\n return;\n }\n }\n }\n return this._pushParticle(position, overrideOptions, group, initializer);\n }\n clear() {\n this._array = [];\n this._zArray = [];\n this._pluginsInitialized = false;\n }\n destroy() {\n this._array = [];\n this._zArray = [];\n this.movers = [];\n this.updaters = [];\n }\n draw(delta) {\n const container = this._container, canvas = container.canvas;\n canvas.clear();\n this.update(delta);\n for (const [, plugin] of container.plugins) {\n canvas.drawPlugin(plugin, delta);\n }\n for (const p of this._zArray) {\n p.draw(delta);\n }\n }\n filter(condition) {\n return this._array.filter(condition);\n }\n find(condition) {\n return this._array.find(condition);\n }\n get(index) {\n return this._array[index];\n }\n handleClickMode(mode) {\n this._interactionManager.handleClickMode(mode);\n }\n async init() {\n const container = this._container, options = container.actualOptions;\n this._lastZIndex = 0;\n this._needsSort = false;\n await this.initPlugins();\n let handled = false;\n for (const [, plugin] of container.plugins) {\n if (plugin.particlesInitialization !== undefined) {\n handled = plugin.particlesInitialization();\n }\n if (handled) {\n break;\n }\n }\n this.addManualParticles();\n if (!handled) {\n const particlesOptions = options.particles, groups = particlesOptions.groups;\n for (const group in groups) {\n const groupOptions = groups[group];\n for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {\n this.addParticle(undefined, groupOptions, group);\n }\n }\n for (let i = this.count; i < particlesOptions.number.value; i++) {\n this.addParticle();\n }\n }\n }\n async initPlugins() {\n if (this._pluginsInitialized) {\n return;\n }\n const container = this._container;\n this.movers = await this._engine.getMovers(container, true);\n this.updaters = await this._engine.getUpdaters(container, true);\n await this._interactionManager.init();\n for (const [, pathGenerator] of container.pathGenerators) {\n pathGenerator.init(container);\n }\n }\n push(nb, mouse, overrideOptions, group) {\n for (let i = 0; i < nb; i++) {\n this.addParticle(mouse?.position, overrideOptions, group);\n }\n }\n async redraw() {\n this.clear();\n await this.init();\n this.draw({ value: 0, factor: 0 });\n }\n remove(particle, group, override) {\n this.removeAt(this._array.indexOf(particle), undefined, group, override);\n }\n removeAt(index, quantity = defaultRemoveQuantity, group, override) {\n const minIndex = 0;\n if (index < minIndex || index > this.count) {\n return;\n }\n let deleted = 0;\n for (let i = index; deleted < quantity && i < this.count; i++) {\n if (this._removeParticle(i--, group, override)) {\n deleted++;\n }\n }\n }\n removeQuantity(quantity, group) {\n const defaultIndex = 0;\n this.removeAt(defaultIndex, quantity, group);\n }\n setDensity() {\n const options = this._container.actualOptions, groups = options.particles.groups, manualCount = 0;\n for (const group in groups) {\n this._applyDensity(groups[group], manualCount, group);\n }\n this._applyDensity(options.particles, options.manualParticles.length);\n }\n setLastZIndex(zIndex) {\n this._lastZIndex = zIndex;\n this._needsSort = this._needsSort || this._lastZIndex < zIndex;\n }\n setResizeFactor(factor) {\n this._resizeFactor = factor;\n }\n update(delta) {\n const container = this._container, particlesToDelete = new Set();\n this.quadTree = new QuadTree(qTreeRectangle(container.canvas.size), qTreeCapacity);\n for (const [, pathGenerator] of container.pathGenerators) {\n pathGenerator.update();\n }\n for (const [, plugin] of container.plugins) {\n plugin.update?.(delta);\n }\n const resizeFactor = this._resizeFactor;\n for (const particle of this._array) {\n if (resizeFactor && !particle.ignoresResizeRatio) {\n particle.position.x *= resizeFactor.width;\n particle.position.y *= resizeFactor.height;\n particle.initialPosition.x *= resizeFactor.width;\n particle.initialPosition.y *= resizeFactor.height;\n }\n particle.ignoresResizeRatio = false;\n this._interactionManager.reset(particle);\n for (const [, plugin] of this._container.plugins) {\n if (particle.destroyed) {\n break;\n }\n plugin.particleUpdate?.(particle, delta);\n }\n for (const mover of this.movers) {\n if (mover.isEnabled(particle)) {\n mover.move(particle, delta);\n }\n }\n if (particle.destroyed) {\n particlesToDelete.add(particle);\n continue;\n }\n this.quadTree.insert(new Point(particle.getPosition(), particle));\n }\n if (particlesToDelete.size) {\n const checkDelete = (p) => !particlesToDelete.has(p);\n this._array = this.filter(checkDelete);\n this._zArray = this._zArray.filter(checkDelete);\n for (const particle of particlesToDelete) {\n this._engine.dispatchEvent(\"particleRemoved\", {\n container: this._container,\n data: {\n particle,\n },\n });\n }\n this._addToPool(...particlesToDelete);\n }\n this._interactionManager.externalInteract(delta);\n for (const particle of this._array) {\n for (const updater of this.updaters) {\n updater.update(particle, delta);\n }\n if (!particle.destroyed && !particle.spawning) {\n this._interactionManager.particlesInteract(particle, delta);\n }\n }\n delete this._resizeFactor;\n if (this._needsSort) {\n const zArray = this._zArray;\n zArray.sort((a, b) => b.position.z - a.position.z || a.id - b.id);\n const lengthOffset = 1;\n this._lastZIndex = zArray[zArray.length - lengthOffset].position.z;\n this._needsSort = false;\n }\n }\n}\n","import { getRangeValue } from \"../Utils/NumberUtils.js\";\nimport { isSsr } from \"../Utils/Utils.js\";\nconst defaultRatio = 1, defaultReduceFactor = 1;\nexport class Retina {\n constructor(container) {\n this.container = container;\n this.pixelRatio = defaultRatio;\n this.reduceFactor = defaultReduceFactor;\n }\n init() {\n const container = this.container, options = container.actualOptions;\n this.pixelRatio = !options.detectRetina || isSsr() ? defaultRatio : window.devicePixelRatio;\n this.reduceFactor = defaultReduceFactor;\n const ratio = this.pixelRatio, canvas = container.canvas;\n if (canvas.element) {\n const element = canvas.element;\n canvas.size.width = element.offsetWidth * ratio;\n canvas.size.height = element.offsetHeight * ratio;\n }\n const particles = options.particles, moveOptions = particles.move;\n this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;\n }\n initParticle(particle) {\n const options = particle.options, ratio = this.pixelRatio, moveOptions = options.move, moveDistance = moveOptions.distance, props = particle.retina;\n props.moveDrift = getRangeValue(moveOptions.drift) * ratio;\n props.moveSpeed = getRangeValue(moveOptions.speed) * ratio;\n props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;\n const maxDistance = props.maxDistance;\n maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;\n maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;\n props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n }\n}\n","import { errorPrefix, millisecondsToSeconds } from \"./Utils/Constants.js\";\nimport { getLogger, safeIntersectionObserver } from \"../Utils/Utils.js\";\nimport { Canvas } from \"./Canvas.js\";\nimport { EventListeners } from \"./Utils/EventListeners.js\";\nimport { Options } from \"../Options/Classes/Options.js\";\nimport { Particles } from \"./Particles.js\";\nimport { Retina } from \"./Retina.js\";\nimport { getRangeValue } from \"../Utils/NumberUtils.js\";\nimport { loadOptions } from \"../Utils/OptionsUtils.js\";\nfunction guardCheck(container) {\n return container && !container.destroyed;\n}\nconst defaultFps = 60;\nfunction initDelta(value, fpsLimit = defaultFps, smooth = false) {\n return {\n value,\n factor: smooth ? defaultFps / fpsLimit : (defaultFps * value) / millisecondsToSeconds,\n };\n}\nfunction loadContainerOptions(engine, container, ...sourceOptionsArr) {\n const options = new Options(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\nexport class Container {\n constructor(engine, id, sourceOptions) {\n this._intersectionManager = (entries) => {\n if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {\n return;\n }\n for (const entry of entries) {\n if (entry.target !== this.interactivity.element) {\n continue;\n }\n if (entry.isIntersecting) {\n void this.play();\n }\n else {\n this.pause();\n }\n }\n };\n this._nextFrame = (timestamp) => {\n try {\n if (!this._smooth &&\n this._lastFrameTime !== undefined &&\n timestamp < this._lastFrameTime + millisecondsToSeconds / this.fpsLimit) {\n this.draw(false);\n return;\n }\n this._lastFrameTime ??= timestamp;\n const delta = initDelta(timestamp - this._lastFrameTime, this.fpsLimit, this._smooth);\n this.addLifeTime(delta.value);\n this._lastFrameTime = timestamp;\n if (delta.value > millisecondsToSeconds) {\n this.draw(false);\n return;\n }\n this.particles.draw(delta);\n if (!this.alive()) {\n this.destroy();\n return;\n }\n if (this.animationStatus) {\n this.draw(false);\n }\n }\n catch (e) {\n getLogger().error(`${errorPrefix} in animation loop`, e);\n }\n };\n this._engine = engine;\n this.id = Symbol(id);\n this.fpsLimit = 120;\n this._smooth = false;\n this._delay = 0;\n this._duration = 0;\n this._lifeTime = 0;\n this._firstStart = true;\n this.started = false;\n this.destroyed = false;\n this._paused = true;\n this._lastFrameTime = 0;\n this.zLayers = 100;\n this.pageHidden = false;\n this._sourceOptions = sourceOptions;\n this._initialSourceOptions = sourceOptions;\n this.retina = new Retina(this);\n this.canvas = new Canvas(this);\n this.particles = new Particles(this._engine, this);\n this.pathGenerators = new Map();\n this.interactivity = {\n mouse: {\n clicking: false,\n inside: false,\n },\n };\n this.plugins = new Map();\n this.effectDrawers = new Map();\n this.shapeDrawers = new Map();\n this._options = loadContainerOptions(this._engine, this);\n this.actualOptions = loadContainerOptions(this._engine, this);\n this._eventListeners = new EventListeners(this);\n this._intersectionObserver = safeIntersectionObserver((entries) => this._intersectionManager(entries));\n this._engine.dispatchEvent(\"containerBuilt\", { container: this });\n }\n get animationStatus() {\n return !this._paused && !this.pageHidden && guardCheck(this);\n }\n get options() {\n return this._options;\n }\n get sourceOptions() {\n return this._sourceOptions;\n }\n addClickHandler(callback) {\n if (!guardCheck(this)) {\n return;\n }\n const el = this.interactivity.element;\n if (!el) {\n return;\n }\n const clickOrTouchHandler = (e, pos, radius) => {\n if (!guardCheck(this)) {\n return;\n }\n const pxRatio = this.retina.pixelRatio, posRetina = {\n x: pos.x * pxRatio,\n y: pos.y * pxRatio,\n }, particles = this.particles.quadTree.queryCircle(posRetina, radius * pxRatio);\n callback(e, particles);\n };\n const clickHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n const mouseEvent = e, pos = {\n x: mouseEvent.offsetX || mouseEvent.clientX,\n y: mouseEvent.offsetY || mouseEvent.clientY,\n }, radius = 1;\n clickOrTouchHandler(e, pos, radius);\n };\n const touchStartHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = true;\n touchMoved = false;\n };\n const touchMoveHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touchMoved = true;\n };\n const touchEndHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n if (touched && !touchMoved) {\n const touchEvent = e;\n const lengthOffset = 1;\n let lastTouch = touchEvent.touches[touchEvent.touches.length - lengthOffset];\n if (!lastTouch) {\n lastTouch = touchEvent.changedTouches[touchEvent.changedTouches.length - lengthOffset];\n if (!lastTouch) {\n return;\n }\n }\n const element = this.canvas.element, canvasRect = element ? element.getBoundingClientRect() : undefined, minCoordinate = 0, pos = {\n x: lastTouch.clientX - (canvasRect ? canvasRect.left : minCoordinate),\n y: lastTouch.clientY - (canvasRect ? canvasRect.top : minCoordinate),\n };\n clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));\n }\n touched = false;\n touchMoved = false;\n };\n const touchCancelHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = false;\n touchMoved = false;\n };\n let touched = false, touchMoved = false;\n el.addEventListener(\"click\", clickHandler);\n el.addEventListener(\"touchstart\", touchStartHandler);\n el.addEventListener(\"touchmove\", touchMoveHandler);\n el.addEventListener(\"touchend\", touchEndHandler);\n el.addEventListener(\"touchcancel\", touchCancelHandler);\n }\n addLifeTime(value) {\n this._lifeTime += value;\n }\n addPath(key, generator, override = false) {\n if (!guardCheck(this) || (!override && this.pathGenerators.has(key))) {\n return false;\n }\n this.pathGenerators.set(key, generator);\n return true;\n }\n alive() {\n return !this._duration || this._lifeTime <= this._duration;\n }\n destroy() {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n this.particles.destroy();\n this.canvas.destroy();\n for (const [, effectDrawer] of this.effectDrawers) {\n effectDrawer.destroy?.(this);\n }\n for (const [, shapeDrawer] of this.shapeDrawers) {\n shapeDrawer.destroy?.(this);\n }\n for (const key of this.effectDrawers.keys()) {\n this.effectDrawers.delete(key);\n }\n for (const key of this.shapeDrawers.keys()) {\n this.shapeDrawers.delete(key);\n }\n this._engine.clearPlugins(this);\n this.destroyed = true;\n const mainArr = this._engine.dom(), idx = mainArr.findIndex((t) => t === this), minIndex = 0;\n if (idx >= minIndex) {\n const deleteCount = 1;\n mainArr.splice(idx, deleteCount);\n }\n this._engine.dispatchEvent(\"containerDestroyed\", { container: this });\n }\n draw(force) {\n if (!guardCheck(this)) {\n return;\n }\n let refreshTime = force;\n const frame = (timestamp) => {\n if (refreshTime) {\n this._lastFrameTime = undefined;\n refreshTime = false;\n }\n this._nextFrame(timestamp);\n };\n this._drawAnimationFrame = requestAnimationFrame((timestamp) => frame(timestamp));\n }\n async export(type, options = {}) {\n for (const [, plugin] of this.plugins) {\n if (!plugin.export) {\n continue;\n }\n const res = await plugin.export(type, options);\n if (!res.supported) {\n continue;\n }\n return res.blob;\n }\n getLogger().error(`${errorPrefix} - Export plugin with type ${type} not found`);\n }\n handleClickMode(mode) {\n if (!guardCheck(this)) {\n return;\n }\n this.particles.handleClickMode(mode);\n for (const [, plugin] of this.plugins) {\n plugin.handleClickMode?.(mode);\n }\n }\n async init() {\n if (!guardCheck(this)) {\n return;\n }\n const effects = this._engine.getSupportedEffects();\n for (const type of effects) {\n const drawer = this._engine.getEffectDrawer(type);\n if (drawer) {\n this.effectDrawers.set(type, drawer);\n }\n }\n const shapes = this._engine.getSupportedShapes();\n for (const type of shapes) {\n const drawer = this._engine.getShapeDrawer(type);\n if (drawer) {\n this.shapeDrawers.set(type, drawer);\n }\n }\n await this.particles.initPlugins();\n this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n const availablePlugins = await this._engine.getAvailablePlugins(this);\n for (const [id, plugin] of availablePlugins) {\n this.plugins.set(id, plugin);\n }\n this.retina.init();\n await this.canvas.init();\n this.updateActualOptions();\n this.canvas.initBackground();\n this.canvas.resize();\n this.zLayers = this.actualOptions.zLayers;\n this._duration = getRangeValue(this.actualOptions.duration) * millisecondsToSeconds;\n this._delay = getRangeValue(this.actualOptions.delay) * millisecondsToSeconds;\n this._lifeTime = 0;\n const defaultFpsLimit = 120, minFpsLimit = 0;\n this.fpsLimit = this.actualOptions.fpsLimit > minFpsLimit ? this.actualOptions.fpsLimit : defaultFpsLimit;\n this._smooth = this.actualOptions.smooth;\n for (const [, drawer] of this.effectDrawers) {\n await drawer.init?.(this);\n }\n for (const [, drawer] of this.shapeDrawers) {\n await drawer.init?.(this);\n }\n for (const [, plugin] of this.plugins) {\n await plugin.init?.();\n }\n this._engine.dispatchEvent(\"containerInit\", { container: this });\n await this.particles.init();\n this.particles.setDensity();\n for (const [, plugin] of this.plugins) {\n plugin.particlesSetup?.();\n }\n this._engine.dispatchEvent(\"particlesSetup\", { container: this });\n }\n async loadTheme(name) {\n if (!guardCheck(this)) {\n return;\n }\n this._currentTheme = name;\n await this.refresh();\n }\n pause() {\n if (!guardCheck(this)) {\n return;\n }\n if (this._drawAnimationFrame !== undefined) {\n cancelAnimationFrame(this._drawAnimationFrame);\n delete this._drawAnimationFrame;\n }\n if (this._paused) {\n return;\n }\n for (const [, plugin] of this.plugins) {\n plugin.pause?.();\n }\n if (!this.pageHidden) {\n this._paused = true;\n }\n this._engine.dispatchEvent(\"containerPaused\", { container: this });\n }\n play(force) {\n if (!guardCheck(this)) {\n return;\n }\n const needsUpdate = this._paused || force;\n if (this._firstStart && !this.actualOptions.autoPlay) {\n this._firstStart = false;\n return;\n }\n if (this._paused) {\n this._paused = false;\n }\n if (needsUpdate) {\n for (const [, plugin] of this.plugins) {\n if (plugin.play) {\n plugin.play();\n }\n }\n }\n this._engine.dispatchEvent(\"containerPlay\", { container: this });\n this.draw(needsUpdate ?? false);\n }\n async refresh() {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n return this.start();\n }\n async reset() {\n if (!guardCheck(this)) {\n return;\n }\n this._initialSourceOptions = undefined;\n this._options = loadContainerOptions(this._engine, this);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n return this.refresh();\n }\n async start() {\n if (!guardCheck(this) || this.started) {\n return;\n }\n await this.init();\n this.started = true;\n await new Promise((resolve) => {\n const start = async () => {\n this._eventListeners.addListeners();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.observe(this.interactivity.element);\n }\n for (const [, plugin] of this.plugins) {\n await plugin.start?.();\n }\n this._engine.dispatchEvent(\"containerStarted\", { container: this });\n this.play();\n resolve();\n };\n this._delayTimeout = setTimeout(() => void start(), this._delay);\n });\n }\n stop() {\n if (!guardCheck(this) || !this.started) {\n return;\n }\n if (this._delayTimeout) {\n clearTimeout(this._delayTimeout);\n delete this._delayTimeout;\n }\n this._firstStart = true;\n this.started = false;\n this._eventListeners.removeListeners();\n this.pause();\n this.particles.clear();\n this.canvas.stop();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.unobserve(this.interactivity.element);\n }\n for (const [, plugin] of this.plugins) {\n plugin.stop?.();\n }\n for (const key of this.plugins.keys()) {\n this.plugins.delete(key);\n }\n this._sourceOptions = this._options;\n this._engine.dispatchEvent(\"containerStopped\", { container: this });\n }\n updateActualOptions() {\n this.actualOptions.responsive = [];\n const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);\n this.actualOptions.setTheme(this._currentTheme);\n if (this._responsiveMaxWidth === newMaxWidth) {\n return false;\n }\n this._responsiveMaxWidth = newMaxWidth;\n return true;\n }\n}\n","export async function loadSlim(engine, refresh = true) {\n const { loadParallaxMover } = await import(\"@tsparticles/move-parallax\"), { loadExternalAttractInteraction } = await import(\"@tsparticles/interaction-external-attract\"), { loadExternalBounceInteraction } = await import(\"@tsparticles/interaction-external-bounce\"), { loadExternalBubbleInteraction } = await import(\"@tsparticles/interaction-external-bubble\"), { loadExternalConnectInteraction } = await import(\"@tsparticles/interaction-external-connect\"), { loadExternalGrabInteraction } = await import(\"@tsparticles/interaction-external-grab\"), { loadExternalPauseInteraction } = await import(\"@tsparticles/interaction-external-pause\"), { loadExternalPushInteraction } = await import(\"@tsparticles/interaction-external-push\"), { loadExternalRemoveInteraction } = await import(\"@tsparticles/interaction-external-remove\"), { loadExternalRepulseInteraction } = await import(\"@tsparticles/interaction-external-repulse\"), { loadExternalSlowInteraction } = await import(\"@tsparticles/interaction-external-slow\"), { loadParticlesAttractInteraction } = await import(\"@tsparticles/interaction-particles-attract\"), { loadParticlesCollisionsInteraction } = await import(\"@tsparticles/interaction-particles-collisions\"), { loadParticlesLinksInteraction } = await import(\"@tsparticles/interaction-particles-links\"), { loadEasingQuadPlugin } = await import(\"@tsparticles/plugin-easing-quad\"), { loadEmojiShape } = await import(\"@tsparticles/shape-emoji\"), { loadImageShape } = await import(\"@tsparticles/shape-image\"), { loadLineShape } = await import(\"@tsparticles/shape-line\"), { loadPolygonShape } = await import(\"@tsparticles/shape-polygon\"), { loadSquareShape } = await import(\"@tsparticles/shape-square\"), { loadStarShape } = await import(\"@tsparticles/shape-star\"), { loadLifeUpdater } = await import(\"@tsparticles/updater-life\"), { loadRotateUpdater } = await import(\"@tsparticles/updater-rotate\"), { loadStrokeColorUpdater } = await import(\"@tsparticles/updater-stroke-color\"), { loadBasic } = await import(\"@tsparticles/basic\");\n await loadParallaxMover(engine, false);\n await loadExternalAttractInteraction(engine, false);\n await loadExternalBounceInteraction(engine, false);\n await loadExternalBubbleInteraction(engine, false);\n await loadExternalConnectInteraction(engine, false);\n await loadExternalGrabInteraction(engine, false);\n await loadExternalPauseInteraction(engine, false);\n await loadExternalPushInteraction(engine, false);\n await loadExternalRemoveInteraction(engine, false);\n await loadExternalRepulseInteraction(engine, false);\n await loadExternalSlowInteraction(engine, false);\n await loadParticlesAttractInteraction(engine, false);\n await loadParticlesCollisionsInteraction(engine, false);\n await loadParticlesLinksInteraction(engine, false);\n await loadEasingQuadPlugin();\n await loadEmojiShape(engine, false);\n await loadImageShape(engine, false);\n await loadLineShape(engine, false);\n await loadPolygonShape(engine, false);\n await loadSquareShape(engine, false);\n await loadStarShape(engine, false);\n await loadLifeUpdater(engine, false);\n await loadRotateUpdater(engine, false);\n await loadStrokeColorUpdater(engine, false);\n await loadBasic(engine, refresh);\n}\n","export async function loadParallaxMover(engine, refresh = true) {\n await engine.addMover(\"parallax\", async () => {\n const { ParallaxMover } = await import(\"./ParallaxMover.js\");\n return new ParallaxMover();\n }, refresh);\n}\n","export class Attract {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.easing = \"ease-out-quad\";\n this.factor = 1;\n this.maxSpeed = 50;\n this.speed = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","export async function loadExternalAttractInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalAttract\", async (container) => {\n const { Attractor } = await import(\"./Attractor.js\");\n return new Attractor(engine, container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Attract.js\";\nexport * from \"./Options/Interfaces/IAttract.js\";\n","export class Bounce {\n constructor() {\n this.distance = 200;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n }\n}\n","export async function loadExternalBounceInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalBounce\", async (container) => {\n const { Bouncer } = await import(\"./Bouncer.js\");\n return new Bouncer(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Bounce.js\";\nexport * from \"./Options/Interfaces/IBounce.js\";\n","import { OptionsColor, executeOnSingleOrMultiple, isArray, } from \"@tsparticles/engine\";\nexport class BubbleBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.mix = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.mix !== undefined) {\n this.mix = data.mix;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n if (data.color !== undefined) {\n const sourceColor = isArray(this.color) ? undefined : this.color;\n this.color = executeOnSingleOrMultiple(data.color, (color) => {\n return OptionsColor.create(sourceColor, color);\n });\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n }\n}\n","import { BubbleBase } from \"./BubbleBase.js\";\nexport class BubbleDiv extends BubbleBase {\n constructor() {\n super();\n this.selectors = [];\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"@tsparticles/engine\";\nimport { BubbleBase } from \"./BubbleBase.js\";\nimport { BubbleDiv } from \"./BubbleDiv.js\";\nexport class Bubble extends BubbleBase {\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, (div) => {\n const tmp = new BubbleDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","export async function loadExternalBubbleInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalBubble\", async (container) => {\n const { Bubbler } = await import(\"./Bubbler.js\");\n return new Bubbler(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/BubbleBase.js\";\nexport * from \"./Options/Classes/BubbleDiv.js\";\nexport * from \"./Options/Classes/Bubble.js\";\nexport * from \"./Options/Interfaces/IBubbleBase.js\";\nexport * from \"./Options/Interfaces/IBubbleDiv.js\";\nexport * from \"./Options/Interfaces/IBubble.js\";\n","export class ConnectLinks {\n constructor() {\n this.opacity = 0.5;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { ConnectLinks } from \"./ConnectLinks.js\";\nexport class Connect {\n constructor() {\n this.distance = 80;\n this.links = new ConnectLinks();\n this.radius = 60;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links);\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","export async function loadExternalConnectInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalConnect\", async (container) => {\n const { Connector } = await import(\"./Connector.js\");\n return new Connector(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Connect.js\";\nexport * from \"./Options/Classes/ConnectLinks.js\";\nexport * from \"./Options/Interfaces/IConnect.js\";\nexport * from \"./Options/Interfaces/IConnectLinks.js\";\n","import { OptionsColor } from \"@tsparticles/engine\";\nexport class GrabLinks {\n constructor() {\n this.blink = false;\n this.consent = false;\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { GrabLinks } from \"./GrabLinks.js\";\nexport class Grab {\n constructor() {\n this.distance = 100;\n this.links = new GrabLinks();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links);\n }\n}\n","export async function loadExternalGrabInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalGrab\", async (container) => {\n const { Grabber } = await import(\"./Grabber.js\");\n return new Grabber(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Grab.js\";\nexport * from \"./Options/Classes/GrabLinks.js\";\nexport * from \"./Options/Interfaces/IGrab.js\";\nexport * from \"./Options/Interfaces/IGrabLinks.js\";\n","export async function loadExternalPauseInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalPause\", async (container) => {\n const { Pauser } = await import(\"./Pauser.js\");\n return new Pauser(container);\n }, refresh);\n}\n","import { setRangeValue } from \"@tsparticles/engine\";\nexport class Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map((t) => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","export async function loadExternalPushInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalPush\", async (container) => {\n const { Pusher } = await import(\"./Pusher.js\");\n return new Pusher(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Push.js\";\nexport * from \"./Options/Interfaces/IPush.js\";\n","import { setRangeValue } from \"@tsparticles/engine\";\nexport class Remove {\n constructor() {\n this.quantity = 2;\n }\n load(data) {\n if (!data) {\n return;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","export async function loadExternalRemoveInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalRemove\", async (container) => {\n const { Remover } = await import(\"./Remover.js\");\n return new Remover(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Remove.js\";\nexport * from \"./Options/Interfaces/IRemove.js\";\n","export class RepulseBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.factor = 100;\n this.speed = 1;\n this.maxSpeed = 50;\n this.easing = \"ease-out-quad\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n }\n}\n","import { RepulseBase } from \"./RepulseBase.js\";\nexport class RepulseDiv extends RepulseBase {\n constructor() {\n super();\n this.selectors = [];\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"@tsparticles/engine\";\nimport { RepulseBase } from \"./RepulseBase.js\";\nimport { RepulseDiv } from \"./RepulseDiv.js\";\nexport class Repulse extends RepulseBase {\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, (div) => {\n const tmp = new RepulseDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","export async function loadExternalRepulseInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalRepulse\", async (container) => {\n const { Repulser } = await import(\"./Repulser.js\");\n return new Repulser(engine, container);\n }, refresh);\n}\nexport * from \"./Options/Classes/RepulseBase.js\";\nexport * from \"./Options/Classes/RepulseDiv.js\";\nexport * from \"./Options/Classes/Repulse.js\";\nexport * from \"./Options/Interfaces/IRepulseBase.js\";\nexport * from \"./Options/Interfaces/IRepulseDiv.js\";\nexport * from \"./Options/Interfaces/IRepulse.js\";\n","export class Slow {\n constructor() {\n this.factor = 3;\n this.radius = 200;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","export async function loadExternalSlowInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalSlow\", async (container) => {\n const { Slower } = await import(\"./Slower.js\");\n return new Slower(container);\n }, refresh);\n}\nexport * from \"./Options/Classes/Slow.js\";\nexport * from \"./Options/Interfaces/ISlow.js\";\n","export async function loadParticlesAttractInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesAttract\", async (container) => {\n const { Attractor } = await import(\"./Attractor.js\");\n return new Attractor(container);\n }, refresh);\n}\n","export async function loadParticlesCollisionsInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesCollisions\", async (container) => {\n const { Collider } = await import(\"./Collider.js\");\n return new Collider(container);\n }, refresh);\n}\n","import { OptionsColor } from \"@tsparticles/engine\";\nexport class LinksShadow {\n constructor() {\n this.blur = 5;\n this.color = new OptionsColor();\n this.color.value = \"#000\";\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { OptionsColor } from \"@tsparticles/engine\";\nexport class LinksTriangle {\n constructor() {\n this.enable = false;\n this.frequency = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor } from \"@tsparticles/engine\";\nimport { LinksShadow } from \"./LinksShadow.js\";\nimport { LinksTriangle } from \"./LinksTriangle.js\";\nexport class Links {\n constructor() {\n this.blink = false;\n this.color = new OptionsColor();\n this.color.value = \"#fff\";\n this.consent = false;\n this.distance = 100;\n this.enable = false;\n this.frequency = 1;\n this.opacity = 1;\n this.shadow = new LinksShadow();\n this.triangles = new LinksTriangle();\n this.width = 1;\n this.warp = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.id !== undefined) {\n this.id = data.id;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n this.shadow.load(data.shadow);\n this.triangles.load(data.triangles);\n if (data.width !== undefined) {\n this.width = data.width;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","export async function loadParticlesLinksInteraction(engine, refresh = true) {\n const { loadLinksInteraction } = await import(\"./interaction.js\"), { loadLinksPlugin } = await import(\"./plugin.js\");\n await loadLinksInteraction(engine, refresh);\n await loadLinksPlugin(engine, refresh);\n}\nexport * from \"./Options/Classes/Links.js\";\nexport * from \"./Options/Classes/LinksShadow.js\";\nexport * from \"./Options/Classes/LinksTriangle.js\";\nexport * from \"./Options/Interfaces/ILinks.js\";\nexport * from \"./Options/Interfaces/ILinksShadow.js\";\nexport * from \"./Options/Interfaces/ILinksTriangle.js\";\n","import { addEasing } from \"@tsparticles/engine\";\nexport async function loadEasingQuadPlugin() {\n addEasing(\"ease-in-quad\", (value) => value ** 2);\n addEasing(\"ease-out-quad\", (value) => 1 - (1 - value) ** 2);\n addEasing(\"ease-in-out-quad\", (value) => (value < 0.5 ? 2 * value ** 2 : 1 - (-2 * value + 2) ** 2 / 2));\n await Promise.resolve();\n}\n","export const validTypes = [\"emoji\"];\n","import { validTypes } from \"./Constants.js\";\nexport async function loadEmojiShape(engine, refresh = true) {\n const { EmojiDrawer } = await import(\"./EmojiDrawer.js\");\n await engine.addShape(validTypes, new EmojiDrawer(), refresh);\n}\n","import { errorPrefix, getLogger, getStyleFromHsl } from \"@tsparticles/engine\";\nconst stringStart = 0, defaultOpacity = 1;\nconst currentColorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d.]+%?\\))|currentcolor/gi;\nfunction replaceColorSvg(imageShape, color, opacity) {\n const { svgData } = imageShape;\n if (!svgData) {\n return \"\";\n }\n const colorStyle = getStyleFromHsl(color, opacity);\n if (svgData.includes(\"fill\")) {\n return svgData.replace(currentColorRegex, () => colorStyle);\n }\n const preFillIndex = svgData.indexOf(\">\");\n return `${svgData.substring(stringStart, preFillIndex)} fill=\"${colorStyle}\"${svgData.substring(preFillIndex)}`;\n}\nexport async function loadImage(image) {\n return new Promise((resolve) => {\n image.loading = true;\n const img = new Image();\n image.element = img;\n img.addEventListener(\"load\", () => {\n image.loading = false;\n resolve();\n });\n img.addEventListener(\"error\", () => {\n image.element = undefined;\n image.error = true;\n image.loading = false;\n getLogger().error(`${errorPrefix} loading image: ${image.source}`);\n resolve();\n });\n img.src = image.source;\n });\n}\nexport async function downloadSvgImage(image) {\n if (image.type !== \"svg\") {\n await loadImage(image);\n return;\n }\n image.loading = true;\n const response = await fetch(image.source);\n if (!response.ok) {\n getLogger().error(`${errorPrefix} Image not found`);\n image.error = true;\n }\n else {\n image.svgData = await response.text();\n }\n image.loading = false;\n}\nexport function replaceImageColor(image, imageData, color, particle) {\n const svgColoredData = replaceColorSvg(image, color, particle.opacity?.value ?? defaultOpacity), imageRes = {\n color,\n gif: imageData.gif,\n data: {\n ...image,\n svgData: svgColoredData,\n },\n loaded: false,\n ratio: imageData.width / imageData.height,\n replaceColor: imageData.replaceColor,\n source: imageData.src,\n };\n return new Promise((resolve) => {\n const svg = new Blob([svgColoredData], { type: \"image/svg+xml\" }), domUrl = URL || window.URL || window.webkitURL || window, url = domUrl.createObjectURL(svg), img = new Image();\n img.addEventListener(\"load\", () => {\n imageRes.loaded = true;\n imageRes.element = img;\n resolve(imageRes);\n domUrl.revokeObjectURL(url);\n });\n const errorHandler = async () => {\n domUrl.revokeObjectURL(url);\n const img2 = {\n ...image,\n error: false,\n loading: true,\n };\n await loadImage(img2);\n imageRes.loaded = true;\n imageRes.element = img2.element;\n resolve(imageRes);\n };\n img.addEventListener(\"error\", () => void errorHandler());\n img.src = url;\n });\n}\n","import { downloadSvgImage, loadImage } from \"./Utils.js\";\nimport { errorPrefix } from \"@tsparticles/engine\";\nconst extLength = 3;\nfunction addLoadImageToEngine(engine) {\n if (engine.loadImage) {\n return;\n }\n engine.loadImage = async (data) => {\n if (!data.name && !data.src) {\n throw new Error(`${errorPrefix} no image source provided`);\n }\n if (!engine.images) {\n engine.images = [];\n }\n if (engine.images.find((t) => t.name === data.name || t.source === data.src)) {\n return;\n }\n try {\n const image = {\n gif: data.gif ?? false,\n name: data.name ?? data.src,\n source: data.src,\n type: data.src.substring(data.src.length - extLength),\n error: false,\n loading: true,\n replaceColor: data.replaceColor,\n ratio: data.width && data.height ? data.width / data.height : undefined,\n };\n engine.images.push(image);\n let imageFunc;\n if (data.gif) {\n const { loadGifImage } = await import(\"./GifUtils/Utils.js\");\n imageFunc = loadGifImage;\n }\n else {\n imageFunc = data.replaceColor ? downloadSvgImage : loadImage;\n }\n await imageFunc(image);\n }\n catch {\n throw new Error(`${errorPrefix} ${data.name ?? data.src} not found`);\n }\n };\n}\nexport async function loadImageShape(engine, refresh = true) {\n addLoadImageToEngine(engine);\n const { ImagePreloaderPlugin } = await import(\"./ImagePreloader.js\"), { ImageDrawer } = await import(\"./ImageDrawer.js\");\n const preloader = new ImagePreloaderPlugin(engine);\n await engine.addPlugin(preloader, refresh);\n await engine.addShape([\"image\", \"images\"], new ImageDrawer(engine), refresh);\n}\n","export async function loadLineShape(engine, refresh = true) {\n const { LineDrawer } = await import(\"./LineDrawer.js\");\n await engine.addShape(\"line\", new LineDrawer(), refresh);\n}\n","export async function loadGenericPolygonShape(engine, refresh = true) {\n const { PolygonDrawer } = await import(\"./PolygonDrawer.js\");\n await engine.addShape(\"polygon\", new PolygonDrawer(), refresh);\n}\nexport async function loadTriangleShape(engine, refresh = true) {\n const { TriangleDrawer } = await import(\"./TriangleDrawer.js\");\n await engine.addShape(\"triangle\", new TriangleDrawer(), refresh);\n}\nexport async function loadPolygonShape(engine, refresh = true) {\n await loadGenericPolygonShape(engine, refresh);\n await loadTriangleShape(engine, refresh);\n}\n","export async function loadSquareShape(engine, refresh = true) {\n const { SquareDrawer } = await import(\"./SquareDrawer.js\");\n await engine.addShape([\"edge\", \"square\"], new SquareDrawer(), refresh);\n}\n","export async function loadStarShape(engine, refresh = true) {\n const { StarDrawer } = await import(\"./StarDrawer.js\");\n await engine.addShape(\"star\", new StarDrawer(), refresh);\n}\n","export async function loadLifeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"life\", async (container) => {\n const { LifeUpdater } = await import(\"./LifeUpdater.js\");\n return new LifeUpdater(container);\n }, refresh);\n}\n","export async function loadRotateUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"rotate\", async (container) => {\n const { RotateUpdater } = await import(\"./RotateUpdater.js\");\n return new RotateUpdater(container);\n }, refresh);\n}\n","export async function loadStrokeColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"strokeColor\", async (container) => {\n const { StrokeColorUpdater } = await import(\"./StrokeColorUpdater.js\");\n return new StrokeColorUpdater(container);\n }, refresh);\n}\n","export async function loadBasic(engine, refresh = true) {\n const { loadBaseMover } = await import(\"@tsparticles/move-base\"), { loadCircleShape } = await import(\"@tsparticles/shape-circle\"), { loadColorUpdater } = await import(\"@tsparticles/updater-color\"), { loadOpacityUpdater } = await import(\"@tsparticles/updater-opacity\"), { loadOutModesUpdater } = await import(\"@tsparticles/updater-out-modes\"), { loadSizeUpdater } = await import(\"@tsparticles/updater-size\");\n await loadBaseMover(engine, false);\n await loadCircleShape(engine, false);\n await loadColorUpdater(engine, false);\n await loadOpacityUpdater(engine, false);\n await loadOutModesUpdater(engine, false);\n await loadSizeUpdater(engine, false);\n await engine.refresh(refresh);\n}\n","import { isSsr } from \"@tsparticles/engine\";\nconst half = 0.5;\nexport class ParallaxMover {\n init() {\n }\n isEnabled(particle) {\n return (!isSsr() &&\n !particle.destroyed &&\n particle.container.actualOptions.interactivity.events.onHover.parallax.enable);\n }\n move(particle) {\n const container = particle.container, options = container.actualOptions, parallaxOptions = options.interactivity.events.onHover.parallax;\n if (isSsr() || !parallaxOptions.enable) {\n return;\n }\n const parallaxForce = parallaxOptions.force, mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const canvasSize = container.canvas.size, canvasCenter = {\n x: canvasSize.width * half,\n y: canvasSize.height * half,\n }, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = {\n x: (mousePos.x - canvasCenter.x) * factor,\n y: (mousePos.y - canvasCenter.y) * factor,\n }, { offset } = particle;\n offset.x += (centerDistance.x - offset.x) / parallaxSmooth;\n offset.y += (centerDistance.y - offset.y) / parallaxSmooth;\n }\n}\n","import { Circle, Vector, clamp, getDistances, getEasing, } from \"@tsparticles/engine\";\nconst minFactor = 1, identity = 1, minRadius = 0;\nfunction processAttract(container, position, attractRadius, area, queryCb) {\n const attractOptions = container.actualOptions.interactivity.modes.attract;\n if (!attractOptions) {\n return;\n }\n const query = container.particles.quadTree.query(area, queryCb);\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);\n particle.position.subFrom(normVec);\n }\n}\nexport function clickAttract(container, enabledCb) {\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n const { attract } = container;\n if (!attract.finish) {\n if (!attract.count) {\n attract.count = 0;\n }\n attract.count++;\n if (attract.count === container.particles.count) {\n attract.finish = true;\n }\n }\n if (attract.clicking) {\n const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));\n }\n else if (attract.clicking === false) {\n attract.particles = [];\n }\n}\nexport function hoverAttract(container, enabledCb) {\n const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));\n}\n","import { ExternalInteractorBase, isInArray, millisecondsToSeconds, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { clickAttract, hoverAttract } from \"./Utils.js\";\nimport { Attract } from \"./Options/Classes/Attract.js\";\nconst attractMode = \"attract\";\nexport class Attractor extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._engine = engine;\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, attract = options.interactivity.modes.attract;\n if (!attract || mode !== attractMode) {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = true;\n container.attract.count = 0;\n for (const particle of container.attract.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n container.attract.particles = [];\n container.attract.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = false;\n }, attract.duration * millisecondsToSeconds);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, attract = container.actualOptions.interactivity.modes.attract;\n if (!attract) {\n return;\n }\n container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, { enable: hoverEnabled, mode: hoverMode } = events.onHover, { enable: clickEnabled, mode: clickMode } = events.onClick;\n if (mouseMoveStatus && hoverEnabled && isInArray(attractMode, hoverMode)) {\n hoverAttract(this.container, (p) => this.isEnabled(p));\n }\n else if (clickEnabled && isInArray(attractMode, clickMode)) {\n clickAttract(this.container, (p) => this.isEnabled(p));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;\n if ((!mouse.position || !events.onHover.enable) && (!mouse.clickPosition || !events.onClick.enable)) {\n return false;\n }\n const hoverMode = events.onHover.mode, clickMode = events.onClick.mode;\n return isInArray(attractMode, hoverMode) || isInArray(attractMode, clickMode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.attract) {\n options.attract = new Attract();\n }\n for (const source of sources) {\n options.attract.load(source?.attract);\n }\n }\n reset() {\n }\n}\n","import { Circle, Rectangle, Vector, calculateBounds, circleBounce, circleBounceDataFromParticle, divModeExecute, rectBounce, } from \"@tsparticles/engine\";\nconst squareExp = 2, half = 0.5, halfPI = Math.PI * half, double = 2, toleranceFactor = 10, minRadius = 0;\nfunction processBounce(container, position, radius, area, enabledCb) {\n const query = container.particles.quadTree.query(area, enabledCb);\n for (const particle of query) {\n if (area instanceof Circle) {\n circleBounce(circleBounceDataFromParticle(particle), {\n position,\n radius,\n mass: radius ** squareExp * halfPI,\n velocity: Vector.origin,\n factor: Vector.origin,\n });\n }\n else if (area instanceof Rectangle) {\n rectBounce(particle, calculateBounds(position, radius));\n }\n }\n}\nfunction singleSelectorBounce(container, selector, div, bounceCb) {\n const query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, radius = elem.offsetWidth * half * pxRatio, tolerance = toleranceFactor * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, radius + tolerance)\n : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * double, elem.offsetHeight * pxRatio + tolerance * double);\n bounceCb(pos, radius, area);\n });\n}\nexport function divBounce(container, divs, bounceMode, enabledCb) {\n divModeExecute(bounceMode, divs, (selector, div) => singleSelectorBounce(container, selector, div, (pos, radius, area) => processBounce(container, pos, radius, area, enabledCb)));\n}\nexport function mouseBounce(container, enabledCb) {\n const pxRatio = container.retina.pixelRatio, tolerance = toleranceFactor * pxRatio, mousePos = container.interactivity.mouse.position, radius = container.retina.bounceModeDistance;\n if (!radius || radius < minRadius || !mousePos) {\n return;\n }\n processBounce(container, mousePos, radius, new Circle(mousePos.x, mousePos.y, radius + tolerance), enabledCb);\n}\n","import { ExternalInteractorBase, isDivModeEnabled, isInArray, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { divBounce, mouseBounce } from \"./Utils.js\";\nimport { Bounce } from \"./Options/Classes/Bounce.js\";\nconst bounceMode = \"bounce\";\nexport class Bouncer extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, bounce = container.actualOptions.interactivity.modes.bounce;\n if (!bounce) {\n return;\n }\n container.retina.bounceModeDistance = bounce.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, events = options.interactivity.events, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(bounceMode, hoverMode)) {\n mouseBounce(this.container, (p) => this.isEnabled(p));\n }\n else {\n divBounce(this.container, divs, bounceMode, (p) => this.isEnabled(p));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv;\n return ((!!mouse.position && events.onHover.enable && isInArray(bounceMode, events.onHover.mode)) ||\n isDivModeEnabled(bounceMode, divs));\n }\n loadModeOptions(options, ...sources) {\n if (!options.bounce) {\n options.bounce = new Bounce();\n }\n for (const source of sources) {\n options.bounce.load(source?.bounce);\n }\n }\n reset() {\n }\n}\n","import { clamp } from \"@tsparticles/engine\";\nexport function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {\n if (modeValue >= optionsValue) {\n const value = particleValue + (modeValue - optionsValue) * ratio;\n return clamp(value, particleValue, modeValue);\n }\n else if (modeValue < optionsValue) {\n const value = particleValue - (optionsValue - modeValue) * ratio;\n return clamp(value, modeValue, particleValue);\n }\n}\n","import { Circle, ExternalInteractorBase, Rectangle, colorMix, divMode, divModeExecute, getDistance, getRangeMax, isDivModeEnabled, isInArray, itemFromSingleOrMultiple, millisecondsToSeconds, mouseLeaveEvent, mouseMoveEvent, rangeColorToHsl, rgbToHsl, } from \"@tsparticles/engine\";\nimport { Bubble } from \"./Options/Classes/Bubble.js\";\nimport { calculateBubbleValue } from \"./Utils.js\";\nconst bubbleMode = \"bubble\", minDistance = 0, defaultClickTime = 0, double = 2, defaultOpacity = 1, ratioOffset = 1, defaultBubbleValue = 0, minRatio = 0, half = 0.5, defaultRatio = 1;\nexport class Bubbler extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this._clickBubble = () => {\n const container = this.container, options = container.actualOptions, mouseClickPos = container.interactivity.mouse.clickPosition, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || !mouseClickPos) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n const distance = container.retina.bubbleModeDistance;\n if (!distance || distance < minDistance) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mouseClickPos, distance, (p) => this.isEnabled(p)), { bubble } = container;\n for (const particle of query) {\n if (!bubble.clicking) {\n continue;\n }\n particle.bubble.inRange = !bubble.durationEnd;\n const pos = particle.getPosition(), distMouse = getDistance(pos, mouseClickPos), timeSpent = (new Date().getTime() - (container.interactivity.mouse.clickTime ?? defaultClickTime)) /\n millisecondsToSeconds;\n if (timeSpent > bubbleOptions.duration) {\n bubble.durationEnd = true;\n }\n if (timeSpent > bubbleOptions.duration * double) {\n bubble.clicking = false;\n bubble.durationEnd = false;\n }\n const sizeData = {\n bubbleObj: {\n optValue: container.retina.bubbleModeSize,\n value: particle.bubble.radius,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.size.value) * container.retina.pixelRatio,\n value: particle.size.value,\n },\n type: \"size\",\n };\n this._process(particle, distMouse, timeSpent, sizeData);\n const opacityData = {\n bubbleObj: {\n optValue: bubbleOptions.opacity,\n value: particle.bubble.opacity,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.opacity.value),\n value: particle.opacity?.value ?? defaultOpacity,\n },\n type: \"opacity\",\n };\n this._process(particle, distMouse, timeSpent, opacityData);\n if (!bubble.durationEnd && distMouse <= distance) {\n this._hoverBubbleColor(particle, distMouse);\n }\n else {\n delete particle.bubble.color;\n }\n }\n };\n this._hoverBubble = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, distance = container.retina.bubbleModeDistance;\n if (!distance || distance < minDistance || !mousePos) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n for (const particle of query) {\n particle.bubble.inRange = true;\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos), ratio = ratioOffset - pointDistance / distance;\n if (pointDistance <= distance) {\n if (ratio >= minRatio && container.interactivity.status === mouseMoveEvent) {\n this._hoverBubbleSize(particle, ratio);\n this._hoverBubbleOpacity(particle, ratio);\n this._hoverBubbleColor(particle, ratio);\n }\n }\n else {\n this.reset(particle);\n }\n if (container.interactivity.status === mouseLeaveEvent) {\n this.reset(particle);\n }\n }\n };\n this._hoverBubbleColor = (particle, ratio, divBubble) => {\n const options = this.container.actualOptions, bubbleOptions = divBubble ?? options.interactivity.modes.bubble;\n if (!bubbleOptions) {\n return;\n }\n if (!particle.bubble.finalColor) {\n const modeColor = bubbleOptions.color;\n if (!modeColor) {\n return;\n }\n const bubbleColor = itemFromSingleOrMultiple(modeColor);\n particle.bubble.finalColor = rangeColorToHsl(bubbleColor);\n }\n if (!particle.bubble.finalColor) {\n return;\n }\n if (bubbleOptions.mix) {\n particle.bubble.color = undefined;\n const pColor = particle.getFillColor();\n particle.bubble.color = pColor\n ? rgbToHsl(colorMix(pColor, particle.bubble.finalColor, ratioOffset - ratio, ratio))\n : particle.bubble.finalColor;\n }\n else {\n particle.bubble.color = particle.bubble.finalColor;\n }\n };\n this._hoverBubbleOpacity = (particle, ratio, divBubble) => {\n const container = this.container, options = container.actualOptions, modeOpacity = divBubble?.opacity ?? options.interactivity.modes.bubble?.opacity;\n if (!modeOpacity) {\n return;\n }\n const optOpacity = particle.options.opacity.value, pOpacity = particle.opacity?.value ?? defaultOpacity, opacity = calculateBubbleValue(pOpacity, modeOpacity, getRangeMax(optOpacity), ratio);\n if (opacity !== undefined) {\n particle.bubble.opacity = opacity;\n }\n };\n this._hoverBubbleSize = (particle, ratio, divBubble) => {\n const container = this.container, modeSize = divBubble?.size ? divBubble.size * container.retina.pixelRatio : container.retina.bubbleModeSize;\n if (modeSize === undefined) {\n return;\n }\n const optSize = getRangeMax(particle.options.size.value) * container.retina.pixelRatio, pSize = particle.size.value, size = calculateBubbleValue(pSize, modeSize, optSize, ratio);\n if (size !== undefined) {\n particle.bubble.radius = size;\n }\n };\n this._process = (particle, distMouse, timeSpent, data) => {\n const container = this.container, bubbleParam = data.bubbleObj.optValue, options = container.actualOptions, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || bubbleParam === undefined) {\n return;\n }\n const bubbleDuration = bubbleOptions.duration, bubbleDistance = container.retina.bubbleModeDistance, particlesParam = data.particlesObj.optValue, pObjBubble = data.bubbleObj.value, pObj = data.particlesObj.value ?? defaultBubbleValue, type = data.type;\n if (!bubbleDistance || bubbleDistance < minDistance || bubbleParam === particlesParam) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n if (container.bubble.durationEnd) {\n if (pObjBubble) {\n if (type === \"size\") {\n delete particle.bubble.radius;\n }\n if (type === \"opacity\") {\n delete particle.bubble.opacity;\n }\n }\n }\n else {\n if (distMouse <= bubbleDistance) {\n const obj = pObjBubble ?? pObj;\n if (obj !== bubbleParam) {\n const value = pObj - (timeSpent * (pObj - bubbleParam)) / bubbleDuration;\n if (type === \"size\") {\n particle.bubble.radius = value;\n }\n if (type === \"opacity\") {\n particle.bubble.opacity = value;\n }\n }\n }\n else {\n if (type === \"size\") {\n delete particle.bubble.radius;\n }\n if (type === \"opacity\") {\n delete particle.bubble.opacity;\n }\n }\n }\n };\n this._singleSelectorHover = (delta, selector, div) => {\n const container = this.container, selectors = document.querySelectorAll(selector), bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble || !selectors.length) {\n return;\n }\n selectors.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));\n for (const particle of query) {\n if (!area.contains(particle.getPosition())) {\n continue;\n }\n particle.bubble.inRange = true;\n const divs = bubble.divs, divBubble = divMode(divs, elem);\n if (!particle.bubble.div || particle.bubble.div !== elem) {\n this.clear(particle, delta, true);\n particle.bubble.div = elem;\n }\n this._hoverBubbleSize(particle, defaultRatio, divBubble);\n this._hoverBubbleOpacity(particle, defaultRatio, divBubble);\n this._hoverBubbleColor(particle, defaultRatio, divBubble);\n }\n });\n };\n if (!container.bubble) {\n container.bubble = {};\n }\n this.handleClickMode = (mode) => {\n if (mode !== bubbleMode) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n container.bubble.clicking = true;\n };\n }\n clear(particle, delta, force) {\n if (particle.bubble.inRange && !force) {\n return;\n }\n delete particle.bubble.div;\n delete particle.bubble.opacity;\n delete particle.bubble.radius;\n delete particle.bubble.color;\n }\n init() {\n const container = this.container, bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble) {\n return;\n }\n container.retina.bubbleModeDistance = bubble.distance * container.retina.pixelRatio;\n if (bubble.size !== undefined) {\n container.retina.bubbleModeSize = bubble.size * container.retina.pixelRatio;\n }\n }\n interact(delta) {\n const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;\n if (hoverEnabled && isInArray(bubbleMode, hoverMode)) {\n this._hoverBubble();\n }\n else if (clickEnabled && isInArray(bubbleMode, clickMode)) {\n this._clickBubble();\n }\n else {\n divModeExecute(bubbleMode, divs, (selector, div) => this._singleSelectorHover(delta, selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, { onClick, onDiv, onHover } = events, divBubble = isDivModeEnabled(bubbleMode, onDiv);\n if (!(divBubble || (onHover.enable && !!mouse.position) || (onClick.enable && mouse.clickPosition))) {\n return false;\n }\n return isInArray(bubbleMode, onHover.mode) || isInArray(bubbleMode, onClick.mode) || divBubble;\n }\n loadModeOptions(options, ...sources) {\n if (!options.bubble) {\n options.bubble = new Bubble();\n }\n for (const source of sources) {\n options.bubble.load(source?.bubble);\n }\n }\n reset(particle) {\n particle.bubble.inRange = false;\n }\n}\n","import { clamp, colorMix, drawLine, getStyleFromHsl, getStyleFromRgb, } from \"@tsparticles/engine\";\nconst gradientMin = 0, gradientMax = 1, defaultLinksWidth = 0;\nexport function gradient(context, p1, p2, opacity) {\n const gradStop = Math.floor(p2.getRadius() / p1.getRadius()), color1 = p1.getFillColor(), color2 = p2.getFillColor();\n if (!color1 || !color2) {\n return;\n }\n const sourcePos = p1.getPosition(), destPos = p2.getPosition(), midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius()), grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);\n grad.addColorStop(gradientMin, getStyleFromHsl(color1, opacity));\n grad.addColorStop(clamp(gradStop, gradientMin, gradientMax), getStyleFromRgb(midRgb, opacity));\n grad.addColorStop(gradientMax, getStyleFromHsl(color2, opacity));\n return grad;\n}\nexport function drawConnectLine(context, width, lineStyle, begin, end) {\n drawLine(context, begin, end);\n context.lineWidth = width;\n context.strokeStyle = lineStyle;\n context.stroke();\n}\nexport function lineStyle(container, ctx, p1, p2) {\n const options = container.actualOptions, connectOptions = options.interactivity.modes.connect;\n if (!connectOptions) {\n return;\n }\n return gradient(ctx, p1, p2, connectOptions.links.opacity);\n}\nexport function drawConnection(container, p1, p2) {\n container.canvas.draw((ctx) => {\n const ls = lineStyle(container, ctx, p1, p2);\n if (!ls) {\n return;\n }\n const pos1 = p1.getPosition(), pos2 = p2.getPosition();\n drawConnectLine(ctx, p1.retina.linksWidth ?? defaultLinksWidth, ls, pos1, pos2);\n });\n}\n","import { ExternalInteractorBase, isInArray, } from \"@tsparticles/engine\";\nimport { Connect } from \"./Options/Classes/Connect.js\";\nimport { drawConnection } from \"./Utils.js\";\nconst connectMode = \"connect\", minDistance = 0;\nexport class Connector extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, connect = container.actualOptions.interactivity.modes.connect;\n if (!connect) {\n return;\n }\n container.retina.connectModeDistance = connect.distance * container.retina.pixelRatio;\n container.retina.connectModeRadius = connect.radius * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions;\n if (options.interactivity.events.onHover.enable && container.interactivity.status === \"pointermove\") {\n const mousePos = container.interactivity.mouse.position, { connectModeDistance, connectModeRadius } = container.retina;\n if (!connectModeDistance ||\n connectModeDistance < minDistance ||\n !connectModeRadius ||\n connectModeRadius < minDistance ||\n !mousePos) {\n return;\n }\n const distance = Math.abs(connectModeRadius), query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n query.forEach((p1, i) => {\n const pos1 = p1.getPosition(), indexOffset = 1;\n for (const p2 of query.slice(i + indexOffset)) {\n const pos2 = p2.getPosition(), distMax = Math.abs(connectModeDistance), xDiff = Math.abs(pos1.x - pos2.x), yDiff = Math.abs(pos1.y - pos2.y);\n if (xDiff < distMax && yDiff < distMax) {\n drawConnection(container, p1, p2);\n }\n }\n });\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n if (!(events.onHover.enable && mouse.position)) {\n return false;\n }\n return isInArray(connectMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.connect) {\n options.connect = new Connect();\n }\n for (const source of sources) {\n options.connect.load(source?.connect);\n }\n }\n reset() {\n }\n}\n","import { drawLine, getStyleFromRgb } from \"@tsparticles/engine\";\nconst defaultWidth = 0;\nexport function drawGrabLine(context, width, begin, end, colorLine, opacity) {\n drawLine(context, begin, end);\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n context.lineWidth = width;\n context.stroke();\n}\nexport function drawGrab(container, particle, lineColor, opacity, mousePos) {\n container.canvas.draw((ctx) => {\n const beginPos = particle.getPosition();\n drawGrabLine(ctx, particle.retina.linksWidth ?? defaultWidth, beginPos, mousePos, lineColor, opacity);\n });\n}\n","import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { Grab } from \"./Options/Classes/Grab.js\";\nimport { drawGrab } from \"./Utils.js\";\nconst grabMode = \"grab\", minDistance = 0, minOpacity = 0;\nexport class Grabber extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, grab = container.actualOptions.interactivity.modes.grab;\n if (!grab) {\n return;\n }\n container.retina.grabModeDistance = grab.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, interactivity = options.interactivity;\n if (!interactivity.modes.grab ||\n !interactivity.events.onHover.enable ||\n container.interactivity.status !== mouseMoveEvent) {\n return;\n }\n const mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const distance = container.retina.grabModeDistance;\n if (!distance || distance < minDistance) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n for (const particle of query) {\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos);\n if (pointDistance > distance) {\n continue;\n }\n const grabLineOptions = interactivity.modes.grab.links, lineOpacity = grabLineOptions.opacity, opacityLine = lineOpacity - (pointDistance * lineOpacity) / distance;\n if (opacityLine <= minOpacity) {\n continue;\n }\n const optColor = grabLineOptions.color ?? particle.options.links?.color;\n if (!container.particles.grabLineColor && optColor) {\n const linksOptions = interactivity.modes.grab.links;\n container.particles.grabLineColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);\n }\n const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);\n if (!colorLine) {\n continue;\n }\n drawGrab(container, particle, colorLine, opacityLine, mousePos);\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(grabMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.grab) {\n options.grab = new Grab();\n }\n for (const source of sources) {\n options.grab.load(source?.grab);\n }\n }\n reset() {\n }\n}\n","import { ExternalInteractorBase } from \"@tsparticles/engine\";\nconst pauseMode = \"pause\";\nexport class Pauser extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== pauseMode) {\n return;\n }\n const container = this.container;\n if (container.animationStatus) {\n container.pause();\n }\n else {\n container.play();\n }\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n reset() {\n }\n}\n","import { ExternalInteractorBase, getRangeValue, itemFromArray, } from \"@tsparticles/engine\";\nimport { Push } from \"./Options/Classes/Push.js\";\nconst pushMode = \"push\", minQuantity = 0;\nexport class Pusher extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== pushMode) {\n return;\n }\n const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;\n if (!pushOptions) {\n return;\n }\n const quantity = getRangeValue(pushOptions.quantity);\n if (quantity <= minQuantity) {\n return;\n }\n const group = itemFromArray([undefined, ...pushOptions.groups]), groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;\n void container.particles.push(quantity, container.interactivity.mouse, groupOptions, group);\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.push) {\n options.push = new Push();\n }\n for (const source of sources) {\n options.push.load(source?.push);\n }\n }\n reset() {\n }\n}\n","import { ExternalInteractorBase, getRangeValue, } from \"@tsparticles/engine\";\nimport { Remove } from \"./Options/Classes/Remove.js\";\nconst removeMode = \"remove\";\nexport class Remover extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n const container = this.container, options = container.actualOptions;\n if (!options.interactivity.modes.remove || mode !== removeMode) {\n return;\n }\n const removeNb = getRangeValue(options.interactivity.modes.remove.quantity);\n container.particles.removeQuantity(removeNb);\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.remove) {\n options.remove = new Remove();\n }\n for (const source of sources) {\n options.remove.load(source?.remove);\n }\n }\n reset() {\n }\n}\n","import { Circle, ExternalInteractorBase, Rectangle, Vector, clamp, divMode, divModeExecute, getDistances, getEasing, isDivModeEnabled, isInArray, millisecondsToSeconds, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { Repulse } from \"./Options/Classes/Repulse.js\";\nconst repulseMode = \"repulse\", minDistance = 0, repulseRadiusFactor = 6, repulseRadiusPower = 3, squarePower = 2, minRadius = 0, minSpeed = 0, easingOffset = 1, half = 0.5;\nexport class Repulser extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._clickRepulse = () => {\n const container = this.container, repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n const repulse = container.repulse ?? { particles: [] };\n if (!repulse.finish) {\n if (!repulse.count) {\n repulse.count = 0;\n }\n repulse.count++;\n if (repulse.count === container.particles.count) {\n repulse.finish = true;\n }\n }\n if (repulse.clicking) {\n const repulseDistance = container.retina.repulseModeDistance;\n if (!repulseDistance || repulseDistance < minDistance) {\n return;\n }\n const repulseRadius = Math.pow(repulseDistance / repulseRadiusFactor, repulseRadiusPower), mouseClickPos = container.interactivity.mouse.clickPosition;\n if (mouseClickPos === undefined) {\n return;\n }\n const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range, (p) => this.isEnabled(p));\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(mouseClickPos, particle.position), d = distance ** squarePower, velocity = repulseOptions.speed, force = (-repulseRadius * velocity) / d;\n if (d <= repulseRadius) {\n repulse.particles.push(particle);\n const vect = Vector.create(dx, dy);\n vect.length = force;\n particle.velocity.setTo(vect);\n }\n }\n }\n else if (repulse.clicking === false) {\n for (const particle of repulse.particles) {\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n }\n };\n this._hoverRepulse = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, repulseRadius = container.retina.repulseModeDistance;\n if (!repulseRadius || repulseRadius < minRadius || !mousePos) {\n return;\n }\n this._processRepulse(mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius));\n };\n this._processRepulse = (position, repulseRadius, area, divRepulse) => {\n const container = this.container, query = container.particles.quadTree.query(area, (p) => this.isEnabled(p)), repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n const { easing, speed, factor, maxSpeed } = repulseOptions, easingFunc = getEasing(easing), velocity = (divRepulse?.speed ?? speed) * factor;\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position), repulseFactor = clamp(easingFunc(easingOffset - distance / repulseRadius) * velocity, minSpeed, maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * repulseFactor, !distance ? velocity : (dy / distance) * repulseFactor);\n particle.position.addTo(normVec);\n }\n };\n this._singleSelectorRepulse = (selector, div) => {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n const query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), divs = repulse.divs, divRepulse = divMode(divs, elem);\n this._processRepulse(pos, repulseRadius, area, divRepulse);\n });\n };\n this._engine = engine;\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, repulseOpts = options.interactivity.modes.repulse;\n if (!repulseOpts || mode !== repulseMode) {\n return;\n }\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n const repulse = container.repulse;\n repulse.clicking = true;\n repulse.count = 0;\n for (const particle of container.repulse.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n repulse.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n repulse.clicking = false;\n }, repulseOpts.duration * millisecondsToSeconds);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n container.retina.repulseModeDistance = repulse.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, hover = events.onHover, hoverEnabled = hover.enable, hoverMode = hover.mode, click = events.onClick, clickEnabled = click.enable, clickMode = click.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(repulseMode, hoverMode)) {\n this._hoverRepulse();\n }\n else if (clickEnabled && isInArray(repulseMode, clickMode)) {\n this._clickRepulse();\n }\n else {\n divModeExecute(repulseMode, divs, (selector, div) => this._singleSelectorRepulse(selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv, hover = events.onHover, click = events.onClick, divRepulse = isDivModeEnabled(repulseMode, divs);\n if (!(divRepulse || (hover.enable && !!mouse.position) || (click.enable && mouse.clickPosition))) {\n return false;\n }\n const hoverMode = hover.mode, clickMode = click.mode;\n return isInArray(repulseMode, hoverMode) || isInArray(repulseMode, clickMode) || divRepulse;\n }\n loadModeOptions(options, ...sources) {\n if (!options.repulse) {\n options.repulse = new Repulse();\n }\n for (const source of sources) {\n options.repulse.load(source?.repulse);\n }\n }\n reset() {\n }\n}\n","import { ExternalInteractorBase, getDistance, isInArray, } from \"@tsparticles/engine\";\nimport { Slow } from \"./Options/Classes/Slow.js\";\nconst slowMode = \"slow\", minRadius = 0;\nexport class Slower extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear(particle, delta, force) {\n if (particle.slow.inRange && !force) {\n return;\n }\n particle.slow.factor = 1;\n }\n init() {\n const container = this.container, slow = container.actualOptions.interactivity.modes.slow;\n if (!slow) {\n return;\n }\n container.retina.slowModeRadius = slow.radius * container.retina.pixelRatio;\n }\n interact() {\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(slowMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.slow) {\n options.slow = new Slow();\n }\n for (const source of sources) {\n options.slow.load(source?.slow);\n }\n }\n reset(particle) {\n particle.slow.inRange = false;\n const container = this.container, options = container.actualOptions, mousePos = container.interactivity.mouse.position, radius = container.retina.slowModeRadius, slowOptions = options.interactivity.modes.slow;\n if (!slowOptions || !radius || radius < minRadius || !mousePos) {\n return;\n }\n const particlePos = particle.getPosition(), dist = getDistance(mousePos, particlePos), proximityFactor = dist / radius, slowFactor = slowOptions.factor, { slow } = particle;\n if (dist > radius) {\n return;\n }\n slow.inRange = true;\n slow.factor = proximityFactor / slowFactor;\n }\n}\n","import { ParticlesInteractorBase, getDistances, getRangeValue, } from \"@tsparticles/engine\";\nconst attractFactor = 1000, identity = 1;\nexport class Attractor extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n interact(p1) {\n const container = this.container;\n if (p1.attractDistance === undefined) {\n p1.attractDistance = getRangeValue(p1.options.move.attract.distance) * container.retina.pixelRatio;\n }\n const distance = p1.attractDistance, pos1 = p1.getPosition(), query = container.particles.quadTree.queryCircle(pos1, distance);\n for (const p2 of query) {\n if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), { dx, dy } = getDistances(pos1, pos2), rotate = p1.options.move.attract.rotate, ax = dx / (rotate.x * attractFactor), ay = dy / (rotate.y * attractFactor), p1Factor = p2.size.value / p1.size.value, p2Factor = identity / p1Factor;\n p1.velocity.x -= ax * p1Factor;\n p1.velocity.y -= ay * p1Factor;\n p2.velocity.x += ax * p2Factor;\n p2.velocity.y += ay * p2Factor;\n }\n }\n isEnabled(particle) {\n return particle.options.move.attract.enable;\n }\n reset() {\n }\n}\n","import { clamp } from \"@tsparticles/engine\";\nconst half = 0.5, absorbFactor = 10, minAbsorbFactor = 0;\nfunction updateAbsorb(p1, r1, p2, r2, delta, pixelRatio) {\n const factor = clamp((p1.options.collisions.absorb.speed * delta.factor) / absorbFactor, minAbsorbFactor, r2);\n p1.size.value += factor * half;\n p2.size.value -= factor;\n if (r2 <= pixelRatio) {\n p2.size.value = 0;\n p2.destroy();\n }\n}\nexport function absorb(p1, p2, delta, pixelRatio) {\n const r1 = p1.getRadius(), r2 = p2.getRadius();\n if (r1 === undefined && r2 !== undefined) {\n p1.destroy();\n }\n else if (r1 !== undefined && r2 === undefined) {\n p2.destroy();\n }\n else if (r1 !== undefined && r2 !== undefined) {\n if (r1 >= r2) {\n updateAbsorb(p1, r1, p2, r2, delta, pixelRatio);\n }\n else {\n updateAbsorb(p2, r2, p1, r1, delta, pixelRatio);\n }\n }\n}\n","import { circleBounce, circleBounceDataFromParticle, getRangeValue } from \"@tsparticles/engine\";\nconst fixBounceSpeed = (p) => {\n if (p.collisionMaxSpeed === undefined) {\n p.collisionMaxSpeed = getRangeValue(p.options.collisions.maxSpeed);\n }\n if (p.velocity.length > p.collisionMaxSpeed) {\n p.velocity.length = p.collisionMaxSpeed;\n }\n};\nexport function bounce(p1, p2) {\n circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));\n fixBounceSpeed(p1);\n fixBounceSpeed(p2);\n}\n","import { bounce } from \"./Bounce.js\";\nexport function destroy(p1, p2) {\n if (!p1.unbreakable && !p2.unbreakable) {\n bounce(p1, p2);\n }\n if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {\n p1.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {\n p2.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() !== undefined) {\n const deleteP = p1.getRadius() >= p2.getRadius() ? p2 : p1;\n deleteP.destroy();\n }\n}\n","import { absorb } from \"./Absorb.js\";\nimport { bounce } from \"./Bounce.js\";\nimport { destroy } from \"./Destroy.js\";\nexport function resolveCollision(p1, p2, delta, pixelRatio) {\n switch (p1.options.collisions.mode) {\n case \"absorb\": {\n absorb(p1, p2, delta, pixelRatio);\n break;\n }\n case \"bounce\": {\n bounce(p1, p2);\n break;\n }\n case \"destroy\": {\n destroy(p1, p2);\n break;\n }\n }\n}\n","import { ParticlesInteractorBase, getDistance } from \"@tsparticles/engine\";\nimport { resolveCollision } from \"./ResolveCollision.js\";\nconst double = 2;\nexport class Collider extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n interact(p1, delta) {\n if (p1.destroyed || p1.spawning) {\n return;\n }\n const container = this.container, pos1 = p1.getPosition(), radius1 = p1.getRadius(), query = container.particles.quadTree.queryCircle(pos1, radius1 * double);\n for (const p2 of query) {\n if (p1 === p2 ||\n !p2.options.collisions.enable ||\n p1.options.collisions.mode !== p2.options.collisions.mode ||\n p2.destroyed ||\n p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), radius2 = p2.getRadius();\n if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {\n continue;\n }\n const dist = getDistance(pos1, pos2), distP = radius1 + radius2;\n if (dist > distP) {\n continue;\n }\n resolveCollision(p1, p2, delta, container.retina.pixelRatio);\n }\n }\n isEnabled(particle) {\n return particle.options.collisions.enable;\n }\n reset() {\n }\n}\n","export async function loadLinksInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesLinks\", async (container) => {\n const { Linker } = await import(\"./Linker.js\");\n return new Linker(container);\n }, refresh);\n}\n","export async function loadLinksPlugin(engine, refresh = true) {\n const { LinksPlugin } = await import(\"./LinksPlugin.js\"), plugin = new LinksPlugin();\n await engine.addPlugin(plugin, refresh);\n}\n","export function drawEmoji(data) {\n const { context, particle, radius, opacity } = data, emojiData = particle.emojiData, double = 2, diameter = radius * double, previousAlpha = context.globalAlpha;\n if (!emojiData) {\n return;\n }\n context.globalAlpha = opacity;\n context.drawImage(emojiData, -radius, -radius, diameter, diameter);\n context.globalAlpha = previousAlpha;\n}\n","import { executeOnSingleOrMultiple, getRangeMax, isInArray, itemFromSingleOrMultiple, loadFont, } from \"@tsparticles/engine\";\nimport { drawEmoji } from \"./Utils.js\";\nimport { validTypes } from \"./Constants.js\";\nconst defaultFont = '\"Twemoji Mozilla\", Apple Color Emoji, \"Segoe UI Emoji\", \"Noto Color Emoji\", \"EmojiOne Color\"';\nexport class EmojiDrawer {\n constructor() {\n this._emojiShapeDict = new Map();\n }\n destroy() {\n for (const [key, emojiData] of this._emojiShapeDict) {\n if (emojiData instanceof ImageBitmap) {\n emojiData?.close();\n this._emojiShapeDict.delete(key);\n }\n }\n }\n draw(data) {\n drawEmoji(data);\n }\n async init(container) {\n const options = container.actualOptions;\n if (!validTypes.find((t) => isInArray(t, options.particles.shape.type))) {\n return;\n }\n const promises = [loadFont(defaultFont)], shapeOptions = validTypes\n .map((t) => options.particles.shape.options[t])\n .find((t) => !!t);\n if (shapeOptions) {\n executeOnSingleOrMultiple(shapeOptions, (shape) => {\n if (shape.font) {\n promises.push(loadFont(shape.font));\n }\n });\n }\n await Promise.all(promises);\n }\n particleDestroy(particle) {\n delete particle.emojiData;\n }\n particleInit(container, particle) {\n const double = 2, shapeData = particle.shapeData;\n if (!shapeData?.value) {\n return;\n }\n const emoji = itemFromSingleOrMultiple(shapeData.value, particle.randomIndexData), font = shapeData.font ?? defaultFont;\n if (!emoji) {\n return;\n }\n const key = `${emoji}_${font}`, existingData = this._emojiShapeDict.get(key);\n if (existingData) {\n particle.emojiData = existingData;\n return;\n }\n const canvasSize = getRangeMax(particle.size.value) * double;\n let emojiData;\n const maxSize = getRangeMax(particle.size.value);\n if (typeof OffscreenCanvas !== \"undefined\") {\n const canvas = new OffscreenCanvas(canvasSize, canvasSize), context = canvas.getContext(\"2d\");\n if (!context) {\n return;\n }\n context.font = `400 ${maxSize * double}px ${font}`;\n context.textBaseline = \"middle\";\n context.textAlign = \"center\";\n context.fillText(emoji, maxSize, maxSize);\n emojiData = canvas.transferToImageBitmap();\n }\n else {\n const canvas = document.createElement(\"canvas\");\n canvas.width = canvasSize;\n canvas.height = canvasSize;\n const context = canvas.getContext(\"2d\");\n if (!context) {\n return;\n }\n context.font = `400 ${maxSize * double}px ${font}`;\n context.textBaseline = \"middle\";\n context.textAlign = \"center\";\n context.fillText(emoji, maxSize, maxSize);\n emojiData = canvas;\n }\n this._emojiShapeDict.set(key, emojiData);\n particle.emojiData = emojiData;\n }\n}\n","export const InterlaceOffsets = [0, 4, 2, 1];\nexport const InterlaceSteps = [8, 8, 4, 2];\n","export class ByteStream {\n constructor(bytes) {\n this.pos = 0;\n this.data = new Uint8ClampedArray(bytes);\n }\n getString(count) {\n const slice = this.data.slice(this.pos, this.pos + count);\n this.pos += slice.length;\n return slice.reduce((acc, curr) => acc + String.fromCharCode(curr), \"\");\n }\n nextByte() {\n return this.data[this.pos++];\n }\n nextTwoBytes() {\n const increment = 2, previous = 1, shift = 8;\n this.pos += increment;\n return this.data[this.pos - increment] + (this.data[this.pos - previous] << shift);\n }\n readSubBlocks() {\n let blockString = \"\", size = 0;\n const minCount = 0, emptySize = 0;\n do {\n size = this.data[this.pos++];\n for (let count = size; --count >= minCount; blockString += String.fromCharCode(this.data[this.pos++])) {\n }\n } while (size !== emptySize);\n return blockString;\n }\n readSubBlocksBin() {\n let size = this.data[this.pos], len = 0;\n const emptySize = 0, increment = 1;\n for (let offset = 0; size !== emptySize; offset += size + increment, size = this.data[this.pos + offset]) {\n len += size;\n }\n const blockData = new Uint8Array(len);\n size = this.data[this.pos++];\n for (let i = 0; size !== emptySize; size = this.data[this.pos++]) {\n for (let count = size; --count >= emptySize; blockData[i++] = this.data[this.pos++]) {\n }\n }\n return blockData;\n }\n skipSubBlocks() {\n for (const increment = 1, noData = 0; this.data[this.pos] !== noData; this.pos += this.data[this.pos] + increment) {\n }\n this.pos++;\n }\n}\n","import { InterlaceOffsets, InterlaceSteps } from \"./Constants.js\";\nimport { ByteStream } from \"./ByteStream.js\";\nconst origin = {\n x: 0,\n y: 0,\n}, defaultFrame = 0, half = 0.5, initialTime = 0, firstIndex = 0, defaultLoopCount = 0;\nfunction parseColorTable(byteStream, count) {\n const colors = [];\n for (let i = 0; i < count; i++) {\n colors.push({\n r: byteStream.data[byteStream.pos],\n g: byteStream.data[byteStream.pos + 1],\n b: byteStream.data[byteStream.pos + 2],\n });\n byteStream.pos += 3;\n }\n return colors;\n}\nfunction parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex) {\n switch (byteStream.nextByte()) {\n case 249: {\n const frame = gif.frames[getFrameIndex(false)];\n byteStream.pos++;\n const packedByte = byteStream.nextByte();\n frame.GCreserved = (packedByte & 0xe0) >>> 5;\n frame.disposalMethod = (packedByte & 0x1c) >>> 2;\n frame.userInputDelayFlag = (packedByte & 2) === 2;\n const transparencyFlag = (packedByte & 1) === 1;\n frame.delayTime = byteStream.nextTwoBytes() * 0xa;\n const transparencyIndex = byteStream.nextByte();\n if (transparencyFlag) {\n getTransparencyIndex(transparencyIndex);\n }\n byteStream.pos++;\n break;\n }\n case 255: {\n byteStream.pos++;\n const applicationExtension = {\n identifier: byteStream.getString(8),\n authenticationCode: byteStream.getString(3),\n data: byteStream.readSubBlocksBin(),\n };\n gif.applicationExtensions.push(applicationExtension);\n break;\n }\n case 254: {\n gif.comments.push([getFrameIndex(false), byteStream.readSubBlocks()]);\n break;\n }\n case 1: {\n if (gif.globalColorTable.length === 0) {\n throw new EvalError(\"plain text extension without global color table\");\n }\n byteStream.pos++;\n gif.frames[getFrameIndex(false)].plainTextData = {\n left: byteStream.nextTwoBytes(),\n top: byteStream.nextTwoBytes(),\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n charSize: {\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n },\n foregroundColor: byteStream.nextByte(),\n backgroundColor: byteStream.nextByte(),\n text: byteStream.readSubBlocks(),\n };\n break;\n }\n default:\n byteStream.skipSubBlocks();\n break;\n }\n}\nasync function parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n const frame = gif.frames[getFrameIndex(true)];\n frame.left = byteStream.nextTwoBytes();\n frame.top = byteStream.nextTwoBytes();\n frame.width = byteStream.nextTwoBytes();\n frame.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), localColorTableFlag = (packedByte & 0x80) === 0x80, interlacedFlag = (packedByte & 0x40) === 0x40;\n frame.sortFlag = (packedByte & 0x20) === 0x20;\n frame.reserved = (packedByte & 0x18) >>> 3;\n const localColorCount = 1 << ((packedByte & 7) + 1);\n if (localColorTableFlag) {\n frame.localColorTable = parseColorTable(byteStream, localColorCount);\n }\n const getColor = (index) => {\n const { r, g, b } = (localColorTableFlag ? frame.localColorTable : gif.globalColorTable)[index];\n if (index !== getTransparencyIndex(null)) {\n return { r, g, b, a: 255 };\n }\n return { r, g, b, a: avgAlpha ? ~~((r + g + b) / 3) : 0 };\n };\n const image = (() => {\n try {\n return new ImageData(frame.width, frame.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (image == null) {\n throw new EvalError(\"GIF frame size is to large\");\n }\n const minCodeSize = byteStream.nextByte(), imageData = byteStream.readSubBlocksBin(), clearCode = 1 << minCodeSize;\n const readBits = (pos, len) => {\n const bytePos = pos >>> 3, bitPos = pos & 7;\n return (((imageData[bytePos] + (imageData[bytePos + 1] << 8) + (imageData[bytePos + 2] << 16)) &\n (((1 << len) - 1) << bitPos)) >>>\n bitPos);\n };\n if (interlacedFlag) {\n for (let code = 0, size = minCodeSize + 1, pos = 0, dic = [[0]], pass = 0; pass < 4; pass++) {\n if (InterlaceOffsets[pass] < frame.height) {\n let pixelPos = 0, lineIndex = 0, exit = false;\n while (!exit) {\n const last = code;\n code = readBits(pos, size);\n pos += size + 1;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (const item of dic[code]) {\n const { r, g, b, a } = getColor(item);\n image.data.set([r, g, b, a], InterlaceOffsets[pass] * frame.width +\n InterlaceSteps[pass] * lineIndex +\n (pixelPos % (frame.width * 4)));\n pixelPos += 4;\n }\n if (dic.length === 1 << size && size < 0xc) {\n size++;\n }\n }\n if (pixelPos === frame.width * 4 * (lineIndex + 1)) {\n lineIndex++;\n if (InterlaceOffsets[pass] + InterlaceSteps[pass] * lineIndex >= frame.height) {\n exit = true;\n }\n }\n }\n }\n progressCallback?.(byteStream.pos / (byteStream.data.length - 1), getFrameIndex(false) + 1, image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n }\n else {\n let code = 0, size = minCodeSize + 1, pos = 0, pixelPos = -4, exit = false;\n const dic = [[0]];\n while (!exit) {\n const last = code;\n code = readBits(pos, size);\n pos += size;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code === clearCode + 1) {\n exit = true;\n break;\n }\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (const item of dic[code]) {\n const { r, g, b, a } = getColor(item);\n image.data.set([r, g, b, a], (pixelPos += 4));\n }\n if (dic.length >= 1 << size && size < 0xc) {\n size++;\n }\n }\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n progressCallback?.((byteStream.pos + 1) / byteStream.data.length, getFrameIndex(false) + 1, frame.image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n}\nasync function parseBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n switch (byteStream.nextByte()) {\n case 59:\n return true;\n case 44:\n await parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback);\n break;\n case 33:\n parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex);\n break;\n default:\n throw new EvalError(\"undefined block found\");\n }\n return false;\n}\nexport function getGIFLoopAmount(gif) {\n for (const extension of gif.applicationExtensions) {\n if (extension.identifier + extension.authenticationCode !== \"NETSCAPE2.0\") {\n continue;\n }\n return extension.data[1] + (extension.data[2] << 8);\n }\n return NaN;\n}\nexport async function decodeGIF(gifURL, progressCallback, avgAlpha) {\n if (!avgAlpha)\n avgAlpha = false;\n const res = await fetch(gifURL);\n if (!res.ok && res.status === 404) {\n throw new EvalError(\"file not found\");\n }\n const buffer = await res.arrayBuffer();\n const gif = {\n width: 0,\n height: 0,\n totalTime: 0,\n colorRes: 0,\n pixelAspectRatio: 0,\n frames: [],\n sortFlag: false,\n globalColorTable: [],\n backgroundImage: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n comments: [],\n applicationExtensions: [],\n }, byteStream = new ByteStream(new Uint8ClampedArray(buffer));\n if (byteStream.getString(6) !== \"GIF89a\") {\n throw new Error(\"not a supported GIF file\");\n }\n gif.width = byteStream.nextTwoBytes();\n gif.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), globalColorTableFlag = (packedByte & 0x80) === 0x80;\n gif.colorRes = (packedByte & 0x70) >>> 4;\n gif.sortFlag = (packedByte & 8) === 8;\n const globalColorCount = 1 << ((packedByte & 7) + 1), backgroundColorIndex = byteStream.nextByte();\n gif.pixelAspectRatio = byteStream.nextByte();\n if (gif.pixelAspectRatio !== 0) {\n gif.pixelAspectRatio = (gif.pixelAspectRatio + 0xf) / 0x40;\n }\n if (globalColorTableFlag) {\n gif.globalColorTable = parseColorTable(byteStream, globalColorCount);\n }\n const backgroundImage = (() => {\n try {\n return new ImageData(gif.width, gif.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (backgroundImage == null) {\n throw new Error(\"GIF frame size is to large\");\n }\n const { r, g, b } = gif.globalColorTable[backgroundColorIndex];\n backgroundImage.data.set(globalColorTableFlag ? [r, g, b, 255] : [0, 0, 0, 0]);\n for (let i = 4; i < backgroundImage.data.length; i *= 2) {\n backgroundImage.data.copyWithin(i, 0, i);\n }\n gif.backgroundImage = backgroundImage;\n let frameIndex = -1, incrementFrameIndex = true, transparencyIndex = -1;\n const getframeIndex = (increment) => {\n if (increment) {\n incrementFrameIndex = true;\n }\n return frameIndex;\n };\n const getTransparencyIndex = (newValue) => {\n if (newValue != null) {\n transparencyIndex = newValue;\n }\n return transparencyIndex;\n };\n try {\n do {\n if (incrementFrameIndex) {\n gif.frames.push({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n disposalMethod: 0,\n image: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n plainTextData: null,\n userInputDelayFlag: false,\n delayTime: 0,\n sortFlag: false,\n localColorTable: [],\n reserved: 0,\n GCreserved: 0,\n });\n frameIndex++;\n transparencyIndex = -1;\n incrementFrameIndex = false;\n }\n } while (!(await parseBlock(byteStream, gif, avgAlpha, getframeIndex, getTransparencyIndex, progressCallback)));\n gif.frames.length--;\n for (const frame of gif.frames) {\n if (frame.userInputDelayFlag && frame.delayTime === 0) {\n gif.totalTime = Infinity;\n break;\n }\n gif.totalTime += frame.delayTime;\n }\n return gif;\n }\n catch (error) {\n if (error instanceof EvalError) {\n throw new Error(`error while parsing frame ${frameIndex} \"${error.message}\"`);\n }\n throw error;\n }\n}\nexport function drawGif(data) {\n const { context, radius, particle, delta } = data, image = particle.image;\n if (!image?.gifData || !image.gif) {\n return;\n }\n const offscreenCanvas = new OffscreenCanvas(image.gifData.width, image.gifData.height), offscreenContext = offscreenCanvas.getContext(\"2d\");\n if (!offscreenContext) {\n throw new Error(\"could not create offscreen canvas context\");\n }\n offscreenContext.imageSmoothingQuality = \"low\";\n offscreenContext.imageSmoothingEnabled = false;\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n if (particle.gifLoopCount === undefined) {\n particle.gifLoopCount = image.gifLoopCount ?? defaultLoopCount;\n }\n let frameIndex = particle.gifFrame ?? defaultFrame;\n const pos = { x: -image.gifData.width * half, y: -image.gifData.height * half }, frame = image.gifData.frames[frameIndex];\n if (particle.gifTime === undefined) {\n particle.gifTime = initialTime;\n }\n if (!frame.bitmap) {\n return;\n }\n context.scale(radius / image.gifData.width, radius / image.gifData.height);\n switch (frame.disposalMethod) {\n case 4:\n case 5:\n case 6:\n case 7:\n case 0:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n break;\n case 1:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n break;\n case 2:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n if (!image.gifData.globalColorTable.length) {\n offscreenContext.putImageData(image.gifData.frames[firstIndex].image, pos.x + frame.left, pos.y + frame.top);\n }\n else {\n offscreenContext.putImageData(image.gifData.backgroundImage, pos.x, pos.y);\n }\n break;\n case 3:\n {\n const previousImageData = offscreenContext.getImageData(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.putImageData(previousImageData, origin.x, origin.y);\n }\n break;\n }\n particle.gifTime += delta.value;\n if (particle.gifTime > frame.delayTime) {\n particle.gifTime -= frame.delayTime;\n if (++frameIndex >= image.gifData.frames.length) {\n if (--particle.gifLoopCount <= defaultLoopCount) {\n return;\n }\n frameIndex = firstIndex;\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n }\n particle.gifFrame = frameIndex;\n }\n context.scale(image.gifData.width / radius, image.gifData.height / radius);\n}\nexport async function loadGifImage(image) {\n if (image.type !== \"gif\") {\n const { loadImage } = await import(\"../Utils.js\");\n await loadImage(image);\n return;\n }\n image.loading = true;\n try {\n image.gifData = await decodeGIF(image.source);\n image.gifLoopCount = getGIFLoopAmount(image.gifData) ?? defaultLoopCount;\n if (!image.gifLoopCount) {\n image.gifLoopCount = Infinity;\n }\n }\n catch {\n image.error = true;\n }\n image.loading = false;\n}\n","export class Preload {\n constructor() {\n this.src = \"\";\n this.gif = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.gif !== undefined) {\n this.gif = data.gif;\n }\n if (data.height !== undefined) {\n this.height = data.height;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n if (data.replaceColor !== undefined) {\n this.replaceColor = data.replaceColor;\n }\n if (data.src !== undefined) {\n this.src = data.src;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n","import { Preload } from \"./Options/Classes/Preload.js\";\nexport class ImagePreloaderPlugin {\n constructor(engine) {\n this.id = \"imagePreloader\";\n this._engine = engine;\n }\n async getPlugin() {\n await Promise.resolve();\n return {};\n }\n loadOptions(options, source) {\n if (!source?.preload) {\n return;\n }\n if (!options.preload) {\n options.preload = [];\n }\n const preloadOptions = options.preload;\n for (const item of source.preload) {\n const existing = preloadOptions.find((t) => t.name === item.name || t.src === item.src);\n if (existing) {\n existing.load(item);\n }\n else {\n const preload = new Preload();\n preload.load(item);\n preloadOptions.push(preload);\n }\n }\n }\n needsPlugin() {\n return true;\n }\n}\n","import { errorPrefix } from \"@tsparticles/engine\";\nimport { replaceImageColor } from \"./Utils.js\";\nimport { drawGif } from \"./GifUtils/Utils.js\";\nconst double = 2, defaultAlpha = 1, sides = 12, defaultRatio = 1;\nexport class ImageDrawer {\n constructor(engine) {\n this.loadImageShape = async (imageShape) => {\n if (!this._engine.loadImage) {\n throw new Error(`${errorPrefix} image shape not initialized`);\n }\n await this._engine.loadImage({\n gif: imageShape.gif,\n name: imageShape.name,\n replaceColor: imageShape.replaceColor ?? false,\n src: imageShape.src,\n });\n };\n this._engine = engine;\n }\n addImage(image) {\n if (!this._engine.images) {\n this._engine.images = [];\n }\n this._engine.images.push(image);\n }\n draw(data) {\n const { context, radius, particle, opacity } = data, image = particle.image, element = image?.element;\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n if (image.gif && image.gifData) {\n drawGif(data);\n }\n else if (element) {\n const ratio = image.ratio, pos = {\n x: -radius,\n y: -radius,\n }, diameter = radius * double;\n context.drawImage(element, pos.x, pos.y, diameter, diameter / ratio);\n }\n context.globalAlpha = defaultAlpha;\n }\n getSidesCount() {\n return sides;\n }\n async init(container) {\n const options = container.actualOptions;\n if (!options.preload || !this._engine.loadImage) {\n return;\n }\n for (const imageData of options.preload) {\n await this._engine.loadImage(imageData);\n }\n }\n loadShape(particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const imageData = particle.shapeData;\n if (!imageData) {\n return;\n }\n const image = this._engine.images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n void this.loadImageShape(imageData).then(() => {\n this.loadShape(particle);\n });\n }\n }\n particleInit(container, particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const images = this._engine.images, imageData = particle.shapeData;\n if (!imageData) {\n return;\n }\n const color = particle.getFillColor(), image = images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n return;\n }\n const replaceColor = imageData.replaceColor ?? image.replaceColor;\n if (image.loading) {\n setTimeout(() => {\n this.particleInit(container, particle);\n });\n return;\n }\n void (async () => {\n let imageRes;\n if (image.svgData && color) {\n imageRes = await replaceImageColor(image, imageData, color, particle);\n }\n else {\n imageRes = {\n color,\n data: image,\n element: image.element,\n gif: image.gif,\n gifData: image.gifData,\n gifLoopCount: image.gifLoopCount,\n loaded: true,\n ratio: imageData.width && imageData.height\n ? imageData.width / imageData.height\n : image.ratio ?? defaultRatio,\n replaceColor: replaceColor,\n source: imageData.src,\n };\n }\n if (!imageRes.ratio) {\n imageRes.ratio = 1;\n }\n const fill = imageData.fill ?? particle.shapeFill, close = imageData.close ?? particle.shapeClose, imageShape = {\n image: imageRes,\n fill,\n close,\n };\n particle.image = imageShape.image;\n particle.shapeFill = imageShape.fill;\n particle.shapeClose = imageShape.close;\n })();\n }\n}\n","export function drawLine(data) {\n const { context, particle, radius } = data, shapeData = particle.shapeData, centerY = 0;\n context.moveTo(-radius, centerY);\n context.lineTo(radius, centerY);\n context.lineCap = shapeData?.cap ?? \"butt\";\n}\n","import { drawLine } from \"./Utils.js\";\nconst sides = 1;\nexport class LineDrawer {\n draw(data) {\n drawLine(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n","import { degToRad } from \"@tsparticles/engine\";\nconst piDeg = 180, origin = { x: 0, y: 0 }, sidesOffset = 2;\nexport function drawPolygon(data, start, side) {\n const { context } = data, sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (piDeg * (decimalSides - sidesOffset)) / decimalSides, interiorAngle = Math.PI - degToRad(interiorAngleDegrees);\n if (!context) {\n return;\n }\n context.beginPath();\n context.translate(start.x, start.y);\n context.moveTo(origin.x, origin.y);\n for (let i = 0; i < sideCount; i++) {\n context.lineTo(side.length, origin.y);\n context.translate(side.length, origin.y);\n context.rotate(interiorAngle);\n }\n}\n","import { getRangeValue, } from \"@tsparticles/engine\";\nimport { drawPolygon } from \"./Utils.js\";\nconst defaultSides = 5;\nexport class PolygonDrawerBase {\n draw(data) {\n const { particle, radius } = data, start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius);\n drawPolygon(data, start, side);\n }\n getSidesCount(particle) {\n const polygon = particle.shapeData;\n return Math.round(getRangeValue(polygon?.sides ?? defaultSides));\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase.js\";\nconst sidesCenterFactor = 3.5, yFactor = 2.66, sidesFactor = 3;\nexport class PolygonDrawer extends PolygonDrawerBase {\n getCenter(particle, radius) {\n return {\n x: -radius / (particle.sides / sidesCenterFactor),\n y: -radius / (yFactor / sidesCenterFactor),\n };\n }\n getSidesData(particle, radius) {\n const sides = particle.sides;\n return {\n count: {\n denominator: 1,\n numerator: sides,\n },\n length: (radius * yFactor) / (sides / sidesFactor),\n };\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase.js\";\nconst yFactor = 1.66, sides = 3, double = 2;\nexport class TriangleDrawer extends PolygonDrawerBase {\n getCenter(particle, radius) {\n return {\n x: -radius,\n y: radius / yFactor,\n };\n }\n getSidesCount() {\n return sides;\n }\n getSidesData(particle, radius) {\n const diameter = radius * double;\n return {\n count: {\n denominator: 2,\n numerator: 3,\n },\n length: diameter,\n };\n }\n}\n","const fixFactorSquared = 2, fixFactor = Math.sqrt(fixFactorSquared), double = 2;\nexport function drawSquare(data) {\n const { context, radius } = data, fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * double;\n context.rect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter);\n}\n","import { drawSquare } from \"./Utils.js\";\nconst sides = 4;\nexport class SquareDrawer {\n draw(data) {\n drawSquare(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n","const defaultInset = 2, origin = { x: 0, y: 0 };\nexport function drawStar(data) {\n const { context, particle, radius } = data, sides = particle.sides, inset = particle.starInset ?? defaultInset;\n context.moveTo(origin.x, origin.y - radius);\n for (let i = 0; i < sides; i++) {\n context.rotate(Math.PI / sides);\n context.lineTo(origin.x, origin.y - radius * inset);\n context.rotate(Math.PI / sides);\n context.lineTo(origin.x, origin.y - radius);\n }\n}\n","import { getRangeValue, } from \"@tsparticles/engine\";\nimport { drawStar } from \"./Utils.js\";\nconst defaultInset = 2, defaultSides = 5;\nexport class StarDrawer {\n draw(data) {\n drawStar(data);\n }\n getSidesCount(particle) {\n const star = particle.shapeData;\n return Math.round(getRangeValue(star?.sides ?? defaultSides));\n }\n particleInit(container, particle) {\n const star = particle.shapeData;\n particle.starInset = getRangeValue(star?.inset ?? defaultInset);\n }\n}\n","import { ValueWithRandom } from \"@tsparticles/engine\";\nexport class LifeDelay extends ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ValueWithRandom } from \"@tsparticles/engine\";\nexport class LifeDuration extends ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { LifeDelay } from \"./LifeDelay.js\";\nimport { LifeDuration } from \"./LifeDuration.js\";\nexport class Life {\n constructor() {\n this.count = 0;\n this.delay = new LifeDelay();\n this.duration = new LifeDuration();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n","import { getRangeValue, millisecondsToSeconds, randomInRange, setRangeValue, } from \"@tsparticles/engine\";\nconst noTime = 0, infiniteValue = -1, noLife = 0, minCanvasSize = 0;\nexport function updateLife(particle, delta, canvasSize) {\n if (!particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = noTime;\n life.time = noTime;\n }\n else {\n return;\n }\n }\n if (life.duration === infiniteValue) {\n return;\n }\n if (particle.spawning) {\n return;\n }\n if (justSpawned) {\n life.time = noTime;\n }\n else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = noTime;\n if (particle.life.count > noLife) {\n particle.life.count--;\n }\n if (particle.life.count === noLife) {\n particle.destroy();\n return;\n }\n const widthRange = setRangeValue(minCanvasSize, canvasSize.width), heightRange = setRangeValue(minCanvasSize, canvasSize.width);\n particle.position.x = randomInRange(widthRange);\n particle.position.y = randomInRange(heightRange);\n particle.spawning = true;\n life.delayTime = noTime;\n life.time = noTime;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = getRangeValue(lifeOptions.delay.value) * millisecondsToSeconds;\n life.duration = getRangeValue(lifeOptions.duration.value) * millisecondsToSeconds;\n }\n}\n","import { getRandom, getRangeValue, millisecondsToSeconds, } from \"@tsparticles/engine\";\nimport { Life } from \"./Options/Classes/Life.js\";\nimport { updateLife } from \"./Utils.js\";\nconst noTime = 0, identity = 1, infiniteValue = -1;\nexport class LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container, particlesOptions = particle.options, lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? identity : getRandom())) /\n container.retina.reduceFactor) *\n millisecondsToSeconds\n : noTime,\n delayTime: noTime,\n duration: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? identity : getRandom())) /\n container.retina.reduceFactor) *\n millisecondsToSeconds\n : noTime,\n time: noTime,\n count: lifeOptions.count,\n };\n if (particle.life.duration <= noTime) {\n particle.life.duration = infiniteValue;\n }\n if (particle.life.count <= noTime) {\n particle.life.count = infiniteValue;\n }\n if (particle.life) {\n particle.spawning = particle.life.delay > noTime;\n }\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.life) {\n options.life = new Life();\n }\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n updateLife(particle, delta, this.container.canvas.size);\n }\n}\n","import { setRangeValue } from \"@tsparticles/engine\";\nexport class RotateAnimation {\n constructor() {\n this.enable = false;\n this.speed = 0;\n this.decay = 0;\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ValueWithRandom, } from \"@tsparticles/engine\";\nimport { RotateAnimation } from \"./RotateAnimation.js\";\nexport class Rotate extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new RotateAnimation();\n this.direction = \"clockwise\";\n this.path = false;\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n this.animation.load(data.animation);\n if (data.path !== undefined) {\n this.path = data.path;\n }\n }\n}\n","import { degToRad, getRandom, getRangeValue, updateAnimation, } from \"@tsparticles/engine\";\nimport { Rotate } from \"./Options/Classes/Rotate.js\";\nconst double = 2, doublePI = Math.PI * double, identity = 1, doublePIDeg = 360;\nexport class RotateUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const rotateOptions = particle.options.rotate;\n if (!rotateOptions) {\n return;\n }\n particle.rotate = {\n enable: rotateOptions.animation.enable,\n value: degToRad(getRangeValue(rotateOptions.value)),\n min: 0,\n max: doublePI,\n };\n particle.pathRotation = rotateOptions.path;\n let rotateDirection = rotateOptions.direction;\n if (rotateDirection === \"random\") {\n const index = Math.floor(getRandom() * double), minIndex = 0;\n rotateDirection = index > minIndex ? \"counter-clockwise\" : \"clockwise\";\n }\n switch (rotateDirection) {\n case \"counter-clockwise\":\n case \"counterClockwise\":\n particle.rotate.status = \"decreasing\";\n break;\n case \"clockwise\":\n particle.rotate.status = \"increasing\";\n break;\n }\n const rotateAnimation = rotateOptions.animation;\n if (rotateAnimation.enable) {\n particle.rotate.decay = identity - getRangeValue(rotateAnimation.decay);\n particle.rotate.velocity =\n (getRangeValue(rotateAnimation.speed) / doublePIDeg) * this.container.retina.reduceFactor;\n if (!rotateAnimation.sync) {\n particle.rotate.velocity *= getRandom();\n }\n }\n particle.rotation = particle.rotate.value;\n }\n isEnabled(particle) {\n const rotate = particle.options.rotate;\n if (!rotate) {\n return false;\n }\n return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;\n }\n loadOptions(options, ...sources) {\n if (!options.rotate) {\n options.rotate = new Rotate();\n }\n for (const source of sources) {\n options.rotate.load(source?.rotate);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n if (!particle.rotate) {\n return;\n }\n updateAnimation(particle, particle.rotate, false, \"none\", delta);\n particle.rotation = particle.rotate.value;\n }\n}\n","import { getHslAnimationFromHsl, getRangeValue, itemFromSingleOrMultiple, rangeColorToHsl, updateColor, } from \"@tsparticles/engine\";\nconst defaultOpacity = 1;\nexport class StrokeColorUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container, options = particle.options;\n const stroke = itemFromSingleOrMultiple(options.stroke, particle.id, options.reduceDuplicates);\n particle.strokeWidth = getRangeValue(stroke.width) * container.retina.pixelRatio;\n particle.strokeOpacity = getRangeValue(stroke.opacity ?? defaultOpacity);\n particle.strokeAnimation = stroke.color?.animation;\n const strokeHslColor = rangeColorToHsl(stroke.color) ?? particle.getFillColor();\n if (strokeHslColor) {\n particle.strokeColor = getHslAnimationFromHsl(strokeHslColor, particle.strokeAnimation, container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const color = particle.strokeAnimation, { strokeColor } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n !!color &&\n ((strokeColor?.h.value !== undefined && strokeColor.h.enable) ||\n (strokeColor?.s.value !== undefined && strokeColor.s.enable) ||\n (strokeColor?.l.value !== undefined && strokeColor.l.enable)));\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateColor(particle.strokeColor, delta);\n }\n}\n","export async function loadBaseMover(engine, refresh = true) {\n await engine.addMover(\"base\", async () => {\n const { BaseMover } = await import(\"./BaseMover.js\");\n return new BaseMover();\n }, refresh);\n}\n","export async function loadCircleShape(engine, refresh = true) {\n const { CircleDrawer } = await import(\"./CircleDrawer.js\");\n await engine.addShape(\"circle\", new CircleDrawer(), refresh);\n}\n","export async function loadColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"color\", async (container) => {\n const { ColorUpdater } = await import(\"./ColorUpdater.js\");\n return new ColorUpdater(container);\n }, refresh);\n}\n","export async function loadOpacityUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"opacity\", async (container) => {\n const { OpacityUpdater } = await import(\"./OpacityUpdater.js\");\n return new OpacityUpdater(container);\n }, refresh);\n}\n","export async function loadOutModesUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"outModes\", async (container) => {\n const { OutOfCanvasUpdater } = await import(\"./OutOfCanvasUpdater.js\");\n return new OutOfCanvasUpdater(container);\n }, refresh);\n}\n","export async function loadSizeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"size\", async () => {\n const { SizeUpdater } = await import(\"./SizeUpdater.js\");\n return new SizeUpdater();\n }, refresh);\n}\n","import { Circle, Rectangle } from \"@tsparticles/engine\";\nconst double = 2;\nexport class CircleWarp extends Circle {\n constructor(x, y, radius, canvasSize) {\n super(x, y, radius);\n this.canvasSize = canvasSize;\n this.canvasSize = { ...canvasSize };\n }\n contains(point) {\n const { width, height } = this.canvasSize, { x, y } = point;\n return (super.contains(point) ||\n super.contains({ x: x - width, y }) ||\n super.contains({ x: x - width, y: y - height }) ||\n super.contains({ x, y: y - height }));\n }\n intersects(range) {\n if (super.intersects(range)) {\n return true;\n }\n const rect = range, circle = range, newPos = {\n x: range.position.x - this.canvasSize.width,\n y: range.position.y - this.canvasSize.height,\n };\n if (circle.radius !== undefined) {\n const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * double);\n return super.intersects(biggerCircle);\n }\n else if (rect.size !== undefined) {\n const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * double, rect.size.height * double);\n return super.intersects(rectSW);\n }\n return false;\n }\n}\n","import { Circle, ParticlesInteractorBase, getDistances, getLinkRandomColor, } from \"@tsparticles/engine\";\nimport { CircleWarp } from \"./CircleWarp.js\";\nimport { Links } from \"./Options/Classes/Links.js\";\nconst squarePower = 2, opacityOffset = 1, origin = {\n x: 0,\n y: 0,\n}, minDistance = 0;\nfunction getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {\n const { dx, dy, distance } = getDistances(pos1, pos2);\n if (!warp || distance <= optDistance) {\n return distance;\n }\n const absDiffs = {\n x: Math.abs(dx),\n y: Math.abs(dy),\n }, warpDistances = {\n x: Math.min(absDiffs.x, canvasSize.width - absDiffs.x),\n y: Math.min(absDiffs.y, canvasSize.height - absDiffs.y),\n };\n return Math.sqrt(warpDistances.x ** squarePower + warpDistances.y ** squarePower);\n}\nexport class Linker extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n this._setColor = (p1) => {\n if (!p1.options.links) {\n return;\n }\n const container = this.linkContainer, linksOptions = p1.options.links;\n let linkColor = linksOptions.id === undefined\n ? container.particles.linksColor\n : container.particles.linksColors.get(linksOptions.id);\n if (linkColor) {\n return;\n }\n const optColor = linksOptions.color;\n linkColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);\n if (linksOptions.id === undefined) {\n container.particles.linksColor = linkColor;\n }\n else {\n container.particles.linksColors.set(linksOptions.id, linkColor);\n }\n };\n this.linkContainer = container;\n }\n clear() {\n }\n init() {\n this.linkContainer.particles.linksColor = undefined;\n this.linkContainer.particles.linksColors = new Map();\n }\n interact(p1) {\n if (!p1.options.links) {\n return;\n }\n p1.links = [];\n const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;\n if (pos1.x < origin.x || pos1.y < origin.y || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {\n return;\n }\n const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance, warp = linkOpt1.warp;\n let range;\n if (warp) {\n range = new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize);\n }\n else {\n range = new Circle(pos1.x, pos1.y, optDistance);\n }\n const query = container.particles.quadTree.query(range);\n for (const p2 of query) {\n const linkOpt2 = p2.options.links;\n if (p1 === p2 ||\n !linkOpt2?.enable ||\n linkOpt1.id !== linkOpt2.id ||\n p2.spawning ||\n p2.destroyed ||\n !p2.links ||\n p1.links.some((t) => t.destination === p2) ||\n p2.links.some((t) => t.destination === p1)) {\n continue;\n }\n const pos2 = p2.getPosition();\n if (pos2.x < origin.x || pos2.y < origin.y || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {\n continue;\n }\n const distance = getLinkDistance(pos1, pos2, optDistance, canvasSize, warp && linkOpt2.warp);\n if (distance > optDistance) {\n continue;\n }\n const opacityLine = (opacityOffset - distance / optDistance) * optOpacity;\n this._setColor(p1);\n p1.links.push({\n destination: p2,\n opacity: opacityLine,\n });\n }\n }\n isEnabled(particle) {\n return !!particle.options.links?.enable;\n }\n loadParticlesOptions(options, ...sources) {\n if (!options.links) {\n options.links = new Links();\n }\n for (const source of sources) {\n options.links.load(source?.links);\n }\n }\n reset() {\n }\n}\n","export class LinksPlugin {\n constructor() {\n this.id = \"links\";\n }\n async getPlugin(container) {\n const { LinkInstance } = await import(\"./LinkInstance.js\");\n return new LinkInstance(container);\n }\n loadOptions() {\n }\n needsPlugin() {\n return true;\n }\n}\n","import { clamp, getDistance, getDistances, getRandom, getRangeValue, } from \"@tsparticles/engine\";\nconst half = 0.5, minVelocity = 0, identity = 1, moveSpeedFactor = 60, minSpinRadius = 0, spinFactor = 0.01;\nexport function applyDistance(particle) {\n const initialPosition = particle.initialPosition, { dx, dy } = getDistances(initialPosition, particle.position), dxFixed = Math.abs(dx), dyFixed = Math.abs(dy), { maxDistance } = particle.retina, hDistance = maxDistance.horizontal, vDistance = maxDistance.vertical;\n if (!hDistance && !vDistance) {\n return;\n }\n const hasHDistance = (hDistance && dxFixed >= hDistance) ?? false, hasVDistance = (vDistance && dyFixed >= vDistance) ?? false;\n if ((hasHDistance || hasVDistance) && !particle.misplaced) {\n particle.misplaced = (!!hDistance && dxFixed > hDistance) || (!!vDistance && dyFixed > vDistance);\n if (hDistance) {\n particle.velocity.x = particle.velocity.y * half - particle.velocity.x;\n }\n if (vDistance) {\n particle.velocity.y = particle.velocity.x * half - particle.velocity.y;\n }\n }\n else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {\n particle.misplaced = false;\n }\n else if (particle.misplaced) {\n const pos = particle.position, vel = particle.velocity;\n if (hDistance &&\n ((pos.x < initialPosition.x && vel.x < minVelocity) || (pos.x > initialPosition.x && vel.x > minVelocity))) {\n vel.x *= -getRandom();\n }\n if (vDistance &&\n ((pos.y < initialPosition.y && vel.y < minVelocity) || (pos.y > initialPosition.y && vel.y > minVelocity))) {\n vel.y *= -getRandom();\n }\n }\n}\nexport function move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta) {\n applyPath(particle, delta);\n const gravityOptions = particle.gravity, gravityFactor = gravityOptions?.enable && gravityOptions.inverse ? -identity : identity;\n if (moveDrift && moveSpeed) {\n particle.velocity.x += (moveDrift * delta.factor) / (moveSpeedFactor * moveSpeed);\n }\n if (gravityOptions?.enable && moveSpeed) {\n particle.velocity.y +=\n (gravityFactor * (gravityOptions.acceleration * delta.factor)) / (moveSpeedFactor * moveSpeed);\n }\n const decay = particle.moveDecay;\n particle.velocity.multTo(decay);\n const velocity = particle.velocity.mult(moveSpeed);\n if (gravityOptions?.enable &&\n maxSpeed > minVelocity &&\n ((!gravityOptions.inverse && velocity.y >= minVelocity && velocity.y >= maxSpeed) ||\n (gravityOptions.inverse && velocity.y <= minVelocity && velocity.y <= -maxSpeed))) {\n velocity.y = gravityFactor * maxSpeed;\n if (moveSpeed) {\n particle.velocity.y = velocity.y / moveSpeed;\n }\n }\n const zIndexOptions = particle.options.zIndex, zVelocityFactor = (identity - particle.zIndexFactor) ** zIndexOptions.velocityRate;\n velocity.multTo(zVelocityFactor);\n const { position } = particle;\n position.addTo(velocity);\n if (moveOptions.vibrate) {\n position.x += Math.sin(position.x * Math.cos(position.y));\n position.y += Math.cos(position.y * Math.sin(position.x));\n }\n}\nexport function spin(particle, moveSpeed) {\n const container = particle.container;\n if (!particle.spin) {\n return;\n }\n const updateFunc = {\n x: particle.spin.direction === \"clockwise\" ? Math.cos : Math.sin,\n y: particle.spin.direction === \"clockwise\" ? Math.sin : Math.cos,\n };\n particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);\n particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);\n particle.spin.radius += particle.spin.acceleration;\n const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height), halfMaxSize = maxCanvasSize * half;\n if (particle.spin.radius > halfMaxSize) {\n particle.spin.radius = halfMaxSize;\n particle.spin.acceleration *= -identity;\n }\n else if (particle.spin.radius < minSpinRadius) {\n particle.spin.radius = minSpinRadius;\n particle.spin.acceleration *= -identity;\n }\n particle.spin.angle += moveSpeed * spinFactor * (identity - particle.spin.radius / maxCanvasSize);\n}\nexport function applyPath(particle, delta) {\n const particlesOptions = particle.options, pathOptions = particlesOptions.move.path, pathEnabled = pathOptions.enable;\n if (!pathEnabled) {\n return;\n }\n if (particle.lastPathTime <= particle.pathDelay) {\n particle.lastPathTime += delta.value;\n return;\n }\n const path = particle.pathGenerator?.generate(particle, delta);\n if (path) {\n particle.velocity.addTo(path);\n }\n if (pathOptions.clamp) {\n particle.velocity.x = clamp(particle.velocity.x, -identity, identity);\n particle.velocity.y = clamp(particle.velocity.y, -identity, identity);\n }\n particle.lastPathTime -= particle.pathDelay;\n}\nexport function getProximitySpeedFactor(particle) {\n return particle.slow.inRange ? particle.slow.factor : identity;\n}\nexport function initSpin(particle) {\n const container = particle.container, options = particle.options, spinOptions = options.move.spin;\n if (!spinOptions.enable) {\n return;\n }\n const spinPos = spinOptions.position ?? { x: 50, y: 50 }, spinFactor = 0.01, spinCenter = {\n x: spinPos.x * spinFactor * container.canvas.size.width,\n y: spinPos.y * spinFactor * container.canvas.size.height,\n }, pos = particle.getPosition(), distance = getDistance(pos, spinCenter), spinAcceleration = getRangeValue(spinOptions.acceleration);\n particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;\n const minVelocity = 0;\n particle.spin = {\n center: spinCenter,\n direction: particle.velocity.x >= minVelocity ? \"clockwise\" : \"counter-clockwise\",\n angle: particle.velocity.angle,\n radius: distance,\n acceleration: particle.retina.spinAcceleration,\n };\n}\n","import { getRangeMax, getRangeValue } from \"@tsparticles/engine\";\nimport { applyDistance, getProximitySpeedFactor, initSpin, move, spin } from \"./Utils.js\";\nconst diffFactor = 2, defaultSizeFactor = 1, defaultDeltaFactor = 1;\nexport class BaseMover {\n init(particle) {\n const options = particle.options, gravityOptions = options.move.gravity;\n particle.gravity = {\n enable: gravityOptions.enable,\n acceleration: getRangeValue(gravityOptions.acceleration),\n inverse: gravityOptions.inverse,\n };\n initSpin(particle);\n }\n isEnabled(particle) {\n return !particle.destroyed && particle.options.move.enable;\n }\n move(particle, delta) {\n const particleOptions = particle.options, moveOptions = particleOptions.move;\n if (!moveOptions.enable) {\n return;\n }\n const container = particle.container, pxRatio = container.retina.pixelRatio;\n particle.retina.moveSpeed ??= getRangeValue(moveOptions.speed) * pxRatio;\n particle.retina.moveDrift ??= getRangeValue(particle.options.move.drift) * pxRatio;\n const slowFactor = getProximitySpeedFactor(particle), baseSpeed = particle.retina.moveSpeed * container.retina.reduceFactor, moveDrift = particle.retina.moveDrift, maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : defaultSizeFactor, deltaFactor = delta.factor || defaultDeltaFactor, moveSpeed = (baseSpeed * sizeFactor * slowFactor * deltaFactor) / diffFactor, maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed;\n if (moveOptions.spin.enable) {\n spin(particle, moveSpeed);\n }\n else {\n move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta);\n }\n applyDistance(particle);\n }\n}\n","const double = 2, doublePI = Math.PI * double, minAngle = 0, origin = { x: 0, y: 0 };\nexport function drawCircle(data) {\n const { context, particle, radius } = data;\n if (!particle.circleRange) {\n particle.circleRange = { min: minAngle, max: doublePI };\n }\n const circleRange = particle.circleRange;\n context.arc(origin.x, origin.y, radius, circleRange.min, circleRange.max, false);\n}\n","import { degToRad, isObject } from \"@tsparticles/engine\";\nimport { drawCircle } from \"./Utils.js\";\nconst sides = 12, maxAngle = 360, minAngle = 0;\nexport class CircleDrawer {\n draw(data) {\n drawCircle(data);\n }\n getSidesCount() {\n return sides;\n }\n particleInit(container, particle) {\n const shapeData = particle.shapeData, angle = shapeData?.angle ?? {\n max: maxAngle,\n min: minAngle,\n };\n particle.circleRange = !isObject(angle)\n ? {\n min: minAngle,\n max: degToRad(angle),\n }\n : { min: degToRad(angle.min), max: degToRad(angle.max) };\n }\n}\n","import { getHslAnimationFromHsl, rangeColorToHsl, updateColor, } from \"@tsparticles/engine\";\nexport class ColorUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const hslColor = rangeColorToHsl(particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = getHslAnimationFromHsl(hslColor, particle.options.color.animation, this.container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const { h: hAnimation, s: sAnimation, l: lAnimation } = particle.options.color.animation, { color } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n ((color?.h.value !== undefined && hAnimation.enable) ||\n (color?.s.value !== undefined && sAnimation.enable) ||\n (color?.l.value !== undefined && lAnimation.enable)));\n }\n update(particle, delta) {\n updateColor(particle.color, delta);\n }\n}\n","import { getRandom, getRangeValue, initParticleNumericAnimationValue, percentDenominator, updateAnimation, } from \"@tsparticles/engine\";\nexport class OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const opacityOptions = particle.options.opacity, pxRatio = 1;\n particle.opacity = initParticleNumericAnimationValue(opacityOptions, pxRatio);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity =\n (getRangeValue(opacityAnimation.speed) / percentDenominator) * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n const none = 0;\n return (!particle.destroyed &&\n !particle.spawning &&\n !!particle.opacity &&\n particle.opacity.enable &&\n ((particle.opacity.maxLoops ?? none) <= none ||\n ((particle.opacity.maxLoops ?? none) > none &&\n (particle.opacity.loops ?? none) < (particle.opacity.maxLoops ?? none))));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.opacity) {\n return;\n }\n updateAnimation(particle, particle.opacity, true, particle.options.opacity.animation.destroy, delta);\n }\n}\n","import { getRangeValue } from \"@tsparticles/engine\";\nconst minVelocity = 0, boundsMin = 0;\nexport function bounceHorizontal(data) {\n if ((data.outMode !== \"bounce\" && data.outMode !== \"split\") ||\n (data.direction !== \"left\" && data.direction !== \"right\")) {\n return;\n }\n if (data.bounds.right < boundsMin && data.direction === \"left\") {\n data.particle.position.x = data.size + data.offset.x;\n }\n else if (data.bounds.left > data.canvasSize.width && data.direction === \"right\") {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if ((data.direction === \"right\" &&\n data.bounds.right >= data.canvasSize.width &&\n velocity > minVelocity) ||\n (data.direction === \"left\" && data.bounds.left <= boundsMin && velocity < minVelocity)) {\n const newVelocity = getRangeValue(data.particle.options.bounce.horizontal.value);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === \"right\") {\n data.particle.position.x = data.canvasSize.width - minPos;\n }\n else if (data.bounds.left <= boundsMin && data.direction === \"left\") {\n data.particle.position.x = minPos;\n }\n if (data.outMode === \"split\") {\n data.particle.destroy();\n }\n}\nexport function bounceVertical(data) {\n if ((data.outMode !== \"bounce\" && data.outMode !== \"split\") ||\n (data.direction !== \"bottom\" && data.direction !== \"top\")) {\n return;\n }\n if (data.bounds.bottom < boundsMin && data.direction === \"top\") {\n data.particle.position.y = data.size + data.offset.y;\n }\n else if (data.bounds.top > data.canvasSize.height && data.direction === \"bottom\") {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if ((data.direction === \"bottom\" &&\n data.bounds.bottom >= data.canvasSize.height &&\n velocity > minVelocity) ||\n (data.direction === \"top\" && data.bounds.top <= boundsMin && velocity < minVelocity)) {\n const newVelocity = getRangeValue(data.particle.options.bounce.vertical.value);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === \"bottom\") {\n data.particle.position.y = data.canvasSize.height - minPos;\n }\n else if (data.bounds.top <= boundsMin && data.direction === \"top\") {\n data.particle.position.y = minPos;\n }\n if (data.outMode === \"split\") {\n data.particle.destroy();\n }\n}\n","import { calculateBounds, } from \"@tsparticles/engine\";\nimport { bounceHorizontal, bounceVertical } from \"./Utils.js\";\nexport class BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\n \"bounce\",\n \"split\",\n ];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const [, plugin] of container.plugins) {\n if (plugin.particleBounce !== undefined) {\n handled = plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;\n bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });\n bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });\n }\n}\n","import { Vector, getDistances, isPointInside, } from \"@tsparticles/engine\";\nconst minVelocity = 0;\nexport class DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"destroy\"];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"normal\":\n case \"outside\":\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case \"inside\": {\n const { dx, dy } = getDistances(particle.position, particle.moveCenter), { x: vx, y: vy } = particle.velocity;\n if ((vx < minVelocity && dx > particle.moveCenter.radius) ||\n (vy < minVelocity && dy > particle.moveCenter.radius) ||\n (vx >= minVelocity && dx < -particle.moveCenter.radius) ||\n (vy >= minVelocity && dy < -particle.moveCenter.radius)) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, undefined, true);\n }\n}\n","import { Vector, isPointInside, } from \"@tsparticles/engine\";\nconst minVelocity = 0;\nexport class NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"none\"];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal &&\n (direction === \"left\" || direction === \"right\")) ??\n (particle.options.move.distance.vertical &&\n (direction === \"top\" || direction === \"bottom\"))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity, container = this.container, canvasSize = container.canvas.size, pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if ((particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius) ||\n (particle.velocity.y < minVelocity && particle.position.y >= -pRadius) ||\n (particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius) ||\n (particle.velocity.x < minVelocity && particle.position.x >= -pRadius)) {\n return;\n }\n if (!isPointInside(particle.position, container.canvas.size, Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n }\n else {\n const position = particle.position;\n if ((!gravityOptions.inverse &&\n position.y > canvasSize.height + pRadius &&\n direction === \"bottom\") ||\n (gravityOptions.inverse && position.y < -pRadius && direction === \"top\")) {\n container.particles.remove(particle);\n }\n }\n }\n}\n","import { Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from \"@tsparticles/engine\";\nconst minVelocity = 0, minDistance = 0;\nexport class OutOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"out\"];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"inside\": {\n const { x: vx, y: vy } = particle.velocity;\n const circVec = Vector.origin;\n circVec.length = particle.moveCenter.radius;\n circVec.angle = particle.velocity.angle + Math.PI;\n circVec.addTo(Vector.create(particle.moveCenter));\n const { dx, dy } = getDistances(particle.position, circVec);\n if ((vx <= minVelocity && dx >= minDistance) ||\n (vy <= minVelocity && dy >= minDistance) ||\n (vx >= minVelocity && dx <= minDistance) ||\n (vy >= minVelocity && dy <= minDistance)) {\n return;\n }\n particle.position.x = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.width,\n }));\n particle.position.y = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.height,\n }));\n const { dx: newDx, dy: newDy } = getDistances(particle.position, particle.moveCenter);\n particle.direction = Math.atan2(-newDy, -newDx);\n particle.velocity.angle = particle.direction;\n break;\n }\n default: {\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n switch (particle.outType) {\n case \"outside\": {\n particle.position.x =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.x;\n particle.position.y =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.y;\n const { dx, dy } = getDistances(particle.position, particle.moveCenter);\n if (particle.moveCenter.radius) {\n particle.direction = Math.atan2(dy, dx);\n particle.velocity.angle = particle.direction;\n }\n break;\n }\n case \"normal\": {\n const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = {\n bottom: canvasSize.height + particle.getRadius() + particle.offset.y,\n left: -particle.getRadius() - particle.offset.x,\n right: canvasSize.width + particle.getRadius() + particle.offset.x,\n top: -particle.getRadius() - particle.offset.y,\n }, sizeValue = particle.getRadius(), nextBounds = calculateBounds(particle.position, sizeValue);\n if (direction === \"right\" &&\n nextBounds.left > canvasSize.width + particle.offset.x) {\n particle.position.x = newPos.left;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n else if (direction === \"left\" && nextBounds.right < -particle.offset.x) {\n particle.position.x = newPos.right;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n if (direction === \"bottom\" &&\n nextBounds.top > canvasSize.height + particle.offset.y) {\n if (!warp) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.top;\n particle.initialPosition.y = particle.position.y;\n }\n else if (direction === \"top\" && nextBounds.bottom < -particle.offset.y) {\n if (!warp) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.bottom;\n particle.initialPosition.y = particle.position.y;\n }\n break;\n }\n }\n break;\n }\n }\n }\n}\n","import { BounceOutMode } from \"./BounceOutMode.js\";\nimport { DestroyOutMode } from \"./DestroyOutMode.js\";\nimport { NoneOutMode } from \"./NoneOutMode.js\";\nimport { OutOutMode } from \"./OutOutMode.js\";\nconst checkOutMode = (outModes, outMode) => {\n return (outModes.default === outMode ||\n outModes.bottom === outMode ||\n outModes.left === outMode ||\n outModes.right === outMode ||\n outModes.top === outMode);\n};\nexport class OutOfCanvasUpdater {\n constructor(container) {\n this._updateOutMode = (particle, delta, outMode, direction) => {\n for (const updater of this.updaters) {\n updater.update(particle, direction, delta, outMode);\n }\n };\n this.container = container;\n this.updaters = [];\n }\n init(particle) {\n this.updaters = [];\n const outModes = particle.options.move.outModes;\n if (checkOutMode(outModes, \"bounce\")) {\n this.updaters.push(new BounceOutMode(this.container));\n }\n else if (checkOutMode(outModes, \"out\")) {\n this.updaters.push(new OutOutMode(this.container));\n }\n else if (checkOutMode(outModes, \"destroy\")) {\n this.updaters.push(new DestroyOutMode(this.container));\n }\n else if (checkOutMode(outModes, \"none\")) {\n this.updaters.push(new NoneOutMode(this.container));\n }\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n update(particle, delta) {\n const outModes = particle.options.move.outModes;\n this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, \"bottom\");\n this._updateOutMode(particle, delta, outModes.left ?? outModes.default, \"left\");\n this._updateOutMode(particle, delta, outModes.right ?? outModes.default, \"right\");\n this._updateOutMode(particle, delta, outModes.top ?? outModes.default, \"top\");\n }\n}\n","import { getRandom, percentDenominator, updateAnimation, } from \"@tsparticles/engine\";\nconst minLoops = 0;\nexport class SizeUpdater {\n init(particle) {\n const container = particle.container, sizeOptions = particle.options.size, sizeAnimation = sizeOptions.animation;\n if (sizeAnimation.enable) {\n particle.size.velocity =\n ((particle.retina.sizeAnimationSpeed ?? container.retina.sizeAnimationSpeed) / percentDenominator) *\n container.retina.reduceFactor;\n if (!sizeAnimation.sync) {\n particle.size.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n return (!particle.destroyed &&\n !particle.spawning &&\n particle.size.enable &&\n ((particle.size.maxLoops ?? minLoops) <= minLoops ||\n ((particle.size.maxLoops ?? minLoops) > minLoops &&\n (particle.size.loops ?? minLoops) < (particle.size.maxLoops ?? minLoops))));\n }\n reset(particle) {\n particle.size.loops = minLoops;\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateAnimation(particle, particle.size, true, particle.options.size.animation.destroy, delta);\n }\n}\n","import { drawLine, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from \"@tsparticles/engine\";\nexport function drawTriangle(context, p1, p2, p3) {\n context.beginPath();\n context.moveTo(p1.x, p1.y);\n context.lineTo(p2.x, p2.y);\n context.lineTo(p3.x, p3.y);\n context.closePath();\n}\nexport function drawLinkLine(params) {\n let drawn = false;\n const { begin, end, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;\n if (getDistance(begin, end) <= maxDistance) {\n drawLine(context, begin, end);\n drawn = true;\n }\n else if (links.warp) {\n let pi1;\n let pi2;\n const endNE = {\n x: end.x - canvasSize.width,\n y: end.y,\n };\n const d1 = getDistances(begin, endNE);\n if (d1.distance <= maxDistance) {\n const yi = begin.y - (d1.dy / d1.dx) * begin.x;\n pi1 = { x: 0, y: yi };\n pi2 = { x: canvasSize.width, y: yi };\n }\n else {\n const endSW = {\n x: end.x,\n y: end.y - canvasSize.height,\n };\n const d2 = getDistances(begin, endSW);\n if (d2.distance <= maxDistance) {\n const yi = begin.y - (d2.dy / d2.dx) * begin.x;\n const xi = -yi / (d2.dy / d2.dx);\n pi1 = { x: xi, y: 0 };\n pi2 = { x: xi, y: canvasSize.height };\n }\n else {\n const endSE = {\n x: end.x - canvasSize.width,\n y: end.y - canvasSize.height,\n };\n const d3 = getDistances(begin, endSE);\n if (d3.distance <= maxDistance) {\n const yi = begin.y - (d3.dy / d3.dx) * begin.x;\n const xi = -yi / (d3.dy / d3.dx);\n pi1 = { x: xi, y: yi };\n pi2 = { x: pi1.x + canvasSize.width, y: pi1.y + canvasSize.height };\n }\n }\n }\n if (pi1 && pi2) {\n drawLine(context, begin, pi1);\n drawLine(context, end, pi2);\n drawn = true;\n }\n }\n if (!drawn) {\n return;\n }\n context.lineWidth = width;\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n const { shadow } = links;\n if (shadow.enable) {\n const shadowColor = rangeColorToRgb(shadow.color);\n if (shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n }\n }\n context.stroke();\n}\nexport function drawLinkTriangle(params) {\n const { context, pos1, pos2, pos3, backgroundMask, colorTriangle, opacityTriangle } = params;\n drawTriangle(context, pos1, pos2, pos3);\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.fillStyle = getStyleFromRgb(colorTriangle, opacityTriangle);\n context.fill();\n}\nexport function getLinkKey(ids) {\n ids.sort((a, b) => a - b);\n return ids.join(\"_\");\n}\nexport function setLinkFrequency(particles, dictionary) {\n const key = getLinkKey(particles.map((t) => t.id));\n let res = dictionary.get(key);\n if (res === undefined) {\n res = getRandom();\n dictionary.set(key, res);\n }\n return res;\n}\n","import { getDistance, getLinkColor, getRandom, getRangeValue, rangeColorToRgb, } from \"@tsparticles/engine\";\nimport { drawLinkLine, drawLinkTriangle, setLinkFrequency } from \"./Utils.js\";\nconst minOpacity = 0, minWidth = 0, minDistance = 0, half = 0.5, maxFrequency = 1;\nexport class LinkInstance {\n constructor(container) {\n this.container = container;\n this._drawLinkLine = (p1, link) => {\n const p1LinksOptions = p1.options.links;\n if (!p1LinksOptions?.enable) {\n return;\n }\n const container = this.container, options = container.actualOptions, p2 = link.destination, pos1 = p1.getPosition(), pos2 = p2.getPosition();\n let opacity = link.opacity;\n container.canvas.draw((ctx) => {\n let colorLine;\n const twinkle = p1.options.twinkle?.lines;\n if (twinkle?.enable) {\n const twinkleFreq = twinkle.frequency, twinkleRgb = rangeColorToRgb(twinkle.color), twinkling = getRandom() < twinkleFreq;\n if (twinkling && twinkleRgb) {\n colorLine = twinkleRgb;\n opacity = getRangeValue(twinkle.opacity);\n }\n }\n if (!colorLine) {\n const linkColor = p1LinksOptions.id !== undefined\n ? container.particles.linksColors.get(p1LinksOptions.id)\n : container.particles.linksColor;\n colorLine = getLinkColor(p1, p2, linkColor);\n }\n if (!colorLine) {\n return;\n }\n const width = p1.retina.linksWidth ?? minWidth, maxDistance = p1.retina.linksDistance ?? minDistance, { backgroundMask } = options;\n drawLinkLine({\n context: ctx,\n width,\n begin: pos1,\n end: pos2,\n maxDistance,\n canvasSize: container.canvas.size,\n links: p1LinksOptions,\n backgroundMask: backgroundMask,\n colorLine,\n opacity,\n });\n });\n };\n this._drawLinkTriangle = (p1, link1, link2) => {\n const linksOptions = p1.options.links;\n if (!linksOptions?.enable) {\n return;\n }\n const triangleOptions = linksOptions.triangles;\n if (!triangleOptions.enable) {\n return;\n }\n const container = this.container, options = container.actualOptions, p2 = link1.destination, p3 = link2.destination, opacityTriangle = triangleOptions.opacity ?? (link1.opacity + link2.opacity) * half;\n if (opacityTriangle <= minOpacity) {\n return;\n }\n container.canvas.draw((ctx) => {\n const pos1 = p1.getPosition(), pos2 = p2.getPosition(), pos3 = p3.getPosition(), linksDistance = p1.retina.linksDistance ?? minDistance;\n if (getDistance(pos1, pos2) > linksDistance ||\n getDistance(pos3, pos2) > linksDistance ||\n getDistance(pos3, pos1) > linksDistance) {\n return;\n }\n let colorTriangle = rangeColorToRgb(triangleOptions.color);\n if (!colorTriangle) {\n const linkColor = linksOptions.id !== undefined\n ? container.particles.linksColors.get(linksOptions.id)\n : container.particles.linksColor;\n colorTriangle = getLinkColor(p1, p2, linkColor);\n }\n if (!colorTriangle) {\n return;\n }\n drawLinkTriangle({\n context: ctx,\n pos1,\n pos2,\n pos3,\n backgroundMask: options.backgroundMask,\n colorTriangle,\n opacityTriangle,\n });\n });\n };\n this._drawTriangles = (options, p1, link, p1Links) => {\n const p2 = link.destination;\n if (!(options.links?.triangles.enable && p2.options.links?.triangles.enable)) {\n return;\n }\n const vertices = p2.links?.filter((t) => {\n const linkFreq = this._getLinkFrequency(p2, t.destination), minCount = 0;\n return (p2.options.links &&\n linkFreq <= p2.options.links.frequency &&\n p1Links.findIndex((l) => l.destination === t.destination) >= minCount);\n });\n if (!vertices?.length) {\n return;\n }\n for (const vertex of vertices) {\n const p3 = vertex.destination, triangleFreq = this._getTriangleFrequency(p1, p2, p3);\n if (triangleFreq > options.links.triangles.frequency) {\n continue;\n }\n this._drawLinkTriangle(p1, link, vertex);\n }\n };\n this._getLinkFrequency = (p1, p2) => {\n return setLinkFrequency([p1, p2], this._freqs.links);\n };\n this._getTriangleFrequency = (p1, p2, p3) => {\n return setLinkFrequency([p1, p2, p3], this._freqs.triangles);\n };\n this._freqs = {\n links: new Map(),\n triangles: new Map(),\n };\n }\n drawParticle(context, particle) {\n const { links, options } = particle;\n if (!links?.length) {\n return;\n }\n const p1Links = links.filter((l) => options.links &&\n (options.links.frequency >= maxFrequency ||\n this._getLinkFrequency(particle, l.destination) <= options.links.frequency));\n for (const link of p1Links) {\n this._drawTriangles(options, particle, link, p1Links);\n if (link.opacity > minOpacity && (particle.retina.linksWidth ?? minWidth) > minWidth) {\n this._drawLinkLine(particle, link);\n }\n }\n }\n async init() {\n this._freqs.links = new Map();\n this._freqs.triangles = new Map();\n await Promise.resolve();\n }\n particleCreated(particle) {\n particle.links = [];\n if (!particle.options.links) {\n return;\n }\n const ratio = this.container.retina.pixelRatio, { retina } = particle, { distance, width } = particle.options.links;\n retina.linksDistance = distance * ratio;\n retina.linksWidth = width * ratio;\n }\n particleDestroyed(particle) {\n particle.links = [];\n }\n}\n"],"file":"assets/tsparticles-B0W6J4Xn.js"}