I'm a table! |
foo
bar
' - */ - -wysihtml5.dom.parse = function(elementOrHtml_current, config_current) { - /* TODO: Currently escaped module pattern as otherwise folloowing default swill be shared among multiple editors. - * Refactor whole code as this method while workind is kind of awkward too */ - - /** - * It's not possible to use a XMLParser/DOMParser as HTML5 is not always well-formed XML - * new DOMParser().parseFromString('') will cause a parseError since the - * node isn't closed - * - * Therefore we've to use the browser's ordinary HTML parser invoked by setting innerHTML. - */ - var NODE_TYPE_MAPPING = { - "1": _handleElement, - "3": _handleText, - "8": _handleComment - }, - // Rename unknown tags to this - DEFAULT_NODE_NAME = "span", - WHITE_SPACE_REG_EXP = /\s+/, - defaultRules = { tags: {}, classes: {} }, - currentRules = {}; - - /** - * Iterates over all childs of the element, recreates them, appends them into a document fragment - * which later replaces the entire body content - */ - function parse(elementOrHtml, config) { - wysihtml5.lang.object(currentRules).merge(defaultRules).merge(config.rules).get(); - - var context = config.context || elementOrHtml.ownerDocument || document, - fragment = context.createDocumentFragment(), - isString = typeof(elementOrHtml) === "string", - clearInternals = false, - element, - newNode, - firstChild; - - if (config.clearInternals === true) { - clearInternals = true; - } - - if (isString) { - element = wysihtml5.dom.getAsDom(elementOrHtml, context); - } else { - element = elementOrHtml; - } - - if (currentRules.selectors) { - _applySelectorRules(element, currentRules.selectors); - } - - while (element.firstChild) { - firstChild = element.firstChild; - newNode = _convert(firstChild, config.cleanUp, clearInternals, config.uneditableClass); - if (newNode) { - fragment.appendChild(newNode); - } - if (firstChild !== newNode) { - element.removeChild(firstChild); - } - } - - if (config.unjoinNbsps) { - // replace joined non-breakable spaces with unjoined - var txtnodes = wysihtml5.dom.getTextNodes(fragment); - for (var n = txtnodes.length; n--;) { - txtnodes[n].nodeValue = txtnodes[n].nodeValue.replace(/([\S\u00A0])\u00A0/gi, "$1 "); - } - } - - // Clear element contents - element.innerHTML = ""; - - // Insert new DOM tree - element.appendChild(fragment); - - return isString ? wysihtml5.quirks.getCorrectInnerHTML(element) : element; - } - - function _convert(oldNode, cleanUp, clearInternals, uneditableClass) { - var oldNodeType = oldNode.nodeType, - oldChilds = oldNode.childNodes, - oldChildsLength = oldChilds.length, - method = NODE_TYPE_MAPPING[oldNodeType], - i = 0, - fragment, - newNode, - newChild; - - // Passes directly elemets with uneditable class - if (uneditableClass && oldNodeType === 1 && wysihtml5.dom.hasClass(oldNode, uneditableClass)) { - return oldNode; - } - - newNode = method && method(oldNode, clearInternals); - - // Remove or unwrap node in case of return value null or false - if (!newNode) { - if (newNode === false) { - // false defines that tag should be removed but contents should remain (unwrap) - fragment = oldNode.ownerDocument.createDocumentFragment(); - - for (i = oldChildsLength; i--;) { - if (oldChilds[i]) { - newChild = _convert(oldChilds[i], cleanUp, clearInternals, uneditableClass); - if (newChild) { - if (oldChilds[i] === newChild) { - i--; - } - fragment.insertBefore(newChild, fragment.firstChild); - } - } - } - - if (wysihtml5.dom.getStyle("display").from(oldNode) === "block") { - fragment.appendChild(oldNode.ownerDocument.createElement("br")); - } - - // TODO: try to minimize surplus spaces - if (wysihtml5.lang.array([ - "div", "pre", "p", - "table", "td", "th", - "ul", "ol", "li", - "dd", "dl", - "footer", "header", "section", - "h1", "h2", "h3", "h4", "h5", "h6" - ]).contains(oldNode.nodeName.toLowerCase()) && oldNode.parentNode.lastChild !== oldNode) { - // add space at first when unwraping non-textflow elements - if (!oldNode.nextSibling || oldNode.nextSibling.nodeType !== 3 || !(/^\s/).test(oldNode.nextSibling.nodeValue)) { - fragment.appendChild(oldNode.ownerDocument.createTextNode(" ")); - } - } - - if (fragment.normalize) { - fragment.normalize(); - } - return fragment; - } else { - // Remove - return null; - } - } - - // Converts all childnodes - for (i=0; idoesn't need to be closed according HTML4-5 spec, we simply replace it with a
) and keeps its childs - * - * @param {Element} element The list element which should be renamed - * @param {Element} newNodeName The desired tag name - * - * @example - * - *
" || - innerHTML == "
") { - element.innerHTML = ""; - } - }, 0); - }; - - return function(composer) { - wysihtml5.dom.observe(composer.element, ["cut", "keydown"], clearIfNecessary); - }; -})(); -;// See https://bugzilla.mozilla.org/show_bug.cgi?id=664398 -// -// In Firefox this: -// var d = document.createElement("div"); -// d.innerHTML =''; -// d.innerHTML; -// will result in: -// -// which is wrong -(function(wysihtml5) { - var TILDE_ESCAPED = "%7E"; - wysihtml5.quirks.getCorrectInnerHTML = function(element) { - var innerHTML = element.innerHTML; - if (innerHTML.indexOf(TILDE_ESCAPED) === -1) { - return innerHTML; - } - - var elementsWithTilde = element.querySelectorAll("[href*='~'], [src*='~']"), - url, - urlToSearch, - length, - i; - for (i=0, length=elementsWithTilde.length; i
foobar
"); - */ - insertHTML: function(html) { - var range = rangy.createRange(this.doc), - node = this.doc.createElement('DIV'), - fragment = this.doc.createDocumentFragment(), - lastChild; - - node.innerHTML = html; - lastChild = node.lastChild; - - while (node.firstChild) { - fragment.appendChild(node.firstChild); - } - this.insertNode(fragment); - - if (lastChild) { - this.setAfter(lastChild); - } - }, - - /** - * Insert a node at the caret position and move the cursor behind it - * - * @param {Object} node HTML string to insert - * @example - * selection.insertNode(document.createTextNode("foobar")); - */ - insertNode: function(node) { - var range = this.getRange(); - if (range) { - range.insertNode(node); - } - }, - - /** - * Wraps current selection with the given node - * - * @param {Object} node The node to surround the selected elements with - */ - surround: function(nodeOptions) { - var ranges = this.getOwnRanges(), - node, nodes = []; - if (ranges.length == 0) { - return nodes; - } - - for (var i = ranges.length; i--;) { - node = this.doc.createElement(nodeOptions.nodeName); - nodes.push(node); - if (nodeOptions.className) { - node.className = nodeOptions.className; - } - if (nodeOptions.cssStyle) { - node.setAttribute('style', nodeOptions.cssStyle); - } - try { - // This only works when the range boundaries are not overlapping other elements - ranges[i].surroundContents(node); - this.selectNode(node); - } catch(e) { - // fallback - node.appendChild(ranges[i].extractContents()); - ranges[i].insertNode(node); - } - } - 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.nodeName, nodeOptions.className); - 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 - * - * @example - * selection.scrollIntoView(); - */ - scrollIntoView: function() { - var doc = this.doc, - tolerance = 5, // px - hasScrollBars = doc.documentElement.scrollHeight > doc.documentElement.offsetHeight, - tempElement = doc._wysihtml5ScrollIntoViewElement = doc._wysihtml5ScrollIntoViewElement || (function() { - var element = doc.createElement("span"); - // The element needs content in order to be able to calculate it's position properly - element.innerHTML = wysihtml5.INVISIBLE_SPACE; - return element; - })(), - offsetTop; - - if (hasScrollBars) { - this.insertNode(tempElement); - offsetTop = _getCumulativeOffsetTop(tempElement); - tempElement.parentNode.removeChild(tempElement); - if (offsetTop >= (doc.body.scrollTop + doc.documentElement.offsetHeight - tolerance)) { - doc.body.scrollTop = offsetTop; - } - } - }, - - /** - * Select line where the caret is in - */ - selectLine: function() { - if (wysihtml5.browser.supportsSelectionModify()) { - this._selectLine_W3C(); - } else if (this.doc.selection) { - this._selectLine_MSIE(); - } - }, - - /** - * See https://developer.mozilla.org/en/DOM/Selection/modify - */ - _selectLine_W3C: function() { - var win = this.doc.defaultView, - selection = win.getSelection(); - selection.modify("move", "left", "lineboundary"); - selection.modify("extend", "right", "lineboundary"); - }, - - _selectLine_MSIE: function() { - var range = this.doc.selection.createRange(), - rangeTop = range.boundingTop, - scrollWidth = this.doc.body.scrollWidth, - rangeBottom, - rangeEnd, - measureNode, - i, - j; - - if (!range.moveToPoint) { - return; - } - - if (rangeTop === 0) { - // Don't know why, but when the selection ends at the end of a line - // range.boundingTop is 0 - measureNode = this.doc.createElement("span"); - this.insertNode(measureNode); - rangeTop = measureNode.offsetTop; - measureNode.parentNode.removeChild(measureNode); - } - - rangeTop += 1; - - for (i=-10; i to prevent re-autolinking
- // else replace with its childNodes
- if (textContent.match(dom.autoLink.URL_REG_EXP) && !codeElement) {
- // element is used to prevent later auto-linking of the content
- codeElement = dom.renameElement(anchor, "code");
- } else {
- dom.replaceWithChildNodes(anchor);
- }
- }
- }
-
- wysihtml5.commands.removeLink = {
- /*
- * If selection is a link, it removes the link and wraps it with a element
- * The element is needed to avoid auto linking
- *
- * @example
- * wysihtml5.commands.createLink.exec(composer, "removeLink");
- */
-
- exec: function(composer, command) {
- var anchors = this.state(composer, command);
- if (anchors) {
- composer.selection.executeAndRestore(function() {
- _removeFormat(composer, anchors);
- });
- }
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatInline.state(composer, command, "A");
- }
- };
-})(wysihtml5);
-;/**
- * document.execCommand("fontSize") will create either inline styles (firefox, chrome) or use font tags
- * which we don't want
- * Instead we set a css class
- */
-(function(wysihtml5) {
- var REG_EXP = /wysiwyg-font-size-[0-9a-z\-]+/g;
-
- wysihtml5.commands.fontSize = {
- exec: function(composer, command, size) {
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", "wysiwyg-font-size-" + size, REG_EXP);
- },
-
- state: function(composer, command, size) {
- return wysihtml5.commands.formatInline.state(composer, command, "span", "wysiwyg-font-size-" + size, REG_EXP);
- }
- };
-})(wysihtml5);
-;/* In case font size adjustment to any number defined by user is preferred, we cannot use classes and must use inline styles. */
-(function(wysihtml5) {
- var REG_EXP = /(\s|^)font-size\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.fontSizeStyle = {
- exec: function(composer, command, size) {
- size = (typeof(size) == "object") ? size.size : size;
- if (!(/^\s*$/).test(size)) {
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", false, false, "font-size:" + size, REG_EXP);
- }
- },
-
- state: function(composer, command, size) {
- return wysihtml5.commands.formatInline.state(composer, command, "span", false, false, "font-size", REG_EXP);
- },
-
- stateValue: function(composer, command) {
- var st = this.state(composer, command),
- styleStr, fontsizeMatches,
- val = false;
-
- if (st && wysihtml5.lang.object(st).isArray()) {
- st = st[0];
- }
- if (st) {
- styleStr = st.getAttribute('style');
- if (styleStr) {
- return wysihtml5.quirks.styleParser.parseFontSize(styleStr);
- }
- }
- return false;
- }
- };
-})(wysihtml5);
-;/**
- * document.execCommand("foreColor") will create either inline styles (firefox, chrome) or use font tags
- * which we don't want
- * Instead we set a css class
- */
-(function(wysihtml5) {
- var REG_EXP = /wysiwyg-color-[0-9a-z]+/g;
-
- wysihtml5.commands.foreColor = {
- exec: function(composer, command, color) {
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", "wysiwyg-color-" + color, REG_EXP);
- },
-
- state: function(composer, command, color) {
- return wysihtml5.commands.formatInline.state(composer, command, "span", "wysiwyg-color-" + color, REG_EXP);
- }
- };
-})(wysihtml5);
-;/**
- * document.execCommand("foreColor") will create either inline styles (firefox, chrome) or use font tags
- * which we don't want
- * Instead we set a css class
- */
-(function(wysihtml5) {
- var REG_EXP = /(\s|^)color\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.foreColorStyle = {
- exec: function(composer, command, color) {
- var colorVals = wysihtml5.quirks.styleParser.parseColor((typeof(color) == "object") ? "color:" + color.color : "color:" + color, "color"),
- colString;
-
- if (colorVals) {
- colString = "color: rgb(" + colorVals[0] + ',' + colorVals[1] + ',' + colorVals[2] + ');';
- if (colorVals[3] !== 1) {
- colString += "color: rgba(" + colorVals[0] + ',' + colorVals[1] + ',' + colorVals[2] + ',' + colorVals[3] + ');';
- }
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", false, false, colString, REG_EXP);
- }
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatInline.state(composer, command, "span", false, false, "color", REG_EXP);
- },
-
- stateValue: function(composer, command, props) {
- var st = this.state(composer, command),
- colorStr;
-
- if (st && wysihtml5.lang.object(st).isArray()) {
- st = st[0];
- }
-
- if (st) {
- colorStr = st.getAttribute('style');
- if (colorStr) {
- if (colorStr) {
- val = wysihtml5.quirks.styleParser.parseColor(colorStr, "color");
- return wysihtml5.quirks.styleParser.unparseColor(val, props);
- }
- }
- }
- return false;
- }
-
- };
-})(wysihtml5);
-;/* In case background adjustment to any color defined by user is preferred, we cannot use classes and must use inline styles. */
-(function(wysihtml5) {
- var REG_EXP = /(\s|^)background-color\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.bgColorStyle = {
- exec: function(composer, command, color) {
- var colorVals = wysihtml5.quirks.styleParser.parseColor((typeof(color) == "object") ? "background-color:" + color.color : "background-color:" + color, "background-color"),
- colString;
-
- if (colorVals) {
- colString = "background-color: rgb(" + colorVals[0] + ',' + colorVals[1] + ',' + colorVals[2] + ');';
- if (colorVals[3] !== 1) {
- colString += "background-color: rgba(" + colorVals[0] + ',' + colorVals[1] + ',' + colorVals[2] + ',' + colorVals[3] + ');';
- }
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", false, false, colString, REG_EXP);
- }
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatInline.state(composer, command, "span", false, false, "background-color", REG_EXP);
- },
-
- stateValue: function(composer, command, props) {
- var st = this.state(composer, command),
- colorStr,
- val = false;
-
- if (st && wysihtml5.lang.object(st).isArray()) {
- st = st[0];
- }
-
- if (st) {
- colorStr = st.getAttribute('style');
- if (colorStr) {
- val = wysihtml5.quirks.styleParser.parseColor(colorStr, "background-color");
- return wysihtml5.quirks.styleParser.unparseColor(val, props);
- }
- }
- return false;
- }
-
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var dom = wysihtml5.dom,
- // Following elements are grouped
- // when the caret is within a H1 and the H4 is invoked, the H1 should turn into H4
- // instead of creating a H4 within a H1 which would result in semantically invalid html
- BLOCK_ELEMENTS_GROUP = ["H1", "H2", "H3", "H4", "H5", "H6", "P", "PRE", "DIV"];
-
- /**
- * Remove similiar classes (based on classRegExp)
- * and add the desired class name
- */
- function _addClass(element, className, classRegExp) {
- if (element.className) {
- _removeClass(element, classRegExp);
- element.className = wysihtml5.lang.string(element.className + " " + className).trim();
- } else {
- element.className = className;
- }
- }
-
- function _addStyle(element, cssStyle, styleRegExp) {
- _removeStyle(element, styleRegExp);
- if (element.getAttribute('style')) {
- element.setAttribute('style', wysihtml5.lang.string(element.getAttribute('style') + " " + cssStyle).trim());
- } else {
- element.setAttribute('style', cssStyle);
- }
- }
-
- function _removeClass(element, classRegExp) {
- var ret = classRegExp.test(element.className);
- element.className = element.className.replace(classRegExp, "");
- if (wysihtml5.lang.string(element.className).trim() == '') {
- element.removeAttribute('class');
- }
- return ret;
- }
-
- function _removeStyle(element, styleRegExp) {
- var ret = styleRegExp.test(element.getAttribute('style'));
- element.setAttribute('style', (element.getAttribute('style') || "").replace(styleRegExp, ""));
- if (wysihtml5.lang.string(element.getAttribute('style') || "").trim() == '') {
- element.removeAttribute('style');
- }
- return ret;
- }
-
- function _removeLastChildIfLineBreak(node) {
- var lastChild = node.lastChild;
- if (lastChild && _isLineBreak(lastChild)) {
- lastChild.parentNode.removeChild(lastChild);
- }
- }
-
- function _isLineBreak(node) {
- return node.nodeName === "BR";
- }
-
- /**
- * Execute native query command
- * and if necessary modify the inserted node's className
- */
- function _execCommand(doc, composer, command, nodeName, className) {
- var ranges = composer.selection.getOwnRanges();
- for (var i = ranges.length; i--;){
- composer.selection.getSelection().removeAllRanges();
- composer.selection.setSelection(ranges[i]);
- if (className) {
- var eventListener = dom.observe(doc, "DOMNodeInserted", function(event) {
- var target = event.target,
- displayStyle;
- if (target.nodeType !== wysihtml5.ELEMENT_NODE) {
- return;
- }
- displayStyle = dom.getStyle("display").from(target);
- if (displayStyle.substr(0, 6) !== "inline") {
- // Make sure that only block elements receive the given class
- target.className += " " + className;
- }
- });
- }
- doc.execCommand(command, false, nodeName);
-
- if (eventListener) {
- eventListener.stop();
- }
- }
- }
-
- function _selectionWrap(composer, options) {
- if (composer.selection.isCollapsed()) {
- composer.selection.selectLine();
- }
-
- var surroundedNodes = composer.selection.surround(options);
- for (var i = 0, imax = surroundedNodes.length; i < imax; i++) {
- wysihtml5.dom.lineBreaks(surroundedNodes[i]).remove();
- _removeLastChildIfLineBreak(surroundedNodes[i]);
- }
-
- // rethink restoring selection
- // composer.selection.selectNode(element, wysihtml5.browser.displaysCaretInEmptyContentEditableCorrectly());
- }
-
- function _hasClasses(element) {
- return !!wysihtml5.lang.string(element.className).trim();
- }
-
- function _hasStyles(element) {
- return !!wysihtml5.lang.string(element.getAttribute('style') || '').trim();
- }
-
- wysihtml5.commands.formatBlock = {
- exec: function(composer, command, nodeName, className, classRegExp, cssStyle, styleRegExp) {
- var doc = composer.doc,
- blockElements = this.state(composer, command, nodeName, className, classRegExp, cssStyle, styleRegExp),
- useLineBreaks = composer.config.useLineBreaks,
- defaultNodeName = useLineBreaks ? "DIV" : "P",
- selectedNodes, classRemoveAction, blockRenameFound, styleRemoveAction, blockElement;
- nodeName = typeof(nodeName) === "string" ? nodeName.toUpperCase() : nodeName;
-
- if (blockElements.length) {
- composer.selection.executeAndRestoreRangy(function() {
- for (var b = blockElements.length; b--;) {
- if (classRegExp) {
- classRemoveAction = _removeClass(blockElements[b], classRegExp);
- }
- if (styleRegExp) {
- styleRemoveAction = _removeStyle(blockElements[b], styleRegExp);
- }
-
- if ((styleRemoveAction || classRemoveAction) && nodeName === null && blockElements[b].nodeName != defaultNodeName) {
- // dont rename or remove element when just setting block formating class or style
- return;
- }
-
- var hasClasses = _hasClasses(blockElements[b]),
- hasStyles = _hasStyles(blockElements[b]);
-
- if (!hasClasses && !hasStyles && (useLineBreaks || nodeName === "P")) {
- // Insert a line break afterwards and beforewards when there are siblings
- // that are not of type line break or block element
- wysihtml5.dom.lineBreaks(blockElements[b]).add();
- dom.replaceWithChildNodes(blockElements[b]);
- } else {
- // Make sure that styling is kept by renaming the element to a or and copying over the class name
- dom.renameElement(blockElements[b], nodeName === "P" ? "DIV" : defaultNodeName);
- }
- }
- });
-
- return;
- }
-
- // Find similiar block element and rename it (
=> )
- if (nodeName === null || wysihtml5.lang.array(BLOCK_ELEMENTS_GROUP).contains(nodeName)) {
- selectedNodes = composer.selection.findNodesInSelection(BLOCK_ELEMENTS_GROUP).concat(composer.selection.getSelectedOwnNodes());
- composer.selection.executeAndRestoreRangy(function() {
- for (var n = selectedNodes.length; n--;) {
- blockElement = dom.getParentElement(selectedNodes[n], {
- nodeName: BLOCK_ELEMENTS_GROUP
- });
- if (blockElement == composer.element) {
- blockElement = null;
- }
- if (blockElement) {
- // Rename current block element to new block element and add class
- if (nodeName) {
- blockElement = dom.renameElement(blockElement, nodeName);
- }
- if (className) {
- _addClass(blockElement, className, classRegExp);
- }
- if (cssStyle) {
- _addStyle(blockElement, cssStyle, styleRegExp);
- }
- blockRenameFound = true;
- }
- }
-
- });
-
- if (blockRenameFound) {
- return;
- }
- }
-
- _selectionWrap(composer, {
- "nodeName": (nodeName || defaultNodeName),
- "className": className || null,
- "cssStyle": cssStyle || null
- });
- },
-
- state: function(composer, command, nodeName, className, classRegExp, cssStyle, styleRegExp) {
- var nodes = composer.selection.getSelectedOwnNodes(),
- parents = [],
- parent;
-
- nodeName = typeof(nodeName) === "string" ? nodeName.toUpperCase() : nodeName;
-
- //var selectedNode = composer.selection.getSelectedNode();
- for (var i = 0, maxi = nodes.length; i < maxi; i++) {
- parent = dom.getParentElement(nodes[i], {
- nodeName: nodeName,
- className: className,
- classRegExp: classRegExp,
- cssStyle: cssStyle,
- styleRegExp: styleRegExp
- });
- if (parent && wysihtml5.lang.array(parents).indexOf(parent) == -1) {
- parents.push(parent);
- }
- }
- if (parents.length == 0) {
- return false;
- }
- return parents;
- }
-
-
- };
-})(wysihtml5);
-;/* Formats block for as a
block
- * Useful in conjuction for sytax highlight utility: highlight.js
- *
- * Usage:
- *
- * editorInstance.composer.commands.exec("formatCode", "language-html");
-*/
-
-wysihtml5.commands.formatCode = {
-
- exec: function(composer, command, classname) {
- var pre = this.state(composer),
- code, range, selectedNodes;
- if (pre) {
- // caret is already within a ...
- composer.selection.executeAndRestore(function() {
- code = pre.querySelector("code");
- wysihtml5.dom.replaceWithChildNodes(pre);
- if (code) {
- wysihtml5.dom.replaceWithChildNodes(code);
- }
- });
- } else {
- // Wrap in ...
- range = composer.selection.getRange();
- selectedNodes = range.extractContents();
- pre = composer.doc.createElement("pre");
- code = composer.doc.createElement("code");
-
- if (classname) {
- code.className = classname;
- }
-
- pre.appendChild(code);
- code.appendChild(selectedNodes);
- range.insertNode(pre);
- composer.selection.selectNode(pre);
- }
- },
-
- state: function(composer) {
- var selectedNode = composer.selection.getSelectedNode();
- if (selectedNode && selectedNode.nodeName && selectedNode.nodeName == "PRE"&&
- selectedNode.firstChild && selectedNode.firstChild.nodeName && selectedNode.firstChild.nodeName == "CODE") {
- return selectedNode;
- } else {
- return wysihtml5.dom.getParentElement(selectedNode, { nodeName: "CODE" }) && wysihtml5.dom.getParentElement(selectedNode, { nodeName: "PRE" });
- }
- }
-};;/**
- * formatInline scenarios for tag "B" (| = caret, |foo| = selected text)
- *
- * #1 caret in unformatted text:
- * abcdefg|
- * output:
- * abcdefg|
- *
- * #2 unformatted text selected:
- * abc|deg|h
- * output:
- * abc|deg|h
- *
- * #3 unformatted text selected across boundaries:
- * ab|c defg|h
- * output:
- * ab|c defg|h
- *
- * #4 formatted text entirely selected
- * |abc|
- * output:
- * |abc|
- *
- * #5 formatted text partially selected
- * ab|c|
- * output:
- * ab|c|
- *
- * #6 formatted text selected across boundaries
- * ab|c de|fgh
- * output:
- * ab|c de|fgh
- */
-(function(wysihtml5) {
- var // Treat as and vice versa
- ALIAS_MAPPING = {
- "strong": "b",
- "em": "i",
- "b": "strong",
- "i": "em"
- },
- htmlApplier = {};
-
- function _getTagNames(tagName) {
- var alias = ALIAS_MAPPING[tagName];
- return alias ? [tagName.toLowerCase(), alias.toLowerCase()] : [tagName.toLowerCase()];
- }
-
- function _getApplier(tagName, className, classRegExp, cssStyle, styleRegExp, container) {
- var identifier = tagName;
-
- if (className) {
- identifier += ":" + className;
- }
- if (cssStyle) {
- identifier += ":" + cssStyle;
- }
-
- if (!htmlApplier[identifier]) {
- htmlApplier[identifier] = new wysihtml5.selection.HTMLApplier(_getTagNames(tagName), className, classRegExp, true, cssStyle, styleRegExp, container);
- }
-
- return htmlApplier[identifier];
- }
-
- wysihtml5.commands.formatInline = {
- exec: function(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp, dontRestoreSelect, noCleanup) {
- var range = composer.selection.createRange(),
- ownRanges = composer.selection.getOwnRanges();
-
- if (!ownRanges || ownRanges.length == 0) {
- return false;
- }
- composer.selection.getSelection().removeAllRanges();
-
- _getApplier(tagName, className, classRegExp, cssStyle, styleRegExp, composer.element).toggleRange(ownRanges);
-
- if (!dontRestoreSelect) {
- range.setStart(ownRanges[0].startContainer, ownRanges[0].startOffset);
- range.setEnd(
- ownRanges[ownRanges.length - 1].endContainer,
- ownRanges[ownRanges.length - 1].endOffset
- );
- composer.selection.setSelection(range);
- composer.selection.executeAndRestore(function() {
- if (!noCleanup) {
- composer.cleanUp();
- }
- }, true, true);
- } else if (!noCleanup) {
- composer.cleanUp();
- }
- },
-
- // Executes so that if collapsed caret is in a state and executing that state it should unformat that state
- // It is achieved by selecting the entire state element before executing.
- // This works on built in contenteditable inline format commands
- execWithToggle: function(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp) {
- var that = this;
-
- if (this.state(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp) &&
- composer.selection.isCollapsed() &&
- !composer.selection.caretIsLastInSelection() &&
- !composer.selection.caretIsFirstInSelection()
- ) {
- var state_element = that.state(composer, command, tagName, className, classRegExp)[0];
- composer.selection.executeAndRestoreRangy(function() {
- var parent = state_element.parentNode;
- composer.selection.selectNode(state_element, true);
- wysihtml5.commands.formatInline.exec(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp, true, true);
- });
- } else {
- if (this.state(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp) && !composer.selection.isCollapsed()) {
- composer.selection.executeAndRestoreRangy(function() {
- wysihtml5.commands.formatInline.exec(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp, true, true);
- });
- } else {
- wysihtml5.commands.formatInline.exec(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp);
- }
- }
- },
-
- state: function(composer, command, tagName, className, classRegExp, cssStyle, styleRegExp) {
- var doc = composer.doc,
- aliasTagName = ALIAS_MAPPING[tagName] || tagName,
- ownRanges, isApplied;
-
- // Check whether the document contains a node with the desired tagName
- if (!wysihtml5.dom.hasElementWithTagName(doc, tagName) &&
- !wysihtml5.dom.hasElementWithTagName(doc, aliasTagName)) {
- return false;
- }
-
- // Check whether the document contains a node with the desired className
- if (className && !wysihtml5.dom.hasElementWithClassName(doc, className)) {
- return false;
- }
-
- ownRanges = composer.selection.getOwnRanges();
-
- if (!ownRanges || ownRanges.length === 0) {
- return false;
- }
-
- isApplied = _getApplier(tagName, className, classRegExp, cssStyle, styleRegExp, composer.element).isAppliedToRange(ownRanges);
-
- return (isApplied && isApplied.elements) ? isApplied.elements : false;
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
-
- wysihtml5.commands.insertBlockQuote = {
- exec: function(composer, command) {
- var state = this.state(composer, command),
- endToEndParent = composer.selection.isEndToEndInNode(['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P']),
- prevNode, nextNode;
-
- composer.selection.executeAndRestore(function() {
- if (state) {
- if (composer.config.useLineBreaks) {
- wysihtml5.dom.lineBreaks(state).add();
- }
- wysihtml5.dom.unwrap(state);
- } else {
- if (composer.selection.isCollapsed()) {
- composer.selection.selectLine();
- }
-
- if (endToEndParent) {
- var qouteEl = endToEndParent.ownerDocument.createElement('blockquote');
- wysihtml5.dom.insert(qouteEl).after(endToEndParent);
- qouteEl.appendChild(endToEndParent);
- } else {
- composer.selection.surround({nodeName: "blockquote"});
- }
- }
- });
- },
- state: function(composer, command) {
- var selectedNode = composer.selection.getSelectedNode(),
- node = wysihtml5.dom.getParentElement(selectedNode, { nodeName: "BLOCKQUOTE" }, false, composer.element);
-
- return (node) ? node : false;
- }
- };
-
-})(wysihtml5);;wysihtml5.commands.insertHTML = {
- exec: function(composer, command, html) {
- if (composer.commands.support(command)) {
- composer.doc.execCommand(command, false, html);
- } else {
- composer.selection.insertHTML(html);
- }
- },
-
- state: function() {
- return false;
- }
-};
-;(function(wysihtml5) {
- var NODE_NAME = "IMG";
-
- wysihtml5.commands.insertImage = {
- /**
- * Inserts an
- * If selection is already an image link, it removes it
- *
- * @example
- * // either ...
- * wysihtml5.commands.insertImage.exec(composer, "insertImage", "http://www.google.de/logo.jpg");
- * // ... or ...
- * wysihtml5.commands.insertImage.exec(composer, "insertImage", { src: "http://www.google.de/logo.jpg", title: "foo" });
- */
- exec: function(composer, command, value) {
- value = typeof(value) === "object" ? value : { src: value };
-
- var doc = composer.doc,
- image = this.state(composer),
- textNode,
- parent;
-
- if (image) {
- // Image already selected, set the caret before it and delete it
- composer.selection.setBefore(image);
- parent = image.parentNode;
- parent.removeChild(image);
-
- // and it's parent too if it hasn't got any other relevant child nodes
- wysihtml5.dom.removeEmptyTextNodes(parent);
- if (parent.nodeName === "A" && !parent.firstChild) {
- composer.selection.setAfter(parent);
- parent.parentNode.removeChild(parent);
- }
-
- // firefox and ie sometimes don't remove the image handles, even though the image got removed
- wysihtml5.quirks.redraw(composer.element);
- return;
- }
-
- image = doc.createElement(NODE_NAME);
-
- for (var i in value) {
- image.setAttribute(i === "className" ? "class" : i, value[i]);
- }
-
- composer.selection.insertNode(image);
- if (wysihtml5.browser.hasProblemsSettingCaretAfterImg()) {
- textNode = doc.createTextNode(wysihtml5.INVISIBLE_SPACE);
- composer.selection.insertNode(textNode);
- composer.selection.setAfter(textNode);
- } else {
- composer.selection.setAfter(image);
- }
- },
-
- state: function(composer) {
- var doc = composer.doc,
- selectedNode,
- text,
- imagesInSelection;
-
- if (!wysihtml5.dom.hasElementWithTagName(doc, NODE_NAME)) {
- return false;
- }
-
- selectedNode = composer.selection.getSelectedNode();
- if (!selectedNode) {
- return false;
- }
-
- if (selectedNode.nodeName === NODE_NAME) {
- // This works perfectly in IE
- return selectedNode;
- }
-
- if (selectedNode.nodeType !== wysihtml5.ELEMENT_NODE) {
- return false;
- }
-
- text = composer.selection.getText();
- text = wysihtml5.lang.string(text).trim();
- if (text) {
- return false;
- }
-
- imagesInSelection = composer.selection.getNodes(wysihtml5.ELEMENT_NODE, function(node) {
- return node.nodeName === "IMG";
- });
-
- if (imagesInSelection.length !== 1) {
- return false;
- }
-
- return imagesInSelection[0];
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var LINE_BREAK = "
" + (wysihtml5.browser.needsSpaceAfterLineBreak() ? " " : "");
-
- wysihtml5.commands.insertLineBreak = {
- exec: function(composer, command) {
- if (composer.commands.support(command)) {
- composer.doc.execCommand(command, false, null);
- if (!wysihtml5.browser.autoScrollsToCaret()) {
- composer.selection.scrollIntoView();
- }
- } else {
- composer.commands.exec("insertHTML", LINE_BREAK);
- }
- },
-
- state: function() {
- return false;
- }
- };
-})(wysihtml5);
-;wysihtml5.commands.insertOrderedList = {
- exec: function(composer, command) {
- wysihtml5.commands.insertList.exec(composer, command, "OL");
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.insertList.state(composer, command, "OL");
- }
-};
-;wysihtml5.commands.insertUnorderedList = {
- exec: function(composer, command) {
- wysihtml5.commands.insertList.exec(composer, command, "UL");
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.insertList.state(composer, command, "UL");
- }
-};
-;wysihtml5.commands.insertList = (function(wysihtml5) {
-
- var isNode = function(node, name) {
- if (node && node.nodeName) {
- if (typeof name === 'string') {
- name = [name];
- }
- for (var n = name.length; n--;) {
- if (node.nodeName === name[n]) {
- return true;
- }
- }
- }
- return false;
- };
-
- var findListEl = function(node, nodeName, composer) {
- var ret = {
- el: null,
- other: false
- };
-
- if (node) {
- var parentLi = wysihtml5.dom.getParentElement(node, { nodeName: "LI" }),
- otherNodeName = (nodeName === "UL") ? "OL" : "UL";
-
- if (isNode(node, nodeName)) {
- ret.el = node;
- } else if (isNode(node, otherNodeName)) {
- ret = {
- el: node,
- other: true
- };
- } else if (parentLi) {
- if (isNode(parentLi.parentNode, nodeName)) {
- ret.el = parentLi.parentNode;
- } else if (isNode(parentLi.parentNode, otherNodeName)) {
- ret = {
- el : parentLi.parentNode,
- other: true
- };
- }
- }
- }
-
- // do not count list elements outside of composer
- if (ret.el && !composer.element.contains(ret.el)) {
- ret.el = null;
- }
-
- return ret;
- };
-
- var handleSameTypeList = function(el, nodeName, composer) {
- var otherNodeName = (nodeName === "UL") ? "OL" : "UL",
- otherLists, innerLists;
- // Unwrap list
- // - foo
- bar
- // becomes:
- // foo
bar
- composer.selection.executeAndRestore(function() {
- var otherLists = getListsInSelection(otherNodeName, composer);
- if (otherLists.length) {
- for (var l = otherLists.length; l--;) {
- wysihtml5.dom.renameElement(otherLists[l], nodeName.toLowerCase());
- }
- } else {
- innerLists = getListsInSelection(['OL', 'UL'], composer);
- for (var i = innerLists.length; i--;) {
- wysihtml5.dom.resolveList(innerLists[i], composer.config.useLineBreaks);
- }
- wysihtml5.dom.resolveList(el, composer.config.useLineBreaks);
- }
- });
- };
-
- var handleOtherTypeList = function(el, nodeName, composer) {
- var otherNodeName = (nodeName === "UL") ? "OL" : "UL";
- // Turn an ordered list into an unordered list
- // - foo
- bar
- // becomes:
- // - foo
- bar
- // Also rename other lists in selection
- composer.selection.executeAndRestore(function() {
- var renameLists = [el].concat(getListsInSelection(otherNodeName, composer));
-
- // All selection inner lists get renamed too
- for (var l = renameLists.length; l--;) {
- wysihtml5.dom.renameElement(renameLists[l], nodeName.toLowerCase());
- }
- });
- };
-
- var getListsInSelection = function(nodeName, composer) {
- var ranges = composer.selection.getOwnRanges(),
- renameLists = [];
-
- for (var r = ranges.length; r--;) {
- renameLists = renameLists.concat(ranges[r].getNodes([1], function(node) {
- return isNode(node, nodeName);
- }));
- }
-
- return renameLists;
- };
-
- var createListFallback = function(nodeName, composer) {
- // Fallback for Create list
- composer.selection.executeAndRestoreRangy(function() {
- var tempClassName = "_wysihtml5-temp-" + new Date().getTime(),
- tempElement = composer.selection.deblockAndSurround({
- "nodeName": "div",
- "className": tempClassName
- }),
- isEmpty, list;
-
- // This space causes new lists to never break on enter
- var INVISIBLE_SPACE_REG_EXP = /\uFEFF/g;
- tempElement.innerHTML = tempElement.innerHTML.replace(INVISIBLE_SPACE_REG_EXP, "");
-
- if (tempElement) {
- isEmpty = wysihtml5.lang.array(["", "
", wysihtml5.INVISIBLE_SPACE]).contains(tempElement.innerHTML);
- list = wysihtml5.dom.convertToList(tempElement, nodeName.toLowerCase(), composer.parent.config.uneditableContainerClassname);
- if (isEmpty) {
- composer.selection.selectNode(list.querySelector("li"), true);
- }
- }
- });
- };
-
- return {
- exec: function(composer, command, nodeName) {
- var doc = composer.doc,
- cmd = (nodeName === "OL") ? "insertOrderedList" : "insertUnorderedList",
- selectedNode = composer.selection.getSelectedNode(),
- list = findListEl(selectedNode, nodeName, composer);
-
- if (!list.el) {
- if (composer.commands.support(cmd)) {
- doc.execCommand(cmd, false, null);
- } else {
- createListFallback(nodeName, composer);
- }
- } else if (list.other) {
- handleOtherTypeList(list.el, nodeName, composer);
- } else {
- handleSameTypeList(list.el, nodeName, composer);
- }
- },
-
- state: function(composer, command, nodeName) {
- var selectedNode = composer.selection.getSelectedNode(),
- list = findListEl(selectedNode, nodeName, composer);
-
- return (list.el && !list.other) ? list.el : false;
- }
- };
-
-})(wysihtml5);;wysihtml5.commands.italic = {
- exec: function(composer, command) {
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "i");
- },
-
- state: function(composer, command) {
- // element.ownerDocument.queryCommandState("italic") results:
- // firefox: only
- // chrome: , , , ...
- // ie: ,
- // opera: only
- return wysihtml5.commands.formatInline.state(composer, command, "i");
- }
-};
-;(function(wysihtml5) {
- var CLASS_NAME = "wysiwyg-text-align-center",
- REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g;
-
- wysihtml5.commands.justifyCenter = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var CLASS_NAME = "wysiwyg-text-align-left",
- REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g;
-
- wysihtml5.commands.justifyLeft = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var CLASS_NAME = "wysiwyg-text-align-right",
- REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g;
-
- wysihtml5.commands.justifyRight = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var CLASS_NAME = "wysiwyg-text-align-justify",
- REG_EXP = /wysiwyg-text-align-[0-9a-z]+/g;
-
- wysihtml5.commands.justifyFull = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, CLASS_NAME, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var STYLE_STR = "text-align: right;",
- REG_EXP = /(\s|^)text-align\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.alignRightStyle = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var STYLE_STR = "text-align: left;",
- REG_EXP = /(\s|^)text-align\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.alignLeftStyle = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- }
- };
-})(wysihtml5);
-;(function(wysihtml5) {
- var STYLE_STR = "text-align: center;",
- REG_EXP = /(\s|^)text-align\s*:\s*[^;\s]+;?/gi;
-
- wysihtml5.commands.alignCenterStyle = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
- }
- };
-})(wysihtml5);
-;wysihtml5.commands.redo = {
- exec: function(composer) {
- return composer.undoManager.redo();
- },
-
- state: function(composer) {
- return false;
- }
-};
-;wysihtml5.commands.underline = {
- exec: function(composer, command) {
- wysihtml5.commands.formatInline.execWithToggle(composer, command, "u");
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatInline.state(composer, command, "u");
- }
-};
-;wysihtml5.commands.undo = {
- exec: function(composer) {
- return composer.undoManager.undo();
- },
-
- state: function(composer) {
- return false;
- }
-};
-;wysihtml5.commands.createTable = {
- exec: function(composer, command, value) {
- var col, row, html;
- if (value && value.cols && value.rows && parseInt(value.cols, 10) > 0 && parseInt(value.rows, 10) > 0) {
- if (value.tableStyle) {
- html = "";
- } else {
- html = "";
- }
- html += "";
- for (row = 0; row < value.rows; row ++) {
- html += '';
- for (col = 0; col < value.cols; col ++) {
- html += " ";
- }
- html += ' ';
- }
- html += "
";
- composer.commands.exec("insertHTML", html);
- //composer.selection.insertHTML(html);
- }
-
-
- },
-
- state: function(composer, command) {
- return false;
- }
-};
-;wysihtml5.commands.mergeTableCells = {
- exec: function(composer, command) {
- if (composer.tableSelection && composer.tableSelection.start && composer.tableSelection.end) {
- if (this.state(composer, command)) {
- wysihtml5.dom.table.unmergeCell(composer.tableSelection.start);
- } else {
- wysihtml5.dom.table.mergeCellsBetween(composer.tableSelection.start, composer.tableSelection.end);
- }
- }
- },
-
- state: function(composer, command) {
- if (composer.tableSelection) {
- var start = composer.tableSelection.start,
- end = composer.tableSelection.end;
- if (start && end && start == end &&
- ((
- wysihtml5.dom.getAttribute(start, "colspan") &&
- parseInt(wysihtml5.dom.getAttribute(start, "colspan"), 10) > 1
- ) || (
- wysihtml5.dom.getAttribute(start, "rowspan") &&
- parseInt(wysihtml5.dom.getAttribute(start, "rowspan"), 10) > 1
- ))
- ) {
- return [start];
- }
- }
- return false;
- }
-};
-;wysihtml5.commands.addTableCells = {
- exec: function(composer, command, value) {
- if (composer.tableSelection && composer.tableSelection.start && composer.tableSelection.end) {
-
- // switches start and end if start is bigger than end (reverse selection)
- var tableSelect = wysihtml5.dom.table.orderSelectionEnds(composer.tableSelection.start, composer.tableSelection.end);
- if (value == "before" || value == "above") {
- wysihtml5.dom.table.addCells(tableSelect.start, value);
- } else if (value == "after" || value == "below") {
- wysihtml5.dom.table.addCells(tableSelect.end, value);
- }
- setTimeout(function() {
- composer.tableSelection.select(tableSelect.start, tableSelect.end);
- },0);
- }
- },
-
- state: function(composer, command) {
- return false;
- }
-};
-;wysihtml5.commands.deleteTableCells = {
- exec: function(composer, command, value) {
- if (composer.tableSelection && composer.tableSelection.start && composer.tableSelection.end) {
- var tableSelect = wysihtml5.dom.table.orderSelectionEnds(composer.tableSelection.start, composer.tableSelection.end),
- idx = wysihtml5.dom.table.indexOf(tableSelect.start),
- selCell,
- table = composer.tableSelection.table;
-
- wysihtml5.dom.table.removeCells(tableSelect.start, value);
- setTimeout(function() {
- // move selection to next or previous if not present
- selCell = wysihtml5.dom.table.findCell(table, idx);
-
- if (!selCell){
- if (value == "row") {
- selCell = wysihtml5.dom.table.findCell(table, {
- "row": idx.row - 1,
- "col": idx.col
- });
- }
-
- if (value == "column") {
- selCell = wysihtml5.dom.table.findCell(table, {
- "row": idx.row,
- "col": idx.col - 1
- });
- }
- }
- if (selCell) {
- composer.tableSelection.select(selCell, selCell);
- }
- }, 0);
-
- }
- },
-
- state: function(composer, command) {
- return false;
- }
-};
-;wysihtml5.commands.indentList = {
- exec: function(composer, command, value) {
- var listEls = composer.selection.getSelectionParentsByTag('LI');
- if (listEls) {
- return this.tryToPushLiLevel(listEls, composer.selection);
- }
- return false;
- },
-
- state: function(composer, command) {
- return false;
- },
-
- tryToPushLiLevel: function(liNodes, selection) {
- var listTag, list, prevLi, liNode, prevLiList,
- found = false;
-
- selection.executeAndRestoreRangy(function() {
-
- for (var i = liNodes.length; i--;) {
- liNode = liNodes[i];
- listTag = (liNode.parentNode.nodeName === 'OL') ? 'OL' : 'UL';
- list = liNode.ownerDocument.createElement(listTag);
- prevLi = wysihtml5.dom.domNode(liNode).prev({nodeTypes: [wysihtml5.ELEMENT_NODE]});
- prevLiList = (prevLi) ? prevLi.querySelector('ul, ol') : null;
-
- if (prevLi) {
- if (prevLiList) {
- prevLiList.appendChild(liNode);
- } else {
- list.appendChild(liNode);
- prevLi.appendChild(list);
- }
- found = true;
- }
- }
-
- });
- return found;
- }
-};
-;wysihtml5.commands.outdentList = {
- exec: function(composer, command, value) {
- var listEls = composer.selection.getSelectionParentsByTag('LI');
- if (listEls) {
- return this.tryToPullLiLevel(listEls, composer);
- }
- return false;
- },
-
- state: function(composer, command) {
- return false;
- },
-
- tryToPullLiLevel: function(liNodes, composer) {
- var listNode, outerListNode, outerLiNode, list, prevLi, liNode, afterList,
- found = false,
- that = this;
-
- composer.selection.executeAndRestoreRangy(function() {
-
- for (var i = liNodes.length; i--;) {
- liNode = liNodes[i];
- if (liNode.parentNode) {
- listNode = liNode.parentNode;
-
- if (listNode.tagName === 'OL' || listNode.tagName === 'UL') {
- found = true;
-
- outerListNode = wysihtml5.dom.getParentElement(listNode.parentNode, { nodeName: ['OL', 'UL']}, false, composer.element);
- outerLiNode = wysihtml5.dom.getParentElement(listNode.parentNode, { nodeName: ['LI']}, false, composer.element);
-
- if (outerListNode && outerLiNode) {
-
- if (liNode.nextSibling) {
- afterList = that.getAfterList(listNode, liNode);
- liNode.appendChild(afterList);
- }
- outerListNode.insertBefore(liNode, outerLiNode.nextSibling);
-
- } else {
-
- if (liNode.nextSibling) {
- afterList = that.getAfterList(listNode, liNode);
- liNode.appendChild(afterList);
- }
-
- for (var j = liNode.childNodes.length; j--;) {
- listNode.parentNode.insertBefore(liNode.childNodes[j], listNode.nextSibling);
- }
-
- listNode.parentNode.insertBefore(document.createElement('br'), listNode.nextSibling);
- liNode.parentNode.removeChild(liNode);
-
- }
-
- // cleanup
- if (listNode.childNodes.length === 0) {
- listNode.parentNode.removeChild(listNode);
- }
- }
- }
- }
-
- });
- return found;
- },
-
- getAfterList: function(listNode, liNode) {
- var nodeName = listNode.nodeName,
- newList = document.createElement(nodeName);
-
- while (liNode.nextSibling) {
- newList.appendChild(liNode.nextSibling);
- }
- return newList;
- }
-
-};;/**
- * Undo Manager for wysihtml5
- * slightly inspired by http://rniwa.com/editing/undomanager.html#the-undomanager-interface
- */
-(function(wysihtml5) {
- var Z_KEY = 90,
- Y_KEY = 89,
- BACKSPACE_KEY = 8,
- DELETE_KEY = 46,
- MAX_HISTORY_ENTRIES = 25,
- DATA_ATTR_NODE = "data-wysihtml5-selection-node",
- DATA_ATTR_OFFSET = "data-wysihtml5-selection-offset",
- UNDO_HTML = '' + wysihtml5.INVISIBLE_SPACE + '',
- REDO_HTML = '' + wysihtml5.INVISIBLE_SPACE + '',
- dom = wysihtml5.dom;
-
- function cleanTempElements(doc) {
- var tempElement;
- while (tempElement = doc.querySelector("._wysihtml5-temp")) {
- tempElement.parentNode.removeChild(tempElement);
- }
- }
-
- wysihtml5.UndoManager = wysihtml5.lang.Dispatcher.extend(
- /** @scope wysihtml5.UndoManager.prototype */ {
- constructor: function(editor) {
- this.editor = editor;
- this.composer = editor.composer;
- this.element = this.composer.element;
-
- this.position = 0;
- this.historyStr = [];
- this.historyDom = [];
-
- this.transact();
-
- this._observe();
- },
-
- _observe: function() {
- var that = this,
- doc = this.composer.sandbox.getDocument(),
- lastKey;
-
- // Catch CTRL+Z and CTRL+Y
- dom.observe(this.element, "keydown", function(event) {
- if (event.altKey || (!event.ctrlKey && !event.metaKey)) {
- return;
- }
-
- var keyCode = event.keyCode,
- isUndo = keyCode === Z_KEY && !event.shiftKey,
- isRedo = (keyCode === Z_KEY && event.shiftKey) || (keyCode === Y_KEY);
-
- if (isUndo) {
- that.undo();
- event.preventDefault();
- } else if (isRedo) {
- that.redo();
- event.preventDefault();
- }
- });
-
- // Catch delete and backspace
- dom.observe(this.element, "keydown", function(event) {
- var keyCode = event.keyCode;
- if (keyCode === lastKey) {
- return;
- }
-
- lastKey = keyCode;
-
- if (keyCode === BACKSPACE_KEY || keyCode === DELETE_KEY) {
- that.transact();
- }
- });
-
- this.editor
- .on("newword:composer", function() {
- that.transact();
- })
-
- .on("beforecommand:composer", function() {
- that.transact();
- });
- },
-
- transact: function() {
- var previousHtml = this.historyStr[this.position - 1],
- currentHtml = this.composer.getValue(false, false),
- composerIsVisible = this.element.offsetWidth > 0 && this.element.offsetHeight > 0,
- range, node, offset, element, position;
-
- if (currentHtml === previousHtml) {
- return;
- }
-
- var length = this.historyStr.length = this.historyDom.length = this.position;
- if (length > MAX_HISTORY_ENTRIES) {
- this.historyStr.shift();
- this.historyDom.shift();
- this.position--;
- }
-
- this.position++;
-
- if (composerIsVisible) {
- // Do not start saving selection if composer is not visible
- range = this.composer.selection.getRange();
- node = (range && range.startContainer) ? range.startContainer : this.element;
- offset = (range && range.startOffset) ? range.startOffset : 0;
-
- if (node.nodeType === wysihtml5.ELEMENT_NODE) {
- element = node;
- } else {
- element = node.parentNode;
- position = this.getChildNodeIndex(element, node);
- }
-
- element.setAttribute(DATA_ATTR_OFFSET, offset);
- if (typeof(position) !== "undefined") {
- element.setAttribute(DATA_ATTR_NODE, position);
- }
- }
-
- var clone = this.element.cloneNode(!!currentHtml);
- this.historyDom.push(clone);
- this.historyStr.push(currentHtml);
-
- if (element) {
- element.removeAttribute(DATA_ATTR_OFFSET);
- element.removeAttribute(DATA_ATTR_NODE);
- }
-
- },
-
- undo: function() {
- this.transact();
-
- if (!this.undoPossible()) {
- return;
- }
-
- this.set(this.historyDom[--this.position - 1]);
- this.editor.fire("undo:composer");
- },
-
- redo: function() {
- if (!this.redoPossible()) {
- return;
- }
-
- this.set(this.historyDom[++this.position - 1]);
- this.editor.fire("redo:composer");
- },
-
- undoPossible: function() {
- return this.position > 1;
- },
-
- redoPossible: function() {
- return this.position < this.historyStr.length;
- },
-
- set: function(historyEntry) {
- this.element.innerHTML = "";
-
- var i = 0,
- childNodes = historyEntry.childNodes,
- length = historyEntry.childNodes.length;
-
- for (; i",
-
- constructor: function(parent, editableElement, config) {
- this.base(parent, editableElement, config);
- if (!this.config.noTextarea) {
- this.textarea = this.parent.textarea;
- } else {
- this.editableArea = editableElement;
- }
- if (this.config.contentEditableMode) {
- this._initContentEditableArea();
- } else {
- this._initSandbox();
- }
- },
-
- clear: function() {
- this.element.innerHTML = browser.displaysCaretInEmptyContentEditableCorrectly() ? "" : this.CARET_HACK;
- },
-
- getValue: function(parse, clearInternals) {
- var value = this.isEmpty() ? "" : wysihtml5.quirks.getCorrectInnerHTML(this.element);
- if (parse !== false) {
- value = this.parent.parse(value, (clearInternals === false) ? false : true);
- }
-
- return value;
- },
-
- setValue: function(html, parse) {
- if (parse) {
- html = this.parent.parse(html);
- }
-
- try {
- this.element.innerHTML = html;
- } catch (e) {
- this.element.innerText = html;
- }
- },
-
- cleanUp: function() {
- this.parent.parse(this.element);
- },
-
- show: function() {
- this.editableArea.style.display = this._displayStyle || "";
-
- if (!this.config.noTextarea && !this.textarea.element.disabled) {
- // Firefox needs this, otherwise contentEditable becomes uneditable
- this.disable();
- this.enable();
- }
- },
-
- hide: function() {
- this._displayStyle = dom.getStyle("display").from(this.editableArea);
- if (this._displayStyle === "none") {
- 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(setToEnd) {
- // IE 8 fires the focus event after .focus()
- // This is needed by our simulate_placeholder.js to work
- // therefore we clear it ourselves this time
- if (wysihtml5.browser.doesAsyncFocus() && this.hasPlaceholderSet()) {
- this.clear();
- }
-
- this.base();
-
- var lastChild = this.element.lastChild;
- if (setToEnd && lastChild && this.selection) {
- if (lastChild.nodeName === "BR") {
- this.selection.setBefore(this.element.lastChild);
- } else {
- this.selection.setAfter(this.element.lastChild);
- }
- }
- },
-
- getTextContent: function() {
- return dom.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 innerHTML = this.element.innerHTML.toLowerCase();
- return (/^(\s|
|<\/br>||<\/p>)*$/i).test(innerHTML) ||
- innerHTML === "" ||
- innerHTML === "
" ||
- innerHTML === "
" ||
- innerHTML === "
" ||
- this.hasPlaceholderSet();
- },
-
- _initContentEditableArea: function() {
- var that = this;
-
- if (this.config.noTextarea) {
- this.sandbox = new dom.ContentEditableArea(function() {
- that._create();
- }, {}, this.editableArea);
- } else {
- this.sandbox = new dom.ContentEditableArea(function() {
- that._create();
- });
- this.editableArea = this.sandbox.getContentEditable();
- dom.insert(this.editableArea).after(this.textarea.element);
- this._createWysiwygFormField();
- }
- },
-
- _initSandbox: function() {
- var that = this;
-
- this.sandbox = new dom.Sandbox(function() {
- that._create();
- }, {
- stylesheets: this.config.stylesheets
- });
- this.editableArea = this.sandbox.getIframe();
-
- var textareaElement = this.textarea.element;
- dom.insert(this.editableArea).after(textareaElement);
-
- this._createWysiwygFormField();
- },
-
- // Creates hidden field which tells the server after submit, that the user used an wysiwyg editor
- _createWysiwygFormField: function() {
- if (this.textarea.element.form) {
- var hiddenField = document.createElement("input");
- hiddenField.type = "hidden";
- hiddenField.name = "_wysihtml5_mode";
- hiddenField.value = 1;
- dom.insert(hiddenField).after(this.textarea.element);
- }
- },
-
- _create: function() {
- var that = this;
- this.doc = this.sandbox.getDocument();
- this.element = (this.config.contentEditableMode) ? this.sandbox.getContentEditable() : this.doc.body;
- if (!this.config.noTextarea) {
- this.textarea = this.parent.textarea;
- this.element.innerHTML = this.textarea.getValue(true, false);
- } else {
- this.cleanUp(); // cleans contenteditable on initiation as it may contain html
- }
-
- // Make sure our selection handler is ready
- this.selection = new wysihtml5.Selection(this.parent, this.element, this.config.uneditableContainerClassname);
-
- // Make sure commands dispatcher is ready
- this.commands = new wysihtml5.Commands(this.parent);
-
- if (!this.config.noTextarea) {
- dom.copyAttributes([
- "className", "spellcheck", "title", "lang", "dir", "accessKey"
- ]).from(this.textarea.element).to(this.element);
- }
-
- dom.addClass(this.element, this.config.composerClassName);
- //
- // Make the editor look like the original textarea, by syncing styles
- if (this.config.style && !this.config.contentEditableMode) {
- this.style();
- }
-
- this.observe();
-
- var name = this.config.name;
- if (name) {
- dom.addClass(this.element, name);
- if (!this.config.contentEditableMode) { dom.addClass(this.editableArea, name); }
- }
-
- this.enable();
-
- if (!this.config.noTextarea && this.textarea.element.disabled) {
- this.disable();
- }
-
- // Simulate html5 placeholder attribute on contentEditable element
- var placeholderText = typeof(this.config.placeholder) === "string"
- ? this.config.placeholder
- : ((this.config.noTextarea) ? this.editableArea.getAttribute("data-placeholder") : this.textarea.element.getAttribute("placeholder"));
- if (placeholderText) {
- dom.simulatePlaceholder(this.parent, this, placeholderText);
- }
-
- // Make sure that the browser avoids using inline styles whenever possible
- this.commands.exec("styleWithCSS", false);
-
- this._initAutoLinking();
- this._initObjectResizing();
- this._initUndoManager();
- this._initLineBreaking();
-
- // Simulate html5 autofocus on contentEditable element
- // This doesn't work on IOS (5.1.1)
- if (!this.config.noTextarea && (this.textarea.element.hasAttribute("autofocus") || document.querySelector(":focus") == this.textarea.element) && !browser.isIos()) {
- setTimeout(function() { that.focus(true); }, 100);
- }
-
- // IE sometimes leaves a single paragraph, which can't be removed by the user
- if (!browser.clearsContentEditableCorrectly()) {
- wysihtml5.quirks.ensureProperClearing(this);
- }
-
- // Set up a sync that makes sure that textarea and editor have the same content
- if (this.initSync && this.config.sync) {
- this.initSync();
- }
-
- // Okay hide the textarea, we are ready to go
- if (!this.config.noTextarea) { this.textarea.hide(); }
-
- // Fire global (before-)load event
- this.parent.fire("beforeload").fire("load");
- },
-
- _initAutoLinking: function() {
- var that = this,
- supportsDisablingOfAutoLinking = browser.canDisableAutoLinking(),
- supportsAutoLinking = browser.doesAutoLinkingInContentEditable();
- if (supportsDisablingOfAutoLinking) {
- this.commands.exec("autoUrlDetect", false);
- }
-
- if (!this.config.autoLink) {
- return;
- }
-
- // Only do the auto linking by ourselves when the browser doesn't support auto linking
- // OR when he supports auto linking but we were able to turn it off (IE9+)
- if (!supportsAutoLinking || (supportsAutoLinking && supportsDisablingOfAutoLinking)) {
- this.parent.on("newword:composer", function() {
- if (dom.getTextContent(that.element).match(dom.autoLink.URL_REG_EXP)) {
- that.selection.executeAndRestore(function(startContainer, endContainer) {
- var uneditables = that.element.querySelectorAll("." + that.config.uneditableContainerClassname),
- isInUneditable = false;
-
- for (var i = uneditables.length; i--;) {
- if (wysihtml5.dom.contains(uneditables[i], endContainer)) {
- isInUneditable = true;
- }
- }
-
- if (!isInUneditable) dom.autoLink(endContainer.parentNode, [that.config.uneditableContainerClassname]);
- });
- }
- });
-
- dom.observe(this.element, "blur", function() {
- dom.autoLink(that.element, [that.config.uneditableContainerClassname]);
- });
- }
-
- // Assuming we have the following:
- // http://www.google.de
- // If a user now changes the url in the innerHTML we want to make sure that
- // it's synchronized with the href attribute (as long as the innerHTML is still a url)
- var // Use a live NodeList to check whether there are any links in the document
- links = this.sandbox.getDocument().getElementsByTagName("a"),
- // The autoLink helper method reveals a reg exp to detect correct urls
- urlRegExp = dom.autoLink.URL_REG_EXP,
- getTextContent = function(element) {
- var textContent = wysihtml5.lang.string(dom.getTextContent(element)).trim();
- if (textContent.substr(0, 4) === "www.") {
- textContent = "http://" + textContent;
- }
- return textContent;
- };
-
- dom.observe(this.element, "keydown", function(event) {
- if (!links.length) {
- return;
- }
-
- var selectedNode = that.selection.getSelectedNode(event.target.ownerDocument),
- link = dom.getParentElement(selectedNode, { nodeName: "A" }, 4),
- textContent;
-
- if (!link) {
- return;
- }
-
- textContent = getTextContent(link);
- // keydown is fired before the actual content is changed
- // therefore we set a timeout to change the href
- setTimeout(function() {
- var newTextContent = getTextContent(link);
- if (newTextContent === textContent) {
- return;
- }
-
- // Only set href when new href looks like a valid url
- if (newTextContent.match(urlRegExp)) {
- link.setAttribute("href", newTextContent);
- }
- }, 0);
- });
- },
-
- _initObjectResizing: function() {
- this.commands.exec("enableObjectResizing", true);
-
- // IE sets inline styles after resizing objects
- // The following lines make sure that the width/height css properties
- // are copied over to the width/height attributes
- if (browser.supportsEvent("resizeend")) {
- var properties = ["width", "height"],
- propertiesLength = properties.length,
- element = this.element;
-
- dom.observe(element, "resizeend", function(event) {
- var target = event.target || event.srcElement,
- style = target.style,
- i = 0,
- property;
-
- if (target.nodeName !== "IMG") {
- return;
- }
-
- for (; i or tags after paste
- // Inserting an invisible white space in front of it fixes the issue
- // This is too hacky and causes selection not to replace content on paste in chrome
- /* if (browser.createsNestedInvalidMarkupAfterPaste()) {
- dom.observe(this.element, "paste", function(event) {
- var invisibleSpace = that.doc.createTextNode(wysihtml5.INVISIBLE_SPACE);
- that.selection.insertNode(invisibleSpace);
- });
- }*/
-
-
- dom.observe(this.element, "keydown", function(event) {
- var keyCode = event.keyCode;
-
- if (event.shiftKey) {
- return;
- }
-
- if (keyCode !== wysihtml5.ENTER_KEY && keyCode !== wysihtml5.BACKSPACE_KEY) {
- return;
- }
- var blockElement = dom.getParentElement(that.selection.getSelectedNode(), { nodeName: USE_NATIVE_LINE_BREAK_INSIDE_TAGS }, 4);
- if (blockElement) {
- setTimeout(function() {
- // Unwrap paragraph after leaving a list or a H1-6
- var selectedNode = that.selection.getSelectedNode(),
- list;
-
- if (blockElement.nodeName === "LI") {
- if (!selectedNode) {
- return;
- }
-
- list = dom.getParentElement(selectedNode, { nodeName: LIST_TAGS }, 2);
-
- if (!list) {
- adjust(selectedNode);
- }
- }
-
- if (keyCode === wysihtml5.ENTER_KEY && blockElement.nodeName.match(/^H[1-6]$/)) {
- adjust(selectedNode);
- }
- }, 0);
- return;
- }
-
- if (that.config.useLineBreaks && keyCode === wysihtml5.ENTER_KEY && !wysihtml5.browser.insertsLineBreaksOnReturn()) {
- event.preventDefault();
- that.commands.exec("insertLineBreak");
-
- }
- });
- }
- });
-})(wysihtml5);
-;(function(wysihtml5) {
- var dom = wysihtml5.dom,
- doc = document,
- win = window,
- HOST_TEMPLATE = doc.createElement("div"),
- /**
- * Styles to copy from textarea to the composer element
- */
- TEXT_FORMATTING = [
- "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"
- ],
- /**
- * Styles to copy from textarea to the iframe
- */
- BOX_FORMATTING = [
- "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"
- ],
- ADDITIONAL_CSS_RULES = [
- "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; }",
- wysihtml5.browser.isGecko ?
- "body.placeholder { color: graytext !important; }" :
- "body.placeholder { color: #a9a9a9 !important; }",
- // Ensure that user see's broken images and can delete them
- "img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"
- ];
-
- /**
- * With "setActive" IE offers a smart way of focusing elements without scrolling them into view:
- * http://msdn.microsoft.com/en-us/library/ms536738(v=vs.85).aspx
- *
- * Other browsers need a more hacky way: (pssst don't tell my mama)
- * In order to prevent the element being scrolled into view when focusing it, we simply
- * move it out of the scrollable area, focus it, and reset it's position
- */
- var focusWithoutScrolling = function(element) {
- if (element.setActive) {
- // Following line could cause a js error when the textarea is invisible
- // See https://github.com/xing/wysihtml5/issues/9
- try { element.setActive(); } catch(e) {}
- } else {
- var elementStyle = element.style,
- originalScrollTop = doc.documentElement.scrollTop || doc.body.scrollTop,
- originalScrollLeft = doc.documentElement.scrollLeft || doc.body.scrollLeft,
- originalStyles = {
- position: elementStyle.position,
- top: elementStyle.top,
- left: elementStyle.left,
- WebkitUserSelect: elementStyle.WebkitUserSelect
- };
-
- dom.setStyles({
- position: "absolute",
- top: "-99999px",
- left: "-99999px",
- // Don't ask why but temporarily setting -webkit-user-select to none makes the whole thing performing smoother
- WebkitUserSelect: "none"
- }).on(element);
-
- element.focus();
-
- dom.setStyles(originalStyles).on(element);
-
- if (win.scrollTo) {
- // Some browser extensions unset this method to prevent annoyances
- // "Better PopUp Blocker" for Chrome http://code.google.com/p/betterpopupblocker/source/browse/trunk/blockStart.js#100
- // Issue: http://code.google.com/p/betterpopupblocker/issues/detail?id=1
- win.scrollTo(originalScrollLeft, originalScrollTop);
- }
- }
- };
-
-
- wysihtml5.views.Composer.prototype.style = function() {
- var that = this,
- originalActiveElement = doc.querySelector(":focus"),
- textareaElement = this.textarea.element,
- hasPlaceholder = textareaElement.hasAttribute("placeholder"),
- originalPlaceholder = hasPlaceholder && textareaElement.getAttribute("placeholder"),
- originalDisplayValue = textareaElement.style.display,
- originalDisabled = textareaElement.disabled,
- displayValueForCopying;
-
- this.focusStylesHost = HOST_TEMPLATE.cloneNode(false);
- this.blurStylesHost = HOST_TEMPLATE.cloneNode(false);
- this.disabledStylesHost = HOST_TEMPLATE.cloneNode(false);
-
- // Remove placeholder before copying (as the placeholder has an affect on the computed style)
- if (hasPlaceholder) {
- textareaElement.removeAttribute("placeholder");
- }
-
- if (textareaElement === originalActiveElement) {
- textareaElement.blur();
- }
-
- // enable for copying styles
- textareaElement.disabled = false;
-
- // set textarea to display="none" to get cascaded styles via getComputedStyle
- textareaElement.style.display = displayValueForCopying = "none";
-
- if ((textareaElement.getAttribute("rows") && dom.getStyle("height").from(textareaElement) === "auto") ||
- (textareaElement.getAttribute("cols") && dom.getStyle("width").from(textareaElement) === "auto")) {
- textareaElement.style.display = displayValueForCopying = originalDisplayValue;
- }
-
- // --------- iframe styles (has to be set before editor styles, otherwise IE9 sets wrong fontFamily on blurStylesHost) ---------
- dom.copyStyles(BOX_FORMATTING).from(textareaElement).to(this.editableArea).andTo(this.blurStylesHost);
-
- // --------- editor styles ---------
- dom.copyStyles(TEXT_FORMATTING).from(textareaElement).to(this.element).andTo(this.blurStylesHost);
-
- // --------- apply standard rules ---------
- dom.insertCSS(ADDITIONAL_CSS_RULES).into(this.element.ownerDocument);
-
- // --------- :disabled styles ---------
- textareaElement.disabled = true;
- dom.copyStyles(BOX_FORMATTING).from(textareaElement).to(this.disabledStylesHost);
- dom.copyStyles(TEXT_FORMATTING).from(textareaElement).to(this.disabledStylesHost);
- textareaElement.disabled = originalDisabled;
-
- // --------- :focus styles ---------
- textareaElement.style.display = originalDisplayValue;
- focusWithoutScrolling(textareaElement);
- textareaElement.style.display = displayValueForCopying;
-
- dom.copyStyles(BOX_FORMATTING).from(textareaElement).to(this.focusStylesHost);
- dom.copyStyles(TEXT_FORMATTING).from(textareaElement).to(this.focusStylesHost);
-
- // reset textarea
- textareaElement.style.display = originalDisplayValue;
-
- dom.copyStyles(["display"]).from(textareaElement).to(this.editableArea);
-
- // Make sure that we don't change the display style of the iframe when copying styles oblur/onfocus
- // this is needed for when the change_view event is fired where the iframe is hidden and then
- // the blur event fires and re-displays it
- var boxFormattingStyles = wysihtml5.lang.array(BOX_FORMATTING).without(["display"]);
-
- // --------- restore focus ---------
- if (originalActiveElement) {
- originalActiveElement.focus();
- } else {
- textareaElement.blur();
- }
-
- // --------- restore placeholder ---------
- if (hasPlaceholder) {
- textareaElement.setAttribute("placeholder", originalPlaceholder);
- }
-
- // --------- Sync focus/blur styles ---------
- this.parent.on("focus:composer", function() {
- dom.copyStyles(boxFormattingStyles) .from(that.focusStylesHost).to(that.editableArea);
- dom.copyStyles(TEXT_FORMATTING) .from(that.focusStylesHost).to(that.element);
- });
-
- this.parent.on("blur:composer", function() {
- dom.copyStyles(boxFormattingStyles) .from(that.blurStylesHost).to(that.editableArea);
- dom.copyStyles(TEXT_FORMATTING) .from(that.blurStylesHost).to(that.element);
- });
-
- this.parent.observe("disable:composer", function() {
- dom.copyStyles(boxFormattingStyles) .from(that.disabledStylesHost).to(that.editableArea);
- dom.copyStyles(TEXT_FORMATTING) .from(that.disabledStylesHost).to(that.element);
- });
-
- this.parent.observe("enable:composer", function() {
- dom.copyStyles(boxFormattingStyles) .from(that.blurStylesHost).to(that.editableArea);
- dom.copyStyles(TEXT_FORMATTING) .from(that.blurStylesHost).to(that.element);
- });
-
- return this;
- };
-})(wysihtml5);
-;/**
- * Taking care of events
- * - Simulating 'change' event on contentEditable element
- * - Handling drag & drop logic
- * - Catch paste events
- * - Dispatch proprietary newword:composer event
- * - Keyboard shortcuts
- */
-(function(wysihtml5) {
- var dom = wysihtml5.dom,
- browser = wysihtml5.browser,
- /**
- * Map keyCodes to query commands
- */
- shortcuts = {
- "66": "bold", // B
- "73": "italic", // I
- "85": "underline" // U
- };
-
- var deleteAroundEditable = function(selection, uneditable, element) {
- // merge node with previous node from uneditable
- var prevNode = selection.getPreviousNode(uneditable, true),
- curNode = selection.getSelectedNode();
-
- if (curNode.nodeType !== 1 && curNode.parentNode !== element) { curNode = curNode.parentNode; }
- if (prevNode) {
- if (curNode.nodeType == 1) {
- var first = curNode.firstChild;
-
- if (prevNode.nodeType == 1) {
- while (curNode.firstChild) {
- prevNode.appendChild(curNode.firstChild);
- }
- } else {
- while (curNode.firstChild) {
- uneditable.parentNode.insertBefore(curNode.firstChild, uneditable);
- }
- }
- if (curNode.parentNode) {
- curNode.parentNode.removeChild(curNode);
- }
- selection.setBefore(first);
- } else {
- if (prevNode.nodeType == 1) {
- prevNode.appendChild(curNode);
- } else {
- uneditable.parentNode.insertBefore(curNode, uneditable);
- }
- selection.setBefore(curNode);
- }
- }
- };
-
- var handleDeleteKeyPress = function(event, selection, element, composer) {
- if (selection.isCollapsed()) {
- if (selection.caretIsInTheBeginnig('LI')) {
- event.preventDefault();
- composer.commands.exec('outdentList');
- } else if (selection.caretIsInTheBeginnig()) {
- event.preventDefault();
- } else {
-
- if (selection.caretIsFirstInSelection() &&
- selection.getPreviousNode() &&
- selection.getPreviousNode().nodeName &&
- (/^H\d$/gi).test(selection.getPreviousNode().nodeName)
- ) {
- var prevNode = selection.getPreviousNode();
- event.preventDefault();
- if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) {
- // heading is empty
- prevNode.parentNode.removeChild(prevNode);
- } else {
- var range = prevNode.ownerDocument.createRange();
- range.selectNodeContents(prevNode);
- range.collapse(false);
- selection.setSelection(range);
- }
- }
-
- var beforeUneditable = selection.caretIsBeforeUneditable();
- // Do a special delete if caret would delete uneditable
- if (beforeUneditable) {
- event.preventDefault();
- deleteAroundEditable(selection, beforeUneditable, element);
- }
- }
- } else {
- if (selection.containsUneditable()) {
- event.preventDefault();
- selection.deleteContents();
- }
- }
- };
-
- var handleTabKeyDown = function(composer, element) {
- if (!composer.selection.isCollapsed()) {
- composer.selection.deleteContents();
- } else if (composer.selection.caretIsInTheBeginnig('LI')) {
- if (composer.commands.exec('indentList')) return;
- }
-
- // Is close enough to tab. Could not find enough counter arguments for now.
- composer.commands.exec("insertHTML", " ");
- };
-
- wysihtml5.views.Composer.prototype.observe = function() {
- var that = this,
- state = this.getValue(false, false),
- container = (this.sandbox.getIframe) ? this.sandbox.getIframe() : this.sandbox.getContentEditable(),
- element = this.element,
- focusBlurElement = (browser.supportsEventsInIframeCorrectly() || this.sandbox.getContentEditable) ? element : this.sandbox.getWindow(),
- pasteEvents = ["drop", "paste", "beforepaste"],
- interactionEvents = ["drop", "paste", "mouseup", "focus", "keyup"];
-
- // --------- destroy:composer event ---------
- dom.observe(container, "DOMNodeRemoved", function() {
- clearInterval(domNodeRemovedInterval);
- that.parent.fire("destroy:composer");
- });
-
- // DOMNodeRemoved event is not supported in IE 8
- if (!browser.supportsMutationEvents()) {
- var domNodeRemovedInterval = setInterval(function() {
- if (!dom.contains(document.documentElement, container)) {
- clearInterval(domNodeRemovedInterval);
- that.parent.fire("destroy:composer");
- }
- }, 250);
- }
-
- // --------- User interaction tracking --
-
- dom.observe(focusBlurElement, interactionEvents, function() {
- setTimeout(function() {
- that.parent.fire("interaction").fire("interaction:composer");
- }, 0);
- });
-
-
- if (this.config.handleTables) {
- if(!this.tableClickHandle && this.doc.execCommand && wysihtml5.browser.supportsCommand(this.doc, "enableObjectResizing") && wysihtml5.browser.supportsCommand(this.doc, "enableInlineTableEditing")) {
- if (this.sandbox.getIframe) {
- this.tableClickHandle = dom.observe(container , ["focus", "mouseup", "mouseover"], function() {
- that.doc.execCommand("enableObjectResizing", false, "false");
- that.doc.execCommand("enableInlineTableEditing", false, "false");
- that.tableClickHandle.stop();
- });
- } else {
- setTimeout(function() {
- that.doc.execCommand("enableObjectResizing", false, "false");
- that.doc.execCommand("enableInlineTableEditing", false, "false");
- }, 0);
- }
- }
- this.tableSelection = wysihtml5.quirks.tableCellsSelection(element, that.parent);
- }
-
- // --------- Focus & blur logic ---------
- dom.observe(focusBlurElement, "focus", function(event) {
- that.parent.fire("focus", event).fire("focus:composer", event);
-
- // Delay storing of state until all focus handler are fired
- // especially the one which resets the placeholder
- setTimeout(function() { state = that.getValue(false, false); }, 0);
- });
-
- dom.observe(focusBlurElement, "blur", function(event) {
- if (state !== that.getValue(false, false)) {
- //create change event if supported (all except IE8)
- var changeevent = event;
- if(typeof Object.create == 'function') {
- changeevent = Object.create(event, { type: { value: 'change' } });
- }
- that.parent.fire("change", changeevent).fire("change:composer", changeevent);
- }
- that.parent.fire("blur", event).fire("blur:composer", event);
- });
-
- // --------- Drag & Drop logic ---------
- dom.observe(element, "dragenter", function() {
- that.parent.fire("unset_placeholder");
- });
-
- dom.observe(element, pasteEvents, function(event) {
- that.parent.fire(event.type, event).fire(event.type + ":composer", event);
- });
-
-
- if (this.config.copyedFromMarking) {
- // If supported the copied source is based directly on selection
- // Very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection.
- dom.observe(element, "copy", function(event) {
- if (event.clipboardData) {
- event.clipboardData.setData("text/html", that.config.copyedFromMarking + that.selection.getHtml());
- event.preventDefault();
- }
- that.parent.fire(event.type, event).fire(event.type + ":composer", event);
- });
- }
-
- // --------- neword event ---------
- dom.observe(element, "keyup", function(event) {
- var keyCode = event.keyCode;
- if (keyCode === wysihtml5.SPACE_KEY || keyCode === wysihtml5.ENTER_KEY) {
- that.parent.fire("newword:composer");
- }
- });
-
- this.parent.on("paste:composer", function() {
- setTimeout(function() { that.parent.fire("newword:composer"); }, 0);
- });
-
- // --------- Make sure that images are selected when clicking on them ---------
- if (!browser.canSelectImagesInContentEditable()) {
- dom.observe(element, "mousedown", function(event) {
- var target = event.target;
- var allImages = element.querySelectorAll('img'),
- notMyImages = element.querySelectorAll('.' + that.config.uneditableContainerClassname + ' img'),
- myImages = wysihtml5.lang.array(allImages).without(notMyImages);
-
- if (target.nodeName === "IMG" && wysihtml5.lang.array(myImages).contains(target)) {
- that.selection.selectNode(target);
- }
- });
- }
-
- if (!browser.canSelectImagesInContentEditable()) {
- dom.observe(element, "drop", function(event) {
- // TODO: if I knew how to get dropped elements list from event I could limit it to only IMG element case
- setTimeout(function() {
- that.selection.getSelection().removeAllRanges();
- }, 0);
- });
- }
-
- if (browser.hasHistoryIssue() && browser.supportsSelectionModify()) {
- dom.observe(element, "keydown", function(event) {
- if (!event.metaKey && !event.ctrlKey) {
- return;
- }
-
- var keyCode = event.keyCode,
- win = element.ownerDocument.defaultView,
- selection = win.getSelection();
-
- if (keyCode === 37 || keyCode === 39) {
- if (keyCode === 37) {
- selection.modify("extend", "left", "lineboundary");
- if (!event.shiftKey) {
- selection.collapseToStart();
- }
- }
- if (keyCode === 39) {
- selection.modify("extend", "right", "lineboundary");
- if (!event.shiftKey) {
- selection.collapseToEnd();
- }
- }
- event.preventDefault();
- }
- });
- }
-
- // --------- Shortcut logic ---------
- dom.observe(element, "keydown", function(event) {
- var keyCode = event.keyCode,
- command = shortcuts[keyCode];
- if ((event.ctrlKey || event.metaKey) && !event.altKey && command) {
- that.commands.exec(command);
- event.preventDefault();
- }
- if (keyCode === 8) {
- // delete key
- handleDeleteKeyPress(event, that.selection, element, that);
- } else if (that.config.handleTabKey && keyCode === 9) {
- event.preventDefault();
- handleTabKeyDown(that, element);
- }
- });
-
- // --------- Make sure that when pressing backspace/delete on selected images deletes the image and it's anchor ---------
- dom.observe(element, "keydown", function(event) {
- var target = that.selection.getSelectedNode(true),
- keyCode = event.keyCode,
- parent;
- if (target && target.nodeName === "IMG" && (keyCode === wysihtml5.BACKSPACE_KEY || keyCode === wysihtml5.DELETE_KEY)) { // 8 => backspace, 46 => delete
- parent = target.parentNode;
- // delete the
- parent.removeChild(target);
- // and it's parent too if it hasn't got any other child nodes
- if (parent.nodeName === "A" && !parent.firstChild) {
- parent.parentNode.removeChild(parent);
- }
-
- setTimeout(function() { wysihtml5.quirks.redraw(element); }, 0);
- event.preventDefault();
- }
- });
-
- // --------- IE 8+9 focus the editor when the iframe is clicked (without actually firing the 'focus' event on the ) ---------
- if (!this.config.contentEditableMode && browser.hasIframeFocusIssue()) {
- dom.observe(container, "focus", function() {
- setTimeout(function() {
- if (that.doc.querySelector(":focus") !== that.element) {
- that.focus();
- }
- }, 0);
- });
-
- dom.observe(this.element, "blur", function() {
- setTimeout(function() {
- that.selection.getSelection().removeAllRanges();
- }, 0);
- });
- }
-
- // --------- Show url in tooltip when hovering links or images ---------
- var titlePrefixes = {
- IMG: "Image: ",
- A: "Link: "
- };
-
- dom.observe(element, "mouseover", function(event) {
- var target = event.target,
- nodeName = target.nodeName,
- title;
- if (nodeName !== "A" && nodeName !== "IMG") {
- return;
- }
- var hasTitle = target.hasAttribute("title");
- if(!hasTitle){
- title = titlePrefixes[nodeName] + (target.getAttribute("href") || target.getAttribute("src"));
- target.setAttribute("title", title);
- }
- });
- };
-})(wysihtml5);
-;/**
- * Class that takes care that the value of the composer and the textarea is always in sync
- */
-(function(wysihtml5) {
- var INTERVAL = 400;
-
- wysihtml5.views.Synchronizer = Base.extend(
- /** @scope wysihtml5.views.Synchronizer.prototype */ {
-
- constructor: function(editor, textarea, composer) {
- this.editor = editor;
- this.textarea = textarea;
- this.composer = composer;
-
- this._observe();
- },
-
- /**
- * Sync html from composer to textarea
- * Takes care of placeholders
- * @param {Boolean} shouldParseHtml Whether the html should be sanitized before inserting it into the textarea
- */
- fromComposerToTextarea: function(shouldParseHtml) {
- this.textarea.setValue(wysihtml5.lang.string(this.composer.getValue(false, false)).trim(), shouldParseHtml);
- },
-
- /**
- * Sync value of textarea to composer
- * Takes care of placeholders
- * @param {Boolean} shouldParseHtml Whether the html should be sanitized before inserting it into the composer
- */
- fromTextareaToComposer: function(shouldParseHtml) {
- var textareaValue = this.textarea.getValue(false, false);
- if (textareaValue) {
- this.composer.setValue(textareaValue, shouldParseHtml);
- } else {
- this.composer.clear();
- this.editor.fire("set_placeholder");
- }
- },
-
- /**
- * Invoke syncing based on view state
- * @param {Boolean} shouldParseHtml Whether the html should be sanitized before inserting it into the composer/textarea
- */
- sync: function(shouldParseHtml) {
- if (this.editor.currentView.name === "textarea") {
- this.fromTextareaToComposer(shouldParseHtml);
- } else {
- this.fromComposerToTextarea(shouldParseHtml);
- }
- },
-
- /**
- * Initializes interval-based syncing
- * also makes sure that on-submit the composer's content is synced with the textarea
- * immediately when the form gets submitted
- */
- _observe: function() {
- var interval,
- that = this,
- form = this.textarea.element.form,
- startInterval = function() {
- interval = setInterval(function() { that.fromComposerToTextarea(); }, INTERVAL);
- },
- stopInterval = function() {
- clearInterval(interval);
- interval = null;
- };
-
- startInterval();
-
- if (form) {
- // If the textarea is in a form make sure that after onreset and onsubmit the composer
- // has the correct state
- wysihtml5.dom.observe(form, "submit", function() {
- that.sync(true);
- });
- wysihtml5.dom.observe(form, "reset", function() {
- setTimeout(function() { that.fromTextareaToComposer(); }, 0);
- });
- }
-
- this.editor.on("change_view", function(view) {
- if (view === "composer" && !interval) {
- that.fromTextareaToComposer(true);
- startInterval();
- } else if (view === "textarea") {
- that.fromComposerToTextarea(true);
- stopInterval();
- }
- });
-
- this.editor.on("destroy:composer", stopInterval);
- }
- });
-})(wysihtml5);
-;wysihtml5.views.Textarea = wysihtml5.views.View.extend(
- /** @scope wysihtml5.views.Textarea.prototype */ {
- name: "textarea",
-
- constructor: function(parent, textareaElement, config) {
- this.base(parent, textareaElement, config);
-
- this._observe();
- },
-
- clear: function() {
- this.element.value = "";
- },
-
- getValue: function(parse) {
- var value = this.isEmpty() ? "" : this.element.value;
- if (parse !== false) {
- value = this.parent.parse(value);
- }
- return value;
- },
-
- setValue: function(html, parse) {
- if (parse) {
- html = this.parent.parse(html);
- }
- this.element.value = html;
- },
-
- cleanUp: function() {
- var html = this.parent.parse(this.element.value);
- this.element.value = html;
- },
-
- hasPlaceholderSet: function() {
- var supportsPlaceholder = wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),
- placeholderText = this.element.getAttribute("placeholder") || null,
- value = this.element.value,
- isEmpty = !value;
- return (supportsPlaceholder && isEmpty) || (value === placeholderText);
- },
-
- isEmpty: function() {
- return !wysihtml5.lang.string(this.element.value).trim() || this.hasPlaceholderSet();
- },
-
- _observe: function() {
- var element = this.element,
- parent = this.parent,
- eventMapping = {
- focusin: "focus",
- focusout: "blur"
- },
- /**
- * Calling focus() or blur() on an element doesn't synchronously trigger the attached focus/blur events
- * This is the case for focusin and focusout, so let's use them whenever possible, kkthxbai
- */
- events = wysihtml5.browser.supportsEvent("focusin") ? ["focusin", "focusout", "change"] : ["focus", "blur", "change"];
-
- parent.on("beforeload", function() {
- wysihtml5.dom.observe(element, events, function(event) {
- var eventName = eventMapping[event.type] || event.type;
- parent.fire(eventName).fire(eventName + ":textarea");
- });
-
- wysihtml5.dom.observe(element, ["paste", "drop"], function() {
- setTimeout(function() { parent.fire("paste").fire("paste:textarea"); }, 0);
- });
- });
- }
-});
-;/**
- * WYSIHTML5 Editor
- *
- * @param {Element} editableElement Reference to the textarea which should be turned into a rich text interface
- * @param {Object} [config] See defaultConfig object below for explanation of each individual config option
- *
- * @events
- * load
- * beforeload (for internal use only)
- * focus
- * focus:composer
- * focus:textarea
- * blur
- * blur:composer
- * blur:textarea
- * change
- * change:composer
- * change:textarea
- * paste
- * paste:composer
- * paste:textarea
- * newword:composer
- * destroy:composer
- * undo:composer
- * redo:composer
- * beforecommand:composer
- * aftercommand:composer
- * enable:composer
- * disable:composer
- * change_view
- */
-(function(wysihtml5) {
- var undef;
-
- var defaultConfig = {
- // Give the editor a name, the name will also be set as class name on the iframe and on the iframe's body
- name: undef,
- // Whether the editor should look like the textarea (by adopting styles)
- style: true,
- // Id of the toolbar element, pass falsey value if you don't want any toolbar logic
- toolbar: undef,
- // Whether toolbar is displayed after init by script automatically.
- // Can be set to false if toolobar is set to display only on editable area focus
- showToolbarAfterInit: true,
- // Whether urls, entered by the user should automatically become clickable-links
- autoLink: true,
- // Includes table editing events and cell selection tracking
- handleTables: true,
- // Tab key inserts tab into text as default behaviour. It can be disabled to regain keyboard navigation
- handleTabKey: true,
- // Object which includes parser rules to apply when html gets cleaned
- // See parser_rules/*.js for examples
- parserRules: { tags: { br: {}, span: {}, div: {}, p: {} }, classes: {} },
- // Object which includes parser when the user inserts content via copy & paste. If null parserRules will be used instead
- pasteParserRulesets: null,
- // Parser method to use when the user inserts content
- parser: wysihtml5.dom.parse,
- // Class name which should be set on the contentEditable element in the created sandbox iframe, can be styled via the 'stylesheets' option
- composerClassName: "wysihtml5-editor",
- // Class name to add to the body when the wysihtml5 editor is supported
- bodyClassName: "wysihtml5-supported",
- // By default wysihtml5 will insert a
for line breaks, set this to false to use
- useLineBreaks: 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
- placeholderText: undef,
- // Whether the rich text editor should be rendered on touch devices (wysihtml5 >= 0.3.0 comes with basic support for iOS 5)
- supportTouchDevices: true,
- // Whether senseless elements (empty or without attributes) should be removed/replaced with their content
- cleanUp: true,
- // Whether to use div instead of secure iframe
- contentEditableMode: false,
- // Classname of container that editor should not touch and pass through
- // Pass false to disable
- uneditableContainerClassname: "wysihtml5-uneditable-container",
- // Browsers that support copied source handling will get a marking of the origin of the copied source (for determinig code cleanup rules on paste)
- // Also copied source is based directly on selection -
- // (very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection).
- // If falsy value is passed source override is also disabled
- copyedFromMarking: ''
- };
-
- wysihtml5.Editor = wysihtml5.lang.Dispatcher.extend(
- /** @scope wysihtml5.Editor.prototype */ {
- constructor: function(editableElement, config) {
- this.editableElement = typeof(editableElement) === "string" ? document.getElementById(editableElement) : editableElement;
- this.config = wysihtml5.lang.object({}).merge(defaultConfig).merge(config).get();
- this._isCompatible = wysihtml5.browser.supported();
-
- if (this.editableElement.nodeName.toLowerCase() != "textarea") {
- this.config.contentEditableMode = true;
- this.config.noTextarea = true;
- }
- if (!this.config.noTextarea) {
- this.textarea = new wysihtml5.views.Textarea(this, this.editableElement, this.config);
- this.currentView = this.textarea;
- }
-
- // Sort out unsupported/unwanted browsers here
- if (!this._isCompatible || (!this.config.supportTouchDevices && wysihtml5.browser.isTouchDevice())) {
- var that = this;
- setTimeout(function() { that.fire("beforeload").fire("load"); }, 0);
- return;
- }
-
- // Add class name to body, to indicate that the editor is supported
- wysihtml5.dom.addClass(document.body, this.config.bodyClassName);
-
- this.composer = new wysihtml5.views.Composer(this, this.editableElement, this.config);
- this.currentView = this.composer;
-
- if (typeof(this.config.parser) === "function") {
- this._initParser();
- }
-
- this.on("beforeload", this.handleBeforeLoad);
- },
-
- handleBeforeLoad: function() {
- if (!this.config.noTextarea) {
- this.synchronizer = new wysihtml5.views.Synchronizer(this, this.textarea, this.composer);
- }
- if (this.config.toolbar) {
- this.toolbar = new wysihtml5.toolbar.Toolbar(this, this.config.toolbar, this.config.showToolbarAfterInit);
- }
- },
-
- isCompatible: function() {
- return this._isCompatible;
- },
-
- clear: function() {
- this.currentView.clear();
- return this;
- },
-
- getValue: function(parse, clearInternals) {
- return this.currentView.getValue(parse, clearInternals);
- },
-
- setValue: function(html, parse) {
- this.fire("unset_placeholder");
-
- if (!html) {
- return this.clear();
- }
-
- this.currentView.setValue(html, parse);
- return this;
- },
-
- cleanUp: function() {
- this.currentView.cleanUp();
- },
-
- focus: function(setToEnd) {
- this.currentView.focus(setToEnd);
- return this;
- },
-
- /**
- * Deactivate editor (make it readonly)
- */
- disable: function() {
- this.currentView.disable();
- return this;
- },
-
- /**
- * Activate editor
- */
- enable: function() {
- this.currentView.enable();
- return this;
- },
-
- isEmpty: function() {
- return this.currentView.isEmpty();
- },
-
- hasPlaceholderSet: function() {
- return this.currentView.hasPlaceholderSet();
- },
-
- parse: function(htmlOrElement, clearInternals) {
- var parseContext = (this.config.contentEditableMode) ? document : ((this.composer) ? this.composer.sandbox.getDocument() : null);
- var returnValue = this.config.parser(htmlOrElement, {
- "rules": this.config.parserRules,
- "cleanUp": this.config.cleanUp,
- "context": parseContext,
- "uneditableClass": this.config.uneditableContainerClassname,
- "clearInternals" : clearInternals
- });
- if (typeof(htmlOrElement) === "object") {
- wysihtml5.quirks.redraw(htmlOrElement);
- }
- return returnValue;
- },
-
- /**
- * Prepare html parser logic
- * - Observes for paste and drop
- */
- _initParser: function() {
- var that = this,
- oldHtml,
- cleanHtml;
-
- if (wysihtml5.browser.supportsModenPaste()) {
- this.on("paste:composer", function(event) {
- event.preventDefault();
- oldHtml = wysihtml5.dom.getPastedHtml(event);
- if (oldHtml) {
- that._cleanAndPaste(oldHtml);
- }
- });
-
- } else {
- this.on("beforepaste:composer", function(event) {
- event.preventDefault();
- wysihtml5.dom.getPastedHtmlWithDiv(that.composer, function(pastedHTML) {
- if (pastedHTML) {
- that._cleanAndPaste(pastedHTML);
- }
- });
- });
-
- }
- },
-
- _cleanAndPaste: function (oldHtml) {
- var cleanHtml = wysihtml5.quirks.cleanPastedHTML(oldHtml, {
- "referenceNode": this.composer.element,
- "rules": this.config.pasteParserRulesets || [{"set": this.config.parserRules}],
- "uneditableClass": this.config.uneditableContainerClassname
- });
- this.composer.selection.deleteContents();
- this.composer.selection.insertHTML(cleanHtml);
- }
- });
-})(wysihtml5);
-;/**
- * Toolbar Dialog
- *
- * @param {Element} link The toolbar link which causes the dialog to show up
- * @param {Element} container The dialog container
- *
- * @example
- *
- * insert an image
- *
- *
- *
- *
- *
- */
-(function(wysihtml5) {
- var dom = wysihtml5.dom,
- CLASS_NAME_OPENED = "wysihtml5-command-dialog-opened",
- SELECTOR_FORM_ELEMENTS = "input, select, textarea",
- SELECTOR_FIELDS = "[data-wysihtml5-dialog-field]",
- ATTRIBUTE_FIELDS = "data-wysihtml5-dialog-field";
-
-
- wysihtml5.toolbar.Dialog = wysihtml5.lang.Dispatcher.extend(
- /** @scope wysihtml5.toolbar.Dialog.prototype */ {
- constructor: function(link, container) {
- this.link = link;
- this.container = container;
- },
-
- _observe: function() {
- if (this._observed) {
- return;
- }
-
- var that = this,
- callbackWrapper = function(event) {
- var attributes = that._serialize();
- if (attributes == that.elementToChange) {
- that.fire("edit", attributes);
- } else {
- that.fire("save", attributes);
- }
- that.hide();
- event.preventDefault();
- event.stopPropagation();
- };
-
- dom.observe(that.link, "click", function() {
- if (dom.hasClass(that.link, CLASS_NAME_OPENED)) {
- setTimeout(function() { that.hide(); }, 0);
- }
- });
-
- dom.observe(this.container, "keydown", function(event) {
- var keyCode = event.keyCode;
- if (keyCode === wysihtml5.ENTER_KEY) {
- callbackWrapper(event);
- }
- if (keyCode === wysihtml5.ESCAPE_KEY) {
- that.fire("cancel");
- that.hide();
- }
- });
-
- dom.delegate(this.container, "[data-wysihtml5-dialog-action=save]", "click", callbackWrapper);
-
- dom.delegate(this.container, "[data-wysihtml5-dialog-action=cancel]", "click", function(event) {
- that.fire("cancel");
- that.hide();
- event.preventDefault();
- event.stopPropagation();
- });
-
- var formElements = this.container.querySelectorAll(SELECTOR_FORM_ELEMENTS),
- i = 0,
- length = formElements.length,
- _clearInterval = function() { clearInterval(that.interval); };
- for (; ivalue style in an object which
- * then gets returned
- */
- _serialize: function() {
- var data = this.elementToChange || {},
- fields = this.container.querySelectorAll(SELECTOR_FIELDS),
- length = fields.length,
- i = 0;
-
- for (; ifoo
- *
- * and we have the following dialog:
- *
- *
- *
- * after calling _interpolate() the dialog will look like this
- *
- *
- *
- * Basically it adopted the attribute values into the corresponding input fields
- *
- */
- _interpolate: function(avoidHiddenFields) {
- var field,
- fieldName,
- newValue,
- focusedElement = document.querySelector(":focus"),
- fields = this.container.querySelectorAll(SELECTOR_FIELDS),
- length = fields.length,
- i = 0;
- for (; i= 11
- *
- * Note that it sends the recorded audio to the google speech recognition api:
- * http://stackoverflow.com/questions/4361826/does-chrome-have-buil-in-speech-recognition-for-input-type-text-x-webkit-speec
- *
- * Current HTML5 draft can be found here
- * http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html
- *
- * "Accessing Google Speech API Chrome 11"
- * http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/
- */
-(function(wysihtml5) {
- var dom = wysihtml5.dom;
-
- var linkStyles = {
- position: "relative"
- };
-
- var wrapperStyles = {
- left: 0,
- margin: 0,
- opacity: 0,
- overflow: "hidden",
- padding: 0,
- position: "absolute",
- top: 0,
- zIndex: 1
- };
-
- var inputStyles = {
- cursor: "inherit",
- fontSize: "50px",
- height: "50px",
- marginTop: "-25px",
- outline: 0,
- padding: 0,
- position: "absolute",
- right: "-4px",
- top: "50%"
- };
-
- var inputAttributes = {
- "x-webkit-speech": "",
- "speech": ""
- };
-
- wysihtml5.toolbar.Speech = function(parent, link) {
- var input = document.createElement("input");
- if (!wysihtml5.browser.supportsSpeechApiOn(input)) {
- link.style.display = "none";
- return;
- }
- var lang = parent.editor.textarea.element.getAttribute("lang");
- if (lang) {
- inputAttributes.lang = lang;
- }
-
- var wrapper = document.createElement("div");
-
- wysihtml5.lang.object(wrapperStyles).merge({
- width: link.offsetWidth + "px",
- height: link.offsetHeight + "px"
- });
-
- dom.insert(input).into(wrapper);
- dom.insert(wrapper).into(link);
-
- dom.setStyles(inputStyles).on(input);
- dom.setAttributes(inputAttributes).on(input);
-
- dom.setStyles(wrapperStyles).on(wrapper);
- dom.setStyles(linkStyles).on(link);
-
- var eventName = "onwebkitspeechchange" in input ? "webkitspeechchange" : "speechchange";
- dom.observe(input, eventName, function() {
- parent.execCommand("insertText", input.value);
- input.value = "";
- });
-
- dom.observe(input, "click", function(event) {
- if (dom.hasClass(link, "wysihtml5-command-disabled")) {
- event.preventDefault();
- }
-
- event.stopPropagation();
- });
- };
-})(wysihtml5);
-;/**
- * Toolbar
- *
- * @param {Object} parent Reference to instance of Editor instance
- * @param {Element} container Reference to the toolbar container element
- *
- * @example
- *
- * insert link
- * insert h1
- *
- *
- *
- */
-(function(wysihtml5) {
- var CLASS_NAME_COMMAND_DISABLED = "wysihtml5-command-disabled",
- CLASS_NAME_COMMANDS_DISABLED = "wysihtml5-commands-disabled",
- CLASS_NAME_COMMAND_ACTIVE = "wysihtml5-command-active",
- CLASS_NAME_ACTION_ACTIVE = "wysihtml5-action-active",
- dom = wysihtml5.dom;
-
- wysihtml5.toolbar.Toolbar = Base.extend(
- /** @scope wysihtml5.toolbar.Toolbar.prototype */ {
- constructor: function(editor, container, showOnInit) {
- this.editor = editor;
- this.container = typeof(container) === "string" ? document.getElementById(container) : container;
- this.composer = editor.composer;
-
- this._getLinks("command");
- this._getLinks("action");
-
- this._observe();
- if (showOnInit) { this.show(); }
-
- if (editor.config.classNameCommandDisabled != null) {
- CLASS_NAME_COMMAND_DISABLED = editor.config.classNameCommandDisabled;
- }
- if (editor.config.classNameCommandsDisabled != null) {
- CLASS_NAME_COMMANDS_DISABLED = editor.config.classNameCommandsDisabled;
- }
- if (editor.config.classNameCommandActive != null) {
- CLASS_NAME_COMMAND_ACTIVE = editor.config.classNameCommandActive;
- }
- if (editor.config.classNameActionActive != null) {
- CLASS_NAME_ACTION_ACTIVE = editor.config.classNameActionActive;
- }
-
- var speechInputLinks = this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),
- length = speechInputLinks.length,
- i = 0;
- for (; i element or wrap current selection in
- * toolbar.execCommand("formatBlock", "blockquote");
- */
- execCommand: function(command, commandValue) {
- if (this.commandsDisabled) {
- return;
- }
-
- var commandObj = this.commandMapping[command + ":" + commandValue];
-
- // Show dialog when available
- if (commandObj && commandObj.dialog && !commandObj.state) {
- commandObj.dialog.show();
- } else {
- this._execCommand(command, commandValue);
- }
- },
-
- _execCommand: function(command, commandValue) {
- // Make sure that composer is focussed (false => don't move caret to the end)
- this.editor.focus(false);
-
- this.composer.commands.exec(command, commandValue);
- this._updateLinkStates();
- },
-
- execAction: function(action) {
- var editor = this.editor;
- if (action === "change_view") {
- if (editor.textarea) {
- if (editor.currentView === editor.textarea) {
- editor.fire("change_view", "composer");
- } else {
- editor.fire("change_view", "textarea");
- }
- }
- }
- if (action == "showSource") {
- editor.fire("showSource");
- }
- },
-
- _observe: function() {
- var that = this,
- editor = this.editor,
- container = this.container,
- links = this.commandLinks.concat(this.actionLinks),
- length = links.length,
- i = 0;
-
- for (; i":">",'"':""","'":"'","`":"`"},i=/[&<>"'`]/g,j=/[&<>"'`]/;f.extend=c;var k=Object.prototype.toString;f.toString=k;var l=function(a){return"function"==typeof a};l(/x/)&&(l=function(a){return"function"==typeof a&&"[object Function]"===k.call(a)});var l;f.isFunction=l;var m=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===k.call(a):!1};return f.isArray=m,f.escapeExpression=d,f.isEmpty=e,f}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d=b.fn,e=b.inverse,f=0,g="";if(m(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(l(a))for(var h=a.length;h>f;f++)c&&(c.index=f,c.first=0===f,c.last=f===a.length-1),g+=d(a[f],{data:c});else for(var i in a)a.hasOwnProperty(i)&&(c&&(c.key=i,c.index=f,c.first=0===f),g+=d(a[i],{data:c}),f++);return 0===f&&(g=e(this)),g}),a.registerHelper("if",function(a,b){return m(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||g.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return m(a)&&(a=a.call(this)),g.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function e(a,b){p.log(a,b)}var f={},g=a,h=b,i="1.3.0";f.VERSION=i;var j=4;f.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};f.REVISION_CHANGES=k;var l=g.isArray,m=g.isFunction,n=g.toString,o="[object Object]";f.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:p,log:e,registerHelper:function(a,b,c){if(n.call(a)===o){if(c||b)throw new h("Arg not supported with multiple helpers");g.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){n.call(a)===o?g.extend(this.partials,a):this.partials[a]=b}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(p.level<=a){var c=p.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};f.logger=p,f.log=e;var q=function(a){var b={};return g.extend(b,a),b};return f.createFrame=q,f}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");var c=function(a,c,d,e,f,g){var h=b.VM.invokePartial.apply(this,arguments);if(null!=h)return h;if(b.compile){var i={helpers:e,partials:f,data:g};return f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,i)}throw new l("The partial "+c+" could not be compiled when running in runtime-only mode")},d={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=g(a,b,c):d||(d=this.programs[a]=g(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(c,e){e=e||{};var f,g,h=e.partial?e:b;e.partial||(f=e.helpers,g=e.partials);var i=a.call(d,h,c,f,g,e.data);return e.partial||b.VM.checkRevision(d.compilerInfo),i}}function f(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function g(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function h(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function i(){return""}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;return j.checkRevision=d,j.template=e,j.programWithDepth=f,j.program=g,j.invokePartial=h,j.noop=i,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,f=m}(d,a,c,b,e);return f}();this["wysihtml5"] = this["wysihtml5"] || {};
-this["wysihtml5"]["tpl"] = this["wysihtml5"]["tpl"] || {};
-
-this["wysihtml5"]["tpl"]["blockquote"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program3(depth0,data) {
-
-
- return " \n \n ";
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["color"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
- buffer += "\n \n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n \n \n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["emphasis"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n ";
- return buffer;
- }
-
- buffer += "\n \n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.bold)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.italic)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.underline)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["font-styles"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program3(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n "
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\n \n \n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["html"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program3(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["image"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
-
- return "modal-sm";
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program7(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n \n \n \n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["link"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
-
- return "modal-sm";
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program7(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n \n \n \n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n";
- return buffer;
- });
-
-this["wysihtml5"]["tpl"]["lists"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "btn-"
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
- return buffer;
- }
-
-function program3(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program5(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program7(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program9(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program11(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program13(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program15(depth0,data) {
-
-
- return "\n \n ";
- }
-
-function program17(depth0,data) {
-
-
- return "\n \n ";
- }
-
- buffer += "\n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(9, program9, data),fn:self.program(7, program7, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(13, program13, data),fn:self.program(11, program11, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n ";
- stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n \n \n \n";
- return buffer;
- });(function (factory) {
- 'use strict';
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define('bootstrap.wysihtml5', ['jquery', 'wysihtml5', 'bootstrap', 'bootstrap.wysihtml5.templates', 'bootstrap.wysihtml5.commands'], factory);
- } else {
- // Browser globals
- factory(jQuery, wysihtml5); // jshint ignore:line
- }
-}(function ($, wysihtml5) {
- 'use strict';
- var bsWysihtml5 = function($, wysihtml5) {
-
- var templates = function(key, locale, options) {
- if(wysihtml5.tpl[key]) {
- return wysihtml5.tpl[key]({locale: locale, options: options});
- }
- };
-
- var Wysihtml5 = function(el, options) {
- this.el = el;
- var toolbarOpts = $.extend(true, {}, defaultOptions, options);
- for(var t in toolbarOpts.customTemplates) {
- if (toolbarOpts.customTemplates.hasOwnProperty(t)) {
- wysihtml5.tpl[t] = toolbarOpts.customTemplates[t];
- }
- }
- this.toolbar = this.createToolbar(el, toolbarOpts);
- this.editor = this.createEditor(toolbarOpts);
- };
-
- Wysihtml5.prototype = {
-
- constructor: Wysihtml5,
-
- createEditor: function(options) {
- options = options || {};
-
- // Add the toolbar to a clone of the options object so multiple instances
- // of the WYISYWG don't break because 'toolbar' is already defined
- options = $.extend(true, {}, options);
- options.toolbar = this.toolbar[0];
-
- this.initializeEditor(this.el[0], options);
- },
-
-
- initializeEditor: function(el, options) {
- var editor = new wysihtml5.Editor(this.el[0], options);
-
- editor.on('beforeload', this.syncBootstrapDialogEvents);
- editor.on('beforeload', this.loadParserRules);
-
- // #30 - body is in IE 10 not created by default, which leads to nullpointer
- // 2014/02/13 - adapted to wysihtml5-0.4, does not work in IE
- if(editor.composer.editableArea.contentDocument) {
- this.addMoreShortcuts(editor,
- editor.composer.editableArea.contentDocument.body || editor.composer.editableArea.contentDocument,
- options.shortcuts);
- } else {
- this.addMoreShortcuts(editor, editor.composer.editableArea, options.shortcuts);
- }
-
- if(options && options.events) {
- for(var eventName in options.events) {
- if (options.events.hasOwnProperty(eventName)) {
- editor.on(eventName, options.events[eventName]);
- }
- }
- }
-
- return editor;
- },
-
- loadParserRules: function() {
- if($.type(this.config.parserRules) === 'string') {
- $.ajax({
- dataType: 'json',
- url: this.config.parserRules,
- context: this,
- error: function (jqXHR, textStatus, errorThrown) {
- console.log(errorThrown);
- },
- success: function (parserRules) {
- this.config.parserRules = parserRules;
- console.log('parserrules loaded');
- }
- });
- }
-
- if(this.config.pasteParserRulesets && $.type(this.config.pasteParserRulesets) === 'string') {
- $.ajax({
- dataType: 'json',
- url: this.config.pasteParserRulesets,
- context: this,
- error: function (jqXHR, textStatus, errorThrown) {
- console.log(errorThrown);
- },
- success: function (pasteParserRulesets) {
- this.config.pasteParserRulesets = pasteParserRulesets;
- }
- });
- }
- },
-
- //sync wysihtml5 events for dialogs with bootstrap events
- syncBootstrapDialogEvents: function() {
- var editor = this;
- $.map(this.toolbar.commandMapping, function(value) {
- return [value];
- }).filter(function(commandObj) {
- return commandObj.dialog;
- }).map(function(commandObj) {
- return commandObj.dialog;
- }).forEach(function(dialog) {
- dialog.on('show', function() {
- $(this.container).modal('show');
- });
- dialog.on('hide', function() {
- $(this.container).modal('hide');
- setTimeout(editor.composer.focus, 0);
- });
- $(dialog.container).on('shown.bs.modal', function () {
- $(this).find('input, select, textarea').first().focus();
- });
- });
- this.on('change_view', function() {
- $(this.toolbar.container.children).find('a.btn').not('[data-wysihtml5-action="change_view"]').toggleClass('disabled');
- });
- },
-
- createToolbar: function(el, options) {
- var self = this;
- var toolbar = $('
', {
- 'class' : 'wysihtml5-toolbar',
- 'style': 'display:none'
- });
- var culture = options.locale || defaultOptions.locale || 'en';
- if(!locale.hasOwnProperty(culture)) {
- console.debug('Locale \'' + culture + '\' not found. Available locales are: ' + Object.keys(locale) + '. Falling back to \'en\'.');
- culture = 'en';
- }
- var localeObject = $.extend(true, {}, locale.en, locale[culture]);
- for(var key in options.toolbar) {
- if(options.toolbar[key]) {
- toolbar.append(templates(key, localeObject, options));
- }
- }
-
- toolbar.find('a[data-wysihtml5-command="formatBlock"]').click(function(e) {
- var target = e.delegateTarget || e.target || e.srcElement,
- el = $(target),
- showformat = el.data('wysihtml5-display-format-name'),
- formatname = el.data('wysihtml5-format-name') || el.html();
- if(showformat === undefined || showformat === 'true') {
- self.toolbar.find('.current-font').text(formatname);
- }
- });
-
- toolbar.find('a[data-wysihtml5-command="foreColor"]').click(function(e) {
- var target = e.target || e.srcElement;
- var el = $(target);
- self.toolbar.find('.current-color').text(el.html());
- });
-
- this.el.before(toolbar);
-
- return toolbar;
- },
-
- addMoreShortcuts: function(editor, el, shortcuts) {
- /* some additional shortcuts */
- wysihtml5.dom.observe(el, 'keydown', function(event) {
- var keyCode = event.keyCode,
- command = shortcuts[keyCode];
- if ((event.ctrlKey || event.metaKey || event.altKey) && command && wysihtml5.commands[command]) {
- var commandObj = editor.toolbar.commandMapping[command + ':null'];
- if (commandObj && commandObj.dialog && !commandObj.state) {
- commandObj.dialog.show();
- } else {
- wysihtml5.commands[command].exec(editor.composer, command);
- }
- event.preventDefault();
- }
- });
- }
- };
-
- // these define our public api
- var methods = {
- resetDefaults: function() {
- $.fn.wysihtml5.defaultOptions = $.extend(true, {}, $.fn.wysihtml5.defaultOptionsCache);
- },
- bypassDefaults: function(options) {
- return this.each(function () {
- var $this = $(this);
- $this.data('wysihtml5', new Wysihtml5($this, options));
- });
- },
- shallowExtend: function (options) {
- var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {}, $(this).data());
- var that = this;
- return methods.bypassDefaults.apply(that, [settings]);
- },
- deepExtend: function(options) {
- var settings = $.extend(true, {}, $.fn.wysihtml5.defaultOptions, options || {});
- var that = this;
- return methods.bypassDefaults.apply(that, [settings]);
- },
- init: function(options) {
- var that = this;
- return methods.shallowExtend.apply(that, [options]);
- }
- };
-
- $.fn.wysihtml5 = function ( method ) {
- if ( methods[method] ) {
- return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
- } else if ( typeof method === 'object' || ! method ) {
- return methods.init.apply( this, arguments );
- } else {
- $.error( 'Method ' + method + ' does not exist on jQuery.wysihtml5' );
- }
- };
-
- $.fn.wysihtml5.Constructor = Wysihtml5;
-
- var defaultOptions = $.fn.wysihtml5.defaultOptions = {
- toolbar: {
- 'font-styles': true,
- 'color': false,
- 'emphasis': {
- 'small': true
- },
- 'blockquote': true,
- 'lists': true,
- 'html': false,
- 'link': true,
- 'image': true,
- 'smallmodals': false
- },
- useLineBreaks: false,
- parserRules: {
- classes: {
- 'wysiwyg-color-silver' : 1,
- 'wysiwyg-color-gray' : 1,
- 'wysiwyg-color-white' : 1,
- 'wysiwyg-color-maroon' : 1,
- 'wysiwyg-color-red' : 1,
- 'wysiwyg-color-purple' : 1,
- 'wysiwyg-color-fuchsia' : 1,
- 'wysiwyg-color-green' : 1,
- 'wysiwyg-color-lime' : 1,
- 'wysiwyg-color-olive' : 1,
- 'wysiwyg-color-yellow' : 1,
- 'wysiwyg-color-navy' : 1,
- 'wysiwyg-color-blue' : 1,
- 'wysiwyg-color-teal' : 1,
- 'wysiwyg-color-aqua' : 1,
- 'wysiwyg-color-orange' : 1
- },
- tags: {
- 'b': {},
- 'i': {},
- 'strong': {},
- 'em': {},
- 'p': {},
- 'br': {},
- 'ol': {},
- 'ul': {},
- 'li': {},
- 'h1': {},
- 'h2': {},
- 'h3': {},
- 'h4': {},
- 'h5': {},
- 'h6': {},
- 'blockquote': {},
- 'u': 1,
- 'img': {
- 'check_attributes': {
- 'width': 'numbers',
- 'alt': 'alt',
- 'src': 'url',
- 'height': 'numbers'
- }
- },
- 'a': {
- 'check_attributes': {
- 'href': 'url'
- },
- 'set_attributes': {
- 'target': '_blank',
- 'rel': 'nofollow'
- }
- },
- 'span': 1,
- 'div': 1,
- 'small': 1,
- 'code': 1,
- 'pre': 1
- }
- },
- locale: 'en',
- shortcuts: {
- '83': 'small',// S
- '75': 'createLink'// K
- }
- };
-
- if (typeof $.fn.wysihtml5.defaultOptionsCache === 'undefined') {
- $.fn.wysihtml5.defaultOptionsCache = $.extend(true, {}, $.fn.wysihtml5.defaultOptions);
- }
-
- var locale = $.fn.wysihtml5.locale = {};
- };
- bsWysihtml5($, wysihtml5);
-}));
-(function(wysihtml5) {
- wysihtml5.commands.small = {
- exec: function(composer, command) {
- return wysihtml5.commands.formatInline.exec(composer, command, "small");
- },
-
- state: function(composer, command) {
- return wysihtml5.commands.formatInline.state(composer, command, "small");
- }
- };
-})(wysihtml5);
-
-/**
- * English translation for bootstrap-wysihtml5
- */
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define('bootstrap.wysihtml5.en-US', ['jquery', 'bootstrap.wysihtml5'], factory);
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function ($) {
- $.fn.wysihtml5.locale.en = $.fn.wysihtml5.locale['en-US'] = {
- font_styles: {
- normal: 'Normal text',
- h1: 'Heading 1',
- h2: 'Heading 2',
- h3: 'Heading 3',
- h4: 'Heading 4',
- h5: 'Heading 5',
- h6: 'Heading 6'
- },
- emphasis: {
- bold: 'Bold',
- italic: 'Italic',
- underline: 'Underline',
- small: 'Small'
- },
- lists: {
- unordered: 'Unordered list',
- ordered: 'Ordered list',
- outdent: 'Outdent',
- indent: 'Indent'
- },
- link: {
- insert: 'Insert link',
- cancel: 'Cancel',
- target: 'Open link in new window'
- },
- image: {
- insert: 'Insert image',
- cancel: 'Cancel'
- },
- html: {
- edit: 'Edit HTML'
- },
- colours: {
- black: 'Black',
- silver: 'Silver',
- gray: 'Grey',
- maroon: 'Maroon',
- red: 'Red',
- purple: 'Purple',
- green: 'Green',
- olive: 'Olive',
- navy: 'Navy',
- blue: 'Blue',
- orange: 'Orange'
- }
- };
-}));
diff --git a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js b/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
deleted file mode 100644
index 58765c07..00000000
--- a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*! bootstrap3-wysihtml5-bower 2014-09-26 */
-var wysihtml5,Base,Handlebars;Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&!function(){var a=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){return a.get.call(this)},set:function(b){return a.set.call(this,b)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),wysihtml5={version:"0.4.15",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46},function(a,b){"function"==typeof define&&define.amd?define(a):b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==x||!(c!=w||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=w||!a[b])}function c(a,b){return typeof a[b]!=y}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&&D(a,C)&&F(a,B)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(c){b(window,"console")&&a(window.console,"log")&&window.console.log(c)}function h(a,b){b?window.alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported on this page in your browser. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||a+""}function l(){var b,c,d,h,j,l,m,o,p;if(!H.initialized){if(c=!1,d=!1,a(document,"createRange")&&(b=document.createRange(),D(b,A)&&F(b,z)&&(c=!0)),h=f(document),!h||"body"!=h.nodeName.toLowerCase())return i("No body element found"),void 0;if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return i("Neither Range nor TextRange are available"),void 0;H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};for(m in G)(j=G[m])instanceof n&&j.init(j,H);for(o=0,p=s.length;p>o;++o)try{s[o](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a){a=a||window,l();for(var b=0,c=t.length;c>b;++b)t[b](a)}function n(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function o(a,b,c,d){var e=new n(b,c,function(a){if(!a.initialized){a.initialized=!0;try{d(H,a),a.supported=!0}catch(c){var e="Module '"+b+"' failed to load: "+k(c);g(e)}}});G[b]=e}function p(){}function q(){}var r,s,t,u,v,w="object",x="function",y="undefined",z=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],A=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],B=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],C=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],D=d(a),E=d(b),F=d(c),G={},H={version:"1.3alpha.20140804",initialized:!1,supported:!0,util:{isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:D,areHostObjects:E,areHostProperties:F,isTextRange:e,getBody:f},features:{},modules:G,config:{alertOnFail:!0,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==y?!0:rangyAutoInitialize}};return H.fail=i,H.warn=j,{}.hasOwnProperty?H.util.extend=function(a,b,c){var d,e,f;for(f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&H.util.extend(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a}:i("hasOwnProperty not supported"),function(){var a,b,c=document.createElement("div");c.appendChild(document.createElement("span")),a=[].slice;try{1==a.call(c.childNodes,0)[0].nodeType&&(b=function(b){return a.call(b,0)})}catch(d){}b||(b=function(a){var b,c,d=[];for(b=0,c=a.length;c>b;++b)d[b]=a[b];return d}),H.util.toArray=b}(),a(document,"addEventListener")?r=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?r=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),H.util.addListener=r,s=[],H.init=l,H.addInitListener=function(a){H.initialized?a(H):s.push(a)},t=[],H.addShimListener=function(a){t.push(a)},H.shim=H.createMissingNativeApi=m,n.prototype={init:function(){var a,b,c,d,e=this.dependencies||[];for(a=0,b=e.length;b>a;++a){if(d=e[a],c=G[d],!(c&&c instanceof n))throw Error("required module '"+d+"' not found");if(c.init(),!c.supported)throw Error("required module '"+d+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,Error("Module '"+this.name+"' failed to load: "+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 Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c,d;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]),d=o(!1,a,c,b),H.initialized&&d.init()},H.createCoreModule=function(a,b,c){o(!0,a,b,c)},H.RangePrototype=p,H.rangePrototype=new p,H.selectionPrototype=new q,u=!1,v=function(){u||(u=!0,!H.initialized&&H.config.autoInitialize&&l())},typeof window==y?(i("No window found"),void 0):typeof document==y?(i("No document found"),void 0):(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",v,!1),r(window,"load",v),H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==I||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(F(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,f,g=a.cloneNode(!1);if(g.deleteData(0,b),a.deleteData(b,a.length-b),m(g,a),c)for(d=0;f=c[d++];)f.node==a&&f.offset>b?(f.node=g,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return g}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=I)return a.ownerDocument;if(typeof a.document!=I)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!=I)return c.defaultView;if(typeof c.parentWindow!=I)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=I)return a.contentDocument;if(typeof a.contentWindow!=I)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=I)return a.contentWindow;if(typeof a.contentDocument!=I)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&J.isHostMethod(a,"setTimeout")&&J.isHostObject(a,"document")}function t(a,b,c){var d;if(a?J.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){this.root=a,this._next=a}function A(a){return new z(a)}function B(a,b){this.node=a,this.offset=b}function C(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var D,E,F,G,H,I="undefined",J=a.util;J.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),J.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method"),D=document.createElement("div"),J.areHostMethods(D,["insertBefore","appendChild","cloneNode"]||!J.areHostObjects(D,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),J.isHostProperty(D,"innerHTML")||b.fail("Element is missing innerHTML property"),E=document.createTextNode("test"),J.areHostMethods(E,["splitText","deleteData","insertData","appendData","cloneNode"]||!J.areHostObjects(D,["previousSibling","nextSibling","childNodes","parentNode"])||!J.areHostProperties(E,["data"]))||b.fail("Incomplete Text Node implementation"),F=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},G=!1,function(){var b,c=document.createElement("b");c.innerHTML="1",b=c.firstChild,c.innerHTML="
",G=w(b),a.features.crashyTextNodes=G}(),typeof window.getComputedStyle!=I?H=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=I?H=function(a,b){return a.currentStyle[b]}:b.fail("No means of obtaining computed style properties found"),z.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,a)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}},B.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()}},C.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},C.prototype.toString=function(){return this.message},a.dom={arrayContains:F,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:J.getBody,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:H,fragmentFromNodeChildren:y,createIterator:A,DomPosition:B},a.DOMException=C}),H.createCoreModule("DomRange",["DomUtil"],function(a){function b(a,b){return 3!=a.nodeType&&(gb(a,b.startContainer)||gb(a,b.endContainer))}function c(a){return a.document||hb(a.startContainer)}function d(a){return new cb(a.parentNode,fb(a))}function e(a){return new cb(a.parentNode,fb(a)+1)}function f(a,b,c){var d=11==a.nodeType?a.firstChild:a;return eb(b)?c==b.length?ab.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:jb(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function g(a,b,d){if(y(a),y(b),c(b)!=c(a))throw new db("WRONG_DOCUMENT_ERR");var e=ib(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=ib(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return d?0>=e&&f>=0:0>e&&f>0}function h(a){var b,d,e,f;for(e=c(a.range).createDocumentFragment();d=a.next();){if(b=a.isPartiallySelectedSubtree(),d=d.cloneNode(!b),b&&(f=a.getSubtreeIterator(),d.appendChild(h(f)),f.detach()),10==d.nodeType)throw new db("HIERARCHY_REQUEST_ERR");e.appendChild(d)}return e}function i(a,b,c){var d,e,f,g;for(c=c||{stop:!1};f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return c.stop=!0,void 0;if(g=a.getSubtreeIterator(),i(g,b,c),g.detach(),c.stop)return}else for(d=ab.createIterator(f);e=d.next();)if(b(e)===!1)return c.stop=!0,void 0}function j(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),j(b),b.detach()):a.remove()}function k(a){for(var b,d,e=c(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),d=a.getSubtreeIterator(),b.appendChild(k(d)),d.detach()):a.remove(),10==b.nodeType)throw new db("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function l(a,b,c){var d,e,f=!(!b||!b.length),g=!!c;return f&&(d=RegExp("^("+b.join("|")+")$")),e=[],i(new n(a,!1),function(b){var h,i;(!f||d.test(b.nodeType))&&(!g||c(b))&&(h=a.startContainer,b==h&&eb(h)&&a.startOffset==h.length||(i=a.endContainer,b==i&&eb(i)&&0==a.endOffset||e.push(b)))}),e}function m(a){var b=void 0===a.getName?"Range":a.getName();return"["+b+"("+ab.inspectNode(a.startContainer)+":"+a.startOffset+", "+ab.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function n(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&&eb(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||eb(this.sc)?kb(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||eb(this.ec)?kb(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function o(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,mb(a,d))return e;e=e.parentNode}return null}}function p(a,b){if(P(a,b))throw new db("INVALID_NODE_TYPE_ERR")}function q(a,b){if(!mb(b,a.nodeType))throw new db("INVALID_NODE_TYPE_ERR")}function r(a,b){if(0>b||b>(eb(a)?a.length:a.childNodes.length))throw new db("INDEX_SIZE_ERR")}function s(a,b){if(N(a,!0)!==N(b,!0))throw new db("WRONG_DOCUMENT_ERR")}function t(a){if(O(a,!0))throw new db("NO_MODIFICATION_ALLOWED_ERR")}function u(a,b){if(!a)throw new db(b)}function v(a){return ob&&ab.isBrokenNode(a)||!mb(J,a.nodeType)&&!N(a,!0)}function w(a,b){return b<=(eb(a)?a.length:a.childNodes.length)}function x(a){return!!a.startContainer&&!!a.endContainer&&!v(a.startContainer)&&!v(a.endContainer)&&w(a.startContainer,a.startOffset)&&w(a.endContainer,a.endOffset)}function y(a){if(!x(a))throw Error("Range error: Range is no longer valid after DOM mutation ("+a.inspect()+")")}function z(a,b){var c,d,e,f,g;y(a),c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e,eb(e)&&f>0&&f0&&d=fb(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function A(a){y(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function B(a){a.START_TO_START=U,a.START_TO_END=V,a.END_TO_END=W,a.END_TO_START=X,a.NODE_BEFORE=Y,a.NODE_AFTER=Z,a.NODE_BEFORE_AND_AFTER=$,a.NODE_INSIDE=_}function C(a){B(a),B(a.prototype)}function D(a,b){return function(){var c,d,f,g,h,j,k;return y(this),c=this.startContainer,d=this.startOffset,f=this.commonAncestorContainer,g=new n(this,!0),c!==f&&(h=kb(c,f,!0),j=e(h),c=j.node,d=j.offset),i(g,t),g.reset(),k=a(g),g.detach(),b(this,c,d,c,d),k}}function E(c,f){function g(a,b){return function(c){q(c,I),q(nb(c),J);var f=(a?d:e)(c);(b?h:i)(this,f.node,f.offset)}}function h(a,b,c){var d=a.endContainer,e=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((nb(b)!=nb(d)||1==ib(b,c,d,e))&&(d=b,e=c),f(a,b,c,d,e))}function i(a,b,c){var d=a.startContainer,e=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((nb(b)!=nb(d)||-1==ib(b,c,d,e))&&(d=b,e=c),f(a,d,e,b,c))}var l=function(){};l.prototype=a.rangePrototype,c.prototype=new l,bb.extend(c.prototype,{setStart:function(a,b){p(a,!0),r(a,b),h(this,a,b)},setEnd:function(a,b){p(a,!0),r(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],d=b,e=c;switch(a.length){case 3:e=a[2];break;case 4:d=a[2],e=a[3]}f(this,b,c,d,e)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:g(!0,!0),setStartAfter:g(!1,!0),setEndBefore:g(!0,!1),setEndAfter:g(!1,!1),collapse:function(a){y(this),a?f(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):f(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){p(a,!0),f(this,a,0,a,lb(a))},selectNode:function(a){p(a,!1),q(a,I);var b=d(a),c=e(a);f(this,b.node,b.offset,c.node,c.offset)},extractContents:D(k,f),deleteContents:D(j,f),canSurroundContents:function(){var a,c;return y(this),t(this.startContainer),t(this.endContainer),a=new n(this,!0),c=a._first&&b(a._first,this)||a._last&&b(a._last,this),a.detach(),!c},splitBoundaries:function(){z(this)},splitBoundariesPreservingPositions:function(a){z(this,a)},normalizeBoundaries:function(){var a,b,c,d,e,g,h,i,j;y(this),a=this.startContainer,b=this.startOffset,c=this.endContainer,d=this.endOffset,e=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(c=a,d=a.length,a.appendData(b.data),b.parentNode.removeChild(b))},g=function(e){var f,g,h=e.previousSibling;h&&h.nodeType==e.nodeType&&(a=e,f=e.length,b=h.length,e.insertData(0,h.data),h.parentNode.removeChild(h),a==c?(d+=b,c=a):c==e.parentNode&&(g=fb(e),d==g?(c=e,d=f):d>g&&d--))},h=!0,eb(c)?c.length==d&&e(c):(d>0&&(i=c.childNodes[d-1],i&&eb(i)&&e(i)),h=!this.collapsed),h?eb(a)?0==b&&g(a):bx",R=3==Q.firstChild.nodeType}catch(pb){}a.features.htmlParsingConforms=R,S=R?function(a){var b,c=this.startContainer,d=hb(c);if(!c)throw new db("INVALID_STATE_ERR");return b=null,1==c.nodeType?b=c:eb(c)&&(b=ab.parentElement(c)),b=null===b||"HTML"==b.nodeName&&ab.isHtmlNamespace(hb(b).documentElement)&&ab.isHtmlNamespace(b)?d.createElement("body"):b.cloneNode(!1),b.innerHTML=a,ab.fragmentFromNodeChildren(b)}:function(a){var b=c(this),d=b.createElement("body");return d.innerHTML=a,ab.fragmentFromNodeChildren(d)},T=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],U=0,V=1,W=2,X=3,Y=0,Z=1,$=2,_=3,bb.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){var c,d,e,f,g,h;return y(this),s(this.startContainer,b.startContainer),g=a==X||a==U?"start":"end",h=a==V||a==U?"start":"end",c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],ib(c,d,e,f)},insertNode:function(a){if(y(this),q(a,L),t(this.startContainer),gb(a,this.startContainer))throw new db("HIERARCHY_REQUEST_ERR");var b=f(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){var a,b,d;return y(this),this.collapsed?c(this).createDocumentFragment():this.startContainer===this.endContainer&&eb(this.startContainer)?(a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=c(this).createDocumentFragment(),b.appendChild(a),b):(d=new n(this,!0),a=h(d),d.detach(),a)},canSurroundContents:function(){var a,c;return y(this),t(this.startContainer),t(this.endContainer),a=new n(this,!0),c=a._first&&b(a._first,this)||a._last&&b(a._last,this),a.detach(),!c},surroundContents:function(a){if(q(a,M),!this.canSurroundContents())throw new db("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);f(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){var a,b,d;for(y(this),a=new H(c(this)),b=T.length;b--;)d=T[b],a[d]=this[d];return a},toString:function(){var a,b,c;return y(this),a=this.startContainer,a===this.endContainer&&eb(a)?3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"":(b=[],c=new n(this,!0),i(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join(""))},compareNode:function(a){var b,c,d,e;if(y(this),b=a.parentNode,c=fb(a),!b)throw new db("NOT_FOUND_ERR");return d=this.comparePoint(b,c),e=this.comparePoint(b,c+1),0>d?e>0?$:Y:e>0?Z:_},comparePoint:function(a,b){return y(this),u(a,"HIERARCHY_REQUEST_ERR"),s(a,this.startContainer),ib(a,b,this.startContainer,this.startOffset)<0?-1:ib(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:S,toHtml:function(){return A(this)},intersectsNode:function(a,b){var d,e,f,g;return y(this),u(a,"NOT_FOUND_ERR"),hb(a)!==c(this)?!1:(d=a.parentNode,e=fb(a),u(d,"NOT_FOUND_ERR"),f=ib(d,e,this.endContainer,this.endOffset),g=ib(d,e+1,this.startContainer,this.startOffset),b?0>=f&&g>=0:0>f&&g>0)},isPointInRange:function(a,b){return y(this),u(a,"HIERARCHY_REQUEST_ERR"),s(a,this.startContainer),ib(a,b,this.startContainer,this.startOffset)>=0&&ib(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return g(this,a,!1)},intersectsOrTouchesRange:function(a){return g(this,a,!0)},intersection:function(a){var b,c,d;return this.intersectsRange(a)?(b=ib(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=ib(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange(),-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d):null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==ib(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==ib(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new db("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==_},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,lb(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b,c,d=this.cloneRange();return d.selectNode(a),b=d.getNodes([3]),b.length>0?(d.setStart(b[0],0),c=b.pop(),d.setEnd(c,c.length),this.containsRange(d)):this.containsNodeContents(a)},getNodes:function(a,b){return y(this),l(this,a,b)},getDocument:function(){return c(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var d,e,f,g=c(this),h=a.createRange(g);return b=b||ab.getBody(g),h.selectNodeContents(b),d=this.intersection(h),e=0,f=0,d&&(h.setEnd(d.startContainer,d.startOffset),e=(""+h).length,f=e+(""+d).length),{start:e,end:f,containerNode:b}},moveToBookmark:function(a){var b,c,d,e,f,g,h,i=a.containerNode,j=0;for(this.setStart(i,0),this.collapse(!0),b=[i],d=!1,e=!1;!e&&(c=b.pop());)if(3==c.nodeType)f=j+c.length,!d&&a.start>=j&&a.start<=f&&(this.setStart(c,a.start-j),d=!0),d&&a.end>=j&&a.end<=f&&(this.setEnd(c,a.end-j),e=!0),j=f;else for(h=c.childNodes,g=h.length;g--;)b.push(h[g])},getName:function(){return"DomRange"},equals:function(a){return H.rangesEqual(this,a)},isValid:function(){return x(this)},inspect:function(){return m(this)},detach:function(){}}),E(H,G),bb.extend(H,{rangeProperties:T,RangeIterator:n,copyComparisonConstants:C,createPrototypeRange:E,inspect:m,toHtml:A,getRangeDocument:c,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=H}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e,f,g,h,i,j,k=a.dom,l=a.util,m=k.DomPosition,n=a.DomRange,o=k.getBody,p=k.getContentDocument,q=k.isCharacterDataNode;a.features.implementsDomRange&&!function(){function d(a){for(var b,c=s.length;c--;)b=s[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function e(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 f,g,h,i,j,m,q,r,s=n.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},n.createPrototypeRange(c,e),f=c.prototype,f.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},f.cloneContents=function(){return this.nativeRange.cloneContents()},f.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},f.collapse=function(a){this.nativeRange.collapse(a),d(this)},f.cloneRange=function(){return new c(this.nativeRange.cloneRange())},f.refresh=function(){d(this)},f.toString=function(){return""+this.nativeRange},h=document.createTextNode("test"),o(document).appendChild(h),i=document.createRange(),i.setStart(h,0),i.setEnd(h,0);try{i.setStart(h,1),f.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},f.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},g=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(t){f.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},f.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},g=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}f.setStartBefore=g("setStartBefore","setEndBefore"),f.setStartAfter=g("setStartAfter","setEndAfter"),f.setEndBefore=g("setEndBefore","setStartBefore"),f.setEndAfter=g("setEndAfter","setStartAfter"),f.selectNodeContents=function(a){this.setStartAndEnd(a,0,k.getNodeLength(a))},i.selectNodeContents(h),i.setEnd(h,3),j=document.createRange(),j.selectNodeContents(h),j.setEnd(h,4),j.setStart(h,2),f.compareBoundaryPoints=-1==i.compareBoundaryPoints(i.START_TO_END,j)&&1==i.compareBoundaryPoints(i.END_TO_START,j)?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)}:function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)},m=document.createElement("div"),m.innerHTML="123",q=m.firstChild,r=o(document),r.appendChild(m),i.setStart(q,1),i.setEnd(q,2),i.deleteContents(),"13"==q.data&&(f.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},f.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),r.removeChild(m),r=null,l.isHostMethod(i,"createContextualFragment")&&(f.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),o(document).removeChild(h),f.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=p(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange&&(e=function(a){var b,c,d,e=a.parentElement(),f=a.duplicate();return f.collapse(!0),b=f.parentElement(),f=a.duplicate(),f.collapse(!1),c=f.parentElement(),d=b==c?b:k.getCommonAncestor(b,c),d==e?d:k.getCommonAncestor(e,d)},f=function(a){return 0==a.compareEndPoints("StartToEnd",a)},g=function(a,b,c,d,e){var f,g,h,i,j,l,n,o,p,r,s,t,u,v,w,x,y=a.duplicate();if(y.collapse(c),f=y.parentElement(),k.isOrIsAncestorOf(b,f)||(f=b),!f.canHaveHTML)return g=new m(f.parentNode,k.getNodeIndex(f)),{boundaryPosition:g,nodeInfo:{nodeIndex:g.offset,containerElement:g.node}};for(h=k.getDocument(f).createElement("span"),h.parentNode&&h.parentNode.removeChild(h),j=c?"StartToStart":"StartToEnd",r=e&&e.containerElement==f?e.nodeIndex:0,s=f.childNodes.length,t=s,u=t;;){if(u==s?f.appendChild(h):f.insertBefore(h,f.childNodes[u]),y.moveToElementText(h),i=y.compareEndPoints(j,a),0==i||r==t)break;if(-1==i){if(t==r+1)break;r=u}else t=t==r+1?r:u;u=Math.floor((r+t)/2),f.removeChild(h)}if(p=h.nextSibling,-1==i&&p&&q(p)){if(y.setEndPoint(c?"EndToStart":"EndToEnd",a),/[\r\n]/.test(p.data))for(w=y.duplicate(),x=w.text.replace(/\r\n/g,"\r").length,v=w.moveStart("character",x);-1==(i=w.compareEndPoints("StartToEnd",w));)v++,w.moveStart("character",1);else v=y.text.length;o=new m(p,v)}else l=(d||!c)&&h.previousSibling,n=(d||c)&&h.nextSibling,o=n&&q(n)?new m(n,0):l&&q(l)?new m(l,l.data.length):new m(f,k.getNodeIndex(h));return h.parentNode.removeChild(h),{boundaryPosition:o,nodeInfo:{nodeIndex:u,containerElement:f}}},h=function(a,b){var c,d,e,f,g=a.offset,h=k.getDocument(a.node),i=o(h).createTextRange(),j=q(a.node);return j?(c=a.node,d=c.parentNode):(f=a.node.childNodes,c=gb;++b)if(!A.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&&void 0!==a.text}function o(a,b){var c=new E(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){var c,d,e,f;if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else if(c=b.docSelection.createRange(),n(c))o(b,c);else{for(b.rangeCount=c.length,e=L(c.item(0)),f=0;fd;++d)i.add(f.item(d));try{i.add(g)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}i.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=bb.length;e--;)if(c=bb[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(bb.splice(e,1),!0):d;return"deleteAll"==b&&(bb.length=0),null}function u(a,c){var d,e,f,g=L(c[0].startContainer),h=M(g).createControlRange();for(d=0,f=c.length;f>d;++d){e=m(c[d]);try{h.add(e)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}h.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new F("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,d=[],e=new G(a.anchorNode,a.anchorOffset),f=new G(a.focusNode,a.focusOffset),g="function"==typeof a.getName?a.getName():"Selection";if(void 0!==a.rangeCount)for(b=0,c=a.rangeCount;c>b;++b)d[b]=D.inspect(a.getRangeAt(b));return"["+g+"(Ranges: "+d.join(", ")+")(anchor: "+e.inspect()+", focus: "+f.inspect()+"]"}var y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb;if(a.config.checkSelectionRanges=!0,y="boolean",z="number",A=a.dom,B=a.util,C=B.isHostMethod,D=a.DomRange,E=a.WrappedRange,F=a.DOMException,G=A.DomPosition,J=a.features,K="Control",L=A.getDocument,M=A.getBody,N=D.rangesEqual,O=C(window,"getSelection"),P=B.isHostObject(document,"selection"),J.implementsWinGetSelection=O,J.implementsDocSelection=P,Q=P&&(!O||a.config.preferTextRange),Q?(H=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b}):O?(H=e,a.isSelectionValid=function(){return!0}):b.fail("Neither document.selection or window.getSelection() detected."),a.getNativeSelection=H,R=H(),S=a.createNativeRange(document),T=M(document),U=B.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]),J.selectionHasAnchorAndFocus=U,V=C(R,"extend"),J.selectionHasExtend=V,W=typeof R.rangeCount==z,J.selectionHasRangeCount=W,X=!1,Y=!0,Z=V?function(b,c){var d=D.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null,B.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==z&&J.implementsDomRange&&!function(){var b,c,d,e,f,h,i,j,k,l,m,n=window.getSelection();if(n){for(b=n.rangeCount,c=b>1,d=[],e=g(n),f=0;b>f;++f)d[f]=n.getRangeAt(f);for(h=M(document),i=h.appendChild(document.createElement("div")),i.contentEditable="false",j=i.appendChild(document.createTextNode(" ")),k=document.createRange(),k.setStart(j,1),k.collapse(!0),n.addRange(k),Y=1==n.rangeCount,n.removeAllRanges(),c||(l=window.navigator.appVersion.match(/Chrome\/(.*?) /),l&&parseInt(l[1])>=36?X=!1:(m=k.cloneRange(),k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),n.addRange(k),n.addRange(m),X=2==n.rangeCount)),h.removeChild(i),n.removeAllRanges(),f=0;b>f;++f)0==f&&e?Z?Z(n,d[f]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),n.addRange(d[f])):n.addRange(d[f])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y,$=!1,T&&C(T,"createControlRange")&&(_=T.createControlRange(),B.areHostProperties(_,["item","add"])&&($=!0)),J.implementsControlRange=$,I=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1},C(R,"getRangeAt")?ab=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(ab=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,bb=[],cb=function(a){var b,c,e;return a&&a instanceof r?(a.refresh(),a):(a=d(a,"getNativeSelection"),b=t(a),c=H(a),e=P?f(a):null,b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),bb.push({win:a,selection:b})),b)},a.getSelection=cb,a.getIframeSelection=function(c){return b.deprecationNotice("getIframeSelection()","getSelection(iframeEl)"),a.getSelection(A.getIframeWindow(c))},db=r.prototype,!Q&&U&&B.areHostMethods(R,["removeAllRanges","addRange"]))db.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)},eb=function(a,b){Z(a.nativeSelection,b),a.refresh()},db.addRange=W?function(b,d){var e,f;$&&P&&this.docSelection.type==K?q(this,b):c(d)&&V?eb(this,b):(X?e=this.rangeCount:(this.removeAllRanges(),e=0),this.nativeSelection.addRange(k(b).cloneRange()),this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1?(a.config.checkSelectionRanges&&(f=ab(this.nativeSelection,this.rangeCount-1),f&&!N(f,b)&&(b=new E(f))),this._ranges[this.rangeCount-1]=b,h(this,b,hb(this.nativeSelection)),this.isCollapsed=I(this)):this.refresh())}:function(a,b){c(b)&&V?eb(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},db.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(!(C(R,"empty")&&C(S,"select")&&$&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;db.removeAllRanges=function(){var a,b,c;try{this.docSelection.empty(),"None"!=this.docSelection.type&&(this.anchorNode?a=L(this.anchorNode):this.docSelection.type==K&&(b=this.docSelection.createRange(),b.length&&(a=L(b.item(0)))),a&&(c=M(a).createTextRange(),c.select(),this.docSelection.empty()))}catch(d){}j(this)},db.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))},db.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}if(db.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new F("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()},Q)fb=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(C(R,"getRangeAt")&&typeof R.rangeCount==z)fb=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],hb(b.nativeSelection)),b.isCollapsed=I(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=y||typeof S.collapsed!=y||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fb=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=ab(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=I(a)):j(a)}}db.refresh=function(a){var b,c=a?this._ranges.slice(0):null,d=this.anchorNode,e=this.anchorOffset;if(fb(this),a){if(b=c.length,b!=this._ranges.length)return!0;if(this.anchorNode!=d||this.anchorOffset!=e)return!0;for(;b--;)if(!N(c[b],this._ranges[b]))return!0;return!1}},gb=function(a,b){var c,d,e=a.getAllRanges();for(a.removeAllRanges(),c=0,d=e.length;d>c;++c)N(b,e[c])||a.addRange(e[c]);a.rangeCount||j(a)},db.removeRange=$&&P?function(a){var b,c,d,e,f,g,h,i;if(this.docSelection.type==K){for(b=this.docSelection.createRange(),c=m(a),d=L(b.item(0)),e=M(d).createControlRange(),g=!1,h=0,i=b.length;i>h;++h)f=b.item(h),f!==c||g?e.add(b.item(h)):g=!0;e.select(),p(this)}else gb(this,a)}:function(a){gb(this,a)},!Q&&U&&J.implementsDomRange?(hb=g,db.isBackward=function(){return hb(this)}):hb=db.isBackward=function(){return!1},db.isBackwards=db.isBackward,db.toString=function(){var a,b,c=[];for(a=0,b=this.rangeCount;b>a;++a)c[a]=""+this._ranges[a];return c.join("")},db.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},db.collapseToStart=function(){if(!this.rangeCount)throw new F("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},db.collapseToEnd=function(){if(!this.rangeCount)throw new F("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},db.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},db.deleteFromDocument=function(){var a,b,c,d,e;if($&&P&&this.docSelection.type==K){for(a=this.docSelection.createRange();a.length;)b=a.item(0),a.remove(b),b.parentNode.removeChild(b);this.refresh()}else if(this.rangeCount&&(c=this.getAllRanges(),c.length)){for(this.removeAllRanges(),d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}},db.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},db.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},db.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},db.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b))}),c},db.setStart=w(!0),db.setEnd=w(!1),a.rangePrototype.select=function(a){cb(this.getDocument()).setSingleRange(this,a)},db.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)},db.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},db.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},db.moveToBookmark=function(b){var c,d,e,f=[];for(c=0;d=b.rangeBookmarks[c++];)e=a.createRange(this.win),e.moveToBookmark(d),f.push(e);b.backward?this.setSingleRange(f[0],"backward"):this.setRanges(f)},db.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(D.toHtml(b))}),a.join("")},J.implementsTextRange&&(db.getNativeTextRange=function(){var c,d;if(c=this.docSelection){if(d=c.createRange(),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")}),db.getName=function(){return"WrappedSelection"},db.inspect=function(){return x(this)},db.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=db,a.addShimListener(function(a){void 0===a.getSelection&&(a.getSelection=function(){return cb(a)}),a=null})}),H)},this),function(a,b){"function"==typeof define&&define.amd?define(["rangy"],a):a(b.rangy)}(function(a){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(p)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),g.parentNode.removeChild(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;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:c,toString:function(){return"original text: '"+h+"', new text: '"+b+"'"}})}function h(d,f){var g,h,i,j=d.document;return void 0===f&&(f=!0),g=a.createRange(j),d.collapsed?(h=c(d.markerId,j),h?(h.style.display="inline",i=h.previousSibling,i&&3==i.nodeType?(h.parentNode.removeChild(h),g.collapseToPoint(i,i.length)):(g.collapseBefore(h),h.parentNode.removeChild(h))):b.warn("Marker element has been removed. Cannot restore selection.")):(e(j,g,d.startMarkerId,!0),e(j,g,d.endMarkerId,!1)),f&&g.normalizeBoundaries(),g}function i(b,d){var e,h,i,j,k=[];for(b=b.slice(0),b.sort(f),i=0,j=b.length;j>i;++i)k[i]=g(b[i],d);for(i=j-1;i>=0;--i)e=b[i],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(k[i].markerId,h)):(e.setEndBefore(c(k[i].endMarkerId,h)),e.setStartAfter(c(k[i].startMarkerId,h)));return k}function j(c){var d,e,f,g;return a.isSelectionValid(c)?(d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f),f?d.setSingleRange(e[0],"backward"):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}):(b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null)}function k(a){var b,c=[],d=a.length;for(b=d-1;b>=0;b--)c[b]=h(a[b],!0);return c}function l(b,c){var d,e,f,g;b.restored||(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&&d.parentNode.removeChild(d)}function n(a){var b,c,d,e=a.rangeInfos;for(b=0,c=e.length;c>b;++b)d=e[b],d.collapsed?m(a.doc,d.markerId):(m(a.doc,d.startMarkerId),m(a.doc,d.endMarkerId))}var o=a.dom,p="";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})})},this),Base=function(){},Base.extend=function(a,b){var c,d,e,f=Base.prototype.extend;return Base._prototyping=!0,c=new this,f.call(c,a),c.base=function(){},delete Base._prototyping,d=c.constructor,e=c.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==e)this._constructing=!0,d.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||f).call(arguments[0],c)},e.ancestor=this,e.extend=this.extend,e.forEach=this.forEach,e.implement=this.implement,e.prototype=c,e.toString=this.toString,e.valueOf=function(a){return"object"==a?e:d.valueOf()},f.call(e,b),"function"==typeof e.init&&e.init(),e},Base.prototype={extend:function(a,b){var c,d,e,f,g,h,i;if(arguments.length>1)c=this[a],!c||"function"!=typeof b||c.valueOf&&c.valueOf()==b.valueOf()||!/\bbase\b/.test(b)||(d=b.valueOf(),b=function(){var a,b=this.base||Base.prototype.base;return this.base=c,a=d.apply(this,arguments),this.base=b,a},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString),this[a]=b;else if(a){for(e=Base.prototype.extend,Base._prototyping||"function"==typeof this||(e=this.extend||e),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(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;aa:">"===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()},hasCurrentStyleProperty:function(){return"currentStyle"in e},hasHistoryIssue:function(){return f&&"Mac"===navigator.platform.substr(0,3)},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!==(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()},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},supportsModenPaste:function(){return!("clipboardData"in window)}}}(),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=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+="",{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,d,e=(b.match(j)||[])[1]||"",f=l[e];return b=b.replace(j,""),b.split(f).length>b.split(e).length&&(b+=e,e=""),c=b,d=b,b.length>k&&(d=d.substr(0,k)+"..."),"www."===c.substr(0,4)&&(c="http://"+c),''+d+""+e})}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 e(b),void 0;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):(b.hasClass(a,c)||(a.className+=" "+c),void 0)},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):(a.className=a.className.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," "),void 0)},b.hasClass=function(a,b){var c,d=a.classList;return d?d.contains(b):(c=a.className,c.length>0&&(c==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(c)))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){return b.nodeType!==wysihtml5.ELEMENT_NODE&&(b=b.parentNode),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],void 0!==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(b,c,d,e){return a.dom.observe(b,d,function(d){for(var f=d.target,g=a.lang.array(b.querySelectorAll(c));f&&f!==b;){if(g.contains(f)){e.call(f,d);break}f=f.parentNode}})}}(wysihtml5),function(a){a.dom.domNode=function(b){var c=[a.ELEMENT_NODE,a.TEXT_NODE],d=function(b){return b.nodeType===a.TEXT_NODE&&/^\s*$/g.test(b.data)};return{prev:function(e){var f=b.previousSibling,g=e&&e.nodeTypes?e.nodeTypes:c;return f?!a.lang.array(g).contains(f.nodeType)||e&&e.ignoreBlankTexts&&d(f)?a.dom.domNode(f).prev(e):f:null},next:function(e){var f=b.nextSibling,g=e&&e.nodeTypes?e.nodeTypes:c;return f?!a.lang.array(g).contains(f.nodeType)||e&&e.ignoreBlankTexts&&d(f)?a.dom.domNode(f).next(e):f:null}}}}(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(){function a(a,b){return b&&b.length?"string"==typeof b?a===b:wysihtml5.lang.array(b).contains(a):!0}function b(a){return a.nodeType===wysihtml5.ELEMENT_NODE}function c(a,b,c){var d=(a.className||"").match(c)||[];return b?d[d.length-1]===b:!!d.length}function d(a,b,c){var d=(a.getAttribute("style")||"").match(c)||[];return b?d[d.length-1]===b:!!d.length}return function(e,f,g,h){var i=f.cssStyle||f.styleRegExp,j=f.className||f.classRegExp;for(g=g||50;g--&&e&&"BODY"!==e.nodeName&&(!h||e!==h);){if(b(e)&&a(e.nodeName,f.nodeName)&&(!i||d(e,f.cssStyle,f.styleRegExp))&&(!j||c(e,f.className,f.classRegExp)))return e;e=e.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){var e,f,g,h,i,j,k,l,m;if(d.nodeType===wysihtml5.ELEMENT_NODE){if(e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f],i)return i;if(h)try{return h[f]}catch(n){}return j=e.defaultView||e.parentWindow,k=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName,j.getComputedStyle?(k&&(l=g.overflow,g.overflow="hidden"),m=j.getComputedStyle(d,null).getPropertyValue(c),k&&(g.overflow=l||""),m):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,d,e=b.createElement("style");return e.type="text/css",e.styleSheet?e.styleSheet.cssText=a:e.appendChild(b.createTextNode(a)),c=b.querySelector("head link"),c?(c.parentNode.insertBefore(e,c),void 0):(d=b.querySelector("head"),d&&d.appendChild(e),void 0)}}},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(){var c=b.ownerDocument,e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&!d(e)&&a.dom.insert(c.createElement("br")).after(b),f&&!d(f)&&a.dom.insert(c.createElement("br")).before(b)},remove:function(){var d=a.dom.domNode(b).next({ignoreBlankTexts:!0}),e=a.dom.domNode(b).prev({ignoreBlankTexts:!0});d&&c(d)&&d.parentNode.removeChild(d),e&&c(e)&&e.parentNode.removeChild(e)}}}}(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){var c,f,g,h,i,j,k,l,m;for(wysihtml5.lang.object(t).merge(s).merge(b.rules).get(),c=b.context||a.ownerDocument||document,f=c.createDocumentFragment(),g="string"==typeof a,h=!1,b.clearInternals===!0&&(h=!0),i=g?wysihtml5.dom.getAsDom(a,c):a,t.selectors&&e(i,t.selectors);i.firstChild;)k=i.firstChild,j=d(k,b.cleanUp,h,b.uneditableClass),j&&f.appendChild(j),k!==j&&i.removeChild(k);if(b.unjoinNbsps)for(l=wysihtml5.dom.getTextNodes(f),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return i.innerHTML="",i.appendChild(f),g?wysihtml5.quirks.getCorrectInnerHTML(i):i}function d(a,b,c,e){var f,g,h,i=a.nodeType,j=a.childNodes,k=j.length,l=p[i],m=0;if(e&&1===i&&wysihtml5.dom.hasClass(a,e))return a;if(g=l&&l(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),m=k;m--;)j[m]&&(h=d(j[m],b,c,e),h&&(j[m]===h&&m--,f.insertBefore(h,f.firstChild)));return"block"===wysihtml5.dom.getStyle("display").from(a)&&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(m=0;k>m;m++)j[m]&&(h=d(j[m],b,c,e),h&&(j[m]===h&&m--,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,f;for(c in b)if(b.hasOwnProperty(c))for(wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c),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,i,j,k=a.getAttribute("class"),l=a.getAttribute("style");if(b.methods)for(h in b.methods)if(b.methods.hasOwnProperty(h)&&y[h]&&y[h](a))return!0;if(k&&b.classes)for(k=k.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=k.length,i=0;c>i;i++)if(b.classes[k[i]])return!0;if(l&&b.styles){l=l.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(j=l.length;j--;)if(g=l[j].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,d=[];for(c in b)b.hasOwnProperty(c)&&0===c.indexOf(a)&&d.push(c);return d}function k(a,b,c,d){var e,f=v[c];return f&&(b||"alt"===a&&"IMG"==d)&&(e=f(b),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f,g,h=wysihtml5.lang.object(t.attributes||{}).clone(),i=wysihtml5.lang.object(h).merge(wysihtml5.lang.object(b||{}).clone()).get(),l={},m=wysihtml5.dom.getAttributes(a);for(c in i)if(/\*$/.test(c))for(e=j(c.slice(0,-1),m),f=0,g=e.length;g>f;f++)d=k(e[f],m[e[f]],i[c],a.nodeName),d!==!1&&(l[e[f]]=d);else d=k(c,m[c],i[c],a.nodeName),d!==!1&&(l[c]=d);return l}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&&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{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&&(void 0!==j.width&&b.setAttribute("width",j.width),void 0!==j.height&&b.setAttribute("height",j.height))}function n(a){var b,c=a.nextSibling;return c&&c.nodeType===wysihtml5.TEXT_NODE?(c.data=a.data.replace(u,"")+c.data.replace(u,""),void 0):(b=a.data.replace(u,""),a.ownerDocument.createTextNode(b))}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=/\uFEFF/g,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:)/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){return b?b.replace(a,""):""}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),any:function(){return function(a){return a}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[(b+"").toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[(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[(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[(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[(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&&""===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.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return a.parentNode.removeChild(a),void 0;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=a.ownerDocument,m=l.createDocumentFragment(),n=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0});if(e)for(!n||b(n)||c(n)||d(m);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild;f=k.firstChild;)h=f===g,i=h&&!b(f)&&!c(f),m.appendChild(f),i&&d(m);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;)m.appendChild(f);else{for(j=l.createElement("p");f=k.firstChild;)j.appendChild(f);m.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(m,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.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 Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className="wysihtml5-sandbox",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){var g,h,i,j,k,l,m;if(a.dom.contains(b.documentElement,f)){if(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}),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 Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){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)}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,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},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.element=d?this._bindElement(d):this._createElement()},_createElement:function(){var a=b.createElement("div");return a.className="wysihtml5-sandbox",this._loadElement(a),a},_bindElement:function(a){return a.className=a.className&&""!=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c,d=this;b||(c=this._getHtml(),a.innerHTML=c),this.getWindow=function(){return a.ownerDocument.defaultView},this.getDocument=function(){return a.ownerDocument},this.loaded=!0,setTimeout(function(){d.callback(d)},0)},_getHtml:function(){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,d=b.style;if("string"==typeof a)return d.cssText+=";"+a,void 0;for(c in a)"float"===c?(d.cssFloat=a[c],d.styleFloat=a[c]):d[c]=a[c]}}},function(a){a.simulatePlaceholder=function(b,c,d){var e="placeholder",f=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,e)},g=function(){c.isEmpty()&&(c.placeholderSet=!0,c.setValue(d),a.addClass(c.element,e))};b.on("set_placeholder",g).on("unset_placeholder",f).on("focus:composer",f).on("paste:composer",f).on("blur:composer",g),g()}}(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,d,e,f=!wysihtml5.browser.supportsGetAttributeCorrectly();return b=b.toLowerCase(),c=a.nodeName,"IMG"==c&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0?a.src:f&&"outerHTML"in a?(d=a.outerHTML.toLowerCase(),e=-1!=d.indexOf(" "+b+"="),e?a.getAttribute(b):null):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){var c,d,e,f,g=[];for(d=0,e=a.length;e>d;d++)if(c=a[d].querySelectorAll(b),c)for(f=c.length;f--;g.unshift(c[f]));return g}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,{nodeName:["TABLE"]})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){var g,i,j=[],k=c+(f?parseInt(f,10)-1:0),l=d+(e?parseInt(e,10)-1:0);for(g=c;k>=g;g++)for(void 0===b[g]&&(b[g]=[]),i=d;l>=i;i++)b[g][i]=new h(a),b[g][i].isColspan=e&&parseInt(e,10)>1,b[g][i].isRowspan=f&&parseInt(f,10)>1,b[g][i].firstCol=i==d,b[g][i].lastCol=i==l,b[g][i].firstRow=g==c,b[g][i].lastRow=g==k,b[g][i].isReal=i==d&&g==c,b[g][i].spanCollection=j,j.push(b[g][i])},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){var b,c,d=this.map.length,e=this.map&&this.map[0]?this.map[0].length:0;for(b=0;d>b;b++)for(c=0;e>c;c++)if(this.map[b][c].el===a)return{row:b,col:c};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,c,d,e,f,g,h=[];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)&&(b=this.idx_start,this.idx_start=this.idx_end,this.idx_end=b),this.idx_start.col>this.idx_end.col&&(c=this.idx_start.col,this.idx_start.col=this.idx_end.col,this.idx_end.col=c),null!=this.idx_start&&null!=this.idx_end)for(d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)h.push(this.map[d][f].el);return h},orderSelectionEnds:function(a){var b,c;return 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)&&(b=this.idx_start,this.idx_start=this.idx_end,this.idx_end=b),this.idx_start.col>this.idx_end.col&&(c=this.idx_start.col,this.idx_start.col=this.idx_end.col,this.idx_end.col=c),{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){var d,e,f,g=this.table.ownerDocument,h=g.createDocumentFragment();for(e=0;b>e;e++){if(d=g.createElement(a),c)for(f in c)c.hasOwnProperty(f)&&d.setAttribute(f,c[f]);d.appendChild(document.createTextNode(" ")),h.appendChild(d)}return h},correctColIndexForUnreals:function(a,b){var c,d,e=this.map[b],f=-1;for(c=0,d=a;a>c;c++)e[c].isReal&&f++;return f},getLastNewCellOnRow:function(a,b){var c,d,e,f,g=this.getRowCells(a);for(e=0,f=g.length;f>e;e++)if(c=g[e],d=this.getMapIndex(c),d===!1||void 0!==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){var b,c,d;a.isColspan&&(b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase(),b>1&&(d=this.createCells(c,b-1),e(a.el,d)),a.el.removeAttribute("colspan"))},getRealRowEl:function(a,b){var c,d,e=null,f=null;for(b=b||this.idx,c=0,d=this.map[b.row].length;d>c;c++)if(f=this.map[b.row][c],f.isReal&&(e=g.getParentElement(f.el,{nodeName:["TR"]}),e))return e;return null===e&&a&&(e=g.getParentElement(this.map[b.row][b.col].el,{nodeName:["TR"]})||null),e},injectRowAt:function(a,b,c,d,f){var h,i,j=this.getRealRowEl(!1,{row:a,col:b}),k=this.createCells(d,c);j?(h=this.correctColIndexForUnreals(b,a),h>=0?e(this.getRowCells(j)[h],k):j.insertBefore(k,j.firstChild)):(i=this.table.ownerDocument.createElement("tr"),i.appendChild(k),e(g.getParentElement(f.el,{nodeName:["TR"]}),i))},canMerge:function(a){var b,c,d,e,f,g;for(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)&&(b=this.idx_start,this.idx_start=this.idx_end,this.idx_end=b),this.idx_start.col>this.idx_end.col&&(c=this.idx_start.col,this.idx_start.col=this.idx_end.col,this.idx_end.col=c),d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(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,j;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")}for(j=this.getTableRows(),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,b,c,d=0,f=0,g=null;if(this.setTableMap(),this.map){for(d=this.map.length,a=0;d>a;a++)this.map[a].length>f&&(f=this.map[a].length);for(b=0;d>b;b++)for(c=0;f>c;c++)this.map[b]&&!this.map[b][c]&&c>0&&(this.map[b][c]=new h(this.createCells("td",1)),g=this.map[b][c-1],g&&g.el&&g.el.parent&&e(this.map[b][c-1].el,this.map[b][c].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){var a,b,c,d,e,f;if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){if(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(),a.isRowspan){if(d=parseInt(g.getAttribute(a.el,"rowspan"),10),d>1)for(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){var b,c,e,f,g,h;if(this.rectify())if(this.canMerge(a)){for(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(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&&void 0},collapseCellToNextRow:function(a){var b,c,d,f=this.getMapIndex(a.el),h=f.row+1,i={row:h,col:f.col};h=0?e(this.getRowCells(b)[c],a.el):(d=this.getLastNewCellOnRow(b,h),null!==d?e(d,a.el):b.insertBefore(a.el,b.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,b,c,d=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(a=this.map[this.idx.row],b=0,c=a.length;c>b;b++)a[b].isReal&&d.push(a[b].el);return d},getColumnElementsByCell:function(){var a,b,c=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col]&&this.map[a][this.idx.col].isReal&&c.push(this.map[a][this.idx.col].el);return c},removeRow:function(){var a,b,c,e=g.getParentElement(this.cell,{nodeName:["TR"]});if(e){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(a=this.map[this.idx.row],b=0,c=a.length;c>b;b++)a[b].modified||(this.setCellAsModified(a[b]),this.removeRowCell(a[b]));d(e)}},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,c,d,f,h,i=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(b=this.map[this.idx.row],c=i.createElement("tr"),d=0,f=b.length;f>d;d++)b[d].modified||(this.setCellAsModified(b[d]),this.addRowCell(b[d],c,a));switch(a){case"below":e(this.getRealRowEl(!0),c);break;case"above":h=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{nodeName:["TR"]}),h&&h.parentNode.insertBefore(c,h)}}},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,d,e;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(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){var d,h,i,j,k=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,l=g.getParentElement(a.el,{nodeName:["TR"]}),m=a.el.tagName.toLowerCase(),n=this.table.ownerDocument;for(j=0;k>j;j++)if(d=this.correctColIndexForUnreals(this.idx.col,b+j),l=f(l,"tr"),l)if(d>0)switch(c){case"before":h=this.getRowCells(l),d>0&&this.map[b+j][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(m,1)):h[d].parentNode.insertBefore(this.createCells(m,1),h[d]);
-break;case"after":e(this.getRowCells(l)[d],this.createCells(m,1))}else l.insertBefore(this.createCells(m,1),l.firstChild);else i=n.createElement("tr"),i.appendChild(this.createCells(m,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,e,f,g=[];for(a.nodeType&&(a=[a]),d=0,e=a.length;e>d;d++)if(c=a[d].querySelectorAll(b),c)for(f=c.length;f--;g.unshift(c[f]));return g},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d,e,f,g,h,i,j,k;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(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;if(h=wysihtml5.lang.array(f).indexOf(e),-1!==h)return i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g),j>k?2:4;g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){if(a.parentNode){for(;a.lastChild;)wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}},wysihtml5.dom.getPastedHtml=function(a){var b;return 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");d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){a.selection.setBookmark(c),b(e.innerHTML),e.parentNode.removeChild(e)},0)},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return 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,d,e;if(!a)return null;for(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}),e}}(),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,e,f,g,h,i=c.innerHTML;if(-1===i.indexOf(b))return i;for(d=c.querySelectorAll("[href*='~'], [src*='~']"),h=0,g=d.length;g>h;h++)e=d[h].href||d[h].src,f=a.lang.string(e).replace("~").by(b),i=a.lang.string(i).replace(f).by(e);return i}}(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 k.observe(a,"mousedown",function(a){var b=wysihtml5.dom.getParentElement(a.target,{nodeName:["TD","TH"]});b&&d(b)}),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{nodeName:["TABLE"]}),l.table&&(e(),k.addClass(c,m),n=k.observe(a,"mousemove",g),o=k.observe(a,"mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){var b,c;if(a&&(b=a.querySelectorAll("."+m),b.length>0))for(c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==c&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(){n.stop(),o.stop(),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){var c=k.observe(a.ownerDocument,"click",function(a){c.stop(),k.getParentElement(a.target,{nodeName:["TABLE"]})!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))})}function j(a,c){l.start=a,l.end=c,l.table=k.getParentElement(l.start,{nodeName:["TABLE"]}),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=null,o=null;return c()},function(a){var b=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,d=/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,e=/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,f=function(a){return RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={parseColor:function(g,h){var i,j,k,l=f(h),m=g.match(l),n=10;if(m){for(k=m.length;k--;)m[k]=a.lang.string(m[k].split(":")[1]).trim();if(i=m[m.length-1],b.test(i))j=i.match(b);else if(c.test(i))j=i.match(c);else if(d.test(i))j=i.match(d),n=16;else if(e.test(i))return j=i.match(e),j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?16*parseInt(a,16)+parseInt(a,16):parseFloat(a)});if(j)return j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,n):parseFloat(a)})}return!1},unparseColor:function(a,b){if(b){if("hex"==b)return a[0].toString(16).toUpperCase()+a[1].toString(16).toUpperCase()+a[2].toString(16).toUpperCase();if("hash"==b)return"#"+a[0].toString(16).toUpperCase()+a[1].toString(16).toUpperCase()+a[2].toString(16).toUpperCase();if("rgb"==b)return"rgb("+a[0]+","+a[1]+","+a[2]+")";if("rgba"==b)return"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")";if("csv"==b)return a[0]+","+a[1]+","+a[2]+","+a[3]}return 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(f("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 Error("not a descendant of ancestor!");return c}function d(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 e=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.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&d(a),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)},setAfter:function(a){var b=rangy.createRange(this.doc);return b.setStartAfter(a),b.setEndAfter(a),this.setSelection(b)},selectNode:function(b,c){var d=rangy.createRange(this.doc),f=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=f?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=e.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&f&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&f?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();d(a),this.setSelection(a)},getSelectedOwnNodes:function(){var a,b,c=this.getOwnRanges(),d=[];for(a=0,b=c.length;b>a;a++)d.push(c[a].commonAncestorContainer||this.doc.body);return d},findNodesInSelection:function(b){var c,d,e,f=this.getOwnRanges(),g=[];for(d=0,e=f.length;e>d;d++)c=f[d].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),g=g.concat(c);return g},containsUneditable:function(){var a,b,c=this.getOwnUneditables(),d=this.getSelection();for(a=0,b=c.length;b>a;a++)if(d.containsNode(c[a]))return!0;return!1},deleteContents:function(){var a,b=this.getOwnRanges();for(a=b.length;a--;)b[a].deleteContents();this.setSelection(b[0])},getPreviousNode:function(b,c){var d,e,f;return b||(d=this.getSelection(),b=d.anchorNode),b===this.contain?!1:(e=b.previousSibling,e===this.contain?!1:(e&&3!==e.nodeType&&1!==e.nodeType?e=this.getPreviousNode(e,c):e&&3===e.nodeType&&/^\s*$/.test(e.textContent)?e=this.getPreviousNode(e,c):c&&e&&1===e.nodeType&&!a.lang.array(["BR","HR","IMG"]).contains(e.nodeName)&&/^[\s]*$/.test(e.innerHTML)?e=this.getPreviousNode(e,c):e||b===this.contain||(f=b.parentNode,f!==this.contain&&(e=this.getPreviousNode(f,c))),e!==this.contain?e:!1))},getSelectionParentsByTag:function(){var b,c,d,e=this.getSelectedOwnNodes(),f=[];for(c=0,d=e.length;d>c;c++)b=e[c].nodeName&&"LI"===e[c].nodeName?e[c]:a.dom.getParentElement(e[c],{nodeName:["LI"]},!1,this.contain),b&&f.push(b);return f.length?f: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.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)},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{nodeName:b},1)):0===e&&!this.getPreviousNode(d,!0)},caretIsBeforeUneditable:function(){var a,b,c,d,e=this.getSelection(),f=e.anchorNode,g=e.anchorOffset;if(0===g&&(a=this.getPreviousNode(f,!0),a))for(b=this.getOwnUneditables(),c=0,d=b.length;d>c;c++)if(a===b[c])return b[c];return!1},executeAndRestoreRangy:function(a){var b=this.doc.defaultView||this.doc.parentWindow,c=rangy.saveSelection(b);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,f,g,h,i,j,k,l,m,n=this.doc.body,o=c&&n.scrollTop,p=c&&n.scrollLeft,q="_wysihtml5-temp-placeholder",r=''+a.INVISIBLE_SPACE+"",s=this.getRange(!0);if(!s)return b(n,n),void 0;s.collapsed||(k=s.cloneRange(),j=k.createContextualFragment(r),k.collapse(!1),k.insertNode(j),k.detach()),i=s.createContextualFragment(r),s.insertNode(i),j&&(d=this.contain.querySelectorAll("."+q),s.setStartBefore(d[0]),s.setEndAfter(d[d.length-1])),this.setSelection(s);try{b(s.startContainer,s.endContainer)}catch(t){setTimeout(function(){throw t},0)}if(d=this.contain.querySelectorAll("."+q),d&&d.length)for(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)):(f=this.doc.createTextNode(a.INVISIBLE_SPACE),e.insert(f).after(d[0]),l.setStartBefore(f),l.setEndAfter(f)),this.setSelection(l),m=d.length;m--;)d[m].parentNode.removeChild(d[m]);else this.contain.focus();c&&(n.scrollTop=o,n.scrollLeft=p);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=(rangy.createRange(this.doc),this.doc.createElement("DIV")),d=this.doc.createDocumentFragment();for(c.innerHTML=a,b=c.lastChild;c.firstChild;)d.appendChild(c.firstChild);this.insertNode(d),b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},surround:function(a){var b,c,d=this.getOwnRanges(),e=[];if(0==d.length)return e;for(c=d.length;c--;){b=this.doc.createElement(a.nodeName),e.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{d[c].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(d[c].extractContents()),d[c].insertNode(b)}}return e},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.nodeName,b.className),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(){a.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.doc.defaultView,b=a.getSelection();b.modify("move","left","lineboundary"),b.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var a,b,c,d,e,f=this.doc.selection.createRange(),g=f.boundingTop,h=this.doc.body.scrollWidth;if(f.moveToPoint){for(0===g&&(c=this.doc.createElement("span"),this.insertNode(c),g=c.offsetTop,c.parentNode.removeChild(c)),g+=1,d=-10;h>d;d+=2)try{f.moveToPoint(d,g);break}catch(i){}for(a=g,b=this.doc.selection.createRange(),e=h;e>=0;e--)try{b.moveToPoint(e,a);break}catch(j){}f.setEndPoint("EndToEnd",b),f.select()}},getText:function(){var a=this.getSelection();return a?""+a:""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes([a],b):[]},fixRangeOverflow:function(a){var b,c;this.contain&&this.contain.firstChild&&a&&(b=a.compareNode(this.contain),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))):this._detectInlineRangeProblems(a)&&(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=e.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=e.query(this.contain,"."+this.unselectableClass),c=e.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b,c,d,e,f,g,h=[],i=this.getRange();if(i&&h.push(i),this.unselectableClass&&this.contain&&i&&(b=this.getOwnUneditables(),b.length>0))for(d=0,e=b.length;e>d;d++)for(a=[],f=0,g=h.length;g>f;f++){if(h[f])switch(h[f].compareNode(b[d])){case 2:break;case 3:c=h[f].cloneRange(),c.setEndBefore(b[d]),a.push(c),c=h[f].cloneRange(),c.setStartAfter(b[d]),a.push(c);break;default:a.push(h[f])}h=a}return h},getSelection:function(){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow)},setSelection:function(a){var b=this.doc.defaultView||this.doc.parentWindow,c=rangy.getSelection(b);return c.setSingleRange(a)},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},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},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,e=[];if(a.getAttribute("style")){for(c=a.getAttribute("style").split(";"),d=c.length;d--;)c[d].match(b)||/^\s*$/.test(c[d])||e.push(c[d]);e.length?a.setAttribute("style",e.join(";")):a.removeAttribute("style")}}function i(a,b){var c,d,e,f=[],g=b.split(";"),h=a.getAttribute("style");if(h){for(h=h.replace(/\s/gi,"").toLowerCase(),f.push(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")),c=g.length;c-->0;)/^\s*$/.test(g[c])||f.push(RegExp("(^|\\s|;)"+g[c].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(d=0,e=f.length;e>d;d++)if(h.match(f[d]))return f[d]}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&&cd;++d)a=this.textNodes[d],b=a.parentNode,f[d]=a.data,d&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=f.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){var a,b,c=[];for(a=0,b=this.textNodes.length;b>a;++a)c[a]="'"+this.textNodes[a].data+"'";return"[Merge("+c.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){var c,d,e,f,g,h,i=a[0],j=a[a.length-1],k=[],l=i,m=j,n=0,o=j.length;for(f=0,g=a.length;g>f;++f)d=a[f],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),k.push(c)),c.textNodes.push(d),d===i&&(l=c.firstTextNode,n=l.length),d===j&&(m=c.firstTextNode,o=c.getLength())):c=null;if(j&&j.parentNode&&(h=this.getAdjacentMergeableTextNode(j.parentNode,!0),h&&(c||(c=new r(j),k.push(c)),c.textNodes.push(h))),k.length){for(f=0,g=k.length;g>f;++f)k[f].doMerge();b.setStart(l,n),b.setEnd(m,o)}},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,d=a.parentNode;1==d.childNodes.length&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())?(this.cssClass&&f(d,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(d,this.cssStyle,this.similarStyleRegExp)):(c=this.createContainer(b.dom.getDocument(a)),a.parentNode.insertBefore(c,a),c.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,f=c?!1:!0,h=c||d,i=!1;b.containsNode(h)||(e=b.cloneRange(),e.selectNode(h),e.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(h,b.endContainer,b.endOffset,this.container),b.setEndAfter(h)),e.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(h=q(h,b.startContainer,b.startOffset,this.container))),!f&&this.similarClassRegExp&&g(h,this.similarClassRegExp),f&&this.similarStyleRegExp&&(i="change"===l(h,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(h)&&!i&&n(h)},applyToRange:function(b){var c,d,e,f,g,h;for(d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{return e=this.createContainer(b[d].endContainer.ownerDocument),b[d].surroundContents(e),this.selectNode(b[d],e),void 0}catch(i){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(g=0,h=c.length;h>g;++g)f=c[g],this.getMatchingAncestor(f).element||this.applyToTextNode(f);b[d].setStart(c[0],0),f=c[c.length-1],b[d].setEnd(f,f.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){var c,d,e,f,g,h,i,j;for(f=b.length;f--;){for(c=b[f].getNodes([a.TEXT_NODE]),c.length?(b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE])):(g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE),b[f].insertNode(h),b[f].selectNode(h),c=[h]),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,d,e=b.cloneRange();return e.selectNodeContents(a),c=e.intersection(b),d=c?""+c:"",e.detach(),d},isAppliedToRange:function(b){var c,d,e,f,g,h,i=[],j="full";for(e=b.length;e--;){if(d=b[e].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[e].startContainer).element,c?{elements:[c],coverage:j}:!1;for(f=0,g=d.length;g>f;++f)h=this.getTextSelectedByRange(d[f],b[e]),c=this.getMatchingAncestor(d[f]).element,c&&""!=h?(i.push(c),1===a.dom.getTextNodes(c,!0).length?j="full":"full"===j&&(j="inline")):c||(j="partial")}return i.length?{elements:i,coverage:j}:!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.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},state:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.state;if(d)return c.unshift(this.composer),d.apply(b,c);try{return this.doc.queryCommandState(a)}catch(e){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}}),wysihtml5.commands.bold={exec:function(a,b){wysihtml5.commands.formatInline.execWithToggle(a,b,"b")},state:function(a,b){return wysihtml5.commands.formatInline.state(a,b,"b")}},function(a){function b(b,c){var g,h,i,j,k,l,m,n,o,p=b.doc,q="_wysihtml5-temp-"+ +new Date,r=/non-matching-class/g,s=0;for(a.commands.formatInline.exec(b,d,e,q,r,d,d,!0,!0),h=p.querySelectorAll(e+"."+q),g=h.length;g>s;s++){i=h[s],i.removeAttribute("class");for(o in c)"text"!==o&&i.setAttribute(o,c[o])}l=i,1===g&&(m=f.getTextContent(i),j=!!i.querySelector("*"),k=""===m||m===a.INVISIBLE_SPACE,!j&&k&&(f.setTextContent(i,c.text||i.href),n=p.createTextNode(" "),b.selection.setAfter(i),f.insert(n).after(i),l=n)),b.selection.setAfter(l)}function c(a,b,c){var d,e,f,g;for(e=b.length;e--;){for(d=b[e].attributes,f=d.length;f--;)b[e].removeAttribute(d.item(f).name);for(g in c)c.hasOwnProperty(g)&&b[e].setAttribute(g,c[g])}}var d,e="A",f=a.dom;a.commands.createLink={exec:function(a,d,e){var f=this.state(a,d);f?a.selection.executeAndRestore(function(){c(a,f,e)}):(e="object"==typeof e?e:{href:e},b(a,e))},state:function(b,c){return a.commands.formatInline.state(b,c,"A")}}}(wysihtml5),function(a){function b(a,b){for(var d,e,f,g=b.length,h=0;g>h;h++)d=b[h],e=c.getParentElement(d,{nodeName:"code"}),f=c.getTextContent(d),f.match(c.autoLink.URL_REG_EXP)&&!e?e=c.renameElement(d,"code"):c.replaceWithChildNodes(d)}var c=a.dom;a.commands.removeLink={exec:function(a,c){var d=this.state(a,c);d&&a.selection.executeAndRestore(function(){b(a,d)})},state:function(b,c){return a.commands.formatInline.state(b,c,"A")}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.execWithToggle(c,d,"span","wysiwyg-font-size-"+e,b)},state:function(c,d,e){return a.commands.formatInline.state(c,d,"span","wysiwyg-font-size-"+e,b)}}}(wysihtml5),function(a){var b=/(\s|^)font-size\s*:\s*[^;\s]+;?/gi;a.commands.fontSizeStyle={exec:function(c,d,e){e="object"==typeof e?e.size:e,/^\s*$/.test(e)||a.commands.formatInline.execWithToggle(c,d,"span",!1,!1,"font-size:"+e,b)},state:function(c,d){return a.commands.formatInline.state(c,d,"span",!1,!1,"font-size",b)},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"),d)?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.execWithToggle(c,d,"span","wysiwyg-color-"+e,b)},state:function(c,d,e){return a.commands.formatInline.state(c,d,"span","wysiwyg-color-"+e,b)}}}(wysihtml5),function(a){var b=/(\s|^)color\s*:\s*[^;\s]+;?/gi;a.commands.foreColorStyle={exec:function(c,d,e){var f,g=a.quirks.styleParser.parseColor("object"==typeof e?"color:"+e.color:"color:"+e,"color");g&&(f="color: rgb("+g[0]+","+g[1]+","+g[2]+");",1!==g[3]&&(f+="color: rgba("+g[0]+","+g[1]+","+g[2]+","+g[3]+");"),a.commands.formatInline.execWithToggle(c,d,"span",!1,!1,f,b))},state:function(c,d){return a.commands.formatInline.state(c,d,"span",!1,!1,"color",b)},stateValue:function(b,c,d){var e,f=this.state(b,c);return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"),e&&e)?(val=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(val,d)):!1
-}}}(wysihtml5),function(a){var b=/(\s|^)background-color\s*:\s*[^;\s]+;?/gi;a.commands.bgColorStyle={exec:function(c,d,e){var f,g=a.quirks.styleParser.parseColor("object"==typeof e?"background-color:"+e.color:"background-color:"+e,"background-color");g&&(f="background-color: rgb("+g[0]+","+g[1]+","+g[2]+");",1!==g[3]&&(f+="background-color: rgba("+g[0]+","+g[1]+","+g[2]+","+g[3]+");"),a.commands.formatInline.execWithToggle(c,d,"span",!1,!1,f,b))},state:function(c,d){return a.commands.formatInline.state(c,d,"span",!1,!1,"background-color",b)},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"),e)?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(b,c,e){b.className?(d(b,e),b.className=a.lang.string(b.className+" "+c).trim()):b.className=c}function c(b,c,d){e(b,d),b.getAttribute("style")?b.setAttribute("style",a.lang.string(b.getAttribute("style")+" "+c).trim()):b.setAttribute("style",c)}function d(b,c){var d=c.test(b.className);return b.className=b.className.replace(c,""),""==a.lang.string(b.className).trim()&&b.removeAttribute("class"),d}function e(b,c){var d=c.test(b.getAttribute("style"));return b.setAttribute("style",(b.getAttribute("style")||"").replace(c,"")),""==a.lang.string(b.getAttribute("style")||"").trim()&&b.removeAttribute("style"),d}function f(a){var b=a.lastChild;b&&g(b)&&b.parentNode.removeChild(b)}function g(a){return"BR"===a.nodeName}function h(b,c){var d,e,g;for(b.selection.isCollapsed()&&b.selection.selectLine(),d=b.selection.surround(c),e=0,g=d.length;g>e;e++)a.dom.lineBreaks(d[e]).remove(),f(d[e])}function i(b){return!!a.lang.string(b.className).trim()}function j(b){return!!a.lang.string(b.getAttribute("style")||"").trim()}var k=a.dom,l=["H1","H2","H3","H4","H5","H6","P","PRE","DIV"];a.commands.formatBlock={exec:function(f,g,m,n,o,p,q){var r,s,t,u,v,w=(f.doc,this.state(f,g,m,n,o,p,q)),x=f.config.useLineBreaks,y=x?"DIV":"P";return m="string"==typeof m?m.toUpperCase():m,w.length?(f.selection.executeAndRestoreRangy(function(){var b,c,f;for(b=w.length;b--;){if(o&&(s=d(w[b],o)),q&&(u=e(w[b],q)),(u||s)&&null===m&&w[b].nodeName!=y)return;c=i(w[b]),f=j(w[b]),c||f||!x&&"P"!==m?k.renameElement(w[b],"P"===m?"DIV":y):(a.dom.lineBreaks(w[b]).add(),k.replaceWithChildNodes(w[b]))}}),void 0):((null!==m&&!a.lang.array(l).contains(m)||(r=f.selection.findNodesInSelection(l).concat(f.selection.getSelectedOwnNodes()),f.selection.executeAndRestoreRangy(function(){for(var a=r.length;a--;)v=k.getParentElement(r[a],{nodeName:l}),v==f.element&&(v=null),v&&(m&&(v=k.renameElement(v,m)),n&&b(v,n,o),p&&c(v,p,q),t=!0)}),!t))&&h(f,{nodeName:m||y,className:n||null,cssStyle:p||null}),void 0)},state:function(b,c,d,e,f,g,h){var i,j,l,m=b.selection.getSelectedOwnNodes(),n=[];for(d="string"==typeof d?d.toUpperCase():d,j=0,l=m.length;l>j;j++)i=k.getParentElement(m[j],{nodeName:d,className:e,classRegExp:f,cssStyle:g,styleRegExp:h}),i&&-1==a.lang.array(n).indexOf(i)&&n.push(i);return 0==n.length?!1:n}}}(wysihtml5),wysihtml5.commands.formatCode={exec:function(a,b,c){var d,e,f,g=this.state(a);g?a.selection.executeAndRestore(function(){d=g.querySelector("code"),wysihtml5.dom.replaceWithChildNodes(g),d&&wysihtml5.dom.replaceWithChildNodes(d)}):(e=a.selection.getRange(),f=e.extractContents(),g=a.doc.createElement("pre"),d=a.doc.createElement("code"),c&&(d.className=c),g.appendChild(d),d.appendChild(f),e.insertNode(g),a.selection.selectNode(g))},state:function(a){var b=a.selection.getSelectedNode();return b&&b.nodeName&&"PRE"==b.nodeName&&b.firstChild&&b.firstChild.nodeName&&"CODE"==b.firstChild.nodeName?b:wysihtml5.dom.getParentElement(b,{nodeName:"CODE"})&&wysihtml5.dom.getParentElement(b,{nodeName:"PRE"})}},function(a){function b(a){var b=d[a];return b?[a.toLowerCase(),b.toLowerCase()]:[a.toLowerCase()]}function c(c,d,f,g,h,i){var j=c;return d&&(j+=":"+d),g&&(j+=":"+g),e[j]||(e[j]=new a.selection.HTMLApplier(b(c),d,f,!0,g,h,i)),e[j]}var d={strong:"b",em:"i",b:"strong",i:"em"},e={};a.commands.formatInline={exec:function(a,b,d,e,f,g,h,i,j){var k=a.selection.createRange(),l=a.selection.getOwnRanges();return l&&0!=l.length?(a.selection.getSelection().removeAllRanges(),c(d,e,f,g,h,a.element).toggleRange(l),i?j||a.cleanUp():(k.setStart(l[0].startContainer,l[0].startOffset),k.setEnd(l[l.length-1].endContainer,l[l.length-1].endOffset),a.selection.setSelection(k),a.selection.executeAndRestore(function(){j||a.cleanUp()},!0,!0)),void 0):!1},execWithToggle:function(b,c,d,e,f,g,h){var i,j=this;this.state(b,c,d,e,f,g,h)&&b.selection.isCollapsed()&&!b.selection.caretIsLastInSelection()&&!b.selection.caretIsFirstInSelection()?(i=j.state(b,c,d,e,f)[0],b.selection.executeAndRestoreRangy(function(){i.parentNode;b.selection.selectNode(i,!0),a.commands.formatInline.exec(b,c,d,e,f,g,h,!0,!0)})):this.state(b,c,d,e,f,g,h)&&!b.selection.isCollapsed()?b.selection.executeAndRestoreRangy(function(){a.commands.formatInline.exec(b,c,d,e,f,g,h,!0,!0)}):a.commands.formatInline.exec(b,c,d,e,f,g,h)},state:function(b,e,f,g,h,i,j){var k,l,m=b.doc,n=d[f]||f;return a.dom.hasElementWithTagName(m,f)||a.dom.hasElementWithTagName(m,n)?g&&!a.dom.hasElementWithClassName(m,g)?!1:(k=b.selection.getOwnRanges(),k&&0!==k.length?(l=c(f,g,h,i,j,b.element).isAppliedToRange(k),l&&l.elements?l.elements:!1):!1):!1}}}(wysihtml5),function(a){a.commands.insertBlockQuote={exec:function(b,c){var d=this.state(b,c),e=b.selection.isEndToEndInNode(["H1","H2","H3","H4","H5","H6","P"]);b.selection.executeAndRestore(function(){if(d)b.config.useLineBreaks&&a.dom.lineBreaks(d).add(),a.dom.unwrap(d);else if(b.selection.isCollapsed()&&b.selection.selectLine(),e){var c=e.ownerDocument.createElement("blockquote");a.dom.insert(c).after(e),c.appendChild(e)}else b.selection.surround({nodeName:"blockquote"})})},state:function(b){var c=b.selection.getSelectedNode(),d=a.dom.getParentElement(c,{nodeName:"BLOCKQUOTE"},!1,b.element);return d?d:!1}}}(wysihtml5),wysihtml5.commands.insertHTML={exec:function(a,b,c){a.commands.support(b)?a.doc.execCommand(b,!1,c):a.selection.insertHTML(c)},state:function(){return!1}},function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){var f,g,h,i,j;if(e="object"==typeof e?e:{src:e},f=c.doc,g=this.state(c),g)return c.selection.setBefore(g),i=g.parentNode,i.removeChild(g),a.dom.removeEmptyTextNodes(i),"A"!==i.nodeName||i.firstChild||(c.selection.setAfter(i),i.parentNode.removeChild(i)),a.quirks.redraw(c.element),void 0;g=f.createElement(b);for(j in e)g.setAttribute("className"===j?"class":j,e[j]);c.selection.insertNode(g),a.browser.hasProblemsSettingCaretAfterImg()?(h=f.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(h),c.selection.setAfter(h)):c.selection.setAfter(g)},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)?(d=c.selection.getSelectedNode(),d?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),e=a.lang.string(e).trim(),e?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(c,d){c.commands.support(d)?(c.doc.execCommand(d,!1,null),a.browser.autoScrollsToCaret()||c.selection.scrollIntoView()):c.commands.exec("insertHTML",b)},state:function(){return!1}}}(wysihtml5),wysihtml5.commands.insertOrderedList={exec:function(a,b){wysihtml5.commands.insertList.exec(a,b,"OL")},state:function(a,b){return wysihtml5.commands.insertList.state(a,b,"OL")}},wysihtml5.commands.insertUnorderedList={exec:function(a,b){wysihtml5.commands.insertList.exec(a,b,"UL")},state:function(a,b){return wysihtml5.commands.insertList.state(a,b,"UL")}},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,g,h={el:null,other:!1};return c&&(f=a.dom.getParentElement(c,{nodeName:"LI"}),g="UL"===d?"OL":"UL",b(c,d)?h.el=c:b(c,g)?h={el:c,other:!0}:f&&(b(f.parentNode,d)?h.el=f.parentNode:b(f.parentNode,g)&&(h={el:f.parentNode,other:!0}))),h.el&&!e.element.contains(h.el)&&(h.el=null),h},d=function(b,c,d){var e,g="UL"===c?"OL":"UL";d.selection.executeAndRestore(function(){var h,i,j=f(g,d);if(j.length)for(h=j.length;h--;)a.dom.renameElement(j[h],c.toLowerCase());else{for(e=f(["OL","UL"],d),i=e.length;i--;)a.dom.resolveList(e[i],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestore(function(){var g,h=[b].concat(f(e,d));for(g=h.length;g--;)a.dom.renameElement(h[g],c.toLowerCase())})},f=function(a,c){var d,e=c.selection.getOwnRanges(),f=[];for(d=e.length;d--;)f=f.concat(e[d].getNodes([1],function(c){return b(c,a)}));return f},g=function(b,c){c.selection.executeAndRestoreRangy(function(){var d,e,f="_wysihtml5-temp-"+(new Date).getTime(),g=c.selection.deblockAndSurround({nodeName:"div",className:f}),h=/\uFEFF/g;g.innerHTML=g.innerHTML.replace(h,""),g&&(d=a.lang.array(["","
",a.INVISIBLE_SPACE]).contains(g.innerHTML),e=a.dom.convertToList(g,b.toLowerCase(),c.parent.config.uneditableContainerClassname),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),wysihtml5.commands.italic={exec:function(a,b){wysihtml5.commands.formatInline.execWithToggle(a,b,"i")},state:function(a,b){return wysihtml5.commands.formatInline.state(a,b,"i")}},function(a){var b="wysiwyg-text-align-center",c=/wysiwyg-text-align-[0-9a-z]+/g;a.commands.justifyCenter={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,b,c)}}}(wysihtml5),function(a){var b="wysiwyg-text-align-left",c=/wysiwyg-text-align-[0-9a-z]+/g;a.commands.justifyLeft={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,b,c)}}}(wysihtml5),function(a){var b="wysiwyg-text-align-right",c=/wysiwyg-text-align-[0-9a-z]+/g;a.commands.justifyRight={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,b,c)}}}(wysihtml5),function(a){var b="wysiwyg-text-align-justify",c=/wysiwyg-text-align-[0-9a-z]+/g;a.commands.justifyFull={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,b,c)}}}(wysihtml5),function(a){var b="text-align: right;",c=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;a.commands.alignRightStyle={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,null,null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,null,null,b,c)}}}(wysihtml5),function(a){var b="text-align: left;",c=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;a.commands.alignLeftStyle={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,null,null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,null,null,b,c)}}}(wysihtml5),function(a){var b="text-align: center;",c=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;a.commands.alignCenterStyle={exec:function(d){return a.commands.formatBlock.exec(d,"formatBlock",null,null,null,b,c)},state:function(d){return a.commands.formatBlock.state(d,"formatBlock",null,null,null,b,c)}}}(wysihtml5),wysihtml5.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(){return!1}},wysihtml5.commands.underline={exec:function(a,b){wysihtml5.commands.formatInline.execWithToggle(a,b,"u")},state:function(a,b){return wysihtml5.commands.formatInline.state(a,b,"u")}},wysihtml5.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(){return!1}},wysihtml5.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(){return!1}},wysihtml5.commands.mergeTableCells={exec:function(a,b){a.tableSelection&&a.tableSelection.start&&a.tableSelection.end&&(this.state(a,b)?wysihtml5.dom.table.unmergeCell(a.tableSelection.start):wysihtml5.dom.table.mergeCellsBetween(a.tableSelection.start,a.tableSelection.end))},state:function(a){if(a.tableSelection){var b=a.tableSelection.start,c=a.tableSelection.end;if(b&&c&&b==c&&(wysihtml5.dom.getAttribute(b,"colspan")&&parseInt(wysihtml5.dom.getAttribute(b,"colspan"),10)>1||wysihtml5.dom.getAttribute(b,"rowspan")&&parseInt(wysihtml5.dom.getAttribute(b,"rowspan"),10)>1))return[b]}return!1}},wysihtml5.commands.addTableCells={exec:function(a,b,c){if(a.tableSelection&&a.tableSelection.start&&a.tableSelection.end){var d=wysihtml5.dom.table.orderSelectionEnds(a.tableSelection.start,a.tableSelection.end);"before"==c||"above"==c?wysihtml5.dom.table.addCells(d.start,c):("after"==c||"below"==c)&&wysihtml5.dom.table.addCells(d.end,c),setTimeout(function(){a.tableSelection.select(d.start,d.end)},0)}},state:function(){return!1}},wysihtml5.commands.deleteTableCells={exec:function(a,b,c){if(a.tableSelection&&a.tableSelection.start&&a.tableSelection.end){var d,e=wysihtml5.dom.table.orderSelectionEnds(a.tableSelection.start,a.tableSelection.end),f=wysihtml5.dom.table.indexOf(e.start),g=a.tableSelection.table;wysihtml5.dom.table.removeCells(e.start,c),setTimeout(function(){d=wysihtml5.dom.table.findCell(g,f),d||("row"==c&&(d=wysihtml5.dom.table.findCell(g,{row:f.row-1,col:f.col})),"column"==c&&(d=wysihtml5.dom.table.findCell(g,{row:f.row,col:f.col-1}))),d&&a.tableSelection.select(d,d)},0)}},state:function(){return!1}},wysihtml5.commands.indentList={exec:function(a){var b=a.selection.getSelectionParentsByTag("LI");return b?this.tryToPushLiLevel(b,a.selection):!1},state:function(){return!1},tryToPushLiLevel:function(a,b){var c,d,e,f,g,h=!1;return b.executeAndRestoreRangy(function(){for(var b=a.length;b--;)f=a[b],c="OL"===f.parentNode.nodeName?"OL":"UL",d=f.ownerDocument.createElement(c),e=wysihtml5.dom.domNode(f).prev({nodeTypes:[wysihtml5.ELEMENT_NODE]}),g=e?e.querySelector("ul, ol"):null,e&&(g?g.appendChild(f):(d.appendChild(f),e.appendChild(d)),h=!0)}),h}},wysihtml5.commands.outdentList={exec:function(a){var b=a.selection.getSelectionParentsByTag("LI");return b?this.tryToPullLiLevel(b,a):!1},state:function(){return!1},tryToPullLiLevel:function(a,b){var c,d,e,f,g,h=!1,i=this;return b.selection.executeAndRestoreRangy(function(){var j,k;for(j=a.length;j--;)if(f=a[j],f.parentNode&&(c=f.parentNode,"OL"===c.tagName||"UL"===c.tagName)){if(h=!0,d=wysihtml5.dom.getParentElement(c.parentNode,{nodeName:["OL","UL"]},!1,b.element),e=wysihtml5.dom.getParentElement(c.parentNode,{nodeName:["LI"]},!1,b.element),d&&e)f.nextSibling&&(g=i.getAfterList(c,f),f.appendChild(g)),d.insertBefore(f,e.nextSibling);else{for(f.nextSibling&&(g=i.getAfterList(c,f),f.appendChild(g)),k=f.childNodes.length;k--;)c.parentNode.insertBefore(f.childNodes[k],c.nextSibling);c.parentNode.insertBefore(document.createElement("br"),c.nextSibling),f.parentNode.removeChild(f)}0===c.childNodes.length&&c.parentNode.removeChild(c)}}),h},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}},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,k,l=this.historyStr[this.position-1],m=this.composer.getValue(!1,!1),n=this.element.offsetWidth>0&&this.element.offsetHeight>0;m!==l&&(j=this.historyStr.length=this.historyDom.length=this.position,j>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,n&&(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),void 0!==i&&e.setAttribute(g,i)),k=this.element.cloneNode(!!m),this.historyDom.push(k),this.historyStr.push(m),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));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.ownerDocument.querySelector(":focus")!==this.element)try{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",CARET_HACK:"
",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()?"":this.CARET_HACK},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&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(){this.parent.parse(this.element)},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))},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()},{},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a,c=this;this.sandbox=new b.Sandbox(function(){c._create()},{stylesheets:this.config.stylesheets}),this.editableArea=this.sandbox.getIframe(),a=this.textarea.element,b.insert(this.editableArea).after(a),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,e,f=this;this.doc=this.sandbox.getDocument(),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.uneditableContainerClassname),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),b.addClass(this.element,this.config.composerClassName),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe(),d=this.config.name,d&&(b.addClass(this.element,d),this.config.contentEditableMode||b.addClass(this.editableArea,d)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable(),e="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"),e&&b.simulatePlaceholder(this.parent,this,e),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){f.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,e,f,g=this,h=c.canDisableAutoLinking(),i=c.doesAutoLinkingInContentEditable();h&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink&&((!i||i&&h)&&(this.parent.on("newword:composer",function(){b.getTextContent(g.element).match(b.autoLink.URL_REG_EXP)&&g.selection.executeAndRestore(function(c,d){var e,f=g.element.querySelectorAll("."+g.config.uneditableContainerClassname),h=!1;for(e=f.length;e--;)a.dom.contains(f[e],d)&&(h=!0);h||b.autoLink(d.parentNode,[g.config.uneditableContainerClassname])})}),b.observe(this.element,"blur",function(){b.autoLink(g.element,[g.config.uneditableContainerClassname])})),d=this.sandbox.getDocument().getElementsByTagName("a"),e=b.autoLink.URL_REG_EXP,f=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(d.length){var c,h=g.selection.getSelectedNode(a.target.ownerDocument),i=b.getParentElement(h,{nodeName:"A"},4);i&&(c=f(i),setTimeout(function(){var a=f(i);a!==c&&a.match(e)&&i.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,{nodeName:["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,i=c.keyCode;if(!c.shiftKey&&(i===a.ENTER_KEY||i===a.BACKSPACE_KEY))return h=b.getParentElement(e.selection.getSelectedNode(),{nodeName:f},4),h?(setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===h.nodeName){if(!f)return;c=b.getParentElement(f,{nodeName:g},2),c||d(f)}i===a.ENTER_KEY&&h.nodeName.match(/^H[1-6]$/)&&d(f)},0),void 0):(e.config.useLineBreaks&&i===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")),void 0)})}})}(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,k=this,l=c.querySelector(":focus"),m=this.textarea.element,n=m.hasAttribute("placeholder"),o=n&&m.getAttribute("placeholder"),p=m.style.display,q=m.disabled;return this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),n&&m.removeAttribute("placeholder"),m===l&&m.blur(),m.disabled=!1,m.style.display=d="none",(m.getAttribute("rows")&&"auto"===b.getStyle("height").from(m)||m.getAttribute("cols")&&"auto"===b.getStyle("width").from(m))&&(m.style.display=d=p),b.copyStyles(g).from(m).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(m).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),m.disabled=!0,b.copyStyles(g).from(m).to(this.disabledStylesHost),b.copyStyles(f).from(m).to(this.disabledStylesHost),m.disabled=q,m.style.display=p,i(m),m.style.display=d,b.copyStyles(g).from(m).to(this.focusStylesHost),b.copyStyles(f).from(m).to(this.focusStylesHost),m.style.display=p,b.copyStyles(["display"]).from(m).to(this.editableArea),j=a.lang.array(g).without(["display"]),l?l.focus():m.blur(),n&&m.setAttribute("placeholder",o),this.parent.on("focus:composer",function(){b.copyStyles(j).from(k.focusStylesHost).to(k.editableArea),b.copyStyles(f).from(k.focusStylesHost).to(k.element)}),this.parent.on("blur:composer",function(){b.copyStyles(j).from(k.blurStylesHost).to(k.editableArea),b.copyStyles(f).from(k.blurStylesHost).to(k.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(j).from(k.disabledStylesHost).to(k.editableArea),b.copyStyles(f).from(k.disabledStylesHost).to(k.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(j).from(k.blurStylesHost).to(k.editableArea),b.copyStyles(f).from(k.blurStylesHost).to(k.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){var d,e=a.getPreviousNode(b,!0),f=a.getSelectedNode();if(1!==f.nodeType&&f.parentNode!==c&&(f=f.parentNode),e)if(1==f.nodeType){if(d=f.firstChild,1==e.nodeType)for(;f.firstChild;)e.appendChild(f.firstChild);else for(;f.firstChild;)b.parentNode.insertBefore(f.firstChild,b);f.parentNode&&f.parentNode.removeChild(f),a.setBefore(d)}else 1==e.nodeType?e.appendChild(f):b.parentNode.insertBefore(f,b),a.setBefore(f)},f=function(a,b,c,d){var f,g,h;b.isCollapsed()?b.caretIsInTheBeginnig("LI")?(a.preventDefault(),d.commands.exec("outdentList")):b.caretIsInTheBeginnig()?a.preventDefault():(b.caretIsFirstInSelection()&&b.getPreviousNode()&&b.getPreviousNode().nodeName&&/^H\d$/gi.test(b.getPreviousNode().nodeName)&&(f=b.getPreviousNode(),a.preventDefault(),/^\s*$/.test(f.textContent||f.innerText)?f.parentNode.removeChild(f):(g=f.ownerDocument.createRange(),g.selectNodeContents(f),g.collapse(!1),b.setSelection(g))),h=b.caretIsBeforeUneditable(),h&&(a.preventDefault(),e(b,h,c))):b.containsUneditable()&&(a.preventDefault(),b.deleteContents())},g=function(a){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("LI")&&a.commands.exec("indentList"))return}else a.selection.deleteContents();
-a.commands.exec("insertHTML"," ")};a.views.Composer.prototype.observe=function(){var e,h,i=this,j=this.getValue(!1,!1),k=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),l=this.element,m=c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?l:this.sandbox.getWindow(),n=["drop","paste","beforepaste"],o=["drop","paste","mouseup","focus","keyup"];b.observe(k,"DOMNodeRemoved",function(){clearInterval(e),i.parent.fire("destroy:composer")}),c.supportsMutationEvents()||(e=setInterval(function(){b.contains(document.documentElement,k)||(clearInterval(e),i.parent.fire("destroy:composer"))},250)),b.observe(m,o,function(){setTimeout(function(){i.parent.fire("interaction").fire("interaction:composer")},0)}),this.config.handleTables&&(!this.tableClickHandle&&this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?this.tableClickHandle=b.observe(k,["focus","mouseup","mouseover"],function(){i.doc.execCommand("enableObjectResizing",!1,"false"),i.doc.execCommand("enableInlineTableEditing",!1,"false"),i.tableClickHandle.stop()}):setTimeout(function(){i.doc.execCommand("enableObjectResizing",!1,"false"),i.doc.execCommand("enableInlineTableEditing",!1,"false")},0)),this.tableSelection=a.quirks.tableCellsSelection(l,i.parent)),b.observe(m,"focus",function(a){i.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){j=i.getValue(!1,!1)},0)}),b.observe(m,"blur",function(a){if(j!==i.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),i.parent.fire("change",b).fire("change:composer",b)}i.parent.fire("blur",a).fire("blur:composer",a)}),b.observe(l,"dragenter",function(){i.parent.fire("unset_placeholder")}),b.observe(l,n,function(a){i.parent.fire(a.type,a).fire(a.type+":composer",a)}),this.config.copyedFromMarking&&b.observe(l,"copy",function(a){a.clipboardData&&(a.clipboardData.setData("text/html",i.config.copyedFromMarking+i.selection.getHtml()),a.preventDefault()),i.parent.fire(a.type,a).fire(a.type+":composer",a)}),b.observe(l,"keyup",function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&i.parent.fire("newword:composer")}),this.parent.on("paste:composer",function(){setTimeout(function(){i.parent.fire("newword:composer")},0)}),c.canSelectImagesInContentEditable()||b.observe(l,"mousedown",function(b){var c=b.target,d=l.querySelectorAll("img"),e=l.querySelectorAll("."+i.config.uneditableContainerClassname+" img"),f=a.lang.array(d).without(e);"IMG"===c.nodeName&&a.lang.array(f).contains(c)&&i.selection.selectNode(c)}),c.canSelectImagesInContentEditable()||b.observe(l,"drop",function(){setTimeout(function(){i.selection.getSelection().removeAllRanges()},0)}),c.hasHistoryIssue()&&c.supportsSelectionModify()&&b.observe(l,"keydown",function(a){if(a.metaKey||a.ctrlKey){var b=a.keyCode,c=l.ownerDocument.defaultView,d=c.getSelection();(37===b||39===b)&&(37===b&&(d.modify("extend","left","lineboundary"),a.shiftKey||d.collapseToStart()),39===b&&(d.modify("extend","right","lineboundary"),a.shiftKey||d.collapseToEnd()),a.preventDefault())}}),b.observe(l,"keydown",function(a){var b=a.keyCode,c=d[b];(a.ctrlKey||a.metaKey)&&!a.altKey&&c&&(i.commands.exec(c),a.preventDefault()),8===b?f(a,i.selection,l,i):i.config.handleTabKey&&9===b&&(a.preventDefault(),g(i,l))}),b.observe(l,"keydown",function(b){var c,d=i.selection.getSelectedNode(!0),e=b.keyCode;!d||"IMG"!==d.nodeName||e!==a.BACKSPACE_KEY&&e!==a.DELETE_KEY||(c=d.parentNode,c.removeChild(d),"A"!==c.nodeName||c.firstChild||c.parentNode.removeChild(c),setTimeout(function(){a.quirks.redraw(l)},0),b.preventDefault())}),!this.config.contentEditableMode&&c.hasIframeFocusIssue()&&(b.observe(k,"focus",function(){setTimeout(function(){i.doc.querySelector(":focus")!==i.element&&i.focus()},0)}),b.observe(this.element,"blur",function(){setTimeout(function(){i.selection.getSelection().removeAllRanges()},0)})),h={IMG:"Image: ",A:"Link: "},b.observe(l,"mouseover",function(a){var b,c,d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(c=d.hasAttribute("title"),c||(b=h[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))})}}(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),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&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(){var a=this.parent.parse(this.element.value);this.element.value=a},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,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,uneditableContainerClassname:"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(),"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 setTimeout(function(){e.fire("beforeload").fire("load")},0),void 0}a.dom.addClass(document.body,this.config.bodyClassName),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.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(){this.currentView.cleanUp()},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()},parse:function(b,c){var d=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,e=this.config.parser(b,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:d,uneditableClass:this.config.uneditableContainerClassname,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),e},_initParser:function(){var b,c=this;a.browser.supportsModenPaste()?this.on("paste:composer",function(d){d.preventDefault(),b=a.dom.getPastedHtml(d),b&&c._cleanAndPaste(b)}):this.on("beforepaste:composer",function(b){b.preventDefault(),a.dom.getPastedHtmlWithDiv(c.composer,function(a){a&&c._cleanAndPaste(a)})})},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.uneditableContainerClassname});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(){var e,f,g,h,i,j;if(!this._observed){for(e=this,f=function(a){var b=e._serialize();b==e.elementToChange?e.fire("edit",b):e.fire("save",b),e.hide(),a.preventDefault(),a.stopPropagation()},b.observe(e.link,"click",function(){b.hasClass(e.link,c)&&setTimeout(function(){e.hide()},0)}),b.observe(this.container,"keydown",function(b){var c=b.keyCode;c===a.ENTER_KEY&&f(b),c===a.ESCAPE_KEY&&(e.fire("cancel"),e.hide())}),b.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",f),b.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(a){e.fire("cancel"),e.hide(),a.preventDefault(),a.stopPropagation()}),g=this.container.querySelectorAll(d),h=0,i=g.length,j=function(){clearInterval(e.interval)};i>h;h++)b.observe(g[h],"change",j);this._observed=!0}},_serialize:function(){for(var a=this.elementToChange||{},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))},show:function(a){if(!b.hasClass(this.link,c)){var e=this,f=this.container.querySelector(d);if(this.elementToChange=a,this._observe(),this._interpolate(),a&&(this.interval=setInterval(function(){e._interpolate(!0)},500)),b.addClass(this.link,c),this.container.style.display="",this.fire("show"),f&&!a)try{f.focus()}catch(g){}}},hide:function(){clearInterval(this.interval),this.elementToChange=null,b.removeClass(this.link,c),this.container.style.display="none",this.fire("hide")}})}(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,j,k,l=document.createElement("input");return a.browser.supportsSpeechApiOn(l)?(i=g.editor.textarea.element.getAttribute("lang"),i&&(f.lang=i),j=document.createElement("div"),a.lang.object(d).merge({width:h.offsetWidth+"px",height:h.offsetHeight+"px"}),b.insert(l).into(j),b.insert(j).into(h),b.setStyles(e).on(l),b.setAttributes(f).on(l),b.setStyles(d).on(j),b.setStyles(c).on(h),k="onwebkitspeechchange"in l?"webkitspeechchange":"speechchange",b.observe(l,k,function(){g.execCommand("insertText",l.value),l.value=""}),b.observe(l,"click",function(a){b.hasClass(h,"wysihtml5-command-disabled")&&a.preventDefault(),a.stopPropagation()}),void 0):(h.style.display="none",void 0)}}(wysihtml5),function(a){var b="wysihtml5-command-disabled",c="wysihtml5-commands-disabled",d="wysihtml5-command-active",e="wysihtml5-action-active",f=a.dom;a.toolbar.Toolbar=Base.extend({constructor:function(f,g,h){this.editor=f,this.container="string"==typeof g?document.getElementById(g):g,this.composer=f.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),h&&this.show(),null!=f.config.classNameCommandDisabled&&(b=f.config.classNameCommandDisabled),null!=f.config.classNameCommandsDisabled&&(c=f.config.classNameCommandsDisabled),null!=f.config.classNameCommandActive&&(d=f.config.classNameCommandActive),null!=f.config.classNameActionActive&&(e=f.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=this[b+"Links"]=a.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+b+"]")).get(),i=h.length,j=0,k=this[b+"Mapping"]={};i>j;j++)c=h[j],e=c.getAttribute("data-wysihtml5-"+b),f=c.getAttribute("data-wysihtml5-"+b+"-value"),d=this.container.querySelector("[data-wysihtml5-"+b+"-group='"+e+"']"),g=this._getDialog(c,e),k[e+":"+f]={link:c,group:d,name:e,value:f,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})}),d.on("cancel",function(){f.editor.focus(!1),f.editor.fire("cancel:dialog",{command:c,dialogContainer:g,commandLink:b})})),d},execCommand:function(a,b){if(!this.commandsDisabled){var c=this.commandMapping[a+":"+b];c&&c.dialog&&!c.state?c.dialog.show():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.textarea&&(b.currentView===b.textarea?b.fire("change_view","composer"):b.fire("change_view","textarea")),"showSource"==a&&b.fire("showSource")},_observe:function(){for(var a=this,b=this.editor,d=this.container,e=this.commandLinks.concat(this.actionLinks),g=e.length,h=0;g>h;h++)"A"===e[h].nodeName?f.setAttributes({href:"javascript:;",unselectable:"on"}).on(e[h]):f.setAttributes({unselectable:"on"}).on(e[h]);f.delegate(d,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(a){a.preventDefault()}),f.delegate(d,"[data-wysihtml5-command]","click",function(b){var c=this,d=c.getAttribute("data-wysihtml5-command"),e=c.getAttribute("data-wysihtml5-command-value");a.execCommand(d,e),b.preventDefault()}),f.delegate(d,"[data-wysihtml5-action]","click",function(b){var c=this.getAttribute("data-wysihtml5-action");a.execAction(c),b.preventDefault()}),b.on("interaction:composer",function(){a._updateLinkStates()}),b.on("focus:composer",function(){a.bookmark=null}),this.editor.config.handleTables&&(b.on("tableselect:composer",function(){a.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),b.on("tableunselect:composer",function(){a.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),b.on("change_view",function(e){b.textarea&&setTimeout(function(){a.commandsDisabled="composer"!==e,a._updateLinkStates(),a.commandsDisabled?f.addClass(d,c):f.removeClass(d,c)},0)})},_updateLinkStates:function(){var c,g,h,i,j=this.commandMapping,k=this.actionMapping;for(c in j)i=j[c],this.commandsDisabled?(g=!1,f.removeClass(i.link,d),i.group&&f.removeClass(i.group,d),i.dialog&&i.dialog.hide()):(g=this.composer.commands.state(i.name,i.value),f.removeClass(i.link,b),i.group&&f.removeClass(i.group,b)),i.state!==g&&(i.state=g,g?(f.addClass(i.link,d),i.group&&f.addClass(i.group,d),i.dialog&&("object"==typeof g||a.lang.object(g).isArray()?(!i.dialog.multiselect&&a.lang.object(g).isArray()&&(g=1===g.length?g[0]:!0,i.state=g),i.dialog.show(g)):i.dialog.hide())):(f.removeClass(i.link,d),i.group&&f.removeClass(i.group,d),i.dialog&&i.dialog.hide()));for(c in k)h=k[c],"change_view"===h.name&&(h.state=this.editor.currentView===this.editor.textarea,h.state?f.addClass(h.link,e):f.removeClass(h.link,e))},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=(a.dom,"[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=document.querySelector(":focus"),g=this.container.querySelectorAll(b),h=g.length,i=0,j=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,k=j?j.getAttribute("style"):null,l=k?a.quirks.styleParser.parseColor(k,"color"):null;h>i;i++)e=g[i],e!==f&&(d&&"hidden"===e.type||"color"===e.getAttribute(c)&&(e.value=l?l[3]&&1!=l[3]?"rgba("+l[0]+","+l[1]+","+l[2]+","+l[3]+");":"rgb("+l[0]+","+l[1]+","+l[2]+");":"rgb(0,0,0);"))}})}(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(){var b=document.querySelector(":focus"),c=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),d=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,e=d?d.getAttribute("style"):null,f=e?a.quirks.styleParser.parseFontSize(e):null;c&&c!==b&&f&&!/^\s*$/.test(f)&&(c.value=f)}})}(wysihtml5),Handlebars=function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return k[a]||"&"}function c(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])}function d(a){return a instanceof j?""+a:a||0===a?(a=""+a,m.test(a)?a.replace(l,b):a):""}function e(a){return a||0===a?h(a)&&0===a.length?!0:!1:!0}var f,g,h,i={},j=a,k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},l=/[&<>"'`]/g,m=/[&<>"'`]/;return i.extend=c,f=Object.prototype.toString,i.toString=f,g=function(a){return"function"==typeof a},g(/x/)&&(g=function(a){return"function"==typeof a&&"[object Function]"===f.call(a)}),i.isFunction=g,h=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===f.call(a):!1},i.isArray=h,i.escapeExpression=d,i.isEmpty=e,i}(a),c=function(){"use strict";function a(a,b){var d,e,f;for(b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn),e=Error.prototype.constructor.call(this,a),f=0;f0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d,e,f=b.fn,g=b.inverse,j=0,k="";if(i(a)&&(a=a.call(this)),b.data&&(c=m(b.data)),a&&"object"==typeof a)if(h(a))for(d=a.length;d>j;j++)c&&(c.index=j,c.first=0===j,c.last=j===a.length-1),k+=f(a[j],{data:c});else for(e in a)a.hasOwnProperty(e)&&(c&&(c.key=e,c.index=j,c.first=0===j),k+=f(a[e],{data:c}),j++);return 0===j&&(k=g(this)),k}),a.registerHelper("if",function(a,b){return i(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||o.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return i(a)&&(a=a.call(this)),o.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function e(a,b){l.log(a,b)}var f,g,h,i,j,k,l,m,n={},o=a,p=b,q="1.3.0";return n.VERSION=q,f=4,n.COMPILER_REVISION=f,g={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"},n.REVISION_CHANGES=g,h=o.isArray,i=o.isFunction,j=o.toString,k="[object Object]",n.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:l,log:e,registerHelper:function(a,b,c){if(j.call(a)===k){if(c||b)throw new p("Arg not supported with multiple helpers");o.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){j.call(a)===k?o.extend(this.partials,a):this.partials[a]=b}},l={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(l.level<=a){var c=l.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}},n.logger=l,n.log=e,m=function(a){var b={};return o.extend(b,a),b},n.createFrame=m,n}(b,c),e=function(a,b,c){"use strict";function d(a){var b,c,d=a&&a[0]||1,e=m;if(d!==e){if(e>d)throw b=n[e],c=n[d],new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+b+") or downgrade your runtime to an older version ("+c+").");throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");var c=function(a,c,d,e,f,g){var h,i=b.VM.invokePartial.apply(this,arguments);if(null!=i)return i;if(b.compile)return h={helpers:e,partials:f,data:g},f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,h);throw new l("The partial "+c+" could not be compiled when running in runtime-only mode")},d={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=g(a,b,c):d||(d=this.programs[a]=g(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(c,e){var f,g,h,i;return e=e||{},h=e.partial?e:b,e.partial||(f=e.helpers,g=e.partials),i=a.call(d,h,c,f,g,e.data),e.partial||b.VM.checkRevision(d.compilerInfo),i}}function f(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function g(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function h(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function i(){return""}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;return j.checkRevision=d,j.template=e,j.programWithDepth=f,j.program=g,j.invokePartial=h,j.noop=i,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,f=m}(d,a,c,b,e);return f}(),this.wysihtml5=this.wysihtml5||{},this.wysihtml5.tpl=this.wysihtml5.tpl||{},this.wysihtml5.tpl.blockquote=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+l((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===k?b.apply(a):b)),c}function g(){return' \n \n '}function h(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var i,j="",k="function",l=this.escapeExpression,m=this;return j+='\n \n ',i=c["if"].call(b,(i=b&&b.options,i=null==i||i===!1?i:i.toolbar,null==i||i===!1?i:i.fa),{hash:{},inverse:m.program(5,h,e),fn:m.program(3,g,e),data:e}),(i||0===i)&&(j+=i),j+="\n \n \n",j}),this.wysihtml5.tpl.color=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+j((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===i?b.apply(a):b)),c}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var g,h="",i="function",j=this.escapeExpression,k=this;return h+='\n \n '+j((g=b&&b.locale,g=null==g||g===!1?g:g.colours,g=null==g||g===!1?g:g.black,typeof g===i?g.apply(b):g))+'\n \n \n \n \n",h}),this.wysihtml5.tpl.emphasis=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+k((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===j?b.apply(a):b)),c}function g(a,b){var d,e="";return e+='\n '+k((d=a&&a.locale,d=null==d||d===!1?d:d.emphasis,d=null==d||d===!1?d:d.small,typeof d===j?d.apply(a):d))+"\n ",e}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var h,i="",j="function",k=this.escapeExpression,l=this;return i+='\n \n '+k((h=b&&b.locale,h=null==h||h===!1?h:h.emphasis,h=null==h||h===!1?h:h.bold,typeof h===j?h.apply(b):h))+'\n '+k((h=b&&b.locale,h=null==h||h===!1?h:h.emphasis,h=null==h||h===!1?h:h.italic,typeof h===j?h.apply(b):h))+'\n '+k((h=b&&b.locale,h=null==h||h===!1?h:h.emphasis,h=null==h||h===!1?h:h.underline,typeof h===j?h.apply(b):h))+"\n ",h=c["if"].call(b,(h=b&&b.options,h=null==h||h===!1?h:h.toolbar,h=null==h||h===!1?h:h.emphasis,null==h||h===!1?h:h.small),{hash:{},inverse:l.noop,fn:l.program(3,g,e),data:e}),(h||0===h)&&(i+=h),i+="\n \n \n",i
-}),this.wysihtml5.tpl["font-styles"]=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+l((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===k?b.apply(a):b)),c}function g(){return'\n \n '}function h(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var i,j="",k="function",l=this.escapeExpression,m=this;return j+='\n \n ',i=c["if"].call(b,(i=b&&b.options,i=null==i||i===!1?i:i.toolbar,null==i||i===!1?i:i.fa),{hash:{},inverse:m.program(5,h,e),fn:m.program(3,g,e),data:e}),(i||0===i)&&(j+=i),j+='\n '+l((i=b&&b.locale,i=null==i||i===!1?i:i.font_styles,i=null==i||i===!1?i:i.normal,typeof i===k?i.apply(b):i))+'\n \n \n \n \n",j}),this.wysihtml5.tpl.html=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+l((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===k?b.apply(a):b)),c}function g(){return'\n \n '}function h(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var i,j="",k="function",l=this.escapeExpression,m=this;return j+='\n \n \n",j}),this.wysihtml5.tpl.image=Handlebars.template(function(a,b,c,d,e){function f(){return"modal-sm"}function g(a){var b,c="";return c+="btn-"+m((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===l?b.apply(a):b)),c}function h(){return'\n \n '}function i(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var j,k="",l="function",m=this.escapeExpression,n=this;return k+='\n \n \n \n \n \n \n ',j=c["if"].call(b,(j=b&&b.options,j=null==j||j===!1?j:j.toolbar,null==j||j===!1?j:j.fa),{hash:{},inverse:n.program(7,i,e),fn:n.program(5,h,e),data:e}),(j||0===j)&&(k+=j),k+="\n \n \n",k}),this.wysihtml5.tpl.link=Handlebars.template(function(a,b,c,d,e){function f(){return"modal-sm"}function g(a){var b,c="";return c+="btn-"+m((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===l?b.apply(a):b)),c}function h(){return'\n \n '}function i(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var j,k="",l="function",m=this.escapeExpression,n=this;return k+='\n \n \n \n \n \n \n ',j=c["if"].call(b,(j=b&&b.options,j=null==j||j===!1?j:j.toolbar,null==j||j===!1?j:j.fa),{hash:{},inverse:n.program(7,i,e),fn:n.program(5,h,e),data:e}),(j||0===j)&&(k+=j),k+="\n \n \n",k}),this.wysihtml5.tpl.lists=Handlebars.template(function(a,b,c,d,e){function f(a){var b,c="";return c+="btn-"+r((b=a&&a.options,b=null==b||b===!1?b:b.toolbar,b=null==b||b===!1?b:b.size,typeof b===q?b.apply(a):b)),c}function g(){return'\n \n '}function h(){return'\n \n '}function i(){return'\n \n '}function j(){return'\n \n '}function k(){return'\n \n '}function l(){return'\n \n '}function m(){return'\n \n '}function n(){return'\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var o,p="",q="function",r=this.escapeExpression,s=this;return p+='\n \n \n ',o=c["if"].call(b,(o=b&&b.options,o=null==o||o===!1?o:o.toolbar,null==o||o===!1?o:o.fa),{hash:{},inverse:s.program(5,h,e),fn:s.program(3,g,e),data:e}),(o||0===o)&&(p+=o),p+='\n \n \n ',o=c["if"].call(b,(o=b&&b.options,o=null==o||o===!1?o:o.toolbar,null==o||o===!1?o:o.fa),{hash:{},inverse:s.program(9,j,e),fn:s.program(7,i,e),data:e}),(o||0===o)&&(p+=o),p+='\n \n \n ',o=c["if"].call(b,(o=b&&b.options,o=null==o||o===!1?o:o.toolbar,null==o||o===!1?o:o.fa),{hash:{},inverse:s.program(13,l,e),fn:s.program(11,k,e),data:e}),(o||0===o)&&(p+=o),p+='\n \n \n ',o=c["if"].call(b,(o=b&&b.options,o=null==o||o===!1?o:o.toolbar,null==o||o===!1?o:o.fa),{hash:{},inverse:s.program(17,n,e),fn:s.program(15,m,e),data:e}),(o||0===o)&&(p+=o),p+="\n \n \n \n",p}),function(a){"use strict";"function"==typeof define&&define.amd?define("bootstrap.wysihtml5",["jquery","wysihtml5","bootstrap","bootstrap.wysihtml5.templates","bootstrap.wysihtml5.commands"],a):a(jQuery,wysihtml5)}(function(a,b){"use strict";var c=function(a,b){var c,d,e,f=function(a,c,d){return b.tpl[a]?b.tpl[a]({locale:c,options:d}):void 0},g=function(c,e){var f,g;this.el=c,f=a.extend(!0,{},d,e);for(g in f.customTemplates)f.customTemplates.hasOwnProperty(g)&&(b.tpl[g]=f.customTemplates[g]);this.toolbar=this.createToolbar(c,f),this.editor=this.createEditor(f)};g.prototype={constructor:g,createEditor:function(b){b=b||{},b=a.extend(!0,{},b),b.toolbar=this.toolbar[0],this.initializeEditor(this.el[0],b)},initializeEditor:function(a,c){var d,e=new b.Editor(this.el[0],c);if(e.on("beforeload",this.syncBootstrapDialogEvents),e.on("beforeload",this.loadParserRules),e.composer.editableArea.contentDocument?this.addMoreShortcuts(e,e.composer.editableArea.contentDocument.body||e.composer.editableArea.contentDocument,c.shortcuts):this.addMoreShortcuts(e,e.composer.editableArea,c.shortcuts),c&&c.events)for(d in c.events)c.events.hasOwnProperty(d)&&e.on(d,c.events[d]);return e},loadParserRules:function(){"string"===a.type(this.config.parserRules)&&a.ajax({dataType:"json",url:this.config.parserRules,context:this,error:function(a,b,c){void 0},success:function(a){this.config.parserRules=a,void 0}}),this.config.pasteParserRulesets&&"string"===a.type(this.config.pasteParserRulesets)&&a.ajax({dataType:"json",url:this.config.pasteParserRulesets,context:this,error:function(a,b,c){void 0},success:function(a){this.config.pasteParserRulesets=a}})},syncBootstrapDialogEvents:function(){var b=this;a.map(this.toolbar.commandMapping,function(a){return[a]}).filter(function(a){return a.dialog}).map(function(a){return a.dialog}).forEach(function(c){c.on("show",function(){a(this.container).modal("show")}),c.on("hide",function(){a(this.container).modal("hide"),setTimeout(b.composer.focus,0)}),a(c.container).on("shown.bs.modal",function(){a(this).find("input, select, textarea").first().focus()})}),this.on("change_view",function(){a(this.toolbar.container.children).find("a.btn").not('[data-wysihtml5-action="change_view"]').toggleClass("disabled")})},createToolbar:function(b,c){var g,h,i=this,j=a("
",{"class":"wysihtml5-toolbar",style:"display:none"}),k=c.locale||d.locale||"en";e.hasOwnProperty(k)||(void 0,k="en"),g=a.extend(!0,{},e.en,e[k]);for(h in c.toolbar)c.toolbar[h]&&j.append(f(h,g,c));return j.find('a[data-wysihtml5-command="formatBlock"]').click(function(b){var c=b.delegateTarget||b.target||b.srcElement,d=a(c),e=d.data("wysihtml5-display-format-name"),f=d.data("wysihtml5-format-name")||d.html();(void 0===e||"true"===e)&&i.toolbar.find(".current-font").text(f)}),j.find('a[data-wysihtml5-command="foreColor"]').click(function(b){var c=b.target||b.srcElement,d=a(c);i.toolbar.find(".current-color").text(d.html())}),this.el.before(j),j},addMoreShortcuts:function(a,c,d){b.dom.observe(c,"keydown",function(c){var e,f=c.keyCode,g=d[f];(c.ctrlKey||c.metaKey||c.altKey)&&g&&b.commands[g]&&(e=a.toolbar.commandMapping[g+":null"],e&&e.dialog&&!e.state?e.dialog.show():b.commands[g].exec(a.composer,g),c.preventDefault())})}},c={resetDefaults:function(){a.fn.wysihtml5.defaultOptions=a.extend(!0,{},a.fn.wysihtml5.defaultOptionsCache)},bypassDefaults:function(b){return this.each(function(){var c=a(this);c.data("wysihtml5",new g(c,b))})},shallowExtend:function(b){var d=a.extend({},a.fn.wysihtml5.defaultOptions,b||{},a(this).data()),e=this;return c.bypassDefaults.apply(e,[d])},deepExtend:function(b){var d=a.extend(!0,{},a.fn.wysihtml5.defaultOptions,b||{}),e=this;return c.bypassDefaults.apply(e,[d])},init:function(a){var b=this;return c.shallowExtend.apply(b,[a])}},a.fn.wysihtml5=function(b){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+" does not exist on jQuery.wysihtml5"),void 0):c.init.apply(this,arguments)},a.fn.wysihtml5.Constructor=g,d=a.fn.wysihtml5.defaultOptions={toolbar:{"font-styles":!0,color:!1,emphasis:{small:!0},blockquote:!0,lists:!0,html:!1,link:!0,image:!0,smallmodals:!1},useLineBreaks:!1,parserRules:{classes:{"wysiwyg-color-silver":1,"wysiwyg-color-gray":1,"wysiwyg-color-white":1,"wysiwyg-color-maroon":1,"wysiwyg-color-red":1,"wysiwyg-color-purple":1,"wysiwyg-color-fuchsia":1,"wysiwyg-color-green":1,"wysiwyg-color-lime":1,"wysiwyg-color-olive":1,"wysiwyg-color-yellow":1,"wysiwyg-color-navy":1,"wysiwyg-color-blue":1,"wysiwyg-color-teal":1,"wysiwyg-color-aqua":1,"wysiwyg-color-orange":1},tags:{b:{},i:{},strong:{},em:{},p:{},br:{},ol:{},ul:{},li:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},blockquote:{},u:1,img:{check_attributes:{width:"numbers",alt:"alt",src:"url",height:"numbers"}},a:{check_attributes:{href:"url"},set_attributes:{target:"_blank",rel:"nofollow"}},span:1,div:1,small:1,code:1,pre:1}},locale:"en",shortcuts:{83:"small",75:"createLink"}},void 0===a.fn.wysihtml5.defaultOptionsCache&&(a.fn.wysihtml5.defaultOptionsCache=a.extend(!0,{},a.fn.wysihtml5.defaultOptions)),e=a.fn.wysihtml5.locale={}};c(a,b)}),function(a){a.commands.small={exec:function(b,c){return a.commands.formatInline.exec(b,c,"small")},state:function(b,c){return a.commands.formatInline.state(b,c,"small")}}}(wysihtml5),function(a){"function"==typeof define&&define.amd?define("bootstrap.wysihtml5.en-US",["jquery","bootstrap.wysihtml5"],a):a(jQuery)}(function(a){a.fn.wysihtml5.locale.en=a.fn.wysihtml5.locale["en-US"]={font_styles:{normal:"Normal text",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6"},emphasis:{bold:"Bold",italic:"Italic",underline:"Underline",small:"Small"},lists:{unordered:"Unordered list",ordered:"Ordered list",outdent:"Outdent",indent:"Indent"},link:{insert:"Insert link",cancel:"Cancel",target:"Open link in new window"},image:{insert:"Insert image",cancel:"Cancel"},html:{edit:"Edit HTML"},colours:{black:"Black",silver:"Silver",gray:"Grey",maroon:"Maroon",red:"Red",purple:"Purple",green:"Green",olive:"Olive",navy:"Navy",blue:"Blue",orange:"Orange"}}});
\ No newline at end of file
diff --git a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css b/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css
deleted file mode 100644
index 51c58df8..00000000
--- a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css
+++ /dev/null
@@ -1,117 +0,0 @@
-ul.wysihtml5-toolbar {
- margin: 0;
- padding: 0;
- display: block;
-}
-
-ul.wysihtml5-toolbar::after {
- clear: both;
- display: table;
- content: "";
-}
-
-ul.wysihtml5-toolbar > li {
- float: left;
- display: list-item;
- list-style: none;
- margin: 0 5px 10px 0;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
- font-weight: bold;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
- font-style: italic;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
- text-decoration: underline;
-}
-
-ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
- background-image: none;
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- background-color: #E6E6E6;
- background-color: #D9D9D9;
- outline: 0;
-}
-
-ul.wysihtml5-commands-disabled .dropdown-menu {
- display: none !important;
-}
-
-ul.wysihtml5-toolbar div.wysihtml5-colors {
- display:block;
- width: 50px;
- height: 20px;
- margin-top: 2px;
- margin-left: 5px;
- position: absolute;
- pointer-events: none;
-}
-
-ul.wysihtml5-toolbar a.wysihtml5-colors-title {
- padding-left: 70px;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
- background: black !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
- background: silver !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
- background: gray !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
- background: maroon !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
- background: red !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
- background: purple !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
- background: green !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
- background: olive !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
- background: navy !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
- background: blue !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
- background: orange !important;
-}
-
-.glyphicon-quote:before {
- content: "\201C";
- font-family: Georgia, serif;
- font-size: 50px;
- position: absolute;
- top: -4px;
- left: -3px;
- max-height: 100%;
-}
-
-.glyphicon-quote:after {
- content: "\0000a0";
-}
-
diff --git a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css b/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css
deleted file mode 100644
index 28f18316..00000000
--- a/html/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! bootstrap3-wysihtml5-bower 2014-09-26 */
-
-ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}.glyphicon-quote:before{content:"\201C";font-family:Georgia,serif;font-size:50px;position:absolute;top:-4px;left:-3px;max-height:100%}.glyphicon-quote:after{content:"\0000a0"}
\ No newline at end of file
diff --git a/html/plugins/chartjs/Chart.min.js b/html/plugins/chartjs/Chart.min.js
deleted file mode 100644
index 3a0a2c87..00000000
--- a/html/plugins/chartjs/Chart.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * Chart.js
- * http://chartjs.org/
- * Version: 1.0.2
- *
- * Copyright 2015 Nick Downie
- * Released under the MIT license
- * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
- */
-(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var i=function(t,i){return t["offset"+i]?t["offset"+i]:document.defaultView.getComputedStyle(t).getPropertyValue(i)},e=this.width=i(t.canvas,"Width"),n=this.height=i(t.canvas,"Height");t.canvas.width=e,t.canvas.height=n;var e=this.width=t.canvas.width,n=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof define&&define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),w=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),st?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),b=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),L=(s.animationLoop=function(t,i,e,s,n,o){var a=0,h=w[e]||w.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=b(l):n.apply(o)};b(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),k=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},F=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},L(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){k(t.chart.canvas,e,i)})}),R=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},T=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),M=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},W=s.fontString=function(t,i,e){return i+" "+t+"px "+e},z=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},B=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return M(this.chart),this},stop:function(){return P(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=R(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:T(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),F(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}B(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=W(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=z(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{B(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?z(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),tthis.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=z(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),l&&(t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;ip&&(p=t.x+s,n=i),t.x-sp&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<% for (var i=0; i- <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<% for (var i=0; i<%if(segments[i].label){%><%=segments[i].label%><%}%> <%}%>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i<%if(datasets[i].label){%><%=datasets[i].label%><%}%> <%}%>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&&ithis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<% for (var i=0; i- <%if(segments[i].label){%><%=segments[i].label%><%}%>
<%}%>
'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i<%if(datasets[i].label){%><%=datasets[i].label%><%}%> <%}%>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this);
\ No newline at end of file
diff --git a/html/plugins/iCheck/all.css b/html/plugins/iCheck/all.css
deleted file mode 100644
index 6439b742..00000000
--- a/html/plugins/iCheck/all.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/* iCheck plugin skins
------------------------------------ */
-@import url("minimal/_all.css");
-/*
-@import url("minimal/minimal.css");
-@import url("minimal/red.css");
-@import url("minimal/green.css");
-@import url("minimal/blue.css");
-@import url("minimal/aero.css");
-@import url("minimal/grey.css");
-@import url("minimal/orange.css");
-@import url("minimal/yellow.css");
-@import url("minimal/pink.css");
-@import url("minimal/purple.css");
-*/
-
-@import url("square/_all.css");
-/*
-@import url("square/square.css");
-@import url("square/red.css");
-@import url("square/green.css");
-@import url("square/blue.css");
-@import url("square/aero.css");
-@import url("square/grey.css");
-@import url("square/orange.css");
-@import url("square/yellow.css");
-@import url("square/pink.css");
-@import url("square/purple.css");
-*/
-
-@import url("flat/_all.css");
-/*
-@import url("flat/flat.css");
-@import url("flat/red.css");
-@import url("flat/green.css");
-@import url("flat/blue.css");
-@import url("flat/aero.css");
-@import url("flat/grey.css");
-@import url("flat/orange.css");
-@import url("flat/yellow.css");
-@import url("flat/pink.css");
-@import url("flat/purple.css");
-*/
-
-@import url("line/_all.css");
-/*
-@import url("line/line.css");
-@import url("line/red.css");
-@import url("line/green.css");
-@import url("line/blue.css");
-@import url("line/aero.css");
-@import url("line/grey.css");
-@import url("line/orange.css");
-@import url("line/yellow.css");
-@import url("line/pink.css");
-@import url("line/purple.css");
-*/
-
-@import url("polaris/polaris.css");
-
-@import url("futurico/futurico.css");
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/_all.css b/html/plugins/iCheck/flat/_all.css
deleted file mode 100644
index 21647b50..00000000
--- a/html/plugins/iCheck/flat/_all.css
+++ /dev/null
@@ -1,560 +0,0 @@
-/* iCheck plugin Flat skin
------------------------------------ */
-.icheckbox_flat,
-.iradio_flat {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(flat.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat {
- background-position: 0 0;
-}
- .icheckbox_flat.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat {
- background-position: -88px 0;
-}
- .iradio_flat.checked {
- background-position: -110px 0;
- }
- .iradio_flat.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat,
- .iradio_flat {
- background-image: url(flat@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* red */
-.icheckbox_flat-red,
-.iradio_flat-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-red {
- background-position: 0 0;
-}
- .icheckbox_flat-red.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-red.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-red.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-red {
- background-position: -88px 0;
-}
- .iradio_flat-red.checked {
- background-position: -110px 0;
- }
- .iradio_flat-red.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-red.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-red,
- .iradio_flat-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* green */
-.icheckbox_flat-green,
-.iradio_flat-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-green {
- background-position: 0 0;
-}
- .icheckbox_flat-green.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-green.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-green.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-green {
- background-position: -88px 0;
-}
- .iradio_flat-green.checked {
- background-position: -110px 0;
- }
- .iradio_flat-green.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-green.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-green,
- .iradio_flat-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* blue */
-.icheckbox_flat-blue,
-.iradio_flat-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-blue {
- background-position: 0 0;
-}
- .icheckbox_flat-blue.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-blue.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-blue.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-blue {
- background-position: -88px 0;
-}
- .iradio_flat-blue.checked {
- background-position: -110px 0;
- }
- .iradio_flat-blue.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-blue.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-blue,
- .iradio_flat-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* aero */
-.icheckbox_flat-aero,
-.iradio_flat-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-aero {
- background-position: 0 0;
-}
- .icheckbox_flat-aero.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-aero.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-aero.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-aero {
- background-position: -88px 0;
-}
- .iradio_flat-aero.checked {
- background-position: -110px 0;
- }
- .iradio_flat-aero.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-aero.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-aero,
- .iradio_flat-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* grey */
-.icheckbox_flat-grey,
-.iradio_flat-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-grey {
- background-position: 0 0;
-}
- .icheckbox_flat-grey.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-grey.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-grey.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-grey {
- background-position: -88px 0;
-}
- .iradio_flat-grey.checked {
- background-position: -110px 0;
- }
- .iradio_flat-grey.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-grey.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-grey,
- .iradio_flat-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* orange */
-.icheckbox_flat-orange,
-.iradio_flat-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-orange {
- background-position: 0 0;
-}
- .icheckbox_flat-orange.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-orange.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-orange.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-orange {
- background-position: -88px 0;
-}
- .iradio_flat-orange.checked {
- background-position: -110px 0;
- }
- .iradio_flat-orange.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-orange.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-orange,
- .iradio_flat-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* yellow */
-.icheckbox_flat-yellow,
-.iradio_flat-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-yellow {
- background-position: 0 0;
-}
- .icheckbox_flat-yellow.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-yellow.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-yellow.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-yellow {
- background-position: -88px 0;
-}
- .iradio_flat-yellow.checked {
- background-position: -110px 0;
- }
- .iradio_flat-yellow.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-yellow.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-yellow,
- .iradio_flat-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* pink */
-.icheckbox_flat-pink,
-.iradio_flat-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-pink {
- background-position: 0 0;
-}
- .icheckbox_flat-pink.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-pink.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-pink.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-pink {
- background-position: -88px 0;
-}
- .iradio_flat-pink.checked {
- background-position: -110px 0;
- }
- .iradio_flat-pink.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-pink.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-pink,
- .iradio_flat-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
-
-/* purple */
-.icheckbox_flat-purple,
-.iradio_flat-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-purple {
- background-position: 0 0;
-}
- .icheckbox_flat-purple.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-purple.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-purple.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-purple {
- background-position: -88px 0;
-}
- .iradio_flat-purple.checked {
- background-position: -110px 0;
- }
- .iradio_flat-purple.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-purple.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-purple,
- .iradio_flat-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/aero.css b/html/plugins/iCheck/flat/aero.css
deleted file mode 100644
index 98fd65c8..00000000
--- a/html/plugins/iCheck/flat/aero.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, aero
------------------------------------ */
-.icheckbox_flat-aero,
-.iradio_flat-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-aero {
- background-position: 0 0;
-}
- .icheckbox_flat-aero.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-aero.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-aero.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-aero {
- background-position: -88px 0;
-}
- .iradio_flat-aero.checked {
- background-position: -110px 0;
- }
- .iradio_flat-aero.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-aero.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-aero,
- .iradio_flat-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/aero.png b/html/plugins/iCheck/flat/aero.png
deleted file mode 100644
index f4277aa4..00000000
Binary files a/html/plugins/iCheck/flat/aero.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/aero@2x.png b/html/plugins/iCheck/flat/aero@2x.png
deleted file mode 100644
index a9a74945..00000000
Binary files a/html/plugins/iCheck/flat/aero@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/blue.css b/html/plugins/iCheck/flat/blue.css
deleted file mode 100644
index 07836749..00000000
--- a/html/plugins/iCheck/flat/blue.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, blue
------------------------------------ */
-.icheckbox_flat-blue,
-.iradio_flat-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-blue {
- background-position: 0 0;
-}
- .icheckbox_flat-blue.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-blue.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-blue.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-blue {
- background-position: -88px 0;
-}
- .iradio_flat-blue.checked {
- background-position: -110px 0;
- }
- .iradio_flat-blue.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-blue.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-blue,
- .iradio_flat-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/blue.png b/html/plugins/iCheck/flat/blue.png
deleted file mode 100644
index 4b6ef982..00000000
Binary files a/html/plugins/iCheck/flat/blue.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/blue@2x.png b/html/plugins/iCheck/flat/blue@2x.png
deleted file mode 100644
index d52da057..00000000
Binary files a/html/plugins/iCheck/flat/blue@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/flat.css b/html/plugins/iCheck/flat/flat.css
deleted file mode 100644
index 418620ee..00000000
--- a/html/plugins/iCheck/flat/flat.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin flat skin, black
------------------------------------ */
-.icheckbox_flat,
-.iradio_flat {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(flat.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat {
- background-position: 0 0;
-}
- .icheckbox_flat.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat {
- background-position: -88px 0;
-}
- .iradio_flat.checked {
- background-position: -110px 0;
- }
- .iradio_flat.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat,
- .iradio_flat {
- background-image: url(flat@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/flat.png b/html/plugins/iCheck/flat/flat.png
deleted file mode 100644
index 15af826e..00000000
Binary files a/html/plugins/iCheck/flat/flat.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/flat@2x.png b/html/plugins/iCheck/flat/flat@2x.png
deleted file mode 100644
index e70e438c..00000000
Binary files a/html/plugins/iCheck/flat/flat@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/green.css b/html/plugins/iCheck/flat/green.css
deleted file mode 100644
index c9d17c16..00000000
--- a/html/plugins/iCheck/flat/green.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, green
------------------------------------ */
-.icheckbox_flat-green,
-.iradio_flat-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-green {
- background-position: 0 0;
-}
- .icheckbox_flat-green.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-green.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-green.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-green {
- background-position: -88px 0;
-}
- .iradio_flat-green.checked {
- background-position: -110px 0;
- }
- .iradio_flat-green.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-green.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-green,
- .iradio_flat-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/green.png b/html/plugins/iCheck/flat/green.png
deleted file mode 100644
index 6b303fbe..00000000
Binary files a/html/plugins/iCheck/flat/green.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/green@2x.png b/html/plugins/iCheck/flat/green@2x.png
deleted file mode 100644
index 92b4411d..00000000
Binary files a/html/plugins/iCheck/flat/green@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/grey.css b/html/plugins/iCheck/flat/grey.css
deleted file mode 100644
index a451650e..00000000
--- a/html/plugins/iCheck/flat/grey.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, grey
------------------------------------ */
-.icheckbox_flat-grey,
-.iradio_flat-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-grey {
- background-position: 0 0;
-}
- .icheckbox_flat-grey.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-grey.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-grey.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-grey {
- background-position: -88px 0;
-}
- .iradio_flat-grey.checked {
- background-position: -110px 0;
- }
- .iradio_flat-grey.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-grey.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-grey,
- .iradio_flat-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/grey.png b/html/plugins/iCheck/flat/grey.png
deleted file mode 100644
index c6e2873e..00000000
Binary files a/html/plugins/iCheck/flat/grey.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/grey@2x.png b/html/plugins/iCheck/flat/grey@2x.png
deleted file mode 100644
index 0b47b1c6..00000000
Binary files a/html/plugins/iCheck/flat/grey@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/orange.css b/html/plugins/iCheck/flat/orange.css
deleted file mode 100644
index 8c9c9297..00000000
--- a/html/plugins/iCheck/flat/orange.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, orange
------------------------------------ */
-.icheckbox_flat-orange,
-.iradio_flat-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-orange {
- background-position: 0 0;
-}
- .icheckbox_flat-orange.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-orange.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-orange.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-orange {
- background-position: -88px 0;
-}
- .iradio_flat-orange.checked {
- background-position: -110px 0;
- }
- .iradio_flat-orange.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-orange.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-orange,
- .iradio_flat-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/orange.png b/html/plugins/iCheck/flat/orange.png
deleted file mode 100644
index ec2532eb..00000000
Binary files a/html/plugins/iCheck/flat/orange.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/orange@2x.png b/html/plugins/iCheck/flat/orange@2x.png
deleted file mode 100644
index 9350b506..00000000
Binary files a/html/plugins/iCheck/flat/orange@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/pink.css b/html/plugins/iCheck/flat/pink.css
deleted file mode 100644
index afa49566..00000000
--- a/html/plugins/iCheck/flat/pink.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, pink
------------------------------------ */
-.icheckbox_flat-pink,
-.iradio_flat-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-pink {
- background-position: 0 0;
-}
- .icheckbox_flat-pink.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-pink.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-pink.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-pink {
- background-position: -88px 0;
-}
- .iradio_flat-pink.checked {
- background-position: -110px 0;
- }
- .iradio_flat-pink.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-pink.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-pink,
- .iradio_flat-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/pink.png b/html/plugins/iCheck/flat/pink.png
deleted file mode 100644
index 3e65d9dd..00000000
Binary files a/html/plugins/iCheck/flat/pink.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/pink@2x.png b/html/plugins/iCheck/flat/pink@2x.png
deleted file mode 100644
index 281ba06b..00000000
Binary files a/html/plugins/iCheck/flat/pink@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/purple.css b/html/plugins/iCheck/flat/purple.css
deleted file mode 100644
index a9760b36..00000000
--- a/html/plugins/iCheck/flat/purple.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, purple
------------------------------------ */
-.icheckbox_flat-purple,
-.iradio_flat-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-purple {
- background-position: 0 0;
-}
- .icheckbox_flat-purple.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-purple.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-purple.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-purple {
- background-position: -88px 0;
-}
- .iradio_flat-purple.checked {
- background-position: -110px 0;
- }
- .iradio_flat-purple.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-purple.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-purple,
- .iradio_flat-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/purple.png b/html/plugins/iCheck/flat/purple.png
deleted file mode 100644
index 3699fd58..00000000
Binary files a/html/plugins/iCheck/flat/purple.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/purple@2x.png b/html/plugins/iCheck/flat/purple@2x.png
deleted file mode 100644
index 7f4be74a..00000000
Binary files a/html/plugins/iCheck/flat/purple@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/red.css b/html/plugins/iCheck/flat/red.css
deleted file mode 100644
index 34b71e47..00000000
--- a/html/plugins/iCheck/flat/red.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, red
------------------------------------ */
-.icheckbox_flat-red,
-.iradio_flat-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-red {
- background-position: 0 0;
-}
- .icheckbox_flat-red.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-red.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-red.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-red {
- background-position: -88px 0;
-}
- .iradio_flat-red.checked {
- background-position: -110px 0;
- }
- .iradio_flat-red.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-red.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-red,
- .iradio_flat-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/red.png b/html/plugins/iCheck/flat/red.png
deleted file mode 100644
index 0d5ac381..00000000
Binary files a/html/plugins/iCheck/flat/red.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/red@2x.png b/html/plugins/iCheck/flat/red@2x.png
deleted file mode 100644
index 38590d98..00000000
Binary files a/html/plugins/iCheck/flat/red@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/yellow.css b/html/plugins/iCheck/flat/yellow.css
deleted file mode 100644
index 96ae5b1f..00000000
--- a/html/plugins/iCheck/flat/yellow.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Flat skin, yellow
------------------------------------ */
-.icheckbox_flat-yellow,
-.iradio_flat-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 20px;
- height: 20px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_flat-yellow {
- background-position: 0 0;
-}
- .icheckbox_flat-yellow.checked {
- background-position: -22px 0;
- }
- .icheckbox_flat-yellow.disabled {
- background-position: -44px 0;
- cursor: default;
- }
- .icheckbox_flat-yellow.checked.disabled {
- background-position: -66px 0;
- }
-
-.iradio_flat-yellow {
- background-position: -88px 0;
-}
- .iradio_flat-yellow.checked {
- background-position: -110px 0;
- }
- .iradio_flat-yellow.disabled {
- background-position: -132px 0;
- cursor: default;
- }
- .iradio_flat-yellow.checked.disabled {
- background-position: -154px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_flat-yellow,
- .iradio_flat-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 176px 22px;
- background-size: 176px 22px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/flat/yellow.png b/html/plugins/iCheck/flat/yellow.png
deleted file mode 100644
index 909dadc5..00000000
Binary files a/html/plugins/iCheck/flat/yellow.png and /dev/null differ
diff --git a/html/plugins/iCheck/flat/yellow@2x.png b/html/plugins/iCheck/flat/yellow@2x.png
deleted file mode 100644
index 9fd5d733..00000000
Binary files a/html/plugins/iCheck/flat/yellow@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/futurico/futurico.css b/html/plugins/iCheck/futurico/futurico.css
deleted file mode 100644
index 2654cf4f..00000000
--- a/html/plugins/iCheck/futurico/futurico.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/* iCheck plugin Futurico skin
------------------------------------ */
-.icheckbox_futurico,
-.iradio_futurico {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 16px;
- height: 17px;
- background: url(futurico.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_futurico {
- background-position: 0 0;
-}
- .icheckbox_futurico.checked {
- background-position: -18px 0;
- }
- .icheckbox_futurico.disabled {
- background-position: -36px 0;
- cursor: default;
- }
- .icheckbox_futurico.checked.disabled {
- background-position: -54px 0;
- }
-
-.iradio_futurico {
- background-position: -72px 0;
-}
- .iradio_futurico.checked {
- background-position: -90px 0;
- }
- .iradio_futurico.disabled {
- background-position: -108px 0;
- cursor: default;
- }
- .iradio_futurico.checked.disabled {
- background-position: -126px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_futurico,
- .iradio_futurico {
- background-image: url(futurico@2x.png);
- -webkit-background-size: 144px 19px;
- background-size: 144px 19px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/futurico/futurico.png b/html/plugins/iCheck/futurico/futurico.png
deleted file mode 100644
index 50d62b5d..00000000
Binary files a/html/plugins/iCheck/futurico/futurico.png and /dev/null differ
diff --git a/html/plugins/iCheck/futurico/futurico@2x.png b/html/plugins/iCheck/futurico/futurico@2x.png
deleted file mode 100644
index f7eb45aa..00000000
Binary files a/html/plugins/iCheck/futurico/futurico@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/icheck.js b/html/plugins/iCheck/icheck.js
deleted file mode 100644
index 4da1937a..00000000
--- a/html/plugins/iCheck/icheck.js
+++ /dev/null
@@ -1,478 +0,0 @@
-/*!
- * iCheck v1.0.1, http://git.io/arlzeA
- * =================================
- * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization
- *
- * (c) 2013 Damir Sultanov, http://fronteed.com
- * MIT Licensed
- */
-
-(function($) {
-
- // Cached vars
- var _iCheck = 'iCheck',
- _iCheckHelper = _iCheck + '-helper',
- _checkbox = 'checkbox',
- _radio = 'radio',
- _checked = 'checked',
- _unchecked = 'un' + _checked,
- _disabled = 'disabled',
- _determinate = 'determinate',
- _indeterminate = 'in' + _determinate,
- _update = 'update',
- _type = 'type',
- _click = 'click',
- _touch = 'touchbegin.i touchend.i',
- _add = 'addClass',
- _remove = 'removeClass',
- _callback = 'trigger',
- _label = 'label',
- _cursor = 'cursor',
- _mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
-
- // Plugin init
- $.fn[_iCheck] = function(options, fire) {
-
- // Walker
- var handle = 'input[type="' + _checkbox + '"], input[type="' + _radio + '"]',
- stack = $(),
- walker = function(object) {
- object.each(function() {
- var self = $(this);
-
- if (self.is(handle)) {
- stack = stack.add(self);
- } else {
- stack = stack.add(self.find(handle));
- }
- });
- };
-
- // Check if we should operate with some method
- if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {
-
- // Normalize method's name
- options = options.toLowerCase();
-
- // Find checkboxes and radio buttons
- walker(this);
-
- return stack.each(function() {
- var self = $(this);
-
- if (options == 'destroy') {
- tidy(self, 'ifDestroyed');
- } else {
- operate(self, true, options);
- }
- // Fire method's callback
- if ($.isFunction(fire)) {
- fire();
- }
- });
-
- // Customization
- } else if (typeof options == 'object' || !options) {
-
- // Check if any options were passed
- var settings = $.extend({
- checkedClass: _checked,
- disabledClass: _disabled,
- indeterminateClass: _indeterminate,
- labelHover: true,
- aria: false
- }, options),
-
- selector = settings.handle,
- hoverClass = settings.hoverClass || 'hover',
- focusClass = settings.focusClass || 'focus',
- activeClass = settings.activeClass || 'active',
- labelHover = !!settings.labelHover,
- labelHoverClass = settings.labelHoverClass || 'hover',
-
- // Setup clickable area
- area = ('' + settings.increaseArea).replace('%', '') | 0;
-
- // Selector limit
- if (selector == _checkbox || selector == _radio) {
- handle = 'input[type="' + selector + '"]';
- }
- // Clickable area limit
- if (area < -50) {
- area = -50;
- }
- // Walk around the selector
- walker(this);
-
- return stack.each(function() {
- var self = $(this);
-
- // If already customized
- tidy(self);
-
- var node = this,
- id = node.id,
-
- // Layer styles
- offset = -area + '%',
- size = 100 + (area * 2) + '%',
- layer = {
- position: 'absolute',
- top: offset,
- left: offset,
- display: 'block',
- width: size,
- height: size,
- margin: 0,
- padding: 0,
- background: '#fff',
- border: 0,
- opacity: 0
- },
-
- // Choose how to hide input
- hide = _mobile ? {
- position: 'absolute',
- visibility: 'hidden'
- } : area ? layer : {
- position: 'absolute',
- opacity: 0
- },
-
- // Get proper class
- className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,
-
- // Find assigned labels
- label = $(_label + '[for="' + id + '"]').add(self.closest(_label)),
-
- // Check ARIA option
- aria = !!settings.aria,
-
- // Set ARIA placeholder
- ariaID = _iCheck + '-' + Math.random().toString(36).replace('0.', ''),
-
- // Parent & helper
- parent = '')[_callback]('ifCreated').parent().append(settings.insert);
-
- // Layer addition
- helper = $('').css(layer).appendTo(parent);
-
- // Finalize customization
- self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);
- !!settings.inheritClass && parent[_add](node.className || '');
- !!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);
- parent.css('position') == 'static' && parent.css('position', 'relative');
- operate(self, true, _update);
-
- // Label events
- if (label.length) {
- label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {
- var type = event[_type],
- item = $(this);
-
- // Do nothing if input is disabled
- if (!node[_disabled]) {
-
- // Click
- if (type == _click) {
- if ($(event.target).is('a')) {
- return;
- }
- operate(self, false, true);
-
- // Hover state
- } else if (labelHover) {
-
- // mouseout|touchend
- if (/ut|nd/.test(type)) {
- parent[_remove](hoverClass);
- item[_remove](labelHoverClass);
- } else {
- parent[_add](hoverClass);
- item[_add](labelHoverClass);
- }
- }
- if (_mobile) {
- event.stopPropagation();
- } else {
- return false;
- }
- }
- });
- }
- // Input events
- self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {
- var type = event[_type],
- key = event.keyCode;
-
- // Click
- if (type == _click) {
- return false;
-
- // Keydown
- } else if (type == 'keydown' && key == 32) {
- if (!(node[_type] == _radio && node[_checked])) {
- if (node[_checked]) {
- off(self, _checked);
- } else {
- on(self, _checked);
- }
- }
- return false;
-
- // Keyup
- } else if (type == 'keyup' && node[_type] == _radio) {
- !node[_checked] && on(self, _checked);
-
- // Focus/blur
- } else if (/us|ur/.test(type)) {
- parent[type == 'blur' ? _remove : _add](focusClass);
- }
- });
-
- // Helper events
- helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {
- var type = event[_type],
-
- // mousedown|mouseup
- toggle = /wn|up/.test(type) ? activeClass : hoverClass;
-
- // Do nothing if input is disabled
- if (!node[_disabled]) {
-
- // Click
- if (type == _click) {
- operate(self, false, true);
-
- // Active and hover states
- } else {
-
- // State is on
- if (/wn|er|in/.test(type)) {
-
- // mousedown|mouseover|touchbegin
- parent[_add](toggle);
-
- // State is off
- } else {
- parent[_remove](toggle + ' ' + activeClass);
- }
- // Label hover
- if (label.length && labelHover && toggle == hoverClass) {
-
- // mouseout|touchend
- label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);
- }
- }
- if (_mobile) {
- event.stopPropagation();
- } else {
- return false;
- }
- }
- });
- });
- } else {
- return this;
- }
- };
-
- // Do something with inputs
- function operate(input, direct, method) {
- var node = input[0],
- state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
- active = method == _update ? {
- checked: node[_checked],
- disabled: node[_disabled],
- indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
- } : node[state];
-
- // Check, disable or indeterminate
- if (/^(ch|di|in)/.test(method) && !active) {
- on(input, state);
-
- // Uncheck, enable or determinate
- } else if (/^(un|en|de)/.test(method) && active) {
- off(input, state);
-
- // Update
- } else if (method == _update) {
-
- // Handle states
- for (var state in active) {
- if (active[state]) {
- on(input, state, true);
- } else {
- off(input, state, true);
- }
- }
- } else if (!direct || method == 'toggle') {
-
- // Helper or label was clicked
- if (!direct) {
- input[_callback]('ifClicked');
- }
- // Toggle checked state
- if (active) {
- if (node[_type] !== _radio) {
- off(input, state);
- }
- } else {
- on(input, state);
- }
- }
- }
- // Add checked, disabled or indeterminate state
- function on(input, state, keep) {
- var node = input[0],
- parent = input.parent(),
- checked = state == _checked,
- indeterminate = state == _indeterminate,
- disabled = state == _disabled,
- callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
- regular = option(input, callback + capitalize(node[_type])),
- specific = option(input, state + capitalize(node[_type]));
-
- // Prevent unnecessary actions
- if (node[state] !== true) {
-
- // Toggle assigned radio buttons
- if (!keep && state == _checked && node[_type] == _radio && node.name) {
- var form = input.closest('form'),
- inputs = 'input[name="' + node.name + '"]';
-
- inputs = form.length ? form.find(inputs) : $(inputs);
-
- inputs.each(function() {
- if (this !== node && $(this).data(_iCheck)) {
- off($(this), state);
- }
- });
- }
- // Indeterminate state
- if (indeterminate) {
-
- // Add indeterminate state
- node[state] = true;
-
- // Remove checked state
- if (node[_checked]) {
- off(input, _checked, 'force');
- }
- // Checked or disabled state
- } else {
-
- // Add checked or disabled state
- if (!keep) {
- node[state] = true;
- }
- // Remove indeterminate state
- if (checked && node[_indeterminate]) {
- off(input, _indeterminate, false);
- }
- }
- // Trigger callbacks
- callbacks(input, checked, state, keep);
- }
- // Add proper cursor
- if (node[_disabled] && !!option(input, _cursor, true)) {
- parent.find('.' + _iCheckHelper).css(_cursor, 'default');
- }
- // Add state class
- parent[_add](specific || option(input, state) || '');
-
- // Set ARIA attribute
- disabled ? parent.attr('aria-disabled', 'true') : parent.attr('aria-checked', indeterminate ? 'mixed' : 'true');
-
- // Remove regular state class
- parent[_remove](regular || option(input, callback) || '');
- }
- // Remove checked, disabled or indeterminate state
- function off(input, state, keep) {
- var node = input[0],
- parent = input.parent(),
- checked = state == _checked,
- indeterminate = state == _indeterminate,
- disabled = state == _disabled,
- callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
- regular = option(input, callback + capitalize(node[_type])),
- specific = option(input, state + capitalize(node[_type]));
-
- // Prevent unnecessary actions
- if (node[state] !== false) {
-
- // Toggle state
- if (indeterminate || !keep || keep == 'force') {
- node[state] = false;
- }
- // Trigger callbacks
- callbacks(input, checked, callback, keep);
- }
- // Add proper cursor
- if (!node[_disabled] && !!option(input, _cursor, true)) {
- parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
- }
- // Remove state class
- parent[_remove](specific || option(input, state) || '');
-
- // Set ARIA attribute
- disabled ? parent.attr('aria-disabled', 'false') : parent.attr('aria-checked', 'false');
-
- // Add regular state class
- parent[_add](regular || option(input, callback) || '');
- }
- // Remove all traces
- function tidy(input, callback) {
- if (input.data(_iCheck)) {
-
- // Remove everything except input
- input.parent().html(input.attr('style', input.data(_iCheck).s || ''));
-
- // Callback
- if (callback) {
- input[_callback](callback);
- }
- // Unbind events
- input.off('.i').unwrap();
- $(_label + '[for="' + input[0].id + '"]').add(input.closest(_label)).off('.i');
- }
- }
- // Get some option
- function option(input, state, regular) {
- if (input.data(_iCheck)) {
- return input.data(_iCheck).o[state + (regular ? '' : 'Class')];
- }
- }
- // Capitalize some string
- function capitalize(string) {
- return string.charAt(0).toUpperCase() + string.slice(1);
- }
- // Executable handlers
- function callbacks(input, checked, callback, keep) {
- if (!keep) {
- if (checked) {
- input[_callback]('ifToggled');
- }
- input[_callback]('ifChanged')[_callback]('if' + capitalize(callback));
- }
- }
-})(window.jQuery || window.Zepto);
diff --git a/html/plugins/iCheck/icheck.min.js b/html/plugins/iCheck/icheck.min.js
deleted file mode 100644
index d2720ed0..00000000
--- a/html/plugins/iCheck/icheck.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
-(function(h){function F(a,b,d){var c=a[0],e=/er/.test(d)?m:/bl/.test(d)?s:l,f=d==H?{checked:c[l],disabled:c[s],indeterminate:"true"==a.attr(m)||"false"==a.attr(w)}:c[e];if(/^(ch|di|in)/.test(d)&&!f)D(a,e);else if(/^(un|en|de)/.test(d)&&f)t(a,e);else if(d==H)for(e in f)f[e]?D(a,e,!0):t(a,e,!0);else if(!b||"toggle"==d){if(!b)a[p]("ifClicked");f?c[n]!==u&&t(a,e):D(a,e)}}function D(a,b,d){var c=a[0],e=a.parent(),f=b==l,A=b==m,B=b==s,K=A?w:f?E:"enabled",p=k(a,K+x(c[n])),N=k(a,b+x(c[n]));if(!0!==c[b]){if(!d&&
-b==l&&c[n]==u&&c.name){var C=a.closest("form"),r='input[name="'+c.name+'"]',r=C.length?C.find(r):h(r);r.each(function(){this!==c&&h(this).data(q)&&t(h(this),b)})}A?(c[b]=!0,c[l]&&t(a,l,"force")):(d||(c[b]=!0),f&&c[m]&&t(a,m,!1));L(a,f,b,d)}c[s]&&k(a,y,!0)&&e.find("."+I).css(y,"default");e[v](N||k(a,b)||"");B?e.attr("aria-disabled","true"):e.attr("aria-checked",A?"mixed":"true");e[z](p||k(a,K)||"")}function t(a,b,d){var c=a[0],e=a.parent(),f=b==l,h=b==m,q=b==s,p=h?w:f?E:"enabled",t=k(a,p+x(c[n])),
-u=k(a,b+x(c[n]));if(!1!==c[b]){if(h||!d||"force"==d)c[b]=!1;L(a,f,p,d)}!c[s]&&k(a,y,!0)&&e.find("."+I).css(y,"pointer");e[z](u||k(a,b)||"");q?e.attr("aria-disabled","false"):e.attr("aria-checked","false");e[v](t||k(a,p)||"")}function M(a,b){if(a.data(q)){a.parent().html(a.attr("style",a.data(q).s||""));if(b)a[p](b);a.off(".i").unwrap();h(G+'[for="'+a[0].id+'"]').add(a.closest(G)).off(".i")}}function k(a,b,d){if(a.data(q))return a.data(q).o[b+(d?"":"Class")]}function x(a){return a.charAt(0).toUpperCase()+
-a.slice(1)}function L(a,b,d,c){if(!c){if(b)a[p]("ifToggled");a[p]("ifChanged")[p]("if"+x(d))}}var q="iCheck",I=q+"-helper",u="radio",l="checked",E="un"+l,s="disabled",w="determinate",m="in"+w,H="update",n="type",v="addClass",z="removeClass",p="trigger",G="label",y="cursor",J=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);h.fn[q]=function(a,b){var d='input[type="checkbox"], input[type="'+u+'"]',c=h(),e=function(a){a.each(function(){var a=h(this);c=a.is(d)?
-c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),e(this),c.each(function(){var c=h(this);"destroy"==a?M(c,"ifDestroyed"):F(c,!0,a);h.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var f=h.extend({checkedClass:l,disabledClass:s,indeterminateClass:m,labelHover:!0,aria:!1},a),k=f.handle,B=f.hoverClass||"hover",x=f.focusClass||"focus",w=f.activeClass||"active",y=!!f.labelHover,C=f.labelHoverClass||
-"hover",r=(""+f.increaseArea).replace("%","")|0;if("checkbox"==k||k==u)d='input[type="'+k+'"]';-50>r&&(r=-50);e(this);return c.each(function(){var a=h(this);M(a);var c=this,b=c.id,e=-r+"%",d=100+2*r+"%",d={position:"absolute",top:e,left:e,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},e=J?{position:"absolute",visibility:"hidden"}:r?d:{position:"absolute",opacity:0},k="checkbox"==c[n]?f.checkboxClass||"icheckbox":f.radioClass||"i"+u,m=h(G+'[for="'+b+'"]').add(a.closest(G)),
-A=!!f.aria,E=q+"-"+Math.random().toString(36).replace("0.",""),g='")[p]("ifCreated").parent().append(f.insert);d=h('').css(d).appendTo(g);a.data(q,{o:f,s:a.attr("style")}).css(e);f.inheritClass&&g[v](c.className||"");f.inheritID&&b&&g.attr("id",q+"-"+b);"static"==g.css("position")&&g.css("position","relative");F(a,!0,H);
-if(m.length)m.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(b){var d=b[n],e=h(this);if(!c[s]){if("click"==d){if(h(b.target).is("a"))return;F(a,!1,!0)}else y&&(/ut|nd/.test(d)?(g[z](B),e[z](C)):(g[v](B),e[v](C)));if(J)b.stopPropagation();else return!1}});a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[n];b=b.keyCode;if("click"==d)return!1;if("keydown"==d&&32==b)return c[n]==u&&c[l]||(c[l]?t(a,l):D(a,l)),!1;if("keyup"==d&&c[n]==u)!c[l]&&D(a,l);else if(/us|ur/.test(d))g["blur"==
-d?z:v](x)});d.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(b){var d=b[n],e=/wn|up/.test(d)?w:B;if(!c[s]){if("click"==d)F(a,!1,!0);else{if(/wn|er|in/.test(d))g[v](e);else g[z](e+" "+w);if(m.length&&y&&e==B)m[/ut|nd/.test(d)?z:v](C)}if(J)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
diff --git a/html/plugins/iCheck/line/_all.css b/html/plugins/iCheck/line/_all.css
deleted file mode 100644
index a18d0d90..00000000
--- a/html/plugins/iCheck/line/_all.css
+++ /dev/null
@@ -1,740 +0,0 @@
-/* iCheck plugin Line skin
------------------------------------ */
-.icheckbox_line,
-.iradio_line {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #000;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line .icheck_line-icon,
- .iradio_line .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line.hover,
- .icheckbox_line.checked.hover,
- .iradio_line.hover {
- background: #444;
- }
- .icheckbox_line.checked,
- .iradio_line.checked {
- background: #000;
- }
- .icheckbox_line.checked .icheck_line-icon,
- .iradio_line.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line.disabled,
- .iradio_line.disabled {
- background: #ccc;
- cursor: default;
- }
- .icheckbox_line.disabled .icheck_line-icon,
- .iradio_line.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line.checked.disabled,
- .iradio_line.checked.disabled {
- background: #ccc;
- }
- .icheckbox_line.checked.disabled .icheck_line-icon,
- .iradio_line.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line .icheck_line-icon,
- .iradio_line .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* red */
-.icheckbox_line-red,
-.iradio_line-red {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #e56c69;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-red .icheck_line-icon,
- .iradio_line-red .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-red.hover,
- .icheckbox_line-red.checked.hover,
- .iradio_line-red.hover {
- background: #E98582;
- }
- .icheckbox_line-red.checked,
- .iradio_line-red.checked {
- background: #e56c69;
- }
- .icheckbox_line-red.checked .icheck_line-icon,
- .iradio_line-red.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-red.disabled,
- .iradio_line-red.disabled {
- background: #F7D3D2;
- cursor: default;
- }
- .icheckbox_line-red.disabled .icheck_line-icon,
- .iradio_line-red.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-red.checked.disabled,
- .iradio_line-red.checked.disabled {
- background: #F7D3D2;
- }
- .icheckbox_line-red.checked.disabled .icheck_line-icon,
- .iradio_line-red.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-red .icheck_line-icon,
- .iradio_line-red .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* green */
-.icheckbox_line-green,
-.iradio_line-green {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #1b7e5a;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-green .icheck_line-icon,
- .iradio_line-green .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-green.hover,
- .icheckbox_line-green.checked.hover,
- .iradio_line-green.hover {
- background: #24AA7A;
- }
- .icheckbox_line-green.checked,
- .iradio_line-green.checked {
- background: #1b7e5a;
- }
- .icheckbox_line-green.checked .icheck_line-icon,
- .iradio_line-green.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-green.disabled,
- .iradio_line-green.disabled {
- background: #89E6C4;
- cursor: default;
- }
- .icheckbox_line-green.disabled .icheck_line-icon,
- .iradio_line-green.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-green.checked.disabled,
- .iradio_line-green.checked.disabled {
- background: #89E6C4;
- }
- .icheckbox_line-green.checked.disabled .icheck_line-icon,
- .iradio_line-green.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-green .icheck_line-icon,
- .iradio_line-green .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* blue */
-.icheckbox_line-blue,
-.iradio_line-blue {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #2489c5;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-blue .icheck_line-icon,
- .iradio_line-blue .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-blue.hover,
- .icheckbox_line-blue.checked.hover,
- .iradio_line-blue.hover {
- background: #3DA0DB;
- }
- .icheckbox_line-blue.checked,
- .iradio_line-blue.checked {
- background: #2489c5;
- }
- .icheckbox_line-blue.checked .icheck_line-icon,
- .iradio_line-blue.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-blue.disabled,
- .iradio_line-blue.disabled {
- background: #ADD7F0;
- cursor: default;
- }
- .icheckbox_line-blue.disabled .icheck_line-icon,
- .iradio_line-blue.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-blue.checked.disabled,
- .iradio_line-blue.checked.disabled {
- background: #ADD7F0;
- }
- .icheckbox_line-blue.checked.disabled .icheck_line-icon,
- .iradio_line-blue.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-blue .icheck_line-icon,
- .iradio_line-blue .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* aero */
-.icheckbox_line-aero,
-.iradio_line-aero {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #9cc2cb;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-aero .icheck_line-icon,
- .iradio_line-aero .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-aero.hover,
- .icheckbox_line-aero.checked.hover,
- .iradio_line-aero.hover {
- background: #B5D1D8;
- }
- .icheckbox_line-aero.checked,
- .iradio_line-aero.checked {
- background: #9cc2cb;
- }
- .icheckbox_line-aero.checked .icheck_line-icon,
- .iradio_line-aero.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-aero.disabled,
- .iradio_line-aero.disabled {
- background: #D2E4E8;
- cursor: default;
- }
- .icheckbox_line-aero.disabled .icheck_line-icon,
- .iradio_line-aero.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-aero.checked.disabled,
- .iradio_line-aero.checked.disabled {
- background: #D2E4E8;
- }
- .icheckbox_line-aero.checked.disabled .icheck_line-icon,
- .iradio_line-aero.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-aero .icheck_line-icon,
- .iradio_line-aero .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* grey */
-.icheckbox_line-grey,
-.iradio_line-grey {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #73716e;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-grey .icheck_line-icon,
- .iradio_line-grey .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-grey.hover,
- .icheckbox_line-grey.checked.hover,
- .iradio_line-grey.hover {
- background: #8B8986;
- }
- .icheckbox_line-grey.checked,
- .iradio_line-grey.checked {
- background: #73716e;
- }
- .icheckbox_line-grey.checked .icheck_line-icon,
- .iradio_line-grey.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-grey.disabled,
- .iradio_line-grey.disabled {
- background: #D5D4D3;
- cursor: default;
- }
- .icheckbox_line-grey.disabled .icheck_line-icon,
- .iradio_line-grey.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-grey.checked.disabled,
- .iradio_line-grey.checked.disabled {
- background: #D5D4D3;
- }
- .icheckbox_line-grey.checked.disabled .icheck_line-icon,
- .iradio_line-grey.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-grey .icheck_line-icon,
- .iradio_line-grey .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* orange */
-.icheckbox_line-orange,
-.iradio_line-orange {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #f70;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-orange .icheck_line-icon,
- .iradio_line-orange .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-orange.hover,
- .icheckbox_line-orange.checked.hover,
- .iradio_line-orange.hover {
- background: #FF9233;
- }
- .icheckbox_line-orange.checked,
- .iradio_line-orange.checked {
- background: #f70;
- }
- .icheckbox_line-orange.checked .icheck_line-icon,
- .iradio_line-orange.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-orange.disabled,
- .iradio_line-orange.disabled {
- background: #FFD6B3;
- cursor: default;
- }
- .icheckbox_line-orange.disabled .icheck_line-icon,
- .iradio_line-orange.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-orange.checked.disabled,
- .iradio_line-orange.checked.disabled {
- background: #FFD6B3;
- }
- .icheckbox_line-orange.checked.disabled .icheck_line-icon,
- .iradio_line-orange.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-orange .icheck_line-icon,
- .iradio_line-orange .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* yellow */
-.icheckbox_line-yellow,
-.iradio_line-yellow {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #FFC414;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-yellow .icheck_line-icon,
- .iradio_line-yellow .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-yellow.hover,
- .icheckbox_line-yellow.checked.hover,
- .iradio_line-yellow.hover {
- background: #FFD34F;
- }
- .icheckbox_line-yellow.checked,
- .iradio_line-yellow.checked {
- background: #FFC414;
- }
- .icheckbox_line-yellow.checked .icheck_line-icon,
- .iradio_line-yellow.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-yellow.disabled,
- .iradio_line-yellow.disabled {
- background: #FFE495;
- cursor: default;
- }
- .icheckbox_line-yellow.disabled .icheck_line-icon,
- .iradio_line-yellow.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-yellow.checked.disabled,
- .iradio_line-yellow.checked.disabled {
- background: #FFE495;
- }
- .icheckbox_line-yellow.checked.disabled .icheck_line-icon,
- .iradio_line-yellow.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-yellow .icheck_line-icon,
- .iradio_line-yellow .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* pink */
-.icheckbox_line-pink,
-.iradio_line-pink {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #a77a94;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-pink .icheck_line-icon,
- .iradio_line-pink .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-pink.hover,
- .icheckbox_line-pink.checked.hover,
- .iradio_line-pink.hover {
- background: #B995A9;
- }
- .icheckbox_line-pink.checked,
- .iradio_line-pink.checked {
- background: #a77a94;
- }
- .icheckbox_line-pink.checked .icheck_line-icon,
- .iradio_line-pink.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-pink.disabled,
- .iradio_line-pink.disabled {
- background: #E0D0DA;
- cursor: default;
- }
- .icheckbox_line-pink.disabled .icheck_line-icon,
- .iradio_line-pink.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-pink.checked.disabled,
- .iradio_line-pink.checked.disabled {
- background: #E0D0DA;
- }
- .icheckbox_line-pink.checked.disabled .icheck_line-icon,
- .iradio_line-pink.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-pink .icheck_line-icon,
- .iradio_line-pink .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
-
-/* purple */
-.icheckbox_line-purple,
-.iradio_line-purple {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #6a5a8c;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-purple .icheck_line-icon,
- .iradio_line-purple .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-purple.hover,
- .icheckbox_line-purple.checked.hover,
- .iradio_line-purple.hover {
- background: #8677A7;
- }
- .icheckbox_line-purple.checked,
- .iradio_line-purple.checked {
- background: #6a5a8c;
- }
- .icheckbox_line-purple.checked .icheck_line-icon,
- .iradio_line-purple.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-purple.disabled,
- .iradio_line-purple.disabled {
- background: #D2CCDE;
- cursor: default;
- }
- .icheckbox_line-purple.disabled .icheck_line-icon,
- .iradio_line-purple.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-purple.checked.disabled,
- .iradio_line-purple.checked.disabled {
- background: #D2CCDE;
- }
- .icheckbox_line-purple.checked.disabled .icheck_line-icon,
- .iradio_line-purple.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-purple .icheck_line-icon,
- .iradio_line-purple .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/aero.css b/html/plugins/iCheck/line/aero.css
deleted file mode 100644
index 44989a46..00000000
--- a/html/plugins/iCheck/line/aero.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, aero
------------------------------------ */
-.icheckbox_line-aero,
-.iradio_line-aero {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #9cc2cb;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-aero .icheck_line-icon,
- .iradio_line-aero .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-aero.hover,
- .icheckbox_line-aero.checked.hover,
- .iradio_line-aero.hover {
- background: #B5D1D8;
- }
- .icheckbox_line-aero.checked,
- .iradio_line-aero.checked {
- background: #9cc2cb;
- }
- .icheckbox_line-aero.checked .icheck_line-icon,
- .iradio_line-aero.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-aero.disabled,
- .iradio_line-aero.disabled {
- background: #D2E4E8;
- cursor: default;
- }
- .icheckbox_line-aero.disabled .icheck_line-icon,
- .iradio_line-aero.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-aero.checked.disabled,
- .iradio_line-aero.checked.disabled {
- background: #D2E4E8;
- }
- .icheckbox_line-aero.checked.disabled .icheck_line-icon,
- .iradio_line-aero.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-aero .icheck_line-icon,
- .iradio_line-aero .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/blue.css b/html/plugins/iCheck/line/blue.css
deleted file mode 100644
index 5c9c0a78..00000000
--- a/html/plugins/iCheck/line/blue.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, blue
------------------------------------ */
-.icheckbox_line-blue,
-.iradio_line-blue {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #2489c5;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-blue .icheck_line-icon,
- .iradio_line-blue .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-blue.hover,
- .icheckbox_line-blue.checked.hover,
- .iradio_line-blue.hover {
- background: #3DA0DB;
- }
- .icheckbox_line-blue.checked,
- .iradio_line-blue.checked {
- background: #2489c5;
- }
- .icheckbox_line-blue.checked .icheck_line-icon,
- .iradio_line-blue.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-blue.disabled,
- .iradio_line-blue.disabled {
- background: #ADD7F0;
- cursor: default;
- }
- .icheckbox_line-blue.disabled .icheck_line-icon,
- .iradio_line-blue.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-blue.checked.disabled,
- .iradio_line-blue.checked.disabled {
- background: #ADD7F0;
- }
- .icheckbox_line-blue.checked.disabled .icheck_line-icon,
- .iradio_line-blue.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-blue .icheck_line-icon,
- .iradio_line-blue .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/green.css b/html/plugins/iCheck/line/green.css
deleted file mode 100644
index 8bbe5140..00000000
--- a/html/plugins/iCheck/line/green.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, green
------------------------------------ */
-.icheckbox_line-green,
-.iradio_line-green {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #1b7e5a;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-green .icheck_line-icon,
- .iradio_line-green .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-green.hover,
- .icheckbox_line-green.checked.hover,
- .iradio_line-green.hover {
- background: #24AA7A;
- }
- .icheckbox_line-green.checked,
- .iradio_line-green.checked {
- background: #1b7e5a;
- }
- .icheckbox_line-green.checked .icheck_line-icon,
- .iradio_line-green.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-green.disabled,
- .iradio_line-green.disabled {
- background: #89E6C4;
- cursor: default;
- }
- .icheckbox_line-green.disabled .icheck_line-icon,
- .iradio_line-green.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-green.checked.disabled,
- .iradio_line-green.checked.disabled {
- background: #89E6C4;
- }
- .icheckbox_line-green.checked.disabled .icheck_line-icon,
- .iradio_line-green.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-green .icheck_line-icon,
- .iradio_line-green .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/grey.css b/html/plugins/iCheck/line/grey.css
deleted file mode 100644
index fc16a80e..00000000
--- a/html/plugins/iCheck/line/grey.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, grey
------------------------------------ */
-.icheckbox_line-grey,
-.iradio_line-grey {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #73716e;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-grey .icheck_line-icon,
- .iradio_line-grey .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-grey.hover,
- .icheckbox_line-grey.checked.hover,
- .iradio_line-grey.hover {
- background: #8B8986;
- }
- .icheckbox_line-grey.checked,
- .iradio_line-grey.checked {
- background: #73716e;
- }
- .icheckbox_line-grey.checked .icheck_line-icon,
- .iradio_line-grey.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-grey.disabled,
- .iradio_line-grey.disabled {
- background: #D5D4D3;
- cursor: default;
- }
- .icheckbox_line-grey.disabled .icheck_line-icon,
- .iradio_line-grey.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-grey.checked.disabled,
- .iradio_line-grey.checked.disabled {
- background: #D5D4D3;
- }
- .icheckbox_line-grey.checked.disabled .icheck_line-icon,
- .iradio_line-grey.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-grey .icheck_line-icon,
- .iradio_line-grey .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/line.css b/html/plugins/iCheck/line/line.css
deleted file mode 100644
index dbde8d4d..00000000
--- a/html/plugins/iCheck/line/line.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, black
------------------------------------ */
-.icheckbox_line,
-.iradio_line {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #000;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line .icheck_line-icon,
- .iradio_line .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line.hover,
- .icheckbox_line.checked.hover,
- .iradio_line.hover {
- background: #444;
- }
- .icheckbox_line.checked,
- .iradio_line.checked {
- background: #000;
- }
- .icheckbox_line.checked .icheck_line-icon,
- .iradio_line.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line.disabled,
- .iradio_line.disabled {
- background: #ccc;
- cursor: default;
- }
- .icheckbox_line.disabled .icheck_line-icon,
- .iradio_line.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line.checked.disabled,
- .iradio_line.checked.disabled {
- background: #ccc;
- }
- .icheckbox_line.checked.disabled .icheck_line-icon,
- .iradio_line.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line .icheck_line-icon,
- .iradio_line .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/line.png b/html/plugins/iCheck/line/line.png
deleted file mode 100644
index d21d7a7b..00000000
Binary files a/html/plugins/iCheck/line/line.png and /dev/null differ
diff --git a/html/plugins/iCheck/line/line@2x.png b/html/plugins/iCheck/line/line@2x.png
deleted file mode 100644
index 62900a2d..00000000
Binary files a/html/plugins/iCheck/line/line@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/line/orange.css b/html/plugins/iCheck/line/orange.css
deleted file mode 100644
index 210f3340..00000000
--- a/html/plugins/iCheck/line/orange.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, orange
------------------------------------ */
-.icheckbox_line-orange,
-.iradio_line-orange {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #f70;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-orange .icheck_line-icon,
- .iradio_line-orange .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-orange.hover,
- .icheckbox_line-orange.checked.hover,
- .iradio_line-orange.hover {
- background: #FF9233;
- }
- .icheckbox_line-orange.checked,
- .iradio_line-orange.checked {
- background: #f70;
- }
- .icheckbox_line-orange.checked .icheck_line-icon,
- .iradio_line-orange.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-orange.disabled,
- .iradio_line-orange.disabled {
- background: #FFD6B3;
- cursor: default;
- }
- .icheckbox_line-orange.disabled .icheck_line-icon,
- .iradio_line-orange.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-orange.checked.disabled,
- .iradio_line-orange.checked.disabled {
- background: #FFD6B3;
- }
- .icheckbox_line-orange.checked.disabled .icheck_line-icon,
- .iradio_line-orange.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-orange .icheck_line-icon,
- .iradio_line-orange .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/pink.css b/html/plugins/iCheck/line/pink.css
deleted file mode 100644
index 44c9cea1..00000000
--- a/html/plugins/iCheck/line/pink.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, pink
------------------------------------ */
-.icheckbox_line-pink,
-.iradio_line-pink {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #a77a94;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-pink .icheck_line-icon,
- .iradio_line-pink .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-pink.hover,
- .icheckbox_line-pink.checked.hover,
- .iradio_line-pink.hover {
- background: #B995A9;
- }
- .icheckbox_line-pink.checked,
- .iradio_line-pink.checked {
- background: #a77a94;
- }
- .icheckbox_line-pink.checked .icheck_line-icon,
- .iradio_line-pink.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-pink.disabled,
- .iradio_line-pink.disabled {
- background: #E0D0DA;
- cursor: default;
- }
- .icheckbox_line-pink.disabled .icheck_line-icon,
- .iradio_line-pink.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-pink.checked.disabled,
- .iradio_line-pink.checked.disabled {
- background: #E0D0DA;
- }
- .icheckbox_line-pink.checked.disabled .icheck_line-icon,
- .iradio_line-pink.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-pink .icheck_line-icon,
- .iradio_line-pink .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/purple.css b/html/plugins/iCheck/line/purple.css
deleted file mode 100644
index be4c4e2b..00000000
--- a/html/plugins/iCheck/line/purple.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, purple
------------------------------------ */
-.icheckbox_line-purple,
-.iradio_line-purple {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #6a5a8c;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-purple .icheck_line-icon,
- .iradio_line-purple .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-purple.hover,
- .icheckbox_line-purple.checked.hover,
- .iradio_line-purple.hover {
- background: #8677A7;
- }
- .icheckbox_line-purple.checked,
- .iradio_line-purple.checked {
- background: #6a5a8c;
- }
- .icheckbox_line-purple.checked .icheck_line-icon,
- .iradio_line-purple.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-purple.disabled,
- .iradio_line-purple.disabled {
- background: #D2CCDE;
- cursor: default;
- }
- .icheckbox_line-purple.disabled .icheck_line-icon,
- .iradio_line-purple.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-purple.checked.disabled,
- .iradio_line-purple.checked.disabled {
- background: #D2CCDE;
- }
- .icheckbox_line-purple.checked.disabled .icheck_line-icon,
- .iradio_line-purple.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-purple .icheck_line-icon,
- .iradio_line-purple .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/red.css b/html/plugins/iCheck/line/red.css
deleted file mode 100644
index ebcd8bef..00000000
--- a/html/plugins/iCheck/line/red.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, red
------------------------------------ */
-.icheckbox_line-red,
-.iradio_line-red {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #e56c69;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-red .icheck_line-icon,
- .iradio_line-red .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-red.hover,
- .icheckbox_line-red.checked.hover,
- .iradio_line-red.hover {
- background: #E98582;
- }
- .icheckbox_line-red.checked,
- .iradio_line-red.checked {
- background: #e56c69;
- }
- .icheckbox_line-red.checked .icheck_line-icon,
- .iradio_line-red.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-red.disabled,
- .iradio_line-red.disabled {
- background: #F7D3D2;
- cursor: default;
- }
- .icheckbox_line-red.disabled .icheck_line-icon,
- .iradio_line-red.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-red.checked.disabled,
- .iradio_line-red.checked.disabled {
- background: #F7D3D2;
- }
- .icheckbox_line-red.checked.disabled .icheck_line-icon,
- .iradio_line-red.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-red .icheck_line-icon,
- .iradio_line-red .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/line/yellow.css b/html/plugins/iCheck/line/yellow.css
deleted file mode 100644
index 8e088714..00000000
--- a/html/plugins/iCheck/line/yellow.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* iCheck plugin Line skin, yellow
------------------------------------ */
-.icheckbox_line-yellow,
-.iradio_line-yellow {
- position: relative;
- display: block;
- margin: 0;
- padding: 5px 15px 5px 38px;
- font-size: 13px;
- line-height: 17px;
- color: #fff;
- background: #FFC414;
- border: none;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
-}
- .icheckbox_line-yellow .icheck_line-icon,
- .iradio_line-yellow .icheck_line-icon {
- position: absolute;
- top: 50%;
- left: 13px;
- width: 13px;
- height: 11px;
- margin: -5px 0 0 0;
- padding: 0;
- overflow: hidden;
- background: url(line.png) no-repeat;
- border: none;
- }
- .icheckbox_line-yellow.hover,
- .icheckbox_line-yellow.checked.hover,
- .iradio_line-yellow.hover {
- background: #FFD34F;
- }
- .icheckbox_line-yellow.checked,
- .iradio_line-yellow.checked {
- background: #FFC414;
- }
- .icheckbox_line-yellow.checked .icheck_line-icon,
- .iradio_line-yellow.checked .icheck_line-icon {
- background-position: -15px 0;
- }
- .icheckbox_line-yellow.disabled,
- .iradio_line-yellow.disabled {
- background: #FFE495;
- cursor: default;
- }
- .icheckbox_line-yellow.disabled .icheck_line-icon,
- .iradio_line-yellow.disabled .icheck_line-icon {
- background-position: -30px 0;
- }
- .icheckbox_line-yellow.checked.disabled,
- .iradio_line-yellow.checked.disabled {
- background: #FFE495;
- }
- .icheckbox_line-yellow.checked.disabled .icheck_line-icon,
- .iradio_line-yellow.checked.disabled .icheck_line-icon {
- background-position: -45px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_line-yellow .icheck_line-icon,
- .iradio_line-yellow .icheck_line-icon {
- background-image: url(line@2x.png);
- -webkit-background-size: 60px 13px;
- background-size: 60px 13px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/_all.css b/html/plugins/iCheck/minimal/_all.css
deleted file mode 100644
index b2165ecc..00000000
--- a/html/plugins/iCheck/minimal/_all.css
+++ /dev/null
@@ -1,557 +0,0 @@
-/* red */
-.icheckbox_minimal-red,
-.iradio_minimal-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-red {
- background-position: 0 0;
-}
- .icheckbox_minimal-red.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-red.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-red.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-red.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-red {
- background-position: -100px 0;
-}
- .iradio_minimal-red.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-red.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-red.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-red.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-red,
- .iradio_minimal-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* green */
-.icheckbox_minimal-green,
-.iradio_minimal-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-green {
- background-position: 0 0;
-}
- .icheckbox_minimal-green.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-green.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-green.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-green.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-green {
- background-position: -100px 0;
-}
- .iradio_minimal-green.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-green.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-green.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-green.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-green,
- .iradio_minimal-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* blue */
-.icheckbox_minimal-blue,
-.iradio_minimal-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-blue {
- background-position: 0 0;
-}
- .icheckbox_minimal-blue.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-blue.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-blue.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-blue.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-blue {
- background-position: -100px 0;
-}
- .iradio_minimal-blue.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-blue.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-blue.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-blue.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-blue,
- .iradio_minimal-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* aero */
-.icheckbox_minimal-aero,
-.iradio_minimal-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-aero {
- background-position: 0 0;
-}
- .icheckbox_minimal-aero.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-aero.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-aero.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-aero.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-aero {
- background-position: -100px 0;
-}
- .iradio_minimal-aero.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-aero.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-aero.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-aero.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-aero,
- .iradio_minimal-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* grey */
-.icheckbox_minimal-grey,
-.iradio_minimal-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-grey {
- background-position: 0 0;
-}
- .icheckbox_minimal-grey.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-grey.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-grey.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-grey.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-grey {
- background-position: -100px 0;
-}
- .iradio_minimal-grey.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-grey.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-grey.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-grey.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-grey,
- .iradio_minimal-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* orange */
-.icheckbox_minimal-orange,
-.iradio_minimal-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-orange {
- background-position: 0 0;
-}
- .icheckbox_minimal-orange.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-orange.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-orange.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-orange.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-orange {
- background-position: -100px 0;
-}
- .iradio_minimal-orange.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-orange.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-orange.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-orange.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-orange,
- .iradio_minimal-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* yellow */
-.icheckbox_minimal-yellow,
-.iradio_minimal-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-yellow {
- background-position: 0 0;
-}
- .icheckbox_minimal-yellow.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-yellow.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-yellow.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-yellow.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-yellow {
- background-position: -100px 0;
-}
- .iradio_minimal-yellow.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-yellow.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-yellow.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-yellow.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-yellow,
- .iradio_minimal-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* pink */
-.icheckbox_minimal-pink,
-.iradio_minimal-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-pink {
- background-position: 0 0;
-}
- .icheckbox_minimal-pink.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-pink.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-pink.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-pink.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-pink {
- background-position: -100px 0;
-}
- .iradio_minimal-pink.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-pink.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-pink.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-pink.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-pink,
- .iradio_minimal-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
-
-/* purple */
-.icheckbox_minimal-purple,
-.iradio_minimal-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-purple {
- background-position: 0 0;
-}
- .icheckbox_minimal-purple.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-purple.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-purple.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-purple.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-purple {
- background-position: -100px 0;
-}
- .iradio_minimal-purple.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-purple.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-purple.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-purple.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-purple,
- .iradio_minimal-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/aero.css b/html/plugins/iCheck/minimal/aero.css
deleted file mode 100644
index c97acc8c..00000000
--- a/html/plugins/iCheck/minimal/aero.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, aero
------------------------------------ */
-.icheckbox_minimal-aero,
-.iradio_minimal-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-aero {
- background-position: 0 0;
-}
- .icheckbox_minimal-aero.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-aero.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-aero.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-aero.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-aero {
- background-position: -100px 0;
-}
- .iradio_minimal-aero.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-aero.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-aero.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-aero.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-aero,
- .iradio_minimal-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/aero.png b/html/plugins/iCheck/minimal/aero.png
deleted file mode 100644
index dccf7740..00000000
Binary files a/html/plugins/iCheck/minimal/aero.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/aero@2x.png b/html/plugins/iCheck/minimal/aero@2x.png
deleted file mode 100644
index 5537ee36..00000000
Binary files a/html/plugins/iCheck/minimal/aero@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/blue.css b/html/plugins/iCheck/minimal/blue.css
deleted file mode 100644
index 42477cd6..00000000
--- a/html/plugins/iCheck/minimal/blue.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, blue
------------------------------------ */
-.icheckbox_minimal-blue,
-.iradio_minimal-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-blue {
- background-position: 0 0;
-}
- .icheckbox_minimal-blue.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-blue.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-blue.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-blue.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-blue {
- background-position: -100px 0;
-}
- .iradio_minimal-blue.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-blue.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-blue.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-blue.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-blue,
- .iradio_minimal-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/blue.png b/html/plugins/iCheck/minimal/blue.png
deleted file mode 100644
index af04cee5..00000000
Binary files a/html/plugins/iCheck/minimal/blue.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/blue@2x.png b/html/plugins/iCheck/minimal/blue@2x.png
deleted file mode 100644
index f19210a9..00000000
Binary files a/html/plugins/iCheck/minimal/blue@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/green.css b/html/plugins/iCheck/minimal/green.css
deleted file mode 100644
index bd1e3d0f..00000000
--- a/html/plugins/iCheck/minimal/green.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, green
------------------------------------ */
-.icheckbox_minimal-green,
-.iradio_minimal-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-green {
- background-position: 0 0;
-}
- .icheckbox_minimal-green.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-green.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-green.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-green.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-green {
- background-position: -100px 0;
-}
- .iradio_minimal-green.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-green.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-green.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-green.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-green,
- .iradio_minimal-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/green.png b/html/plugins/iCheck/minimal/green.png
deleted file mode 100644
index 9171ebc7..00000000
Binary files a/html/plugins/iCheck/minimal/green.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/green@2x.png b/html/plugins/iCheck/minimal/green@2x.png
deleted file mode 100644
index 7f18f96a..00000000
Binary files a/html/plugins/iCheck/minimal/green@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/grey.css b/html/plugins/iCheck/minimal/grey.css
deleted file mode 100644
index 6e2730c6..00000000
--- a/html/plugins/iCheck/minimal/grey.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, grey
------------------------------------ */
-.icheckbox_minimal-grey,
-.iradio_minimal-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-grey {
- background-position: 0 0;
-}
- .icheckbox_minimal-grey.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-grey.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-grey.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-grey.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-grey {
- background-position: -100px 0;
-}
- .iradio_minimal-grey.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-grey.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-grey.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-grey.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-grey,
- .iradio_minimal-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/grey.png b/html/plugins/iCheck/minimal/grey.png
deleted file mode 100644
index 22dcdbcf..00000000
Binary files a/html/plugins/iCheck/minimal/grey.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/grey@2x.png b/html/plugins/iCheck/minimal/grey@2x.png
deleted file mode 100644
index 85e82ddd..00000000
Binary files a/html/plugins/iCheck/minimal/grey@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/minimal.css b/html/plugins/iCheck/minimal/minimal.css
deleted file mode 100644
index 7c0e52e1..00000000
--- a/html/plugins/iCheck/minimal/minimal.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, black
------------------------------------ */
-.icheckbox_minimal,
-.iradio_minimal {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(minimal.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal {
- background-position: 0 0;
-}
- .icheckbox_minimal.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal {
- background-position: -100px 0;
-}
- .iradio_minimal.hover {
- background-position: -120px 0;
- }
- .iradio_minimal.checked {
- background-position: -140px 0;
- }
- .iradio_minimal.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal,
- .iradio_minimal {
- background-image: url(minimal@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/minimal.png b/html/plugins/iCheck/minimal/minimal.png
deleted file mode 100644
index 943be16f..00000000
Binary files a/html/plugins/iCheck/minimal/minimal.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/minimal@2x.png b/html/plugins/iCheck/minimal/minimal@2x.png
deleted file mode 100644
index d62291da..00000000
Binary files a/html/plugins/iCheck/minimal/minimal@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/orange.css b/html/plugins/iCheck/minimal/orange.css
deleted file mode 100644
index 842e400a..00000000
--- a/html/plugins/iCheck/minimal/orange.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, orange
------------------------------------ */
-.icheckbox_minimal-orange,
-.iradio_minimal-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-orange {
- background-position: 0 0;
-}
- .icheckbox_minimal-orange.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-orange.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-orange.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-orange.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-orange {
- background-position: -100px 0;
-}
- .iradio_minimal-orange.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-orange.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-orange.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-orange.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-orange,
- .iradio_minimal-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/orange.png b/html/plugins/iCheck/minimal/orange.png
deleted file mode 100644
index f2a31497..00000000
Binary files a/html/plugins/iCheck/minimal/orange.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/orange@2x.png b/html/plugins/iCheck/minimal/orange@2x.png
deleted file mode 100644
index 68c83591..00000000
Binary files a/html/plugins/iCheck/minimal/orange@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/pink.css b/html/plugins/iCheck/minimal/pink.css
deleted file mode 100644
index 10ace218..00000000
--- a/html/plugins/iCheck/minimal/pink.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, pink
------------------------------------ */
-.icheckbox_minimal-pink,
-.iradio_minimal-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-pink {
- background-position: 0 0;
-}
- .icheckbox_minimal-pink.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-pink.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-pink.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-pink.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-pink {
- background-position: -100px 0;
-}
- .iradio_minimal-pink.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-pink.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-pink.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-pink.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-pink,
- .iradio_minimal-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/pink.png b/html/plugins/iCheck/minimal/pink.png
deleted file mode 100644
index 660553c0..00000000
Binary files a/html/plugins/iCheck/minimal/pink.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/pink@2x.png b/html/plugins/iCheck/minimal/pink@2x.png
deleted file mode 100644
index 7d7b3851..00000000
Binary files a/html/plugins/iCheck/minimal/pink@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/purple.css b/html/plugins/iCheck/minimal/purple.css
deleted file mode 100644
index 1c5dcbc7..00000000
--- a/html/plugins/iCheck/minimal/purple.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, purple
------------------------------------ */
-.icheckbox_minimal-purple,
-.iradio_minimal-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-purple {
- background-position: 0 0;
-}
- .icheckbox_minimal-purple.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-purple.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-purple.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-purple.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-purple {
- background-position: -100px 0;
-}
- .iradio_minimal-purple.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-purple.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-purple.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-purple.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-purple,
- .iradio_minimal-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/purple.png b/html/plugins/iCheck/minimal/purple.png
deleted file mode 100644
index 48dec794..00000000
Binary files a/html/plugins/iCheck/minimal/purple.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/purple@2x.png b/html/plugins/iCheck/minimal/purple@2x.png
deleted file mode 100644
index 3bb70417..00000000
Binary files a/html/plugins/iCheck/minimal/purple@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/red.css b/html/plugins/iCheck/minimal/red.css
deleted file mode 100644
index 9340c4f6..00000000
--- a/html/plugins/iCheck/minimal/red.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, red
------------------------------------ */
-.icheckbox_minimal-red,
-.iradio_minimal-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-red {
- background-position: 0 0;
-}
- .icheckbox_minimal-red.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-red.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-red.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-red.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-red {
- background-position: -100px 0;
-}
- .iradio_minimal-red.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-red.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-red.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-red.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-red,
- .iradio_minimal-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/red.png b/html/plugins/iCheck/minimal/red.png
deleted file mode 100644
index 4443f809..00000000
Binary files a/html/plugins/iCheck/minimal/red.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/red@2x.png b/html/plugins/iCheck/minimal/red@2x.png
deleted file mode 100644
index 2eb55a65..00000000
Binary files a/html/plugins/iCheck/minimal/red@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/yellow.css b/html/plugins/iCheck/minimal/yellow.css
deleted file mode 100644
index 2c384231..00000000
--- a/html/plugins/iCheck/minimal/yellow.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Minimal skin, yellow
------------------------------------ */
-.icheckbox_minimal-yellow,
-.iradio_minimal-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 18px;
- height: 18px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_minimal-yellow {
- background-position: 0 0;
-}
- .icheckbox_minimal-yellow.hover {
- background-position: -20px 0;
- }
- .icheckbox_minimal-yellow.checked {
- background-position: -40px 0;
- }
- .icheckbox_minimal-yellow.disabled {
- background-position: -60px 0;
- cursor: default;
- }
- .icheckbox_minimal-yellow.checked.disabled {
- background-position: -80px 0;
- }
-
-.iradio_minimal-yellow {
- background-position: -100px 0;
-}
- .iradio_minimal-yellow.hover {
- background-position: -120px 0;
- }
- .iradio_minimal-yellow.checked {
- background-position: -140px 0;
- }
- .iradio_minimal-yellow.disabled {
- background-position: -160px 0;
- cursor: default;
- }
- .iradio_minimal-yellow.checked.disabled {
- background-position: -180px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_minimal-yellow,
- .iradio_minimal-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 200px 20px;
- background-size: 200px 20px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/minimal/yellow.png b/html/plugins/iCheck/minimal/yellow.png
deleted file mode 100644
index 0999b7ec..00000000
Binary files a/html/plugins/iCheck/minimal/yellow.png and /dev/null differ
diff --git a/html/plugins/iCheck/minimal/yellow@2x.png b/html/plugins/iCheck/minimal/yellow@2x.png
deleted file mode 100644
index c16f2b7d..00000000
Binary files a/html/plugins/iCheck/minimal/yellow@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/polaris/polaris.css b/html/plugins/iCheck/polaris/polaris.css
deleted file mode 100644
index 1cb4bcc0..00000000
--- a/html/plugins/iCheck/polaris/polaris.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Polaris skin
------------------------------------ */
-.icheckbox_polaris,
-.iradio_polaris {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 29px;
- height: 29px;
- background: url(polaris.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_polaris {
- background-position: 0 0;
-}
- .icheckbox_polaris.hover {
- background-position: -31px 0;
- }
- .icheckbox_polaris.checked {
- background-position: -62px 0;
- }
- .icheckbox_polaris.disabled {
- background-position: -93px 0;
- cursor: default;
- }
- .icheckbox_polaris.checked.disabled {
- background-position: -124px 0;
- }
-
-.iradio_polaris {
- background-position: -155px 0;
-}
- .iradio_polaris.hover {
- background-position: -186px 0;
- }
- .iradio_polaris.checked {
- background-position: -217px 0;
- }
- .iradio_polaris.disabled {
- background-position: -248px 0;
- cursor: default;
- }
- .iradio_polaris.checked.disabled {
- background-position: -279px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_polaris,
- .iradio_polaris {
- background-image: url(polaris@2x.png);
- -webkit-background-size: 310px 31px;
- background-size: 310px 31px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/polaris/polaris.png b/html/plugins/iCheck/polaris/polaris.png
deleted file mode 100644
index 60c14e6a..00000000
Binary files a/html/plugins/iCheck/polaris/polaris.png and /dev/null differ
diff --git a/html/plugins/iCheck/polaris/polaris@2x.png b/html/plugins/iCheck/polaris/polaris@2x.png
deleted file mode 100644
index c75b8269..00000000
Binary files a/html/plugins/iCheck/polaris/polaris@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/_all.css b/html/plugins/iCheck/square/_all.css
deleted file mode 100644
index a2ff0368..00000000
--- a/html/plugins/iCheck/square/_all.css
+++ /dev/null
@@ -1,620 +0,0 @@
-/* iCheck plugin Square skin
------------------------------------ */
-.icheckbox_square,
-.iradio_square {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(square.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square {
- background-position: 0 0;
-}
- .icheckbox_square.hover {
- background-position: -24px 0;
- }
- .icheckbox_square.checked {
- background-position: -48px 0;
- }
- .icheckbox_square.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square {
- background-position: -120px 0;
-}
- .iradio_square.hover {
- background-position: -144px 0;
- }
- .iradio_square.checked {
- background-position: -168px 0;
- }
- .iradio_square.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square,
- .iradio_square {
- background-image: url(square@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* red */
-.icheckbox_square-red,
-.iradio_square-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-red {
- background-position: 0 0;
-}
- .icheckbox_square-red.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-red.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-red.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-red.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-red {
- background-position: -120px 0;
-}
- .iradio_square-red.hover {
- background-position: -144px 0;
- }
- .iradio_square-red.checked {
- background-position: -168px 0;
- }
- .iradio_square-red.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-red.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-red,
- .iradio_square-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* green */
-.icheckbox_square-green,
-.iradio_square-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-green {
- background-position: 0 0;
-}
- .icheckbox_square-green.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-green.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-green.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-green.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-green {
- background-position: -120px 0;
-}
- .iradio_square-green.hover {
- background-position: -144px 0;
- }
- .iradio_square-green.checked {
- background-position: -168px 0;
- }
- .iradio_square-green.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-green.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-green,
- .iradio_square-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* blue */
-.icheckbox_square-blue,
-.iradio_square-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-blue {
- background-position: 0 0;
-}
- .icheckbox_square-blue.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-blue.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-blue.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-blue.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-blue {
- background-position: -120px 0;
-}
- .iradio_square-blue.hover {
- background-position: -144px 0;
- }
- .iradio_square-blue.checked {
- background-position: -168px 0;
- }
- .iradio_square-blue.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-blue.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-blue,
- .iradio_square-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* aero */
-.icheckbox_square-aero,
-.iradio_square-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-aero {
- background-position: 0 0;
-}
- .icheckbox_square-aero.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-aero.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-aero.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-aero.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-aero {
- background-position: -120px 0;
-}
- .iradio_square-aero.hover {
- background-position: -144px 0;
- }
- .iradio_square-aero.checked {
- background-position: -168px 0;
- }
- .iradio_square-aero.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-aero.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-aero,
- .iradio_square-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* grey */
-.icheckbox_square-grey,
-.iradio_square-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-grey {
- background-position: 0 0;
-}
- .icheckbox_square-grey.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-grey.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-grey.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-grey.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-grey {
- background-position: -120px 0;
-}
- .iradio_square-grey.hover {
- background-position: -144px 0;
- }
- .iradio_square-grey.checked {
- background-position: -168px 0;
- }
- .iradio_square-grey.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-grey.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-grey,
- .iradio_square-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* orange */
-.icheckbox_square-orange,
-.iradio_square-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-orange {
- background-position: 0 0;
-}
- .icheckbox_square-orange.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-orange.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-orange.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-orange.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-orange {
- background-position: -120px 0;
-}
- .iradio_square-orange.hover {
- background-position: -144px 0;
- }
- .iradio_square-orange.checked {
- background-position: -168px 0;
- }
- .iradio_square-orange.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-orange.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-orange,
- .iradio_square-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* yellow */
-.icheckbox_square-yellow,
-.iradio_square-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-yellow {
- background-position: 0 0;
-}
- .icheckbox_square-yellow.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-yellow.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-yellow.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-yellow.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-yellow {
- background-position: -120px 0;
-}
- .iradio_square-yellow.hover {
- background-position: -144px 0;
- }
- .iradio_square-yellow.checked {
- background-position: -168px 0;
- }
- .iradio_square-yellow.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-yellow.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-yellow,
- .iradio_square-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* pink */
-.icheckbox_square-pink,
-.iradio_square-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-pink {
- background-position: 0 0;
-}
- .icheckbox_square-pink.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-pink.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-pink.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-pink.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-pink {
- background-position: -120px 0;
-}
- .iradio_square-pink.hover {
- background-position: -144px 0;
- }
- .iradio_square-pink.checked {
- background-position: -168px 0;
- }
- .iradio_square-pink.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-pink.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-pink,
- .iradio_square-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
-
-/* purple */
-.icheckbox_square-purple,
-.iradio_square-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-purple {
- background-position: 0 0;
-}
- .icheckbox_square-purple.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-purple.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-purple.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-purple.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-purple {
- background-position: -120px 0;
-}
- .iradio_square-purple.hover {
- background-position: -144px 0;
- }
- .iradio_square-purple.checked {
- background-position: -168px 0;
- }
- .iradio_square-purple.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-purple.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-purple,
- .iradio_square-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/aero.css b/html/plugins/iCheck/square/aero.css
deleted file mode 100644
index 51fca0a8..00000000
--- a/html/plugins/iCheck/square/aero.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, aero
------------------------------------ */
-.icheckbox_square-aero,
-.iradio_square-aero {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(aero.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-aero {
- background-position: 0 0;
-}
- .icheckbox_square-aero.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-aero.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-aero.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-aero.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-aero {
- background-position: -120px 0;
-}
- .iradio_square-aero.hover {
- background-position: -144px 0;
- }
- .iradio_square-aero.checked {
- background-position: -168px 0;
- }
- .iradio_square-aero.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-aero.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-aero,
- .iradio_square-aero {
- background-image: url(aero@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/aero.png b/html/plugins/iCheck/square/aero.png
deleted file mode 100644
index 1a332e6c..00000000
Binary files a/html/plugins/iCheck/square/aero.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/aero@2x.png b/html/plugins/iCheck/square/aero@2x.png
deleted file mode 100644
index 07c5a022..00000000
Binary files a/html/plugins/iCheck/square/aero@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/blue.css b/html/plugins/iCheck/square/blue.css
deleted file mode 100644
index 95340fea..00000000
--- a/html/plugins/iCheck/square/blue.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, blue
------------------------------------ */
-.icheckbox_square-blue,
-.iradio_square-blue {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(blue.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-blue {
- background-position: 0 0;
-}
- .icheckbox_square-blue.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-blue.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-blue.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-blue.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-blue {
- background-position: -120px 0;
-}
- .iradio_square-blue.hover {
- background-position: -144px 0;
- }
- .iradio_square-blue.checked {
- background-position: -168px 0;
- }
- .iradio_square-blue.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-blue.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-blue,
- .iradio_square-blue {
- background-image: url(blue@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/blue.png b/html/plugins/iCheck/square/blue.png
deleted file mode 100644
index a3e040fc..00000000
Binary files a/html/plugins/iCheck/square/blue.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/blue@2x.png b/html/plugins/iCheck/square/blue@2x.png
deleted file mode 100644
index 8fdea12f..00000000
Binary files a/html/plugins/iCheck/square/blue@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/green.css b/html/plugins/iCheck/square/green.css
deleted file mode 100644
index eb43f2a4..00000000
--- a/html/plugins/iCheck/square/green.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, green
------------------------------------ */
-.icheckbox_square-green,
-.iradio_square-green {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(green.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-green {
- background-position: 0 0;
-}
- .icheckbox_square-green.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-green.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-green.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-green.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-green {
- background-position: -120px 0;
-}
- .iradio_square-green.hover {
- background-position: -144px 0;
- }
- .iradio_square-green.checked {
- background-position: -168px 0;
- }
- .iradio_square-green.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-green.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-green,
- .iradio_square-green {
- background-image: url(green@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/green.png b/html/plugins/iCheck/square/green.png
deleted file mode 100644
index 465824e7..00000000
Binary files a/html/plugins/iCheck/square/green.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/green@2x.png b/html/plugins/iCheck/square/green@2x.png
deleted file mode 100644
index 784e8747..00000000
Binary files a/html/plugins/iCheck/square/green@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/grey.css b/html/plugins/iCheck/square/grey.css
deleted file mode 100644
index ecc57ff4..00000000
--- a/html/plugins/iCheck/square/grey.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, grey
------------------------------------ */
-.icheckbox_square-grey,
-.iradio_square-grey {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(grey.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-grey {
- background-position: 0 0;
-}
- .icheckbox_square-grey.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-grey.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-grey.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-grey.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-grey {
- background-position: -120px 0;
-}
- .iradio_square-grey.hover {
- background-position: -144px 0;
- }
- .iradio_square-grey.checked {
- background-position: -168px 0;
- }
- .iradio_square-grey.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-grey.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-grey,
- .iradio_square-grey {
- background-image: url(grey@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/grey.png b/html/plugins/iCheck/square/grey.png
deleted file mode 100644
index f6937585..00000000
Binary files a/html/plugins/iCheck/square/grey.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/grey@2x.png b/html/plugins/iCheck/square/grey@2x.png
deleted file mode 100644
index 5d6341c0..00000000
Binary files a/html/plugins/iCheck/square/grey@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/orange.css b/html/plugins/iCheck/square/orange.css
deleted file mode 100644
index d0c7a2cf..00000000
--- a/html/plugins/iCheck/square/orange.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, orange
------------------------------------ */
-.icheckbox_square-orange,
-.iradio_square-orange {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(orange.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-orange {
- background-position: 0 0;
-}
- .icheckbox_square-orange.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-orange.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-orange.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-orange.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-orange {
- background-position: -120px 0;
-}
- .iradio_square-orange.hover {
- background-position: -144px 0;
- }
- .iradio_square-orange.checked {
- background-position: -168px 0;
- }
- .iradio_square-orange.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-orange.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-orange,
- .iradio_square-orange {
- background-image: url(orange@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/orange.png b/html/plugins/iCheck/square/orange.png
deleted file mode 100644
index 84608500..00000000
Binary files a/html/plugins/iCheck/square/orange.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/orange@2x.png b/html/plugins/iCheck/square/orange@2x.png
deleted file mode 100644
index b1f23197..00000000
Binary files a/html/plugins/iCheck/square/orange@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/pink.css b/html/plugins/iCheck/square/pink.css
deleted file mode 100644
index 6b706f6d..00000000
--- a/html/plugins/iCheck/square/pink.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, pink
------------------------------------ */
-.icheckbox_square-pink,
-.iradio_square-pink {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(pink.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-pink {
- background-position: 0 0;
-}
- .icheckbox_square-pink.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-pink.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-pink.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-pink.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-pink {
- background-position: -120px 0;
-}
- .iradio_square-pink.hover {
- background-position: -144px 0;
- }
- .iradio_square-pink.checked {
- background-position: -168px 0;
- }
- .iradio_square-pink.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-pink.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-pink,
- .iradio_square-pink {
- background-image: url(pink@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/pink.png b/html/plugins/iCheck/square/pink.png
deleted file mode 100644
index 9c8b4e2b..00000000
Binary files a/html/plugins/iCheck/square/pink.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/pink@2x.png b/html/plugins/iCheck/square/pink@2x.png
deleted file mode 100644
index b1f3a6ed..00000000
Binary files a/html/plugins/iCheck/square/pink@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/purple.css b/html/plugins/iCheck/square/purple.css
deleted file mode 100644
index 43051d3d..00000000
--- a/html/plugins/iCheck/square/purple.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, purple
------------------------------------ */
-.icheckbox_square-purple,
-.iradio_square-purple {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(purple.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-purple {
- background-position: 0 0;
-}
- .icheckbox_square-purple.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-purple.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-purple.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-purple.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-purple {
- background-position: -120px 0;
-}
- .iradio_square-purple.hover {
- background-position: -144px 0;
- }
- .iradio_square-purple.checked {
- background-position: -168px 0;
- }
- .iradio_square-purple.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-purple.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-purple,
- .iradio_square-purple {
- background-image: url(purple@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/purple.png b/html/plugins/iCheck/square/purple.png
deleted file mode 100644
index 6bfc16a3..00000000
Binary files a/html/plugins/iCheck/square/purple.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/purple@2x.png b/html/plugins/iCheck/square/purple@2x.png
deleted file mode 100644
index 6d3c8b1a..00000000
Binary files a/html/plugins/iCheck/square/purple@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/red.css b/html/plugins/iCheck/square/red.css
deleted file mode 100644
index 40013c42..00000000
--- a/html/plugins/iCheck/square/red.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, red
------------------------------------ */
-.icheckbox_square-red,
-.iradio_square-red {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(red.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-red {
- background-position: 0 0;
-}
- .icheckbox_square-red.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-red.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-red.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-red.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-red {
- background-position: -120px 0;
-}
- .iradio_square-red.hover {
- background-position: -144px 0;
- }
- .iradio_square-red.checked {
- background-position: -168px 0;
- }
- .iradio_square-red.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-red.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-red,
- .iradio_square-red {
- background-image: url(red@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/red.png b/html/plugins/iCheck/square/red.png
deleted file mode 100644
index 749675a9..00000000
Binary files a/html/plugins/iCheck/square/red.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/red@2x.png b/html/plugins/iCheck/square/red@2x.png
deleted file mode 100644
index c05700a5..00000000
Binary files a/html/plugins/iCheck/square/red@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/square.css b/html/plugins/iCheck/square/square.css
deleted file mode 100644
index b604fa84..00000000
--- a/html/plugins/iCheck/square/square.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, black
------------------------------------ */
-.icheckbox_square,
-.iradio_square {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(square.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square {
- background-position: 0 0;
-}
- .icheckbox_square.hover {
- background-position: -24px 0;
- }
- .icheckbox_square.checked {
- background-position: -48px 0;
- }
- .icheckbox_square.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square {
- background-position: -120px 0;
-}
- .iradio_square.hover {
- background-position: -144px 0;
- }
- .iradio_square.checked {
- background-position: -168px 0;
- }
- .iradio_square.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square,
- .iradio_square {
- background-image: url(square@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/square.png b/html/plugins/iCheck/square/square.png
deleted file mode 100644
index 2a3c8811..00000000
Binary files a/html/plugins/iCheck/square/square.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/square@2x.png b/html/plugins/iCheck/square/square@2x.png
deleted file mode 100644
index 9b56c448..00000000
Binary files a/html/plugins/iCheck/square/square@2x.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/yellow.css b/html/plugins/iCheck/square/yellow.css
deleted file mode 100644
index 55113499..00000000
--- a/html/plugins/iCheck/square/yellow.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* iCheck plugin Square skin, yellow
------------------------------------ */
-.icheckbox_square-yellow,
-.iradio_square-yellow {
- display: inline-block;
- *display: inline;
- vertical-align: middle;
- margin: 0;
- padding: 0;
- width: 22px;
- height: 22px;
- background: url(yellow.png) no-repeat;
- border: none;
- cursor: pointer;
-}
-
-.icheckbox_square-yellow {
- background-position: 0 0;
-}
- .icheckbox_square-yellow.hover {
- background-position: -24px 0;
- }
- .icheckbox_square-yellow.checked {
- background-position: -48px 0;
- }
- .icheckbox_square-yellow.disabled {
- background-position: -72px 0;
- cursor: default;
- }
- .icheckbox_square-yellow.checked.disabled {
- background-position: -96px 0;
- }
-
-.iradio_square-yellow {
- background-position: -120px 0;
-}
- .iradio_square-yellow.hover {
- background-position: -144px 0;
- }
- .iradio_square-yellow.checked {
- background-position: -168px 0;
- }
- .iradio_square-yellow.disabled {
- background-position: -192px 0;
- cursor: default;
- }
- .iradio_square-yellow.checked.disabled {
- background-position: -216px 0;
- }
-
-/* Retina support */
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (-moz-min-device-pixel-ratio: 1.5),
- only screen and (-o-min-device-pixel-ratio: 3/2),
- only screen and (min-device-pixel-ratio: 1.5) {
- .icheckbox_square-yellow,
- .iradio_square-yellow {
- background-image: url(yellow@2x.png);
- -webkit-background-size: 240px 24px;
- background-size: 240px 24px;
- }
-}
\ No newline at end of file
diff --git a/html/plugins/iCheck/square/yellow.png b/html/plugins/iCheck/square/yellow.png
deleted file mode 100644
index b6c03309..00000000
Binary files a/html/plugins/iCheck/square/yellow.png and /dev/null differ
diff --git a/html/plugins/iCheck/square/yellow@2x.png b/html/plugins/iCheck/square/yellow@2x.png
deleted file mode 100644
index 6b8e328e..00000000
Binary files a/html/plugins/iCheck/square/yellow@2x.png and /dev/null differ
diff --git a/html/plugins/input-mask/jquery.inputmask.date.extensions.js b/html/plugins/input-mask/jquery.inputmask.date.extensions.js
deleted file mode 100644
index 18f76c81..00000000
--- a/html/plugins/input-mask/jquery.inputmask.date.extensions.js
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
-Input Mask plugin extensions
-http://github.com/RobinHerbots/jquery.inputmask
-Copyright (c) 2010 - 2014 Robin Herbots
-Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.0.0
-
-Optional extensions on the jquery.inputmask base
-*/
-(function ($) {
- //date & time aliases
- $.extend($.inputmask.defaults.definitions, {
- 'h': { //hours
- validator: "[01][0-9]|2[0-3]",
- cardinality: 2,
- prevalidator: [{ validator: "[0-2]", cardinality: 1 }]
- },
- 's': { //seconds || minutes
- validator: "[0-5][0-9]",
- cardinality: 2,
- prevalidator: [{ validator: "[0-5]", cardinality: 1 }]
- },
- 'd': { //basic day
- validator: "0[1-9]|[12][0-9]|3[01]",
- cardinality: 2,
- prevalidator: [{ validator: "[0-3]", cardinality: 1 }]
- },
- 'm': { //basic month
- validator: "0[1-9]|1[012]",
- cardinality: 2,
- prevalidator: [{ validator: "[01]", cardinality: 1 }]
- },
- 'y': { //basic year
- validator: "(19|20)\\d{2}",
- cardinality: 4,
- prevalidator: [
- { validator: "[12]", cardinality: 1 },
- { validator: "(19|20)", cardinality: 2 },
- { validator: "(19|20)\\d", cardinality: 3 }
- ]
- }
- });
- $.extend($.inputmask.defaults.aliases, {
- 'dd/mm/yyyy': {
- mask: "1/2/y",
- placeholder: "dd/mm/yyyy",
- regex: {
- val1pre: new RegExp("[0-3]"), //daypre
- val1: new RegExp("0[1-9]|[12][0-9]|3[01]"), //day
- val2pre: function (separator) { var escapedSeparator = $.inputmask.escapeRegex.call(this, separator); return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])"); }, //monthpre
- val2: function (separator) { var escapedSeparator = $.inputmask.escapeRegex.call(this, separator); return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))"); }//month
- },
- leapday: "29/02/",
- separator: '/',
- yearrange: { minyear: 1900, maxyear: 2099 },
- isInYearRange: function (chrs, minyear, maxyear) {
- var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length)));
- var enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));
- return (enteredyear != NaN ? minyear <= enteredyear && enteredyear <= maxyear : false) ||
- (enteredyear2 != NaN ? minyear <= enteredyear2 && enteredyear2 <= maxyear : false);
- },
- determinebaseyear: function (minyear, maxyear, hint) {
- var currentyear = (new Date()).getFullYear();
- if (minyear > currentyear) return minyear;
- if (maxyear < currentyear) {
- var maxYearPrefix = maxyear.toString().slice(0, 2);
- var maxYearPostfix = maxyear.toString().slice(2, 4);
- while (maxyear < maxYearPrefix + hint) {
- maxYearPrefix--;
- }
- var maxxYear = maxYearPrefix + maxYearPostfix;
- return minyear > maxxYear ? minyear : maxxYear;
- }
-
- return currentyear;
- },
- onKeyUp: function (e, buffer, opts) {
- var $input = $(this);
- if (e.ctrlKey && e.keyCode == opts.keyCode.RIGHT) {
- var today = new Date();
- $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString());
- }
- },
- definitions: {
- '1': { //val1 ~ day or month
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.regex.val1.test(chrs);
- if (!strict && !isValid) {
- if (chrs.charAt(1) == opts.separator || "-./".indexOf(chrs.charAt(1)) != -1) {
- isValid = opts.regex.val1.test("0" + chrs.charAt(0));
- if (isValid) {
- buffer[pos - 1] = "0";
- return { "pos": pos, "c": chrs.charAt(0) };
- }
- }
- }
- return isValid;
- },
- cardinality: 2,
- prevalidator: [{
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.regex.val1pre.test(chrs);
- if (!strict && !isValid) {
- isValid = opts.regex.val1.test("0" + chrs);
- if (isValid) {
- buffer[pos] = "0";
- pos++;
- return { "pos": pos };
- }
- }
- return isValid;
- }, cardinality: 1
- }]
- },
- '2': { //val2 ~ day or month
- validator: function (chrs, buffer, pos, strict, opts) {
- var frontValue = buffer.join('').substr(0, 3);
- if (frontValue.indexOf(opts.placeholder[0]) != -1) frontValue = "01" + opts.separator;
- var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
- if (!strict && !isValid) {
- if (chrs.charAt(1) == opts.separator || "-./".indexOf(chrs.charAt(1)) != -1) {
- isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0));
- if (isValid) {
- buffer[pos - 1] = "0";
- return { "pos": pos, "c": chrs.charAt(0) };
- }
- }
- }
- return isValid;
- },
- cardinality: 2,
- prevalidator: [{
- validator: function (chrs, buffer, pos, strict, opts) {
- var frontValue = buffer.join('').substr(0, 3);
- if (frontValue.indexOf(opts.placeholder[0]) != -1) frontValue = "01" + opts.separator;
- var isValid = opts.regex.val2pre(opts.separator).test(frontValue + chrs);
- if (!strict && !isValid) {
- isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs);
- if (isValid) {
- buffer[pos] = "0";
- pos++;
- return { "pos": pos };
- }
- }
- return isValid;
- }, cardinality: 1
- }]
- },
- 'y': { //year
- validator: function (chrs, buffer, pos, strict, opts) {
- if (opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
- var dayMonthValue = buffer.join('').substr(0, 6);
- if (dayMonthValue != opts.leapday)
- return true;
- else {
- var year = parseInt(chrs, 10);//detect leap year
- if (year % 4 === 0)
- if (year % 100 === 0)
- if (year % 400 === 0)
- return true;
- else return false;
- else return true;
- else return false;
- }
- } else return false;
- },
- cardinality: 4,
- prevalidator: [
- {
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
- if (!strict && !isValid) {
- var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1);
-
- isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
- if (isValid) {
- buffer[pos++] = yearPrefix[0];
- return { "pos": pos };
- }
- yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2);
-
- isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
- if (isValid) {
- buffer[pos++] = yearPrefix[0];
- buffer[pos++] = yearPrefix[1];
- return { "pos": pos };
- }
- }
- return isValid;
- },
- cardinality: 1
- },
- {
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
- if (!strict && !isValid) {
- var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
-
- isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear);
- if (isValid) {
- buffer[pos++] = yearPrefix[1];
- return { "pos": pos };
- }
-
- yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
- if (opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
- var dayMonthValue = buffer.join('').substr(0, 6);
- if (dayMonthValue != opts.leapday)
- isValid = true;
- else {
- var year = parseInt(chrs, 10);//detect leap year
- if (year % 4 === 0)
- if (year % 100 === 0)
- if (year % 400 === 0)
- isValid = true;
- else isValid = false;
- else isValid = true;
- else isValid = false;
- }
- } else isValid = false;
- if (isValid) {
- buffer[pos - 1] = yearPrefix[0];
- buffer[pos++] = yearPrefix[1];
- buffer[pos++] = chrs[0];
- return { "pos": pos };
- }
- }
- return isValid;
- }, cardinality: 2
- },
- {
- validator: function (chrs, buffer, pos, strict, opts) {
- return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
- }, cardinality: 3
- }
- ]
- }
- },
- insertMode: false,
- autoUnmask: false
- },
- 'mm/dd/yyyy': {
- placeholder: "mm/dd/yyyy",
- alias: "dd/mm/yyyy", //reuse functionality of dd/mm/yyyy alias
- regex: {
- val2pre: function (separator) { var escapedSeparator = $.inputmask.escapeRegex.call(this, separator); return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])"); }, //daypre
- val2: function (separator) { var escapedSeparator = $.inputmask.escapeRegex.call(this, separator); return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)"); }, //day
- val1pre: new RegExp("[01]"), //monthpre
- val1: new RegExp("0[1-9]|1[012]") //month
- },
- leapday: "02/29/",
- onKeyUp: function (e, buffer, opts) {
- var $input = $(this);
- if (e.ctrlKey && e.keyCode == opts.keyCode.RIGHT) {
- var today = new Date();
- $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString());
- }
- }
- },
- 'yyyy/mm/dd': {
- mask: "y/1/2",
- placeholder: "yyyy/mm/dd",
- alias: "mm/dd/yyyy",
- leapday: "/02/29",
- onKeyUp: function (e, buffer, opts) {
- var $input = $(this);
- if (e.ctrlKey && e.keyCode == opts.keyCode.RIGHT) {
- var today = new Date();
- $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString());
- }
- },
- definitions: {
- '2': { //val2 ~ day or month
- validator: function (chrs, buffer, pos, strict, opts) {
- var frontValue = buffer.join('').substr(5, 3);
- if (frontValue.indexOf(opts.placeholder[5]) != -1) frontValue = "01" + opts.separator;
- var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
- if (!strict && !isValid) {
- if (chrs.charAt(1) == opts.separator || "-./".indexOf(chrs.charAt(1)) != -1) {
- isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0));
- if (isValid) {
- buffer[pos - 1] = "0";
- return { "pos": pos, "c": chrs.charAt(0) };
- }
- }
- }
-
- //check leap yeap
- if (isValid) {
- var dayMonthValue = buffer.join('').substr(4, 4) + chrs;
- if (dayMonthValue != opts.leapday)
- return true;
- else {
- var year = parseInt(buffer.join('').substr(0, 4), 10); //detect leap year
- if (year % 4 === 0)
- if (year % 100 === 0)
- if (year % 400 === 0)
- return true;
- else return false;
- else return true;
- else return false;
- }
- }
-
- return isValid;
- },
- cardinality: 2,
- prevalidator: [{
- validator: function (chrs, buffer, pos, strict, opts) {
- var frontValue = buffer.join('').substr(5, 3);
- if (frontValue.indexOf(opts.placeholder[5]) != -1) frontValue = "01" + opts.separator;
- var isValid = opts.regex.val2pre(opts.separator).test(frontValue + chrs);
- if (!strict && !isValid) {
- isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs);
- if (isValid) {
- buffer[pos] = "0";
- pos++;
- return { "pos": pos };
- }
- }
- return isValid;
- }, cardinality: 1
- }]
- }
- }
- },
- 'dd.mm.yyyy': {
- mask: "1.2.y",
- placeholder: "dd.mm.yyyy",
- leapday: "29.02.",
- separator: '.',
- alias: "dd/mm/yyyy"
- },
- 'dd-mm-yyyy': {
- mask: "1-2-y",
- placeholder: "dd-mm-yyyy",
- leapday: "29-02-",
- separator: '-',
- alias: "dd/mm/yyyy"
- },
- 'mm.dd.yyyy': {
- mask: "1.2.y",
- placeholder: "mm.dd.yyyy",
- leapday: "02.29.",
- separator: '.',
- alias: "mm/dd/yyyy"
- },
- 'mm-dd-yyyy': {
- mask: "1-2-y",
- placeholder: "mm-dd-yyyy",
- leapday: "02-29-",
- separator: '-',
- alias: "mm/dd/yyyy"
- },
- 'yyyy.mm.dd': {
- mask: "y.1.2",
- placeholder: "yyyy.mm.dd",
- leapday: ".02.29",
- separator: '.',
- alias: "yyyy/mm/dd"
- },
- 'yyyy-mm-dd': {
- mask: "y-1-2",
- placeholder: "yyyy-mm-dd",
- leapday: "-02-29",
- separator: '-',
- alias: "yyyy/mm/dd"
- },
- 'datetime': {
- mask: "1/2/y h:s",
- placeholder: "dd/mm/yyyy hh:mm",
- alias: "dd/mm/yyyy",
- regex: {
- hrspre: new RegExp("[012]"), //hours pre
- hrs24: new RegExp("2[0-9]|1[3-9]"),
- hrs: new RegExp("[01][0-9]|2[0-3]"), //hours
- ampm: new RegExp("^[a|p|A|P][m|M]")
- },
- timeseparator: ':',
- hourFormat: "24", // or 12
- definitions: {
- 'h': { //hours
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.regex.hrs.test(chrs);
- if (!strict && !isValid) {
- if (chrs.charAt(1) == opts.timeseparator || "-.:".indexOf(chrs.charAt(1)) != -1) {
- isValid = opts.regex.hrs.test("0" + chrs.charAt(0));
- if (isValid) {
- buffer[pos - 1] = "0";
- buffer[pos] = chrs.charAt(0);
- pos++;
- return { "pos": pos };
- }
- }
- }
-
- if (isValid && opts.hourFormat !== "24" && opts.regex.hrs24.test(chrs)) {
-
- var tmp = parseInt(chrs, 10);
-
- if (tmp == 24) {
- buffer[pos + 5] = "a";
- buffer[pos + 6] = "m";
- } else {
- buffer[pos + 5] = "p";
- buffer[pos + 6] = "m";
- }
-
- tmp = tmp - 12;
-
- if (tmp < 10) {
- buffer[pos] = tmp.toString();
- buffer[pos - 1] = "0";
- } else {
- buffer[pos] = tmp.toString().charAt(1);
- buffer[pos - 1] = tmp.toString().charAt(0);
- }
-
- return { "pos": pos, "c": buffer[pos] };
- }
-
- return isValid;
- },
- cardinality: 2,
- prevalidator: [{
- validator: function (chrs, buffer, pos, strict, opts) {
- var isValid = opts.regex.hrspre.test(chrs);
- if (!strict && !isValid) {
- isValid = opts.regex.hrs.test("0" + chrs);
- if (isValid) {
- buffer[pos] = "0";
- pos++;
- return { "pos": pos };
- }
- }
- return isValid;
- }, cardinality: 1
- }]
- },
- 't': { //am/pm
- validator: function (chrs, buffer, pos, strict, opts) {
- return opts.regex.ampm.test(chrs + "m");
- },
- casing: "lower",
- cardinality: 1
- }
- },
- insertMode: false,
- autoUnmask: false
- },
- 'datetime12': {
- mask: "1/2/y h:s t\\m",
- placeholder: "dd/mm/yyyy hh:mm xm",
- alias: "datetime",
- hourFormat: "12"
- },
- 'hh:mm t': {
- mask: "h:s t\\m",
- placeholder: "hh:mm xm",
- alias: "datetime",
- hourFormat: "12"
- },
- 'h:s t': {
- mask: "h:s t\\m",
- placeholder: "hh:mm xm",
- alias: "datetime",
- hourFormat: "12"
- },
- 'hh:mm:ss': {
- mask: "h:s:s",
- autoUnmask: false
- },
- 'hh:mm': {
- mask: "h:s",
- autoUnmask: false
- },
- 'date': {
- alias: "dd/mm/yyyy" // "mm/dd/yyyy"
- },
- 'mm/yyyy': {
- mask: "1/y",
- placeholder: "mm/yyyy",
- leapday: "donotuse",
- separator: '/',
- alias: "mm/dd/yyyy"
- }
- });
-})(jQuery);
diff --git a/html/plugins/input-mask/jquery.inputmask.extensions.js b/html/plugins/input-mask/jquery.inputmask.extensions.js
deleted file mode 100644
index c89f91ee..00000000
--- a/html/plugins/input-mask/jquery.inputmask.extensions.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Input Mask plugin extensions
-http://github.com/RobinHerbots/jquery.inputmask
-Copyright (c) 2010 - 2014 Robin Herbots
-Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.0.0
-
-Optional extensions on the jquery.inputmask base
-*/
-(function ($) {
- //extra definitions
- $.extend($.inputmask.defaults.definitions, {
- 'A': {
- validator: "[A-Za-z]",
- cardinality: 1,
- casing: "upper" //auto uppercasing
- },
- '#': {
- validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]",
- cardinality: 1,
- casing: "upper"
- }
- });
- $.extend($.inputmask.defaults.aliases, {
- 'url': {
- mask: "ir",
- placeholder: "",
- separator: "",
- defaultPrefix: "http://",
- regex: {
- urlpre1: new RegExp("[fh]"),
- urlpre2: new RegExp("(ft|ht)"),
- urlpre3: new RegExp("(ftp|htt)"),
- urlpre4: new RegExp("(ftp:|http|ftps)"),
- urlpre5: new RegExp("(ftp:/|ftps:|http:|https)"),
- urlpre6: new RegExp("(ftp://|ftps:/|http:/|https:)"),
- urlpre7: new RegExp("(ftp://|ftps://|http://|https:/)"),
- urlpre8: new RegExp("(ftp://|ftps://|http://|https://)")
- },
- definitions: {
- 'i': {
- validator: function (chrs, buffer, pos, strict, opts) {
- return true;
- },
- cardinality: 8,
- prevalidator: (function () {
- var result = [], prefixLimit = 8;
- for (var i = 0; i < prefixLimit; i++) {
- result[i] = (function () {
- var j = i;
- return {
- validator: function (chrs, buffer, pos, strict, opts) {
- if (opts.regex["urlpre" + (j + 1)]) {
- var tmp = chrs, k;
- if (((j + 1) - chrs.length) > 0) {
- tmp = buffer.join('').substring(0, ((j + 1) - chrs.length)) + "" + tmp;
- }
- var isValid = opts.regex["urlpre" + (j + 1)].test(tmp);
- if (!strict && !isValid) {
- pos = pos - j;
- for (k = 0; k < opts.defaultPrefix.length; k++) {
- buffer[pos] = opts.defaultPrefix[k]; pos++;
- }
- for (k = 0; k < tmp.length - 1; k++) {
- buffer[pos] = tmp[k]; pos++;
- }
- return { "pos": pos };
- }
- return isValid;
- } else {
- return false;
- }
- }, cardinality: j
- };
- })();
- }
- return result;
- })()
- },
- "r": {
- validator: ".",
- cardinality: 50
- }
- },
- insertMode: false,
- autoUnmask: false
- },
- "ip": { //ip-address mask
- mask: ["[[x]y]z.[[x]y]z.[[x]y]z.x[yz]", "[[x]y]z.[[x]y]z.[[x]y]z.[[x]y][z]"],
- definitions: {
- 'x': {
- validator: "[012]",
- cardinality: 1,
- definitionSymbol: "i"
- },
- 'y': {
- validator: function (chrs, buffer, pos, strict, opts) {
- if (pos - 1 > -1 && buffer[pos - 1] != ".")
- chrs = buffer[pos - 1] + chrs;
- else chrs = "0" + chrs;
- return new RegExp("2[0-5]|[01][0-9]").test(chrs);
- },
- cardinality: 1,
- definitionSymbol: "i"
- },
- 'z': {
- validator: function (chrs, buffer, pos, strict, opts) {
- if (pos - 1 > -1 && buffer[pos - 1] != ".") {
- chrs = buffer[pos - 1] + chrs;
- if (pos - 2 > -1 && buffer[pos - 2] != ".") {
- chrs = buffer[pos - 2] + chrs;
- } else chrs = "0" + chrs;
- } else chrs = "00" + chrs;
- return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
- },
- cardinality: 1,
- definitionSymbol: "i"
- }
- }
- }
- });
-})(jQuery);
diff --git a/html/plugins/input-mask/jquery.inputmask.js b/html/plugins/input-mask/jquery.inputmask.js
deleted file mode 100644
index 86cb3205..00000000
--- a/html/plugins/input-mask/jquery.inputmask.js
+++ /dev/null
@@ -1,1627 +0,0 @@
-/**
-* @license Input Mask plugin for jquery
-* http://github.com/RobinHerbots/jquery.inputmask
-* Copyright (c) 2010 - 2014 Robin Herbots
-* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 0.0.0
-*/
-
-(function ($) {
- if ($.fn.inputmask === undefined) {
- //helper functions
- function isInputEventSupported(eventName) {
- var el = document.createElement('input'),
- eventName = 'on' + eventName,
- isSupported = (eventName in el);
- if (!isSupported) {
- el.setAttribute(eventName, 'return;');
- isSupported = typeof el[eventName] == 'function';
- }
- el = null;
- return isSupported;
- }
- function resolveAlias(aliasStr, options, opts) {
- var aliasDefinition = opts.aliases[aliasStr];
- if (aliasDefinition) {
- if (aliasDefinition.alias) resolveAlias(aliasDefinition.alias, undefined, opts); //alias is another alias
- $.extend(true, opts, aliasDefinition); //merge alias definition in the options
- $.extend(true, opts, options); //reapply extra given options
- return true;
- }
- return false;
- }
- function generateMaskSets(opts) {
- var ms = [];
- var genmasks = []; //used to keep track of the masks that where processed, to avoid duplicates
- function getMaskTemplate(mask) {
- if (opts.numericInput) {
- mask = mask.split('').reverse().join('');
- }
- var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
- if (repeat == "*") greedy = false;
- //if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
- if (mask.length == 1 && greedy == false && repeat != 0) { opts.placeholder = ""; } //hide placeholder with single non-greedy mask
- var singleMask = $.map(mask.split(""), function (element, index) {
- var outElem = [];
- if (element == opts.escapeChar) {
- escaped = true;
- }
- else if ((element != opts.optionalmarker.start && element != opts.optionalmarker.end) || escaped) {
- var maskdef = opts.definitions[element];
- if (maskdef && !escaped) {
- for (var i = 0; i < maskdef.cardinality; i++) {
- outElem.push(opts.placeholder.charAt((outCount + i) % opts.placeholder.length));
- }
- } else {
- outElem.push(element);
- escaped = false;
- }
- outCount += outElem.length;
- return outElem;
- }
- });
-
- //allocate repetitions
- var repeatedMask = singleMask.slice();
- for (var i = 1; i < repeat && greedy; i++) {
- repeatedMask = repeatedMask.concat(singleMask.slice());
- }
-
- return { "mask": repeatedMask, "repeat": repeat, "greedy": greedy };
- }
- //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
- function getTestingChain(mask) {
- if (opts.numericInput) {
- mask = mask.split('').reverse().join('');
- }
- var isOptional = false, escaped = false;
- var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
-
- return $.map(mask.split(""), function (element, index) {
- var outElem = [];
-
- if (element == opts.escapeChar) {
- escaped = true;
- } else if (element == opts.optionalmarker.start && !escaped) {
- isOptional = true;
- newBlockMarker = true;
- }
- else if (element == opts.optionalmarker.end && !escaped) {
- isOptional = false;
- newBlockMarker = true;
- }
- else {
- var maskdef = opts.definitions[element];
- if (maskdef && !escaped) {
- var prevalidators = maskdef["prevalidator"], prevalidatorsL = prevalidators ? prevalidators.length : 0;
- for (var i = 1; i < maskdef.cardinality; i++) {
- var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator["validator"], cardinality = prevalidator["cardinality"];
- outElem.push({ fn: validator ? typeof validator == 'string' ? new RegExp(validator) : new function () { this.test = validator; } : new RegExp("."), cardinality: cardinality ? cardinality : 1, optionality: isOptional, newBlockMarker: isOptional == true ? newBlockMarker : false, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element });
- if (isOptional == true) //reset newBlockMarker
- newBlockMarker = false;
- }
- outElem.push({ fn: maskdef.validator ? typeof maskdef.validator == 'string' ? new RegExp(maskdef.validator) : new function () { this.test = maskdef.validator; } : new RegExp("."), cardinality: maskdef.cardinality, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element });
- } else {
- outElem.push({ fn: null, cardinality: 0, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: null, def: element });
- escaped = false;
- }
- //reset newBlockMarker
- newBlockMarker = false;
- return outElem;
- }
- });
- }
- function markOptional(maskPart) { //needed for the clearOptionalTail functionality
- return opts.optionalmarker.start + maskPart + opts.optionalmarker.end;
- }
- function splitFirstOptionalEndPart(maskPart) {
- var optionalStartMarkers = 0, optionalEndMarkers = 0, mpl = maskPart.length;
- for (var i = 0; i < mpl; i++) {
- if (maskPart.charAt(i) == opts.optionalmarker.start) {
- optionalStartMarkers++;
- }
- if (maskPart.charAt(i) == opts.optionalmarker.end) {
- optionalEndMarkers++;
- }
- if (optionalStartMarkers > 0 && optionalStartMarkers == optionalEndMarkers)
- break;
- }
- var maskParts = [maskPart.substring(0, i)];
- if (i < mpl) {
- maskParts.push(maskPart.substring(i + 1, mpl));
- }
- return maskParts;
- }
- function splitFirstOptionalStartPart(maskPart) {
- var mpl = maskPart.length;
- for (var i = 0; i < mpl; i++) {
- if (maskPart.charAt(i) == opts.optionalmarker.start) {
- break;
- }
- }
- var maskParts = [maskPart.substring(0, i)];
- if (i < mpl) {
- maskParts.push(maskPart.substring(i + 1, mpl));
- }
- return maskParts;
- }
- function generateMask(maskPrefix, maskPart, metadata) {
- var maskParts = splitFirstOptionalEndPart(maskPart);
- var newMask, maskTemplate;
-
- var masks = splitFirstOptionalStartPart(maskParts[0]);
- if (masks.length > 1) {
- newMask = maskPrefix + masks[0] + markOptional(masks[1]) + (maskParts.length > 1 ? maskParts[1] : "");
- if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
- genmasks.push(newMask);
- maskTemplate = getMaskTemplate(newMask);
- ms.push({
- "mask": newMask,
- "_buffer": maskTemplate["mask"],
- "buffer": maskTemplate["mask"].slice(),
- "tests": getTestingChain(newMask),
- "lastValidPosition": -1,
- "greedy": maskTemplate["greedy"],
- "repeat": maskTemplate["repeat"],
- "metadata": metadata
- });
- }
- newMask = maskPrefix + masks[0] + (maskParts.length > 1 ? maskParts[1] : "");
- if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
- genmasks.push(newMask);
- maskTemplate = getMaskTemplate(newMask);
- ms.push({
- "mask": newMask,
- "_buffer": maskTemplate["mask"],
- "buffer": maskTemplate["mask"].slice(),
- "tests": getTestingChain(newMask),
- "lastValidPosition": -1,
- "greedy": maskTemplate["greedy"],
- "repeat": maskTemplate["repeat"],
- "metadata": metadata
- });
- }
- if (splitFirstOptionalStartPart(masks[1]).length > 1) { //optional contains another optional
- generateMask(maskPrefix + masks[0], masks[1] + maskParts[1], metadata);
- }
- if (maskParts.length > 1 && splitFirstOptionalStartPart(maskParts[1]).length > 1) {
- generateMask(maskPrefix + masks[0] + markOptional(masks[1]), maskParts[1], metadata);
- generateMask(maskPrefix + masks[0], maskParts[1], metadata);
- }
- }
- else {
- newMask = maskPrefix + maskParts;
- if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
- genmasks.push(newMask);
- maskTemplate = getMaskTemplate(newMask);
- ms.push({
- "mask": newMask,
- "_buffer": maskTemplate["mask"],
- "buffer": maskTemplate["mask"].slice(),
- "tests": getTestingChain(newMask),
- "lastValidPosition": -1,
- "greedy": maskTemplate["greedy"],
- "repeat": maskTemplate["repeat"],
- "metadata": metadata
- });
- }
- }
-
- }
-
- if ($.isFunction(opts.mask)) { //allow mask to be a preprocessing fn - should return a valid mask
- opts.mask = opts.mask.call(this, opts);
- }
- if ($.isArray(opts.mask)) {
- $.each(opts.mask, function (ndx, msk) {
- if (msk["mask"] != undefined) {
- generateMask("", msk["mask"].toString(), msk);
- } else
- generateMask("", msk.toString());
- });
- } else generateMask("", opts.mask.toString());
-
- return opts.greedy ? ms : ms.sort(function (a, b) { return a["mask"].length - b["mask"].length; });
- }
-
- var msie10 = navigator.userAgent.match(new RegExp("msie 10", "i")) !== null,
- iphone = navigator.userAgent.match(new RegExp("iphone", "i")) !== null,
- android = navigator.userAgent.match(new RegExp("android.*safari.*", "i")) !== null,
- androidchrome = navigator.userAgent.match(new RegExp("android.*chrome.*", "i")) !== null,
- pasteEvent = isInputEventSupported('paste') ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange";
-
-
- //masking scope
- //actionObj definition see below
- function maskScope(masksets, activeMasksetIndex, opts, actionObj) {
- var isRTL = false,
- valueOnFocus = getActiveBuffer().join(''),
- $el, chromeValueOnInput,
- skipKeyPressEvent = false, //Safari 5.1.x - modal dialog fires keypress twice workaround
- skipInputEvent = false, //skip when triggered from within inputmask
- ignorable = false;
-
-
- //maskset helperfunctions
-
- function getActiveMaskSet() {
- return masksets[activeMasksetIndex];
- }
-
- function getActiveTests() {
- return getActiveMaskSet()['tests'];
- }
-
- function getActiveBufferTemplate() {
- return getActiveMaskSet()['_buffer'];
- }
-
- function getActiveBuffer() {
- return getActiveMaskSet()['buffer'];
- }
-
- function isValid(pos, c, strict) { //strict true ~ no correction or autofill
- strict = strict === true; //always set a value to strict to prevent possible strange behavior in the extensions
-
- function _isValid(position, activeMaskset, c, strict) {
- var testPos = determineTestPosition(position), loopend = c ? 1 : 0, chrs = '', buffer = activeMaskset["buffer"];
- for (var i = activeMaskset['tests'][testPos].cardinality; i > loopend; i--) {
- chrs += getBufferElement(buffer, testPos - (i - 1));
- }
-
- if (c) {
- chrs += c;
- }
-
- //return is false or a json object => { pos: ??, c: ??} or true
- return activeMaskset['tests'][testPos].fn != null ?
- activeMaskset['tests'][testPos].fn.test(chrs, buffer, position, strict, opts)
- : (c == getBufferElement(activeMaskset['_buffer'], position, true) || c == opts.skipOptionalPartCharacter) ?
- { "refresh": true, c: getBufferElement(activeMaskset['_buffer'], position, true), pos: position }
- : false;
- }
-
- function PostProcessResults(maskForwards, results) {
- var hasValidActual = false;
- $.each(results, function (ndx, rslt) {
- hasValidActual = $.inArray(rslt["activeMasksetIndex"], maskForwards) == -1 && rslt["result"] !== false;
- if (hasValidActual) return false;
- });
- if (hasValidActual) { //strip maskforwards
- results = $.map(results, function (rslt, ndx) {
- if ($.inArray(rslt["activeMasksetIndex"], maskForwards) == -1) {
- return rslt;
- } else {
- masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = actualLVP;
- }
- });
- } else { //keep maskforwards with the least forward
- var lowestPos = -1, lowestIndex = -1, rsltValid;
- $.each(results, function (ndx, rslt) {
- if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1 && rslt["result"] !== false & (lowestPos == -1 || lowestPos > rslt["result"]["pos"])) {
- lowestPos = rslt["result"]["pos"];
- lowestIndex = rslt["activeMasksetIndex"];
- }
- });
- results = $.map(results, function (rslt, ndx) {
- if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1) {
- if (rslt["result"]["pos"] == lowestPos) {
- return rslt;
- } else if (rslt["result"] !== false) {
- for (var i = pos; i < lowestPos; i++) {
- rsltValid = _isValid(i, masksets[rslt["activeMasksetIndex"]], masksets[lowestIndex]["buffer"][i], true);
- if (rsltValid === false) {
- masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos - 1;
- break;
- } else {
- setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], i, masksets[lowestIndex]["buffer"][i], true);
- masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = i;
- }
- }
- //also check check for the lowestpos with the new input
- rsltValid = _isValid(lowestPos, masksets[rslt["activeMasksetIndex"]], c, true);
- if (rsltValid !== false) {
- setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], lowestPos, c, true);
- masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos;
- }
- //console.log("ndx " + rslt["activeMasksetIndex"] + " validate " + masksets[rslt["activeMasksetIndex"]]["buffer"].join('') + " lv " + masksets[rslt["activeMasksetIndex"]]['lastValidPosition']);
- return rslt;
- }
- }
- });
- }
- return results;
- }
-
- if (strict) {
- var result = _isValid(pos, getActiveMaskSet(), c, strict); //only check validity in current mask when validating strict
- if (result === true) {
- result = { "pos": pos }; //always take a possible corrected maskposition into account
- }
- return result;
- }
-
- var results = [], result = false, currentActiveMasksetIndex = activeMasksetIndex,
- actualBuffer = getActiveBuffer().slice(), actualLVP = getActiveMaskSet()["lastValidPosition"],
- actualPrevious = seekPrevious(pos),
- maskForwards = [];
- $.each(masksets, function (index, value) {
- if (typeof (value) == "object") {
- activeMasksetIndex = index;
-
- var maskPos = pos;
- var lvp = getActiveMaskSet()['lastValidPosition'],
- rsltValid;
- if (lvp == actualLVP) {
- if ((maskPos - actualLVP) > 1) {
- for (var i = lvp == -1 ? 0 : lvp; i < maskPos; i++) {
- rsltValid = _isValid(i, getActiveMaskSet(), actualBuffer[i], true);
- if (rsltValid === false) {
- break;
- } else {
- setBufferElement(getActiveBuffer(), i, actualBuffer[i], true);
- if (rsltValid === true) {
- rsltValid = { "pos": i }; //always take a possible corrected maskposition into account
- }
- var newValidPosition = rsltValid.pos || i;
- if (getActiveMaskSet()['lastValidPosition'] < newValidPosition)
- getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid
- }
- }
- }
- //does the input match on a further position?
- if (!isMask(maskPos) && !_isValid(maskPos, getActiveMaskSet(), c, strict)) {
- var maxForward = seekNext(maskPos) - maskPos;
- for (var fw = 0; fw < maxForward; fw++) {
- if (_isValid(++maskPos, getActiveMaskSet(), c, strict) !== false)
- break;
- }
- maskForwards.push(activeMasksetIndex);
- //console.log('maskforward ' + activeMasksetIndex + " pos " + pos + " maskPos " + maskPos);
- }
- }
-
- if (getActiveMaskSet()['lastValidPosition'] >= actualLVP || activeMasksetIndex == currentActiveMasksetIndex) {
- if (maskPos >= 0 && maskPos < getMaskLength()) {
- result = _isValid(maskPos, getActiveMaskSet(), c, strict);
- if (result !== false) {
- if (result === true) {
- result = { "pos": maskPos }; //always take a possible corrected maskposition into account
- }
- var newValidPosition = result.pos || maskPos;
- if (getActiveMaskSet()['lastValidPosition'] < newValidPosition)
- getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid
- }
- //console.log("pos " + pos + " ndx " + activeMasksetIndex + " validate " + getActiveBuffer().join('') + " lv " + getActiveMaskSet()['lastValidPosition']);
- results.push({ "activeMasksetIndex": index, "result": result });
- }
- }
- }
- });
- activeMasksetIndex = currentActiveMasksetIndex; //reset activeMasksetIndex
-
- return PostProcessResults(maskForwards, results); //return results of the multiple mask validations
- }
-
- function determineActiveMasksetIndex() {
- var currentMasksetIndex = activeMasksetIndex,
- highestValid = { "activeMasksetIndex": 0, "lastValidPosition": -1, "next": -1 };
- $.each(masksets, function (index, value) {
- if (typeof (value) == "object") {
- activeMasksetIndex = index;
- if (getActiveMaskSet()['lastValidPosition'] > highestValid['lastValidPosition']) {
- highestValid["activeMasksetIndex"] = index;
- highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition'];
- highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']);
- } else if (getActiveMaskSet()['lastValidPosition'] == highestValid['lastValidPosition'] &&
- (highestValid['next'] == -1 || highestValid['next'] > seekNext(getActiveMaskSet()['lastValidPosition']))) {
- highestValid["activeMasksetIndex"] = index;
- highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition'];
- highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']);
- }
- }
- });
-
- activeMasksetIndex = highestValid["lastValidPosition"] != -1 && masksets[currentMasksetIndex]["lastValidPosition"] == highestValid["lastValidPosition"] ? currentMasksetIndex : highestValid["activeMasksetIndex"];
- if (currentMasksetIndex != activeMasksetIndex) {
- clearBuffer(getActiveBuffer(), seekNext(highestValid["lastValidPosition"]), getMaskLength());
- getActiveMaskSet()["writeOutBuffer"] = true;
- }
- $el.data('_inputmask')['activeMasksetIndex'] = activeMasksetIndex; //store the activeMasksetIndex
- }
-
- function isMask(pos) {
- var testPos = determineTestPosition(pos);
- var test = getActiveTests()[testPos];
-
- return test != undefined ? test.fn : false;
- }
-
- function determineTestPosition(pos) {
- return pos % getActiveTests().length;
- }
-
- function getMaskLength() {
- return opts.getMaskLength(getActiveBufferTemplate(), getActiveMaskSet()['greedy'], getActiveMaskSet()['repeat'], getActiveBuffer(), opts);
- }
-
- //pos: from position
-
- function seekNext(pos) {
- var maskL = getMaskLength();
- if (pos >= maskL) return maskL;
- var position = pos;
- while (++position < maskL && !isMask(position)) {
- }
- return position;
- }
-
- //pos: from position
-
- function seekPrevious(pos) {
- var position = pos;
- if (position <= 0) return 0;
-
- while (--position > 0 && !isMask(position)) {
- }
- return position;
- }
-
- function setBufferElement(buffer, position, element, autoPrepare) {
- if (autoPrepare) position = prepareBuffer(buffer, position);
-
- var test = getActiveTests()[determineTestPosition(position)];
- var elem = element;
- if (elem != undefined && test != undefined) {
- switch (test.casing) {
- case "upper":
- elem = element.toUpperCase();
- break;
- case "lower":
- elem = element.toLowerCase();
- break;
- }
- }
-
- buffer[position] = elem;
- }
-
- function getBufferElement(buffer, position, autoPrepare) {
- if (autoPrepare) position = prepareBuffer(buffer, position);
- return buffer[position];
- }
-
- //needed to handle the non-greedy mask repetitions
-
- function prepareBuffer(buffer, position) {
- var j;
- while (buffer[position] == undefined && buffer.length < getMaskLength()) {
- j = 0;
- while (getActiveBufferTemplate()[j] !== undefined) { //add a new buffer
- buffer.push(getActiveBufferTemplate()[j++]);
- }
- }
-
- return position;
- }
-
- function writeBuffer(input, buffer, caretPos) {
- input._valueSet(buffer.join(''));
- if (caretPos != undefined) {
- caret(input, caretPos);
- }
- }
-
- function clearBuffer(buffer, start, end, stripNomasks) {
- for (var i = start, maskL = getMaskLength() ; i < end && i < maskL; i++) {
- if (stripNomasks === true) {
- if (!isMask(i))
- setBufferElement(buffer, i, "");
- } else
- setBufferElement(buffer, i, getBufferElement(getActiveBufferTemplate().slice(), i, true));
- }
- }
-
- function setReTargetPlaceHolder(buffer, pos) {
- var testPos = determineTestPosition(pos);
- setBufferElement(buffer, pos, getBufferElement(getActiveBufferTemplate(), testPos));
- }
-
- function getPlaceHolder(pos) {
- return opts.placeholder.charAt(pos % opts.placeholder.length);
- }
-
- function checkVal(input, writeOut, strict, nptvl, intelliCheck) {
- var inputValue = nptvl != undefined ? nptvl.slice() : truncateInput(input._valueGet()).split('');
-
- $.each(masksets, function (ndx, ms) {
- if (typeof (ms) == "object") {
- ms["buffer"] = ms["_buffer"].slice();
- ms["lastValidPosition"] = -1;
- ms["p"] = -1;
- }
- });
- if (strict !== true) activeMasksetIndex = 0;
- if (writeOut) input._valueSet(""); //initial clear
- var ml = getMaskLength();
- $.each(inputValue, function (ndx, charCode) {
- if (intelliCheck === true) {
- var p = getActiveMaskSet()["p"], lvp = p == -1 ? p : seekPrevious(p),
- pos = lvp == -1 ? ndx : seekNext(lvp);
- if ($.inArray(charCode, getActiveBufferTemplate().slice(lvp + 1, pos)) == -1) {
- keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx);
- }
- } else {
- keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx);
- }
- });
-
- if (strict === true && getActiveMaskSet()["p"] != -1) {
- getActiveMaskSet()["lastValidPosition"] = seekPrevious(getActiveMaskSet()["p"]);
- }
- }
-
- function escapeRegex(str) {
- return $.inputmask.escapeRegex.call(this, str);
- }
-
- function truncateInput(inputValue) {
- return inputValue.replace(new RegExp("(" + escapeRegex(getActiveBufferTemplate().join('')) + ")*$"), "");
- }
-
- function clearOptionalTail(input) {
- var buffer = getActiveBuffer(), tmpBuffer = buffer.slice(), testPos, pos;
- for (var pos = tmpBuffer.length - 1; pos >= 0; pos--) {
- var testPos = determineTestPosition(pos);
- if (getActiveTests()[testPos].optionality) {
- if (!isMask(pos) || !isValid(pos, buffer[pos], true))
- tmpBuffer.pop();
- else break;
- } else break;
- }
- writeBuffer(input, tmpBuffer);
- }
-
- function unmaskedvalue($input, skipDatepickerCheck) {
- if (getActiveTests() && (skipDatepickerCheck === true || !$input.hasClass('hasDatepicker'))) {
- //checkVal(input, false, true);
- var umValue = $.map(getActiveBuffer(), function (element, index) {
- return isMask(index) && isValid(index, element, true) ? element : null;
- });
- var unmaskedValue = (isRTL ? umValue.reverse() : umValue).join('');
- return opts.onUnMask != undefined ? opts.onUnMask.call(this, getActiveBuffer().join(''), unmaskedValue) : unmaskedValue;
- } else {
- return $input[0]._valueGet();
- }
- }
-
- function TranslatePosition(pos) {
- if (isRTL && typeof pos == 'number' && (!opts.greedy || opts.placeholder != "")) {
- var bffrLght = getActiveBuffer().length;
- pos = bffrLght - pos;
- }
- return pos;
- }
-
- function caret(input, begin, end) {
- var npt = input.jquery && input.length > 0 ? input[0] : input, range;
- if (typeof begin == 'number') {
- begin = TranslatePosition(begin);
- end = TranslatePosition(end);
- if (!$(input).is(':visible')) {
- return;
- }
- end = (typeof end == 'number') ? end : begin;
- npt.scrollLeft = npt.scrollWidth;
- if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
- if (npt.setSelectionRange) {
- npt.selectionStart = begin;
- npt.selectionEnd = android ? begin : end;
-
- } else if (npt.createTextRange) {
- range = npt.createTextRange();
- range.collapse(true);
- range.moveEnd('character', end);
- range.moveStart('character', begin);
- range.select();
- }
- } else {
- if (!$(input).is(':visible')) {
- return { "begin": 0, "end": 0 };
- }
- if (npt.setSelectionRange) {
- begin = npt.selectionStart;
- end = npt.selectionEnd;
- } else if (document.selection && document.selection.createRange) {
- range = document.selection.createRange();
- begin = 0 - range.duplicate().moveStart('character', -100000);
- end = begin + range.text.length;
- }
- begin = TranslatePosition(begin);
- end = TranslatePosition(end);
- return { "begin": begin, "end": end };
- }
- }
-
- function isComplete(buffer) { //return true / false / undefined (repeat *)
- if (opts.repeat == "*") return undefined;
- var complete = false, highestValidPosition = 0, currentActiveMasksetIndex = activeMasksetIndex;
- $.each(masksets, function (ndx, ms) {
- if (typeof (ms) == "object") {
- activeMasksetIndex = ndx;
- var aml = seekPrevious(getMaskLength());
- if (ms["lastValidPosition"] >= highestValidPosition && ms["lastValidPosition"] == aml) {
- var msComplete = true;
- for (var i = 0; i <= aml; i++) {
- var mask = isMask(i), testPos = determineTestPosition(i);
- if ((mask && (buffer[i] == undefined || buffer[i] == getPlaceHolder(i))) || (!mask && buffer[i] != getActiveBufferTemplate()[testPos])) {
- msComplete = false;
- break;
- }
- }
- complete = complete || msComplete;
- if (complete) //break loop
- return false;
- }
- highestValidPosition = ms["lastValidPosition"];
- }
- });
- activeMasksetIndex = currentActiveMasksetIndex; //reset activeMaskset
- return complete;
- }
-
- function isSelection(begin, end) {
- return isRTL ? (begin - end) > 1 || ((begin - end) == 1 && opts.insertMode) :
- (end - begin) > 1 || ((end - begin) == 1 && opts.insertMode);
- }
-
-
- //private functions
- function installEventRuler(npt) {
- var events = $._data(npt).events;
-
- $.each(events, function (eventType, eventHandlers) {
- $.each(eventHandlers, function (ndx, eventHandler) {
- if (eventHandler.namespace == "inputmask") {
- if (eventHandler.type != "setvalue") {
- var handler = eventHandler.handler;
- eventHandler.handler = function (e) {
- if (this.readOnly || this.disabled)
- e.preventDefault;
- else
- return handler.apply(this, arguments);
- };
- }
- }
- });
- });
- }
-
- function patchValueProperty(npt) {
- var valueProperty;
- if (Object.getOwnPropertyDescriptor)
- valueProperty = Object.getOwnPropertyDescriptor(npt, "value");
- if (valueProperty && valueProperty.get) {
- if (!npt._valueGet) {
- var valueGet = valueProperty.get;
- var valueSet = valueProperty.set;
- npt._valueGet = function () {
- return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this);
- };
- npt._valueSet = function (value) {
- valueSet.call(this, isRTL ? value.split('').reverse().join('') : value);
- };
-
- Object.defineProperty(npt, "value", {
- get: function () {
- var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'],
- activeMasksetIndex = inputData['activeMasksetIndex'];
- return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : '';
- },
- set: function (value) {
- valueSet.call(this, value);
- $(this).triggerHandler('setvalue.inputmask');
- }
- });
- }
- } else if (document.__lookupGetter__ && npt.__lookupGetter__("value")) {
- if (!npt._valueGet) {
- var valueGet = npt.__lookupGetter__("value");
- var valueSet = npt.__lookupSetter__("value");
- npt._valueGet = function () {
- return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this);
- };
- npt._valueSet = function (value) {
- valueSet.call(this, isRTL ? value.split('').reverse().join('') : value);
- };
-
- npt.__defineGetter__("value", function () {
- var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'],
- activeMasksetIndex = inputData['activeMasksetIndex'];
- return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : '';
- });
- npt.__defineSetter__("value", function (value) {
- valueSet.call(this, value);
- $(this).triggerHandler('setvalue.inputmask');
- });
- }
- } else {
- if (!npt._valueGet) {
- npt._valueGet = function () { return isRTL ? this.value.split('').reverse().join('') : this.value; };
- npt._valueSet = function (value) { this.value = isRTL ? value.split('').reverse().join('') : value; };
- }
- if ($.valHooks.text == undefined || $.valHooks.text.inputmaskpatch != true) {
- var valueGet = $.valHooks.text && $.valHooks.text.get ? $.valHooks.text.get : function (elem) { return elem.value; };
- var valueSet = $.valHooks.text && $.valHooks.text.set ? $.valHooks.text.set : function (elem, value) {
- elem.value = value;
- return elem;
- };
-
- jQuery.extend($.valHooks, {
- text: {
- get: function (elem) {
- var $elem = $(elem);
- if ($elem.data('_inputmask')) {
- if ($elem.data('_inputmask')['opts'].autoUnmask)
- return $elem.inputmask('unmaskedvalue');
- else {
- var result = valueGet(elem),
- inputData = $elem.data('_inputmask'), masksets = inputData['masksets'],
- activeMasksetIndex = inputData['activeMasksetIndex'];
- return result != masksets[activeMasksetIndex]['_buffer'].join('') ? result : '';
- }
- } else return valueGet(elem);
- },
- set: function (elem, value) {
- var $elem = $(elem);
- var result = valueSet(elem, value);
- if ($elem.data('_inputmask')) $elem.triggerHandler('setvalue.inputmask');
- return result;
- },
- inputmaskpatch: true
- }
- });
- }
- }
- }
-
- //shift chars to left from start to end and put c at end position if defined
-
- function shiftL(start, end, c, maskJumps) {
- var buffer = getActiveBuffer();
- if (maskJumps !== false) //jumping over nonmask position
- while (!isMask(start) && start - 1 >= 0) start--;
- for (var i = start; i < end && i < getMaskLength() ; i++) {
- if (isMask(i)) {
- setReTargetPlaceHolder(buffer, i);
- var j = seekNext(i);
- var p = getBufferElement(buffer, j);
- if (p != getPlaceHolder(j)) {
- if (j < getMaskLength() && isValid(i, p, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) {
- setBufferElement(buffer, i, p, true);
- } else {
- if (isMask(i))
- break;
- }
- }
- } else {
- setReTargetPlaceHolder(buffer, i);
- }
- }
- if (c != undefined)
- setBufferElement(buffer, seekPrevious(end), c);
-
- if (getActiveMaskSet()["greedy"] == false) {
- var trbuffer = truncateInput(buffer.join('')).split('');
- buffer.length = trbuffer.length;
- for (var i = 0, bl = buffer.length; i < bl; i++) {
- buffer[i] = trbuffer[i];
- }
- if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice();
- }
- return start; //return the used start position
- }
-
- function shiftR(start, end, c) {
- var buffer = getActiveBuffer();
- if (getBufferElement(buffer, start, true) != getPlaceHolder(start)) {
- for (var i = seekPrevious(end) ; i > start && i >= 0; i--) {
- if (isMask(i)) {
- var j = seekPrevious(i);
- var t = getBufferElement(buffer, j);
- if (t != getPlaceHolder(j)) {
- if (isValid(j, t, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) {
- setBufferElement(buffer, i, t, true);
- setReTargetPlaceHolder(buffer, j);
- } //else break;
- }
- } else
- setReTargetPlaceHolder(buffer, i);
- }
- }
- if (c != undefined && getBufferElement(buffer, start) == getPlaceHolder(start))
- setBufferElement(buffer, start, c);
- var lengthBefore = buffer.length;
- if (getActiveMaskSet()["greedy"] == false) {
- var trbuffer = truncateInput(buffer.join('')).split('');
- buffer.length = trbuffer.length;
- for (var i = 0, bl = buffer.length; i < bl; i++) {
- buffer[i] = trbuffer[i];
- }
- if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice();
- }
- return end - (lengthBefore - buffer.length); //return new start position
- }
-
- function HandleRemove(input, k, pos) {
- if (opts.numericInput || isRTL) {
- switch (k) {
- case opts.keyCode.BACKSPACE:
- k = opts.keyCode.DELETE;
- break;
- case opts.keyCode.DELETE:
- k = opts.keyCode.BACKSPACE;
- break;
- }
- if (isRTL) {
- var pend = pos.end;
- pos.end = pos.begin;
- pos.begin = pend;
- }
- }
-
- var isSelection = true;
- if (pos.begin == pos.end) {
- var posBegin = k == opts.keyCode.BACKSPACE ? pos.begin - 1 : pos.begin;
- if (opts.isNumeric && opts.radixPoint != "" && getActiveBuffer()[posBegin] == opts.radixPoint) {
- pos.begin = (getActiveBuffer().length - 1 == posBegin) /* radixPoint is latest? delete it */ ? pos.begin : k == opts.keyCode.BACKSPACE ? posBegin : seekNext(posBegin);
- pos.end = pos.begin;
- }
- isSelection = false;
- if (k == opts.keyCode.BACKSPACE)
- pos.begin--;
- else if (k == opts.keyCode.DELETE)
- pos.end++;
- } else if (pos.end - pos.begin == 1 && !opts.insertMode) {
- isSelection = false;
- if (k == opts.keyCode.BACKSPACE)
- pos.begin--;
- }
-
- clearBuffer(getActiveBuffer(), pos.begin, pos.end);
-
- var ml = getMaskLength();
- if (opts.greedy == false) {
- shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection));
- } else {
- var newpos = pos.begin;
- for (var i = pos.begin; i < pos.end; i++) { //seeknext to skip placeholders at start in selection
- if (isMask(i) || !isSelection)
- newpos = shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection));
- }
- if (!isSelection) pos.begin = newpos;
- }
- var firstMaskPos = seekNext(-1);
- clearBuffer(getActiveBuffer(), pos.begin, pos.end, true);
- checkVal(input, false, masksets[1] == undefined || firstMaskPos >= pos.end, getActiveBuffer());
- if (getActiveMaskSet()['lastValidPosition'] < firstMaskPos) {
- getActiveMaskSet()["lastValidPosition"] = -1;
- getActiveMaskSet()["p"] = firstMaskPos;
- } else {
- getActiveMaskSet()["p"] = pos.begin;
- }
- }
-
- function keydownEvent(e) {
- //Safari 5.1.x - modal dialog fires keypress twice workaround
- skipKeyPressEvent = false;
- var input = this, $input = $(input), k = e.keyCode, pos = caret(input);
-
- //backspace, delete, and escape get special treatment
- if (k == opts.keyCode.BACKSPACE || k == opts.keyCode.DELETE || (iphone && k == 127) || e.ctrlKey && k == 88) { //backspace/delete
- e.preventDefault(); //stop default action but allow propagation
- if (k == 88) valueOnFocus = getActiveBuffer().join('');
- HandleRemove(input, k, pos);
- determineActiveMasksetIndex();
- writeBuffer(input, getActiveBuffer(), getActiveMaskSet()["p"]);
- if (input._valueGet() == getActiveBufferTemplate().join(''))
- $input.trigger('cleared');
-
- if (opts.showTooltip) { //update tooltip
- $input.prop("title", getActiveMaskSet()["mask"]);
- }
- } else if (k == opts.keyCode.END || k == opts.keyCode.PAGE_DOWN) { //when END or PAGE_DOWN pressed set position at lastmatch
- setTimeout(function () {
- var caretPos = seekNext(getActiveMaskSet()["lastValidPosition"]);
- if (!opts.insertMode && caretPos == getMaskLength() && !e.shiftKey) caretPos--;
- caret(input, e.shiftKey ? pos.begin : caretPos, caretPos);
- }, 0);
- } else if ((k == opts.keyCode.HOME && !e.shiftKey) || k == opts.keyCode.PAGE_UP) { //Home or page_up
- caret(input, 0, e.shiftKey ? pos.begin : 0);
- } else if (k == opts.keyCode.ESCAPE || (k == 90 && e.ctrlKey)) { //escape && undo
- checkVal(input, true, false, valueOnFocus.split(''));
- $input.click();
- } else if (k == opts.keyCode.INSERT && !(e.shiftKey || e.ctrlKey)) { //insert
- opts.insertMode = !opts.insertMode;
- caret(input, !opts.insertMode && pos.begin == getMaskLength() ? pos.begin - 1 : pos.begin);
- } else if (opts.insertMode == false && !e.shiftKey) {
- if (k == opts.keyCode.RIGHT) {
- setTimeout(function () {
- var caretPos = caret(input);
- caret(input, caretPos.begin);
- }, 0);
- } else if (k == opts.keyCode.LEFT) {
- setTimeout(function () {
- var caretPos = caret(input);
- caret(input, caretPos.begin - 1);
- }, 0);
- }
- }
-
- var currentCaretPos = caret(input);
- if (opts.onKeyDown.call(this, e, getActiveBuffer(), opts) === true) //extra stuff to execute on keydown
- caret(input, currentCaretPos.begin, currentCaretPos.end);
- ignorable = $.inArray(k, opts.ignorables) != -1;
- }
-
-
- function keypressEvent(e, checkval, k, writeOut, strict, ndx) {
- //Safari 5.1.x - modal dialog fires keypress twice workaround
- if (k == undefined && skipKeyPressEvent) return false;
- skipKeyPressEvent = true;
-
- var input = this, $input = $(input);
-
- e = e || window.event;
- var k = checkval ? k : (e.which || e.charCode || e.keyCode);
-
- if (checkval !== true && (!(e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable))) {
- return true;
- } else {
- if (k) {
- //special treat the decimal separator
- if (checkval !== true && k == 46 && e.shiftKey == false && opts.radixPoint == ",") k = 44;
-
- var pos, results, result, c = String.fromCharCode(k);
- if (checkval) {
- var pcaret = strict ? ndx : getActiveMaskSet()["lastValidPosition"] + 1;
- pos = { begin: pcaret, end: pcaret };
- } else {
- pos = caret(input);
- }
-
- //should we clear a possible selection??
- var isSlctn = isSelection(pos.begin, pos.end), redetermineLVP = false,
- initialIndex = activeMasksetIndex;
- if (isSlctn) {
- activeMasksetIndex = initialIndex;
- $.each(masksets, function (ndx, lmnt) { //init undobuffer for recovery when not valid
- if (typeof (lmnt) == "object") {
- activeMasksetIndex = ndx;
- getActiveMaskSet()["undoBuffer"] = getActiveBuffer().join('');
- }
- });
- HandleRemove(input, opts.keyCode.DELETE, pos);
- if (!opts.insertMode) { //preserve some space
- $.each(masksets, function (ndx, lmnt) {
- if (typeof (lmnt) == "object") {
- activeMasksetIndex = ndx;
- shiftR(pos.begin, getMaskLength());
- getActiveMaskSet()["lastValidPosition"] = seekNext(getActiveMaskSet()["lastValidPosition"]);
- }
- });
- }
- activeMasksetIndex = initialIndex; //restore index
- }
-
- var radixPosition = getActiveBuffer().join('').indexOf(opts.radixPoint);
- if (opts.isNumeric && checkval !== true && radixPosition != -1) {
- if (opts.greedy && pos.begin <= radixPosition) {
- pos.begin = seekPrevious(pos.begin);
- pos.end = pos.begin;
- } else if (c == opts.radixPoint) {
- pos.begin = radixPosition;
- pos.end = pos.begin;
- }
- }
-
-
- var p = pos.begin;
- results = isValid(p, c, strict);
- if (strict === true) results = [{ "activeMasksetIndex": activeMasksetIndex, "result": results }];
- var minimalForwardPosition = -1;
- $.each(results, function (index, result) {
- activeMasksetIndex = result["activeMasksetIndex"];
- getActiveMaskSet()["writeOutBuffer"] = true;
- var np = result["result"];
- if (np !== false) {
- var refresh = false, buffer = getActiveBuffer();
- if (np !== true) {
- refresh = np["refresh"]; //only rewrite buffer from isValid
- p = np.pos != undefined ? np.pos : p; //set new position from isValid
- c = np.c != undefined ? np.c : c; //set new char from isValid
- }
- if (refresh !== true) {
- if (opts.insertMode == true) {
- var lastUnmaskedPosition = getMaskLength();
- var bfrClone = buffer.slice();
- while (getBufferElement(bfrClone, lastUnmaskedPosition, true) != getPlaceHolder(lastUnmaskedPosition) && lastUnmaskedPosition >= p) {
- lastUnmaskedPosition = lastUnmaskedPosition == 0 ? -1 : seekPrevious(lastUnmaskedPosition);
- }
- if (lastUnmaskedPosition >= p) {
- shiftR(p, getMaskLength(), c);
- //shift the lvp if needed
- var lvp = getActiveMaskSet()["lastValidPosition"], nlvp = seekNext(lvp);
- if (nlvp != getMaskLength() && lvp >= p && (getBufferElement(getActiveBuffer(), nlvp, true) != getPlaceHolder(nlvp))) {
- getActiveMaskSet()["lastValidPosition"] = nlvp;
- }
- } else getActiveMaskSet()["writeOutBuffer"] = false;
- } else setBufferElement(buffer, p, c, true);
- if (minimalForwardPosition == -1 || minimalForwardPosition > seekNext(p)) {
- minimalForwardPosition = seekNext(p);
- }
- } else if (!strict) {
- var nextPos = p < getMaskLength() ? p + 1 : p;
- if (minimalForwardPosition == -1 || minimalForwardPosition > nextPos) {
- minimalForwardPosition = nextPos;
- }
- }
- if (minimalForwardPosition > getActiveMaskSet()["p"])
- getActiveMaskSet()["p"] = minimalForwardPosition; //needed for checkval strict
- }
- });
-
- if (strict !== true) {
- activeMasksetIndex = initialIndex;
- determineActiveMasksetIndex();
- }
- if (writeOut !== false) {
- $.each(results, function (ndx, rslt) {
- if (rslt["activeMasksetIndex"] == activeMasksetIndex) {
- result = rslt;
- return false;
- }
- });
- if (result != undefined) {
- var self = this;
- setTimeout(function () { opts.onKeyValidation.call(self, result["result"], opts); }, 0);
- if (getActiveMaskSet()["writeOutBuffer"] && result["result"] !== false) {
- var buffer = getActiveBuffer();
-
- var newCaretPosition;
- if (checkval) {
- newCaretPosition = undefined;
- } else if (opts.numericInput) {
- if (p > radixPosition) {
- newCaretPosition = seekPrevious(minimalForwardPosition);
- } else if (c == opts.radixPoint) {
- newCaretPosition = minimalForwardPosition - 1;
- } else newCaretPosition = seekPrevious(minimalForwardPosition - 1);
- } else {
- newCaretPosition = minimalForwardPosition;
- }
-
- writeBuffer(input, buffer, newCaretPosition);
- if (checkval !== true) {
- setTimeout(function () { //timeout needed for IE
- if (isComplete(buffer) === true)
- $input.trigger("complete");
- skipInputEvent = true;
- $input.trigger("input");
- }, 0);
- }
- } else if (isSlctn) {
- getActiveMaskSet()["buffer"] = getActiveMaskSet()["undoBuffer"].split('');
- }
- }
- }
-
- if (opts.showTooltip) { //update tooltip
- $input.prop("title", getActiveMaskSet()["mask"]);
- }
-
- //needed for IE8 and below
- if (e) e.preventDefault ? e.preventDefault() : e.returnValue = false;
- }
- }
- }
-
- function keyupEvent(e) {
- var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
-
- if (androidchrome && k == opts.keyCode.BACKSPACE) {
- if (chromeValueOnInput == input._valueGet())
- keydownEvent.call(this, e);
- }
-
- opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup
- if (k == opts.keyCode.TAB && opts.showMaskOnFocus) {
- if ($input.hasClass('focus.inputmask') && input._valueGet().length == 0) {
- buffer = getActiveBufferTemplate().slice();
- writeBuffer(input, buffer);
- caret(input, 0);
- valueOnFocus = getActiveBuffer().join('');
- } else {
- writeBuffer(input, buffer);
- if (buffer.join('') == getActiveBufferTemplate().join('') && $.inArray(opts.radixPoint, buffer) != -1) {
- caret(input, TranslatePosition(0));
- $input.click();
- } else
- caret(input, TranslatePosition(0), TranslatePosition(getMaskLength()));
- }
- }
- }
-
- function inputEvent(e) {
- if (skipInputEvent === true) {
- skipInputEvent = false;
- return true;
- }
- var input = this, $input = $(input);
-
- chromeValueOnInput = getActiveBuffer().join('');
- checkVal(input, false, false);
- writeBuffer(input, getActiveBuffer());
- if (isComplete(getActiveBuffer()) === true)
- $input.trigger("complete");
- $input.click();
- }
-
- function mask(el) {
- $el = $(el);
- if ($el.is(":input")) {
- //store tests & original buffer in the input element - used to get the unmasked value
- $el.data('_inputmask', {
- 'masksets': masksets,
- 'activeMasksetIndex': activeMasksetIndex,
- 'opts': opts,
- 'isRTL': false
- });
-
- //show tooltip
- if (opts.showTooltip) {
- $el.prop("title", getActiveMaskSet()["mask"]);
- }
-
- //correct greedy setting if needed
- getActiveMaskSet()['greedy'] = getActiveMaskSet()['greedy'] ? getActiveMaskSet()['greedy'] : getActiveMaskSet()['repeat'] == 0;
-
- //handle maxlength attribute
- if ($el.attr("maxLength") != null) //only when the attribute is set
- {
- var maxLength = $el.prop('maxLength');
- if (maxLength > -1) { //handle *-repeat
- $.each(masksets, function (ndx, ms) {
- if (typeof (ms) == "object") {
- if (ms["repeat"] == "*") {
- ms["repeat"] = maxLength;
- }
- }
- });
- }
- if (getMaskLength() >= maxLength && maxLength > -1) { //FF sets no defined max length to -1
- if (maxLength < getActiveBufferTemplate().length) getActiveBufferTemplate().length = maxLength;
- if (getActiveMaskSet()['greedy'] == false) {
- getActiveMaskSet()['repeat'] = Math.round(maxLength / getActiveBufferTemplate().length);
- }
- $el.prop('maxLength', getMaskLength() * 2);
- }
- }
-
- patchValueProperty(el);
-
- if (opts.numericInput) opts.isNumeric = opts.numericInput;
- if (el.dir == "rtl" || (opts.numericInput && opts.rightAlignNumerics) || (opts.isNumeric && opts.rightAlignNumerics))
- $el.css("text-align", "right");
-
- if (el.dir == "rtl" || opts.numericInput) {
- el.dir = "ltr";
- $el.removeAttr("dir");
- var inputData = $el.data('_inputmask');
- inputData['isRTL'] = true;
- $el.data('_inputmask', inputData);
- isRTL = true;
- }
-
- //unbind all events - to make sure that no other mask will interfere when re-masking
- $el.unbind(".inputmask");
- $el.removeClass('focus.inputmask');
- //bind events
- $el.closest('form').bind("submit", function () { //trigger change on submit if any
- if (valueOnFocus != getActiveBuffer().join('')) {
- $el.change();
- }
- }).bind('reset', function () {
- setTimeout(function () {
- $el.trigger("setvalue");
- }, 0);
- });
- $el.bind("mouseenter.inputmask", function () {
- var $input = $(this), input = this;
- if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {
- if (input._valueGet() != getActiveBuffer().join('')) {
- writeBuffer(input, getActiveBuffer());
- }
- }
- }).bind("blur.inputmask", function () {
- var $input = $(this), input = this, nptValue = input._valueGet(), buffer = getActiveBuffer();
- $input.removeClass('focus.inputmask');
- if (valueOnFocus != getActiveBuffer().join('')) {
- $input.change();
- }
- if (opts.clearMaskOnLostFocus && nptValue != '') {
- if (nptValue == getActiveBufferTemplate().join(''))
- input._valueSet('');
- else { //clearout optional tail of the mask
- clearOptionalTail(input);
- }
- }
- if (isComplete(buffer) === false) {
- $input.trigger("incomplete");
- if (opts.clearIncomplete) {
- $.each(masksets, function (ndx, ms) {
- if (typeof (ms) == "object") {
- ms["buffer"] = ms["_buffer"].slice();
- ms["lastValidPosition"] = -1;
- }
- });
- activeMasksetIndex = 0;
- if (opts.clearMaskOnLostFocus)
- input._valueSet('');
- else {
- buffer = getActiveBufferTemplate().slice();
- writeBuffer(input, buffer);
- }
- }
- }
- }).bind("focus.inputmask", function () {
- var $input = $(this), input = this, nptValue = input._valueGet();
- if (opts.showMaskOnFocus && !$input.hasClass('focus.inputmask') && (!opts.showMaskOnHover || (opts.showMaskOnHover && nptValue == ''))) {
- if (input._valueGet() != getActiveBuffer().join('')) {
- writeBuffer(input, getActiveBuffer(), seekNext(getActiveMaskSet()["lastValidPosition"]));
- }
- }
- $input.addClass('focus.inputmask');
- valueOnFocus = getActiveBuffer().join('');
- }).bind("mouseleave.inputmask", function () {
- var $input = $(this), input = this;
- if (opts.clearMaskOnLostFocus) {
- if (!$input.hasClass('focus.inputmask') && input._valueGet() != $input.attr("placeholder")) {
- if (input._valueGet() == getActiveBufferTemplate().join('') || input._valueGet() == '')
- input._valueSet('');
- else { //clearout optional tail of the mask
- clearOptionalTail(input);
- }
- }
- }
- }).bind("click.inputmask", function () {
- var input = this;
- setTimeout(function () {
- var selectedCaret = caret(input), buffer = getActiveBuffer();
- if (selectedCaret.begin == selectedCaret.end) {
- var clickPosition = isRTL ? TranslatePosition(selectedCaret.begin) : selectedCaret.begin,
- lvp = getActiveMaskSet()["lastValidPosition"],
- lastPosition;
- if (opts.isNumeric) {
- lastPosition = opts.skipRadixDance === false && opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 ?
- (opts.numericInput ? seekNext($.inArray(opts.radixPoint, buffer)) : $.inArray(opts.radixPoint, buffer)) :
- seekNext(lvp);
- } else {
- lastPosition = seekNext(lvp);
- }
- if (clickPosition < lastPosition) {
- if (isMask(clickPosition))
- caret(input, clickPosition);
- else caret(input, seekNext(clickPosition));
- } else
- caret(input, lastPosition);
- }
- }, 0);
- }).bind('dblclick.inputmask', function () {
- var input = this;
- setTimeout(function () {
- caret(input, 0, seekNext(getActiveMaskSet()["lastValidPosition"]));
- }, 0);
- }).bind(pasteEvent + ".inputmask dragdrop.inputmask drop.inputmask", function (e) {
- if (skipInputEvent === true) {
- skipInputEvent = false;
- return true;
- }
- var input = this, $input = $(input);
-
- //paste event for IE8 and lower I guess ;-)
- if (e.type == "propertychange" && input._valueGet().length <= getMaskLength()) {
- return true;
- }
- setTimeout(function () {
- var pasteValue = opts.onBeforePaste != undefined ? opts.onBeforePaste.call(this, input._valueGet()) : input._valueGet();
- checkVal(input, true, false, pasteValue.split(''), true);
- if (isComplete(getActiveBuffer()) === true)
- $input.trigger("complete");
- $input.click();
- }, 0);
- }).bind('setvalue.inputmask', function () {
- var input = this;
- checkVal(input, true);
- valueOnFocus = getActiveBuffer().join('');
- if (input._valueGet() == getActiveBufferTemplate().join(''))
- input._valueSet('');
- }).bind('complete.inputmask', opts.oncomplete
- ).bind('incomplete.inputmask', opts.onincomplete
- ).bind('cleared.inputmask', opts.oncleared
- ).bind("keyup.inputmask", keyupEvent);
-
- if (androidchrome) {
- $el.bind("input.inputmask", inputEvent);
- } else {
- $el.bind("keydown.inputmask", keydownEvent
- ).bind("keypress.inputmask", keypressEvent);
- }
-
- if (msie10)
- $el.bind("input.inputmask", inputEvent);
-
- //apply mask
- checkVal(el, true, false);
- valueOnFocus = getActiveBuffer().join('');
- // Wrap document.activeElement in a try/catch block since IE9 throw "Unspecified error" if document.activeElement is undefined when we are in an IFrame.
- var activeElement;
- try {
- activeElement = document.activeElement;
- } catch (e) {
- }
- if (activeElement === el) { //position the caret when in focus
- $el.addClass('focus.inputmask');
- caret(el, seekNext(getActiveMaskSet()["lastValidPosition"]));
- } else if (opts.clearMaskOnLostFocus) {
- if (getActiveBuffer().join('') == getActiveBufferTemplate().join('')) {
- el._valueSet('');
- } else {
- clearOptionalTail(el);
- }
- } else {
- writeBuffer(el, getActiveBuffer());
- }
-
- installEventRuler(el);
- }
- }
-
- //action object
- if (actionObj != undefined) {
- switch (actionObj["action"]) {
- case "isComplete":
- return isComplete(actionObj["buffer"]);
- case "unmaskedvalue":
- isRTL = actionObj["$input"].data('_inputmask')['isRTL'];
- return unmaskedvalue(actionObj["$input"], actionObj["skipDatepickerCheck"]);
- case "mask":
- mask(actionObj["el"]);
- break;
- case "format":
- $el = $({});
- $el.data('_inputmask', {
- 'masksets': masksets,
- 'activeMasksetIndex': activeMasksetIndex,
- 'opts': opts,
- 'isRTL': opts.numericInput
- });
- if (opts.numericInput) {
- opts.isNumeric = opts.numericInput;
- isRTL = true;
- }
-
- checkVal($el, false, false, actionObj["value"].split(''), true);
- return getActiveBuffer().join('');
- }
- }
- }
- $.inputmask = {
- //options default
- defaults: {
- placeholder: "_",
- optionalmarker: { start: "[", end: "]" },
- quantifiermarker: { start: "{", end: "}" },
- groupmarker: { start: "(", end: ")" },
- escapeChar: "\\",
- mask: null,
- oncomplete: $.noop, //executes when the mask is complete
- onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
- oncleared: $.noop, //executes when the mask is cleared
- repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer
- greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
- autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
- clearMaskOnLostFocus: true,
- insertMode: true, //insert the input or overwrite the input
- clearIncomplete: false, //clear the incomplete input on blur
- aliases: {}, //aliases definitions => see jquery.inputmask.extensions.js
- onKeyUp: $.noop, //override to implement autocomplete on certain keys for example
- onKeyDown: $.noop, //override to implement autocomplete on certain keys for example
- onBeforePaste: undefined, //executes before masking the pasted value to allow preprocessing of the pasted value. args => pastedValue => return processedValue
- onUnMask: undefined, //executes after unmasking to allow postprocessing of the unmaskedvalue. args => maskedValue, unmaskedValue
- showMaskOnFocus: true, //show the mask-placeholder when the input has focus
- showMaskOnHover: true, //show the mask-placeholder when hovering the empty input
- onKeyValidation: $.noop, //executes on every key-press with the result of isValid. Params: result, opts
- skipOptionalPartCharacter: " ", //a character which can be used to skip an optional part of a mask
- showTooltip: false, //show the activemask as tooltip
- numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position)
- //numeric basic properties
- isNumeric: false, //enable numeric features
- radixPoint: "", //".", // | ","
- skipRadixDance: false, //disable radixpoint caret positioning
- rightAlignNumerics: true, //align numerics to the right
- //numeric basic properties
- definitions: {
- '9': {
- validator: "[0-9]",
- cardinality: 1
- },
- 'a': {
- validator: "[A-Za-z\u0410-\u044F\u0401\u0451]",
- cardinality: 1
- },
- '*': {
- validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]",
- cardinality: 1
- }
- },
- keyCode: {
- ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91
- },
- //specify keycodes which should not be considered in the keypress event, otherwise the preventDefault will stop their default behavior especially in FF
- ignorables: [8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123],
- getMaskLength: function (buffer, greedy, repeat, currentBuffer, opts) {
- var calculatedLength = buffer.length;
- if (!greedy) {
- if (repeat == "*") {
- calculatedLength = currentBuffer.length + 1;
- } else if (repeat > 1) {
- calculatedLength += (buffer.length * (repeat - 1));
- }
- }
- return calculatedLength;
- }
- },
- escapeRegex: function (str) {
- var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
- return str.replace(new RegExp('(\\' + specials.join('|\\') + ')', 'gim'), '\\$1');
- },
- format: function (value, options) {
- var opts = $.extend(true, {}, $.inputmask.defaults, options);
- resolveAlias(opts.alias, options, opts);
- return maskScope(generateMaskSets(opts), 0, opts, { "action": "format", "value": value });
- }
- };
-
- $.fn.inputmask = function (fn, options) {
- var opts = $.extend(true, {}, $.inputmask.defaults, options),
- masksets,
- activeMasksetIndex = 0;
-
- if (typeof fn === "string") {
- switch (fn) {
- case "mask":
- //resolve possible aliases given by options
- resolveAlias(opts.alias, options, opts);
- masksets = generateMaskSets(opts);
- if (masksets.length == 0) { return this; }
-
- return this.each(function () {
- maskScope($.extend(true, {}, masksets), 0, opts, { "action": "mask", "el": this });
- });
- case "unmaskedvalue":
- var $input = $(this), input = this;
- if ($input.data('_inputmask')) {
- masksets = $input.data('_inputmask')['masksets'];
- activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex'];
- opts = $input.data('_inputmask')['opts'];
- return maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input });
- } else return $input.val();
- case "remove":
- return this.each(function () {
- var $input = $(this), input = this;
- if ($input.data('_inputmask')) {
- masksets = $input.data('_inputmask')['masksets'];
- activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex'];
- opts = $input.data('_inputmask')['opts'];
- //writeout the unmaskedvalue
- input._valueSet(maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input, "skipDatepickerCheck": true }));
- //clear data
- $input.removeData('_inputmask');
- //unbind all events
- $input.unbind(".inputmask");
- $input.removeClass('focus.inputmask');
- //restore the value property
- var valueProperty;
- if (Object.getOwnPropertyDescriptor)
- valueProperty = Object.getOwnPropertyDescriptor(input, "value");
- if (valueProperty && valueProperty.get) {
- if (input._valueGet) {
- Object.defineProperty(input, "value", {
- get: input._valueGet,
- set: input._valueSet
- });
- }
- } else if (document.__lookupGetter__ && input.__lookupGetter__("value")) {
- if (input._valueGet) {
- input.__defineGetter__("value", input._valueGet);
- input.__defineSetter__("value", input._valueSet);
- }
- }
- try { //try catch needed for IE7 as it does not supports deleting fns
- delete input._valueGet;
- delete input._valueSet;
- } catch (e) {
- input._valueGet = undefined;
- input._valueSet = undefined;
-
- }
- }
- });
- break;
- case "getemptymask": //return the default (empty) mask value, usefull for setting the default value in validation
- if (this.data('_inputmask')) {
- masksets = this.data('_inputmask')['masksets'];
- activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
- return masksets[activeMasksetIndex]['_buffer'].join('');
- }
- else return "";
- case "hasMaskedValue": //check wheter the returned value is masked or not; currently only works reliable when using jquery.val fn to retrieve the value
- return this.data('_inputmask') ? !this.data('_inputmask')['opts'].autoUnmask : false;
- case "isComplete":
- masksets = this.data('_inputmask')['masksets'];
- activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
- opts = this.data('_inputmask')['opts'];
- return maskScope(masksets, activeMasksetIndex, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') });
- case "getmetadata": //return mask metadata if exists
- if (this.data('_inputmask')) {
- masksets = this.data('_inputmask')['masksets'];
- activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
- return masksets[activeMasksetIndex]['metadata'];
- }
- else return undefined;
- default:
- //check if the fn is an alias
- if (!resolveAlias(fn, options, opts)) {
- //maybe fn is a mask so we try
- //set mask
- opts.mask = fn;
- }
- masksets = generateMaskSets(opts);
- if (masksets.length == 0) { return this; }
- return this.each(function () {
- maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this });
- });
-
- break;
- }
- } else if (typeof fn == "object") {
- opts = $.extend(true, {}, $.inputmask.defaults, fn);
-
- resolveAlias(opts.alias, fn, opts); //resolve aliases
- masksets = generateMaskSets(opts);
- if (masksets.length == 0) { return this; }
- return this.each(function () {
- maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this });
- });
- } else if (fn == undefined) {
- //look for data-inputmask atribute - the attribute should only contain optipns
- return this.each(function () {
- var attrOptions = $(this).attr("data-inputmask");
- if (attrOptions && attrOptions != "") {
- try {
- attrOptions = attrOptions.replace(new RegExp("'", "g"), '"');
- var dataoptions = $.parseJSON("{" + attrOptions + "}");
- $.extend(true, dataoptions, options);
- opts = $.extend(true, {}, $.inputmask.defaults, dataoptions);
- resolveAlias(opts.alias, dataoptions, opts);
- opts.alias = undefined;
- $(this).inputmask(opts);
- } catch (ex) { } //need a more relax parseJSON
- }
- });
- }
- };
- }
-})(jQuery);
diff --git a/html/plugins/input-mask/jquery.inputmask.numeric.extensions.js b/html/plugins/input-mask/jquery.inputmask.numeric.extensions.js
deleted file mode 100644
index 2efb33f4..00000000
--- a/html/plugins/input-mask/jquery.inputmask.numeric.extensions.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-Input Mask plugin extensions
-http://github.com/RobinHerbots/jquery.inputmask
-Copyright (c) 2010 - 2014 Robin Herbots
-Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.0.0
-
-Optional extensions on the jquery.inputmask base
-*/
-(function ($) {
- //number aliases
- $.extend($.inputmask.defaults.aliases, {
- 'decimal': {
- mask: "~",
- placeholder: "",
- repeat: "*",
- greedy: false,
- numericInput: false,
- isNumeric: true,
- digits: "*", //number of fractionalDigits
- groupSeparator: "",//",", // | "."
- radixPoint: ".",
- groupSize: 3,
- autoGroup: false,
- allowPlus: true,
- allowMinus: true,
- //todo
- integerDigits: "*", //number of integerDigits
- defaultValue: "",
- prefix: "",
- suffix: "",
-
- //todo
- getMaskLength: function (buffer, greedy, repeat, currentBuffer, opts) { //custom getMaskLength to take the groupSeparator into account
- var calculatedLength = buffer.length;
-
- if (!greedy) {
- if (repeat == "*") {
- calculatedLength = currentBuffer.length + 1;
- } else if (repeat > 1) {
- calculatedLength += (buffer.length * (repeat - 1));
- }
- }
-
- var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
- var escapedRadixPoint = $.inputmask.escapeRegex.call(this, opts.radixPoint);
- var currentBufferStr = currentBuffer.join(''), strippedBufferStr = currentBufferStr.replace(new RegExp(escapedGroupSeparator, "g"), "").replace(new RegExp(escapedRadixPoint), ""),
- groupOffset = currentBufferStr.length - strippedBufferStr.length;
- return calculatedLength + groupOffset;
- },
- postFormat: function (buffer, pos, reformatOnly, opts) {
- if (opts.groupSeparator == "") return pos;
- var cbuf = buffer.slice(),
- radixPos = $.inArray(opts.radixPoint, buffer);
- if (!reformatOnly) {
- cbuf.splice(pos, 0, "?"); //set position indicator
- }
- var bufVal = cbuf.join('');
- if (opts.autoGroup || (reformatOnly && bufVal.indexOf(opts.groupSeparator) != -1)) {
- var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
- bufVal = bufVal.replace(new RegExp(escapedGroupSeparator, "g"), '');
- var radixSplit = bufVal.split(opts.radixPoint);
- bufVal = radixSplit[0];
- var reg = new RegExp('([-\+]?[\\d\?]+)([\\d\?]{' + opts.groupSize + '})');
- while (reg.test(bufVal)) {
- bufVal = bufVal.replace(reg, '$1' + opts.groupSeparator + '$2');
- bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator);
- }
- if (radixSplit.length > 1)
- bufVal += opts.radixPoint + radixSplit[1];
- }
- buffer.length = bufVal.length; //align the length
- for (var i = 0, l = bufVal.length; i < l; i++) {
- buffer[i] = bufVal.charAt(i);
- }
- var newPos = $.inArray("?", buffer);
- if (!reformatOnly) buffer.splice(newPos, 1);
-
- return reformatOnly ? pos : newPos;
- },
- regex: {
- number: function (opts) {
- var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
- var escapedRadixPoint = $.inputmask.escapeRegex.call(this, opts.radixPoint);
- var digitExpression = isNaN(opts.digits) ? opts.digits : '{0,' + opts.digits + '}';
- var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "\+" : "") + (opts.allowMinus ? "-" : "") + "]?" : "";
- return new RegExp("^" + signedExpression + "(\\d+|\\d{1," + opts.groupSize + "}((" + escapedGroupSeparator + "\\d{" + opts.groupSize + "})?)+)(" + escapedRadixPoint + "\\d" + digitExpression + ")?$");
- }
- },
- onKeyDown: function (e, buffer, opts) {
- var $input = $(this), input = this;
- if (e.keyCode == opts.keyCode.TAB) {
- var radixPosition = $.inArray(opts.radixPoint, buffer);
- if (radixPosition != -1) {
- var masksets = $input.data('_inputmask')['masksets'];
- var activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex'];
- for (var i = 1; i <= opts.digits && i < opts.getMaskLength(masksets[activeMasksetIndex]["_buffer"], masksets[activeMasksetIndex]["greedy"], masksets[activeMasksetIndex]["repeat"], buffer, opts) ; i++) {
- if (buffer[radixPosition + i] == undefined || buffer[radixPosition + i] == "") buffer[radixPosition + i] = "0";
- }
- input._valueSet(buffer.join(''));
- }
- } else if (e.keyCode == opts.keyCode.DELETE || e.keyCode == opts.keyCode.BACKSPACE) {
- opts.postFormat(buffer, 0, true, opts);
- input._valueSet(buffer.join(''));
- return true;
- }
- },
- definitions: {
- '~': { //real number
- validator: function (chrs, buffer, pos, strict, opts) {
- if (chrs == "") return false;
- if (!strict && pos <= 1 && buffer[0] === '0' && new RegExp("[\\d-]").test(chrs) && buffer.join('').length == 1) { //handle first char
- buffer[0] = "";
- return { "pos": 0 };
- }
-
- var cbuf = strict ? buffer.slice(0, pos) : buffer.slice();
-
- cbuf.splice(pos, 0, chrs);
- var bufferStr = cbuf.join('');
-
- //strip groupseparator
- var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
- bufferStr = bufferStr.replace(new RegExp(escapedGroupSeparator, "g"), '');
-
- var isValid = opts.regex.number(opts).test(bufferStr);
- if (!isValid) {
- //let's help the regex a bit
- bufferStr += "0";
- isValid = opts.regex.number(opts).test(bufferStr);
- if (!isValid) {
- //make a valid group
- var lastGroupSeparator = bufferStr.lastIndexOf(opts.groupSeparator);
- for (var i = bufferStr.length - lastGroupSeparator; i <= 3; i++) {
- bufferStr += "0";
- }
-
- isValid = opts.regex.number(opts).test(bufferStr);
- if (!isValid && !strict) {
- if (chrs == opts.radixPoint) {
- isValid = opts.regex.number(opts).test("0" + bufferStr + "0");
- if (isValid) {
- buffer[pos] = "0";
- pos++;
- return { "pos": pos };
- }
- }
- }
- }
- }
-
- if (isValid != false && !strict && chrs != opts.radixPoint) {
- var newPos = opts.postFormat(buffer, pos, false, opts);
- return { "pos": newPos };
- }
-
- return isValid;
- },
- cardinality: 1,
- prevalidator: null
- }
- },
- insertMode: true,
- autoUnmask: false
- },
- 'integer': {
- regex: {
- number: function (opts) {
- var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
- var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "\+" : "") + (opts.allowMinus ? "-" : "") + "]?" : "";
- return new RegExp("^" + signedExpression + "(\\d+|\\d{1," + opts.groupSize + "}((" + escapedGroupSeparator + "\\d{" + opts.groupSize + "})?)+)$");
- }
- },
- alias: "decimal"
- }
- });
-})(jQuery);
diff --git a/html/plugins/input-mask/jquery.inputmask.phone.extensions.js b/html/plugins/input-mask/jquery.inputmask.phone.extensions.js
deleted file mode 100644
index 554d4ef1..00000000
--- a/html/plugins/input-mask/jquery.inputmask.phone.extensions.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-Input Mask plugin extensions
-http://github.com/RobinHerbots/jquery.inputmask
-Copyright (c) 2010 - 2014 Robin Herbots
-Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.0.0
-
-Phone extension.
-When using this extension make sure you specify the correct url to get the masks
-
- $(selector).inputmask("phone", {
- url: "Scripts/jquery.inputmask/phone-codes/phone-codes.json",
- onKeyValidation: function () { //show some metadata in the console
- console.log($(this).inputmask("getmetadata")["name_en"]);
- }
- });
-
-
-*/
-(function ($) {
- $.extend($.inputmask.defaults.aliases, {
- 'phone': {
- url: "phone-codes/phone-codes.json",
- mask: function (opts) {
- opts.definitions = {
- 'p': {
- validator: function () { return false; },
- cardinality: 1
- },
- '#': {
- validator: "[0-9]",
- cardinality: 1
- }
- };
- var maskList = [];
- $.ajax({
- url: opts.url,
- async: false,
- dataType: 'json',
- success: function (response) {
- maskList = response;
- }
- });
-
- maskList.splice(0, 0, "+p(ppp)ppp-pppp");
- return maskList;
- }
- }
- });
-})(jQuery);
diff --git a/html/plugins/input-mask/jquery.inputmask.regex.extensions.js b/html/plugins/input-mask/jquery.inputmask.regex.extensions.js
deleted file mode 100644
index e956569b..00000000
--- a/html/plugins/input-mask/jquery.inputmask.regex.extensions.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-Input Mask plugin extensions
-http://github.com/RobinHerbots/jquery.inputmask
-Copyright (c) 2010 - 2014 Robin Herbots
-Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.0.0
-
-Regex extensions on the jquery.inputmask base
-Allows for using regular expressions as a mask
-*/
-(function ($) {
- $.extend($.inputmask.defaults.aliases, { // $(selector).inputmask("Regex", { regex: "[0-9]*"}
- 'Regex': {
- mask: "r",
- greedy: false,
- repeat: "*",
- regex: null,
- regexTokens: null,
- //Thx to https://github.com/slevithan/regex-colorizer for the tokenizer regex
- tokenizer: /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,
- quantifierFilter: /[0-9]+[^,]/,
- definitions: {
- 'r': {
- validator: function (chrs, buffer, pos, strict, opts) {
- function regexToken() {
- this.matches = [];
- this.isGroup = false;
- this.isQuantifier = false;
- this.isLiteral = false;
- }
- function analyseRegex() {
- var currentToken = new regexToken(), match, m, opengroups = [];
-
- opts.regexTokens = [];
-
- // The tokenizer regex does most of the tokenization grunt work
- while (match = opts.tokenizer.exec(opts.regex)) {
- m = match[0];
- switch (m.charAt(0)) {
- case "[": // Character class
- case "\\": // Escape or backreference
- if (opengroups.length > 0) {
- opengroups[opengroups.length - 1]["matches"].push(m);
- } else {
- currentToken.matches.push(m);
- }
- break;
- case "(": // Group opening
- if (!currentToken.isGroup && currentToken.matches.length > 0)
- opts.regexTokens.push(currentToken);
- currentToken = new regexToken();
- currentToken.isGroup = true;
- opengroups.push(currentToken);
- break;
- case ")": // Group closing
- var groupToken = opengroups.pop();
- if (opengroups.length > 0) {
- opengroups[opengroups.length - 1]["matches"].push(groupToken);
- } else {
- opts.regexTokens.push(groupToken);
- currentToken = new regexToken();
- }
- break;
- case "{": //Quantifier
- var quantifier = new regexToken();
- quantifier.isQuantifier = true;
- quantifier.matches.push(m);
- if (opengroups.length > 0) {
- opengroups[opengroups.length - 1]["matches"].push(quantifier);
- } else {
- currentToken.matches.push(quantifier);
- }
- break;
- default:
- // Vertical bar (alternator)
- // ^ or $ anchor
- // Dot (.)
- // Literal character sequence
- var literal = new regexToken();
- literal.isLiteral = true;
- literal.matches.push(m);
- if (opengroups.length > 0) {
- opengroups[opengroups.length - 1]["matches"].push(literal);
- } else {
- currentToken.matches.push(literal);
- }
- }
- }
-
- if (currentToken.matches.length > 0)
- opts.regexTokens.push(currentToken);
- }
- function validateRegexToken(token, fromGroup) {
- var isvalid = false;
- if (fromGroup) {
- regexPart += "(";
- openGroupCount++;
- }
- for (var mndx = 0; mndx < token["matches"].length; mndx++) {
- var matchToken = token["matches"][mndx];
- if (matchToken["isGroup"] == true) {
- isvalid = validateRegexToken(matchToken, true);
- } else if (matchToken["isQuantifier"] == true) {
- matchToken = matchToken["matches"][0];
- var quantifierMax = opts.quantifierFilter.exec(matchToken)[0].replace("}", "");
- var testExp = regexPart + "{1," + quantifierMax + "}"; //relax quantifier validation
- for (var j = 0; j < openGroupCount; j++) {
- testExp += ")";
- }
- var exp = new RegExp("^(" + testExp + ")$");
- isvalid = exp.test(bufferStr);
- regexPart += matchToken;
- } else if (matchToken["isLiteral"] == true) {
- matchToken = matchToken["matches"][0];
- var testExp = regexPart, openGroupCloser = "";
- for (var j = 0; j < openGroupCount; j++) {
- openGroupCloser += ")";
- }
- for (var k = 0; k < matchToken.length; k++) { //relax literal validation
- testExp = (testExp + matchToken[k]).replace(/\|$/, "");
- var exp = new RegExp("^(" + testExp + openGroupCloser + ")$");
- isvalid = exp.test(bufferStr);
- if (isvalid) break;
- }
- regexPart += matchToken;
- //console.log(bufferStr + " " + exp + " " + isvalid);
- } else {
- regexPart += matchToken;
- var testExp = regexPart.replace(/\|$/, "");
- for (var j = 0; j < openGroupCount; j++) {
- testExp += ")";
- }
- var exp = new RegExp("^(" + testExp + ")$");
- isvalid = exp.test(bufferStr);
- //console.log(bufferStr + " " + exp + " " + isvalid);
- }
- if (isvalid) break;
- }
-
- if (fromGroup) {
- regexPart += ")";
- openGroupCount--;
- }
-
- return isvalid;
- }
-
-
- if (opts.regexTokens == null) {
- analyseRegex();
- }
-
- var cbuffer = buffer.slice(), regexPart = "", isValid = false, openGroupCount = 0;
- cbuffer.splice(pos, 0, chrs);
- var bufferStr = cbuffer.join('');
- for (var i = 0; i < opts.regexTokens.length; i++) {
- var regexToken = opts.regexTokens[i];
- isValid = validateRegexToken(regexToken, regexToken["isGroup"]);
- if (isValid) break;
- }
-
- return isValid;
- },
- cardinality: 1
- }
- }
- }
- });
-})(jQuery);
diff --git a/html/plugins/input-mask/phone-codes/phone-be.json b/html/plugins/input-mask/phone-codes/phone-be.json
deleted file mode 100644
index b510b784..00000000
--- a/html/plugins/input-mask/phone-codes/phone-be.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- { "mask": "+32(53)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Aalst (Alost)" },
- { "mask": "+32(3)###-##-##", "cc": "BE", "cd": "Belgium", "city": "Antwerpen (Anvers)" },
- { "mask": "+32(63)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Arlon" },
- { "mask": "+32(67)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Ath" },
- { "mask": "+32(50)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Brugge (Bruges)" },
- { "mask": "+32(2)###-##-##", "cc": "BE", "cd": "Belgium", "city": "Brussel/Bruxelles (Brussels)" },
- { "mask": "+32(71)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Charleroi" },
- { "mask": "+32(60)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Chimay" },
- { "mask": "+32(83)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Ciney" },
- { "mask": "+32(52)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Dendermonde" },
- { "mask": "+32(13)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Diest" },
- { "mask": "+32(82)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Dinant" },
- { "mask": "+32(86)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Durbuy" },
- { "mask": "+32(89)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Genk" },
- { "mask": "+32(9)###-##-##", "cc": "BE", "cd": "Belgium", "city": "Gent (Gand)" },
- { "mask": "+32(11)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Hasselt" },
- { "mask": "+32(14)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Herentals" },
- { "mask": "+32(85)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Huy (Hoei)" },
- { "mask": "+32(64)##-##-##", "cc": "BE", "cd": "Belgium", "city": "La Louvière" },
- { "mask": "+32(16)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Leuven (Louvain)" },
- { "mask": "+32(61)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Libramont" },
- { "mask": "+32(4)###-##-##", "cc": "BE", "cd": "Belgium", "city": "Liège (Luik)" },
- { "mask": "+32(15)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Mechelen (Malines)" },
- { "mask": "+32(47#)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Mobile Phones" },
- { "mask": "+32(48#)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Mobile Phones" },
- { "mask": "+32(49#)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Mobile Phones" },
- { "mask": "+32(65)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Mons (Bergen)" },
- { "mask": "+32(81)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Namur (Namen)" },
- { "mask": "+32(58)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Nieuwpoort (Nieuport)" },
- { "mask": "+32(54)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Ninove" },
- { "mask": "+32(67)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Nivelles (Nijvel)" },
- { "mask": "+32(59)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Oostende (Ostende)" },
- { "mask": "+32(51)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Roeselare (Roulers)" },
- { "mask": "+32(55)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Ronse" },
- { "mask": "+32(80)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Stavelot" },
- { "mask": "+32(12)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Tongeren (Tongres)" },
- { "mask": "+32(69)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Tounai" },
- { "mask": "+32(14)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Turnhout" },
- { "mask": "+32(87)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Verviers" },
- { "mask": "+32(58)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Veurne" },
- { "mask": "+32(19)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Wareme" },
- { "mask": "+32(10)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Wavre (Waver)" },
- { "mask": "+32(50)##-##-##", "cc": "BE", "cd": "Belgium", "city": "Zeebrugge" }
-]
\ No newline at end of file
diff --git a/html/plugins/input-mask/phone-codes/phone-codes.json b/html/plugins/input-mask/phone-codes/phone-codes.json
deleted file mode 100644
index 15bbd3a9..00000000
--- a/html/plugins/input-mask/phone-codes/phone-codes.json
+++ /dev/null
@@ -1,294 +0,0 @@
-[
- { "mask": "+247-####", "cc": "AC", "name_en": "Ascension", "desc_en": "", "name_ru": "Остров Вознесения", "desc_ru": "" },
- { "mask": "+376-###-###", "cc": "AD", "name_en": "Andorra", "desc_en": "", "name_ru": "Андорра", "desc_ru": "" },
- { "mask": "+971-5#-###-####", "cc": "AE", "name_en": "United Arab Emirates", "desc_en": "mobile", "name_ru": "Объединенные Арабские Эмираты", "desc_ru": "мобильные" },
- { "mask": "+971-#-###-####", "cc": "AE", "name_en": "United Arab Emirates", "desc_en": "", "name_ru": "Объединенные Арабские Эмираты", "desc_ru": "" },
- { "mask": "+93-##-###-####", "cc": "AF", "name_en": "Afghanistan", "desc_en": "", "name_ru": "Афганистан", "desc_ru": "" },
- { "mask": "+1(268)###-####", "cc": "AG", "name_en": "Antigua & Barbuda", "desc_en": "", "name_ru": "Антигуа и Барбуда", "desc_ru": "" },
- { "mask": "+1(264)###-####", "cc": "AI", "name_en": "Anguilla", "desc_en": "", "name_ru": "Ангилья", "desc_ru": "" },
- { "mask": "+355(###)###-###", "cc": "AL", "name_en": "Albania", "desc_en": "", "name_ru": "Албания", "desc_ru": "" },
- { "mask": "+374-##-###-###", "cc": "AM", "name_en": "Armenia", "desc_en": "", "name_ru": "Армения", "desc_ru": "" },
- { "mask": "+599-###-####", "cc": "AN", "name_en": "Caribbean Netherlands", "desc_en": "", "name_ru": "Карибские Нидерланды", "desc_ru": "" },
- { "mask": "+599-###-####", "cc": "AN", "name_en": "Netherlands Antilles", "desc_en": "", "name_ru": "Нидерландские Антильские острова", "desc_ru": "" },
- { "mask": "+599-9###-####", "cc": "AN", "name_en": "Netherlands Antilles", "desc_en": "Curacao", "name_ru": "Нидерландские Антильские острова", "desc_ru": "Кюрасао" },
- { "mask": "+244(###)###-###", "cc": "AO", "name_en": "Angola", "desc_en": "", "name_ru": "Ангола", "desc_ru": "" },
- { "mask": "+672-1##-###", "cc": "AQ", "name_en": "Australian bases in Antarctica", "desc_en": "", "name_ru": "Австралийская антарктическая база", "desc_ru": "" },
- { "mask": "+54(###)###-####", "cc": "AR", "name_en": "Argentina", "desc_en": "", "name_ru": "Аргентина", "desc_ru": "" },
- { "mask": "+1(684)###-####", "cc": "AS", "name_en": "American Samoa", "desc_en": "", "name_ru": "Американское Самоа", "desc_ru": "" },
- { "mask": "+43(###)###-####", "cc": "AT", "name_en": "Austria", "desc_en": "", "name_ru": "Австрия", "desc_ru": "" },
- { "mask": "+61-#-####-####", "cc": "AU", "name_en": "Australia", "desc_en": "", "name_ru": "Австралия", "desc_ru": "" },
- { "mask": "+297-###-####", "cc": "AW", "name_en": "Aruba", "desc_en": "", "name_ru": "Аруба", "desc_ru": "" },
- { "mask": "+994-##-###-##-##", "cc": "AZ", "name_en": "Azerbaijan", "desc_en": "", "name_ru": "Азербайджан", "desc_ru": "" },
- { "mask": "+387-##-#####", "cc": "BA", "name_en": "Bosnia and Herzegovina", "desc_en": "", "name_ru": "Босния и Герцеговина", "desc_ru": "" },
- { "mask": "+387-##-####", "cc": "BA", "name_en": "Bosnia and Herzegovina", "desc_en": "", "name_ru": "Босния и Герцеговина", "desc_ru": "" },
- { "mask": "+1(246)###-####", "cc": "BB", "name_en": "Barbados", "desc_en": "", "name_ru": "Барбадос", "desc_ru": "" },
- { "mask": "+880-##-###-###", "cc": "BD", "name_en": "Bangladesh", "desc_en": "", "name_ru": "Бангладеш", "desc_ru": "" },
- { "mask": "+32(###)###-###", "cc": "BE", "name_en": "Belgium", "desc_en": "", "name_ru": "Бельгия", "desc_ru": "" },
- { "mask": "+226-##-##-####", "cc": "BF", "name_en": "Burkina Faso", "desc_en": "", "name_ru": "Буркина Фасо", "desc_ru": "" },
- { "mask": "+359(###)###-###", "cc": "BG", "name_en": "Bulgaria", "desc_en": "", "name_ru": "Болгария", "desc_ru": "" },
- { "mask": "+973-####-####", "cc": "BH", "name_en": "Bahrain", "desc_en": "", "name_ru": "Бахрейн", "desc_ru": "" },
- { "mask": "+257-##-##-####", "cc": "BI", "name_en": "Burundi", "desc_en": "", "name_ru": "Бурунди", "desc_ru": "" },
- { "mask": "+229-##-##-####", "cc": "BJ", "name_en": "Benin", "desc_en": "", "name_ru": "Бенин", "desc_ru": "" },
- { "mask": "+1(441)###-####", "cc": "BM", "name_en": "Bermuda", "desc_en": "", "name_ru": "Бермудские острова", "desc_ru": "" },
- { "mask": "+673-###-####", "cc": "BN", "name_en": "Brunei Darussalam", "desc_en": "", "name_ru": "Бруней-Даруссалам", "desc_ru": "" },
- { "mask": "+591-#-###-####", "cc": "BO", "name_en": "Bolivia", "desc_en": "", "name_ru": "Боливия", "desc_ru": "" },
- { "mask": "+55-##-####[#]-####", "cc": "BR", "name_en": "Brazil", "desc_en": "", "name_ru": "Бразилия", "desc_ru": "" },
- { "mask": "+1(242)###-####", "cc": "BS", "name_en": "Bahamas", "desc_en": "", "name_ru": "Багамские Острова", "desc_ru": "" },
- { "mask": "+975-17-###-###", "cc": "BT", "name_en": "Bhutan", "desc_en": "", "name_ru": "Бутан", "desc_ru": "" },
- { "mask": "+975-#-###-###", "cc": "BT", "name_en": "Bhutan", "desc_en": "", "name_ru": "Бутан", "desc_ru": "" },
- { "mask": "+267-##-###-###", "cc": "BW", "name_en": "Botswana", "desc_en": "", "name_ru": "Ботсвана", "desc_ru": "" },
- { "mask": "+375(##)###-##-##", "cc": "BY", "name_en": "Belarus", "desc_en": "", "name_ru": "Беларусь (Белоруссия)", "desc_ru": "" },
- { "mask": "+501-###-####", "cc": "BZ", "name_en": "Belize", "desc_en": "", "name_ru": "Белиз", "desc_ru": "" },
- { "mask": "+243(###)###-###", "cc": "CD", "name_en": "Dem. Rep. Congo", "desc_en": "", "name_ru": "Дем. Респ. Конго (Киншаса)", "desc_ru": "" },
- { "mask": "+236-##-##-####", "cc": "CF", "name_en": "Central African Republic", "desc_en": "", "name_ru": "Центральноафриканская Республика", "desc_ru": "" },
- { "mask": "+242-##-###-####", "cc": "CG", "name_en": "Congo (Brazzaville)", "desc_en": "", "name_ru": "Конго (Браззавиль)", "desc_ru": "" },
- { "mask": "+41-##-###-####", "cc": "CH", "name_en": "Switzerland", "desc_en": "", "name_ru": "Швейцария", "desc_ru": "" },
- { "mask": "+225-##-###-###", "cc": "CI", "name_en": "Cote d’Ivoire (Ivory Coast)", "desc_en": "", "name_ru": "Кот-д’Ивуар", "desc_ru": "" },
- { "mask": "+682-##-###", "cc": "CK", "name_en": "Cook Islands", "desc_en": "", "name_ru": "Острова Кука", "desc_ru": "" },
- { "mask": "+56-#-####-####", "cc": "CL", "name_en": "Chile", "desc_en": "", "name_ru": "Чили", "desc_ru": "" },
- { "mask": "+237-####-####", "cc": "CM", "name_en": "Cameroon", "desc_en": "", "name_ru": "Камерун", "desc_ru": "" },
- { "mask": "+86(###)####-####", "cc": "CN", "name_en": "China (PRC)", "desc_en": "", "name_ru": "Китайская Н.Р.", "desc_ru": "" },
- { "mask": "+86(###)####-###", "cc": "CN", "name_en": "China (PRC)", "desc_en": "", "name_ru": "Китайская Н.Р.", "desc_ru": "" },
- { "mask": "+86-##-#####-#####", "cc": "CN", "name_en": "China (PRC)", "desc_en": "", "name_ru": "Китайская Н.Р.", "desc_ru": "" },
- { "mask": "+57(###)###-####", "cc": "CO", "name_en": "Colombia", "desc_en": "", "name_ru": "Колумбия", "desc_ru": "" },
- { "mask": "+506-####-####", "cc": "CR", "name_en": "Costa Rica", "desc_en": "", "name_ru": "Коста-Рика", "desc_ru": "" },
- { "mask": "+53-#-###-####", "cc": "CU", "name_en": "Cuba", "desc_en": "", "name_ru": "Куба", "desc_ru": "" },
- { "mask": "+238(###)##-##", "cc": "CV", "name_en": "Cape Verde", "desc_en": "", "name_ru": "Кабо-Верде", "desc_ru": "" },
- { "mask": "+599-###-####", "cc": "CW", "name_en": "Curacao", "desc_en": "", "name_ru": "Кюрасао", "desc_ru": "" },
- { "mask": "+357-##-###-###", "cc": "CY", "name_en": "Cyprus", "desc_en": "", "name_ru": "Кипр", "desc_ru": "" },
- { "mask": "+420(###)###-###", "cc": "CZ", "name_en": "Czech Republic", "desc_en": "", "name_ru": "Чехия", "desc_ru": "" },
- { "mask": "+49(####)###-####", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+49(###)###-####", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+49(###)##-####", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+49(###)##-###", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+49(###)##-##", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+49-###-###", "cc": "DE", "name_en": "Germany", "desc_en": "", "name_ru": "Германия", "desc_ru": "" },
- { "mask": "+253-##-##-##-##", "cc": "DJ", "name_en": "Djibouti", "desc_en": "", "name_ru": "Джибути", "desc_ru": "" },
- { "mask": "+45-##-##-##-##", "cc": "DK", "name_en": "Denmark", "desc_en": "", "name_ru": "Дания", "desc_ru": "" },
- { "mask": "+1(767)###-####", "cc": "DM", "name_en": "Dominica", "desc_en": "", "name_ru": "Доминика", "desc_ru": "" },
- { "mask": "+1(809)###-####", "cc": "DO", "name_en": "Dominican Republic", "desc_en": "", "name_ru": "Доминиканская Республика", "desc_ru": "" },
- { "mask": "+1(829)###-####", "cc": "DO", "name_en": "Dominican Republic", "desc_en": "", "name_ru": "Доминиканская Республика", "desc_ru": "" },
- { "mask": "+1(849)###-####", "cc": "DO", "name_en": "Dominican Republic", "desc_en": "", "name_ru": "Доминиканская Республика", "desc_ru": "" },
- { "mask": "+213-##-###-####", "cc": "DZ", "name_en": "Algeria", "desc_en": "", "name_ru": "Алжир", "desc_ru": "" },
- { "mask": "+593-##-###-####", "cc": "EC", "name_en": "Ecuador ", "desc_en": "mobile", "name_ru": "Эквадор ", "desc_ru": "мобильные" },
- { "mask": "+593-#-###-####", "cc": "EC", "name_en": "Ecuador", "desc_en": "", "name_ru": "Эквадор", "desc_ru": "" },
- { "mask": "+372-####-####", "cc": "EE", "name_en": "Estonia ", "desc_en": "mobile", "name_ru": "Эстония ", "desc_ru": "мобильные" },
- { "mask": "+372-###-####", "cc": "EE", "name_en": "Estonia", "desc_en": "", "name_ru": "Эстония", "desc_ru": "" },
- { "mask": "+20(###)###-####", "cc": "EG", "name_en": "Egypt", "desc_en": "", "name_ru": "Египет", "desc_ru": "" },
- { "mask": "+291-#-###-###", "cc": "ER", "name_en": "Eritrea", "desc_en": "", "name_ru": "Эритрея", "desc_ru": "" },
- { "mask": "+34(###)###-###", "cc": "ES", "name_en": "Spain", "desc_en": "", "name_ru": "Испания", "desc_ru": "" },
- { "mask": "+251-##-###-####", "cc": "ET", "name_en": "Ethiopia", "desc_en": "", "name_ru": "Эфиопия", "desc_ru": "" },
- { "mask": "+358(###)###-##-##", "cc": "FI", "name_en": "Finland", "desc_en": "", "name_ru": "Финляндия", "desc_ru": "" },
- { "mask": "+679-##-#####", "cc": "FJ", "name_en": "Fiji", "desc_en": "", "name_ru": "Фиджи", "desc_ru": "" },
- { "mask": "+500-#####", "cc": "FK", "name_en": "Falkland Islands", "desc_en": "", "name_ru": "Фолклендские острова", "desc_ru": "" },
- { "mask": "+691-###-####", "cc": "FM", "name_en": "F.S. Micronesia", "desc_en": "", "name_ru": "Ф.Ш. Микронезии", "desc_ru": "" },
- { "mask": "+298-###-###", "cc": "FO", "name_en": "Faroe Islands", "desc_en": "", "name_ru": "Фарерские острова", "desc_ru": "" },
- { "mask": "+262-#####-####", "cc": "FR", "name_en": "Mayotte", "desc_en": "", "name_ru": "Майотта", "desc_ru": "" },
- { "mask": "+33(###)###-###", "cc": "FR", "name_en": "France", "desc_en": "", "name_ru": "Франция", "desc_ru": "" },
- { "mask": "+508-##-####", "cc": "FR", "name_en": "St Pierre & Miquelon", "desc_en": "", "name_ru": "Сен-Пьер и Микелон", "desc_ru": "" },
- { "mask": "+590(###)###-###", "cc": "FR", "name_en": "Guadeloupe", "desc_en": "", "name_ru": "Гваделупа", "desc_ru": "" },
- { "mask": "+241-#-##-##-##", "cc": "GA", "name_en": "Gabon", "desc_en": "", "name_ru": "Габон", "desc_ru": "" },
- { "mask": "+1(473)###-####", "cc": "GD", "name_en": "Grenada", "desc_en": "", "name_ru": "Гренада", "desc_ru": "" },
- { "mask": "+995(###)###-###", "cc": "GE", "name_en": "Rep. of Georgia", "desc_en": "", "name_ru": "Грузия", "desc_ru": "" },
- { "mask": "+594-#####-####", "cc": "GF", "name_en": "Guiana (French)", "desc_en": "", "name_ru": "Фр. Гвиана", "desc_ru": "" },
- { "mask": "+233(###)###-###", "cc": "GH", "name_en": "Ghana", "desc_en": "", "name_ru": "Гана", "desc_ru": "" },
- { "mask": "+350-###-#####", "cc": "GI", "name_en": "Gibraltar", "desc_en": "", "name_ru": "Гибралтар", "desc_ru": "" },
- { "mask": "+299-##-##-##", "cc": "GL", "name_en": "Greenland", "desc_en": "", "name_ru": "Гренландия", "desc_ru": "" },
- { "mask": "+220(###)##-##", "cc": "GM", "name_en": "Gambia", "desc_en": "", "name_ru": "Гамбия", "desc_ru": "" },
- { "mask": "+224-##-###-###", "cc": "GN", "name_en": "Guinea", "desc_en": "", "name_ru": "Гвинея", "desc_ru": "" },
- { "mask": "+240-##-###-####", "cc": "GQ", "name_en": "Equatorial Guinea", "desc_en": "", "name_ru": "Экваториальная Гвинея", "desc_ru": "" },
- { "mask": "+30(###)###-####", "cc": "GR", "name_en": "Greece", "desc_en": "", "name_ru": "Греция", "desc_ru": "" },
- { "mask": "+502-#-###-####", "cc": "GT", "name_en": "Guatemala", "desc_en": "", "name_ru": "Гватемала", "desc_ru": "" },
- { "mask": "+1(671)###-####", "cc": "GU", "name_en": "Guam", "desc_en": "", "name_ru": "Гуам", "desc_ru": "" },
- { "mask": "+245-#-######", "cc": "GW", "name_en": "Guinea-Bissau", "desc_en": "", "name_ru": "Гвинея-Бисау", "desc_ru": "" },
- { "mask": "+592-###-####", "cc": "GY", "name_en": "Guyana", "desc_en": "", "name_ru": "Гайана", "desc_ru": "" },
- { "mask": "+852-####-####", "cc": "HK", "name_en": "Hong Kong", "desc_en": "", "name_ru": "Гонконг", "desc_ru": "" },
- { "mask": "+504-####-####", "cc": "HN", "name_en": "Honduras", "desc_en": "", "name_ru": "Гондурас", "desc_ru": "" },
- { "mask": "+385-##-###-###", "cc": "HR", "name_en": "Croatia", "desc_en": "", "name_ru": "Хорватия", "desc_ru": "" },
- { "mask": "+509-##-##-####", "cc": "HT", "name_en": "Haiti", "desc_en": "", "name_ru": "Гаити", "desc_ru": "" },
- { "mask": "+36(###)###-###", "cc": "HU", "name_en": "Hungary", "desc_en": "", "name_ru": "Венгрия", "desc_ru": "" },
- { "mask": "+62(8##)###-####", "cc": "ID", "name_en": "Indonesia ", "desc_en": "mobile", "name_ru": "Индонезия ", "desc_ru": "мобильные" },
- { "mask": "+62-##-###-##", "cc": "ID", "name_en": "Indonesia", "desc_en": "", "name_ru": "Индонезия", "desc_ru": "" },
- { "mask": "+62-##-###-###", "cc": "ID", "name_en": "Indonesia", "desc_en": "", "name_ru": "Индонезия", "desc_ru": "" },
- { "mask": "+62-##-###-####", "cc": "ID", "name_en": "Indonesia", "desc_en": "", "name_ru": "Индонезия", "desc_ru": "" },
- { "mask": "+62(8##)###-###", "cc": "ID", "name_en": "Indonesia ", "desc_en": "mobile", "name_ru": "Индонезия ", "desc_ru": "мобильные" },
- { "mask": "+62(8##)###-##-###", "cc": "ID", "name_en": "Indonesia ", "desc_en": "mobile", "name_ru": "Индонезия ", "desc_ru": "мобильные" },
- { "mask": "+353(###)###-###", "cc": "IE", "name_en": "Ireland", "desc_en": "", "name_ru": "Ирландия", "desc_ru": "" },
- { "mask": "+972-5#-###-####", "cc": "IL", "name_en": "Israel ", "desc_en": "mobile", "name_ru": "Израиль ", "desc_ru": "мобильные" },
- { "mask": "+972-#-###-####", "cc": "IL", "name_en": "Israel", "desc_en": "", "name_ru": "Израиль", "desc_ru": "" },
- { "mask": "+91(####)###-###", "cc": "IN", "name_en": "India", "desc_en": "", "name_ru": "Индия", "desc_ru": "" },
- { "mask": "+246-###-####", "cc": "IO", "name_en": "Diego Garcia", "desc_en": "", "name_ru": "Диего-Гарсия", "desc_ru": "" },
- { "mask": "+964(###)###-####", "cc": "IQ", "name_en": "Iraq", "desc_en": "", "name_ru": "Ирак", "desc_ru": "" },
- { "mask": "+98(###)###-####", "cc": "IR", "name_en": "Iran", "desc_en": "", "name_ru": "Иран", "desc_ru": "" },
- { "mask": "+354-###-####", "cc": "IS", "name_en": "Iceland", "desc_en": "", "name_ru": "Исландия", "desc_ru": "" },
- { "mask": "+39(###)####-###", "cc": "IT", "name_en": "Italy", "desc_en": "", "name_ru": "Италия", "desc_ru": "" },
- { "mask": "+1(876)###-####", "cc": "JM", "name_en": "Jamaica", "desc_en": "", "name_ru": "Ямайка", "desc_ru": "" },
- { "mask": "+962-#-####-####", "cc": "JO", "name_en": "Jordan", "desc_en": "", "name_ru": "Иордания", "desc_ru": "" },
- { "mask": "+81-##-####-####", "cc": "JP", "name_en": "Japan ", "desc_en": "mobile", "name_ru": "Япония ", "desc_ru": "мобильные" },
- { "mask": "+81(###)###-###", "cc": "JP", "name_en": "Japan", "desc_en": "", "name_ru": "Япония", "desc_ru": "" },
- { "mask": "+254-###-######", "cc": "KE", "name_en": "Kenya", "desc_en": "", "name_ru": "Кения", "desc_ru": "" },
- { "mask": "+996(###)###-###", "cc": "KG", "name_en": "Kyrgyzstan", "desc_en": "", "name_ru": "Киргизия", "desc_ru": "" },
- { "mask": "+855-##-###-###", "cc": "KH", "name_en": "Cambodia", "desc_en": "", "name_ru": "Камбоджа", "desc_ru": "" },
- { "mask": "+686-##-###", "cc": "KI", "name_en": "Kiribati", "desc_en": "", "name_ru": "Кирибати", "desc_ru": "" },
- { "mask": "+269-##-#####", "cc": "KM", "name_en": "Comoros", "desc_en": "", "name_ru": "Коморы", "desc_ru": "" },
- { "mask": "+1(869)###-####", "cc": "KN", "name_en": "Saint Kitts & Nevis", "desc_en": "", "name_ru": "Сент-Китс и Невис", "desc_ru": "" },
- { "mask": "+850-191-###-####", "cc": "KP", "name_en": "DPR Korea (North) ", "desc_en": "mobile", "name_ru": "Корейская НДР ", "desc_ru": "мобильные" },
- { "mask": "+850-##-###-###", "cc": "KP", "name_en": "DPR Korea (North)", "desc_en": "", "name_ru": "Корейская НДР", "desc_ru": "" },
- { "mask": "+850-###-####-###", "cc": "KP", "name_en": "DPR Korea (North)", "desc_en": "", "name_ru": "Корейская НДР", "desc_ru": "" },
- { "mask": "+850-###-###", "cc": "KP", "name_en": "DPR Korea (North)", "desc_en": "", "name_ru": "Корейская НДР", "desc_ru": "" },
- { "mask": "+850-####-####", "cc": "KP", "name_en": "DPR Korea (North)", "desc_en": "", "name_ru": "Корейская НДР", "desc_ru": "" },
- { "mask": "+850-####-#############", "cc": "KP", "name_en": "DPR Korea (North)", "desc_en": "", "name_ru": "Корейская НДР", "desc_ru": "" },
- { "mask": "+82-##-###-####", "cc": "KR", "name_en": "Korea (South)", "desc_en": "", "name_ru": "Респ. Корея", "desc_ru": "" },
- { "mask": "+965-####-####", "cc": "KW", "name_en": "Kuwait", "desc_en": "", "name_ru": "Кувейт", "desc_ru": "" },
- { "mask": "+1(345)###-####", "cc": "KY", "name_en": "Cayman Islands", "desc_en": "", "name_ru": "Каймановы острова", "desc_ru": "" },
- { "mask": "+7(6##)###-##-##", "cc": "KZ", "name_en": "Kazakhstan", "desc_en": "", "name_ru": "Казахстан", "desc_ru": "" },
- { "mask": "+7(7##)###-##-##", "cc": "KZ", "name_en": "Kazakhstan", "desc_en": "", "name_ru": "Казахстан", "desc_ru": "" },
- { "mask": "+856(20##)###-###", "cc": "LA", "name_en": "Laos ", "desc_en": "mobile", "name_ru": "Лаос ", "desc_ru": "мобильные" },
- { "mask": "+856-##-###-###", "cc": "LA", "name_en": "Laos", "desc_en": "", "name_ru": "Лаос", "desc_ru": "" },
- { "mask": "+961-##-###-###", "cc": "LB", "name_en": "Lebanon ", "desc_en": "mobile", "name_ru": "Ливан ", "desc_ru": "мобильные" },
- { "mask": "+961-#-###-###", "cc": "LB", "name_en": "Lebanon", "desc_en": "", "name_ru": "Ливан", "desc_ru": "" },
- { "mask": "+1(758)###-####", "cc": "LC", "name_en": "Saint Lucia", "desc_en": "", "name_ru": "Сент-Люсия", "desc_ru": "" },
- { "mask": "+423(###)###-####", "cc": "LI", "name_en": "Liechtenstein", "desc_en": "", "name_ru": "Лихтенштейн", "desc_ru": "" },
- { "mask": "+94-##-###-####", "cc": "LK", "name_en": "Sri Lanka", "desc_en": "", "name_ru": "Шри-Ланка", "desc_ru": "" },
- { "mask": "+231-##-###-###", "cc": "LR", "name_en": "Liberia", "desc_en": "", "name_ru": "Либерия", "desc_ru": "" },
- { "mask": "+266-#-###-####", "cc": "LS", "name_en": "Lesotho", "desc_en": "", "name_ru": "Лесото", "desc_ru": "" },
- { "mask": "+370(###)##-###", "cc": "LT", "name_en": "Lithuania", "desc_en": "", "name_ru": "Литва", "desc_ru": "" },
- { "mask": "+352(###)###-###", "cc": "LU", "name_en": "Luxembourg", "desc_en": "", "name_ru": "Люксембург", "desc_ru": "" },
- { "mask": "+371-##-###-###", "cc": "LV", "name_en": "Latvia", "desc_en": "", "name_ru": "Латвия", "desc_ru": "" },
- { "mask": "+218-##-###-###", "cc": "LY", "name_en": "Libya", "desc_en": "", "name_ru": "Ливия", "desc_ru": "" },
- { "mask": "+218-21-###-####", "cc": "LY", "name_en": "Libya", "desc_en": "Tripoli", "name_ru": "Ливия", "desc_ru": "Триполи" },
- { "mask": "+212-##-####-###", "cc": "MA", "name_en": "Morocco", "desc_en": "", "name_ru": "Марокко", "desc_ru": "" },
- { "mask": "+377(###)###-###", "cc": "MC", "name_en": "Monaco", "desc_en": "", "name_ru": "Монако", "desc_ru": "" },
- { "mask": "+377-##-###-###", "cc": "MC", "name_en": "Monaco", "desc_en": "", "name_ru": "Монако", "desc_ru": "" },
- { "mask": "+373-####-####", "cc": "MD", "name_en": "Moldova", "desc_en": "", "name_ru": "Молдова", "desc_ru": "" },
- { "mask": "+382-##-###-###", "cc": "ME", "name_en": "Montenegro", "desc_en": "", "name_ru": "Черногория", "desc_ru": "" },
- { "mask": "+261-##-##-#####", "cc": "MG", "name_en": "Madagascar", "desc_en": "", "name_ru": "Мадагаскар", "desc_ru": "" },
- { "mask": "+692-###-####", "cc": "MH", "name_en": "Marshall Islands", "desc_en": "", "name_ru": "Маршалловы Острова", "desc_ru": "" },
- { "mask": "+389-##-###-###", "cc": "MK", "name_en": "Republic of Macedonia", "desc_en": "", "name_ru": "Респ. Македония", "desc_ru": "" },
- { "mask": "+223-##-##-####", "cc": "ML", "name_en": "Mali", "desc_en": "", "name_ru": "Мали", "desc_ru": "" },
- { "mask": "+95-##-###-###", "cc": "MM", "name_en": "Burma (Myanmar)", "desc_en": "", "name_ru": "Бирма (Мьянма)", "desc_ru": "" },
- { "mask": "+95-#-###-###", "cc": "MM", "name_en": "Burma (Myanmar)", "desc_en": "", "name_ru": "Бирма (Мьянма)", "desc_ru": "" },
- { "mask": "+95-###-###", "cc": "MM", "name_en": "Burma (Myanmar)", "desc_en": "", "name_ru": "Бирма (Мьянма)", "desc_ru": "" },
- { "mask": "+976-##-##-####", "cc": "MN", "name_en": "Mongolia", "desc_en": "", "name_ru": "Монголия", "desc_ru": "" },
- { "mask": "+853-####-####", "cc": "MO", "name_en": "Macau", "desc_en": "", "name_ru": "Макао", "desc_ru": "" },
- { "mask": "+1(670)###-####", "cc": "MP", "name_en": "Northern Mariana Islands", "desc_en": "", "name_ru": "Северные Марианские острова Сайпан", "desc_ru": "" },
- { "mask": "+596(###)##-##-##", "cc": "MQ", "name_en": "Martinique", "desc_en": "", "name_ru": "Мартиника", "desc_ru": "" },
- { "mask": "+222-##-##-####", "cc": "MR", "name_en": "Mauritania", "desc_en": "", "name_ru": "Мавритания", "desc_ru": "" },
- { "mask": "+1(664)###-####", "cc": "MS", "name_en": "Montserrat", "desc_en": "", "name_ru": "Монтсеррат", "desc_ru": "" },
- { "mask": "+356-####-####", "cc": "MT", "name_en": "Malta", "desc_en": "", "name_ru": "Мальта", "desc_ru": "" },
- { "mask": "+230-###-####", "cc": "MU", "name_en": "Mauritius", "desc_en": "", "name_ru": "Маврикий", "desc_ru": "" },
- { "mask": "+960-###-####", "cc": "MV", "name_en": "Maldives", "desc_en": "", "name_ru": "Мальдивские острова", "desc_ru": "" },
- { "mask": "+265-1-###-###", "cc": "MW", "name_en": "Malawi", "desc_en": "Telecom Ltd", "name_ru": "Малави", "desc_ru": "Telecom Ltd" },
- { "mask": "+265-#-####-####", "cc": "MW", "name_en": "Malawi", "desc_en": "", "name_ru": "Малави", "desc_ru": "" },
- { "mask": "+52(###)###-####", "cc": "MX", "name_en": "Mexico", "desc_en": "", "name_ru": "Мексика", "desc_ru": "" },
- { "mask": "+52-##-##-####", "cc": "MX", "name_en": "Mexico", "desc_en": "", "name_ru": "Мексика", "desc_ru": "" },
- { "mask": "+60-##-###-####", "cc": "MY", "name_en": "Malaysia ", "desc_en": "mobile", "name_ru": "Малайзия ", "desc_ru": "мобильные" },
- { "mask": "+60(###)###-###", "cc": "MY", "name_en": "Malaysia", "desc_en": "", "name_ru": "Малайзия", "desc_ru": "" },
- { "mask": "+60-##-###-###", "cc": "MY", "name_en": "Malaysia", "desc_en": "", "name_ru": "Малайзия", "desc_ru": "" },
- { "mask": "+60-#-###-###", "cc": "MY", "name_en": "Malaysia", "desc_en": "", "name_ru": "Малайзия", "desc_ru": "" },
- { "mask": "+258-##-###-###", "cc": "MZ", "name_en": "Mozambique", "desc_en": "", "name_ru": "Мозамбик", "desc_ru": "" },
- { "mask": "+264-##-###-####", "cc": "NA", "name_en": "Namibia", "desc_en": "", "name_ru": "Намибия", "desc_ru": "" },
- { "mask": "+687-##-####", "cc": "NC", "name_en": "New Caledonia", "desc_en": "", "name_ru": "Новая Каледония", "desc_ru": "" },
- { "mask": "+227-##-##-####", "cc": "NE", "name_en": "Niger", "desc_en": "", "name_ru": "Нигер", "desc_ru": "" },
- { "mask": "+672-3##-###", "cc": "NF", "name_en": "Norfolk Island", "desc_en": "", "name_ru": "Норфолк (остров)", "desc_ru": "" },
- { "mask": "+234(###)###-####", "cc": "NG", "name_en": "Nigeria", "desc_en": "", "name_ru": "Нигерия", "desc_ru": "" },
- { "mask": "+234-##-###-###", "cc": "NG", "name_en": "Nigeria", "desc_en": "", "name_ru": "Нигерия", "desc_ru": "" },
- { "mask": "+234-##-###-##", "cc": "NG", "name_en": "Nigeria", "desc_en": "", "name_ru": "Нигерия", "desc_ru": "" },
- { "mask": "+234(###)###-####", "cc": "NG", "name_en": "Nigeria ", "desc_en": "mobile", "name_ru": "Нигерия ", "desc_ru": "мобильные" },
- { "mask": "+505-####-####", "cc": "NI", "name_en": "Nicaragua", "desc_en": "", "name_ru": "Никарагуа", "desc_ru": "" },
- { "mask": "+31-##-###-####", "cc": "NL", "name_en": "Netherlands", "desc_en": "", "name_ru": "Нидерланды", "desc_ru": "" },
- { "mask": "+47(###)##-###", "cc": "NO", "name_en": "Norway", "desc_en": "", "name_ru": "Норвегия", "desc_ru": "" },
- { "mask": "+977-##-###-###", "cc": "NP", "name_en": "Nepal", "desc_en": "", "name_ru": "Непал", "desc_ru": "" },
- { "mask": "+674-###-####", "cc": "NR", "name_en": "Nauru", "desc_en": "", "name_ru": "Науру", "desc_ru": "" },
- { "mask": "+683-####", "cc": "NU", "name_en": "Niue", "desc_en": "", "name_ru": "Ниуэ", "desc_ru": "" },
- { "mask": "+64(###)###-###", "cc": "NZ", "name_en": "New Zealand", "desc_en": "", "name_ru": "Новая Зеландия", "desc_ru": "" },
- { "mask": "+64-##-###-###", "cc": "NZ", "name_en": "New Zealand", "desc_en": "", "name_ru": "Новая Зеландия", "desc_ru": "" },
- { "mask": "+64(###)###-####", "cc": "NZ", "name_en": "New Zealand", "desc_en": "", "name_ru": "Новая Зеландия", "desc_ru": "" },
- { "mask": "+968-##-###-###", "cc": "OM", "name_en": "Oman", "desc_en": "", "name_ru": "Оман", "desc_ru": "" },
- { "mask": "+507-###-####", "cc": "PA", "name_en": "Panama", "desc_en": "", "name_ru": "Панама", "desc_ru": "" },
- { "mask": "+51(###)###-###", "cc": "PE", "name_en": "Peru", "desc_en": "", "name_ru": "Перу", "desc_ru": "" },
- { "mask": "+689-##-##-##", "cc": "PF", "name_en": "French Polynesia", "desc_en": "", "name_ru": "Французская Полинезия (Таити)", "desc_ru": "" },
- { "mask": "+675(###)##-###", "cc": "PG", "name_en": "Papua New Guinea", "desc_en": "", "name_ru": "Папуа-Новая Гвинея", "desc_ru": "" },
- { "mask": "+63(###)###-####", "cc": "PH", "name_en": "Philippines", "desc_en": "", "name_ru": "Филиппины", "desc_ru": "" },
- { "mask": "+92(###)###-####", "cc": "PK", "name_en": "Pakistan", "desc_en": "", "name_ru": "Пакистан", "desc_ru": "" },
- { "mask": "+48(###)###-###", "cc": "PL", "name_en": "Poland", "desc_en": "", "name_ru": "Польша", "desc_ru": "" },
- { "mask": "+970-##-###-####", "cc": "PS", "name_en": "Palestine", "desc_en": "", "name_ru": "Палестина", "desc_ru": "" },
- { "mask": "+351-##-###-####", "cc": "PT", "name_en": "Portugal", "desc_en": "", "name_ru": "Португалия", "desc_ru": "" },
- { "mask": "+680-###-####", "cc": "PW", "name_en": "Palau", "desc_en": "", "name_ru": "Палау", "desc_ru": "" },
- { "mask": "+595(###)###-###", "cc": "PY", "name_en": "Paraguay", "desc_en": "", "name_ru": "Парагвай", "desc_ru": "" },
- { "mask": "+974-####-####", "cc": "QA", "name_en": "Qatar", "desc_en": "", "name_ru": "Катар", "desc_ru": "" },
- { "mask": "+262-#####-####", "cc": "RE", "name_en": "Reunion", "desc_en": "", "name_ru": "Реюньон", "desc_ru": "" },
- { "mask": "+40-##-###-####", "cc": "RO", "name_en": "Romania", "desc_en": "", "name_ru": "Румыния", "desc_ru": "" },
- { "mask": "+381-##-###-####", "cc": "RS", "name_en": "Serbia", "desc_en": "", "name_ru": "Сербия", "desc_ru": "" },
- { "mask": "+7(###)###-##-##", "cc": "RU", "name_en": "Russia", "desc_en": "", "name_ru": "Россия", "desc_ru": "" },
- { "mask": "+250(###)###-###", "cc": "RW", "name_en": "Rwanda", "desc_en": "", "name_ru": "Руанда", "desc_ru": "" },
- { "mask": "+966-5-####-####", "cc": "SA", "name_en": "Saudi Arabia ", "desc_en": "mobile", "name_ru": "Саудовская Аравия ", "desc_ru": "мобильные" },
- { "mask": "+966-#-###-####", "cc": "SA", "name_en": "Saudi Arabia", "desc_en": "", "name_ru": "Саудовская Аравия", "desc_ru": "" },
- { "mask": "+677-###-####", "cc": "SB", "name_en": "Solomon Islands ", "desc_en": "mobile", "name_ru": "Соломоновы Острова ", "desc_ru": "мобильные" },
- { "mask": "+677-#####", "cc": "SB", "name_en": "Solomon Islands", "desc_en": "", "name_ru": "Соломоновы Острова", "desc_ru": "" },
- { "mask": "+248-#-###-###", "cc": "SC", "name_en": "Seychelles", "desc_en": "", "name_ru": "Сейшелы", "desc_ru": "" },
- { "mask": "+249-##-###-####", "cc": "SD", "name_en": "Sudan", "desc_en": "", "name_ru": "Судан", "desc_ru": "" },
- { "mask": "+46-##-###-####", "cc": "SE", "name_en": "Sweden", "desc_en": "", "name_ru": "Швеция", "desc_ru": "" },
- { "mask": "+65-####-####", "cc": "SG", "name_en": "Singapore", "desc_en": "", "name_ru": "Сингапур", "desc_ru": "" },
- { "mask": "+290-####", "cc": "SH", "name_en": "Saint Helena", "desc_en": "", "name_ru": "Остров Святой Елены", "desc_ru": "" },
- { "mask": "+290-####", "cc": "SH", "name_en": "Tristan da Cunha", "desc_en": "", "name_ru": "Тристан-да-Кунья", "desc_ru": "" },
- { "mask": "+386-##-###-###", "cc": "SI", "name_en": "Slovenia", "desc_en": "", "name_ru": "Словения", "desc_ru": "" },
- { "mask": "+421(###)###-###", "cc": "SK", "name_en": "Slovakia", "desc_en": "", "name_ru": "Словакия", "desc_ru": "" },
- { "mask": "+232-##-######", "cc": "SL", "name_en": "Sierra Leone", "desc_en": "", "name_ru": "Сьерра-Леоне", "desc_ru": "" },
- { "mask": "+378-####-######", "cc": "SM", "name_en": "San Marino", "desc_en": "", "name_ru": "Сан-Марино", "desc_ru": "" },
- { "mask": "+221-##-###-####", "cc": "SN", "name_en": "Senegal", "desc_en": "", "name_ru": "Сенегал", "desc_ru": "" },
- { "mask": "+252-##-###-###", "cc": "SO", "name_en": "Somalia", "desc_en": "", "name_ru": "Сомали", "desc_ru": "" },
- { "mask": "+252-#-###-###", "cc": "SO", "name_en": "Somalia", "desc_en": "", "name_ru": "Сомали", "desc_ru": "" },
- { "mask": "+252-#-###-###", "cc": "SO", "name_en": "Somalia ", "desc_en": "mobile", "name_ru": "Сомали ", "desc_ru": "мобильные" },
- { "mask": "+597-###-####", "cc": "SR", "name_en": "Suriname ", "desc_en": "mobile", "name_ru": "Суринам ", "desc_ru": "мобильные" },
- { "mask": "+597-###-###", "cc": "SR", "name_en": "Suriname", "desc_en": "", "name_ru": "Суринам", "desc_ru": "" },
- { "mask": "+211-##-###-####", "cc": "SS", "name_en": "South Sudan", "desc_en": "", "name_ru": "Южный Судан", "desc_ru": "" },
- { "mask": "+239-##-#####", "cc": "ST", "name_en": "Sao Tome and Principe", "desc_en": "", "name_ru": "Сан-Томе и Принсипи", "desc_ru": "" },
- { "mask": "+503-##-##-####", "cc": "SV", "name_en": "El Salvador", "desc_en": "", "name_ru": "Сальвадор", "desc_ru": "" },
- { "mask": "+1(721)###-####", "cc": "SX", "name_en": "Sint Maarten", "desc_en": "", "name_ru": "Синт-Маартен", "desc_ru": "" },
- { "mask": "+963-##-####-###", "cc": "SY", "name_en": "Syrian Arab Republic", "desc_en": "", "name_ru": "Сирийская арабская республика", "desc_ru": "" },
- { "mask": "+268-##-##-####", "cc": "SZ", "name_en": "Swaziland", "desc_en": "", "name_ru": "Свазиленд", "desc_ru": "" },
- { "mask": "+1(649)###-####", "cc": "TC", "name_en": "Turks & Caicos", "desc_en": "", "name_ru": "Тёркс и Кайкос", "desc_ru": "" },
- { "mask": "+235-##-##-##-##", "cc": "TD", "name_en": "Chad", "desc_en": "", "name_ru": "Чад", "desc_ru": "" },
- { "mask": "+228-##-###-###", "cc": "TG", "name_en": "Togo", "desc_en": "", "name_ru": "Того", "desc_ru": "" },
- { "mask": "+66-##-###-####", "cc": "TH", "name_en": "Thailand ", "desc_en": "mobile", "name_ru": "Таиланд ", "desc_ru": "мобильные" },
- { "mask": "+66-##-###-###", "cc": "TH", "name_en": "Thailand", "desc_en": "", "name_ru": "Таиланд", "desc_ru": "" },
- { "mask": "+992-##-###-####", "cc": "TJ", "name_en": "Tajikistan", "desc_en": "", "name_ru": "Таджикистан", "desc_ru": "" },
- { "mask": "+690-####", "cc": "TK", "name_en": "Tokelau", "desc_en": "", "name_ru": "Токелау", "desc_ru": "" },
- { "mask": "+670-###-####", "cc": "TL", "name_en": "East Timor", "desc_en": "", "name_ru": "Восточный Тимор", "desc_ru": "" },
- { "mask": "+670-77#-#####", "cc": "TL", "name_en": "East Timor", "desc_en": "Timor Telecom", "name_ru": "Восточный Тимор", "desc_ru": "Timor Telecom" },
- { "mask": "+670-78#-#####", "cc": "TL", "name_en": "East Timor", "desc_en": "Timor Telecom", "name_ru": "Восточный Тимор", "desc_ru": "Timor Telecom" },
- { "mask": "+993-#-###-####", "cc": "TM", "name_en": "Turkmenistan", "desc_en": "", "name_ru": "Туркменистан", "desc_ru": "" },
- { "mask": "+216-##-###-###", "cc": "TN", "name_en": "Tunisia", "desc_en": "", "name_ru": "Тунис", "desc_ru": "" },
- { "mask": "+676-#####", "cc": "TO", "name_en": "Tonga", "desc_en": "", "name_ru": "Тонга", "desc_ru": "" },
- { "mask": "+90(###)###-####", "cc": "TR", "name_en": "Turkey", "desc_en": "", "name_ru": "Турция", "desc_ru": "" },
- { "mask": "+1(868)###-####", "cc": "TT", "name_en": "Trinidad & Tobago", "desc_en": "", "name_ru": "Тринидад и Тобаго", "desc_ru": "" },
- { "mask": "+688-90####", "cc": "TV", "name_en": "Tuvalu ", "desc_en": "mobile", "name_ru": "Тувалу ", "desc_ru": "мобильные" },
- { "mask": "+688-2####", "cc": "TV", "name_en": "Tuvalu", "desc_en": "", "name_ru": "Тувалу", "desc_ru": "" },
- { "mask": "+886-#-####-####", "cc": "TW", "name_en": "Taiwan", "desc_en": "", "name_ru": "Тайвань", "desc_ru": "" },
- { "mask": "+886-####-####", "cc": "TW", "name_en": "Taiwan", "desc_en": "", "name_ru": "Тайвань", "desc_ru": "" },
- { "mask": "+255-##-###-####", "cc": "TZ", "name_en": "Tanzania", "desc_en": "", "name_ru": "Танзания", "desc_ru": "" },
- { "mask": "+380(##)###-##-##", "cc": "UA", "name_en": "Ukraine", "desc_en": "", "name_ru": "Украина", "desc_ru": "" },
- { "mask": "+256(###)###-###", "cc": "UG", "name_en": "Uganda", "desc_en": "", "name_ru": "Уганда", "desc_ru": "" },
- { "mask": "+44-##-####-####", "cc": "UK", "name_en": "United Kingdom", "desc_en": "", "name_ru": "Великобритания", "desc_ru": "" },
- { "mask": "+598-#-###-##-##", "cc": "UY", "name_en": "Uruguay", "desc_en": "", "name_ru": "Уругвай", "desc_ru": "" },
- { "mask": "+998-##-###-####", "cc": "UZ", "name_en": "Uzbekistan", "desc_en": "", "name_ru": "Узбекистан", "desc_ru": "" },
- { "mask": "+39-6-698-#####", "cc": "VA", "name_en": "Vatican City", "desc_en": "", "name_ru": "Ватикан", "desc_ru": "" },
- { "mask": "+1(784)###-####", "cc": "VC", "name_en": "Saint Vincent & the Grenadines", "desc_en": "", "name_ru": "Сент-Винсент и Гренадины", "desc_ru": "" },
- { "mask": "+58(###)###-####", "cc": "VE", "name_en": "Venezuela", "desc_en": "", "name_ru": "Венесуэла", "desc_ru": "" },
- { "mask": "+1(284)###-####", "cc": "VG", "name_en": "British Virgin Islands", "desc_en": "", "name_ru": "Британские Виргинские острова", "desc_ru": "" },
- { "mask": "+1(340)###-####", "cc": "VI", "name_en": "US Virgin Islands", "desc_en": "", "name_ru": "Американские Виргинские острова", "desc_ru": "" },
- { "mask": "+84-##-####-###", "cc": "VN", "name_en": "Vietnam", "desc_en": "", "name_ru": "Вьетнам", "desc_ru": "" },
- { "mask": "+84(###)####-###", "cc": "VN", "name_en": "Vietnam", "desc_en": "", "name_ru": "Вьетнам", "desc_ru": "" },
- { "mask": "+678-##-#####", "cc": "VU", "name_en": "Vanuatu ", "desc_en": "mobile", "name_ru": "Вануату ", "desc_ru": "мобильные" },
- { "mask": "+678-#####", "cc": "VU", "name_en": "Vanuatu", "desc_en": "", "name_ru": "Вануату", "desc_ru": "" },
- { "mask": "+681-##-####", "cc": "WF", "name_en": "Wallis and Futuna", "desc_en": "", "name_ru": "Уоллис и Футуна", "desc_ru": "" },
- { "mask": "+685-##-####", "cc": "WS", "name_en": "Samoa", "desc_en": "", "name_ru": "Самоа", "desc_ru": "" },
- { "mask": "+967-###-###-###", "cc": "YE", "name_en": "Yemen ", "desc_en": "mobile", "name_ru": "Йемен ", "desc_ru": "мобильные" },
- { "mask": "+967-#-###-###", "cc": "YE", "name_en": "Yemen", "desc_en": "", "name_ru": "Йемен", "desc_ru": "" },
- { "mask": "+967-##-###-###", "cc": "YE", "name_en": "Yemen", "desc_en": "", "name_ru": "Йемен", "desc_ru": "" },
- { "mask": "+27-##-###-####", "cc": "ZA", "name_en": "South Africa", "desc_en": "", "name_ru": "Южно-Африканская Респ.", "desc_ru": "" },
- { "mask": "+260-##-###-####", "cc": "ZM", "name_en": "Zambia", "desc_en": "", "name_ru": "Замбия", "desc_ru": "" },
- { "mask": "+263-#-######", "cc": "ZW", "name_en": "Zimbabwe", "desc_en": "", "name_ru": "Зимбабве", "desc_ru": "" },
- { "mask": "+1(###)###-####", "cc": ["US", "CA"], "name_en": "USA and Canada", "desc_en": "", "name_ru": "США и Канада", "desc_ru": "" }
-]
diff --git a/html/plugins/input-mask/phone-codes/readme.txt b/html/plugins/input-mask/phone-codes/readme.txt
deleted file mode 100644
index 0a170a76..00000000
--- a/html/plugins/input-mask/phone-codes/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-more phone masks can be found at https://github.com/andr-04/inputmask-multi
\ No newline at end of file
diff --git a/html/plugins/jQueryUI/jquery-ui.js b/html/plugins/jQueryUI/jquery-ui.js
deleted file mode 100644
index 31ee9cd8..00000000
--- a/html/plugins/jQueryUI/jquery-ui.js
+++ /dev/null
@@ -1,16617 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-03-11
-* http://jqueryui.com
-* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-(function( factory ) {
- if ( typeof define === "function" && define.amd ) {
-
- // AMD. Register as an anonymous module.
- define([ "jquery" ], factory );
- } else {
-
- // Browser globals
- factory( jQuery );
- }
-}(function( $ ) {
-/*!
- * jQuery UI Core 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/ui-core/
- */
-
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
- version: "1.11.4",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- scrollParent: function( includeHidden ) {
- var position = this.css( "position" ),
- excludeStaticParent = position === "absolute",
- overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
- scrollParent = this.parents().filter( function() {
- var parent = $( this );
- if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
- return false;
- }
- return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
- }).eq( 0 );
-
- return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
- },
-
- uniqueId: (function() {
- var uuid = 0;
-
- return function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + ( ++uuid );
- }
- });
- };
- })(),
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( /^ui-id-\d+$/.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
- return !!img && visible( img );
- }
- return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.fn.extend({
- focus: (function( orig ) {
- return function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- orig.apply( this, arguments );
- };
- })( $.fn.focus ),
-
- disableSelection: (function() {
- var eventType = "onselectstart" in document.createElement( "div" ) ?
- "selectstart" :
- "mousedown";
-
- return function() {
- return this.bind( eventType + ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- };
- })(),
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- //
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- }
-});
-
-// $.ui.plugin is deprecated. Use $.widget() extensions instead.
-$.ui.plugin = {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args, allowDisconnected ) {
- var i,
- set = instance.plugins[ name ];
-
- if ( !set ) {
- return;
- }
-
- if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
-};
-
-
-/*!
- * jQuery UI Widget 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/jQuery.widget/
- */
-
-
-var widget_uuid = 0,
- widget_slice = Array.prototype.slice;
-
-$.cleanData = (function( orig ) {
- return function( elems ) {
- var events, elem, i;
- for ( i = 0; (elem = elems[i]) != null; i++ ) {
- try {
-
- // Only trigger remove when necessary to save time
- events = $._data( elem, "events" );
- if ( events && events.remove ) {
- $( elem ).triggerHandler( "remove" );
- }
-
- // http://bugs.jquery.com/ticket/8235
- } catch ( e ) {}
- }
- orig( elems );
- };
-})( $.cleanData );
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-
- return constructor;
-};
-
-$.widget.extend = function( target ) {
- var input = widget_slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = widget_slice.call( arguments, 1 ),
- returnValue = this;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( options === "instance" ) {
- returnValue = instance;
- return false;
- }
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
-
- // Allow multiple hashes to be passed on init
- if ( args.length ) {
- options = $.widget.extend.apply( null, [ options ].concat(args) );
- }
-
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} );
- if ( instance._init ) {
- instance._init();
- }
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = widget_uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( arguments.length === 1 ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( arguments.length === 1 ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled", !!value );
-
- // If the widget is becoming disabled, then nothing is interactive
- if ( value ) {
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOptions({ disabled: false });
- },
- disable: function() {
- return this._setOptions({ disabled: true });
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
- this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
-
- // Clear the stack to avoid memory leaks (#10056)
- this.bindings = $( this.bindings.not( element ).get() );
- this.focusable = $( this.focusable.not( element ).get() );
- this.hoverable = $( this.hoverable.not( element ).get() );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-var widget = $.widget;
-
-
-/*!
- * jQuery UI Mouse 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/mouse/
- */
-
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-var mouse = $.widget("ui.mouse", {
- version: "1.11.4",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown." + this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click." + this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("." + this.widgetName);
- if ( this._mouseMoveDelegate ) {
- this.document
- .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if ( mouseHandled ) {
- return;
- }
-
- this._mouseMoved = false;
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
-
- this.document
- .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // Only check for mouseups outside the document if you've moved inside the document
- // at least once. This prevents the firing of mouseup in the case of IE<9, which will
- // fire a mousemove event if content is placed under the cursor. See #7778
- // Support: IE <9
- if ( this._mouseMoved ) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
-
- // Iframe mouseup check - mouseup occurred in another document
- } else if ( !event.which ) {
- return this._mouseUp( event );
- }
- }
-
- if ( event.which || event.button ) {
- this._mouseMoved = true;
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- this.document
- .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- mouseHandled = false;
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-
-/*!
- * jQuery UI Position 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/position/
- */
-
-(function() {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth, supportsOffsetFractions,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-function getDimensions( elem ) {
- var raw = elem[0];
- if ( raw.nodeType === 9 ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: 0, left: 0 }
- };
- }
- if ( $.isWindow( raw ) ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
- };
- }
- if ( raw.preventDefault ) {
- return {
- width: 0,
- height: 0,
- offset: { top: raw.pageY, left: raw.pageX }
- };
- }
- return {
- width: elem.outerWidth(),
- height: elem.outerHeight(),
- offset: elem.offset()
- };
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
- "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
- "ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeUniqueId();
-
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown: function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var options = this.options;
- this._processPanels();
-
- // was collapsed or no panel
- if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
- options.active = false;
- this.active = $();
- // active false only when collapsible is true
- } else if ( options.active === false ) {
- this._activate( 0 );
- // was active, but active panel is gone
- } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- // all remaining panel are disabled
- if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
- options.active = false;
- this.active = $();
- // activate previous panel
- } else {
- this._activate( Math.max( 0, options.active - 1 ) );
- }
- // was active, active panel still exists
- } else {
- // make sure active index is correct
- options.active = this.headers.index( this.active );
- }
-
- this._destroyIcons();
-
- this._refresh();
- },
-
- _processPanels: function() {
- var prevHeaders = this.headers,
- prevPanels = this.panels;
-
- this.headers = this.element.find( this.options.header )
- .addClass( "ui-accordion-header ui-state-default ui-corner-all" );
-
- this.panels = this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .filter( ":not(.ui-accordion-content-active)" )
- .hide();
-
- // Avoid memory leaks (#10056)
- if ( prevPanels ) {
- this._off( prevHeaders.not( this.headers ) );
- this._off( prevPanels.not( this.panels ) );
- }
- },
-
- _refresh: function() {
- var maxHeight,
- options = this.options,
- heightStyle = options.heightStyle,
- parent = this.element.parent();
-
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
- .removeClass( "ui-corner-all" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this.headers
- .attr( "role", "tab" )
- .each(function() {
- var header = $( this ),
- headerId = header.uniqueId().attr( "id" ),
- panel = header.next(),
- panelId = panel.uniqueId().attr( "id" );
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- "aria-expanded": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-hidden": "false"
- });
- }
-
- this._createIcons();
-
- this._setupEvents( options.event );
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {
- keydown: "_keydown"
- };
- if ( event ) {
- $.each( event.split( " " ), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.headers.add( this.headers.next() ) );
- this._on( this.headers, events );
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._hoverable( this.headers );
- this._focusable( this.headers );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-hidden": "true"
- });
- toHide.prev().attr({
- "aria-selected": "false",
- "aria-expanded": "false"
- });
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr({
- "tabIndex": -1,
- "aria-expanded": "false"
- });
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr( "aria-hidden", "false" )
- .prev()
- .attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- boxSizing = toShow.css( "box-sizing" ),
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( this.showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( this.hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( this.hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( this.showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- if ( boxSizing === "content-box" ) {
- adjust += fx.now;
- }
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
- }
- this._trigger( "activate", null, data );
- }
-});
-
-
-/*!
- * jQuery UI Menu 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/menu/
- */
-
-
-var menu = $.widget( "ui.menu", {
- version: "1.11.4",
- defaultElement: "",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- items: "> *",
- menus: "ul",
- position: {
- my: "left-1 top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
-
- // Flag used to prevent firing of the click handler
- // as the event bubbles up through nested menus
- this.mouseHandled = false;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- });
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item": function( event ) {
- var target = $( event.target );
- if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- this.select( event );
-
- // Only set the mouseHandled flag if the event will bubble, see #9469.
- if ( !event.isPropagationStopped() ) {
- this.mouseHandled = true;
- }
-
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
-
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- // Ignore mouse events while typeahead is active, see #10458.
- // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
- // is over an item in the menu
- if ( this.previousFilter ) {
- return;
- }
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.find( this.options.items ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( this._closeOnDocumentClick( event ) ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- this.mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).addBack()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .removeClass( "ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip,
- preventDefault = true;
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- match = this._filterMenuItems( character );
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- match = this._filterMenuItems( character );
- }
-
- if ( match.length ) {
- this.focus( event, match );
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.is( "[aria-haspopup='true']" ) ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus, items,
- that = this,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.parent(),
- submenuCarat = $( "" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
- items = menus.find( this.options.items );
-
- // Initialize menu-items containing spaces and/or dashes only as dividers
- items.not( ".ui-menu-item" ).each(function() {
- var item = $( this );
- if ( that._isDivider( item ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Don't refresh list items that are already adapted
- items.not( ".ui-menu-item, .ui-menu-divider" )
- .addClass( "ui-menu-item" )
- .uniqueId()
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Add aria-disabled attribute to any disabled menu item
- items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.element.find( ".ui-menu-icon" )
- .removeClass( this.options.icons.submenu )
- .addClass( value.submenu );
- }
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- }
- this._super( key, value );
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.outerHeight();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( ".ui-state-active" ).not( ".ui-state-focus" )
- .removeClass( "ui-state-active" );
- },
-
- _closeOnDocumentClick: function( event ) {
- return !$( event.target ).closest( ".ui-menu" ).length;
- },
-
- _isDivider: function( item ) {
-
- // Match hyphen, em dash, en dash
- return !/[^\-\u2014\u2013\s]/.test( item.text() );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .find( this.options.items )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.find( this.options.items )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- },
-
- _filterMenuItems: function(character) {
- var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
- regex = new RegExp( "^" + escapedCharacter, "i" );
-
- return this.activeMenu
- .find( this.options.items )
-
- // Only match on items, not dividers or other content (#10571)
- .filter( ".ui-menu-item" )
- .filter(function() {
- return regex.test( $.trim( $( this ).text() ) );
- });
- }
-});
-
-
-/*!
- * jQuery UI Autocomplete 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/autocomplete/
- */
-
-
-$.widget( "ui.autocomplete", {
- version: "1.11.4",
- defaultElement: "",
- options: {
- appendTo: null,
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- requestIndex: 0,
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
- nodeName = this.element[ 0 ].nodeName.toLowerCase(),
- isTextarea = nodeName === "textarea",
- isInput = nodeName === "input";
-
- this.isMultiLine =
- // Textareas are always multi-line
- isTextarea ? true :
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- isInput ? false :
- // All other element types are determined by whether or not they're contentEditable
- this.element.prop( "isContentEditable" );
-
- this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- event.preventDefault();
- }
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "" )
- .addClass( "ui-autocomplete ui-front" )
- .appendTo( this._appendTo() )
- .menu({
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .hide()
- .menu( "instance" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- var label, item;
- // support: Firefox
- // Prevent accidental activation of menu items in Firefox (#7024 #9118)
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- item = ui.item.data( "ui-autocomplete-item" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- }
-
- // Announce the value in the liveRegion
- label = ui.item.attr( "aria-label" ) || item.value;
- if ( label && $.trim( label ).length ) {
- this.liveRegion.children().hide();
- $( "" ).text( label ).appendTo( this.liveRegion );
- }
- },
- menuselect: function( event, ui ) {
- var item = ui.item.data( "ui-autocomplete-item" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "", {
- role: "status",
- "aria-live": "assertive",
- "aria-relevant": "additions"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .appendTo( this.document[ 0 ].body );
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this._appendTo() );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element || !element[ 0 ] ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[ 0 ].body;
- }
-
- return element;
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray( this.options.source ) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response([]);
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
-
- // Search if the value has changed, or if the user retypes the same value (see #7434)
- var equalValues = this.term === this._value(),
- menuVisible = this.menu.element.is( ":visible" ),
- modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
-
- if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var index = ++this.requestIndex;
-
- return $.proxy(function( content ) {
- if ( index === this.requestIndex ) {
- this.__response( content );
- }
-
- this.pending--;
- if ( !this.pending ) {
- this.element.removeClass( "ui-autocomplete-loading" );
- }
- }, this );
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend( {}, item, {
- label: item.label || item.value,
- value: item.value || item.label
- });
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element.empty();
- this._renderMenu( ul, items );
- this.isNewMenu = true;
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ) );
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "- " ).text( item.label ).appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
-
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
-
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- },
- filter: function( array, term ) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
- return $.grep( array, function( value ) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.children().hide();
- $( "" ).text( message ).appendTo( this.liveRegion );
- }
-});
-
-var autocomplete = $.ui.autocomplete;
-
-
-/*!
- * jQuery UI Button 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/button/
- */
-
-
-var lastActive,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var form = $( this );
- setTimeout(function() {
- form.find( ":ui-button" ).button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- name = name.replace( /'/g, "\\'" );
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "'][type=radio]" );
- } else {
- radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.11.4",
- defaultElement: "
" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-x" ),
- overflowY = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] ),
- isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
- return {
- element: withinElement,
- isWindow: isWindow,
- isDocument: isDocument,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
-
- // support: jQuery 1.6.x
- // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
- width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- dimensions = getDimensions( target );
- if ( target[0].preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- }
- targetWidth = dimensions.width;
- targetHeight = dimensions.height;
- targetOffset = dimensions.offset;
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !supportsOffsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem: elem
- });
- }
- });
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- } else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
- position.top += myOffset + atOffset + offset;
- }
- } else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function() {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-})();
-
-var position = $.ui.position;
-
-
-/*!
- * jQuery UI Accordion 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/accordion/
- */
-
-
-var accordion = $.widget( "ui.accordion", {
- version: "1.11.4",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- hideProps: {
- borderTopWidth: "hide",
- borderBottomWidth: "hide",
- paddingTop: "hide",
- paddingBottom: "hide",
- height: "hide"
- },
-
- showProps: {
- borderTopWidth: "show",
- borderBottomWidth: "show",
- paddingTop: "show",
- paddingBottom: "show",
- height: "show"
- },
-
- _create: function() {
- var options = this.options;
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
- // ARIA
- .attr( "role", "tablist" );
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
-
- this._processPanels();
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this._refresh();
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- panel: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "