diff --git a/CHANGELOG.textile b/CHANGELOG.textile index 7604255..dcbb1b4 100644 --- a/CHANGELOG.textile +++ b/CHANGELOG.textile @@ -1,3 +1,13 @@ +*wysihtml5x 0.5.3* (December 9, 2015) +* Removed automatic forced title attributes on links and images +* Improved line breaks addition/removal when applying/removing format with formatBlock command +* Improve (and unify cross-browser) enter and backspace handling in and around lists (espacially IE) +* Fix IE list inserting problem where only one bullet is inserted on multi-line selection +* Improve block level elements merge when using backspace key +* formatBlock on last empty line of a block element now adds new block instead of changing format of the whole block +* Add double enter escapes block elements in useLineBreaks mode (optional, can be turned off setting parameter `doubleLineBreakEscapesBlock: false`) +* Fixes un-editable container delete problem in IE + *wysihtml5x 0.5.2* (November 10, 2015) * Fixes some formatBlock nesting problems (mainly with lists) * Adds formatBlock to .remove() command diff --git a/dist/wysihtml-toolbar.js b/dist/wysihtml-toolbar.js index 6906a42..e38eb74 100644 --- a/dist/wysihtml-toolbar.js +++ b/dist/wysihtml-toolbar.js @@ -1,5 +1,5 @@ /** - * @license wysihtml v0.5.2 + * @license wysihtml v0.5.3 * https://github.com/Voog/wysihtml * * Author: Christopher Blum (https://github.com/tiff) @@ -10,7 +10,7 @@ * */ var wysihtml5 = { - version: "0.5.2", + version: "0.5.3", // namespaces commands: {}, @@ -24,6 +24,8 @@ var wysihtml5 = { INVISIBLE_SPACE: "\uFEFF", INVISIBLE_SPACE_REG_EXP: /\uFEFF/g, + VOID_ELEMENTS: "area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr", + EMPTY_FUNCTION: function() {}, ELEMENT_NODE: 1, @@ -421,7 +423,19 @@ var wysihtml5 = { return all; }; + var isInDom = function(node) { + var doc = node.ownerDocument, + n = node; + do { + if (n === doc) { + return true; + } + n = n.parentNode; + } while(n); + + return false; + }; var normalizeFix = function() { var f = Node.prototype.normalize; @@ -482,7 +496,7 @@ var wysihtml5 = { aoffset = Array.prototype.indexOf.call(aelement.parentNode.childNodes, aelement); } - if (anode && anode.parentNode && fnode && fnode.parentNode) { + if (isInDom(this) && anode && anode.parentNode && fnode && fnode.parentNode) { r.setStart(anode, aoffset); r.setEnd(fnode, foffset); s.removeAllRanges(); @@ -504,6 +518,31 @@ var wysihtml5 = { } else { F(); } + + // CustomEvent for ie9 and up + function nativeCustomEventSupported() { + try { + var p = new CustomEvent('cat', {detail: {foo: 'bar'}}); + return 'cat' === p.type && 'bar' === p.detail.foo; + } catch (e) {} + return false; + } + var customEventSupported = nativeCustomEventSupported(); + + // Polyfills CustomEvent object for IE9 and up + (function() { + if (!customEventSupported && "CustomEvent" in window) { + function CustomEvent(event, params) { + params = params || {bubbles: false, cancelable: false, detail: undefined}; + var evt = doc.createEvent('CustomEvent'); + evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); + return evt; + } + CustomEvent.prototype = win.Event.prototype; + win.CustomEvent = CustomEvent; + customEventSupported = true; + } + })(); }; wysihtml5.polyfills(window, document); @@ -6677,10 +6716,11 @@ wysihtml5.browser = (function() { var userAgent = navigator.userAgent, testElement = document.createElement("div"), // Browser sniffing is unfortunately needed since some behaviors are impossible to feature detect - isGecko = userAgent.indexOf("Gecko") !== -1 && userAgent.indexOf("KHTML") === -1, - isWebKit = userAgent.indexOf("AppleWebKit/") !== -1, - isChrome = userAgent.indexOf("Chrome/") !== -1, - isOpera = userAgent.indexOf("Opera/") !== -1; + // We need to be extra careful about Microsoft as it shows increasing tendency of tainting its userAgent strings with false feathers + isGecko = userAgent.indexOf("Gecko") !== -1 && userAgent.indexOf("KHTML") === -1 && !isIE(), + isWebKit = userAgent.indexOf("AppleWebKit/") !== -1 && !isIE(), + isChrome = userAgent.indexOf("Chrome/") !== -1 && !isIE(), + isOpera = userAgent.indexOf("Opera/") !== -1 && !isIE(); function iosVersion(userAgent) { return +((/ipad|iphone|ipod/.test(userAgent) && userAgent.match(/ os (\d+).+? like mac os x/)) || [undefined, 0])[1]; @@ -6850,14 +6890,15 @@ wysihtml5.browser = (function() { */ supportsCommand: (function() { // Following commands are supported but contain bugs in some browsers + // TODO: investigate if some of these bugs can be tested without altering selection on page, instead of targeting browsers and versions directly var buggyCommands = { // formatBlock fails with some tags (eg.
) "formatBlock": isIE(10, "<="), // When inserting unordered or ordered lists in Firefox, Chrome or Safari, the current selection or line gets // converted into a list (,
  1. ...
) // IE and Opera act a bit different here as they convert the entire content of the current block element into a list - "insertUnorderedList": isIE(9, ">=") || isIE(12, "<="), - "insertOrderedList": isIE(9, ">=")|| isIE(12, "<=") + "insertUnorderedList": isIE(), + "insertOrderedList": isIE() }; // Firefox throws errors for queryCommandSupported, so we have to build up our own object of supported commands @@ -7014,6 +7055,11 @@ wysihtml5.browser = (function() { return isIE(); }, + /* In IE when deleting with caret at the begining of LI, List get broken into half instead of merging the LI with previous */ + hasLiDeletingProblem: function() { + return isIE(); + }, + hasUndoInContextMenu: function() { return isGecko || isChrome || isOpera; }, @@ -7047,6 +7093,12 @@ wysihtml5.browser = (function() { return isWebKit; }, + // In all webkit browsers there are some places where caret can not be placed at the end of blocks and directly before block level element + // when startContainer is element. + hasCaretBlockElementIssue: function() { + return isWebKit; + }, + supportsMutationEvents: function() { return ("MutationEvent" in window); }, @@ -7911,6 +7963,20 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) { } } return isVisible; + }, + lineBreak: function() { + return node && node.nodeType === 1 && node.nodeName === "BR"; + }, + block: function() { + return node && node.nodeType === 1 && node.ownerDocument.defaultView.getComputedStyle(node).display === "block"; + }, + // Void elements are elemens that can not have content + // In most cases browsers should solve the cases for you when you try to insert content into those, + // but IE does not and it is not nice to do so anyway. + voidElement: function() { + return wysihtml5.dom.domNode(node).test({ + query: wysihtml5.VOID_ELEMENTS + }); } }, @@ -8068,6 +8134,29 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) { } }, + transferContentTo: function(targetNode, removeOldWrapper) { + if (node.nodeType === 1) { + if (wysihtml5.dom.domNode(targetNode).is.voidElement()) { + while (node.firstChild) { + targetNode.parentNode.insertBefore(node.lastChild, targetNode.nextSibling); + } + } else { + while (node.firstChild) { + targetNode.appendChild(node.firstChild); + } + } + if (removeOldWrapper) { + node.parentNode.removeChild(node); + } + } else if (node.nodeType === 3 || node.nodeType === 8){ + if (wysihtml5.dom.domNode(targetNode).is.voidElement()) { + targetNode.parentNode.insertBefore(node, targetNode.nextSibling); + } else { + targetNode.appendChild(node); + } + } + }, + /* Tests a node against properties, and returns true if matches. Tests on principle that all properties defined must have at least one match. @@ -9541,17 +9630,10 @@ wysihtml5.dom.replaceWithChildNodes = function(node) { return; } - if (!node.firstChild) { - node.parentNode.removeChild(node); - return; - } - - var fragment = node.ownerDocument.createDocumentFragment(); while (node.firstChild) { - fragment.appendChild(node.firstChild); + node.parentNode.insertBefore(node.firstChild, node); } - node.parentNode.replaceChild(fragment, node); - node = fragment = null; + node.parentNode.removeChild(node); }; ;/** * Unwraps an unordered/ordered list @@ -12096,6 +12178,43 @@ wysihtml5.quirks.ensureProperClearing = (function() { return (ret !== this.contain) ? ret : false; }, + // Gather info about caret location (caret node, previous and next node) + getNodesNearCaret: function() { + if (!this.isCollapsed()) { + throw "Selection must be caret when using selection.getNodesNearCaret()"; + } + + var r = this.getOwnRanges(), + caretNode, prevNode, nextNode, offset; + + if (r && r.length > 0) { + if (r[0].startContainer.nodeType === 1) { + caretNode = r[0].startContainer.childNodes[r[0].startOffset - 1]; + if (!caretNode && r[0].startOffset === 0) { + // Is first position before all nodes + nextNode = r[0].startContainer.childNodes[0]; + } else if (caretNode) { + prevNode = caretNode.previousSibling; + nextNode = caretNode.nextSibling; + } + } else { + caretNode = r[0].startContainer; + prevNode = caretNode.previousSibling; + nextNode = caretNode.nextSibling; + offset = r[0].startOffset; + } + + return { + "caretNode": caretNode, + "prevNode": prevNode, + "nextNode": nextNode, + "textOffset": offset + }; + } + + return null; + }, + getSelectionParentsByTag: function(tagName) { var nodes = this.getSelectedOwnNodes(), curEl, parents = []; @@ -12167,6 +12286,11 @@ wysihtml5.quirks.ensureProperClearing = (function() { startOffset = (sel.isBackwards()) ? sel.focusOffset : sel.anchorOffset, rng = this.createRange(), endNode, inTmpCaret; + // If start is textnode and all is whitespace before caret. Set start offset to 0 + if (startNode && startNode.nodeType === 3 && (/^\s*$/).test(startNode.data.slice(0, startOffset))) { + startOffset = 0; + } + // Escape temproray helper nodes if selection in them inTmpCaret = wysihtml5.dom.getParentElement(startNode, { query: '._wysihtml5-temp-caret-fix' }, 1); if (inTmpCaret) { @@ -12486,43 +12610,6 @@ wysihtml5.quirks.ensureProperClearing = (function() { return nodes; }, - deblockAndSurround: function(nodeOptions) { - var tempElement = this.doc.createElement('div'), - range = rangy.createRange(this.doc), - tempDivElements, - tempElements, - firstChild; - - tempElement.className = nodeOptions.className; - - this.composer.commands.exec("formatBlock", nodeOptions); - tempDivElements = this.contain.querySelectorAll("." + nodeOptions.className); - if (tempDivElements[0]) { - tempDivElements[0].parentNode.insertBefore(tempElement, tempDivElements[0]); - - range.setStartBefore(tempDivElements[0]); - range.setEndAfter(tempDivElements[tempDivElements.length - 1]); - tempElements = range.extractContents(); - - while (tempElements.firstChild) { - firstChild = tempElements.firstChild; - if (firstChild.nodeType == 1 && wysihtml5.dom.hasClass(firstChild, nodeOptions.className)) { - while (firstChild.firstChild) { - tempElement.appendChild(firstChild.firstChild); - } - if (firstChild.nodeName !== "BR") { tempElement.appendChild(this.doc.createElement('br')); } - tempElements.removeChild(firstChild); - } else { - tempElement.appendChild(firstChild); - } - } - } else { - tempElement = null; - } - - return tempElement; - }, - /** * Scroll the current caret position into the view * FIXME: This is a bit hacky, there might be a smarter way of doing this @@ -14500,20 +14587,55 @@ wysihtml5.Commands = Base.extend( } } + var isWhitespaceBefore = function (textNode, offset) { + var str = textNode.data ? textNode.data.slice(0, offset) : ""; + return (/^\s*$/).test(str); + } + + var isWhitespaceAfter = function (textNode, offset) { + var str = textNode.data ? textNode.data.slice(offset) : ""; + return (/^\s*$/).test(str); + } + + var trimBlankTextsAndBreaks = function(fragment) { + if (fragment) { + while (fragment.firstChild && fragment.firstChild.nodeType === 3 && (/^\s*$/).test(fragment.firstChild.data) && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.firstChild); + } + + while (fragment.lastChild && fragment.lastChild.nodeType === 3 && (/^\s*$/).test(fragment.lastChild.data) && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.lastChild); + } + + if (fragment.firstChild && fragment.firstChild.nodeType === 1 && fragment.firstChild.nodeName === "BR" && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.firstChild); + } + + if (fragment.lastChild && fragment.lastChild.nodeType === 1 && fragment.lastChild.nodeName === "BR" && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.lastChild); + } + } + } + // Wrap the range with a block level element // If element is one of unnestable block elements (ex: h2 inside h1), split nodes and insert between so nesting does not occur function wrapRangeWithElement(range, options, closestBlockName, composer) { var similarOptions = options ? correctOptionsForSimilarityCheck(options) : null, r = range.cloneRange(), rangeStartContainer = r.startContainer, - prevNode = wysihtml5.dom.domNode(getRangeNode(r.startContainer, r.startOffset)).prev({nodeTypes: [1,3], ignoreBlankTexts: true}), - nextNode = wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}), + startNode = getRangeNode(r.startContainer, r.startOffset), + endNode = getRangeNode(r.endContainer, r.endOffset), + prevNode = (r.startContainer === startNode && startNode.nodeType === 3 && !isWhitespaceBefore(startNode, r.startOffset)) ? startNode : wysihtml5.dom.domNode(startNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}), + nextNode = ((r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] === endNode) || (r.endContainer === endNode && endNode.nodeType === 3 && !isWhitespaceAfter(endNode, r.endOffset))) ? endNode : wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}), content = r.extractContents(), fragment = composer.doc.createDocumentFragment(), similarOuterBlock = similarOptions ? wysihtml5.dom.getParentElement(rangeStartContainer, similarOptions, null, composer.element) : null, splitAllBlocks = !closestBlockName || !options || (options.nodeName === "BLOCKQUOTE" && closestBlockName === "BLOCKQUOTE"), firstOuterBlock = similarOuterBlock || findOuterBlock(rangeStartContainer, composer.element, splitAllBlocks), // The outermost un-nestable block element parent of selection start - wrapper, blocks, children; + wrapper, blocks, children, + firstc, lastC; + + trimBlankTextsAndBreaks(content); if (options && options.nodeName === "BLOCKQUOTE") { @@ -14641,6 +14763,29 @@ wysihtml5.Commands = Base.extend( return options; } + function caretIsOnEmptyLine(composer) { + var caretInfo; + if (composer.selection.isCollapsed()) { + caretInfo = composer.selection.getNodesNearCaret(); + if (caretInfo && caretInfo.caretNode) { + if ( + // caret is allready breaknode + wysihtml5.dom.domNode(caretInfo.caretNode).is.lineBreak() || + // caret is textnode + (caretInfo.caretNode.nodeType === 3 && caretInfo.textOffset === 0 && (!caretInfo.prevNode || wysihtml5.dom.domNode(caretInfo.prevNode).is.lineBreak())) || + // Caret is temprorary rangy selection marker + (caretInfo.caretNode.nodeType === 1 && caretInfo.caretNode.classList.contains('rangySelectionBoundary') && + (!caretInfo.prevNode || wysihtml5.dom.domNode(caretInfo.prevNode).is.lineBreak() || wysihtml5.dom.domNode(caretInfo.prevNode).is.block()) && + (!caretInfo.nextNode || wysihtml5.dom.domNode(caretInfo.nextNode).is.lineBreak() || wysihtml5.dom.domNode(caretInfo.nextNode).is.block()) + ) + ) { + return true; + } + } + } + return false; + } + wysihtml5.commands.formatBlock = { exec: function(composer, command, options) { options = parseOptions(options); @@ -14663,7 +14808,11 @@ wysihtml5.Commands = Base.extend( // If selection is caret expand it to cover nearest suitable block element or row if none found if (composer.selection.isCollapsed()) { bookmark = rangy.saveSelection(composer.win); - expandCaretToBlock(composer, options && options.nodeName ? options.nodeName.toUpperCase() : undefined); + if (caretIsOnEmptyLine(composer)) { + composer.selection.selectLine(); + } else { + expandCaretToBlock(composer, options && options.nodeName ? options.nodeName.toUpperCase() : undefined); + } } if (options) { newBlockElements = formatSelection("apply", composer, options); @@ -15719,20 +15868,19 @@ wysihtml5.Commands = Base.extend( }; var createListFallback = function(nodeName, composer) { - var sel; - - if (!composer.selection.isCollapsed()) { - sel = rangy.saveSelection(composer.win); - } + var sel = rangy.saveSelection(composer.win); // Fallback for Create list var tempClassName = "_wysihtml5-temp-" + new Date().getTime(), - tempElement = composer.selection.deblockAndSurround({ - "nodeName": "div", - "className": tempClassName - }), isEmpty, list; + composer.commands.exec("formatBlock", { + "nodeName": "div", + "className": tempClassName + }); + + var tempElement = composer.element.querySelector("." + tempClassName); + // This space causes new lists to never break on enter var INVISIBLE_SPACE_REG_EXP = /\uFEFF/g; tempElement.innerHTML = tempElement.innerHTML.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP, ""); @@ -16946,8 +17094,11 @@ wysihtml5.views.View = Base.extend( function adjust(selectedNode) { var parentElement = dom.getParentElement(selectedNode, { query: "p, div" }, 2); if (parentElement && dom.contains(that.element, parentElement)) { - that.selection.executeAndRestore(function() { + that.selection.executeAndRestoreRangy(function() { if (that.config.useLineBreaks) { + if (!parentElement.firstChild || (parentElement.firstChild === parentElement.lastChild && parentElement.firstChild.nodeType === 1 && parentElement.firstChild.classList.contains('rangySelectionBoundary'))) { + parentElement.appendChild(that.doc.createElement('br')); + } dom.replaceWithChildNodes(parentElement); } else if (parentElement.nodeName !== "P") { dom.renameElement(parentElement, "p"); @@ -16956,18 +17107,21 @@ wysihtml5.views.View = Base.extend( } } + // Ensures when editor is empty and not line breaks mode, the inital state has a paragraph in it on focus with caret inside paragraph if (!this.config.useLineBreaks) { - dom.observe(this.element, ["focus", "keydown"], function() { + dom.observe(this.element, ["focus"], function() { if (that.isEmpty()) { - var paragraph = that.doc.createElement("P"); - that.element.innerHTML = ""; - that.element.appendChild(paragraph); - if (!browser.displaysCaretInEmptyContentEditableCorrectly()) { - paragraph.innerHTML = "
"; - that.selection.setBefore(paragraph.firstChild); - } else { - that.selection.selectNode(paragraph, true); - } + setTimeout(function() { + var paragraph = that.doc.createElement("P"); + that.element.innerHTML = ""; + that.element.appendChild(paragraph); + if (!browser.displaysCaretInEmptyContentEditableCorrectly()) { + paragraph.innerHTML = "
"; + that.selection.setBefore(paragraph.firstChild); + } else { + that.selection.selectNode(paragraph, true); + } + }, 0); } }); } @@ -16975,7 +17129,7 @@ wysihtml5.views.View = Base.extend( dom.observe(this.element, "keydown", function(event) { var keyCode = event.keyCode; - if (event.shiftKey) { + if (event.shiftKey || event.ctrlKey || event.defaultPrevented) { return; } @@ -17007,11 +17161,9 @@ wysihtml5.views.View = Base.extend( }, 0); return; } - if (that.config.useLineBreaks && keyCode === wysihtml5.ENTER_KEY && !wysihtml5.browser.insertsLineBreaksOnReturn()) { event.preventDefault(); that.commands.exec("insertLineBreak"); - } }); } @@ -17228,6 +17380,7 @@ wysihtml5.views.View = Base.extend( */ (function(wysihtml5) { var dom = wysihtml5.dom, + domNode = dom.domNode, browser = wysihtml5.browser, /** * Map keyCodes to query commands @@ -17278,7 +17431,7 @@ wysihtml5.views.View = Base.extend( return true; } try { - var ev = new CustomEvent("wysihtml5:uneditable:delete"); + var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false}); before.node.dispatchEvent(ev); } catch (err) {} before.node.parentNode.removeChild(before.node); @@ -17287,16 +17440,19 @@ wysihtml5.views.View = Base.extend( return false; }; - // Deletion with caret in the beginning of headings needs special attention - // Heading does not concate text to previous block node correctly (browsers do unexpected miracles here especially webkit) - var fixDeleteInTheBeginnigOfHeading = function(composer) { + // Deletion with caret in the beginning of headings and other block elvel elements needs special attention + // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit) + var fixDeleteInTheBeginningOfBlock = function(composer) { var selection = composer.selection, prevNode = selection.getPreviousNode(); if (selection.caretIsFirstInSelection() && prevNode && prevNode.nodeType === 1 && - (/block/).test(composer.win.getComputedStyle(prevNode).display) + (/block/).test(composer.win.getComputedStyle(prevNode).display) && + !domNode(prevNode).test({ + query: "ol, ul, table, tr, dl" + }) ) { if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) { // If heading is empty remove the heading node @@ -17306,42 +17462,83 @@ wysihtml5.views.View = Base.extend( if (prevNode.lastChild) { var selNode = prevNode.lastChild, selectedNode = selection.getSelectedNode(), - commonAncestorNode = wysihtml5.dom.domNode(prevNode).commonAncestor(selectedNode, composer.element); - curNode = commonAncestorNode ? wysihtml5.dom.getParentElement(selectedNode, { + commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element); + curNode = selectedNode.nodeType === 3 ? selectedNode : wysihtml5.dom.getParentElement(selectedNode, { query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote" - }, false, commonAncestorNode) : null; - - if (curNode) { - while (curNode.firstChild) { - prevNode.appendChild(curNode.firstChild); + }, false, commonAncestorNode || composer.element); + + if (curNode) { + domNode(curNode).transferContentTo(prevNode, true); + selection.setAfter(selNode); + return true; + } + } + } + } + return false; + }; + + /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */ + /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */ + var fixDeleteInTheBeginningOfLi = function(composer) { + if (wysihtml5.browser.hasLiDeletingProblem()) { + var selection = composer.selection.getSelection(), + aNode = selection.anchorNode, + listNode, prevNode, firstNode, + isInBeginnig = composer.selection.caretIsFirstInSelection(); + + // Fix caret at the beginnig of first textNode in LI + if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) { + aNode = aNode.parentNode; + isInBeginnig = true; + } + + if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") { + prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}); + if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) { + prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}); + } + if (prevNode) { + firstNode = aNode.firstChild; + domNode(aNode).transferContentTo(prevNode, true); + if (firstNode) { + composer.selection.setBefore(firstNode); + } else if (prevNode) { + if (prevNode.nodeType === 1) { + if (prevNode.lastChild) { + composer.selection.setAfter(prevNode.lastChild); + } else { + composer.selection.selectNode(prevNode); } - selection.setAfter(selNode); - return true; - } else if (selectedNode.nodeType === 3) { - prevNode.appendChild(selectedNode); - selection.setAfter(selNode); - return true; + } else { + composer.selection.setAfter(prevNode); } + } + return true; } } } return false; - }; + } var handleDeleteKeyPress = function(event, composer) { var selection = composer.selection, element = composer.element; if (selection.isCollapsed()) { - if (fixDeleteInTheBeginnigOfHeading(composer)) { + if (handleUneditableDeletion(composer)) { event.preventDefault(); return; } - if (fixLastBrDeletionInTable(composer)) { + if (fixDeleteInTheBeginningOfLi(composer)) { event.preventDefault(); return; } - if (handleUneditableDeletion(composer)) { + if (fixDeleteInTheBeginningOfBlock(composer)) { + event.preventDefault(); + return; + } + if (fixLastBrDeletionInTable(composer)) { event.preventDefault(); return; } @@ -17353,6 +17550,72 @@ wysihtml5.views.View = Base.extend( } }; + var handleEnterKeyPress = function(event, composer) { + if (composer.config.useLineBreaks && !event.shiftKey && !event.ctrlKey) { + // Fixes some misbehaviours of enters in linebreaks mode (natively a bit unsupported feature) + + var breakNodes = "p, pre, div, blockquote", + caretInfo, parent, txtNode; + + if (composer.selection.isCollapsed()) { + caretInfo = composer.selection.getNodesNearCaret(); + if (caretInfo) { + + if (caretInfo.caretNode || caretInfo.nextNode) { + parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2); + if (parent === composer.element) { + parent = undefined; + } + } + + if (parent && caretInfo.caretNode) { + if (domNode(caretInfo.caretNode).is.lineBreak()) { + + if (composer.config.doubleLineBreakEscapesBlock) { + // Double enter (enter on blank line) exits block element in useLineBreaks mode. + event.preventDefault(); + caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode); + + // Ensure surplous line breaks are not added to preceding element + if (domNode(caretInfo.nextNode).is.lineBreak()) { + caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode); + } + + var brNode = composer.doc.createElement('br'); + if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) { + parent.parentNode.insertBefore(brNode, parent.nextSibling); + } else { + composer.selection.splitElementAtCaret(parent, brNode); + } + + // Ensure surplous blank lines are not added to preceding element + if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) { + // Replaces blank lines at the beginning of textnode + caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, ''); + } + composer.selection.setBefore(brNode); + } + + } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) { + + // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens. + // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br + event.preventDefault(); + var br1 = composer.doc.createElement('br'), + br2 = composer.doc.createElement('br'), + f = composer.doc.createDocumentFragment(); + f.appendChild(br1); + f.appendChild(br2); + composer.selection.insertNode(f); + composer.selection.setBefore(br2); + + } + } + } + } + } + }; + var handleTabKeyDown = function(composer, element, shiftKey) { if (!composer.selection.isCollapsed()) { composer.selection.deleteContents(); @@ -17448,26 +17711,6 @@ wysihtml5.views.View = Base.extend( } }; - // TODO: mouseover is not actually a foolproof and obvious place for this, must be changed as it modifies dom on random basis - // Shows url in tooltip when hovering links or images - var handleMouseOver = function(event) { - var titlePrefixes = { - IMG: "Image: ", - A: "Link: " - }, - target = event.target, - nodeName = target.nodeName, - title; - - if (nodeName !== "A" && nodeName !== "IMG") { - return; - } - if(!target.hasAttribute("title")){ - title = titlePrefixes[nodeName] + (target.getAttribute("href") || target.getAttribute("src")); - target.setAttribute("title", title); - } - }; - var handleClick = function(event) { if (this.config.classNames.uneditableContainer) { // If uneditables is configured, makes clicking on uneditable move caret after clicked element (so it can be deleted like text) @@ -17534,6 +17777,10 @@ wysihtml5.views.View = Base.extend( handleTabKeyDown(this, this.element, event.shiftKey); } + if (keyCode === wysihtml5.ENTER_KEY) { + handleEnterKeyPress(event, this); + } + }; var handleIframeFocus = function(event) { @@ -17610,7 +17857,6 @@ wysihtml5.views.View = Base.extend( addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false); this.element.addEventListener("copy", handleCopy.bind(this), false); this.element.addEventListener("mousedown", handleMouseDown.bind(this), false); - this.element.addEventListener("mouseover", handleMouseOver.bind(this), false); this.element.addEventListener("click", handleClick.bind(this), false); this.element.addEventListener("drop", handleDrop.bind(this), false); this.element.addEventListener("keyup", handleKeyUp.bind(this), false); @@ -17906,6 +18152,9 @@ wysihtml5.views.View = Base.extend( parser: wysihtml5.dom.parse, // By default wysihtml5 will insert a
for line breaks, set this to false to use

useLineBreaks: true, + // Double enter (enter on blank line) exits block element in useLineBreaks mode. + // It enables a way of escaping out of block elements and splitting block elements + doubleLineBreakEscapesBlock: true, // Array (or single string) of stylesheet urls to be loaded in the editor's iframe stylesheets: [], // Placeholder text to use, defaults to the placeholder attribute on the textarea element diff --git a/dist/wysihtml-toolbar.min.js b/dist/wysihtml-toolbar.min.js index 9265a80..29cf527 100644 --- a/dist/wysihtml-toolbar.min.js +++ b/dist/wysihtml-toolbar.min.js @@ -1,11 +1,11 @@ -/*! wysihtml - v0.5.2 (2015-11-10) */ +/*! wysihtml - v0.5.3 (2015-12-09) */ -var wysihtml5={version:"0.5.2",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[e]:void 0,g=b.focusNode,h=b.focusOffset,i=g&&1===g.nodeType&&h>0?g.childNodes[h-1]:void 0,j=this.ownerDocument.createRange(),k=a.shift(),l=k?a.shift():null;for(i&&3===i.nodeType&&(g=i,h=i.nodeValue.length,i=void 0),f&&3===f.nodeType&&(c=f,e=0,f=void 0),(c===g&&e>h||c!==g&&c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINS))&&(g=[c,c=g][0],h=[e,e=h][0]);k&&l;)l.previousSibling&&l.previousSibling===k?(c===l&&(c=k,e=k.nodeValue.length+e),g===l&&(g=k,h=k.nodeValue.length+h),k.nodeValue=k.nodeValue+l.nodeValue,l.parentNode.removeChild(l),l=a.shift()):(k=l,l=a.shift());i&&(h=Array.prototype.indexOf.call(i.parentNode.childNodes,i)+1),f&&(e=Array.prototype.indexOf.call(f.parentNode.childNodes,f)),c&&c.parentNode&&g&&g.parentNode&&(j.setStart(c,e),j.setEnd(g,h),b.removeAllRanges(),b.addRange(j))});Node.prototype.normalize=a},f=function(){window.removeEventListener("load",f),"Node"in window&&"normalize"in Node.prototype&&c()&&e()};"complete"!==b.readyState?window.addEventListener("load",f):f()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a); -},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

1

",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

1

",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){ -if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c(12,">")},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="
foo
";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">=")||c(12,"<="),insertOrderedList:c(9,">=")||c(12,"<=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="

",b=c.innerHTML.toLowerCase(),a="

"===b||"

"===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":"  "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi,"  ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)), -g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||"

"===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p)if(a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},destroy:function(){},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d,!1),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)), -this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return wysihtml5.browser.supportsModernPaste()&&a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("

 

"==b||"

 

 

"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),this.setAfter(b))}},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(D),g=b.config.classNames.uneditableContainer+[""].concat(D.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?D:C)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(E)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=B.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=B.renameElement(b,i(d)):(B.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(D)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(D)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=a.dom.domNode(c(m.startContainer,m.startOffset)).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),s=a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),u=m.extractContents(),v=g.doc.createDocumentFragment(),w=k?a.dom.getParentElement(o,k,null,g.element):null,x=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,y=w||j(o,g.element,x);if(e&&"BLOCKQUOTE"===e.nodeName){var z=l(null,e,g);z.appendChild(u),v.appendChild(z),i=[z]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(D))l(u.firstChild,e,g),u.firstChild.matches(C)&&n(u.firstChild),v.appendChild(u.firstChild);else{for(h=l(null,q(e,f,g),g);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(D));)1==u.firstChild.nodeType&&h.matches(C)&&n(u.firstChild),h.appendChild(u.firstChild);v.appendChild(h)}else v.appendChild(l(null,e,g));i=a.lang.array(v.childNodes).get()}return r(v,m,g,y),t(p,s,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:D},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:C+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}var B=a.dom,C="h1, h2, h3, h4, h5, h6, p, pre",D="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",E="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:D})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=B.getParentElement(g[h],d||{query:D},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),e.classList.add(f.className)),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(a,c){a.selection.insertHTML(b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){var d;c.selection.isCollapsed()||(d=rangy.saveSelection(c.win));var e,f,g="_wysihtml5-temp-"+(new Date).getTime(),h=c.selection.deblockAndSurround({nodeName:"div", -className:g});h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(e=/^(\s|(
))+$/i.test(h.innerHTML),f=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&rangy.restoreSelection(d),e&&c.selection.selectNode(f.querySelector("li"),!0))};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"
",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":"
"},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>|

|<\/p>)*$/i.test(a)||""===a||"
"===a||"

"===a||"


"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),this._initAutoLinking(),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("AutoUrlDetect",!1,!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),k(this,this.element,b.shiftKey)))):(this.selection.selectAll(),void b.preventDefault())},x=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5), -wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(a){this.currentView.cleanUp(a)},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5),function(a){var b=a.dom,c="wysihtml5-command-dialog-opened",d="input, select, textarea",e="[data-wysihtml5-dialog-field]",f="data-wysihtml5-dialog-field";a.toolbar.Dialog=a.lang.Dispatcher.extend({constructor:function(a,b){this.link=a,this.container=b},_observe:function(){if(!this._observed){var d=this,e=function(a){var b=d._serialize();d.fire("save",b),d.hide(),a.preventDefault(),a.stopPropagation()};b.observe(d.link,"click",function(){b.hasClass(d.link,c)&&setTimeout(function(){d.hide()},0)}),b.observe(this.container,"keydown",function(b){var c=b.keyCode;c===a.ENTER_KEY&&e(b),c===a.ESCAPE_KEY&&d.cancel()}),b.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",e),b.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(a){d.cancel(),a.preventDefault(),a.stopPropagation()}),this._observed=!0}},_serialize:function(){for(var a={},b=this.container.querySelectorAll(e),c=b.length,d=0;c>d;d++)a[b[d].getAttribute(f)]=b[d].value;return a},_interpolate:function(a){for(var b,c,d,g=document.querySelector(":focus"),h=this.container.querySelectorAll(e),i=h.length,j=0;i>j;j++)b=h[j],b!==g&&(a&&"hidden"===b.type||(c=b.getAttribute(f),d=this.elementToChange&&"boolean"!=typeof this.elementToChange?this.elementToChange.getAttribute(c)||"":b.defaultValue,b.value=d))},update:function(a){this.elementToChange=a?a:this.elementToChange,this._interpolate()},show:function(a){var e=this.container.querySelector(d);if(this._observe(),this.update(a),b.addClass(this.link,c),this.container.style.display="",this.isOpen=!0,this.fire("show"),e&&!a)try{e.focus()}catch(f){}},_hide:function(a){this.elementToChange=null,b.removeClass(this.link,c),this.container.style.display="none",this.isOpen=!1},hide:function(){this._hide(),this.fire("hide")},cancel:function(){this._hide(),this.fire("cancel")}})}(wysihtml5),function(a){var b=a.dom,c={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};a.toolbar.Speech=function(g,h){var i=document.createElement("input");if(!a.browser.supportsSpeechApiOn(i))return void(h.style.display="none");var j=g.editor.textarea.element.getAttribute("lang");j&&(f.lang=j);var k=document.createElement("div");a.lang.object(d).merge({width:h.offsetWidth+"px",height:h.offsetHeight+"px"}),b.insert(i).into(k),b.insert(k).into(h),b.setStyles(e).on(i),b.setAttributes(f).on(i),b.setStyles(d).on(k),b.setStyles(c).on(h);var l="onwebkitspeechchange"in i?"webkitspeechchange":"speechchange";b.observe(i,l,function(){g.execCommand("insertText",i.value),i.value=""}),b.observe(i,"click",function(a){b.hasClass(h,"wysihtml5-command-disabled")&&a.preventDefault(),a.stopPropagation()})}}(wysihtml5),function(a){function b(b,c){var d=b.commands.state(c.name,c.value);return!c.dialog.multiselect&&a.lang.object(d).isArray()&&(d=1===d.length?d[0]:!0),d}var c="wysihtml5-command-disabled",d="wysihtml5-commands-disabled",e="wysihtml5-command-active",f="wysihtml5-action-active",g=a.dom;a.toolbar.Toolbar=Base.extend({constructor:function(b,g,h){this.editor=b,this.container="string"==typeof g?document.getElementById(g):g,this.composer=b.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),h&&this.show(),null!=b.config.classNameCommandDisabled&&(c=b.config.classNameCommandDisabled),null!=b.config.classNameCommandsDisabled&&(d=b.config.classNameCommandsDisabled),null!=b.config.classNameCommandActive&&(e=b.config.classNameCommandActive),null!=b.config.classNameActionActive&&(f=b.config.classNameActionActive);for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),j=i.length,k=0;j>k;k++)new a.toolbar.Speech(this,i[k])},_getLinks:function(b){for(var c,d,e,f,g,h,i=this[b+"Links"]=a.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+b+"]")).get(),j=i.length,k=0,l=this[b+"Mapping"]={};j>k;k++)c=i[k],e=c.getAttribute("data-wysihtml5-"+b),f=c.getAttribute("data-wysihtml5-"+b+"-value"),h=c.getAttribute("data-wysihtml5-"+b+"-blank-value"),d=this.container.querySelector("[data-wysihtml5-"+b+"-group='"+e+"']"),g=this._getDialog(c,e),l[e+":"+f]={link:c,group:d,name:e,value:f,tracksBlankValue:h,dialog:g,state:!1}},_getDialog:function(b,c){var d,e,f=this,g=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']");return g&&(d=a.toolbar["Dialog_"+c]?new a.toolbar["Dialog_"+c](b,g):new a.toolbar.Dialog(b,g),d.on("show",function(){e=f.composer.selection.getBookmark(),f.editor.fire("show:dialog",{command:c,dialogContainer:g,commandLink:b})}),d.on("save",function(a){e&&f.composer.selection.setBookmark(e),f._execCommand(c,a),f.editor.fire("save:dialog",{command:c,dialogContainer:g,commandLink:b}),f._hideAllDialogs(),f._preventInstantFocus(),e=void 0}),d.on("cancel",function(){e&&f.composer.selection.setBookmark(e),f.editor.fire("cancel:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0,f._preventInstantFocus()}),d.on("hide",function(){f.editor.fire("hide:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0})),d},execCommand:function(a,b){this.commandsDisabled||this._execCommand(a,b)},_execCommand:function(a,b){this.editor.focus(!1),this.composer.commands.exec(a,b),this._updateLinkStates()},execAction:function(a){var b=this.editor;"change_view"===a&&(b.currentView===b.textarea||"source"===b.currentView?b.fire("change_view","composer"):b.fire("change_view","textarea")),"showSource"==a&&b.fire("showSource")},_observe:function(){for(var c=this,e=this.editor,f=this.container,h=this.commandLinks.concat(this.actionLinks),i=h.length,j=0;i>j;j++)"A"===h[j].nodeName?g.setAttributes({href:"javascript:;",unselectable:"on"}).on(h[j]):g.setAttributes({unselectable:"on"}).on(h[j]);g.delegate(f,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(a){a.preventDefault()}),g.delegate(f,"[data-wysihtml5-command]","click",function(a){var d,e=this,f=e.getAttribute("data-wysihtml5-command"),g=e.getAttribute("data-wysihtml5-command-value"),h=c.commandMapping[f+":"+g];g||!h.dialog?c.execCommand(f,g):(d=b(c.composer,h),h.dialog.show(d)),a.preventDefault()}),g.delegate(f,"[data-wysihtml5-action]","click",function(a){var b=this.getAttribute("data-wysihtml5-action");c.execAction(b),a.preventDefault()}),e.on("interaction:composer",function(a){c.preventFocus||c._updateLinkStates()}),this._ownerDocumentClick=function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},this.container.ownerDocument.addEventListener("click",this._ownerDocumentClick,!1),this.editor.on("destroy:composer",this.destroy.bind(this)),this.editor.config.handleTables&&(e.on("tableselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),e.on("tableunselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),e.on("change_view",function(a){setTimeout(function(){c.commandsDisabled="composer"!==a,c._updateLinkStates(),c.commandsDisabled?g.addClass(f,d):g.removeClass(f,d)},0)})},destroy:function(){this.container.ownerDocument.removeEventListener("click",this._ownerDocumentClick,!1)},_hideAllDialogs:function(){var a=this.commandMapping;for(var b in a)a[b].dialog&&a[b].dialog.hide()},_preventInstantFocus:function(){this.preventFocus=!0,setTimeout(function(){this.preventFocus=!1}.bind(this),0)},_updateLinkStates:function(){var a,d,h,i,j,k=this.commandMapping,l=this.composer,m=this.actionMapping;for(a in k)i=k[a],this.commandsDisabled?(d=!1,g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&i.dialog.hide()):(d=this.composer.commands.state(i.name,i.value),g.removeClass(i.link,c),i.group&&g.removeClass(i.group,c)),(i.state!==d||i.tracksBlankValue)&&(i.state=d,d?i.tracksBlankValue?g.removeClass(i.link,e):(g.addClass(i.link,e),i.group&&g.addClass(i.group,e),!i.dialog||"undefined"!=typeof i.value&&null!==i.value||(d&&"object"==typeof d?(d=b(l,i),i.state=d,j=i.dialog.container.dataset?i.dialog.container.dataset.showdialogonselection:!1,l.config.showToolbarDialogsOnSelection||j?i.dialog.show(d):i.dialog.update(d)):i.dialog.hide())):i.tracksBlankValue?g.addClass(i.link,e):(g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&!i.value&&i.dialog.hide()));for(a in m)h=m[a],"change_view"===h.name&&(h.state=this.editor.currentView===this.editor.textarea||"source"===this.editor.currentView,h.state?g.addClass(h.link,f):g.removeClass(h.link,f))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(a){a.toolbar.Dialog_createTable=a.toolbar.Dialog.extend({show:function(a){this.base(a)}})}(wysihtml5),function(a){var b="[data-wysihtml5-dialog-field]",c="data-wysihtml5-dialog-field";a.toolbar.Dialog_foreColorStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){for(var a={},d=this.container.querySelectorAll(b),e=d.length,f=0;e>f;f++)a[d[f].getAttribute(c)]=d[f].value;return a},_interpolate:function(d){for(var e,f,g=a.quirks.styleParser,h=document.querySelector(":focus"),i=this.container.querySelectorAll(b),j=i.length,k=0,l=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,m=l?l.getAttribute("style"):null,n=m?g.parseColor(m,"color"):null;j>k;k++)e=i[k],e!==h&&(d&&"hidden"===e.type||"color"===e.getAttribute(c)&&(f=(e.dataset.colormode||"rgb").toLowerCase(),f="hex"===f?"hash":f,n?e.value=g.unparseColor(n,f):e.value=g.unparseColor([0,0,0],f)))}})}(wysihtml5),function(a){a.dom;a.toolbar.Dialog_fontSizeStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){return{size:this.container.querySelector('[data-wysihtml5-dialog-field="size"]').value}},_interpolate:function(b){var c=document.querySelector(":focus"),d=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),e=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,f=e?e.getAttribute("style"):null,g=f?a.quirks.styleParser.parseFontSize(f):null;d&&d!==c&&g&&!/^\s*$/.test(g)&&(d.value=g)}})}(wysihtml5); +var wysihtml5={version:"0.5.3",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset), +b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

1

",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

1

",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"), +isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c(12,">")},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="
foo
";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(),insertOrderedList:c()},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="

",b=c.innerHTML.toLowerCase(),a="

"===b||"

"===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":"  "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi,"  ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b},lineBreak:function(){return d&&1===d.nodeType&&"BR"===d.nodeName},block:function(){return d&&1===d.nodeType&&"block"===d.ownerDocument.defaultView.getComputedStyle(d).display},voidElement:function(){return a.dom.domNode(d).test({query:a.VOID_ELEMENTS})}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){ +return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||"

"===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p)if(a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},destroy:function(){},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d,!1),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before": +a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return wysihtml5.browser.supportsModernPaste()&&a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("

 

"==b||"

 

 

"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(a=e[0].startContainer,b=a.previousSibling,c=a.nextSibling,d=e[0].startOffset),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),this.setAfter(b))}},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){ +for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),e.classList.add(f.className)),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i), +g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(a,c){a.selection.insertHTML(b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),d&&c.selection.selectNode(e.querySelector("li"),!0))};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"
",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":"
"},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>|

|<\/p>)*$/i.test(a)||""===a||"
"===a||"

"===a||"


"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),this._initAutoLinking(),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("AutoUrlDetect",!1,!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),b.replaceWithChildNodes(c)):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus"],function(){e.isEmpty()&&setTimeout(function(){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||h!==a.ENTER_KEY&&h!==a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},g=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},h=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},i=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(h(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},j=function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element);if(curNode=3===g.nodeType?g:a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element),curNode)return c(curNode).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},k=function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},l=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(k(b))return void a.preventDefault();if(j(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},m=function(d,e){if(e.config.useLineBreaks&&!d.shiftKey&&!d.ctrlKey){var f,g,h="p, pre, div, blockquote";if(e.selection.isCollapsed()&&(f=e.selection.getNodesNearCaret(),f&&((f.caretNode||f.nextNode)&&(g=b.getParentElement(f.caretNode||f.nextNode,{query:h},2),g===e.element&&(g=void 0)),g&&f.caretNode)))if(c(f.caretNode).is.lineBreak()){if(e.config.doubleLineBreakEscapesBlock){d.preventDefault(),f.caretNode.parentNode.removeChild(f.caretNode),c(f.nextNode).is.lineBreak()&&f.nextNode.parentNode.removeChild(f.nextNode);var i=e.doc.createElement("br");c(f.nextNode).is.lineBreak()&&f.nextNode===g.lastChild?g.parentNode.insertBefore(i,g.nextSibling):e.selection.splitElementAtCaret(g,i),f.nextNode&&3===f.nextNode.nodeType&&(f.nextNode.data=f.nextNode.data.replace(/^ *[\r\n]+/,"")),e.selection.setBefore(i)}}else if(3===f.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&f.textOffset===f.caretNode.data.length&&!f.nextNode){d.preventDefault();var j=e.doc.createElement("br"),k=e.doc.createElement("br"),l=e.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),e.selection.insertNode(l),e.selection.setBefore(k)}}},n=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},o=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},p=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},q=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},r=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},s=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},t=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},u=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},v=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},w=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},x=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},y=function(b){var c,d,f=b.keyCode,g=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g), +b.preventDefault()),f===a.BACKSPACE_KEY&&l(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),n(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&m(b,this))):(this.selection.selectAll(),void b.preventDefault())},z=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),g(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],o.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||o.call(this)},250)),this.config.handleTables&&z.call(this),f(c,["drop","paste","mouseup","focus","keyup"],p.bind(this)),c.addEventListener("focus",q.bind(this),!1),c.addEventListener("blur",r.bind(this),!1),f(this.element,["drop","paste","beforepaste"],s.bind(this),!1),this.element.addEventListener("copy",t.bind(this),!1),this.element.addEventListener("mousedown",v.bind(this),!1),this.element.addEventListener("click",w.bind(this),!1),this.element.addEventListener("drop",x.bind(this),!1),this.element.addEventListener("keyup",u.bind(this),!1),this.element.addEventListener("keydown",y.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(a){this.currentView.cleanUp(a)},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5),function(a){var b=a.dom,c="wysihtml5-command-dialog-opened",d="input, select, textarea",e="[data-wysihtml5-dialog-field]",f="data-wysihtml5-dialog-field";a.toolbar.Dialog=a.lang.Dispatcher.extend({constructor:function(a,b){this.link=a,this.container=b},_observe:function(){if(!this._observed){var d=this,e=function(a){var b=d._serialize();d.fire("save",b),d.hide(),a.preventDefault(),a.stopPropagation()};b.observe(d.link,"click",function(){b.hasClass(d.link,c)&&setTimeout(function(){d.hide()},0)}),b.observe(this.container,"keydown",function(b){var c=b.keyCode;c===a.ENTER_KEY&&e(b),c===a.ESCAPE_KEY&&d.cancel()}),b.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",e),b.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(a){d.cancel(),a.preventDefault(),a.stopPropagation()}),this._observed=!0}},_serialize:function(){for(var a={},b=this.container.querySelectorAll(e),c=b.length,d=0;c>d;d++)a[b[d].getAttribute(f)]=b[d].value;return a},_interpolate:function(a){for(var b,c,d,g=document.querySelector(":focus"),h=this.container.querySelectorAll(e),i=h.length,j=0;i>j;j++)b=h[j],b!==g&&(a&&"hidden"===b.type||(c=b.getAttribute(f),d=this.elementToChange&&"boolean"!=typeof this.elementToChange?this.elementToChange.getAttribute(c)||"":b.defaultValue,b.value=d))},update:function(a){this.elementToChange=a?a:this.elementToChange,this._interpolate()},show:function(a){var e=this.container.querySelector(d);if(this._observe(),this.update(a),b.addClass(this.link,c),this.container.style.display="",this.isOpen=!0,this.fire("show"),e&&!a)try{e.focus()}catch(f){}},_hide:function(a){this.elementToChange=null,b.removeClass(this.link,c),this.container.style.display="none",this.isOpen=!1},hide:function(){this._hide(),this.fire("hide")},cancel:function(){this._hide(),this.fire("cancel")}})}(wysihtml5),function(a){var b=a.dom,c={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};a.toolbar.Speech=function(g,h){var i=document.createElement("input");if(!a.browser.supportsSpeechApiOn(i))return void(h.style.display="none");var j=g.editor.textarea.element.getAttribute("lang");j&&(f.lang=j);var k=document.createElement("div");a.lang.object(d).merge({width:h.offsetWidth+"px",height:h.offsetHeight+"px"}),b.insert(i).into(k),b.insert(k).into(h),b.setStyles(e).on(i),b.setAttributes(f).on(i),b.setStyles(d).on(k),b.setStyles(c).on(h);var l="onwebkitspeechchange"in i?"webkitspeechchange":"speechchange";b.observe(i,l,function(){g.execCommand("insertText",i.value),i.value=""}),b.observe(i,"click",function(a){b.hasClass(h,"wysihtml5-command-disabled")&&a.preventDefault(),a.stopPropagation()})}}(wysihtml5),function(a){function b(b,c){var d=b.commands.state(c.name,c.value);return!c.dialog.multiselect&&a.lang.object(d).isArray()&&(d=1===d.length?d[0]:!0),d}var c="wysihtml5-command-disabled",d="wysihtml5-commands-disabled",e="wysihtml5-command-active",f="wysihtml5-action-active",g=a.dom;a.toolbar.Toolbar=Base.extend({constructor:function(b,g,h){this.editor=b,this.container="string"==typeof g?document.getElementById(g):g,this.composer=b.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),h&&this.show(),null!=b.config.classNameCommandDisabled&&(c=b.config.classNameCommandDisabled),null!=b.config.classNameCommandsDisabled&&(d=b.config.classNameCommandsDisabled),null!=b.config.classNameCommandActive&&(e=b.config.classNameCommandActive),null!=b.config.classNameActionActive&&(f=b.config.classNameActionActive);for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),j=i.length,k=0;j>k;k++)new a.toolbar.Speech(this,i[k])},_getLinks:function(b){for(var c,d,e,f,g,h,i=this[b+"Links"]=a.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+b+"]")).get(),j=i.length,k=0,l=this[b+"Mapping"]={};j>k;k++)c=i[k],e=c.getAttribute("data-wysihtml5-"+b),f=c.getAttribute("data-wysihtml5-"+b+"-value"),h=c.getAttribute("data-wysihtml5-"+b+"-blank-value"),d=this.container.querySelector("[data-wysihtml5-"+b+"-group='"+e+"']"),g=this._getDialog(c,e),l[e+":"+f]={link:c,group:d,name:e,value:f,tracksBlankValue:h,dialog:g,state:!1}},_getDialog:function(b,c){var d,e,f=this,g=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']");return g&&(d=a.toolbar["Dialog_"+c]?new a.toolbar["Dialog_"+c](b,g):new a.toolbar.Dialog(b,g),d.on("show",function(){e=f.composer.selection.getBookmark(),f.editor.fire("show:dialog",{command:c,dialogContainer:g,commandLink:b})}),d.on("save",function(a){e&&f.composer.selection.setBookmark(e),f._execCommand(c,a),f.editor.fire("save:dialog",{command:c,dialogContainer:g,commandLink:b}),f._hideAllDialogs(),f._preventInstantFocus(),e=void 0}),d.on("cancel",function(){e&&f.composer.selection.setBookmark(e),f.editor.fire("cancel:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0,f._preventInstantFocus()}),d.on("hide",function(){f.editor.fire("hide:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0})),d},execCommand:function(a,b){this.commandsDisabled||this._execCommand(a,b)},_execCommand:function(a,b){this.editor.focus(!1),this.composer.commands.exec(a,b),this._updateLinkStates()},execAction:function(a){var b=this.editor;"change_view"===a&&(b.currentView===b.textarea||"source"===b.currentView?b.fire("change_view","composer"):b.fire("change_view","textarea")),"showSource"==a&&b.fire("showSource")},_observe:function(){for(var c=this,e=this.editor,f=this.container,h=this.commandLinks.concat(this.actionLinks),i=h.length,j=0;i>j;j++)"A"===h[j].nodeName?g.setAttributes({href:"javascript:;",unselectable:"on"}).on(h[j]):g.setAttributes({unselectable:"on"}).on(h[j]);g.delegate(f,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(a){a.preventDefault()}),g.delegate(f,"[data-wysihtml5-command]","click",function(a){var d,e=this,f=e.getAttribute("data-wysihtml5-command"),g=e.getAttribute("data-wysihtml5-command-value"),h=c.commandMapping[f+":"+g];g||!h.dialog?c.execCommand(f,g):(d=b(c.composer,h),h.dialog.show(d)),a.preventDefault()}),g.delegate(f,"[data-wysihtml5-action]","click",function(a){var b=this.getAttribute("data-wysihtml5-action");c.execAction(b),a.preventDefault()}),e.on("interaction:composer",function(a){c.preventFocus||c._updateLinkStates()}),this._ownerDocumentClick=function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},this.container.ownerDocument.addEventListener("click",this._ownerDocumentClick,!1),this.editor.on("destroy:composer",this.destroy.bind(this)),this.editor.config.handleTables&&(e.on("tableselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),e.on("tableunselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),e.on("change_view",function(a){setTimeout(function(){c.commandsDisabled="composer"!==a,c._updateLinkStates(),c.commandsDisabled?g.addClass(f,d):g.removeClass(f,d)},0)})},destroy:function(){this.container.ownerDocument.removeEventListener("click",this._ownerDocumentClick,!1)},_hideAllDialogs:function(){var a=this.commandMapping;for(var b in a)a[b].dialog&&a[b].dialog.hide()},_preventInstantFocus:function(){this.preventFocus=!0,setTimeout(function(){this.preventFocus=!1}.bind(this),0)},_updateLinkStates:function(){var a,d,h,i,j,k=this.commandMapping,l=this.composer,m=this.actionMapping;for(a in k)i=k[a],this.commandsDisabled?(d=!1,g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&i.dialog.hide()):(d=this.composer.commands.state(i.name,i.value),g.removeClass(i.link,c),i.group&&g.removeClass(i.group,c)),(i.state!==d||i.tracksBlankValue)&&(i.state=d,d?i.tracksBlankValue?g.removeClass(i.link,e):(g.addClass(i.link,e),i.group&&g.addClass(i.group,e),!i.dialog||"undefined"!=typeof i.value&&null!==i.value||(d&&"object"==typeof d?(d=b(l,i),i.state=d,j=i.dialog.container.dataset?i.dialog.container.dataset.showdialogonselection:!1,l.config.showToolbarDialogsOnSelection||j?i.dialog.show(d):i.dialog.update(d)):i.dialog.hide())):i.tracksBlankValue?g.addClass(i.link,e):(g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&!i.value&&i.dialog.hide()));for(a in m)h=m[a],"change_view"===h.name&&(h.state=this.editor.currentView===this.editor.textarea||"source"===this.editor.currentView,h.state?g.addClass(h.link,f):g.removeClass(h.link,f))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(a){a.toolbar.Dialog_createTable=a.toolbar.Dialog.extend({show:function(a){this.base(a)}})}(wysihtml5),function(a){var b="[data-wysihtml5-dialog-field]",c="data-wysihtml5-dialog-field";a.toolbar.Dialog_foreColorStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){for(var a={},d=this.container.querySelectorAll(b),e=d.length,f=0;e>f;f++)a[d[f].getAttribute(c)]=d[f].value;return a},_interpolate:function(d){for(var e,f,g=a.quirks.styleParser,h=document.querySelector(":focus"),i=this.container.querySelectorAll(b),j=i.length,k=0,l=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,m=l?l.getAttribute("style"):null,n=m?g.parseColor(m,"color"):null;j>k;k++)e=i[k],e!==h&&(d&&"hidden"===e.type||"color"===e.getAttribute(c)&&(f=(e.dataset.colormode||"rgb").toLowerCase(),f="hex"===f?"hash":f,n?e.value=g.unparseColor(n,f):e.value=g.unparseColor([0,0,0],f)))}})}(wysihtml5),function(a){a.dom;a.toolbar.Dialog_fontSizeStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){return{size:this.container.querySelector('[data-wysihtml5-dialog-field="size"]').value}},_interpolate:function(b){var c=document.querySelector(":focus"),d=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),e=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,f=e?e.getAttribute("style"):null,g=f?a.quirks.styleParser.parseFontSize(f):null;d&&d!==c&&g&&!/^\s*$/.test(g)&&(d.value=g)}})}(wysihtml5); //# sourceMappingURL=wysihtml-toolbar.min.map \ No newline at end of file diff --git a/dist/wysihtml-toolbar.min.map b/dist/wysihtml-toolbar.min.map index 39c841f..1d2f708 100644 --- a/dist/wysihtml-toolbar.min.map +++ b/dist/wysihtml-toolbar.min.map @@ -1 +1 @@ -{"version":3,"file":"wysihtml-toolbar.min.js","sources":["wysihtml-toolbar.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","nodes","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","deleteRangeContents","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","similarOuterBlock","splitAllBlocks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml","CLASS_NAME_OPENED","SELECTOR_FORM_ELEMENTS","SELECTOR_FIELDS","ATTRIBUTE_FIELDS","Dialog","_observed","callbackWrapper","_serialize","cancel","fields","_interpolate","avoidHiddenFields","field","fieldName","focusedElement","elementToChange","defaultValue","update","firstField","isOpen","_hide","linkStyles","wrapperStyles","margin","opacity","padding","inputStyles","cursor","marginTop","outline","inputAttributes","x-webkit-speech","speech","Speech","getCommandState","dialog","multiselect","CLASS_NAME_COMMAND_DISABLED","CLASS_NAME_COMMANDS_DISABLED","CLASS_NAME_COMMAND_ACTIVE","CLASS_NAME_ACTION_ACTIVE","showOnInit","_getLinks","classNameCommandDisabled","classNameCommandsDisabled","classNameCommandActive","classNameActionActive","speechInputLinks","group","tracksBlankValue","_getDialog","caretBookmark","dialogElement","dialogContainer","commandLink","_execCommand","_hideAllDialogs","_preventInstantFocus","commandsDisabled","_updateLinkStates","execAction","commandLinks","actionLinks","unselectable","commandObj","commandMapping","preventFocus","_ownerDocumentClick","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBnB,WAAUoB,UAAY,SAASC,EAAKC,GAQ9BC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAAQ,mBACRC,EAAQ,qBACRR,GAAIO,KACRR,EAAIU,QAAQP,UAAWK,GAAUR,EAAKQ,GAAUP,EAAKO,GAAU,SAAUG,EAAIC,EAAIC,GAC/E,OAAQA,EAAOP,MAAMQ,YA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SAAUA,GACqBA,EAAUG,GAIxCH,GAAUK,QAAQg7E,qBAAuBr7E,EAAUK,QAAQq2E,OAAO1kE,QAChE0mE,aAAa,EAEb7B,WAAY,WACV,OAAQhY,KAASl9D,KAAKkc,UAAUkpB,cAAc,wCAAwCvS,QAGxFwiD,aAAc,SAASC,GACrB,GAAIG,GAAiB5xE,SAASuhC,cAAc,UACxCmwC,EAAiBv1E,KAAKkc,UAAUkpB,cAAc,wCAC9Ck0C,EAAkBt5E,KAAoB,gBAAM3B,EAAUM,KAAKglC,OAAO3jC,KAAK01E,iBAAiB5zE,UAAa9B,KAAK01E,gBAAgB,GAAK11E,KAAK01E,gBAAmB,KACvJzqB,EAAiB,EAAiBquB,EAAajzE,aAAa,SAAW,KACvE62D,EAAiB,EAAa7+D,EAAUI,OAAOsvD,YAAYU,cAAcxD,GAAY,IAErFsqB,IAASA,IAAUE,GAAkBvY,IAAS,QAAUj3D,KAAKi3D,KAC/DqY,EAAM1iD,MAAQqqC,OAInB7+D"} \ No newline at end of file +{"version":3,"file":"wysihtml-toolbar.min.js","sources":["wysihtml-toolbar.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","nodes","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","handleDeleteKeyPress","handleEnterKeyPress","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml","CLASS_NAME_OPENED","SELECTOR_FORM_ELEMENTS","SELECTOR_FIELDS","ATTRIBUTE_FIELDS","Dialog","_observed","callbackWrapper","_serialize","cancel","fields","_interpolate","avoidHiddenFields","field","fieldName","focusedElement","elementToChange","defaultValue","update","firstField","isOpen","_hide","linkStyles","wrapperStyles","margin","opacity","padding","inputStyles","cursor","marginTop","outline","inputAttributes","x-webkit-speech","speech","Speech","getCommandState","dialog","multiselect","CLASS_NAME_COMMAND_DISABLED","CLASS_NAME_COMMANDS_DISABLED","CLASS_NAME_COMMAND_ACTIVE","CLASS_NAME_ACTION_ACTIVE","showOnInit","_getLinks","classNameCommandDisabled","classNameCommandsDisabled","classNameCommandActive","classNameActionActive","speechInputLinks","group","tracksBlankValue","_getDialog","caretBookmark","dialogElement","dialogContainer","commandLink","_execCommand","_hideAllDialogs","_preventInstantFocus","commandsDisabled","_updateLinkStates","execAction","commandLinks","actionLinks","unselectable","commandObj","commandMapping","preventFocus","_ownerDocumentClick","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBpB,WAAUqB,UAAY,SAASC,EAAKC,GAkenC,QAASC,KACP,IACE,GAAIC,GAAI,GAAIC,aAAY,OAAQC,QAASC,IAAK,QAC9C,OAAQ,QAAUH,EAAEI,MAAQ,QAAUJ,EAAEE,OAAOC,IAC/C,MAAOE,IACT,OAAO,EA/dJC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAA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AIxCH,GAAUK,QAAQ08E,qBAAuB/8E,EAAUK,QAAQ+3E,OAAOrlE,QAChEqnE,aAAa,EAEb7B,WAAY,WACV,OAAQxY,KAAS59D,KAAKwc,UAAUipB,cAAc,wCAAwCvS,QAGxFqjD,aAAc,SAASC,GACrB,GAAIG,GAAiB/yE,SAAS6hC,cAAc,UACxCgxC,EAAiBz2E,KAAKwc,UAAUipB,cAAc,wCAC9C+0C,EAAkBx6E,KAAoB,gBAAMnC,EAAUM,KAAK6lC,OAAOhkC,KAAK42E,iBAAiB/0E,UAAa7B,KAAK42E,gBAAgB,GAAK52E,KAAK42E,gBAAmB,KACvJhrB,EAAiB,EAAiB4uB,EAAar0E,aAAa,SAAW,KACvEy3D,EAAiB,EAAa//D,EAAUI,OAAOywD,YAAYU,cAAcxD,GAAY,IAErF6qB,IAASA,IAAUE,GAAkB/Y,IAAS,QAAU73D,KAAK63D,KAC/D6Y,EAAMvjD,MAAQ0qC,OAInB//D"} \ No newline at end of file diff --git a/dist/wysihtml.js b/dist/wysihtml.js index b7a5ec0..0349ffe 100644 --- a/dist/wysihtml.js +++ b/dist/wysihtml.js @@ -1,5 +1,5 @@ /** - * @license wysihtml v0.5.2 + * @license wysihtml v0.5.3 * https://github.com/Voog/wysihtml * * Author: Christopher Blum (https://github.com/tiff) @@ -10,7 +10,7 @@ * */ var wysihtml5 = { - version: "0.5.2", + version: "0.5.3", // namespaces commands: {}, @@ -24,6 +24,8 @@ var wysihtml5 = { INVISIBLE_SPACE: "\uFEFF", INVISIBLE_SPACE_REG_EXP: /\uFEFF/g, + VOID_ELEMENTS: "area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr", + EMPTY_FUNCTION: function() {}, ELEMENT_NODE: 1, @@ -421,7 +423,19 @@ var wysihtml5 = { return all; }; + var isInDom = function(node) { + var doc = node.ownerDocument, + n = node; + do { + if (n === doc) { + return true; + } + n = n.parentNode; + } while(n); + + return false; + }; var normalizeFix = function() { var f = Node.prototype.normalize; @@ -482,7 +496,7 @@ var wysihtml5 = { aoffset = Array.prototype.indexOf.call(aelement.parentNode.childNodes, aelement); } - if (anode && anode.parentNode && fnode && fnode.parentNode) { + if (isInDom(this) && anode && anode.parentNode && fnode && fnode.parentNode) { r.setStart(anode, aoffset); r.setEnd(fnode, foffset); s.removeAllRanges(); @@ -504,6 +518,31 @@ var wysihtml5 = { } else { F(); } + + // CustomEvent for ie9 and up + function nativeCustomEventSupported() { + try { + var p = new CustomEvent('cat', {detail: {foo: 'bar'}}); + return 'cat' === p.type && 'bar' === p.detail.foo; + } catch (e) {} + return false; + } + var customEventSupported = nativeCustomEventSupported(); + + // Polyfills CustomEvent object for IE9 and up + (function() { + if (!customEventSupported && "CustomEvent" in window) { + function CustomEvent(event, params) { + params = params || {bubbles: false, cancelable: false, detail: undefined}; + var evt = doc.createEvent('CustomEvent'); + evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); + return evt; + } + CustomEvent.prototype = win.Event.prototype; + win.CustomEvent = CustomEvent; + customEventSupported = true; + } + })(); }; wysihtml5.polyfills(window, document); @@ -6677,10 +6716,11 @@ wysihtml5.browser = (function() { var userAgent = navigator.userAgent, testElement = document.createElement("div"), // Browser sniffing is unfortunately needed since some behaviors are impossible to feature detect - isGecko = userAgent.indexOf("Gecko") !== -1 && userAgent.indexOf("KHTML") === -1, - isWebKit = userAgent.indexOf("AppleWebKit/") !== -1, - isChrome = userAgent.indexOf("Chrome/") !== -1, - isOpera = userAgent.indexOf("Opera/") !== -1; + // We need to be extra careful about Microsoft as it shows increasing tendency of tainting its userAgent strings with false feathers + isGecko = userAgent.indexOf("Gecko") !== -1 && userAgent.indexOf("KHTML") === -1 && !isIE(), + isWebKit = userAgent.indexOf("AppleWebKit/") !== -1 && !isIE(), + isChrome = userAgent.indexOf("Chrome/") !== -1 && !isIE(), + isOpera = userAgent.indexOf("Opera/") !== -1 && !isIE(); function iosVersion(userAgent) { return +((/ipad|iphone|ipod/.test(userAgent) && userAgent.match(/ os (\d+).+? like mac os x/)) || [undefined, 0])[1]; @@ -6850,14 +6890,15 @@ wysihtml5.browser = (function() { */ supportsCommand: (function() { // Following commands are supported but contain bugs in some browsers + // TODO: investigate if some of these bugs can be tested without altering selection on page, instead of targeting browsers and versions directly var buggyCommands = { // formatBlock fails with some tags (eg.
) "formatBlock": isIE(10, "<="), // When inserting unordered or ordered lists in Firefox, Chrome or Safari, the current selection or line gets // converted into a list (
  • ...
,
  1. ...
) // IE and Opera act a bit different here as they convert the entire content of the current block element into a list - "insertUnorderedList": isIE(9, ">=") || isIE(12, "<="), - "insertOrderedList": isIE(9, ">=")|| isIE(12, "<=") + "insertUnorderedList": isIE(), + "insertOrderedList": isIE() }; // Firefox throws errors for queryCommandSupported, so we have to build up our own object of supported commands @@ -7014,6 +7055,11 @@ wysihtml5.browser = (function() { return isIE(); }, + /* In IE when deleting with caret at the begining of LI, List get broken into half instead of merging the LI with previous */ + hasLiDeletingProblem: function() { + return isIE(); + }, + hasUndoInContextMenu: function() { return isGecko || isChrome || isOpera; }, @@ -7047,6 +7093,12 @@ wysihtml5.browser = (function() { return isWebKit; }, + // In all webkit browsers there are some places where caret can not be placed at the end of blocks and directly before block level element + // when startContainer is element. + hasCaretBlockElementIssue: function() { + return isWebKit; + }, + supportsMutationEvents: function() { return ("MutationEvent" in window); }, @@ -7911,6 +7963,20 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) { } } return isVisible; + }, + lineBreak: function() { + return node && node.nodeType === 1 && node.nodeName === "BR"; + }, + block: function() { + return node && node.nodeType === 1 && node.ownerDocument.defaultView.getComputedStyle(node).display === "block"; + }, + // Void elements are elemens that can not have content + // In most cases browsers should solve the cases for you when you try to insert content into those, + // but IE does not and it is not nice to do so anyway. + voidElement: function() { + return wysihtml5.dom.domNode(node).test({ + query: wysihtml5.VOID_ELEMENTS + }); } }, @@ -8068,6 +8134,29 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) { } }, + transferContentTo: function(targetNode, removeOldWrapper) { + if (node.nodeType === 1) { + if (wysihtml5.dom.domNode(targetNode).is.voidElement()) { + while (node.firstChild) { + targetNode.parentNode.insertBefore(node.lastChild, targetNode.nextSibling); + } + } else { + while (node.firstChild) { + targetNode.appendChild(node.firstChild); + } + } + if (removeOldWrapper) { + node.parentNode.removeChild(node); + } + } else if (node.nodeType === 3 || node.nodeType === 8){ + if (wysihtml5.dom.domNode(targetNode).is.voidElement()) { + targetNode.parentNode.insertBefore(node, targetNode.nextSibling); + } else { + targetNode.appendChild(node); + } + } + }, + /* Tests a node against properties, and returns true if matches. Tests on principle that all properties defined must have at least one match. @@ -9541,17 +9630,10 @@ wysihtml5.dom.replaceWithChildNodes = function(node) { return; } - if (!node.firstChild) { - node.parentNode.removeChild(node); - return; - } - - var fragment = node.ownerDocument.createDocumentFragment(); while (node.firstChild) { - fragment.appendChild(node.firstChild); + node.parentNode.insertBefore(node.firstChild, node); } - node.parentNode.replaceChild(fragment, node); - node = fragment = null; + node.parentNode.removeChild(node); }; ;/** * Unwraps an unordered/ordered list @@ -12096,6 +12178,43 @@ wysihtml5.quirks.ensureProperClearing = (function() { return (ret !== this.contain) ? ret : false; }, + // Gather info about caret location (caret node, previous and next node) + getNodesNearCaret: function() { + if (!this.isCollapsed()) { + throw "Selection must be caret when using selection.getNodesNearCaret()"; + } + + var r = this.getOwnRanges(), + caretNode, prevNode, nextNode, offset; + + if (r && r.length > 0) { + if (r[0].startContainer.nodeType === 1) { + caretNode = r[0].startContainer.childNodes[r[0].startOffset - 1]; + if (!caretNode && r[0].startOffset === 0) { + // Is first position before all nodes + nextNode = r[0].startContainer.childNodes[0]; + } else if (caretNode) { + prevNode = caretNode.previousSibling; + nextNode = caretNode.nextSibling; + } + } else { + caretNode = r[0].startContainer; + prevNode = caretNode.previousSibling; + nextNode = caretNode.nextSibling; + offset = r[0].startOffset; + } + + return { + "caretNode": caretNode, + "prevNode": prevNode, + "nextNode": nextNode, + "textOffset": offset + }; + } + + return null; + }, + getSelectionParentsByTag: function(tagName) { var nodes = this.getSelectedOwnNodes(), curEl, parents = []; @@ -12167,6 +12286,11 @@ wysihtml5.quirks.ensureProperClearing = (function() { startOffset = (sel.isBackwards()) ? sel.focusOffset : sel.anchorOffset, rng = this.createRange(), endNode, inTmpCaret; + // If start is textnode and all is whitespace before caret. Set start offset to 0 + if (startNode && startNode.nodeType === 3 && (/^\s*$/).test(startNode.data.slice(0, startOffset))) { + startOffset = 0; + } + // Escape temproray helper nodes if selection in them inTmpCaret = wysihtml5.dom.getParentElement(startNode, { query: '._wysihtml5-temp-caret-fix' }, 1); if (inTmpCaret) { @@ -12486,43 +12610,6 @@ wysihtml5.quirks.ensureProperClearing = (function() { return nodes; }, - deblockAndSurround: function(nodeOptions) { - var tempElement = this.doc.createElement('div'), - range = rangy.createRange(this.doc), - tempDivElements, - tempElements, - firstChild; - - tempElement.className = nodeOptions.className; - - this.composer.commands.exec("formatBlock", nodeOptions); - tempDivElements = this.contain.querySelectorAll("." + nodeOptions.className); - if (tempDivElements[0]) { - tempDivElements[0].parentNode.insertBefore(tempElement, tempDivElements[0]); - - range.setStartBefore(tempDivElements[0]); - range.setEndAfter(tempDivElements[tempDivElements.length - 1]); - tempElements = range.extractContents(); - - while (tempElements.firstChild) { - firstChild = tempElements.firstChild; - if (firstChild.nodeType == 1 && wysihtml5.dom.hasClass(firstChild, nodeOptions.className)) { - while (firstChild.firstChild) { - tempElement.appendChild(firstChild.firstChild); - } - if (firstChild.nodeName !== "BR") { tempElement.appendChild(this.doc.createElement('br')); } - tempElements.removeChild(firstChild); - } else { - tempElement.appendChild(firstChild); - } - } - } else { - tempElement = null; - } - - return tempElement; - }, - /** * Scroll the current caret position into the view * FIXME: This is a bit hacky, there might be a smarter way of doing this @@ -14500,20 +14587,55 @@ wysihtml5.Commands = Base.extend( } } + var isWhitespaceBefore = function (textNode, offset) { + var str = textNode.data ? textNode.data.slice(0, offset) : ""; + return (/^\s*$/).test(str); + } + + var isWhitespaceAfter = function (textNode, offset) { + var str = textNode.data ? textNode.data.slice(offset) : ""; + return (/^\s*$/).test(str); + } + + var trimBlankTextsAndBreaks = function(fragment) { + if (fragment) { + while (fragment.firstChild && fragment.firstChild.nodeType === 3 && (/^\s*$/).test(fragment.firstChild.data) && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.firstChild); + } + + while (fragment.lastChild && fragment.lastChild.nodeType === 3 && (/^\s*$/).test(fragment.lastChild.data) && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.lastChild); + } + + if (fragment.firstChild && fragment.firstChild.nodeType === 1 && fragment.firstChild.nodeName === "BR" && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.firstChild); + } + + if (fragment.lastChild && fragment.lastChild.nodeType === 1 && fragment.lastChild.nodeName === "BR" && fragment.lastChild !== fragment.firstChild) { + fragment.removeChild(fragment.lastChild); + } + } + } + // Wrap the range with a block level element // If element is one of unnestable block elements (ex: h2 inside h1), split nodes and insert between so nesting does not occur function wrapRangeWithElement(range, options, closestBlockName, composer) { var similarOptions = options ? correctOptionsForSimilarityCheck(options) : null, r = range.cloneRange(), rangeStartContainer = r.startContainer, - prevNode = wysihtml5.dom.domNode(getRangeNode(r.startContainer, r.startOffset)).prev({nodeTypes: [1,3], ignoreBlankTexts: true}), - nextNode = wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}), + startNode = getRangeNode(r.startContainer, r.startOffset), + endNode = getRangeNode(r.endContainer, r.endOffset), + prevNode = (r.startContainer === startNode && startNode.nodeType === 3 && !isWhitespaceBefore(startNode, r.startOffset)) ? startNode : wysihtml5.dom.domNode(startNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}), + nextNode = ((r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] === endNode) || (r.endContainer === endNode && endNode.nodeType === 3 && !isWhitespaceAfter(endNode, r.endOffset))) ? endNode : wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}), content = r.extractContents(), fragment = composer.doc.createDocumentFragment(), similarOuterBlock = similarOptions ? wysihtml5.dom.getParentElement(rangeStartContainer, similarOptions, null, composer.element) : null, splitAllBlocks = !closestBlockName || !options || (options.nodeName === "BLOCKQUOTE" && closestBlockName === "BLOCKQUOTE"), firstOuterBlock = similarOuterBlock || findOuterBlock(rangeStartContainer, composer.element, splitAllBlocks), // The outermost un-nestable block element parent of selection start - wrapper, blocks, children; + wrapper, blocks, children, + firstc, lastC; + + trimBlankTextsAndBreaks(content); if (options && options.nodeName === "BLOCKQUOTE") { @@ -14641,6 +14763,29 @@ wysihtml5.Commands = Base.extend( return options; } + function caretIsOnEmptyLine(composer) { + var caretInfo; + if (composer.selection.isCollapsed()) { + caretInfo = composer.selection.getNodesNearCaret(); + if (caretInfo && caretInfo.caretNode) { + if ( + // caret is allready breaknode + wysihtml5.dom.domNode(caretInfo.caretNode).is.lineBreak() || + // caret is textnode + (caretInfo.caretNode.nodeType === 3 && caretInfo.textOffset === 0 && (!caretInfo.prevNode || wysihtml5.dom.domNode(caretInfo.prevNode).is.lineBreak())) || + // Caret is temprorary rangy selection marker + (caretInfo.caretNode.nodeType === 1 && caretInfo.caretNode.classList.contains('rangySelectionBoundary') && + (!caretInfo.prevNode || wysihtml5.dom.domNode(caretInfo.prevNode).is.lineBreak() || wysihtml5.dom.domNode(caretInfo.prevNode).is.block()) && + (!caretInfo.nextNode || wysihtml5.dom.domNode(caretInfo.nextNode).is.lineBreak() || wysihtml5.dom.domNode(caretInfo.nextNode).is.block()) + ) + ) { + return true; + } + } + } + return false; + } + wysihtml5.commands.formatBlock = { exec: function(composer, command, options) { options = parseOptions(options); @@ -14663,7 +14808,11 @@ wysihtml5.Commands = Base.extend( // If selection is caret expand it to cover nearest suitable block element or row if none found if (composer.selection.isCollapsed()) { bookmark = rangy.saveSelection(composer.win); - expandCaretToBlock(composer, options && options.nodeName ? options.nodeName.toUpperCase() : undefined); + if (caretIsOnEmptyLine(composer)) { + composer.selection.selectLine(); + } else { + expandCaretToBlock(composer, options && options.nodeName ? options.nodeName.toUpperCase() : undefined); + } } if (options) { newBlockElements = formatSelection("apply", composer, options); @@ -15719,20 +15868,19 @@ wysihtml5.Commands = Base.extend( }; var createListFallback = function(nodeName, composer) { - var sel; - - if (!composer.selection.isCollapsed()) { - sel = rangy.saveSelection(composer.win); - } + var sel = rangy.saveSelection(composer.win); // Fallback for Create list var tempClassName = "_wysihtml5-temp-" + new Date().getTime(), - tempElement = composer.selection.deblockAndSurround({ - "nodeName": "div", - "className": tempClassName - }), isEmpty, list; + composer.commands.exec("formatBlock", { + "nodeName": "div", + "className": tempClassName + }); + + var tempElement = composer.element.querySelector("." + tempClassName); + // This space causes new lists to never break on enter var INVISIBLE_SPACE_REG_EXP = /\uFEFF/g; tempElement.innerHTML = tempElement.innerHTML.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP, ""); @@ -16946,8 +17094,11 @@ wysihtml5.views.View = Base.extend( function adjust(selectedNode) { var parentElement = dom.getParentElement(selectedNode, { query: "p, div" }, 2); if (parentElement && dom.contains(that.element, parentElement)) { - that.selection.executeAndRestore(function() { + that.selection.executeAndRestoreRangy(function() { if (that.config.useLineBreaks) { + if (!parentElement.firstChild || (parentElement.firstChild === parentElement.lastChild && parentElement.firstChild.nodeType === 1 && parentElement.firstChild.classList.contains('rangySelectionBoundary'))) { + parentElement.appendChild(that.doc.createElement('br')); + } dom.replaceWithChildNodes(parentElement); } else if (parentElement.nodeName !== "P") { dom.renameElement(parentElement, "p"); @@ -16956,18 +17107,21 @@ wysihtml5.views.View = Base.extend( } } + // Ensures when editor is empty and not line breaks mode, the inital state has a paragraph in it on focus with caret inside paragraph if (!this.config.useLineBreaks) { - dom.observe(this.element, ["focus", "keydown"], function() { + dom.observe(this.element, ["focus"], function() { if (that.isEmpty()) { - var paragraph = that.doc.createElement("P"); - that.element.innerHTML = ""; - that.element.appendChild(paragraph); - if (!browser.displaysCaretInEmptyContentEditableCorrectly()) { - paragraph.innerHTML = "
"; - that.selection.setBefore(paragraph.firstChild); - } else { - that.selection.selectNode(paragraph, true); - } + setTimeout(function() { + var paragraph = that.doc.createElement("P"); + that.element.innerHTML = ""; + that.element.appendChild(paragraph); + if (!browser.displaysCaretInEmptyContentEditableCorrectly()) { + paragraph.innerHTML = "
"; + that.selection.setBefore(paragraph.firstChild); + } else { + that.selection.selectNode(paragraph, true); + } + }, 0); } }); } @@ -16975,7 +17129,7 @@ wysihtml5.views.View = Base.extend( dom.observe(this.element, "keydown", function(event) { var keyCode = event.keyCode; - if (event.shiftKey) { + if (event.shiftKey || event.ctrlKey || event.defaultPrevented) { return; } @@ -17007,11 +17161,9 @@ wysihtml5.views.View = Base.extend( }, 0); return; } - if (that.config.useLineBreaks && keyCode === wysihtml5.ENTER_KEY && !wysihtml5.browser.insertsLineBreaksOnReturn()) { event.preventDefault(); that.commands.exec("insertLineBreak"); - } }); } @@ -17228,6 +17380,7 @@ wysihtml5.views.View = Base.extend( */ (function(wysihtml5) { var dom = wysihtml5.dom, + domNode = dom.domNode, browser = wysihtml5.browser, /** * Map keyCodes to query commands @@ -17278,7 +17431,7 @@ wysihtml5.views.View = Base.extend( return true; } try { - var ev = new CustomEvent("wysihtml5:uneditable:delete"); + var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false}); before.node.dispatchEvent(ev); } catch (err) {} before.node.parentNode.removeChild(before.node); @@ -17287,16 +17440,19 @@ wysihtml5.views.View = Base.extend( return false; }; - // Deletion with caret in the beginning of headings needs special attention - // Heading does not concate text to previous block node correctly (browsers do unexpected miracles here especially webkit) - var fixDeleteInTheBeginnigOfHeading = function(composer) { + // Deletion with caret in the beginning of headings and other block elvel elements needs special attention + // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit) + var fixDeleteInTheBeginningOfBlock = function(composer) { var selection = composer.selection, prevNode = selection.getPreviousNode(); if (selection.caretIsFirstInSelection() && prevNode && prevNode.nodeType === 1 && - (/block/).test(composer.win.getComputedStyle(prevNode).display) + (/block/).test(composer.win.getComputedStyle(prevNode).display) && + !domNode(prevNode).test({ + query: "ol, ul, table, tr, dl" + }) ) { if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) { // If heading is empty remove the heading node @@ -17306,42 +17462,83 @@ wysihtml5.views.View = Base.extend( if (prevNode.lastChild) { var selNode = prevNode.lastChild, selectedNode = selection.getSelectedNode(), - commonAncestorNode = wysihtml5.dom.domNode(prevNode).commonAncestor(selectedNode, composer.element); - curNode = commonAncestorNode ? wysihtml5.dom.getParentElement(selectedNode, { + commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element); + curNode = selectedNode.nodeType === 3 ? selectedNode : wysihtml5.dom.getParentElement(selectedNode, { query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote" - }, false, commonAncestorNode) : null; - - if (curNode) { - while (curNode.firstChild) { - prevNode.appendChild(curNode.firstChild); + }, false, commonAncestorNode || composer.element); + + if (curNode) { + domNode(curNode).transferContentTo(prevNode, true); + selection.setAfter(selNode); + return true; + } + } + } + } + return false; + }; + + /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */ + /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */ + var fixDeleteInTheBeginningOfLi = function(composer) { + if (wysihtml5.browser.hasLiDeletingProblem()) { + var selection = composer.selection.getSelection(), + aNode = selection.anchorNode, + listNode, prevNode, firstNode, + isInBeginnig = composer.selection.caretIsFirstInSelection(); + + // Fix caret at the beginnig of first textNode in LI + if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) { + aNode = aNode.parentNode; + isInBeginnig = true; + } + + if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") { + prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}); + if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) { + prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}); + } + if (prevNode) { + firstNode = aNode.firstChild; + domNode(aNode).transferContentTo(prevNode, true); + if (firstNode) { + composer.selection.setBefore(firstNode); + } else if (prevNode) { + if (prevNode.nodeType === 1) { + if (prevNode.lastChild) { + composer.selection.setAfter(prevNode.lastChild); + } else { + composer.selection.selectNode(prevNode); } - selection.setAfter(selNode); - return true; - } else if (selectedNode.nodeType === 3) { - prevNode.appendChild(selectedNode); - selection.setAfter(selNode); - return true; + } else { + composer.selection.setAfter(prevNode); } + } + return true; } } } return false; - }; + } var handleDeleteKeyPress = function(event, composer) { var selection = composer.selection, element = composer.element; if (selection.isCollapsed()) { - if (fixDeleteInTheBeginnigOfHeading(composer)) { + if (handleUneditableDeletion(composer)) { event.preventDefault(); return; } - if (fixLastBrDeletionInTable(composer)) { + if (fixDeleteInTheBeginningOfLi(composer)) { event.preventDefault(); return; } - if (handleUneditableDeletion(composer)) { + if (fixDeleteInTheBeginningOfBlock(composer)) { + event.preventDefault(); + return; + } + if (fixLastBrDeletionInTable(composer)) { event.preventDefault(); return; } @@ -17353,6 +17550,72 @@ wysihtml5.views.View = Base.extend( } }; + var handleEnterKeyPress = function(event, composer) { + if (composer.config.useLineBreaks && !event.shiftKey && !event.ctrlKey) { + // Fixes some misbehaviours of enters in linebreaks mode (natively a bit unsupported feature) + + var breakNodes = "p, pre, div, blockquote", + caretInfo, parent, txtNode; + + if (composer.selection.isCollapsed()) { + caretInfo = composer.selection.getNodesNearCaret(); + if (caretInfo) { + + if (caretInfo.caretNode || caretInfo.nextNode) { + parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2); + if (parent === composer.element) { + parent = undefined; + } + } + + if (parent && caretInfo.caretNode) { + if (domNode(caretInfo.caretNode).is.lineBreak()) { + + if (composer.config.doubleLineBreakEscapesBlock) { + // Double enter (enter on blank line) exits block element in useLineBreaks mode. + event.preventDefault(); + caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode); + + // Ensure surplous line breaks are not added to preceding element + if (domNode(caretInfo.nextNode).is.lineBreak()) { + caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode); + } + + var brNode = composer.doc.createElement('br'); + if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) { + parent.parentNode.insertBefore(brNode, parent.nextSibling); + } else { + composer.selection.splitElementAtCaret(parent, brNode); + } + + // Ensure surplous blank lines are not added to preceding element + if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) { + // Replaces blank lines at the beginning of textnode + caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, ''); + } + composer.selection.setBefore(brNode); + } + + } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) { + + // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens. + // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br + event.preventDefault(); + var br1 = composer.doc.createElement('br'), + br2 = composer.doc.createElement('br'), + f = composer.doc.createDocumentFragment(); + f.appendChild(br1); + f.appendChild(br2); + composer.selection.insertNode(f); + composer.selection.setBefore(br2); + + } + } + } + } + } + }; + var handleTabKeyDown = function(composer, element, shiftKey) { if (!composer.selection.isCollapsed()) { composer.selection.deleteContents(); @@ -17448,26 +17711,6 @@ wysihtml5.views.View = Base.extend( } }; - // TODO: mouseover is not actually a foolproof and obvious place for this, must be changed as it modifies dom on random basis - // Shows url in tooltip when hovering links or images - var handleMouseOver = function(event) { - var titlePrefixes = { - IMG: "Image: ", - A: "Link: " - }, - target = event.target, - nodeName = target.nodeName, - title; - - if (nodeName !== "A" && nodeName !== "IMG") { - return; - } - if(!target.hasAttribute("title")){ - title = titlePrefixes[nodeName] + (target.getAttribute("href") || target.getAttribute("src")); - target.setAttribute("title", title); - } - }; - var handleClick = function(event) { if (this.config.classNames.uneditableContainer) { // If uneditables is configured, makes clicking on uneditable move caret after clicked element (so it can be deleted like text) @@ -17534,6 +17777,10 @@ wysihtml5.views.View = Base.extend( handleTabKeyDown(this, this.element, event.shiftKey); } + if (keyCode === wysihtml5.ENTER_KEY) { + handleEnterKeyPress(event, this); + } + }; var handleIframeFocus = function(event) { @@ -17610,7 +17857,6 @@ wysihtml5.views.View = Base.extend( addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false); this.element.addEventListener("copy", handleCopy.bind(this), false); this.element.addEventListener("mousedown", handleMouseDown.bind(this), false); - this.element.addEventListener("mouseover", handleMouseOver.bind(this), false); this.element.addEventListener("click", handleClick.bind(this), false); this.element.addEventListener("drop", handleDrop.bind(this), false); this.element.addEventListener("keyup", handleKeyUp.bind(this), false); @@ -17906,6 +18152,9 @@ wysihtml5.views.View = Base.extend( parser: wysihtml5.dom.parse, // By default wysihtml5 will insert a
for line breaks, set this to false to use

useLineBreaks: true, + // Double enter (enter on blank line) exits block element in useLineBreaks mode. + // It enables a way of escaping out of block elements and splitting block elements + doubleLineBreakEscapesBlock: true, // Array (or single string) of stylesheet urls to be loaded in the editor's iframe stylesheets: [], // Placeholder text to use, defaults to the placeholder attribute on the textarea element diff --git a/dist/wysihtml.min.js b/dist/wysihtml.min.js index e6fa2eb..b00a756 100644 --- a/dist/wysihtml.min.js +++ b/dist/wysihtml.min.js @@ -1,11 +1,11 @@ -/*! wysihtml - v0.5.2 (2015-11-10) */ +/*! wysihtml - v0.5.3 (2015-12-09) */ -var wysihtml5={version:"0.5.2",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[e]:void 0,g=b.focusNode,h=b.focusOffset,i=g&&1===g.nodeType&&h>0?g.childNodes[h-1]:void 0,j=this.ownerDocument.createRange(),k=a.shift(),l=k?a.shift():null;for(i&&3===i.nodeType&&(g=i,h=i.nodeValue.length,i=void 0),f&&3===f.nodeType&&(c=f,e=0,f=void 0),(c===g&&e>h||c!==g&&c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINS))&&(g=[c,c=g][0],h=[e,e=h][0]);k&&l;)l.previousSibling&&l.previousSibling===k?(c===l&&(c=k,e=k.nodeValue.length+e),g===l&&(g=k,h=k.nodeValue.length+h),k.nodeValue=k.nodeValue+l.nodeValue,l.parentNode.removeChild(l),l=a.shift()):(k=l,l=a.shift());i&&(h=Array.prototype.indexOf.call(i.parentNode.childNodes,i)+1),f&&(e=Array.prototype.indexOf.call(f.parentNode.childNodes,f)),c&&c.parentNode&&g&&g.parentNode&&(j.setStart(c,e),j.setEnd(g,h),b.removeAllRanges(),b.addRange(j))});Node.prototype.normalize=a},f=function(){window.removeEventListener("load",f),"Node"in window&&"normalize"in Node.prototype&&c()&&e()};"complete"!==b.readyState?window.addEventListener("load",f):f()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a); -},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

1

",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

1

",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){ -if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c(12,">")},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="
foo
";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">=")||c(12,"<="),insertOrderedList:c(9,">=")||c(12,"<=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="

",b=c.innerHTML.toLowerCase(),a="

"===b||"

"===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":"  "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi,"  ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)), -g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||"

"===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p)if(a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},destroy:function(){},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d,!1),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)), -this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return wysihtml5.browser.supportsModernPaste()&&a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("

 

"==b||"

 

 

"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),this.setAfter(b))}},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(D),g=b.config.classNames.uneditableContainer+[""].concat(D.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?D:C)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(E)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=B.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=B.renameElement(b,i(d)):(B.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(D)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(D)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=a.dom.domNode(c(m.startContainer,m.startOffset)).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),s=a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),u=m.extractContents(),v=g.doc.createDocumentFragment(),w=k?a.dom.getParentElement(o,k,null,g.element):null,x=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,y=w||j(o,g.element,x);if(e&&"BLOCKQUOTE"===e.nodeName){var z=l(null,e,g);z.appendChild(u),v.appendChild(z),i=[z]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(D))l(u.firstChild,e,g),u.firstChild.matches(C)&&n(u.firstChild),v.appendChild(u.firstChild);else{for(h=l(null,q(e,f,g),g);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(D));)1==u.firstChild.nodeType&&h.matches(C)&&n(u.firstChild),h.appendChild(u.firstChild);v.appendChild(h)}else v.appendChild(l(null,e,g));i=a.lang.array(v.childNodes).get()}return r(v,m,g,y),t(p,s,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:D},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:C+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}var B=a.dom,C="h1, h2, h3, h4, h5, h6, p, pre",D="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",E="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:D})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=B.getParentElement(g[h],d||{query:D},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),e.classList.add(f.className)),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(a,c){a.selection.insertHTML(b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){var d;c.selection.isCollapsed()||(d=rangy.saveSelection(c.win));var e,f,g="_wysihtml5-temp-"+(new Date).getTime(),h=c.selection.deblockAndSurround({nodeName:"div", -className:g});h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(e=/^(\s|(
))+$/i.test(h.innerHTML),f=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&rangy.restoreSelection(d),e&&c.selection.selectNode(f.querySelector("li"),!0))};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"
",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":"
"},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>|

|<\/p>)*$/i.test(a)||""===a||"
"===a||"

"===a||"


"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),this._initAutoLinking(),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("AutoUrlDetect",!1,!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),k(this,this.element,b.shiftKey)))):(this.selection.selectAll(),void b.preventDefault())},x=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5), -wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(a){this.currentView.cleanUp(a)},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5); +var wysihtml5={version:"0.5.3",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset), +b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

1

",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

1

",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"), +isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c(12,">")},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="
foo
";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(),insertOrderedList:c()},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="

",b=c.innerHTML.toLowerCase(),a="

"===b||"

"===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":"  "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi,"  ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b},lineBreak:function(){return d&&1===d.nodeType&&"BR"===d.nodeName},block:function(){return d&&1===d.nodeType&&"block"===d.ownerDocument.defaultView.getComputedStyle(d).display},voidElement:function(){return a.dom.domNode(d).test({query:a.VOID_ELEMENTS})}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){ +return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||"

"===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p)if(a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},destroy:function(){},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d,!1),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before": +a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return wysihtml5.browser.supportsModernPaste()&&a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("

 

"==b||"

 

 

"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(a=e[0].startContainer,b=a.previousSibling,c=a.nextSibling,d=e[0].startOffset),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),this.setAfter(b))}},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){ +for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),e.classList.add(f.className)),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i), +g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(a,c){a.selection.insertHTML(b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),d&&c.selection.selectNode(e.querySelector("li"),!0))};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"
",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":"
"},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>|

|<\/p>)*$/i.test(a)||""===a||"
"===a||"

"===a||"


"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),this._initAutoLinking(),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("AutoUrlDetect",!1,!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),b.replaceWithChildNodes(c)):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus"],function(){e.isEmpty()&&setTimeout(function(){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||h!==a.ENTER_KEY&&h!==a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},g=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},h=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},i=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(h(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},j=function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element);if(curNode=3===g.nodeType?g:a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element),curNode)return c(curNode).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},k=function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},l=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(k(b))return void a.preventDefault();if(j(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},m=function(d,e){if(e.config.useLineBreaks&&!d.shiftKey&&!d.ctrlKey){var f,g,h="p, pre, div, blockquote";if(e.selection.isCollapsed()&&(f=e.selection.getNodesNearCaret(),f&&((f.caretNode||f.nextNode)&&(g=b.getParentElement(f.caretNode||f.nextNode,{query:h},2),g===e.element&&(g=void 0)),g&&f.caretNode)))if(c(f.caretNode).is.lineBreak()){if(e.config.doubleLineBreakEscapesBlock){d.preventDefault(),f.caretNode.parentNode.removeChild(f.caretNode),c(f.nextNode).is.lineBreak()&&f.nextNode.parentNode.removeChild(f.nextNode);var i=e.doc.createElement("br");c(f.nextNode).is.lineBreak()&&f.nextNode===g.lastChild?g.parentNode.insertBefore(i,g.nextSibling):e.selection.splitElementAtCaret(g,i),f.nextNode&&3===f.nextNode.nodeType&&(f.nextNode.data=f.nextNode.data.replace(/^ *[\r\n]+/,"")),e.selection.setBefore(i)}}else if(3===f.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&f.textOffset===f.caretNode.data.length&&!f.nextNode){d.preventDefault();var j=e.doc.createElement("br"),k=e.doc.createElement("br"),l=e.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),e.selection.insertNode(l),e.selection.setBefore(k)}}},n=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},o=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},p=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},q=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},r=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},s=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},t=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},u=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},v=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},w=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},x=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},y=function(b){var c,d,f=b.keyCode,g=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g), +b.preventDefault()),f===a.BACKSPACE_KEY&&l(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),n(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&m(b,this))):(this.selection.selectAll(),void b.preventDefault())},z=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),g(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],o.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||o.call(this)},250)),this.config.handleTables&&z.call(this),f(c,["drop","paste","mouseup","focus","keyup"],p.bind(this)),c.addEventListener("focus",q.bind(this),!1),c.addEventListener("blur",r.bind(this),!1),f(this.element,["drop","paste","beforepaste"],s.bind(this),!1),this.element.addEventListener("copy",t.bind(this),!1),this.element.addEventListener("mousedown",v.bind(this),!1),this.element.addEventListener("click",w.bind(this),!1),this.element.addEventListener("drop",x.bind(this),!1),this.element.addEventListener("keyup",u.bind(this),!1),this.element.addEventListener("keydown",y.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(a){this.currentView.cleanUp(a)},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5); //# sourceMappingURL=wysihtml.min.map \ No newline at end of file diff --git a/dist/wysihtml.min.map b/dist/wysihtml.min.map index 671ccb0..7b9b1a2 100644 --- a/dist/wysihtml.min.map +++ b/dist/wysihtml.min.map @@ -1 +1 @@ -{"version":3,"file":"wysihtml.min.js","sources":["wysihtml.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","nodes","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","deleteRangeContents","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","similarOuterBlock","splitAllBlocks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGT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E,eAAgB,SAAUD,GACxB,GAAIG,GAAYr2E,EAAUI,OAAOssD,gBAAgBwpB,GAC/CzyB,cAAiB9hD,KAAKqqD,SAAS1mD,QAC/BqwC,MAASh0C,KAAKwN,OAAOimE,uBAAyB9xE,IAAO3B,KAAKwN,OAAO6lE,cACjExlC,gBAAmB7tC,KAAKwN,OAAO4wD,WAAWC,qBAE5Cr+D,MAAKqqD,SAASzrD,UAAUogB,iBACxBhf,KAAKqqD,SAASzrD,UAAU6nC,WAAWiuC,OAGtCr2E"} \ No newline at end of file +{"version":3,"file":"wysihtml.min.js","sources":["wysihtml.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","nodes","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","handleDeleteKeyPress","handleEnterKeyPress","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBpB,WAAUqB,UAAY,SAASC,EAAKC,GAkenC,QAASC,KACP,IACE,GAAIC,GAAI,GAAIC,aAAY,OAAQC,QAASC,IAAK,QAC9C,OA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GAAIC,GAAgBx1E,KAAK+N,OAA0B,oBAAInK,SAAa5D,KAAa,SAAIA,KAAKgrD,SAAS+f,QAAQ92D,cAAgB,KACvHpT,EAAcb,KAAK+N,OAAO6mE,OAAOU,GACnC3gC,MAAS4gC,GAAev1E,KAAK+N,OAAOwmE,YACpCx+B,QAAW/1C,KAAK+N,OAAOgoC,QACvB7R,QAAWsxC,EACXpnC,gBAAmBpuC,KAAK+N,OAAO+wD,WAAWC,oBAC1CppB,eAAmBA,GAKrB,OAH8B,gBAApB,IACR93C,EAAUI,OAAO6uD,OAAOwoB,GAEnBz0E,GAOTm0E,YAAa,WACX,GAAIS,EAEA53E,GAAUsmC,QAAQ0E,sBACpB7oC,KAAKK,GAAG,iBAAkB,SAASI,GACjCA,EAAMG,iBACN60E,EAAU53E,EAAUG,IAAI4sD,cAAcnqD,GAClCg1E,GACFz1E,KAAK01E,eAAeD,IAEtBjzE,KAAKxC,OAGPA,KAAKK,GAAG,uBAAwB,SAASI,GACvCA,EAAMG,gBACN,IAAIuqD,GAAYnrD,KAAKgrD,SAASI,cAE9BvtD,GAAUG,IAAI+sD,qBAAqB/qD,KAAKgrD,SAAU,SAAS2qB,GACrDA,GACF31E,KAAK01E,eAAeC,GAEtB31E,KAAKgrD,SAASmG,aAAahG,IAC3B3oD,KAAKxC,QAEPwC,KAAKxC,QAIX01E,eAAgB,SAAUD,GACxB,GAAIG,GAAY/3E,EAAUI,OAAOytD,gBAAgB+pB,GAC/ChzB,cAAiBziD,KAAKgrD,SAAStnD,QAC/BixC,MAAS30C,KAAK+N,OAAO4mE,uBAAyBjzE,IAAO1B,KAAK+N,OAAOwmE,cACjEnmC,gBAAmBpuC,KAAK+N,OAAO+wD,WAAWC,qBAE5C/+D,MAAKgrD,SAAS5sD,UAAUkhB,iBACxBtf,KAAKgrD,SAAS5sD,UAAU0oC,WAAW8uC,OAGtC/3E"} \ No newline at end of file diff --git a/package.json b/package.json index dde9953..8a40487 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wysihtml", - "version": "0.5.2", + "version": "0.5.3", "devDependencies": { "grunt": "~0.4.4", "grunt-cli": "^0.1.13",