{"version":3,"file":"wysiwyg.min.js","sources":["../../../src/plugins/wysiwyg/js/mdb/util/index.js","../../../src/plugins/wysiwyg/js/mdb/dom/data.js","../../../src/plugins/wysiwyg/js/mdb/dom/manipulator.js","../../../src/plugins/wysiwyg/js/mdb/dom/polyfill.js","../../../src/plugins/wysiwyg/js/mdb/dom/event-handler.js","../../../src/plugins/wysiwyg/js/mdb/dom/selector-engine.js","../../../src/plugins/wysiwyg/js/templates.js","../../../src/plugins/wysiwyg/js/wysiwyg.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend';\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = (obj) => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString\n .call(obj)\n .match(/\\s([a-z]+)/i)[1]\n .toLowerCase();\n};\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = (prefix) => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = (element) => {\n let selector = element.getAttribute('data-mdb-target');\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href');\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = (element) => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = (element) => {\n const selector = getSelector(element);\n\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = (element) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) *\n MILLISECONDS_MULTIPLIER\n );\n};\n\nconst triggerTransitionEnd = (element) => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\n\nconst isElement = (obj) => (obj[0] || obj).nodeType;\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false;\n const durationPadding = 5;\n const emulatedDuration = duration + durationPadding;\n\n function listener() {\n called = true;\n element.removeEventListener(TRANSITION_END, listener);\n }\n\n element.addEventListener(TRANSITION_END, listener);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element);\n }\n }, emulatedDuration);\n};\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach((property) => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n );\n }\n });\n};\n\nconst isVisible = (element) => {\n if (!element) {\n return false;\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element);\n const parentNodeStyle = getComputedStyle(element.parentNode);\n\n return (\n elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n );\n }\n\n return false;\n};\n\nconst findShadowRoot = (element) => {\n if (!document.documentElement.attachShadow) {\n return null;\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n};\n\nconst noop = () => function () {};\n\nconst reflow = (element) => element.offsetHeight;\n\nconst getjQuery = () => {\n const { jQuery } = window;\n\n if (jQuery && !document.body.hasAttribute('data-mdb-no-jquery')) {\n return jQuery;\n }\n\n return null;\n};\n\nconst onDOMContentLoaded = (callback) => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n } else {\n callback();\n }\n};\n\nconst isRTL = document.documentElement.dir === 'rtl';\n\nconst array = (collection) => {\n return Array.from(collection);\n};\n\nconst element = (tag) => {\n return document.createElement(tag);\n};\n\nexport {\n getjQuery,\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n array,\n element,\n onDOMContentLoaded,\n isRTL,\n};\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {};\n let id = 1;\n return {\n set(element, key, data) {\n if (typeof element[key] === 'undefined') {\n element[key] = {\n key,\n id,\n };\n id++;\n }\n\n storeData[element[key].id] = data;\n },\n get(element, key) {\n if (!element || typeof element[key] === 'undefined') {\n return null;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n return storeData[keyProperties.id];\n }\n\n return null;\n },\n delete(element, key) {\n if (typeof element[key] === 'undefined') {\n return;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id];\n delete element[key];\n }\n },\n };\n})();\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data);\n },\n getData(instance, key) {\n return mapData.get(instance, key);\n },\n removeData(instance, key) {\n mapData.delete(instance, key);\n },\n};\n\nexport default Data;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`);\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-mdb-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-mdb-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {\n ...element.dataset,\n };\n\n Object.keys(attributes)\n .filter((key) => key.startsWith('mdb'))\n .forEach((key) => {\n let pureKey = key.replace(/^mdb/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(attributes[key]);\n });\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-mdb-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft,\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft,\n };\n },\n\n style(element, style) {\n Object.assign(element.style, style);\n },\n\n toggleClass(element, className) {\n if (!element) {\n return;\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className);\n } else {\n element.classList.add(className);\n }\n },\n\n addClass(element, className) {\n if (element.classList.contains(className)) return;\n element.classList.add(className);\n },\n\n addStyle(element, style) {\n Object.keys(style).forEach((property) => {\n element.style[property] = style[property];\n });\n },\n\n removeClass(element, className) {\n if (!element.classList.contains(className)) return;\n element.classList.remove(className);\n },\n\n hasClass(element, className) {\n return element.classList.contains(className);\n },\n};\n\nexport default Manipulator;\n","/* istanbul ignore file */\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/polyfill.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getUID } from '../util/index';\n\nlet findElements = Element.prototype.querySelectorAll;\nlet findElement = Element.prototype.querySelector;\n\n// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached\nconst defaultPreventedPreservedOnDispatch = (() => {\n const e = new CustomEvent('Bootstrap', {\n cancelable: true,\n });\n\n const element = document.createElement('div');\n element.addEventListener('Bootstrap', () => null);\n\n e.preventDefault();\n element.dispatchEvent(e);\n return e.defaultPrevented;\n})();\n\nconst scopeSelectorRegex = /:scope\\b/;\nconst supportScopeQuery = (() => {\n const element = document.createElement('div');\n\n try {\n element.querySelectorAll(':scope *');\n } catch (_) {\n return false;\n }\n\n return true;\n})();\n\nif (!supportScopeQuery) {\n findElements = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelectorAll(selector);\n }\n\n const hasId = Boolean(this.id);\n\n if (!hasId) {\n this.id = getUID('scope');\n }\n\n let nodeList = null;\n try {\n selector = selector.replace(scopeSelectorRegex, `#${this.id}`);\n nodeList = this.querySelectorAll(selector);\n } finally {\n if (!hasId) {\n this.removeAttribute('id');\n }\n }\n\n return nodeList;\n };\n\n findElement = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelector(selector);\n }\n\n const matches = find.call(this, selector);\n\n if (typeof matches[0] !== 'undefined') {\n return matches[0];\n }\n\n return null;\n };\n}\n\nconst find = findElements;\nconst findOne = findElement;\n\nexport { find, findOne, defaultPreventedPreservedOnDispatch };\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defaultPreventedPreservedOnDispatch } from './polyfill';\nimport { getjQuery } from '../util/index';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst $ = getjQuery();\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout',\n};\nconst nativeEvents = [\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll',\n];\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++;\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element);\n\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n\n return eventRegistry[uid];\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--; '') {\n if (domElements[i] === target) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n }\n\n // To please ESLint\n return null;\n };\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler;\n\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '');\n const custom = customEvents[typeEvent];\n\n if (custom) {\n typeEvent = custom;\n }\n\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation\n ? bootstrapDelegationHandler(element, handler, delegationFn)\n : bootstrapHandler(element, handler);\n\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n\n element.addEventListener(typeEvent, fn, delegation);\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n Object.keys(storeElementEvent).forEach((handlerKey) => {\n if (handlerKey.indexOf(namespace) > -1) {\n const event = storeElementEvent[handlerKey];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.charAt(0) === '.';\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach((elementEvent) => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach((keyHandlers) => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {\n const event = storeElementEvent[keyHandlers];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const typeEvent = event.replace(stripNameRegex, '');\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true,\n });\n }\n\n // merge custom informations in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach((key) => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n },\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n\n if (!defaultPreventedPreservedOnDispatch) {\n Object.defineProperty(evt, 'defaultPrevented', {\n get: () => true,\n });\n }\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n },\n};\n\nexport const EventHandlerMulti = {\n on(element, eventsName, handler, delegationFn) {\n const events = eventsName.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.on(element, events[i], handler, delegationFn);\n }\n },\n off(element, originalTypeEvent, handler, delegationFn) {\n const events = originalTypeEvent.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.off(element, events[i], handler, delegationFn);\n }\n },\n};\n\nexport default EventHandler;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { find as findFn, findOne } from './polyfill';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3;\n\nconst SelectorEngine = {\n closest(element, selector) {\n return element.closest(selector);\n },\n\n matches(element, selector) {\n return element.matches(selector);\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...findFn.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return findOne.call(element, selector);\n },\n\n children(element, selector) {\n const children = [].concat(...element.children);\n\n return children.filter((child) => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n};\n\nexport default SelectorEngine;\n","const create = {\n textarea: (textareaName, UUID) => {\n const name = textareaName || `wysiwyg-textarea-${UUID}`;\n return ``;\n },\n contentDiv: () => {\n return '
';\n },\n toolBar: (options) => {\n const {\n wysiwygTranslations,\n wysiwygColors,\n wysiwygStylesSection,\n wysiwygFormattingSection,\n wysiwygJustifySection,\n wysiwygListsSection,\n wysiwygLinksSection,\n wysiwygShowCodeSection,\n wysiwygUndoRedoSection,\n wysiwygFixed,\n wysiwygFixedOffsetTop,\n } = options;\n const translation = wysiwygTranslations;\n\n return `
\n ${wysiwygStylesSection ? create.stylesSection(translation) : ''}\n ${wysiwygFormattingSection ? create.formattingSection(translation, wysiwygColors) : ''}\n ${wysiwygJustifySection ? create.justifySection(translation) : ''}\n ${wysiwygListsSection ? create.listsSection(translation) : ''}\n ${wysiwygLinksSection ? create.linksSection(translation) : ''}\n ${wysiwygShowCodeSection ? create.showCodeSection(translation) : ''}\n ${wysiwygUndoRedoSection ? create.undoRedoSection(translation) : ''}\n
`;\n },\n stylesSection: (translations) => {\n const { textStyle, paragraph, heading, preformatted } = translations;\n return `\n
\n
\n \n ${textStyle}\n \n \n
\n
\n `;\n },\n formattingSection: (translations, colors) => {\n const { bold, italic, underline, strikethrough, textcolor, textBackgroundColor } = translations;\n return `\n
\n
\n \n \n \n \n
\n \n
\n ${create.textColorPalette(colors, 'foreColor')}\n
\n
\n
\n \n
\n ${create.textColorPalette(colors, 'backColor')}\n
\n
\n
\n
\n `;\n },\n textColorPalette: (colors, cmd) => {\n let result = '';\n\n colors.forEach((color) => {\n result += ``;\n });\n\n return result;\n },\n justifySection: (translations) => {\n const { alignCenter, alignLeft, alignRight, alignJustify } = translations;\n return `\n
\n
\n \n \n \n \n
\n
\n `;\n },\n listsSection: (translations) => {\n const { unorderedList, orderedList, decreaseIndent, increaseIndent } = translations;\n return `\n
\n
\n \n \n \n \n
\n
\n `;\n },\n linksSection: (translations) => {\n const {\n insertLink,\n addLinkHead,\n linkUrlLabel,\n linkDescription,\n okButton,\n cancelButton,\n insertPicture,\n addImageHead,\n imageUrlLabel,\n insertHorizontalRule,\n } = translations;\n return `\n
\n \n
\n `;\n },\n showCodeSection: (translations) => {\n return `\n
\n
\n \n
\n
\n `;\n },\n undoRedoSection: (translations) => {\n const { undo, redo } = translations;\n return `\n
\n
\n \n \n
\n
\n `;\n },\n toolbarToggler: (translations) => {\n return `\n
\n
\n \n
\n\n
\n
\n
\n `;\n },\n};\n\nexport default create;\n","/* eslint-disable no-fallthrough */\nimport { typeCheckConfig, getjQuery, onDOMContentLoaded } from './mdb/util/index';\nimport Data from './mdb/dom/data';\nimport Manipulator from './mdb/dom/manipulator';\nimport EventHandler from './mdb/dom/event-handler';\nimport SelectorEngine from './mdb/dom/selector-engine';\n\nimport create from './templates';\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'wysiwyg';\nconst DATA_KEY = `mdb.${NAME}`;\nconst EVENT_KEY = `.${DATA_KEY}`;\n\nconst CONTENT_CLASS = `${NAME}-content`;\nconst TOOLBAR_CLASS = `${NAME}-toolbar`;\nconst TOOLBAR_TOGGLER_CLASS = `${NAME}-toolbar-toggler`;\nconst TOOLBAR_GROUP_CLASS = `${NAME}-toolbar-group`;\nconst HIDE_CLASS = `${NAME}-hide`;\nconst SHOW_HTML_CLASS = `${NAME}-show-html`;\nconst ACTIVE_CLASS = 'active';\n\nconst EVENT_RESIZE = `resize${EVENT_KEY}`;\nconst EVENT_CLICK = `click${EVENT_KEY}`;\nconst EVENT_MOUSEDOWN = `mousedown${EVENT_KEY}`;\nconst EVENT_DROPDOWN_HIDE = 'hide.bs.dropdown';\nconst EVENT_DROPDOWN_SHOW = 'show.bs.dropdown';\nconst EVENT_BLUR = 'blur';\nconst EVENT_MOUSE_ENTER = 'mouseenter';\nconst EVENT_MOUSE_LEAVE = 'mouseleave';\nconst EVENT_INPUT = 'input';\n\nconst SELECTOR_DATA_INIT = '[data-mdb-wysiwyg-init]';\n\nconst SELECTOR_COMMAND = '[data-mdb-cmd]';\nconst SELECTOR_FORM_OUTLINE = '.form-outline';\nconst SELECTOR_DROPDOWN = '.dropdown';\nconst SELECTOR_DROPDOWN_MENU = '.dropdown-menu';\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\nconst SELECTOR_INPUT_TYPE_URL = '[type=\"url\"]';\nconst SELECTOR_INPUT_TYPE_TEXT = '[type=\"text\"]';\nconst SELECTOR_TEXTAREA = '.wysiwyg-textarea';\nconst SELECTOR_INPUT = 'input';\nconst SELECTOR_DIV = 'div';\nconst SELECTOR_SHOW = 'show';\nconst SELECTOR_LINKS_SECTION = '#links-section';\nconst SELECTOR_DATA_TOGGLE_DROPDOWN = '[data-mdb-dropdown-init]';\nconst SELECTOR_DATA_TOOLTIP = '[data-mdb-tooltip-init]';\nconst SELECTOR_WYSIWYG = `.${NAME}`;\nconst SELECTOR_CONTENT = `.${CONTENT_CLASS}`;\nconst SELECTOR_HIDE = `.${HIDE_CLASS}`;\nconst SELECTOR_TOOLBAR = `.${TOOLBAR_CLASS}`;\nconst SELECTOR_TOOLBAR_TOGGLER = `.${TOOLBAR_TOGGLER_CLASS}`;\nconst SELECTOR_TOOLBAR_GROUP = `.${TOOLBAR_GROUP_CLASS}`;\nconst SELECTOR_DROPDOWN_IN_TOOLBAR_TOGGLER = `${SELECTOR_TOOLBAR_TOGGLER} ${SELECTOR_DROPDOWN}`;\nconst SELECTOR_DROPDOWN_TOGGLE_IN_TOOLBAR_TOGGLER = `${SELECTOR_TOOLBAR_TOGGLER} ${SELECTOR_DROPDOWN_TOGGLE}`;\nconst SELECTOR_DROPDOWN_MENU_IN_TOOLBAR_TOGGLER = `${SELECTOR_TOOLBAR_TOGGLER} ${SELECTOR_DROPDOWN_MENU}`;\nconst SELECTOR_ACTION_HANDLER = `${SELECTOR_TOOLBAR_GROUP} ${SELECTOR_COMMAND}`;\nconst SELECTOR_INPUT_IN_FORM_OUTLINE = `${SELECTOR_FORM_OUTLINE} ${SELECTOR_INPUT}`;\nconst SELECTOR_HIDDEN_TOOL = `${SELECTOR_TOOLBAR_GROUP}${SELECTOR_HIDE}`;\n\nconst COLORS = [\n '#1266F1', // Primary\n '#B23CFD', // Secondary\n '#00B74A', // Success\n '#F93154', // Danger\n '#FFA900', // Warning\n '#39C0ED', // Info\n '#FBFBFB', // Light\n '#262626', // Dark\n];\n\nconst TRANSLATIONS = {\n paragraph: 'Paragraph',\n textStyle: 'Text style',\n heading: 'Heading',\n preformatted: 'Preformatted',\n bold: 'Bold',\n italic: 'Italic',\n strikethrough: 'Strikethrough',\n underline: 'Underline',\n textcolor: 'Color',\n textBackgroundColor: 'Background Color',\n alignLeft: 'Align Left',\n alignCenter: 'Align Center',\n alignRight: 'Align Right',\n alignJustify: 'Align Justify',\n insertLink: 'Insert Link',\n insertPicture: 'Insert Picture',\n unorderedList: 'Unordered List',\n orderedList: 'Numbered List',\n increaseIndent: 'Increase Indent',\n decreaseIndent: 'Decrease Indent',\n insertHorizontalRule: 'Insert Horizontal Line',\n showHTML: 'Show HTML code',\n undo: 'Undo',\n redo: 'Redo',\n addLinkHead: 'Add Link',\n addImageHead: 'Add Image',\n linkUrlLabel: 'Enter a URL:',\n linkDescription: 'Enter a description',\n imageUrlLabel: 'Enter a URL:',\n okButton: 'OK',\n cancelButton: 'cancel',\n moreOptions: 'Show More Options',\n};\n\nconst DEFAULT_OPTIONS = {\n wysiwygColors: COLORS,\n wysiwygTranslations: TRANSLATIONS,\n wysiwygStylesSection: true,\n wysiwygFormattingSection: true,\n wysiwygJustifySection: true,\n wysiwygListsSection: true,\n wysiwygLinksSection: true,\n wysiwygShowCodeSection: true,\n wysiwygUndoRedoSection: true,\n wysiwygFixed: false,\n wysiwygFixedOffsetTop: 0,\n wysiwygTextareaName: '',\n};\n\nconst OPTIONS_TYPE = {\n wysiwygColors: 'array',\n wysiwygTranslations: 'object',\n wysiwygStylesSection: 'boolean',\n wysiwygFormattingSection: 'boolean',\n wysiwygJustifySection: 'boolean',\n wysiwygListsSection: 'boolean',\n wysiwygLinksSection: 'boolean',\n wysiwygShowCodeSection: 'boolean',\n wysiwygUndoRedoSection: 'boolean',\n wysiwygFixed: 'boolean',\n wysiwygFixedOffsetTop: 'number',\n wysiwygTextareaName: 'string',\n};\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Wysiwyg {\n constructor(element, options = {}) {\n this._element = element;\n this._content = '';\n this._toolbar = '';\n this._toolbarToggler = '';\n this._textarea = '';\n this._options = this._getConfig(options);\n this._isCodeShown = false;\n this._toolsWidth = [];\n this._selection = {};\n this._UUID = this._randomUUID();\n\n if (this._element) {\n this._init();\n Data.setData(element, DATA_KEY, this);\n }\n }\n\n // Getters\n\n // Public\n dispose() {\n Data.removeData(this._element, DATA_KEY);\n\n EventHandler.off(window, EVENT_RESIZE, this._windowResizeHandler);\n EventHandler.off(this._content, EVENT_INPUT);\n\n SelectorEngine.find(SELECTOR_COMMAND, this._element).forEach((el) => {\n EventHandler.off(el, EVENT_CLICK);\n });\n\n if (this._toolbarToggler) {\n EventHandler.off(\n SelectorEngine.findOne(SELECTOR_DROPDOWN_IN_TOOLBAR_TOGGLER),\n EVENT_DROPDOWN_HIDE\n );\n EventHandler.off(\n SelectorEngine.findOne(SELECTOR_DROPDOWN_IN_TOOLBAR_TOGGLER),\n EVENT_MOUSEDOWN\n );\n }\n\n this._element = null;\n this._options = null;\n this._isCodeShown = null;\n this._toolbarToggler = null;\n this._toolsWidth = null;\n this._selection = null;\n this._UUID = null;\n this._textarea = null;\n }\n\n getCode() {\n return this._content.innerHTML;\n }\n\n // Private\n _init() {\n const { initMDB, Ripple, Dropdown, Tooltip } = mdb;\n initMDB({ Ripple, Dropdown, Tooltip });\n\n Manipulator.setDataAttribute(this._element, 'uuid', this._UUID);\n\n const initialContent = this._element.innerHTML;\n const wrapper = document.createElement(SELECTOR_DIV);\n\n wrapper.innerHTML = create.contentDiv();\n\n const content = SelectorEngine.children(wrapper, SELECTOR_CONTENT)[0];\n\n this._element.innerHTML = '';\n this._element.insertAdjacentHTML(\n 'beforebegin',\n create.textarea(this._options.wysiwygTextareaName, this._UUID)\n );\n this._element.insertAdjacentHTML('beforeend', create.toolBar(this._options));\n this._element.append(content);\n\n this._content = SelectorEngine.findOne(SELECTOR_CONTENT, this._element);\n this._toolbar = SelectorEngine.findOne(SELECTOR_TOOLBAR, this._element);\n this._textarea = SelectorEngine.prev(this._element, SELECTOR_TEXTAREA)[0];\n\n this._content.innerHTML = initialContent;\n this._textarea.value = initialContent;\n this._updateToolbar();\n\n // init input`s\n SelectorEngine.find(SELECTOR_FORM_OUTLINE, this._toolbar).forEach((formOutline) => {\n new mdb.Input(formOutline).init();\n });\n\n const actionHandlers = SelectorEngine.find(\n `${SELECTOR_TOOLBAR_GROUP}:not(${SELECTOR_TOOLBAR_TOGGLER}) ${SELECTOR_COMMAND}`,\n this._element\n );\n const linkSectionDropdowns = SelectorEngine.find(SELECTOR_LINKS_SECTION, this._element);\n\n this._initTooltips(this._toolbar);\n this._initDropdowns(this._toolbar);\n this._onActionButtonClick(actionHandlers);\n this._onInput();\n this._onWindowResize();\n this._onBlur();\n this._onOpenDropdown(linkSectionDropdowns);\n }\n\n _onInput() {\n EventHandler.on(this._content, EVENT_INPUT, () => {\n this._textarea.value = this._content.innerHTML;\n });\n }\n\n _onWindowResize() {\n this._windowResizeHandler = this._updateToolbar.bind(this);\n\n EventHandler.on(window, EVENT_RESIZE, this._windowResizeHandler);\n }\n\n _onActionButtonClick(actionHandlers) {\n actionHandlers.forEach((handler) => {\n EventHandler.on(handler, EVENT_MOUSEDOWN, (e) => {\n e.preventDefault();\n\n const command = Manipulator.getDataAttribute(handler, 'cmd');\n const isInsertLinkCommand = command === 'insertlink';\n const isInsertPictureCommand = command === 'insertpicture';\n const isCloseDropdownCommand = command === 'close-dropdown';\n\n if (isInsertLinkCommand || isInsertPictureCommand || isCloseDropdownCommand) {\n const dropdownElement = handler.closest(SELECTOR_DROPDOWN_MENU).previousElementSibling;\n const dropdown = mdb.Dropdown.getInstance(dropdownElement);\n dropdown.hide();\n\n if (this._toolbarToggler) {\n const toolbarDropdown = SelectorEngine.parents(\n this._toolbarToggler,\n SELECTOR_DROPDOWN\n )[0];\n EventHandler.off(toolbarDropdown, EVENT_DROPDOWN_HIDE);\n\n const dropdownInstance = mdb.Dropdown.getInstance(this._toolbarToggler);\n dropdownInstance.hide();\n\n this._onCloseDropdown(toolbarDropdown);\n }\n }\n\n if (isCloseDropdownCommand) {\n return;\n }\n\n this._performAction(e.target);\n\n //* focus back editable div.\n this._content.focus();\n });\n });\n }\n\n _onBlur() {\n EventHandler.on(this._content, EVENT_BLUR, () => {\n const selection = document.getSelection();\n\n this._selection.focusOffset = selection.focusOffset;\n this._selection.focusNode = selection.focusNode;\n this._selection.anchorOffset = selection.anchorOffset;\n this._selection.anchorNode = selection.anchorNode;\n });\n }\n\n _onOpenDropdown(elements) {\n elements.forEach((element) => {\n EventHandler.on(element, EVENT_DROPDOWN_SHOW, (e) => {\n const selection = document.getSelection();\n\n if (!selection.baseNode) {\n this._content.focus();\n }\n\n const url = selection.baseNode.parentElement.href;\n const description = selection.toString();\n const dropdownMenu = e.target.nextElementSibling;\n const commandHandler = SelectorEngine.findOne(SELECTOR_COMMAND, dropdownMenu);\n const command = Manipulator.getDataAttribute(commandHandler, 'cmd');\n const isInsertPictureCommand = command === 'insertpicture';\n\n if (url) {\n const urlInput = SelectorEngine.findOne(SELECTOR_INPUT_TYPE_URL, dropdownMenu);\n urlInput.value = url;\n }\n\n if (!isInsertPictureCommand) {\n const descriptionInput = SelectorEngine.findOne(SELECTOR_INPUT_TYPE_TEXT, dropdownMenu);\n descriptionInput.value = description;\n }\n\n dropdownMenu.querySelectorAll(SELECTOR_INPUT_IN_FORM_OUTLINE).forEach((input) => {\n input.dispatchEvent(new Event('blur'));\n });\n });\n });\n }\n\n _onCloseDropdown(element) {\n EventHandler.on(element, EVENT_DROPDOWN_HIDE, (e) => {\n const clickedElement = document.activeElement;\n const isClickedOnSubmenu = SelectorEngine.parents(clickedElement, SELECTOR_DROPDOWN_MENU)[0];\n // The 'isToolbarToggler' variable needs to be declared in a specific way to prevent issues with hiding dropdowns on the second click when using the 'contains' method.\n const isToolbarToggler =\n e.target.parentElement.parentElement.classList.contains(TOOLBAR_TOGGLER_CLASS);\n\n if (isClickedOnSubmenu && isToolbarToggler) {\n e.preventDefault();\n }\n });\n }\n\n _isContentFocused() {\n const focusedElement = document.activeElement;\n const closestWysiwyg = focusedElement\n ? SelectorEngine.parents(focusedElement, SELECTOR_WYSIWYG)[0]\n : '';\n const focusedElementUUID = closestWysiwyg\n ? Manipulator.getDataAttribute(closestWysiwyg, 'uuid')\n : '';\n\n return focusedElementUUID === this._UUID;\n }\n\n _updateToolbar() {\n const contentWidth = this._content.offsetWidth;\n const tools = SelectorEngine.find(\n `${SELECTOR_TOOLBAR_GROUP}:not(${SELECTOR_TOOLBAR_TOGGLER})`,\n this._element\n );\n let toolsWidth = 0;\n\n if (this._toolbarToggler) {\n toolsWidth += this._toolbarToggler.offsetWidth;\n }\n\n tools.forEach((el, i) => {\n const isHidden = el.classList.contains(HIDE_CLASS);\n\n toolsWidth += el.offsetWidth || this._toolsWidth[i];\n\n if (contentWidth < toolsWidth && !isHidden) {\n this._toolsWidth[i] = el.offsetWidth;\n\n Manipulator.addClass(el, HIDE_CLASS);\n\n if (!this._toolbarToggler) {\n this._createToolbarToggler();\n }\n\n this._updateToolbarTogglerMenu();\n } else if (contentWidth > toolsWidth && isHidden) {\n Manipulator.removeClass(el, HIDE_CLASS);\n this._updateToolbarTogglerMenu();\n }\n });\n }\n\n _randomUUID() {\n let d = new Date().getTime();\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n // eslint-disable-next-line no-bitwise\n const r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n // eslint-disable-next-line eqeqeq, no-bitwise\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n }\n\n _createToolbarToggler() {\n this._toolbar.insertAdjacentHTML(\n 'beforeend',\n create.toolbarToggler(this._options.wysiwygTranslations)\n );\n\n this._toolbarToggler = SelectorEngine.findOne(\n SELECTOR_DROPDOWN_TOGGLE_IN_TOOLBAR_TOGGLER,\n this._toolbar\n );\n\n const toolbarDropdown = SelectorEngine.parents(this._toolbarToggler, SELECTOR_DROPDOWN)[0];\n\n this._initDropdowns(toolbarDropdown);\n this._onCloseDropdown(toolbarDropdown);\n this._updateToolbar();\n }\n\n _updateToolbarTogglerMenu() {\n const toolbarMenu = SelectorEngine.findOne(\n SELECTOR_DROPDOWN_MENU_IN_TOOLBAR_TOGGLER,\n this._element\n );\n const hiddenTools = SelectorEngine.find(SELECTOR_HIDDEN_TOOL, this._element);\n\n toolbarMenu.innerHTML = '';\n\n hiddenTools.forEach((el) => {\n const toolNode = SelectorEngine.children(el, SELECTOR_DIV)[0].cloneNode(true);\n\n toolbarMenu.appendChild(toolNode);\n });\n\n const actionHandlers = SelectorEngine.find(SELECTOR_ACTION_HANDLER, toolbarMenu);\n\n const linkSectionDropdowns = SelectorEngine.find(\n `${SELECTOR_LINKS_SECTION}:not(${HIDE_CLASS})`,\n this._element\n );\n\n this._onOpenDropdown(linkSectionDropdowns);\n this._onActionButtonClick(actionHandlers);\n this._initDropdowns(toolbarMenu);\n this._initTooltips(toolbarMenu);\n\n if (toolbarMenu.childNodes.length === 0) {\n this._removeToolbarToggler();\n }\n }\n\n _initDropdowns(element) {\n SelectorEngine.find(SELECTOR_DATA_TOGGLE_DROPDOWN, element).map((el) => {\n const instance = mdb.Dropdown.getOrCreateInstance(el);\n\n return instance;\n });\n }\n\n _initTooltips(element) {\n // init tooltips\n SelectorEngine.find(SELECTOR_DATA_TOOLTIP, element).forEach((el) => {\n let instance = mdb.Tooltip.getInstance(el);\n\n if (!instance) {\n instance = new mdb.Tooltip(el, {\n trigger: 'manual',\n });\n }\n\n el.addEventListener(EVENT_MOUSE_ENTER, (e) => {\n const isDropdown = SelectorEngine.findOne(SELECTOR_DATA_TOGGLE_DROPDOWN, e.target);\n const isOpen = isDropdown ? isDropdown.classList.contains(SELECTOR_SHOW) : false;\n\n if (!isOpen) {\n instance.show();\n }\n });\n\n el.addEventListener(EVENT_MOUSE_LEAVE, () => {\n instance.hide();\n });\n });\n }\n\n _removeToolbarToggler() {\n this._toolbarToggler.closest(SELECTOR_TOOLBAR_TOGGLER).remove();\n this._toolbarToggler = '';\n }\n\n _performAction(element) {\n if (!this._isContentFocused()) {\n // select proper content div and move caret to end of text\n this._content.focus();\n document.execCommand('selectAll', false, null);\n document.getSelection().collapseToEnd();\n }\n\n const commandHandler = element.closest(SELECTOR_COMMAND);\n let command = Manipulator.getDataAttribute(commandHandler, 'cmd');\n let argument = Manipulator.getDataAttribute(commandHandler, 'arg');\n\n if (command === 'insertlink' || command === 'insertpicture') {\n const dropdown = element.closest(SELECTOR_DROPDOWN_MENU);\n const urlInput = SelectorEngine.findOne(SELECTOR_INPUT_TYPE_URL, dropdown);\n const descriptionInput = SelectorEngine.findOne(SELECTOR_INPUT_TYPE_TEXT, dropdown);\n const selection = document.getSelection();\n const { anchorNode, anchorOffset, focusNode, focusOffset } = this._selection;\n\n if (descriptionInput) {\n argument = `${descriptionInput.value}`;\n descriptionInput.value = '';\n } else {\n argument = ``;\n }\n\n command = 'insertHTML';\n selection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);\n urlInput.value = '';\n }\n\n if (command === 'toggleHTML') {\n if (this._isCodeShown) {\n this._content.innerHTML = this._content.textContent;\n this._content.classList.remove(SHOW_HTML_CLASS);\n this._isCodeShown = false;\n Manipulator.removeClass(commandHandler, ACTIVE_CLASS);\n } else {\n this._content.textContent = this._content.innerHTML;\n this._content.classList.add(SHOW_HTML_CLASS);\n this._isCodeShown = true;\n Manipulator.addClass(commandHandler, ACTIVE_CLASS);\n }\n return;\n }\n document.execCommand(command, false, argument);\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n\n config = {\n ...DEFAULT_OPTIONS,\n ...dataAttributes,\n ...config,\n };\n\n typeCheckConfig(NAME, config, OPTIONS_TYPE);\n\n return config;\n }\n\n // Static\n static get NAME() {\n return NAME;\n }\n\n static jQueryInterface(config, options) {\n return this.each(function () {\n let data = Data.getData(this, DATA_KEY);\n const _config = typeof config === 'object' && config;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Wysiwyg(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](options);\n }\n });\n }\n\n static getInstance(element) {\n return Data.getData(element, DATA_KEY);\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation - auto initialization\n * ------------------------------------------------------------------------\n */\n\nSelectorEngine.find(SELECTOR_DATA_INIT).forEach((el) => {\n let instance = Wysiwyg.getInstance(el);\n if (!instance) {\n instance = new Wysiwyg(el);\n }\n\n return instance;\n});\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Wysiwyg to jQuery only if jQuery is present\n */\n\nonDOMContentLoaded(() => {\n const $ = getjQuery();\n\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[NAME];\n $.fn[NAME] = Wysiwyg.jQueryInterface;\n $.fn[NAME].Constructor = Wysiwyg;\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Wysiwyg.jQueryInterface;\n };\n }\n});\n\nexport default Wysiwyg;\n"],"names":["getjQuery","jQuery","window","document","body","hasAttribute","documentElement","dir","mapData","storeData","id","set","element","key","data","get","keyProperties","Data","setData","instance","getData","removeData","delete","normalizeData","val","Number","toString","normalizeDataKey","replace","chr","toLowerCase","Manipulator","setDataAttribute","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","dataset","Object","keys","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","style","assign","toggleClass","className","classList","contains","remove","add","addClass","addStyle","property","removeClass","hasClass","findElements","Element","prototype","querySelectorAll","findElement","querySelector","defaultPreventedPreservedOnDispatch","e","CustomEvent","cancelable","createElement","addEventListener","preventDefault","dispatchEvent","defaultPrevented","scopeSelectorRegex","_","selector","test","this","hasId","Boolean","prefix","Math","floor","random","getElementById","getUID","nodeList","matches","find","call","findOne","$","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","getUidEvent","uid","getEvent","findHandler","events","handler","delegationSelector","uidEventList","i","len","event","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","custom","indexOf","addHandler","oneOff","handlers","previousFn","fn","domElements","target","parentNode","EventHandler","off","type","apply","bootstrapDelegationHandler","bootstrapHandler","removeHandler","removeEventListener","on","one","inNamespace","isNamespace","elementEvent","namespace","storeElementEvent","handlerKey","removeNamespacedHandlers","keyHandlers","trigger","args","isNative","jQueryEvent","bubbles","nativeDispatch","evt","Event","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","defineProperty","SelectorEngine","closest","concat","findFn","children","child","parents","ancestor","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling","create","textarea","textareaName","UUID","contentDiv","toolBar","options","wysiwygTranslations","wysiwygColors","wysiwygStylesSection","wysiwygFormattingSection","wysiwygJustifySection","wysiwygListsSection","wysiwygLinksSection","wysiwygShowCodeSection","wysiwygUndoRedoSection","wysiwygFixed","wysiwygFixedOffsetTop","translation","stylesSection","formattingSection","justifySection","listsSection","linksSection","showCodeSection","undoRedoSection","translations","textStyle","paragraph","heading","preformatted","colors","bold","italic","underline","strikethrough","textcolor","textBackgroundColor","textColorPalette","cmd","result","color","alignCenter","alignLeft","alignRight","alignJustify","unorderedList","orderedList","decreaseIndent","increaseIndent","insertLink","addLinkHead","linkUrlLabel","linkDescription","okButton","cancelButton","insertPicture","addImageHead","imageUrlLabel","insertHorizontalRule","showHTML","undo","redo","toolbarToggler","moreOptions","NAME","DATA_KEY","EVENT_KEY","TOOLBAR_TOGGLER_CLASS","HIDE_CLASS","SHOW_HTML_CLASS","ACTIVE_CLASS","EVENT_RESIZE","EVENT_CLICK","EVENT_MOUSEDOWN","EVENT_DROPDOWN_HIDE","EVENT_INPUT","SELECTOR_COMMAND","SELECTOR_FORM_OUTLINE","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_MENU","SELECTOR_INPUT_TYPE_URL","SELECTOR_INPUT_TYPE_TEXT","SELECTOR_LINKS_SECTION","SELECTOR_DATA_TOGGLE_DROPDOWN","SELECTOR_WYSIWYG","SELECTOR_CONTENT","SELECTOR_TOOLBAR","SELECTOR_TOOLBAR_TOGGLER","SELECTOR_TOOLBAR_GROUP","SELECTOR_DROPDOWN_IN_TOOLBAR_TOGGLER","SELECTOR_DROPDOWN_TOGGLE_IN_TOOLBAR_TOGGLER","SELECTOR_DROPDOWN_MENU_IN_TOOLBAR_TOGGLER","SELECTOR_ACTION_HANDLER","SELECTOR_INPUT_IN_FORM_OUTLINE","SELECTOR_HIDDEN_TOOL","DEFAULT_OPTIONS","wysiwygTextareaName","OPTIONS_TYPE","Wysiwyg","constructor","_element","_content","_toolbar","_toolbarToggler","_textarea","_options","_getConfig","_isCodeShown","_toolsWidth","_selection","_UUID","_randomUUID","_init","dispose","_windowResizeHandler","el","getCode","innerHTML","initMDB","Ripple","Dropdown","Tooltip","mdb","initialContent","wrapper","content","insertAdjacentHTML","append","_updateToolbar","formOutline","Input","init","actionHandlers","linkSectionDropdowns","_initTooltips","_initDropdowns","_onActionButtonClick","_onInput","_onWindowResize","_onBlur","_onOpenDropdown","bind","command","isCloseDropdownCommand","dropdownElement","getInstance","hide","toolbarDropdown","_onCloseDropdown","_performAction","focus","selection","getSelection","focusOffset","focusNode","anchorOffset","anchorNode","elements","baseNode","url","parentElement","href","description","dropdownMenu","commandHandler","isInsertPictureCommand","input","clickedElement","activeElement","isClickedOnSubmenu","isToolbarToggler","_isContentFocused","focusedElement","closestWysiwyg","contentWidth","offsetWidth","tools","toolsWidth","isHidden","_createToolbarToggler","_updateToolbarTogglerMenu","d","Date","getTime","c","r","toolbarMenu","hiddenTools","toolNode","cloneNode","appendChild","childNodes","_removeToolbarToggler","map","getOrCreateInstance","isDropdown","show","execCommand","collapseToEnd","argument","dropdown","urlInput","descriptionInput","setBaseAndExtent","textContent","config","dataAttributes","componentName","configTypes","expectedTypes","valueType","obj","match","toType","RegExp","Error","toUpperCase","typeCheckConfig","jQueryInterface","each","_config","TypeError","callback","JQUERY_NO_CONFLICT","Constructor","noConflict","readyState"],"mappings":"wOAOA,MA0KMA,EAAY,KACV,MAAAC,OAAEA,GAAWC,OAEnB,OAAID,IAAWE,SAASC,KAAKC,aAAa,sBACjCJ,EAGF,IAAA,EAWKE,SAASG,gBAAgBC,ICtLvC,MAAMC,QACJ,MAAMC,EAAY,CAAA,EAClB,IAAIC,EAAK,EACF,MAAA,CACL,GAAAC,CAAIC,EAASC,EAAKC,QACY,IAAjBF,EAAQC,KACjBD,EAAQC,GAAO,CACbA,MACAH,MAEFA,KAGFD,EAAUG,EAAQC,GAAKH,IAAMI,CAC9B,EACD,GAAAC,CAAIH,EAASC,GACX,IAAKD,QAAmC,IAAjBA,EAAQC,GACtB,OAAA,KAGH,MAAAG,EAAgBJ,EAAQC,GAC1B,OAAAG,EAAcH,MAAQA,EACjBJ,EAAUO,EAAcN,IAG1B,IACR,EACD,OAAOE,EAASC,GACd,QAA4B,IAAjBD,EAAQC,GACjB,OAGI,MAAAG,EAAgBJ,EAAQC,GAC1BG,EAAcH,MAAQA,WACjBJ,EAAUO,EAAcN,WACxBE,EAAQC,GAElB,OAICI,EAAO,CACX,OAAAC,CAAQC,EAAUN,EAAKC,GACbN,EAAAG,IAAIQ,EAAUN,EAAKC,EAC5B,EACDM,QAAA,CAAQD,EAAUN,IACTL,EAAQO,IAAII,EAAUN,GAE/B,UAAAQ,CAAWF,EAAUN,GACXL,EAAAc,OAAOH,EAAUN,EAC1B,GCxDH,SAASU,EAAcC,GACrB,MAAY,SAARA,GAIQ,UAARA,IAIAA,IAAQC,OAAOD,GAAKE,WACfD,OAAOD,GAGJ,KAARA,GAAsB,SAARA,EACT,KAGFA,EACT,CAEA,SAASG,E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