UNPKG

suryajs-animfx

Version:

SuryaJS - A powerful JavaScript animation library with 20+ image, text, and advanced 3D effects

1 lines 36.9 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AnimFX=t():e.AnimFX=t()}(this,()=>(()=>{"use strict";var e={56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],f=a[c]||0,u="".concat(c," ").concat(f);a[c]=f+1;var d=n(u),v={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(v);else{var p=o(v,r);r.byIndex=s,t.splice(s,0,{identifier:u,updater:p,references:1})}i.push(u)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var s=n(a[i]);t[s].references--}for(var l=r(e,o),c=0;c<a.length;c++){var f=n(a[c]);0===t[f].references&&(t[f].updater(),t.splice(f,1))}a=l}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},227:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(601),o=n.n(r),a=n(314),i=n.n(a)()(o());i.push([e.id,"/* AnimFX CSS Animations */\n\n/* Keyframes for various effects */\n@keyframes blink {\n 0%, 50% { border-color: transparent; }\n 51%, 100% { border-color: currentColor; }\n}\n\n@keyframes glitch {\n 0% { transform: translate(0); }\n 20% { transform: translate(-2px, 2px); }\n 40% { transform: translate(-2px, -2px); }\n 60% { transform: translate(2px, 2px); }\n 80% { transform: translate(2px, -2px); }\n 100% { transform: translate(0); }\n}\n\n@keyframes glitchColor {\n 0% { filter: hue-rotate(0deg); }\n 25% { filter: hue-rotate(90deg); }\n 50% { filter: hue-rotate(180deg); }\n 75% { filter: hue-rotate(270deg); }\n 100% { filter: hue-rotate(360deg); }\n}\n\n@keyframes shake {\n 0%, 100% { transform: translateX(0); }\n 10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }\n 20%, 40%, 60%, 80% { transform: translateX(2px); }\n}\n\n@keyframes pulse {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n 100% { transform: scale(1); }\n}\n\n@keyframes bounce {\n 0%, 20%, 53%, 80%, 100% { transform: translateY(0); }\n 40%, 43% { transform: translateY(-15px); }\n 70% { transform: translateY(-7px); }\n 90% { transform: translateY(-3px); }\n}\n\n@keyframes fadeInScale {\n 0% {\n opacity: 0;\n transform: scale(0.8);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes slideInLeft {\n 0% {\n opacity: 0;\n transform: translateX(-100px);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInRight {\n 0% {\n opacity: 0;\n transform: translateX(100px);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes flipIn {\n 0% {\n opacity: 0;\n transform: perspective(400px) rotateY(-90deg);\n }\n 40% {\n transform: perspective(400px) rotateY(-10deg);\n }\n 70% {\n transform: perspective(400px) rotateY(10deg);\n }\n 100% {\n opacity: 1;\n transform: perspective(400px) rotateY(0deg);\n }\n}\n\n/* Effect Classes */\n.glitch-effect {\n animation: glitch 0.3s infinite, glitchColor 2s infinite;\n position: relative;\n}\n\n.glitch-effect::before,\n.glitch-effect::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: inherit;\n z-index: -1;\n}\n\n.glitch-effect::before {\n animation: glitch 0.3s infinite reverse;\n filter: hue-rotate(90deg);\n opacity: 0.8;\n}\n\n.glitch-effect::after {\n animation: glitch 0.3s infinite;\n filter: hue-rotate(180deg);\n opacity: 0.8;\n}\n\n/* Hover Effects */\n.hover-scale:hover {\n transform: scale(1.1);\n transition: transform 0.3s ease;\n}\n\n.hover-rotate:hover {\n transform: rotate(5deg);\n transition: transform 0.3s ease;\n}\n\n.hover-blur:hover {\n filter: blur(2px);\n transition: filter 0.3s ease;\n}\n\n.hover-brightness:hover {\n filter: brightness(1.2);\n transition: filter 0.3s ease;\n}\n\n.hover-shadow:hover {\n box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);\n transition: box-shadow 0.3s ease;\n}\n\n/* Text Animation Classes */\n.text-reveal {\n overflow: hidden;\n}\n\n.text-reveal span {\n display: inline-block;\n opacity: 0;\n transform: translateY(100%);\n animation: slideInUp 0.6s ease forwards;\n}\n\n@keyframes slideInUp {\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* Utility Classes */\n.animfx-hidden {\n opacity: 0;\n visibility: hidden;\n}\n\n.animfx-visible {\n opacity: 1;\n visibility: visible;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n/* Responsive adjustments */\n@media (prefers-reduced-motion: reduce) {\n * {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* Loading spinner */\n.animfx-loading {\n display: inline-block;\n width: 20px;\n height: 20px;\n border: 3px solid rgba(255, 255, 255, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin 1s ease-in-out infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n",""]);const s=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var f=[].concat(e[c]);r&&i[f[0]]||(void 0!==a&&(void 0===f[5]||(f[1]="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=a),n&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=n):f[2]=n),o&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=o):f[4]="".concat(o)),t.push(f))}},t}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{e.exports=function(e){return e[1]}},622:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.r(t),n.d(t,{default:()=>O});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultDuration=1e3,this.defaultEasing="cubic-bezier(0.25, 0.46, 0.45, 0.94)"},t=[{key:"fadeInScale",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.opacity="0",e.style.transform="scale(0.8)",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.opacity="1",e.style.transform="scale(1)"},o+100*n)})}},{key:"slideInRotate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.opacity="0",e.style.transform="translateX(-100px) rotate(-10deg)",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.opacity="1",e.style.transform="translateX(0) rotate(0deg)"},o+150*n)})}},{key:"zoomBlur",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.filter="blur(10px)",e.style.transform="scale(1.2)",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.filter="blur(0px)",e.style.transform="scale(1)"},o+100*n)})}},{key:"flipReveal",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.transform="perspective(1000px) rotateY(-90deg)",e.style.opacity="0",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.transform="perspective(1000px) rotateY(0deg)",e.style.opacity="1"},o+200*n)})}},{key:"glitchEffect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration||2e3,r=t.delay||0;e.forEach(function(e,t){setTimeout(function(){e.classList.add("glitch-effect"),setTimeout(function(){e.classList.remove("glitch-effect")},n)},r+300*t)})}},{key:"addHoverEffect",value:function(e,t){document.querySelectorAll(e).forEach(function(e){e.addEventListener("mouseenter",function(){e.classList.add("hover-".concat(t))}),e.addEventListener("mouseleave",function(){e.classList.remove("hover-".concat(t))})})}},{key:"customEffect",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.duration||this.defaultDuration,a=r.delay||0;e.forEach(function(e,i){e.animate(t,{duration:o,delay:a+100*i,easing:r.easing||n.defaultEasing,fill:"forwards"})})}}],t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const s=i;function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var v=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultDuration=1e3,this.defaultEasing="cubic-bezier(0.25, 0.46, 0.45, 0.94)"},t=[{key:"typeWriter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.speed||50,r=t.delay||0;e.forEach(function(e,t){var o=e.textContent;e.textContent="",e.style.borderRight="2px solid",e.style.animation="blink 1s infinite",setTimeout(function(){var t=0,r=setInterval(function(){e.textContent+=o.charAt(t),++t>=o.length&&(clearInterval(r),e.style.borderRight="none",e.style.animation="none")},n)},r+500*t)})}},{key:"fadeInUp",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.opacity="0",e.style.transform="translateY(30px)",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.opacity="1",e.style.transform="translateY(0)"},o+100*n)})}},{key:"letterSpacing",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){e.style.letterSpacing="10px",e.style.opacity="0",e.style.transition="all ".concat(r,"ms ").concat(t.defaultEasing),setTimeout(function(){e.style.letterSpacing="normal",e.style.opacity="1"},o+150*n)})}},{key:"colorWave",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.colors||["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],r=(t.duration,t.delay||0);e.forEach(function(e,t){setTimeout(function(){var t=e.textContent;e.innerHTML="",c(t).forEach(function(t,r){var o=document.createElement("span");o.textContent=" "===t?" ":t,o.style.display="inline-block",o.style.transition="color 0.3s ease",e.appendChild(o),setTimeout(function(){var e=r%n.length;o.style.color=n[e],setTimeout(function(){o.style.color=""},1e3)},100*r)})},r+300*t)})}},{key:"splitReveal",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration||this.defaultDuration,o=n.delay||0;e.forEach(function(e,n){var a=e.textContent;e.innerHTML="",c(a).forEach(function(n,o){var a=document.createElement("span");a.textContent=" "===n?" ":n,a.style.display="inline-block",a.style.opacity="0",a.style.transform="translateY(20px) rotateX(90deg)",a.style.transition="all ".concat(r/2,"ms ").concat(t.defaultEasing),e.appendChild(a)}),setTimeout(function(){e.querySelectorAll("span").forEach(function(e,t){setTimeout(function(){e.style.opacity="1",e.style.transform="translateY(0) rotateX(0deg)"},50*t)})},o+200*n)})}},{key:"revealOnScroll",value:function(e,t){var n=this,r=document.querySelectorAll(e),o=new IntersectionObserver(function(e){e.forEach(function(e){if(e.isIntersecting){switch(t){case 1:n.typeWriter([e.target]);break;case 2:n.fadeInUp([e.target]);break;case 3:n.letterSpacing([e.target]);break;case 4:n.colorWave([e.target]);break;case 5:n.splitReveal([e.target])}o.unobserve(e.target)}})},{threshold:.1});r.forEach(function(e){return o.observe(e)})}},{key:"customTextEffect",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).delay||0;e.forEach(function(e,r){setTimeout(function(){e.classList.add(t)},n+100*r)})}}],t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const p=v;function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function y(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}var g=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mouseFollowers=new Map,this.mouseMagnets=new Map,this.isMouseTracking=!1,this.mousePosition={x:0,y:0},this.init()},t=[{key:"init",value:function(){this.initMouseTracking()}},{key:"initMouseTracking",value:function(){var e=this;this.isMouseTracking||(document.addEventListener("mousemove",function(t){e.mousePosition.x=t.clientX,e.mousePosition.y=t.clientY,e.updateMouseFollowers(),e.updateMouseMagnets()}),this.isMouseTracking=!0)}},{key:"mouseFollower",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.speed||.1,o=n.distance||50,a=n.scale||1.2;e.forEach(function(e,i){if(e){var s=document.createElement("div");s.style.position="fixed",s.style.width="20px",s.style.height="20px",s.style.background=n.color||"#667eea",s.style.borderRadius="50%",s.style.pointerEvents="none",s.style.zIndex="9999",s.style.transition="all 0.1s ease",s.style.opacity="0.8",s.style.boxShadow="0 0 20px rgba(102, 126, 234, 0.5)",document.body.appendChild(s),t.mouseFollowers.set(e,{follower:s,speed:r,distance:o+10*i,targetX:0,targetY:0,currentX:0,currentY:0}),e.addEventListener("mouseenter",function(){e.style.transform="scale(".concat(a,")"),e.style.transition="transform 0.3s ease",s.style.transform="scale(1.5)",s.style.background=n.hoverColor||"#e17055"}),e.addEventListener("mouseleave",function(){e.style.transform="scale(1)",s.style.transform="scale(1)",s.style.background=n.color||"#667eea"})}})}},{key:"mouseMagnet",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.strength||.3,o=n.distance||100;e.forEach(function(e,n){if(e){e.style.transition="transform 0.3s ease",t.mouseMagnets.set(e,{strength:r,distance:o,originalX:0,originalY:0});var a=e.getBoundingClientRect(),i=t.mouseMagnets.get(e);i.originalX=a.left+a.width/2,i.originalY=a.top+a.height/2}})}},{key:"tilt3D",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxTilt||15,r=t.perspective||1e3,o=t.scale||1.05;e.forEach(function(e,t){e&&(e.style.transformStyle="preserve-3d",e.style.transition="transform 0.3s ease",e.addEventListener("mouseenter",function(){e.style.transform="perspective(".concat(r,"px) scale(").concat(o,")")}),e.addEventListener("mousemove",function(t){var a=e.getBoundingClientRect(),i=a.left+a.width/2,s=a.top+a.height/2,l=(t.clientX-i)/(a.width/2),c=(t.clientY-s)/(a.height/2)*n,f=l*n;e.style.transform="perspective(".concat(r,"px) scale(").concat(o,") rotateX(").concat(-c,"deg) rotateY(").concat(f,"deg)")}),e.addEventListener("mouseleave",function(){e.style.transform="perspective(1000px) scale(1) rotateX(0deg) rotateY(0deg)"}))})}},{key:"parallax3D",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.depth||.5,r=t.speed||.1;e.forEach(function(e,t){if(e){e.style.transformStyle="preserve-3d",e.style.transition="transform 0.1s ease";var o=n*(t+1);e.addEventListener("mousemove",function(t){var n=e.getBoundingClientRect(),a=n.left+n.width/2,i=n.top+n.height/2,s=(t.clientX-a)*r*o,l=(t.clientY-i)*r*o;e.style.transform="translate3d(".concat(s,"px, ").concat(l,"px, ").concat(10*o,"px)")}),e.addEventListener("mouseleave",function(){e.style.transform="translate3d(0px, 0px, 0px)"})}})}},{key:"magneticPull",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pullStrength||.4,r=t.pullDistance||80;e.forEach(function(e,t){e&&(e.style.transition="transform 0.2s ease",document.addEventListener("mousemove",function(t){var o=e.getBoundingClientRect(),a=o.left+o.width/2,i=o.top+o.height/2,s=Math.sqrt(Math.pow(t.clientX-a,2)+Math.pow(t.clientY-i,2));if(s<r){var l=(r-s)/r,c=(t.clientX-a)*l*n,f=(t.clientY-i)*l*n;e.style.transform="translate(".concat(c,"px, ").concat(f,"px) scale(").concat(1+.1*l,")")}else e.style.transform="translate(0px, 0px) scale(1)"}))})}},{key:"updateMouseFollowers",value:function(){var e=this;this.mouseFollowers.forEach(function(t,n){var r=t.follower,o=t.speed,a=t.distance;t.targetX=e.mousePosition.x-a,t.targetY=e.mousePosition.y-a,t.currentX+=(t.targetX-t.currentX)*o,t.currentY+=(t.targetY-t.currentY)*o,r.style.left=t.currentX+"px",r.style.top=t.currentY+"px"})}},{key:"updateMouseMagnets",value:function(){var e=this;this.mouseMagnets.forEach(function(t,n){var r=t.strength,o=t.distance,a=n.getBoundingClientRect(),i=a.left+a.width/2,s=a.top+a.height/2,l=e.mousePosition.x-i,c=e.mousePosition.y-s,f=Math.sqrt(l*l+c*c);if(f<o){var u=(o-f)/o,d=l*u*r,v=c*u*r;n.style.transform="translate(".concat(d,"px, ").concat(v,"px) scale(").concat(1+.1*u,")")}else n.style.transform="translate(0px, 0px) scale(1)"})}},{key:"liquidDistortion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.intensity||20,r=t.speed||.02;e.forEach(function(e,t){if(e){var o,a=Date.now(),i=function(){var t=Date.now()-a,s=Math.sin(t*r)*n,l=Math.cos(t*r*1.5)*n*.5;e.style.transform="skew(".concat(.1*s,"deg, ").concat(.1*l,"deg) scale(").concat(1+.05*Math.sin(t*r*.5),")"),e.style.filter="hue-rotate(".concat(2*s,"deg)"),o=requestAnimationFrame(i)};e.addEventListener("mouseenter",function(){i()}),e.addEventListener("mouseleave",function(){o&&cancelAnimationFrame(o),e.style.transform="none",e.style.filter="none"})}})}},{key:"floatingAnimation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.amplitude||10,r=t.speed||.02;e.forEach(function(e,t){if(e){var o=Date.now()+1e3*t,a=function(){var t=Date.now()-o,i=Math.sin(t*r)*n,s=2*Math.sin(t*r*.5);e.style.transform="translateY(".concat(i,"px) rotate(").concat(s,"deg)"),requestAnimationFrame(a)};a()}})}},{key:"morphingShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.morphSteps||["border-radius: 50%","border-radius: 0% 50% 50% 50%","border-radius: 50% 0% 50% 50%","border-radius: 50% 50% 0% 50%","border-radius: 50% 50% 50% 0%","border-radius: 0%"],r=t.duration||3e3;e.forEach(function(e,t){if(e){var o=0,a=function(){e.style.cssText+=n[o],e.style.transition="all 0.5s ease",o=(o+1)%n.length,setTimeout(a,r/n.length)};setTimeout(function(){a()},500*t)}})}},{key:"card3DFlip",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.perspective||1e3,r=t.duration||800;e.forEach(function(e,t){e&&(e.style.transformStyle="preserve-3d",e.style.perspective=n+"px",e.style.cursor="pointer",e.addEventListener("click",function(){e.classList.contains("flipped-3d")?(e.style.transform="rotateY(0deg)",e.classList.remove("flipped-3d")):(e.style.transition="transform ".concat(r,"ms ease"),e.style.transform="rotateY(180deg)",e.classList.add("flipped-3d"))}))})}},{key:"cube3DRotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.speed||.02,r=t.amplitude||15;e.forEach(function(e,t){if(e){var o;e.style.transformStyle="preserve-3d",e.style.perspective="1000px";var a=Date.now()+1e3*t,i=function(){var t=Date.now()-a,s=Math.sin(t*n)*r,l=Math.cos(t*n*.7)*r,c=Math.sin(t*n*.5)*(.5*r);e.style.transform="perspective(1000px) rotateX(".concat(s,"deg) rotateY(").concat(l,"deg) rotateZ(").concat(c,"deg)"),o=requestAnimationFrame(i)};e.addEventListener("mouseenter",function(){i()}),e.addEventListener("mouseleave",function(){o&&cancelAnimationFrame(o),e.style.transform="perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg)"})}})}},{key:"depth3DLayers",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t.maxDepth,t.sensitivity||.1);e.forEach(function(e,t){if(e){e.style.transformStyle="preserve-3d",e.style.transition="transform 0.2s ease";var r=20*(t+1);e.addEventListener("mousemove",function(t){var o=e.getBoundingClientRect(),a=o.left+o.width/2,i=o.top+o.height/2,s=(t.clientX-a)*n,l=(t.clientY-i)*n;e.style.transform="\n perspective(1000px) \n translate3d(".concat(s,"px, ").concat(l,"px, ").concat(r,"px) \n rotateX(").concat(.1*-l,"deg) \n rotateY(").concat(.1*s,"deg)\n ")}),e.addEventListener("mouseleave",function(){e.style.transform="perspective(1000px) translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg)"})}})}},{key:"hover3DLift",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.liftHeight||50,r=t.tiltAngle||10,o=t.scale||1.05;e.forEach(function(e,t){e&&(e.style.transformStyle="preserve-3d",e.style.transition="all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)",e.style.cursor="pointer",e.addEventListener("mouseenter",function(t){var a=e.getBoundingClientRect(),i=a.left+a.width/2,s=a.top+a.height/2,l=(t.clientX-i)/(a.width/2),c=(t.clientY-s)/(a.height/2)*r,f=l*r;e.style.transform="\n perspective(1000px) \n translate3d(0px, -".concat(n,"px, 0px) \n rotateX(").concat(-c,"deg) \n rotateY(").concat(f,"deg) \n scale3d(").concat(o,", ").concat(o,", ").concat(o,")\n ")}),e.addEventListener("mouseleave",function(){e.style.transform="perspective(1000px) translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"}))})}},{key:"perspective3DShift",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxRotation||25,r=t.perspective||1e3;e.forEach(function(e,t){e&&(e.style.transformStyle="preserve-3d",e.style.perspective=r+"px",e.style.transition="transform 0.3s ease",e.addEventListener("mousemove",function(t){var o=e.getBoundingClientRect(),a=o.left+o.width/2,i=o.top+o.height/2,s=(t.clientX-a)/(o.width/2)*n,l=(t.clientY-i)/(o.height/2)*-n;e.style.transform="perspective(".concat(r,"px) rotateX(").concat(l,"deg) rotateY(").concat(s,"deg)")}),e.addEventListener("mouseleave",function(){e.style.transform="perspective(".concat(r,"px) rotateX(0deg) rotateY(0deg)")}))})}},{key:"ripple3DWave",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.waveHeight||30,r=t.waveSpeed||.05;e.forEach(function(e,t){if(e){var o;e.style.transformStyle="preserve-3d",e.style.perspective="1000px";var a=Date.now()+200*t,i=function(){var t=Date.now()-a,s=Math.sin(t*r)*n,l=Math.cos(t*r*1.5)*(.5*n),c=Math.sin(t*r*.8)*(.3*n);e.style.transform="\n perspective(1000px) \n translate3d(0px, ".concat(s,"px, ").concat(l,"px) \n rotateX(").concat(c,"deg)\n "),o=requestAnimationFrame(i)};e.addEventListener("mouseenter",function(){i()}),e.addEventListener("mouseleave",function(){o&&cancelAnimationFrame(o),e.style.transform="perspective(1000px) translate3d(0px, 0px, 0px) rotateX(0deg)"})}})}},{key:"removeMouseFollower",value:function(e){var t=this.mouseFollowers.get(e);t&&t.follower&&(t.follower.remove(),this.mouseFollowers.delete(e))}},{key:"removeMouseMagnet",value:function(e){this.mouseMagnets.delete(e),e.style.transform="none"}},{key:"cleanup",value:function(){this.mouseFollowers.forEach(function(e,t){e.follower&&e.follower.remove()}),this.mouseFollowers.clear(),this.mouseMagnets.forEach(function(e,t){t.style.transform="none"}),this.mouseMagnets.clear()}}],t&&h(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const b=g;var x=n(72),E=n.n(x),w=n(825),k=n.n(w),S=n(659),A=n.n(S),M=n(56),D=n.n(M),T=n(540),L=n.n(T),X=n(113),Y=n.n(X),C=n(227),I={};function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j(r.key),r)}}function j(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}I.styleTagTransform=Y(),I.setAttributes=D(),I.insert=A().bind(null,"head"),I.domAPI=k(),I.insertStyleElement=L(),E()(C.A,I),C.A&&C.A.locals&&C.A.locals,e=n.hmd(e);var R=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.imageEffects=new s,this.textEffects=new p,this.advancedEffects=new b,this.init()},t=[{key:"init",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){return e.autoInit()}):this.autoInit()}},{key:"autoInit",value:function(){this.detectAndApplyEffects()}},{key:"detectAndApplyEffects",value:function(){var e=this;document.querySelectorAll("[data-image-effect]").forEach(function(t){var n=parseInt(t.getAttribute("data-image-effect"));e.imageEffect(n,t)}),document.querySelectorAll("[data-text-effect]").forEach(function(t){var n=parseInt(t.getAttribute("data-text-effect"));e.textEffect(n,t)})}},{key:"imageEffect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?Array.isArray(t)?t:[t]:Array.from(document.querySelectorAll("img, .image-container, .demo-image, .effect-target"));console.log("AnimFX: Running image effect ".concat(e," on ").concat(n.length," elements"));var r=n.filter(function(e){return e&&e.style});if(0===r.length)return console.warn("AnimFX: No valid elements found for image effect ".concat(e)),this;switch(e){case 1:this.imageEffects.fadeInScale(r);break;case 2:this.imageEffects.slideInRotate(r);break;case 3:this.imageEffects.zoomBlur(r);break;case 4:this.imageEffects.flipReveal(r);break;case 5:this.imageEffects.glitchEffect(r);break;default:console.warn("Image effect ".concat(e," not found. Available effects: 1-5"))}return this}},{key:"textEffect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?Array.isArray(t)?t:[t]:Array.from(document.querySelectorAll(".text-animate, h1, h2, h3, p"));switch(e){case 1:this.textEffects.typeWriter(n);break;case 2:this.textEffects.fadeInUp(n);break;case 3:this.textEffects.letterSpacing(n);break;case 4:this.textEffects.colorWave(n);break;case 5:this.textEffects.splitReveal(n);break;default:console.warn("Text effect ".concat(e," not found. Available effects: 1-5"))}return this}},{key:"getElements",value:function(e,t){return(e?Array.isArray(e)?e:[e]:Array.from(document.querySelectorAll(t))).filter(function(e){return e&&e.style})}},{key:"mouseFollower",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".mouse-follower, .effect-target, img, div");return this.advancedEffects.mouseFollower(n,t),this}},{key:"mouseMagnet",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".mouse-magnet, .effect-target, img, div");return this.advancedEffects.mouseMagnet(n,t),this}},{key:"magneticPull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".magnetic-pull, .effect-target, img, div");return this.advancedEffects.magneticPull(n,t),this}},{key:"tilt3D",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".tilt-3d, .effect-target, img, div");return this.advancedEffects.tilt3D(n,t),this}},{key:"parallax3D",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".parallax-3d, .effect-target, img, div");return this.advancedEffects.parallax3D(n,t),this}},{key:"liquidDistortion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".liquid-distortion, .effect-target, img, div");return this.advancedEffects.liquidDistortion(n,t),this}},{key:"floatingAnimation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".floating-animation, .effect-target, img, div");return this.advancedEffects.floatingAnimation(n,t),this}},{key:"morphingShape",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".morphing-shape, .effect-target, img, div");return this.advancedEffects.morphingShape(n,t),this}},{key:"card3DFlip",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".card-3d-flip, .effect-target, img, div");return this.advancedEffects.card3DFlip(n,t),this}},{key:"cube3DRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".cube-3d-rotation, .effect-target, img, div");return this.advancedEffects.cube3DRotation(n,t),this}},{key:"depth3DLayers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".depth-3d-layers, .effect-target, img, div");return this.advancedEffects.depth3DLayers(n,t),this}},{key:"hover3DLift",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".hover-3d-lift, .effect-target, img, div");return this.advancedEffects.hover3DLift(n,t),this}},{key:"perspective3DShift",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".perspective-3d-shift, .effect-target, img, div");return this.advancedEffects.perspective3DShift(n,t),this}},{key:"ripple3DWave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getElements(e,".ripple-3d-wave, .effect-target, img, div");return this.advancedEffects.ripple3DWave(n,t),this}},{key:"cleanup",value:function(){return this.advancedEffects.cleanup(),this}},{key:"addHoverEffect",value:function(e,t,n){var r=this;return document.querySelectorAll(e).forEach(function(e){e.addEventListener("mouseenter",function(){"image"===t?r.imageEffect(n,e):"text"===t&&r.textEffect(n,e)})}),this}},{key:"addScrollEffect",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=document.querySelectorAll(e),i=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&("image"===t?r.imageEffect(n,e.target):"text"===t&&r.textEffect(n,e.target))})},{threshold:o.threshold||.1,rootMargin:o.rootMargin||"0px"});return a.forEach(function(e){return i.observe(e)}),this}}],t&&F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),q=new R;e.exports&&(e.exports=R),"undefined"!=typeof window&&(window.AnimFX=R,window.animFX=q);const O=R},659:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r](a,a.exports,n),a.loaded=!0,a.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0,n(622)})());