From 14d3f877f1bea110cef7b082d10eed1181c8ec7d Mon Sep 17 00:00:00 2001 From: nkalupahana Date: Wed, 24 Jan 2024 11:40:56 -0600 Subject: [PATCH] Move typed.js to local asset + sync --- _includes/head.html | 2 +- assets/js/typed.umd.js | 3 +++ assets/js/typed.umd.js.map | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 assets/js/typed.umd.js create mode 100644 assets/js/typed.umd.js.map diff --git a/_includes/head.html b/_includes/head.html index b41acac..59f99ee 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -40,7 +40,7 @@ - + {%- include custom-head.html -%} diff --git a/assets/js/typed.umd.js b/assets/js/typed.umd.js new file mode 100644 index 0000000..5ca0798 --- /dev/null +++ b/assets/js/typed.umd.js @@ -0,0 +1,3 @@ +!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t||self).Typed=s()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var s=1;s0&&(e.strPos=e.currentElContent.length-1,e.strings.unshift(e.currentElContent)),e.sequence=[],e.strings)e.sequence[u]=u;e.arrayPos=0,e.stopNum=0,e.loop=e.options.loop,e.loopCount=e.options.loopCount,e.curLoop=0,e.shuffle=e.options.shuffle,e.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},e.typingComplete=!1,e.autoInsertCss=e.options.autoInsertCss,e.autoInsertCss&&(this.appendCursorAnimationCss(e),this.appendFadeOutAnimationCss(e))},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 s="data-typed-js-cursor-css";if(t.showCursor&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"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 s="data-typed-fadeout-js-css";if(t.fadeOut&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"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)}},e}()),n=new(/*#__PURE__*/function(){function t(){}var s=t.prototype;return s.typeHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if("<"===n||"&"===n){var i;for(i="<"===n?">":";";t.substring(s+1).charAt(0)!==i&&!(1+ ++s>t.length););s++}return s},s.backSpaceHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if(">"===n||";"===n){var i;for(i=">"===n?"<":"&";t.substring(s-1).charAt(0)!==i&&!(--s<0););s--}return s},t}());/*#__PURE__*/ +return function(){function t(t,s){e.load(this,s,t),this.begin()}var s=t.prototype;return s.toggle=function(){this.pause.status?this.start():this.stop()},s.stop=function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))},s.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))},s.destroy=function(){this.reset(!1),this.options.onDestroy(this)},s.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())},s.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)},s.typewrite=function(t,s){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 i=this.humanizer(this.typeSpeed),r=1;!0!==this.pause.status?this.timeout=setTimeout(function(){s=n.typeHtmlChars(t,s,e);var i=0,o=t.substring(s);if("^"===o.charAt(0)&&/^\^\d+/.test(o)){var a=1;a+=(o=/\d+/.exec(o)[0]).length,i=parseInt(o),e.temporaryPause=!0,e.options.onTypingPaused(e.arrayPos,e),t=t.substring(0,s)+t.substring(s+a),e.toggleBlinking(!0)}if("`"===o.charAt(0)){for(;"`"!==t.substring(s+r).charAt(0)&&(r++,!(s+r>t.length)););var u=t.substring(0,s),p=t.substring(u.length+1,s+r),c=t.substring(s+r+1);t=u+p+c,r--}e.timeout=setTimeout(function(){e.toggleBlinking(!1),s>=t.length?e.doneTyping(t,s):e.keepTyping(t,s,r),e.temporaryPause&&(e.temporaryPause=!1,e.options.onTypingResumed(e.arrayPos,e))},i)},i):this.setPauseStatus(t,s,!0)},s.keepTyping=function(t,s,e){0===s&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this));var n=t.substring(0,s+=e);this.replaceText(n),this.typewrite(t,s)},s.doneTyping=function(t,s){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,s)},this.backDelay))},s.backspace=function(t,s){var e=this;if(!0!==this.pause.status){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var i=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){s=n.backSpaceHtmlChars(t,s,e);var i=t.substring(0,s);if(e.replaceText(i),e.smartBackspace){var r=e.strings[e.arrayPos+1];e.stopNum=r&&i===r.substring(0,s)?s:0}s>e.stopNum?(s--,e.backspace(t,s)):s<=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]],s))},i)}else this.setPauseStatus(t,s,!1)},s.complete=function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0},s.setPauseStatus=function(t,s,e){this.pause.typewrite=e,this.pause.curString=t,this.pause.curStrPos=s},s.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")))},s.humanizer=function(t){return Math.round(Math.random()*t/2)+t},s.shuffleStringsIfNeeded=function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))},s.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)},s.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},s.bindFocusEvents=function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(s){t.stop()}),this.el.addEventListener("blur",function(s){t.el.value&&0!==t.el.value.length||t.start()}))},s.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}()}); +//# sourceMappingURL=typed.umd.js.map \ No newline at end of file diff --git a/assets/js/typed.umd.js.map b/assets/js/typed.umd.js.map new file mode 100644 index 0000000..697553c --- /dev/null +++ b/assets/js/typed.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typed.umd.js","sources":["../src/defaults.js","../src/initializer.js","../src/html-parser.js","../src/typed.js"],"sourcesContent":["/**\n * Defaults & options\n * @returns {object} Typed defaults & options\n * @public\n */\n\nconst defaults = {\n /**\n * @property {array} strings strings to be typed\n * @property {string} stringsElement ID of element containing string children\n */\n strings: [\n 'These are the default values...',\n 'You know what you should do?',\n 'Use your own!',\n 'Have a great day!',\n ],\n stringsElement: null,\n\n /**\n * @property {number} typeSpeed type speed in milliseconds\n */\n typeSpeed: 0,\n\n /**\n * @property {number} startDelay time before typing starts in milliseconds\n */\n startDelay: 0,\n\n /**\n * @property {number} backSpeed backspacing speed in milliseconds\n */\n backSpeed: 0,\n\n /**\n * @property {boolean} smartBackspace only backspace what doesn't match the previous string\n */\n smartBackspace: true,\n\n /**\n * @property {boolean} shuffle shuffle the strings\n */\n shuffle: false,\n\n /**\n * @property {number} backDelay time before backspacing in milliseconds\n */\n backDelay: 700,\n\n /**\n * @property {boolean} fadeOut Fade out instead of backspace\n * @property {string} fadeOutClass css class for fade animation\n * @property {boolean} fadeOutDelay Fade out delay in milliseconds\n */\n fadeOut: false,\n fadeOutClass: 'typed-fade-out',\n fadeOutDelay: 500,\n\n /**\n * @property {boolean} loop loop strings\n * @property {number} loopCount amount of loops\n */\n loop: false,\n loopCount: Infinity,\n\n /**\n * @property {boolean} showCursor show cursor\n * @property {string} cursorChar character for cursor\n * @property {boolean} autoInsertCss insert CSS for cursor and fadeOut into HTML \n */\n showCursor: true,\n cursorChar: '|',\n autoInsertCss: true,\n\n /**\n * @property {string} attr attribute for typing\n * Ex: input placeholder, value, or just HTML text\n */\n attr: null,\n\n /**\n * @property {boolean} bindInputFocusEvents bind to focus and blur if el is text input\n */\n bindInputFocusEvents: false,\n\n /**\n * @property {string} contentType 'html' or 'null' for plaintext\n */\n contentType: 'html',\n\n /**\n * Before it begins typing\n * @param {Typed} self\n */\n onBegin: (self) => {},\n\n /**\n * All typing is complete\n * @param {Typed} self\n */\n onComplete: (self) => {},\n\n /**\n * Before each string is typed\n * @param {number} arrayPos\n * @param {Typed} self\n */\n preStringTyped: (arrayPos, self) => {},\n\n /**\n * After each string is typed\n * @param {number} arrayPos\n * @param {Typed} self\n */\n onStringTyped: (arrayPos, self) => {},\n\n /**\n * During looping, after last string is typed\n * @param {Typed} self\n */\n onLastStringBackspaced: (self) => {},\n\n /**\n * Typing has been stopped\n * @param {number} arrayPos\n * @param {Typed} self\n */\n onTypingPaused: (arrayPos, self) => {},\n\n /**\n * Typing has been started after being stopped\n * @param {number} arrayPos\n * @param {Typed} self\n */\n onTypingResumed: (arrayPos, self) => {},\n\n /**\n * After reset\n * @param {Typed} self\n */\n onReset: (self) => {},\n\n /**\n * After stop\n * @param {number} arrayPos\n * @param {Typed} self\n */\n onStop: (arrayPos, self) => {},\n\n /**\n * After start\n * @param {number} arrayPos\n * @param {Typed} self\n */\n onStart: (arrayPos, self) => {},\n\n /**\n * After destroy\n * @param {Typed} self\n */\n onDestroy: (self) => {},\n};\n\nexport default defaults;\n","import defaults from './defaults.js';\n/**\n * Initialize the Typed object\n */\n\nexport default class Initializer {\n /**\n * Load up defaults & options on the Typed instance\n * @param {Typed} self instance of Typed\n * @param {object} options options object\n * @param {string} elementId HTML element ID _OR_ instance of HTML element\n * @private\n */\n\n load(self, options, elementId) {\n // chosen element to manipulate text\n if (typeof elementId === 'string') {\n self.el = document.querySelector(elementId);\n } else {\n self.el = elementId;\n }\n\n self.options = { ...defaults, ...options };\n\n // attribute to type into\n self.isInput = self.el.tagName.toLowerCase() === 'input';\n self.attr = self.options.attr;\n self.bindInputFocusEvents = self.options.bindInputFocusEvents;\n\n // show cursor\n self.showCursor = self.isInput ? false : self.options.showCursor;\n\n // custom cursor\n self.cursorChar = self.options.cursorChar;\n\n // Is the cursor blinking\n self.cursorBlinking = true;\n\n // text content of element\n self.elContent = self.attr\n ? self.el.getAttribute(self.attr)\n : self.el.textContent;\n\n // html or plain text\n self.contentType = self.options.contentType;\n\n // typing speed\n self.typeSpeed = self.options.typeSpeed;\n\n // add a delay before typing starts\n self.startDelay = self.options.startDelay;\n\n // backspacing speed\n self.backSpeed = self.options.backSpeed;\n\n // only backspace what doesn't match the previous string\n self.smartBackspace = self.options.smartBackspace;\n\n // amount of time to wait before backspacing\n self.backDelay = self.options.backDelay;\n\n // Fade out instead of backspace\n self.fadeOut = self.options.fadeOut;\n self.fadeOutClass = self.options.fadeOutClass;\n self.fadeOutDelay = self.options.fadeOutDelay;\n\n // variable to check whether typing is currently paused\n self.isPaused = false;\n\n // input strings of text\n self.strings = self.options.strings.map((s) => s.trim());\n\n // div containing strings\n if (typeof self.options.stringsElement === 'string') {\n self.stringsElement = document.querySelector(self.options.stringsElement);\n } else {\n self.stringsElement = self.options.stringsElement;\n }\n\n if (self.stringsElement) {\n self.strings = [];\n self.stringsElement.style.cssText =\n 'clip: rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;';\n\n const strings = Array.prototype.slice.apply(self.stringsElement.children);\n const stringsLength = strings.length;\n\n if (stringsLength) {\n for (let i = 0; i < stringsLength; i += 1) {\n const stringEl = strings[i];\n self.strings.push(stringEl.innerHTML.trim());\n }\n }\n }\n\n // character number position of current string\n self.strPos = 0;\n\n // If there is some text in the element\n self.currentElContent = this.getCurrentElContent(self);\n\n if (self.currentElContent && self.currentElContent.length > 0) {\n self.strPos = self.currentElContent.length - 1;\n self.strings.unshift(self.currentElContent);\n }\n\n // the order of strings\n self.sequence = [];\n\n // Set the order in which the strings are typed\n for (let i in self.strings) {\n self.sequence[i] = i;\n }\n\n // current array position\n self.arrayPos = 0;\n\n // index of string to stop backspacing on\n self.stopNum = 0;\n\n // Looping logic\n self.loop = self.options.loop;\n self.loopCount = self.options.loopCount;\n self.curLoop = 0;\n\n // shuffle the strings\n self.shuffle = self.options.shuffle;\n\n self.pause = {\n status: false,\n typewrite: true,\n curString: '',\n curStrPos: 0,\n };\n\n // When the typing is complete (when not looped)\n self.typingComplete = false;\n\n self.autoInsertCss = self.options.autoInsertCss;\n\n if (self.autoInsertCss) {\n this.appendCursorAnimationCss(self);\n this.appendFadeOutAnimationCss(self);\n }\n }\n\n getCurrentElContent(self) {\n let elContent = '';\n if (self.attr) {\n elContent = self.el.getAttribute(self.attr);\n } else if (self.isInput) {\n elContent = self.el.value;\n } else if (self.contentType === 'html') {\n elContent = self.el.innerHTML;\n } else {\n elContent = self.el.textContent;\n }\n return elContent;\n }\n\n appendCursorAnimationCss(self) {\n const cssDataName = 'data-typed-js-cursor-css';\n\n if (!self.showCursor || document.querySelector(`[${cssDataName}]`)) {\n return;\n }\n\n let css = document.createElement('style');\n css.setAttribute(cssDataName, 'true');\n\n css.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 `;\n\n document.body.appendChild(css);\n }\n\n appendFadeOutAnimationCss(self) {\n const cssDataName = 'data-typed-fadeout-js-css';\n\n if (!self.fadeOut || document.querySelector(`[${cssDataName}]`)) {\n return;\n }\n\n let css = document.createElement('style');\n css.setAttribute(cssDataName, 'true');\n\n css.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 `;\n\n document.body.appendChild(css);\n }\n}\n\nexport let initializer = new Initializer();\n","/**\n * TODO: These methods can probably be combined somehow\n * Parse HTML tags & HTML Characters\n */\n\nexport default class HTMLParser {\n /**\n * Type HTML tags & HTML Characters\n * @param {string} curString Current string\n * @param {number} curStrPos Position in current string\n * @param {Typed} self instance of Typed\n * @returns {number} a new string position\n * @private\n */\n\n typeHtmlChars(curString, curStrPos, self) {\n if (self.contentType !== 'html') return curStrPos;\n const curChar = curString.substring(curStrPos).charAt(0);\n if (curChar === '<' || curChar === '&') {\n let endTag = '';\n if (curChar === '<') {\n endTag = '>';\n } else {\n endTag = ';';\n }\n while (curString.substring(curStrPos + 1).charAt(0) !== endTag) {\n curStrPos++;\n if (curStrPos + 1 > curString.length) {\n break;\n }\n }\n curStrPos++;\n }\n return curStrPos;\n }\n\n /**\n * Backspace HTML tags and HTML Characters\n * @param {string} curString Current string\n * @param {number} curStrPos Position in current string\n * @param {Typed} self instance of Typed\n * @returns {number} a new string position\n * @private\n */\n backSpaceHtmlChars(curString, curStrPos, self) {\n if (self.contentType !== 'html') return curStrPos;\n const curChar = curString.substring(curStrPos).charAt(0);\n if (curChar === '>' || curChar === ';') {\n let endTag = '';\n if (curChar === '>') {\n endTag = '<';\n } else {\n endTag = '&';\n }\n while (curString.substring(curStrPos - 1).charAt(0) !== endTag) {\n curStrPos--;\n if (curStrPos < 0) {\n break;\n }\n }\n curStrPos--;\n }\n return curStrPos;\n }\n}\n\nexport let htmlParser = new HTMLParser();\n","import { initializer } from './initializer.js';\nimport { htmlParser } from './html-parser.js';\n\n/**\n * Welcome to Typed.js!\n * @param {string} elementId HTML element ID _OR_ HTML element\n * @param {object} options options object\n * @returns {object} a new Typed object\n */\nexport default class Typed {\n constructor(elementId, options) {\n // Initialize it up\n initializer.load(this, options, elementId);\n // All systems go!\n this.begin();\n }\n\n /**\n * Toggle start() and stop() of the Typed instance\n * @public\n */\n toggle() {\n this.pause.status ? this.start() : this.stop();\n }\n\n /**\n * Stop typing / backspacing and enable cursor blinking\n * @public\n */\n stop() {\n if (this.typingComplete) return;\n if (this.pause.status) return;\n this.toggleBlinking(true);\n this.pause.status = true;\n this.options.onStop(this.arrayPos, this);\n }\n\n /**\n * Start typing / backspacing after being stopped\n * @public\n */\n start() {\n if (this.typingComplete) return;\n if (!this.pause.status) return;\n this.pause.status = false;\n if (this.pause.typewrite) {\n this.typewrite(this.pause.curString, this.pause.curStrPos);\n } else {\n this.backspace(this.pause.curString, this.pause.curStrPos);\n }\n this.options.onStart(this.arrayPos, this);\n }\n\n /**\n * Destroy this instance of Typed\n * @public\n */\n destroy() {\n this.reset(false);\n this.options.onDestroy(this);\n }\n\n /**\n * Reset Typed and optionally restarts\n * @param {boolean} restart\n * @public\n */\n reset(restart = true) {\n clearInterval(this.timeout);\n this.replaceText('');\n if (this.cursor && this.cursor.parentNode) {\n this.cursor.parentNode.removeChild(this.cursor);\n this.cursor = null;\n }\n this.strPos = 0;\n this.arrayPos = 0;\n this.curLoop = 0;\n if (restart) {\n this.insertCursor();\n this.options.onReset(this);\n this.begin();\n }\n }\n\n /**\n * Begins the typing animation\n * @private\n */\n begin() {\n this.options.onBegin(this);\n this.typingComplete = false;\n this.shuffleStringsIfNeeded(this);\n this.insertCursor();\n if (this.bindInputFocusEvents) this.bindFocusEvents();\n this.timeout = setTimeout(() => {\n // If the strPos is 0, we're starting from the beginning of a string\n // else, we're starting with a previous string that needs to be backspaced first\n if (this.strPos === 0) {\n this.typewrite(this.strings[this.sequence[this.arrayPos]], this.strPos);\n } else {\n this.backspace(this.strings[this.sequence[this.arrayPos]], this.strPos);\n }\n }, this.startDelay);\n }\n\n /**\n * Called for each character typed\n * @param {string} curString the current string in the strings array\n * @param {number} curStrPos the current position in the curString\n * @private\n */\n typewrite(curString, curStrPos) {\n if (this.fadeOut && this.el.classList.contains(this.fadeOutClass)) {\n this.el.classList.remove(this.fadeOutClass);\n if (this.cursor) this.cursor.classList.remove(this.fadeOutClass);\n }\n\n const humanize = this.humanizer(this.typeSpeed);\n let numChars = 1;\n\n if (this.pause.status === true) {\n this.setPauseStatus(curString, curStrPos, true);\n return;\n }\n\n // contain typing function in a timeout humanize'd delay\n this.timeout = setTimeout(() => {\n // skip over any HTML chars\n curStrPos = htmlParser.typeHtmlChars(curString, curStrPos, this);\n\n let pauseTime = 0;\n let substr = curString.substring(curStrPos);\n // check for an escape character before a pause value\n // format: \\^\\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^\n // single ^ are removed from string\n if (substr.charAt(0) === '^') {\n if (/^\\^\\d+/.test(substr)) {\n let skip = 1; // skip at least 1\n substr = /\\d+/.exec(substr)[0];\n skip += substr.length;\n pauseTime = parseInt(substr);\n this.temporaryPause = true;\n this.options.onTypingPaused(this.arrayPos, this);\n // strip out the escape character and pause value so they're not printed\n curString =\n curString.substring(0, curStrPos) +\n curString.substring(curStrPos + skip);\n this.toggleBlinking(true);\n }\n }\n\n // check for skip characters formatted as\n // \"this is a `string to print NOW` ...\"\n if (substr.charAt(0) === '`') {\n while (curString.substring(curStrPos + numChars).charAt(0) !== '`') {\n numChars++;\n if (curStrPos + numChars > curString.length) break;\n }\n // strip out the escape characters and append all the string in between\n const stringBeforeSkip = curString.substring(0, curStrPos);\n const stringSkipped = curString.substring(\n stringBeforeSkip.length + 1,\n curStrPos + numChars\n );\n const stringAfterSkip = curString.substring(curStrPos + numChars + 1);\n curString = stringBeforeSkip + stringSkipped + stringAfterSkip;\n numChars--;\n }\n\n // timeout for any pause after a character\n this.timeout = setTimeout(() => {\n // Accounts for blinking while paused\n this.toggleBlinking(false);\n\n // We're done with this sentence!\n if (curStrPos >= curString.length) {\n this.doneTyping(curString, curStrPos);\n } else {\n this.keepTyping(curString, curStrPos, numChars);\n }\n // end of character pause\n if (this.temporaryPause) {\n this.temporaryPause = false;\n this.options.onTypingResumed(this.arrayPos, this);\n }\n }, pauseTime);\n\n // humanized value for typing\n }, humanize);\n }\n\n /**\n * Continue to the next string & begin typing\n * @param {string} curString the current string in the strings array\n * @param {number} curStrPos the current position in the curString\n * @private\n */\n keepTyping(curString, curStrPos, numChars) {\n // call before functions if applicable\n if (curStrPos === 0) {\n this.toggleBlinking(false);\n this.options.preStringTyped(this.arrayPos, this);\n }\n // start typing each new char into existing string\n // curString: arg, this.el.html: original text inside element\n curStrPos += numChars;\n const nextString = curString.substring(0, curStrPos);\n this.replaceText(nextString);\n // loop the function\n this.typewrite(curString, curStrPos);\n }\n\n /**\n * We're done typing the current string\n * @param {string} curString the current string in the strings array\n * @param {number} curStrPos the current position in the curString\n * @private\n */\n doneTyping(curString, curStrPos) {\n // fires callback function\n this.options.onStringTyped(this.arrayPos, this);\n this.toggleBlinking(true);\n // is this the final string\n if (this.arrayPos === this.strings.length - 1) {\n // callback that occurs on the last typed string\n this.complete();\n // quit if we wont loop back\n if (this.loop === false || this.curLoop === this.loopCount) {\n return;\n }\n }\n this.timeout = setTimeout(() => {\n this.backspace(curString, curStrPos);\n }, this.backDelay);\n }\n\n /**\n * Backspaces 1 character at a time\n * @param {string} curString the current string in the strings array\n * @param {number} curStrPos the current position in the curString\n * @private\n */\n backspace(curString, curStrPos) {\n if (this.pause.status === true) {\n this.setPauseStatus(curString, curStrPos, false);\n return;\n }\n if (this.fadeOut) return this.initFadeOut();\n\n this.toggleBlinking(false);\n const humanize = this.humanizer(this.backSpeed);\n\n this.timeout = setTimeout(() => {\n curStrPos = htmlParser.backSpaceHtmlChars(curString, curStrPos, this);\n // replace text with base text + typed characters\n const curStringAtPosition = curString.substring(0, curStrPos);\n this.replaceText(curStringAtPosition);\n\n // if smartBack is enabled\n if (this.smartBackspace) {\n // the remaining part of the current string is equal of the same part of the new string\n let nextString = this.strings[this.arrayPos + 1];\n if (\n nextString &&\n curStringAtPosition === nextString.substring(0, curStrPos)\n ) {\n this.stopNum = curStrPos;\n } else {\n this.stopNum = 0;\n }\n }\n\n // if the number (id of character in current string) is\n // less than the stop number, keep going\n if (curStrPos > this.stopNum) {\n // subtract characters one by one\n curStrPos--;\n // loop the function\n this.backspace(curString, curStrPos);\n } else if (curStrPos <= this.stopNum) {\n // if the stop number has been reached, increase\n // array position to next string\n this.arrayPos++;\n // When looping, begin at the beginning after backspace complete\n if (this.arrayPos === this.strings.length) {\n this.arrayPos = 0;\n this.options.onLastStringBackspaced();\n this.shuffleStringsIfNeeded();\n this.begin();\n } else {\n this.typewrite(this.strings[this.sequence[this.arrayPos]], curStrPos);\n }\n }\n // humanized value for typing\n }, humanize);\n }\n\n /**\n * Full animation is complete\n * @private\n */\n complete() {\n this.options.onComplete(this);\n if (this.loop) {\n this.curLoop++;\n } else {\n this.typingComplete = true;\n }\n }\n\n /**\n * Has the typing been stopped\n * @param {string} curString the current string in the strings array\n * @param {number} curStrPos the current position in the curString\n * @param {boolean} isTyping\n * @private\n */\n setPauseStatus(curString, curStrPos, isTyping) {\n this.pause.typewrite = isTyping;\n this.pause.curString = curString;\n this.pause.curStrPos = curStrPos;\n }\n\n /**\n * Toggle the blinking cursor\n * @param {boolean} isBlinking\n * @private\n */\n toggleBlinking(isBlinking) {\n if (!this.cursor) return;\n // if in paused state, don't toggle blinking a 2nd time\n if (this.pause.status) return;\n if (this.cursorBlinking === isBlinking) return;\n this.cursorBlinking = isBlinking;\n if (isBlinking) {\n this.cursor.classList.add('typed-cursor--blink');\n } else {\n this.cursor.classList.remove('typed-cursor--blink');\n }\n }\n\n /**\n * Speed in MS to type\n * @param {number} speed\n * @private\n */\n humanizer(speed) {\n return Math.round((Math.random() * speed) / 2) + speed;\n }\n\n /**\n * Shuffle the sequence of the strings array\n * @private\n */\n shuffleStringsIfNeeded() {\n if (!this.shuffle) return;\n this.sequence = this.sequence.sort(() => Math.random() - 0.5);\n }\n\n /**\n * Adds a CSS class to fade out current string\n * @private\n */\n initFadeOut() {\n this.el.className += ` ${this.fadeOutClass}`;\n if (this.cursor) this.cursor.className += ` ${this.fadeOutClass}`;\n return setTimeout(() => {\n this.arrayPos++;\n this.replaceText('');\n\n // Resets current string if end of loop reached\n if (this.strings.length > this.arrayPos) {\n this.typewrite(this.strings[this.sequence[this.arrayPos]], 0);\n } else {\n this.typewrite(this.strings[0], 0);\n this.arrayPos = 0;\n }\n }, this.fadeOutDelay);\n }\n\n /**\n * Replaces current text in the HTML element\n * depending on element type\n * @param {string} str\n * @private\n */\n replaceText(str) {\n if (this.attr) {\n this.el.setAttribute(this.attr, str);\n } else {\n if (this.isInput) {\n this.el.value = str;\n } else if (this.contentType === 'html') {\n this.el.innerHTML = str;\n } else {\n this.el.textContent = str;\n }\n }\n }\n\n /**\n * If using input elements, bind focus in order to\n * start and stop the animation\n * @private\n */\n bindFocusEvents() {\n if (!this.isInput) return;\n this.el.addEventListener('focus', (e) => {\n this.stop();\n });\n this.el.addEventListener('blur', (e) => {\n if (this.el.value && this.el.value.length !== 0) {\n return;\n }\n this.start();\n });\n }\n\n /**\n * On init, insert the cursor element\n * @private\n */\n insertCursor() {\n if (!this.showCursor) return;\n if (this.cursor) return;\n this.cursor = document.createElement('span');\n this.cursor.className = 'typed-cursor';\n this.cursor.setAttribute('aria-hidden', true);\n this.cursor.innerHTML = this.cursorChar;\n this.el.parentNode &&\n this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling);\n }\n}\n"],"names":["defaults","strings","stringsElement","typeSpeed","startDelay","backSpeed","smartBackspace","shuffle","backDelay","fadeOut","fadeOutClass","fadeOutDelay","loop","loopCount","Infinity","showCursor","cursorChar","autoInsertCss","attr","bindInputFocusEvents","contentType","onBegin","self","onComplete","preStringTyped","arrayPos","onStringTyped","onLastStringBackspaced","onTypingPaused","onTypingResumed","onReset","onStop","onStart","onDestroy","initializer","Initializer","_proto","prototype","load","options","elementId","el","document","querySelector","_extends","isInput","tagName","toLowerCase","cursorBlinking","elContent","getAttribute","textContent","isPaused","map","s","trim","style","cssText","Array","slice","apply","children","stringsLength","length","i","push","innerHTML","strPos","currentElContent","this","getCurrentElContent","unshift","sequence","stopNum","curLoop","pause","status","typewrite","curString","curStrPos","typingComplete","appendCursorAnimationCss","appendFadeOutAnimationCss","value","cssDataName","css","createElement","setAttribute","body","appendChild","htmlParser","HTMLParser","typeHtmlChars","curChar","substring","charAt","endTag","backSpaceHtmlChars","Typed","begin","toggle","start","stop","toggleBlinking","backspace","destroy","reset","restart","clearInterval","timeout","replaceText","cursor","parentNode","removeChild","insertCursor","_this","shuffleStringsIfNeeded","bindFocusEvents","setTimeout","_this2","classList","contains","remove","humanize","humanizer","numChars","pauseTime","substr","test","skip","exec","parseInt","temporaryPause","stringBeforeSkip","stringSkipped","stringAfterSkip","doneTyping","keepTyping","setPauseStatus","nextString","_this3","complete","_this4","initFadeOut","curStringAtPosition","isTyping","isBlinking","add","speed","Math","round","random","sort","_this5","className","str","_this6","addEventListener","e","insertBefore","nextSibling"],"mappings":"4bAMA,IAAMA,EAAW,CAKfC,QAAS,CACP,kCACA,+BACA,gBACA,qBAEFC,eAAgB,KAKhBC,UAAW,EAKXC,WAAY,EAKZC,UAAW,EAKXC,gBAAgB,EAKhBC,SAAS,EAKTC,UAAW,IAOXC,SAAS,EACTC,aAAc,iBACdC,aAAc,IAMdC,MAAM,EACNC,UAAWC,SAOXC,YAAY,EACZC,WAAY,IACZC,eAAe,EAMfC,KAAM,KAKNC,sBAAsB,EAKtBC,YAAa,OAMbC,QAAS,SAACC,GAAW,EAMrBC,WAAY,SAACD,GAAS,EAOtBE,eAAgB,SAACC,EAAUH,GAAW,EAOtCI,cAAe,SAACD,EAAUH,GAAS,EAMnCK,uBAAwB,SAACL,GAAS,EAOlCM,eAAgB,SAACH,EAAUH,GAAS,EAOpCO,gBAAiB,SAACJ,EAAUH,GAAS,EAMrCQ,QAAS,SAACR,GAAS,EAOnBS,OAAQ,SAACN,EAAUH,KAOnBU,QAAS,SAACP,EAAUH,GAAW,EAM/BW,UAAW,SAACX,GAAS,GCyDZY,EAAc,iBApNOC,WAAAA,SAAAA,SAAAC,EAAAD,EAAAE,UAiN7B,OAjN6BD,EAS9BE,KAAA,SAAKhB,EAAMi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