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AiB,6BAClCC,SAAQ,SAAAC,GACrB,IAAMnE,EAAaoE,KAAKC,MAAMF,EAAWG,QAAQtE,aAEjDuE,EAAAA,EAAAA,QAAO,kDACN,yBAAC,EAAD,CAAOvE,WAAYA,EAAYC,SAAUD,EAAWwE,MAEpD,yBAAC,EAAD,CAAYxE,WAAYA,KACpBmE,GAELA,SAAAA,EAAYM,gBAAgB,yB","sources":["webpack://text-typing/external var [\"wp\",\"element\"]","webpack://text-typing/./src/Style.js","webpack://text-typing/./src/TextTyping.js","webpack://text-typing/./src/script.js"],"sourcesContent":["var __WEBPACK_NAMESPACE_OBJECT__ = wp.element;","const Style = ({ attributes, clientId }) => {\r\n\tconst { textAlign, background, padding, prefixTypo, prefixColor, typingContentsTypo, suffixTypo, suffixColor } = attributes;\r\n\r\n\treturn ;\r\n}\r\nexport default Style;","import { useEffect, useRef } from '@wordpress/element';\r\n\r\nconst TextTyping = ({ attributes }) => {\r\n\tconst { prefixText, typingContents, suffixText, typeSpeed, startDelay, backSpeed, backDelay, isShuffle, isFadeOut, fadeOutDelay, isLoop, loopCount, isCursor, cursorChar } = attributes;\r\n\r\n\tconst typingContentsEl = useRef(null);\r\n\tconst typed = useRef(null);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst options = {\r\n\t\t\tstrings: typingContents.map(data => data.text), // array of strings\r\n\t\t\tstringsElement: null, // stringsElement ID of element containing string children\r\n\t\t\ttypeSpeed,\r\n\t\t\tstartDelay,\r\n\t\t\tbackSpeed,\r\n\t\t\tbackDelay,\r\n\t\t\tsmartBackspace: false, // smartBackspace only backspace what doesn't match the previous string\r\n\t\t\tshuffle: isShuffle,\r\n\t\t\tfadeOut: isFadeOut, // fadeOut Fade out instead of backspace\r\n\t\t\tfadeOutClass: 'typed-fade-out', // fadeOutClass css class for fade animation\r\n\t\t\tfadeOutDelay,\r\n\t\t\tloop: isLoop,\r\n\t\t\tloopCount: 0 === loopCount ? Infinity : loopCount,\r\n\t\t\tshowCursor: isCursor,\r\n\t\t\tcursorChar,\r\n\t\t\tautoInsertCss: false, // autoInsertCss insert CSS for cursor and fadeOut into HTML
\r\n\t\t\tattr: null, // attr attribute for typing. Ex: input placeholder, value, or just HTML text\r\n\t\t\tbindInputFocusEvents: false, // bindInputFocusEvents bind to focus and blur if el is text input\r\n\t\t\tcontentType: 'html', // contentType 'html' or 'null' for plaintext\r\n\t\t\tpreStringTyped: (pos, self) => {\r\n\t\t\t\tif (self && typingContents[self.sequence[pos]]) {\r\n\t\t\t\t\tself.el.style.color = typingContents[self.sequence[pos]].color || '#333';\r\n\r\n\t\t\t\t\tif (isCursor) {\r\n\t\t\t\t\t\tself.cursor.style.color = typingContents[self.sequence[pos]].color || '#333';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttyped.current = new Typed(typingContentsEl.current, options);\r\n\r\n\t\treturn () => typed.current.destroy();\r\n\t}, [typingContentsEl.current, typingContents, typeSpeed, startDelay, backSpeed, backDelay, isShuffle, isFadeOut, fadeOutDelay, isLoop, loopCount, isCursor, cursorChar]);\r\n\r\n\treturn