/home/silvwabw/public_html/wp-content/plugins/gutenverse/assets/js/frontend/animated-text.js
(()=>{"use strict";var t={};function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function a(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,"string");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}function i(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function o(t,n,e){return n&&i(t.prototype,n),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function s(t,n){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},s(t,n)}t.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);const u=gutenverseCoreFrontend;function l(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,a=Array(n);e<n;e++)a[e]=t[e];return a}function c(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return l(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?l(t,n):void 0}}(t)||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 p(t,n,e){return(n=a(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}const d={bend:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:["1.1em",0],translateX:["0.55em",0],translateZ:0,rotateZ:[180,0],duration:o,opacity:[0,1],easing:"easeOutExpo",delay:function(t,n){return 50*n}}),void((e||u&&!l())&&a.add({targets:i,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){u&&c()}}));var n,e,a,i,o,r,s,u,l,c},blinds:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,rotateY:[-90,0],opacity:[0,1],delay:function(t,n){return o*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,rotateY:[0,90],opacity:[1,0],easing:"easeOutExpo",delay:function(t,n){return s*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},bounce:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scale:[.3,1.4,.7,1],easing:"easeOutQuad",duration:o,delay:function(t,n){return 50*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,scale:[1,.7,1.4,.3],duration:s,easing:"easeInQuad",delay:function(t,n){return 50*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},drop:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scale:[0,1],opacity:[0,1],duration:o,elasticity:600,delay:function(t,n){return 45*(n+1)}}),void((e||u&&!l())&&a.add({targets:i,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){u&&c()}}));var n,e,a,i,o,r,s,u,l,c},fade:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,opacity:[0,1],easing:"easeInOutQuad",duration:o,delay:function(t,n){return 70*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,opacity:[1,0],easing:"easeOutInQuad",duration:s,delay:function(t,n){return 70*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},fall:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:[-100,0],easing:"easeOutExpo",duration:o,opacity:[0,1],delay:function(t,n){return 30*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateY:[0,100],easing:"easeInExpo",duration:s,opacity:[1,0],delay:function(t,n){return 30*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},flip:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,rotateY:[-90,0],opacity:[0,1],duration:o,delay:function(t,n){return 45*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,rotateY:[0,90],opacity:[1,0],duration:s,easing:"easeOutExpo",delay:function(t,n){return 45*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},jump:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:["1.1em",0],translateZ:0,duration:o,opacity:[0,1],delay:function(t,n){return 50*n}}),void((e||u&&!l())&&a.add({targets:i,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){u&&c()}}));var n,e,a,i,o,r,s,u,l,c},pop:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scale:[.3,1],opacity:[0,1],translateZ:0,easing:"easeOutExpo",duration:o,delay:function(t,n){return 70*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,scale:[1,.3],opacity:[1,0],duration:s,easing:"easeOutExpo",delay:function(t,n){return 70*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},rising:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:[100,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:o,delay:function(t,n){return 300+30*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateY:[0,-100],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,n){return 100+30*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},"rubber-band":function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scaleX:[{value:1.25},{value:.75},{value:1.15},{value:.95},{value:1.05},{value:1}],scaleY:[{value:.75},{value:1.25},{value:.85},{value:1.05},{value:.95},{value:1}],opacity:[0,1],duration:o,easing:"easeOutQuad",delay:function(t,n){return 50*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,scaleX:[{value:1.05},{value:.95},{value:1.15},{value:.75},{value:1.25},{value:1}],scaleY:[{value:.95},{value:1.05},{value:.85},{value:1.25},{value:.75},{value:1}],opacity:[1,0],easing:"easeInQuad",duration:s,delay:function(t,n){return 50*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},"slide-down":function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:[-40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:o}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateY:[0,40],opacity:[1,0],easing:"easeInExpo",duration:s,complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},"slide-left":function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateX:[-40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:o,delay:function(t,n){return 500+30*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateX:[0,40],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,n){return 100+30*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},"slide-right":function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateX:[40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:o,delay:function(t,n){return 500+30*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateX:[0,-40],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,n){return 100+30*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},"slide-up":function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,translateY:[40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:o}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,translateY:[0,-40],opacity:[1,0],easing:"easeInExpo",duration:s,complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},swing:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,rotate:[{value:15},{value:-10},{value:5},{value:-5},{value:0}],opacity:[0,1],duration:o,easing:"easeOutSine",delay:function(t,n){return 50*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,rotate:[{value:0},{value:-5},{value:10},{value:-15},{value:15}],opacity:0,easing:"easeInSine",duration:s,delay:function(t,n){return 50*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},swirl:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,rotateX:[-90,0],opacity:[0,1],delay:function(t,n){return o*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,rotateX:[0,90],opacity:[1,0],delay:function(t,n){return s*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},wave:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scale:[.3,1],opacity:[0,1],translateZ:0,delay:function(t,n){return o*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,scale:[1,.3],opacity:[1,0],translateZ:0,delay:function(t,n){return s*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c},zoom:function(t){return e=(n=t).loop,a=n.animation,i=n.target,o=n.animationDuration,r=n.displayDuration,s=n.transitionDuration,u=n.isRotationType,l=n.stopRotating,c=n.nextRotationText,a.add({targets:i,scale:[4,1],opacity:[0,1],translateZ:0,easing:"easeOutExpo",duration:o,delay:function(t,n){return 70*n}}),void((e||u&&!l())&&(a.add({targets:i,delay:r}),a.add({targets:i,scale:[1,0],opacity:[1,0],translateZ:0,easing:"easeInExpo",duration:s,delay:function(t,n){return 70*n},complete:function(){u&&c()}})));var n,e,a,i,o,r,s,u,l,c}},h=window.animejs;var g=t.n(h),f=function(){return o(function t(e,a){var i=this;n(this,t),p(this,"_generateElement",function(){var t=(0,u.u)(i.element).find(".text-wrapper");if(t.html(""),"rotation"==i.textType){i.rotationTexts.forEach(function(n,e){var a=(0,u.u)("<span>").addClass("rotation-text");i._addActiveRotationClass(a,e),i._generateText(a,n.rotationText),t.append(a)});var n=(0,u.u)(i.element).find(".rotation-text.active").first();t.attr({style:"width: ".concat(n.offsetWidth,"px;")})}else i._generateText(t,i.text)}),p(this,"_setTarget",function(){"rotation"===i.textType?i.target=c((0,u.u)(i.element).find(".rotation-text.active").find(".letter").nodes):i.target=c((0,u.u)(i.element).find(".letter").nodes)}),p(this,"_generateText",function(t,n){t.text(n),t.html(t.text().replace(i.splitByWord?/\b\w+\b/g:/\S/g,function(t){return"<span class='letter'>".concat(t,"</span>")}))}),p(this,"_addActiveRotationClass",function(t,n){i.rotationTextIndex===n&&(0,u.u)(t).addClass("active")}),p(this,"_updateActiveElementRotation",function(){var t=(0,u.u)(i.element).find(".rotation-text");t.removeClass("active"),t.each(function(t,n){i._addActiveRotationClass(t,n)})}),p(this,"_updateRotationIndex",function(){i.rotationTextIndex+1>=i.rotationTexts.length?i.rotationTextIndex=0:i.rotationTextIndex++}),p(this,"_stopRotating",function(){var t=i.rotationTextIndex+1>=i.rotationTexts.length;return!i.loop&&t}),p(this,"_smoothAnimationWrapper",function(){null!=i.animationWrapper&&i.animationWrapper.remove(i.targetWrapper);var t=(0,u.u)(i.element).find(".rotation-text.active").first().offsetWidth;i.targetWrapper=(0,u.u)(i.element).find(".text-wrapper").nodes,i.animationWrapper=g()({targets:i.targetWrapper,width:t+"px",duration:300,easing:"easeInOutQuad"})}),p(this,"_nextRotationText",function(){i.animeInit.remove(i.target),i._updateRotationIndex(),i._updateActiveElementRotation(),i._setTarget(),i._smoothAnimationWrapper(),i.run()}),this.element=e,this.loop=a.loop,this.splitByWord=a.splitByWord,this.textType=a.textType,this.text=a.text,this.rotationTexts=a.rotationTexts,this.animationDuration=a.animationDuration,this.displayDuration=a.displayDuration,this.transitionDuration=a.transitionDuration,this.rotationTextIndex=0,this.animationStyle=d[a.style],this.animeInit=null,this.target=null,this.animationWrapper=null,this.targetWrapper=null,this._generateElement(),this._setTarget()},[{key:"run",value:function(){this.animeInit&&this.animeInit.remove(this.target.nodes),this.animeInit=g().timeline({loop:this.loop}),this.animationStyle&&this.animationStyle({loop:this.loop,animation:this.animeInit,target:this.target,animationDuration:this.animationDuration,displayDuration:this.displayDuration,transitionDuration:this.transitionDuration,isRotationType:"rotation"==this.textType,stopRotating:this._stopRotating,nextRotationText:this._nextRotationText})}}])}();const y={circle:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-circle">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M281.68,15.89S135.3,14.19,22.05,81.45s331.78,76.17,441,35.68S363.86-35.6,178.77,26.39"\n transform="translate(0.75 -3.61)"\n />\n </svg>\n ')}(t)},x:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-cross">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M7.5,6.5s257,84,483,136"\n transform="translate(-6.1 -2.22)"\n />\n <path\n ').concat(a,'\n d="M490.5,6.5s-310,103-483,136"\n transform="translate(-6.1 -2.22)"\n />\n </svg>\n ')}(t)},curly:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-curly">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M6.5,75.5s25-29,50,0,50,0,50,0,25-32,50,0,50-1,50-1,25-30,50,1,50,0,50,0,27-28,50,0,50,0,50,0,26-25,50,0,36,7,36,7"\n transform="translate(-3.09 -56.78)"\n />\n </svg>\n ')}(t)},diagonal:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-diagonal">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M7.5,6.5s257,84,483,136"\n transform="translate(-6.1 -2.22)"\n />\n </svg>\n ')}(t)},"double-underline":function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-double-underline">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M3,59.5s152.5-13,493-3"\n transform="translate(-2.62 -48.22)"\n />\n <path\n ').concat(a,'\n d="M3,83.5s200.54-11,493,0"\n transform="translate(-2.62 -48.22)"\n />\n </svg>\n ')}(t)},double:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-double">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M3.69,18.7s240.11-30,492.31,0"\n transform="translate(-3.14 -0.87)"\n />\n <path\n ').concat(a,'\n d="M3.65,144S248.43,128,496,144"\n transform="translate(-3.14 -0.87)"\n />\n </svg>\n ')}(t)},strikethrough:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-strikethrough">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M7.5,75.5s200,10,485,0"\n transform="translate(-7.28 -71)"\n />\n </svg>\n ')}(t)},"underline-zigzag":function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-underline-zigzag">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M9.5,52.5s361-31,478,0"\n transform="translate(-9.11 -34.22)"\n />\n <path\n ').concat(a,'\n d="M484.5,55.5s-386-2-432,15c0,0,317-12,358,5,0,0-177-4-227,11"\n transform="translate(-9.11 -34.22)"\n />\n </svg>\n ')}(t)},underline:function(t){return function(t){var n=t.svgProps,e=t.gradientSvg,a=t.commonPathProps;return"\n <svg ".concat(n,' class="svg-underline">\n <defs>').concat(e,"</defs>\n <path\n ").concat(a,'\n d="M3,77.5s200.54-11,493,0"\n transform="translate(-2.75 -68.11)"\n />\n </svg>\n ')}(t)}};var m=function(){return o(function t(e,a){n(this,t),this.element=e,this.elementId=a.elementId,this.loop=a.loop,this.text=a.text,this.animationDuration=a.animationDuration,this.displayDuration=a.displayDuration,this.transitionDuration=a.transitionDuration,this.highlightStyle=y[a.style],this.highlightedStyle=a.highlightedStyle,this.highlightGradient=a.highlightGradient,this.highlightColorType=a.highlightColorType,this.highlightColor=a.highlightColor,this.animeInit=null,this.target=null,this.svgElement=null},[{key:"run",value:function(){this.__generateStroke(),this.__inputSvgToElement(),this.__addAnimation()}},{key:"__inputSvgToElement",value:function(){this.element.find(".highlighted").append(this.svgElement)}},{key:"__generateStroke",value:function(){var t=null,n="";"gradient"===this.highlightColorType&&(t='\n <linearGradient\n x1="0"\n y1="0"\n x2="100%"\n y2="100%"\n id="'.concat(this.elementId,'-highlight-gradient"\n >\n ').concat(this.__generateGradient(),"\n </linearGradient>\n "),n="url(#".concat(this.elementId,"-highlight-gradient)"));var e='\n class="style-'.concat(this.highlightColorType,'",\n stroke="').concat(n||void 0,'",\n ');this.svgElement=y[this.highlightedStyle]({svgProps:'\n xmlns="http://www.w3.org/2000/svg",\n viewBox="0 0 500 150",\n preserveAspectRatio="none",\n ',gradientSvg:t,commonPathProps:e})}},{key:"__addAnimation",value:function(){for(var t=this.element.find("path").nodes,n=0;n<t.length;n++){var e=t[n].getTotalLength();t[n].setAttribute("stroke-dasharray",e),t[n].setAttribute("stroke-dashoffset",e)}this.target=t,this.animeInit=g().timeline({loop:this.loop}).add({targets:this.target,strokeDashoffset:function(t){return[t.getTotalLength(),0]},opacity:[0,1],easing:"easeInOutSine",duration:this.animationDuration}),this.loop&&this.animeInit.add({targets:this.target,opacity:[1,0],delay:this.displayDuration,duration:this.transitionDuration,easing:"easeInOutSine"})}},{key:"__generateGradient",value:function(){return this.highlightGradient?this.highlightGradient.map(function(t,n){return'<stop\n key="'.concat(n,'"\n offset="').concat(t.offset,'"\n style="\n stop-color:').concat(t.color,";\n stop-opacity:").concat(t.opacity||1,';\n "\n />')}):null}}])}();function v(){return v=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},v.apply(this,arguments)}var x={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:1/0,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(t){},onComplete:function(t){},preStringTyped:function(t,n){},onStringTyped:function(t,n){},onLastStringBackspaced:function(t){},onTypingPaused:function(t,n){},onTypingResumed:function(t,n){},onReset:function(t){},onStop:function(t,n){},onStart:function(t,n){},onDestroy:function(t){}},b=new(function(){function t(){}var n=t.prototype;return n.load=function(t,n,e){if(t.el="string"==typeof e?document.querySelector(e):e,t.options=v({},x,n),t.isInput="input"===t.el.tagName.toLowerCase(),t.attr=t.options.attr,t.bindInputFocusEvents=t.options.bindInputFocusEvents,t.showCursor=!t.isInput&&t.options.showCursor,t.cursorChar=t.options.cursorChar,t.cursorBlinking=!0,t.elContent=t.attr?t.el.getAttribute(t.attr):t.el.textContent,t.contentType=t.options.contentType,t.typeSpeed=t.options.typeSpeed,t.startDelay=t.options.startDelay,t.backSpeed=t.options.backSpeed,t.smartBackspace=t.options.smartBackspace,t.backDelay=t.options.backDelay,t.fadeOut=t.options.fadeOut,t.fadeOutClass=t.options.fadeOutClass,t.fadeOutDelay=t.options.fadeOutDelay,t.isPaused=!1,t.strings=t.options.strings.map(function(t){return t.trim()}),t.stringsElement="string"==typeof t.options.stringsElement?document.querySelector(t.options.stringsElement):t.options.stringsElement,t.stringsElement){t.strings=[],t.stringsElement.style.cssText="clip: rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;";var a=Array.prototype.slice.apply(t.stringsElement.children),i=a.length;if(i)for(var o=0;o<i;o+=1)t.strings.push(a[o].innerHTML.trim())}for(var r in t.strPos=0,t.currentElContent=this.getCurrentElContent(t),t.currentElContent&&t.currentElContent.length>0&&(t.strPos=t.currentElContent.length-1,t.strings.unshift(t.currentElContent)),t.sequence=[],t.strings)t.sequence[r]=r;t.arrayPos=0,t.stopNum=0,t.loop=t.options.loop,t.loopCount=t.options.loopCount,t.curLoop=0,t.shuffle=t.options.shuffle,t.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},t.typingComplete=!1,t.autoInsertCss=t.options.autoInsertCss,t.autoInsertCss&&(this.appendCursorAnimationCss(t),this.appendFadeOutAnimationCss(t))},n.getCurrentElContent=function(t){return t.attr?t.el.getAttribute(t.attr):t.isInput?t.el.value:"html"===t.contentType?t.el.innerHTML:t.el.textContent},n.appendCursorAnimationCss=function(t){var n="data-typed-js-cursor-css";if(t.showCursor&&!document.querySelector("["+n+"]")){var e=document.createElement("style");e.setAttribute(n,"true"),e.innerHTML="\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n ",document.body.appendChild(e)}},n.appendFadeOutAnimationCss=function(t){var n="data-typed-fadeout-js-css";if(t.fadeOut&&!document.querySelector("["+n+"]")){var e=document.createElement("style");e.setAttribute(n,"true"),e.innerHTML="\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n ",document.body.appendChild(e)}},t}()),T=new(function(){function t(){}var n=t.prototype;return n.typeHtmlChars=function(t,n,e){if("html"!==e.contentType)return n;var a=t.substring(n).charAt(0);if("<"===a||"&"===a){var i;for(i="<"===a?">":";";t.substring(n+1).charAt(0)!==i&&!(1+ ++n>t.length););n++}return n},n.backSpaceHtmlChars=function(t,n,e){if("html"!==e.contentType)return n;var a=t.substring(n).charAt(0);if(">"===a||";"===a){var i;for(i=">"===a?"<":"&";t.substring(n-1).charAt(0)!==i&&!(--n<0););n--}return n},t}()),D=function(){function t(t,n){b.load(this,n,t),this.begin()}var n=t.prototype;return n.toggle=function(){this.pause.status?this.start():this.stop()},n.stop=function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))},n.start=function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))},n.destroy=function(){this.reset(!1),this.options.onDestroy(this)},n.reset=function(t){void 0===t&&(t=!0),clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,t&&(this.insertCursor(),this.options.onReset(this),this.begin())},n.begin=function(){var t=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout(function(){0===t.strPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos):t.backspace(t.strings[t.sequence[t.arrayPos]],t.strPos)},this.startDelay)},n.typewrite=function(t,n){var e=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var a=this.humanizer(this.typeSpeed),i=1;!0!==this.pause.status?this.timeout=setTimeout(function(){n=T.typeHtmlChars(t,n,e);var a=0,o=t.substring(n);if("^"===o.charAt(0)&&/^\^\d+/.test(o)){var r=1;r+=(o=/\d+/.exec(o)[0]).length,a=parseInt(o),e.temporaryPause=!0,e.options.onTypingPaused(e.arrayPos,e),t=t.substring(0,n)+t.substring(n+r),e.toggleBlinking(!0)}if("`"===o.charAt(0)){for(;"`"!==t.substring(n+i).charAt(0)&&(i++,!(n+i>t.length)););var s=t.substring(0,n),u=t.substring(s.length+1,n+i),l=t.substring(n+i+1);t=s+u+l,i--}e.timeout=setTimeout(function(){e.toggleBlinking(!1),n>=t.length?e.doneTyping(t,n):e.keepTyping(t,n,i),e.temporaryPause&&(e.temporaryPause=!1,e.options.onTypingResumed(e.arrayPos,e))},a)},a):this.setPauseStatus(t,n,!0)},n.keepTyping=function(t,n,e){0===n&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this));var a=t.substring(0,n+=e);this.replaceText(a),this.typewrite(t,n)},n.doneTyping=function(t,n){var e=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),!1===this.loop||this.curLoop===this.loopCount)||(this.timeout=setTimeout(function(){e.backspace(t,n)},this.backDelay))},n.backspace=function(t,n){var e=this;if(!0!==this.pause.status){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var a=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){n=T.backSpaceHtmlChars(t,n,e);var a=t.substring(0,n);if(e.replaceText(a),e.smartBackspace){var i=e.strings[e.arrayPos+1];e.stopNum=i&&a===i.substring(0,n)?n:0}n>e.stopNum?(n--,e.backspace(t,n)):n<=e.stopNum&&(e.arrayPos++,e.arrayPos===e.strings.length?(e.arrayPos=0,e.options.onLastStringBackspaced(),e.shuffleStringsIfNeeded(),e.begin()):e.typewrite(e.strings[e.sequence[e.arrayPos]],n))},a)}else this.setPauseStatus(t,n,!1)},n.complete=function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0},n.setPauseStatus=function(t,n,e){this.pause.typewrite=e,this.pause.curString=t,this.pause.curStrPos=n},n.toggleBlinking=function(t){this.cursor&&(this.pause.status||this.cursorBlinking!==t&&(this.cursorBlinking=t,t?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))},n.humanizer=function(t){return Math.round(Math.random()*t/2)+t},n.shuffleStringsIfNeeded=function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))},n.initFadeOut=function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)},n.replaceText=function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t},n.bindFocusEvents=function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(n){t.stop()}),this.el.addEventListener("blur",function(n){t.el.value&&0!==t.el.value.length||t.start()}))},n.insertCursor=function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))},t}(),S=function(){return o(function t(e,a){var i=this;n(this,t),p(this,"_generateElement",function(){var t=(0,u.u)(i.element).find(".text-wrapper").find(".letter");t.html(""),t.attr("id",i.id)}),this.element=e,this.id="".concat(a.elementId,"-letter"),this.loop=a.loop,this.splitByWord=a.splitByWord,this.textType=a.textType,this.text=a.text,this.rotationTexts=a.rotationTexts,this.animationDuration=a.animationDuration,this.displayDuration=a.displayDuration,this.transitionDuration=a.transitionDuration,this._generateElement()},[{key:"run",value:function(){var t="rotation"===this.textType&&this.rotationTexts.length>0?this.rotationTexts.map(function(t){return t.rotationText}):[this.text];new D("#".concat(this.id),{strings:t,typeSpeed:this.animationDuration,backSpeed:this.transitionDuration,backDelay:this.displayDuration,loop:this.loop,showCursor:!0,smartBackspace:!0})}}])}();function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(P=function(){return!!t})()}var R=function(t){function a(){return n(this,a),function(t,n,a){return n=r(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,P()?Reflect.construct(n,a||[],r(t).constructor):n.apply(t,a))}(this,a,arguments)}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&s(t,n)}(a,t),o(a,[{key:"init",value:function(){var t=this;this._elements.map(function(n){t._loadAnimation(n)})}},{key:"_loadAnimation",value:function(t){var n=(0,u.u)(t),e=JSON.parse(n.data("animation"));if("highlighted"===e.textType)new m(n,e).run();else{("typing"===e.style?new S(n,e):new f(n,e)).run()}}}])}(u.Default),C=(0,u.u)(".guten-animated-text");C&&new R(C)})();